diff --git a/Makefile b/Makefile index f5bf8151..68de62bb 100644 --- a/Makefile +++ b/Makefile @@ -2,12 +2,12 @@ ###################################################################### # Makefile - command file for make to create CBFlib # # # -# Version 0.9.6 19 May 2020 # +# Version 0.9.7 28 June 2021 # # # # Paul Ellis and # # Herbert J. Bernstein (yaya@bernstein-plus-sons.com) # # # -# (C) Copyright 2006 - 2020 Herbert J. Bernstein # +# (C) Copyright 2006 - 2021 Herbert J. Bernstein # # # ###################################################################### @@ -251,7 +251,7 @@ .DELETE_ON_ERROR: # Version string -VERSION = 0.9.6 +VERSION = 0.9.7 # # Directories @@ -265,7 +265,8 @@ BIN = $(ROOT)/bin SRC = $(ROOT)/src INCLUDE = $(ROOT)/include M4 = $(ROOT)/m4 -PYCBF = $(ROOT)/pycbf +PY2CBF = $(ROOT)/py2cbf +PY3CBF = $(ROOT)/pycbf EXAMPLES = $(ROOT)/examples TEMPLATES= $(ROOT)/templates DECTRIS_EXAMPLES = $(EXAMPLES)/dectris_cbf_template_test @@ -274,7 +275,6 @@ MINICBF_TEST = $(ROOT)/minicbf_test GRAPHICS = $(ROOT)/html_graphics DATADIRI = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Input DATADIRO = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output -DATADIRS = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only CBF_PREFIX ?= $(HOME) # @@ -289,6 +289,19 @@ CBFLIB_DONT_USE_LZ4?=no CBFLIB_DONT_USE_BSHUF?=no +CBFLIB_DONT_USE_LOCAL_NUWEB ?= no +ifeq ($(CBFLIB_DONT_USE_LOCAL_NUWEB),yes) +NUWEB=nuweb +NUWEB_DEP= +NUWEB_DEP2= +else +NUWEB=$(BIN)/nuweb +NUWEB_DEP=nuweb-1.60 +NUWEB_DEP2=$(BIN)/nuweb +endif + + + CBFLIB_DONT_HAVE_FGETLN ?= yes ifeq ($(CBFLIB_DONT_HAVE_FGETLN),yes) SRC_FGETLN = $(SRC)/fgetln.c @@ -297,15 +310,26 @@ SRC_FGETLN = endif -CBFLIB_DONT_USE_PYCIFRW ?= no -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) +CBFLIB_DONT_USE_PY2CIFRW ?= no +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) # -# Definitions to get versions of PyCifRW and PLY +# Definitions to get versions of python2 PyCifRW and PLY # -PYCIFRW ?= PyCifRW-4.1 -PLY = ply-3.2 -PYCIFRWFLAG = -DCBF_USE_PYCIFRW -PYCIFRW_PREFIX ?= $(HOME)/.local +PY2CIFRW ?= PyCifRW-4.1 +PY2PLY = ply-3.2 +PY2CIFRWFLAG = -DCBF_USE_PYCIFRW +PY2CIFRW_PREFIX ?= $(HOME)/.local +endif + +CBFLIB_DONT_USE_PY3CIFRW ?= no +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +# +# Definitions to get versions of python3 PyCifRW and PLY +# +PY3CIFRW ?= PyCifRW-4.3_rev_19Jun21 +PY3PLY = ply-3.11 +PY3CIFRWFLAG = -DCBF_USE_PYCIFRW +PY3CIFRW_PREFIX ?= $(HOME)/.local endif # @@ -322,13 +346,20 @@ TIFF_INSTALL = $(TIFF)_INSTALL ifneq ($(HDF5_PREFIX),) # already installed on system CBFLIB_DONT_USE_LOCAL_HDF5 = yes +HDF5CFLAGS=-DH5_USE_110_API endif ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes) HDF5_PREFIX ?= $(PWD) -HDF5 ?= hdf5-1.10.6 +HDF5 ?= hdf5-1.12.0 +#HDF5 ?= hdf5-1.10.6 #HDF5 = hdf5-1.8.18 #HDF5 = hdf5-1.10.5 +ifeq ($(HDF5),hdf5-1.12.0) +HDF5CFLAGS=-DH5_USE_110_API +else +HDF5CFLAGS= +endif HDF5dep = $(HDF5) HDF5_INSTALL = $(HDF5)_INSTALL ifneq ($(MSYS2),yes) @@ -379,7 +410,7 @@ ifneq ($(CBFLIB_DONT_USE_LZ4),yes) # Definitions to get a version of HDF5Plugin for LZ4 # ifneq ($(MSYS2),yes) -LZ4 ?= HDF5Plugin_14Aug20 +LZ4 ?= HDF5Plugin_5Jun21 else LZ4 ?= HDF5-External-Filter-Plugins endif @@ -430,9 +461,8 @@ endif # # Definition of python to use # -#PYTHON = python -PYTHON ?= python2 - +PYTHON2 ?= python2 +PYTHON3 ?= python3 # # Definitions to get a stable version of regex @@ -539,12 +569,6 @@ PYSWIG = swig -python # JSWIG = swig -java -# -# Program to generate LaTex and HTML program documentation -# - -NUWEB = nuweb - # # Compiler for Java # @@ -597,14 +621,24 @@ endif MISCFLAG = $(NOLLFLAG) $(ULPFLAG) # -# PYCBF definitions +# PY2CBF definitions # -PYCBFEXT = so -PYCBFBOPT = -PYCBFIOPT = +PY2CBFEXT = so +PY2CBFBOPT = +PY2CBFIOPT = SETUP_PY = setup.py INSTALLSETUP_PY = installsetup.py +# +# PY3CBF definitions +# +PY3CBFEXT = so +PY3CBFBOPT = +PY3CBFIOPT = +SETUP_PY = setup.py +INSTALLSETUP_PY = installsetup.py + + # # Set the compiler and flags # @@ -617,20 +651,24 @@ INSTALLSETUP_PY = installsetup.py CC = gcc C++ = g++ ifneq ($(CBFDEBUG),) -CFLAGS = -g -O0 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing -DCBFDEBUG=1 +CFLAGS = -g -O0 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing -DCBFDEBUG=1 $(HDF5CFLAGS) else -CFLAGS = -g -O3 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing +CFLAGS = -g -O3 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing $(HDF5CFLAGS) endif LDFLAGS = F90C = gfortran -F90FLAGS = -g -fno-range-check +F90FLAGS = -g -fno-range-check -fallow-invalid-boz F90LDFLAGS = SOCFLAGS = -fPIC SOLDFLAGS = -shared -Wl,-rpath,$(CBF_PREFIX)/lib JAVAINCLUDES = -I$(JDKDIR)/include -I$(JDKDIR)/include/linux +ifeq ($(HDF5_PREFIX),) LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; -#LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; -RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/LIB:$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/LIB:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +else +LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$(HDF5_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/LIB:$(HDF5_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +endif EXTRALIBS = -lm M4FLAGS = -Dfcb_bytes_in_rec=131072 TIME = time @@ -645,18 +683,24 @@ endif DATAURLBASE = http://downloads.sf.net/cbflib/ DATAURLI = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Input.tar.gz DATAURLO = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output.tar.gz -DATAURLS = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz # # URLs from which to retrieve needed external package snapshots # -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWURL = http://downloads.sf.net/cbflib/$(PYCIFRW).tar.gz -PLYURL = http://www.dabeaz.com/ply/$(PLY).tar.gz +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2CIFRWURL = http://downloads.sf.net/cbflib/$(PY2CIFRW).tar.gz +PY2PLYURL = http://www.dabeaz.com/ply/$(PY2PLY).tar.gz +endif +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3CIFRWURL = http://downloads.sf.net/cbflib/$(PY3CIFRW).tar.gz +PY3PLYURL = http://downloads.sf.net/cbflib/$(PY3PLY).tar.gz endif REGEX_URL ?= http://downloads.sf.net/cbflib/$(REGEX).tar.gz TIFF_URL ?= http://downloads.sf.net/cbflib/$(TIFF).tar.gz HDF5_URL ?= http://downloads.sf.net/cbflib/$(HDF5).tar.gz +ifneq ($(CBFLIB_DONT_USE_LOCAL_NUWEB),yes) +NUWEB_URL ?= http://downloads.sf.net/cbflib/$(NUWEB_DEP).tar.gz +endif ifneq ($(MSYS2),yes) LZ4_URL = http://downloads.sf.net/cbflib/$(LZ4).tar.gz else @@ -673,10 +717,11 @@ INCLUDES = -I$(INCLUDE) -I$(SRC) $(HDF5include) # # runtime library path export commands # -RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export LD_LIBRARY_PATH; \ - DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export DYLD_LIBRARY_PATH; \ - LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib;export LD_RUN_PATH; - +ifeq ($(HDF5_PREFIX),) +RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export LD_LIBRARY_PATH; DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export DYLD_LIBRARY_PATH; LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib;export LD_RUN_PATH; +else +RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib:$(HDF5_PREFIX)/lib;export LD_LIBRARY_PATH; DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib:$(HDF5_PREFIX)/lib;export DYLD_LIBRARY_PATH; LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib:$(HDF5_PREFIX)/lib;export LD_RUN_PATH; +endif ###################################################################### # You should not need to make modifications below this line # @@ -758,8 +803,15 @@ SOURCE = $(SRC)/cbf.c \ $(SRC)/img.c \ $(SRC_FGETLN) $(SRC_REALPATH) -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYSOURCE = $(SRC)/drel_lex.py \ +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2SOURCE = $(SRC)/drel_lex.py \ + $(SRC)/drel_yacc.py \ + $(SRC)/drelc.py \ + $(SRC)/drel_prep.py +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3SOURCE = $(SRC)/drel_lex.py \ $(SRC)/drel_yacc.py \ $(SRC)/drelc.py \ $(SRC)/drel_prep.py @@ -876,6 +928,26 @@ default: @echo ' ' @echo ' $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(PYCIFRWFLAG)' @echo ' ' + @echo ' If you have changed any of the nuweb .w input files, you will need' + @echo ' need nuweb installed, check that CBFLIB_DONT_USE_LOCAL_NUWEB,' + @echo ' and NUWEB are defined correctly :' + @echo ' ' + @echo ' The current values are:' + @echo ' ' + @echo ' CBFLIB_DONT_USE_LOCAL_NUWEB = $(CBFLIB_DONT_USE_LOCAL_NUWEB)' + @echo ' NUWEB = $(NUWEB)' + @echo ' NUWEB_DEP = $(NUWEB_DEP)' + @echo ' NUWEB_DEP2 = $(NUWEB_DEP2)' + @echo ' ' + @echo ' You will need either a system HDF5 1.12 or it to be installed here.' + @echo ' Check that CBFLIB_DONT_USE_LOCAL_HDF5 and HDF5 are defined correctly :' + @echo ' ' + @echo ' The current values are:' + @echo ' ' + @echo ' CBFLIB_DONT_USE_LOCAL_HDF5 = $(CBFLIB_DONT_USE_LOCAL_HDF5)' + @echo ' HDF5 = $(HDF5)' + @echo ' HDF5_PREFIX = $(HDF5_PREFIX)' + @echo ' ' @echo ' Before installing the CBF library and example programs, check' @echo ' that the install directory is correct:' @echo ' ' @@ -907,20 +979,10 @@ default: @echo ' The tests assume that several data files are in the directories' @echo ' $(DATADIRI) and $(DATADIRO)' @echo ' ' - @echo ' Alternatively tests can be run comparing MD5 signatures only by' - @echo ' ' - @echo ' make tests_sigs_only' - @echo ' ' - @echo ' These signature only tests save space and download time by' - @echo ' assuming that input data files and the output signatures' - @echo ' are in the directories' - @echo ' $(DATADIRI) and $(DATADIRS)' - @echo ' ' @echo ' These directory can be obtained from' @echo ' ' @echo ' $(DATAURLI) ' @echo ' $(DATAURLO) ' - @echo ' $(DATAURLS) ' @echo ' ' @echo ' To clean up the directories type:' @echo ' ' @@ -936,10 +998,16 @@ default: # # Compile the library and examples # -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEPS = $(PYCIFRW) $(PLY) +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2CIFRWDEPS = $(PY2CIFRW) $(PY2PLY) else -PYCIFRWDEPS = +PY2CIFRWDEPS = +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3CIFRWDEPS = $(PY3CIFRW) $(PY3PLY) +else +PY3CIFRWDEPS = endif ifneq ($(CBFLIB_DONT_USE_LZ4),yes) @@ -959,7 +1027,8 @@ all:: $(BIN) $(SOURCE) $(F90SOURCE) $(HEADERS) \ $(HDF5) \ $(LZ4DEPS) \ $(BSHUFDEPS) \ - $(PYCIFRWDEPS) \ + $(PY2CIFRWDEPS) \ + $(PY3CIFRWDEPS) \ symlinksdone \ $(REGEXDEP) \ $(LIB) \ @@ -1001,92 +1070,101 @@ shared: $(SOLIB)/libcbf.so $(SOLIB)/libfcb.so $(SOLIB)/libimg.so javawrapper: shared $(JCBF) $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEF = -Dcbf_use_pycifrw=yes +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2CIFRWDEF = -Dcbf_use_py2cifrw=yes +else +PY2CIFRWDEF = +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3CIFRWDEF = -Dcbf_use_py3cifrw=yes else -PYCIFRWDEF = +PY3CIFRWDEF = endif -Makefiles: Makefile \ - Makefile_LINUX \ - Makefile_LINUX_64 \ +Makefiles: \ + Makefile \ + Makefile_LINUX \ + Makefile_OSX \ + Makefile_MINGW \ + Makefile_MSYS2 + +Makefiles_pre_0.9.7: \ + Makefile_LINUX_64 \ Makefile_LINUX_gcc42 \ Makefile_LINUX_DMALLOC \ Makefile_LINUX_gcc42_DMALLOC \ - Makefile_OSX \ Makefile_OSX_gcc42 \ Makefile_OSX_gcc42_DMALLOC \ - Makefile_AIX \ - Makefile_MINGW \ - Makefile_MSYS2 \ + Makefile_AIX \ Makefile_IRIX_gcc Makefile_LINUX: $(M4)/Makefile.m4 -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX $(M4)/Makefile.m4 > Makefile_LINUX.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX $(M4)/Makefile.m4 > Makefile_LINUX.tmp mv Makefile_LINUX.tmp Makefile_LINUX Makefile_LINUX_DMALLOC: $(M4)/Makefile.m4 -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_DMALLOC.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_DMALLOC.tmp mv Makefile_LINUX_DMALLOC.tmp Makefile_LINUX_DMALLOC Makefile_LINUX_64: $(M4)/Makefile.m4 -cp Makefile_LINUX_64 Makefile_LINUX_64_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_64 $(M4)/Makefile.m4 > Makefile_LINUX_64.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_64 $(M4)/Makefile.m4 > Makefile_LINUX_64.tmp mv Makefile_LINUX_64.tmp Makefile_LINUX_64 Makefile_LINUX_gcc42: $(M4)/Makefile.m4 -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42 $(M4)/Makefile.m4 > Makefile_LINUX_gcc42.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_gcc42 $(M4)/Makefile.m4 > Makefile_LINUX_gcc42.tmp mv Makefile_LINUX_gcc42.tmp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_DMALLOC: $(M4)/Makefile.m4 -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_gcc42_DMALLOC.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_gcc42_DMALLOC.tmp mv Makefile_LINUX_gcc42_DMALLOC.tmp Makefile_LINUX_gcc42_DMALLOC Makefile_OSX: $(M4)/Makefile.m4 -cp Makefile_OSX Makefile_OSX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX $(M4)/Makefile.m4 > Makefile_OSX.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=OSX $(M4)/Makefile.m4 > Makefile_OSX.tmp mv Makefile_OSX.tmp Makefile_OSX Makefile_OSX_gcc42: $(M4)/Makefile.m4 -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42 $(M4)/Makefile.m4 > Makefile_OSX_gcc42.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=OSX_gcc42 $(M4)/Makefile.m4 > Makefile_OSX_gcc42.tmp mv Makefile_OSX_gcc42.tmp Makefile_OSX_gcc42 Makefile_OSX_gcc42_DMALLOC: $(M4)/Makefile.m4 -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_OSX_gcc42_DMALLOC.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=OSX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_OSX_gcc42_DMALLOC.tmp mv Makefile_OSX_gcc42_DMALLOC.tmp Makefile_OSX_gcc42_DMALLOC Makefile_AIX: $(M4)/Makefile.m4 -cp Makefile_AIX Makefile_AIX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=AIX $(M4)/Makefile.m4 > Makefile_AIX.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=AIX $(M4)/Makefile.m4 > Makefile_AIX.tmp mv Makefile_AIX.tmp Makefile_AIX Makefile_MINGW: $(M4)/Makefile.m4 -cp Makefile_MINGW Makefile_MINGW_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MINGW $(M4)/Makefile.m4 > Makefile_MINGW.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=MINGW $(M4)/Makefile.m4 > Makefile_MINGW.tmp mv Makefile_MINGW.tmp Makefile_MINGW Makefile_MSYS2: $(M4)/Makefile.m4 -cp Makefile_MSYS2 Makefile_MSYS2_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MSYS2 $(M4)/Makefile.m4 > Makefile_MSYS2.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=MSYS2 $(M4)/Makefile.m4 > Makefile_MSYS2.tmp mv Makefile_MSYS2.tmp Makefile_MSYS2 Makefile_IRIX_gcc: $(M4)/Makefile.m4 -cp Makefile_IRIX_gcc Makefile_IRIX_gcc_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=IRIX_gcc $(M4)/Makefile.m4 > Makefile_IRIX_gcc.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=IRIX_gcc $(M4)/Makefile.m4 > Makefile_IRIX_gcc.tmp mv Makefile_IRIX_gcc.tmp Makefile_IRIX_gcc Makefile: $(M4)/Makefile.m4 -cp Makefile Makefile_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=default $(M4)/Makefile.m4 > Makefile.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=default $(M4)/Makefile.m4 > Makefile.tmp mv Makefile.tmp Makefile cbflib.ini: $(M4)/Makefile.m4 @@ -1102,12 +1180,12 @@ symlinksdone: ./.symlinks $(SLFLAGS) touch symlinksdone -install: baseinstall pycbfinstall \ +install: baseinstall py2cbfinstall py3cbfinstall \ $(HDF5_INSTALL) \ $(TIFF_INSTALL) \ $(REGEX_INSTALL) -userinstall: baseinstall pycbfuserinstall \ +userinstall: baseinstall py2cbfuserinstall py3cbfuserinstall \ $(HDF5_INSTALL) \ $(TIFF_INSTALL) \ $(REGEX_INSTALL) @@ -1239,38 +1317,96 @@ endif chmod 755 $(CBF_PREFIX)/bin/batch_convert_minicbf.sh chmod 644 $(CBF_PREFIX)/include/cbflib/*.h -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -# -# PyCifRW -# -build_pycifrw: $(M4)/Makefile.m4 - touch build_pycifrw -$(PYCIFRW): build_pycifrw - -rm -rf $(PYCIFRW) - -rm -rf $(PYCIFRW).tar.gz - $(DOWNLOAD) $(PYCIFRWURL) - tar -xvf $(PYCIFRW).tar.gz - -rm $(PYCIFRW).tar.gz - (cd $(PYCIFRW); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +# +# Py2CifRW +# +build_py2cifrw: $(M4)/Makefile.m4 + touch build_py2cifrw +$(PY2CIFRW): build_py2cifrw + -rm -rf $(PY2CIFRW) + -rm -rf $(PY2CIFRW).tar.gz + $(DOWNLOAD) $(PY2CIFRWURL) + tar -xvf $(PY2CIFRW).tar.gz + -rm $(PY2CIFRW).tar.gz + (cd $(PY2CIFRW); \ + PYTHONPATH=$(PY2CIFRW_PREFIX)/lib/python:$(PY2CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON2) setup.py install --prefix= --home=$(PY2CIFRW_PREFIX) ) + +# +# PY2PLY +# +build_py2ply: $(M4)/Makefile.m4 + touch build_py2ply +$(PY2PLY): build_py2ply + -rm -rf $(PY2PLY) + -rm -rf $(PY2PLY).tar.gz + $(DOWNLOAD) $(PY2PLYURL) + tar -xvf $(PY2PLY).tar.gz + -rm $(PY2PLY).tar.gz + (cd $(PY2PLY); \ + PYTHONPATH=$(PY2CIFRW_PREFIX)/lib/python:$(PY2CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON2) setup.py install --prefix= --home=$(PY2CIFRW_PREFIX) ) +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +# +# Py3CifRW +# +build_py3cifrw: $(M4)/Makefile.m4 + touch build_py3cifrw +$(PY3CIFRW): build_py3cifrw + -rm -rf $(PY3CIFRW) + -rm -rf $(PY3CIFRW).tar.gz + $(DOWNLOAD) $(PY3CIFRWURL) + tar -xvf $(PY3CIFRW).tar.gz + -rm $(PY3CIFRW).tar.gz + (cd $(PY3CIFRW); \ + PYTHONPATH=$(PY3CIFRW_PREFIX)/lib/python:$(PY3CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON3) setup.py install --prefix= --home=$(PY3CIFRW_PREFIX) ) + +# +# PY3PLY +# +build_py3ply: $(M4)/Makefile.m4 + touch build_py3ply +$(PY3PLY): build_py3ply + -rm -rf $(PY3PLY) + -rm -rf $(PY3PLY).tar.gz + $(DOWNLOAD) $(PY3PLYURL) + tar -xvf $(PY3PLY).tar.gz + -rm $(PY3PLY).tar.gz + (cd $(PY3PLY); \ + PYTHONPATH=$(PY3CIFRW_PREFIX)/lib/python:$(PY3CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON3) setup.py install --prefix= --home=$(PY3CIFRW_PREFIX) ) +endif + # -# PLY +# NUWEB # -build_ply: $(M4)/Makefile.m4 - touch build_ply -$(PLY): build_ply - -rm -rf $(PLY) - -rm -rf $(PLY).tar.gz - $(DOWNLOAD) $(PLYURL) - tar -xvf $(PLY).tar.gz - -rm $(PLY).tar.gz - (cd $(PLY); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) +ifneq ($(NUWEB_DEP),'') +$(NUWEB_DEP): + -rm -rf $(NUWEB_DEP) + -rm -rf $(NUWEB_DEP).tar.gz + $(DOWNLOAD) $(NUWEB_URL) + tar -xvf $(NUWEB_DEP).tar.gz + touch $(NUWEB_DEP) + rm $(NUWEB_DEP).tar.gz + +$(NUWEB_DEP2): $(NUWEB_DEP) + (cd $(NUWEB_DEP); make nuweb; cp nuweb $(NUWEB_DEP2)) endif + # # REGEX # @@ -1370,7 +1506,7 @@ ifneq ($(MSYS2),yes) tar -xvf $(LZ4).tar.gz -rm $(LZ4).tar.gz (cp $(LZ4include)/lz4.h $(INCLUDE); \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/lz4.c -o lz4.o; \ + $(CC) $(CFLAGS) $(SOWCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/lz4.c -o lz4.o; \ $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/h5zlz4.c -o h5zlz4.o; \ $(CC) -shared lz4.o h5zlz4.o -o $(SOLIB)/libh5zlz4.so; \ rm lz4.o h5zlz4.o) @@ -1567,53 +1703,147 @@ endif # # Python bindings # -$(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ - $(PYCBF)/$(SETUP_PY) \ - $(PYCBF)/pycbf.i \ - $(PYCBF)/cbfhandlewrappers.i \ - $(PYCBF)/cbfdetectorwrappers.i \ - $(PYCBF)/cbfgenericwrappers.i \ - $(PYCBF)/cbfgoniometerwrappers.i + +$(PY2CBF)/make_pycbf.py: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/make_pycbf.w + (cd $(PY2CBF); $(NUWEB) make_pycbf.w) + +$(PY2CBF)/pycbf.i: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf_i.w + (cd $(PY2CBF); $(NUWEB) pycbf_i.w) + +$(PY2CBF)/py2setup_py.m4 \ +$(PY2CBF)/win32.bat \ +$(PY2CBF)/linux.sh \ +$(PY2CBF)/makeflatascii.py \ +$(PY2CBF)/pycbf_test1.py \ +$(PY2CBF)/pycbf_test2.py \ +$(PY2CBF)/pycbf_test3.py \ +$(PY2CBF)/pycbf_test4.py \ +$(PY2CBF)/pycbf_testfelaxes.py \ +$(PY2CBF)/xmas/readmarheader.py \ +$(PY2CBF)/xmas/xmasheaders.py \ +$(PY2CBF)/xmas/xmas_cif_template.cif : $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w + (cd $(PY2CBF); $(NUWEB) pycbf.w ) + touch $(PY2CBF)/py2setup_py.m4 + +$(PY2CBF)/_py2cbf.$(PY2CBFEXT): $(PY2CBF) shared \ + $(PY2CBF)/py2setup.py \ + $(PY2CBF)/pycbf.i \ + $(PY2CBF)/cbfhandlewrappers.i \ + $(PY2CBF)/cbfdetectorwrappers.i \ + $(PY2CBF)/cbfgenericwrappers.i \ + $(PY2CBF)/cbfgoniometerwrappers.i -cp $(SOLIB)/*.so $(LIB) - (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) + (cd $(PY2CBF); $(PYTHON2) py2setup.py build $(PY2CBFBOPT); cp build/lib*/_py2cbf*.$(PY2CBFEXT) .) -$(PYCBF)/pycbfinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --prefix=$(CBF_PREFIX)) +$(PY2CBF)/py2cbfinstall: $(PY2CBF)/pycbf.py + (cd $(PY2CBF); $(PYTHON2) $(INSTALLSETUP_PY) install $(PY2CBFIOPT) --prefix=$(CBF_PREFIX)) -$(PYCBF)/pycbfuserinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --user) +$(PY2CBF)/py2cbfuserinstall: $(PY2CBF)/pycbf.py + (cd $(PY2CBF); $(PYTHON2) $(INSTALLSETUP_PY) install $(PY2CBFIOPT) --user) -$(PYCBF)/setup.py: $(M4)/setup_py.m4 +$(PY2CBF)/py2setup.py: $(PY2CBF)/py2setup_py.m4 (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) + $(PY2CBF)/py2setup_py.m4 > $@) -$(PYCBF)/setup_MINGW.py: m4/setup_py.m4 +$(PY2CBF)/py2setup_MINGW.py: $(PY2CBF)/setup_py.m4 (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) + $(PY2CBF)/py2setup_py.m4 > $@) -$(LIB)/_pycbf.$(PYCBFEXT): $(PYCBF)/_pycbf.$(PYCBFEXT) +$(LIB)/_py2cbf.$(PY2CBFEXT): $(PY2CBF)/_py2cbf.$(PY2CBFEXT) mkdir -p $(LIB) - cp $(PYCBF)/_pycbf.$(PYCBFEXT) $(LIB)/_pycbf.$(PYCBFEXT) + cp $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(LIB)/_py2cbf.$(PY2CBFEXT) -$(PYCBF)/pycbf.pdf: $(PYCBF)/pycbf.w - (cd $(PYCBF); \ +$(PY2CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w + (cd $(PY2CBF); \ $(NUWEB) pycbf; \ latex pycbf; \ $(NUWEB) pycbf; \ latex pycbf; \ dvipdfm pycbf ) -$(PYCBF)/CBFlib.txt: $(DOC)/CBFlib.html - links -dump $(DOC)/CBFlib.html > $(PYCBF)/CBFlib.txt +$(PY2CBF)/CBFlib.txt: $(DOC)/CBFlib.html + links -dump $(DOC)/CBFlib.html > $(PY2CBF)/CBFlib.txt + +$(PY2CBF)/pycbf.py: $(PY2CBF)/pycbf.pdf $(PY2CBF)/cbfdetectorwrappers.i \ + $(PY2CBF)/cbfgenericwrappers.i \ + $(PY2CBF)/cbfgoniometerwrappers.i \ + $(PY2CBF)/CBFlib.txt $(PY2CBF)/make_pycbf.py + (cd $(PY2CBF); $(PYTHON2) make_pycbf.py; $(PYSWIG) -module py2cbf pycbf.i; \ + $(PYTHON2) py2setup.py build; mv pycbf.py rawpycbf.py; \ + cat rawpycbf.py | sed "s/ _pycbf/ _py2cbf/" > pycbf.py ) + +$(PY3CBF)/make_pycbf.py: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/make_pycbf.w + (cd $(PY3CBF); $(NUWEB) make_pycbf.w) + +$(PY3CBF)/pycbf.i: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf_i.w + (cd $(PY3CBF); $(NUWEB) pycbf_i.w) + +$(PY3CBF)/py3setup_py.m4 \ +$(PY3CBF)/win32.bat \ +$(PY3CBF)/linux.sh \ +$(PY3CBF)/makeflatascii.py \ +$(PY3CBF)/pycbf_test1.py \ +$(PY3CBF)/pycbf_test2.py \ +$(PY3CBF)/pycbf_test3.py \ +$(PY3CBF)/pycbf_test4.py \ +$(PY3CBF)/pycbf_testfelaxes.py \ +$(PY3CBF)/xmas/readmarheader.py \ +$(PY3CBF)/xmas/xmasheaders.py \ +$(PY3CBF)/xmas/xmas_cif_template.cif: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w + (cd $(PY3CBF); $(NUWEB) pycbf.w ) + touch $(PY3CBF)/py3setup_py.m4 + + +$(PY3CBF)/_pycbf.$(PY3CBFEXT): $(PY3CBF) shared \ + $(PY3CBF)/py3setup.py \ + $(PY3CBF)/pycbf.i \ + $(PY3CBF)/cbfhandlewrappers.i \ + $(PY3CBF)/cbfdetectorwrappers.i \ + $(PY3CBF)/cbfgenericwrappers.i \ + $(PY3CBF)/cbfgoniometerwrappers.i + -cp $(SOLIB)/*.so $(LIB) + (cd $(PY3CBF); $(PYTHON3) py3setup.py build $(PY3CBFBOPT); cp build/lib*/_pycbf*.$(PY3CBFEXT) .) + +$(PY3CBF)/py3cbfinstall: $(PY3CBF)/pycbf.py + (cd $(PY3CBF); $(PYTHON3) $(INSTALLSETUP_PY) install $(PY3CBFIOPT) --prefix=$(CBF_PREFIX)) + +$(PY3CBF)/py3cbfuserinstall: $(PY3CBF)/pycbf.py + (cd $(PY3CBF); $(PYTHON3) $(INSTALLSETUP_PY) install $(PY3CBFIOPT) --user) + +$(PY3CBF)/py3setup.py: $(PY3CBF)/py3setup_py.m4 + (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ + -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ + $(PY3CBF)/py3setup_py.m4 > $@) + +$(PY3CBF)/py3setup_MINGW.py: $(PY3CBF)/py3setup_py.m4 + (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ + -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ + $(PY3CBF)/py3setup_py.m4 > $@) -$(PYCBF)/cbfhandlewrappers.i \ -$(PYCBF)/cbfdetectorwrappers.i \ -$(PYCBF)/cbfgenericwrappers.i \ -$(PYCBF)/cbfgoniometerwrappers.i: $(PYCBF)/CBFlib.txt $(PYCBF)/make_pycbf.py - (cd $(PYCBF); $(PYTHON) make_pycbf.py; $(PYSWIG) pycbf.i; $(PYTHON) setup.py build) +$(LIB)/_pycbf.$(PY3CBFEXT): $(PY3CBF)/_pycbf.$(PY3CBFEXT) + mkdir -p $(LIB) + cp $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(LIB)/_pycbf.$(PY3CBFEXT) + +$(PY3CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w + (cd $(PY3CBF); \ + $(NUWEB) pycbf; \ + latex pycbf; \ + $(NUWEB) pycbf; \ + latex pycbf; \ + dvipdfm pycbf ) + +$(PY3CBF)/CBFlib.txt: $(DOC)/CBFlib.html + links -dump $(DOC)/CBFlib.html > $(PY3CBF)/CBFlib.txt +$(PY3CBF)/pycbf.py: $(PY3CBF)/pycbf.pdf $(PY3CBF)/cbfdetectorwrappers.i \ + $(PY3CBF)/cbfgenericwrappers.i \ + $(PY3CBF)/cbfgoniometerwrappers.i \ + $(PY3CBF)/CBFlib.txt $(PY3CBF)/make_pycbf.py + (cd $(PY3CBF); $(PYTHON3) make_pycbf.py; $(PYSWIG) pycbf.i; \ + $(PYTHON3) py3setup.py build; mv pycbf.py rawpycbf.py; \ + echo "# coding=utf-8" | cat - rawpycbf.py > pycbf.py) # # Java bindings @@ -1828,7 +2058,7 @@ $(BIN)/sequence_match: $(LIB)/libcbf.a $(EXAMPLES)/sequence_match.c $(LIB)/libim # # tiff2cbf example program # -$(BIN)/tiff2cbf: $(LIB)/libcbf.a $(EXAMPLES)/tiff2cbf.c \ +$(BIN)/tiff2cbf: $(LIB)/libcbf.a $(EXAMPLES)/tiff2cbf.c $(EXAMPLES)/tif_sprint.c \ $(GOPTLIB) $(GOPTINC) $(TIFF) mkdir -p $(BIN) $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ @@ -1974,13 +2204,6 @@ $(DATADIRO): $(M4)/Makefile.m4 touch $(DATADIRO) -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output.tar.gz) -$(DATADIRS): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLS)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - touch $(DATADIRS) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - - # Input Data Files TESTINPUT_BASIC = example.mar2300 @@ -2030,31 +2253,48 @@ TESTOUTPUT = adscconverted_flat_orig.cbf \ adscconverted_orig.cbf converted_flat_orig.cbf converted_orig.cbf \ insulin_pilatus6mconverted_orig.cbf.h5.cbf \ insulin_pilatus6mconverted_orig.cbf.h5 \ + insulin_pilatus6mconverted_orig.cbf \ insulin_pilatus6mconverted_v2_orig.cbf \ mb_LP_1_001_orig.cbf testcell_orig.prt \ test_xds_bin_testflatout_orig.out \ test_xds_bin_testflatpackedout_orig.out test_fcb_read_testflatout_orig.out \ test_fcb_read_testflatpackedout_orig.out \ XRD1621_orig.cbf XRD1621_I4encbC100_orig.cbf \ - minicbf_orig.h5 + minicbf_orig.h5 \ + pycbf_test1_orig.out \ + pycbf_test2_orig.out \ + pycbf_test3_orig.out \ + pycbf_test4_orig.out \ + fel_test1_orig.out \ + fel_test2_orig.out \ + fel_test3_orig.out NEWTESTOUTPUT = adscconverted_flat.cbf \ adscconverted.cbf converted_flat.cbf converted.cbf \ insulin_pilatus6mconverted.cbf \ insulin_pilatus6mconverted.cbf.h5 \ insulin_pilatus6mconverted.cbf.h5.cbf \ + insulin_pilatus6mconverted_orig.cbf \ insulin_pilatus6mconverted_v2.cbf \ mb_LP_1_001.cbf testcell.prt \ test_xds_bin_testflatout.out \ test_xds_bin_testflatpackedout.out test_fcb_read_testflatout.out \ test_fcb_read_testflatpackedout.out \ XRD1621.cbf XRD1621_I4encbC100.cbf \ - $(MINICBF_TEST)/minicbf.h5 + $(MINICBF_TEST)/minicbf.h5 \ + pycbf_test1.out \ + pycbf_test2.out \ + pycbf_test3.out \ + pycbf_test4.out \ + fel_test1.out \ + fel_test2.out \ + fel_test3.out DATADIRO_OUTPUT = $(DATADIRO)/adscconverted_flat_orig.cbf \ $(DATADIRO)/adscconverted_orig.cbf \ $(DATADIRO)/converted_flat_orig.cbf \ $(DATADIRO)/converted_orig.cbf \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5 \ + $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf \ $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf \ $(DATADIRO)/mb_LP_1_001_orig.cbf \ $(DATADIRO)/testcell_orig.prt \ @@ -2071,6 +2311,7 @@ DATADIRO_OUTPUT_SIGNATURES = $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) \ $(DATADIRO)/converted_orig.cbf$(SEXT) \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ + $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf$(SEXT) \ $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) \ $(DATADIRO)/testcell_orig.prt$(SEXT) \ @@ -2090,6 +2331,7 @@ TESTOUTPUTSIGS = adscconverted_flat_orig.cbf$(SEXT) \ adscconverted_orig.cbf$(SEXT) converted_flat_orig.cbf$(SEXT) converted_orig.cbf$(SEXT) \ insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ + insulin_pilatus6mconverted_orig.cbf$(SEXT) \ insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ mb_LP_1_001_orig.cbf$(SEXT) testcell_orig.prt$(SEXT) \ test_xds_bin_testflatout_orig.out$(SEXT) \ @@ -2097,13 +2339,21 @@ TESTOUTPUTSIGS = adscconverted_flat_orig.cbf$(SEXT) \ test_fcb_read_testflatpackedout_orig.out$(SEXT) \ XRD1621_orig.cbf$(SEXT) \ XRD1621_I4encbC100_orig.cbf$(SEXT) \ - minicbf_orig.h5$(SEXT) + minicbf_orig.h5$(SEXT) \ + pycbf_test1_orig.out$(SEXT) \ + pycbf_test2_orig.out$(SEXT) \ + pycbf_test3_orig.out$(SEXT) \ + pycbf_test4_orig.out$(SEXT) \ + fel_test1_orig.out$(SEXT) \ + fel_test2_orig.out$(SEXT) \ + fel_test3_orig.out$(SEXT) DATADIRS_OUTPUT_SIGNATURES = $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) \ $(DATADIRS)/adscconverted_orig.cbf$(SEXT) \ $(DATADIRS)/converted_flat_orig.cbf$(SEXT) \ $(DATADIRS)/converted_orig.cbf$(SEXT) \ $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ + $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf$(SEXT) \ $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) \ $(DATADIRS)/testcell_orig.prt$(SEXT) \ @@ -2113,7 +2363,14 @@ DATADIRS_OUTPUT_SIGNATURES = $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) \ $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \ $(DATADIRS)/XRD1621_orig.cbf$(SEXT) \ $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) \ - $(DATADIRS)/minicbf_orig.h5$(SEXT) + $(DATADIRS)/minicbf_orig.h5$(SEXT) \ + $(DATADIRS)/pycbf_test1_orig.out$(SEXT) \ + $(DATADIRS)/pycbf_test2_orig.out$(SEXT) \ + $(DATADIRS)/pycbf_test3_orig.out$(SEXT) \ + $(DATADIRS)/pycbf_test4_orig.out$(SEXT) \ + $(DATADIRS)/fel_test1_orig.out$(SEXT) \ + $(DATADIRS)/fel_test2_orig.out$(SEXT) \ + $(DATADIRS)/fel_test3_orig.out$(SEXT) # Fetch Input Data Files @@ -2135,20 +2392,13 @@ $(TESTOUTPUT): $(DATADIRO) $(DATADIRO_OUTPUT) $(DATADIRO_OUTPUT_SIGNATURES) cp $(DATADIRO)/$@$(SEXT) $@$(SEXT) -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) -# Fetch Output Data File Signatures - -$(TESTOUTPUTSIGS): $(DATADIRS) $(DATADIRS_OUTPUT_SIGNATURES) - cp $(DATADIRS)/$@ $@ - - # # Tests # -tests: all $(LIB) $(BIN) symlinksdone basic extra dectristests pycbftests -tests_sigs_only: $(LIB) $(BIN) symlinksdone basic extra_sigs_only +tests: all $(LIB) $(BIN) symlinksdone basic extra dectristests py2cbftests py3cbftests restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) $(SIGNATURE) < adscconverted.cbf > $(DATADIRO)/adscconverted_orig.cbf$(SEXT) @@ -2166,6 +2416,13 @@ restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 $(SIGNATURE) < XRD1621.cbf > $(DATADIRO)/XRD1621_orig.cbf$(SEXT) $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRO)/minicbf_orig.h5$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test1.out > $(DATADIRO)/pycbf_test1_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test2.out > $(DATADIRO)/pycbf_test2_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test3.out > $(DATADIRO)/pycbf_test3_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test4.out > $(DATADIRO)/pycbf_test4_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/fel_test1.out > $(DATADIRO)/fel_test1_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/fel_test2.out > $(DATADIRO)/fel_test2_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/fel_test3.out > $(DATADIRO)/fel_test3_orig.out$(SEXT) cp adscconverted_flat.cbf $(DATADIRO)/adscconverted_flat_orig.cbf$ cp adscconverted.cbf $(DATADIRO)/adscconverted_orig.cbf cp converted_flat.cbf $(DATADIRO)/converted_flat_orig.cbf @@ -2182,25 +2439,15 @@ restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 cp XRD1621.cbf $(DATADIRO)/XRD1621_orig.cbf cp XRD1621_I4encbC100.cbf $(DATADIRO)/XRD1621_I4encbC100_orig.cbf cp $(MINICBF_TEST)/minicbf.h5 $(DATADIRO)/minicbf_orig.h5 - -restore_sigs_only: $(NEWTESTOUTPUT) $(DATADIRS) - $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < adscconverted.cbf > $(DATADIRS)/adscconverted_orig.cbf$(SEXT) - $(SIGNATURE) < converted_flat.cbf > $(DATADIRS)/converted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < converted.cbf > $(DATADIRS)/converted_orig.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5 > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5.cbf > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) - $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) - $(SIGNATURE) < testcell.prt > $(DATADIRS)/testcell_orig.prt$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < XRD1621.cbf > $(DATADIRS)/XRD1621_orig.cbf$(SEXT) - $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) - $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRS)/minicbf_orig.h5$(SEXT) -restore_signatures: restore_output restore_sigs_only + cp $(PY2CBF)/pycbf_test1.out $(DATADIRO)/pycbf_test1_orig.out + cp $(PY2CBF)/pycbf_test2.out $(DATADIRO)/pycbf_test2_orig.out + cp $(PY2CBF)/pycbf_test3.out $(DATADIRO)/pycbf_test3_orig.out + cp $(PY2CBF)/pycbf_test4.out $(DATADIRO)/pycbf_test4_orig.out + cp $(PY2CBF)/fel_test1.out $(DATADIRO)/fel_test1_orig.out + cp $(PY2CBF)/fel_test2.out $(DATADIRO)/fel_test2_orig.out + cp $(PY2CBF)/fel_test3.out $(DATADIRO)/fel_test3_orig.out + +restore_signatures: restore_output # # Basic Tests @@ -2220,9 +2467,12 @@ basic: $(BIN)/makecbf $(BIN)/img2cif $(BIN)/cif2cbf $(TESTINPUT_BASIC) img2cif_canonical.cif cif2cbf_packed.cbf $(LDPREFIX) $(BIN)/cif2cbf -e none -c canonical \ img2cif_packed.cif cif2cbf_canonical.cbf - -cmp cif2cbf_packed.cbf makecbf.cbf - -cmp cif2cbf_packed.cbf img2cif_packed.cbf - -cmp cif2cbf_canonical.cbf img2cif_canonical.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_packed.cbf | diff -a - makecbf.cbf + #-cmp cif2cbf_packed.cbf makecbf.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_packed.cbf | diff -a - img2cif_packed.cbf + #-cmp cif2cbf_packed.cbf img2cif_packed.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_canonical.cbf | diff -a - img2cif_canonical.cbf + #-cmp cif2cbf_canonical.cbf img2cif_canonical.cbf # @@ -2261,21 +2511,27 @@ endif makecbf.cbf cif2cbf_ehcn.cif $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_encp.cbf | diff -a - makecbf.cbf $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf + -cat 9ins.cif |sed "1,1s/10/11/" | sed "2,2s/0.9.5/0.9.7/" | diff -a - 9ins.cbf + #-cmp 9ins.cif 9ins.cbf $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf -F example.mar2300 converted_flat.cbf - -cmp converted_flat.cbf converted_flat_orig.cbf + -cat converted_flat_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - converted_flat.cbf + #-cmp converted_flat.cbf converted_flat_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf example.mar2300 converted.cbf - -cmp converted.cbf converted_orig.cbf + -cat converted_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - converted.cbf + #-cmp converted.cbf converted_orig.cbf -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat > testcell.prt -cmp testcell.prt testcell_orig.prt $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -cmp adscconverted_flat.cbf adscconverted_flat_orig.cbf + -cat adscconverted_flat_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - adscconverted_flat.cbf + #-cmp adscconverted_flat.cbf adscconverted_flat_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -cmp adscconverted.cbf adscconverted_orig.cbf + -cat adscconverted_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - adscconverted.cbf + #-cmp adscconverted.cbf adscconverted_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -cmp mb_LP_1_001.cbf mb_LP_1_001_orig.cbf + -cat mb_LP_1_001_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - mb_LP_1_001.cbf + #-cmp mb_LP_1_001.cbf mb_LP_1_001_orig.cbf ifneq ($(CLEANTESTS),) mv mb_LP_1_001.cbf nmb_LP_1_001.cbf else @@ -2288,12 +2544,17 @@ ifneq ($(CLEANTESTS),) rm nmb_LP_1_001.img endif $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -cmp insulin_pilatus6mconverted.cbf insulin_pilatus6mconverted_rev_orig.cbf + -cat insulin_pilatus6mconverted_orig.cbf | sed "1,1s/1.7.6/1.7.11/" | sed "2,2s/0.9.3/0.9.7/" | diff -a - insulin_pilatus6mconverted.cbf + #-cmp insulin_pilatus6mconverted.cbf insulin_pilatus6mconverted_orig.cbf -$(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -cmp insulin_pilatus6mconverted_v2.cbf insulin_pilatus6mconverted_v2_orig.cbf + -cat insulin_pilatus6mconverted_v2_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - insulin_pilatus6mconverted_v2.cbf + #-cmp insulin_pilatus6mconverted_v2.cbf insulin_pilatus6mconverted_v2_orig.cbf (CBF_CONVERT_MINICBF_PATH=$(BIN); export CBF_CONVERT_MINICBF_PATH; \ $(LDPREFIX) $(EXAMPLES)/batch_convert_minicbf.sh "." "minicbf_test" \ "X4_lots_M1S4_1_*.cbf" $(TEMPLATES)/template_X4_lots_M1S4.cbf) +# +# Starting with insulin_pilatus6mconverted.cbf, create hdf5 files using opaque, encI, encp, encb, encc, encz +# -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ $(TIME) $(BIN)/cif2cbf -5 w -O $(HDF5REGISTER) -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted.cbf.h5) -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ @@ -2306,10 +2567,9 @@ endif $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cc -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encc.cbf.h5) -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cz -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encz.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cl -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encl.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -c2 -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5) +# +# check the default as hdf5 dumps +# -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ $(H5DUMP) insulin_pilatus6mconverted_orig.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted_orig.cbf.h5.dump) -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ @@ -2317,41 +2577,26 @@ endif -$(DIFF) insulin_pilatus6mconverted_orig.cbf.h5.dump insulin_pilatus6mconverted.cbf.h5.dump -rm -f insulin_pilatus6mconverted_orig.cbf.h5.dump -rm -f insulin_pilatus6mconverted.cbf.h5.dump - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_orig.cbf.h5.cbf -o insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf.h5 -o insulin_pilatus6mconverted.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted.cbf.h5.cbf -o insulin_pilatus6mconverted.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encp.cbf.h5 -o insulin_pilatus6mconverted_encp.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encp.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encb.cbf.h5 -o insulin_pilatus6mconverted_encb.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encb.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encI.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encI.cbf.h5.cbf -o insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encc.cbf.h5 -o insulin_pilatus6mconverted_encc.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encc.cbf.h5.cbf -o insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encz.cbf.h5 -o insulin_pilatus6mconverted_encz.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encz.cbf.h5.cbf -o insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encl.cbf.h5 -o insulin_pilatus6mconverted_encl.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encl.cbf.h5.cbf -o insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_enc2.cbf.h5 -o insulin_pilatus6mconverted_enc2.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_enc2.cbf.h5.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -rm -f insulin_pilatus6mconverted*.cbf.h5.eqcI.cbf +# +# Convert each of the non-opaque h5 files to encI cbfs and compare them +# + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encI.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + cp insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encp.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encb.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encc.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encz.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + $(LDPREFIX) $(TINE) $(BIN)/test_cbf_airy_disk $(LDPREFIX) $(TIME) $(BIN)/cbf_testxfelread $(LDPREFIX) $(TIME) $(BIN)/testalloc @@ -2380,14 +2625,18 @@ endif -cd $(MINICBF_TEST); $(DIFF) i19-1.dump i19-2.dump -cd $(MINICBF_TEST); $(DIFF) i19-1.cbf i19-2.cbf $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf + -cat testrealin.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - testrealout.cbf + #-cmp testrealin.cbf testrealout.cbf $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf + -cat testflatin.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - testflatout.cbf + #-cmp testflatin.cbf testflatout.cbf $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf + -cat testflatpackedin.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - testflatpackedout.cbf + #-cmp testflatpackedin.cbf testflatpackedout.cbf ifneq ($(F90C),) $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatout.out) - -$(DIFF) test_xds_bin_testflatout.out test_xds_bin_testflatout_orig.out + -cat test_xds_bin_testflatout_orig.out | sed "2,2s/0.9.6/0.9.7/" | $(DIFF) -a - test_xds_bin_testflatout.out + #-$(DIFF) test_xds_bin_testflatout.out test_xds_bin_testflatout_orig.out $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatpackedout.out) -$(DIFF) test_xds_bin_testflatpackedout.out test_xds_bin_testflatpackedout_orig.out $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatout.out) @@ -2397,109 +2646,59 @@ ifneq ($(F90C),) endif $(LDPREFIX) $(TIME) $(BIN)/sauter_test $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - -$(DIFF) XRD1621.cbf XRD1621_orig.cbf + $(LDPREFIX) $(TIME) $(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf + -cat XRD1621_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - XRD1621.cbf + #-$(DIFF) XRD1621.cbf XRD1621_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(DIFF) XRD1621_I4encbC100.cbf XRD1621_I4encbC100_orig.cbf - -ifneq ($(F90C),) -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf \ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -else -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf\ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -endif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e hex -c none \ - makecbf.cbf cif2cbf_ehcn.cif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ - cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F example.mar2300 converted_flat.cbf - -$(SIGNATURE) < converted_flat.cbf | $(DIFF) - converted_flat_orig.cbf$(SEXT); rm converted_flat.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image example.mar2300 converted.cbf - -$(SIGNATURE) < converted.cbf | $(DIFF) - converted_orig.cbf$(SEXT); rm converted.cbf - -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat | \ - $(SIGNATURE) | $(DIFF) - testcell_orig.prt$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -$(SIGNATURE) < adscconverted_flat.cbf | $(DIFF) - adscconverted_flat_orig.cbf$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -$(SIGNATURE) < adscconverted.cbf | $(DIFF) - adscconverted_orig.cbf$(SEXT); rm adscconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -$(SIGNATURE) < mb_LP_1_001.cbf | $(DIFF) - mb_LP_1_001_orig.cbf$(SEXT) - mv mb_LP_1_001.cbf nmb_LP_1_001.cbf - $(LDPREFIX) $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf - -cmp nmb_LP_1_001.img mb_LP_1_001.img - rm nmb_LP_1_001.cbf - rm nmb_LP_1_001.img - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted.cbf | $(DIFF) - insulin_pilatus6mconverted_rev_orig.cbf$(SEXT); rm insulin_pilatus6mconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf | $(DIFF) - insulin_pilatus6mconverted_v2_orig.cbf$(SEXT); rm insulin_pilatus6mconverted_v2.cbf - $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf -ifneq ($(F90C),) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatpackedout_orig.out$(SEXT) -endif - $(LDPREFIX) $(TIME) $(BIN)/sauter_test - $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(SIGNATURE) < XRD1621.cbf | $(DIFF) - XRD1621_orig.cbf$(SEXT); rm XRD1621.cbf - -$(SIGNATURE) < XRD1621_I4encbC100.cbf | $(DIFF) - XRD1621_I4encbC100_orig.cbf$(SEXT); rm XRD1621_I4encbC100.cbf - @-rm -f adscconverted_flat.cbf - @-rm -f $(TESTINPUT_BASIC) $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) - @-rm -f cif2cbf_packed.cbf makecbf.cbf \ - cif2cbf_packed.cbf img2cif_packed.cbf \ - cif2cbf_canonical.cbf img2cif_canonical.cbf - @-rm -f testrealout.cbf testflatout.cbf testflatpackedout.cbf \ - cif2cbf_encp.cbf img2cif_canonical.cif img2cif_packed.cif 9ins.cbf - + -cat XRD1621_I4encbC100_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - XRD1621_I4encbC100.cbf + #-$(DIFF) XRD1621_I4encbC100.cbf XRD1621_I4encbC100_orig.cbf -pycbftests: $(PYCBF)/_pycbf.$(PYCBFEXT) $(BIN)/cbf_standardize_numbers - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test1.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test2.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test3.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test4.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test1.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test2.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py ../hit-20140306005258847.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test1_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test1.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test2_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test2.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test3_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test3.out - - -pycbfinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfinstall - -pycbfuserinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfuserinstall +py2cbftests: $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(BIN)/cbf_standardize_numbers $(TESTOUTPUT) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test1.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test1.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test1.out $(ROOT)/pycbf_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test2.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test2.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test2.out $(ROOT)/pycbf_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test3.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test3.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test3.out $(ROOT)/pycbf_test3_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test4.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test4.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test4.out $(ROOT)/pycbf_test4_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_testfelaxes.py fel_test1.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) + -(cd $(PY2CBF); $(DIFF) fel_test1.out $(ROOT)/fel_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_testfelaxes.py fel_test2.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) + -(cd $(PY2CBF); $(DIFF) fel_test2.out $(ROOT)/fel_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_testfelaxes.py ../hit-20140306005258847.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) + -(cd $(PY2CBF); $(DIFF) fel_test3.out $(ROOT)/fel_test3_orig.out) + +py2cbfinstall: $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(PY2CBF)/py2cbfinstall + +py2cbfuserinstall: $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(PY2CBF)/py2cbfuserinstall + +py3cbftests: $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(BIN)/cbf_standardize_numbers $(TESTOUTPUT) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test1.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test1.out) + -(cd $(PY3CBF); grep -v "__builtins__" $(ROOT)/pycbf_test1_orig.out | \ + grep -v "__add__" | grep -v "Foundthebinary" > pycbf_test1_orig.out; \ + grep -v "__builtins__" pycbf_test1.out | \ + grep -v "__add__" | grep -v "Foundthebinary" |$(DIFF) - pycbf_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test2.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test2.out) + -(cd $(PY3CBF); $(DIFF) pycbf_test2.out $(ROOT)/pycbf_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test3.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test3.out) + -(cd $(PY3CBF); $(DIFF) pycbf_test3.out $(ROOT)/pycbf_test3_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test4.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test4.out) + -(cd $(PY3CBF); grep -v "__builtins__" $(ROOT)/pycbf_test4_orig.out | \ + grep -v "__add__" | grep -v "Foundthebinary" > pycbf_test4_orig.out; \ + grep -v "__builtins__" pycbf_test4.out | grep -v "__add__" | \ + grep -v "Foundthebinary" | $(DIFF) - pycbf_test4_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_testfelaxes.py fel_test1.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) + -(cd $(PY3CBF); $(DIFF) fel_test1.out $(ROOT)/fel_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_testfelaxes.py fel_test2.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) + -(cd $(PY3CBF); $(DIFF) fel_test2.out $(ROOT)/fel_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_testfelaxes.py ../hit-20140306005258847.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) + -(cd $(PY3CBF); $(DIFF) fel_test3.out $(ROOT)/fel_test3_orig.out) + +py3cbfinstall: $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(PY3CBF)/py3cbfinstall + +py3cbfuserinstall: $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(PY3CBF)/py3cbfuserinstall javatests: $(BIN)/ctestcbf $(BIN)/testcbf.class $(SOLIB)/libcbf_wrap.so $(LDPREFIX) $(BIN)/ctestcbf > testcbfc.txt @@ -2518,13 +2717,13 @@ empty: @-rm -rf $(INCLUDE)/bshuf* @-rm -rf $(INCLUDE)/H5* @-rm -rf $(BIN)/* - @-rm -f $(PYCBF)/_pycbf.$(PYCBFEXT) - @-rm -rf $(PYCBF)/build/* - @-rm -f $(PYCBF)/newtest1.cbf - @-rm -f $(PYCBF)/fel_test1.out - @-rm -f $(PYCBF)/fel_test2.out - @-rm -f $(PYCBF)/setup.py - @-rm -f $(PYCBF)/setup_MINGW.py + @-rm -f $(PY2CBF)/_py2cbf.$(PY2CBFEXT) + @-rm -rf $(PY2CBF)/build/* + @-rm -f $(PY2CBF)/newtest1.cbf + @-rm -f $(PY2CBF)/fel_test1.out + @-rm -f $(PY2CBF)/fel_test2.out + @-rm -f $(PY2CBF)/setup.py + @-rm -f $(PY2CBF)/setup_MINGW.py @-rm -f makecbf.cbf @-rm -f img2cif_packed.cif @-rm -f img2cif_canonical.cif @@ -2608,12 +2807,39 @@ empty: @-rm -f 1191_00005.cbf @-rm -f XRD1621.tif @-rm -f md5tmp - @-rm -rf $(PYCBF)/build + @-rm -rf $(PY2CBF)/build @-rm -f *_old @-rm -f X4_lots_M1S4_1_*.cbf @-rm -f testfile.h5 @-rm -f hit-20140306005258847.cbf @-rm -f build_* + @-rm -rf HDF5Plugin_5Jun21/ + @-rm -rf PyCifRW-4.1/ + @-rm -rf PyCifRW-4.3/ + @-rm -rf bitshuffle-0.2.2.1_15Jun16/ + @-rm -f idx-s00-20131106040304531_flat.cbf + @-rm -f include/iochain.h + @-rm -f include/lz4.h + @-rm -f include/pcre.h + @-rm -f include/pcre_scanner.h + @-rm -f include/pcre_stringpiece.h + @-rm -f include/pcrecpp.h + @-rm -f include/pcrecpparg.h + @-rm -f include/pcreposix.h + @-rm -f include/regex.h + @-rm -f minicbf_test/X4_lots_M1S4_1_0001.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0002.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0003.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0004.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0005.cbf + @-rm -f minicbf_test/minicbf.h5 + @-rm -rf ply-3.2/dist/ + @-rm -f $(PY2CBF)/fel_test3.out + @-rm -f $(PY2CBF)/pycbf.pyc + @-rm -f $(PY2CBF)/pycbf_test1.out + @-rm -f $(PY2CBF)/pycbf_test2.out + @-rm -f $(PY2CBF)/pycbf_test3.out + @-rm -f $(PY2CBF)/pycbf_test4.out ./.undosymlinks # diff --git a/Makefile_AIX b/Makefile_AIX deleted file mode 100644 index 4897447e..00000000 --- a/Makefile_AIX +++ /dev/null @@ -1,2638 +0,0 @@ - -###################################################################### -# Makefile - command file for make to create CBFlib # -# # -# Version 0.9.6 19 May 2020 # -# # -# Paul Ellis and # -# Herbert J. Bernstein (yaya@bernstein-plus-sons.com) # -# # -# (C) Copyright 2006 - 2020 Herbert J. Bernstein # -# # -###################################################################### - -###################################################################### -# # -# YOU MAY REDISTRIBUTE THE CBFLIB PACKAGE UNDER THE TERMS OF THE GPL # -# # -# ALTERNATIVELY YOU MAY REDISTRIBUTE THE CBFLIB API UNDER THE TERMS # -# OF THE LGPL # -# # -###################################################################### - -########################### GPL NOTICES ############################## -# # -# This program is free software; you can redistribute it and/or # -# modify it under the terms of the GNU General Public License as # -# published by the Free Software Foundation; either version 2 of # -# (the License, or (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program; if not, write to the Free Software # -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # -# 02111-1307 USA # -# # -###################################################################### - -######################### LGPL NOTICES ############################### -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of the GNU Lesser General Public # -# License as published by the Free Software Foundation; either # -# version 2.1 of the License, or (at your option) any later version. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # -# Lesser General Public License for more details. # -# # -# You should have received a copy of the GNU Lesser General Public # -# License along with this library; if not, write to the Free # -# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # -# MA 02110-1301 USA # -# # -###################################################################### - -###################################################################### -# # -# Stanford University Notices # -# for the CBFlib software package that incorporates SLAC software # -# on which copyright is disclaimed # -# # -# This software # -# ------------- # -# The term "this software", as used in these Notices, refers to # -# those portions of the software package CBFlib that were created by # -# employees of the Stanford Linear Accelerator Center, Stanford # -# University. # -# # -# Stanford disclaimer of copyright # -# -------------------------------- # -# Stanford University, owner of the copyright, hereby disclaims its # -# copyright and all other rights in this software. Hence, anyone # -# may freely use it for any purpose without restriction. # -# # -# Acknowledgement of sponsorship # -# ------------------------------ # -# This software was produced by the Stanford Linear Accelerator # -# Center, Stanford University, under Contract DE-AC03-76SFO0515 with # -# the Department of Energy. # -# # -# Government disclaimer of liability # -# ---------------------------------- # -# Neither the United States nor the United States Department of # -# Energy, nor any of their employees, makes any warranty, express or # -# implied, or assumes any legal liability or responsibility for the # -# accuracy, completeness, or usefulness of any data, apparatus, # -# product, or process disclosed, or represents that its use would # -# not infringe privately owned rights. # -# # -# Stanford disclaimer of liability # -# -------------------------------- # -# Stanford University makes no representations or warranties, # -# express or implied, nor assumes any liability for the use of this # -# software. # -# # -# Maintenance of notices # -# ---------------------- # -# In the interest of clarity regarding the origin and status of this # -# software, this and all the preceding Stanford University notices # -# are to remain affixed to any copy or derivative of this software # -# made or distributed by the recipient and are to be affixed to any # -# copy of software made or distributed by the recipient that # -# contains a copy or derivative of this software. # -# # -# Based on SLAC Software Notices, Set 4 # -# OTT.002a, 2004 FEB 03 # -###################################################################### - - - -###################################################################### -# NOTICE # -# Creative endeavors depend on the lively exchange of ideas. There # -# are laws and customs which establish rights and responsibilities # -# for authors and the users of what authors create. This notice # -# is not intended to prevent you from using the software and # -# documents in this package, but to ensure that there are no # -# misunderstandings about terms and conditions of such use. # -# # -# Please read the following notice carefully. If you do not # -# understand any portion of this notice, please seek appropriate # -# professional legal advice before making use of the software and # -# documents included in this software package. In addition to # -# whatever other steps you may be obliged to take to respect the # -# intellectual property rights of the various parties involved, if # -# you do make use of the software and documents in this package, # -# please give credit where credit is due by citing this package, # -# its authors and the URL or other source from which you obtained # -# it, or equivalent primary references in the literature with the # -# same authors. # -# # -# Some of the software and documents included within this software # -# package are the intellectual property of various parties, and # -# placement in this package does not in any way imply that any # -# such rights have in any way been waived or diminished. # -# # -# With respect to any software or documents for which a copyright # -# exists, ALL RIGHTS ARE RESERVED TO THE OWNERS OF SUCH COPYRIGHT. # -# # -# Even though the authors of the various documents and software # -# found here have made a good faith effort to ensure that the # -# documents are correct and that the software performs according # -# to its documentation, and we would greatly appreciate hearing of # -# any problems you may encounter, the programs and documents any # -# files created by the programs are provided **AS IS** without any * -# warranty as to correctness, merchantability or fitness for any # -# particular or general use. # -# # -# THE RESPONSIBILITY FOR ANY ADVERSE CONSEQUENCES FROM THE USE OF # -# PROGRAMS OR DOCUMENTS OR ANY FILE OR FILES CREATED BY USE OF THE # -# PROGRAMS OR DOCUMENTS LIES SOLELY WITH THE USERS OF THE PROGRAMS # -# OR DOCUMENTS OR FILE OR FILES AND NOT WITH AUTHORS OF THE # -# PROGRAMS OR DOCUMENTS. # -###################################################################### - -###################################################################### -# # -# The IUCr Policy # -# for the Protection and the Promotion of the STAR File and # -# CIF Standards for Exchanging and Archiving Electronic Data # -# # -# Overview # -# # -# The Crystallographic Information File (CIF)[1] is a standard for # -# information interchange promulgated by the International Union of # -# Crystallography (IUCr). CIF (Hall, Allen & Brown, 1991) is the # -# recommended method for submitting publications to Acta # -# Crystallographica Section C and reports of crystal structure # -# determinations to other sections of Acta Crystallographica # -# and many other journals. The syntax of a CIF is a subset of the # -# more general STAR File[2] format. The CIF and STAR File approaches # -# are used increasingly in the structural sciences for data exchange # -# and archiving, and are having a significant influence on these # -# activities in other fields. # -# # -# Statement of intent # -# # -# The IUCr's interest in the STAR File is as a general data # -# interchange standard for science, and its interest in the CIF, # -# a conformant derivative of the STAR File, is as a concise data # -# exchange and archival standard for crystallography and structural # -# science. # -# # -# Protection of the standards # -# # -# To protect the STAR File and the CIF as standards for # -# interchanging and archiving electronic data, the IUCr, on behalf # -# of the scientific community, # -# # -# # holds the copyrights on the standards themselves, * -# # -# # owns the associated trademarks and service marks, and * -# # -# # holds a patent on the STAR File. * -# # -# These intellectual property rights relate solely to the # -# interchange formats, not to the data contained therein, nor to # -# the software used in the generation, access or manipulation of # -# the data. # -# # -# Promotion of the standards # -# # -# The sole requirement that the IUCr, in its protective role, # -# imposes on software purporting to process STAR File or CIF data # -# is that the following conditions be met prior to sale or # -# distribution. # -# # -# # Software claiming to read files written to either the STAR * -# File or the CIF standard must be able to extract the pertinent # -# data from a file conformant to the STAR File syntax, or the CIF # -# syntax, respectively. # -# # -# # Software claiming to write files in either the STAR File, or * -# the CIF, standard must produce files that are conformant to the # -# STAR File syntax, or the CIF syntax, respectively. # -# # -# # Software claiming to read definitions from a specific data * -# dictionary approved by the IUCr must be able to extract any # -# pertinent definition which is conformant to the dictionary # -# definition language (DDL)[3] associated with that dictionary. # -# # -# The IUCr, through its Committee on CIF Standards, will assist # -# any developer to verify that software meets these conformance # -# conditions. # -# # -# Glossary of terms # -# # -# [1] CIF: is a data file conformant to the file syntax defined # -# at http://www.iucr.org/iucr-top/cif/spec/index.html # -# # -# [2] STAR File: is a data file conformant to the file syntax # -# defined at http://www.iucr.org/iucr-top/cif/spec/star/index.html # -# # -# [3] DDL: is a language used in a data dictionary to define data # -# items in terms of "attributes". Dictionaries currently approved # -# by the IUCr, and the DDL versions used to construct these # -# dictionaries, are listed at # -# http://www.iucr.org/iucr-top/cif/spec/ddl/index.html # -# # -# Last modified: 30 September 2000 # -# # -# IUCr Policy Copyright (C) 2000 International Union of # -# Crystallography # -###################################################################### - -.DELETE_ON_ERROR: - -# Version string -VERSION = 0.9.6 - -# -# Directories -# -ROOT = $(PWD) -LIB = $(ROOT)/lib -SOLIB = $(ROOT)/solib -JCBF = $(ROOT)/jcbf -JAVADIR = $(ROOT)/java -BIN = $(ROOT)/bin -SRC = $(ROOT)/src -INCLUDE = $(ROOT)/include -M4 = $(ROOT)/m4 -PYCBF = $(ROOT)/pycbf -EXAMPLES = $(ROOT)/examples -TEMPLATES= $(ROOT)/templates -DECTRIS_EXAMPLES = $(EXAMPLES)/dectris_cbf_template_test -DOC = $(ROOT)/doc -MINICBF_TEST = $(ROOT)/minicbf_test -GRAPHICS = $(ROOT)/html_graphics -DATADIRI = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Input -DATADIRO = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output -DATADIRS = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only -CBF_PREFIX ?= $(HOME) - -# -# Comment out the next line if scratch test files should be retained -# -CLEANTESTS = yes - - -MSYS2=no -CBFLIB_DONT_USE_LOCAL_HDF5?=no -CBFLIB_DONT_USE_LZ4?=no -CBFLIB_DONT_USE_BSHUF?=no - - -CBFLIB_DONT_HAVE_FGETLN ?= yes -ifeq ($(CBFLIB_DONT_HAVE_FGETLN),yes) -SRC_FGETLN = $(SRC)/fgetln.c -else -SRC_FGETLN = -endif - - -CBFLIB_DONT_USE_PYCIFRW ?= no -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -# -# Definitions to get versions of PyCifRW and PLY -# -PYCIFRW ?= PyCifRW-4.1 -PLY = ply-3.2 -PYCIFRWFLAG = -DCBF_USE_PYCIFRW -PYCIFRW_PREFIX ?= $(HOME)/.local -endif - -# -# Definition to get a version of tifflib to support tiff2cbf -# -TIFF ?= tiff-4.0.6_rev_3Nov16 -TIFF_PREFIX ?= $(PWD) -TIFF_INSTALL = $(TIFF)_INSTALL - - -# -# Definitions to get a version of HDF5 -# - -ifneq ($(HDF5_PREFIX),) # already installed on system -CBFLIB_DONT_USE_LOCAL_HDF5 = yes -endif - -ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes) -HDF5_PREFIX ?= $(PWD) -HDF5 ?= hdf5-1.10.6 -#HDF5 = hdf5-1.8.18 -#HDF5 = hdf5-1.10.5 -HDF5dep = $(HDF5) -HDF5_INSTALL = $(HDF5)_INSTALL -ifneq ($(MSYS2),yes) -HDF5LIBS_LOCAL = $(LIB)/libhdf5.a -HDF5LIBS_SYSTEM = -lz -ldl -HDF5SOLIBS_LOCAL = -L$(LIB) -lhdf5 -HDF5SOLIBS_SYSTEM = -lz -else -HDF5LIBS_LOCAL = -L$(LIB) -lhdf5 -lhdf5.dll -HDF5LIBS_SYSTEM = -lz -ldl -HDF5SOLIBS_LOCAL = -L$(LIB) -lhdf5 -lhdf5.dll -HDF5SOLIBS_SYSTEM = -lz -endif -else -HDF5 = -HDF5dep = -HDF5_INSTALL = -HDF5LIBS_LOCAL = -ifneq ($(HDF5_PREFIX),) -HDF5lib = -L$(HDF5_PREFIX)/lib -endif -ifneq ($(MSYS2),yes) -HDF5LIBS_SYSTEM = $(HDF5lib) -lhdf5 -lz -ldl -HDF5SOLIBS_LOCAL = -HDF5SOLIBS_SYSTEM = $(HDF5lib) -lhdf5 -lz -else -HDF5LIBS_SYSTEM = $(HDF5lib) -lhdf5 -lhdf5.dll -lz -ldl -HDF5SOLIBS_LOCAL = -HDF5SOLIBS_SYSTEM = $(HDF5lib) -lhdf5 -lhdf5.dll -lz -endif -endif - -HDF5REGISTER ?= --register manual -ifneq ($(HDF5_PREFIX),) -HDF5include = -I$(HDF5_PREFIX)/include -endif - -ifneq ($(MSYS2),yes) -H5DUMP = $(HDF5_PREFIX)/bin/h5dump -else -H5DUMP = /MINGW32/bin/h5dump -endif - - -CBFLIB_DONT_USE_LZ4 ?= no -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -# -# Definitions to get a version of HDF5Plugin for LZ4 -# -ifneq ($(MSYS2),yes) -LZ4 ?= HDF5Plugin_14Aug20 -else -LZ4 ?= HDF5-External-Filter-Plugins -endif -LZ4dep = $(LZ4) -LZ4src = $(LZ4)/src -LZ4include = $(LZ4)/include -LZ4SOLIBS = -L$(SOLIB) -lh5zlz4 -else -LZ4SOLIBS = -LZ4dep = -endif - -CBFLIB_DONT_USE_BSHUF ?= no -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -# -# Definitions to get a version of HDF5Plugin for BSHUFFLE WITH LZ4 -# -BSHUF ?= bitshuffle-0.2.2.1_15Jun16 -BSUFdep = $(BSHUF) -BSHUFsrc = $(BSHUF)/src -BSHUFinclude = $(BSHUF)/src -BSHUFSOLIBS = -L$(SOLIB) -lh5zbshuf -BSHUFFILTER = libbshuf_h5filter -else -BSHUFSOLIBS = -BSHUFdep = -endif - -CBFLIB_DONT_USE_BLOSC ?= no -ifneq ($(CBFLIB_DONT_USE_BLOSC),yes) -# -# Definitions to get a version of HDF5Plugin for BLOSC -# -BLOSC = ?c-blosc_4Sep16.tar.gz -BLOSCdep = $(BLOSC) -BLOSCFILTER = hdf5-blosc_2Sep16.tar.gz -BLOSCsrc = $(BLOSC)/src -BLOSCinclude = $(BLOSC)/src -BLOSCSOLIBS = -L$(SOLIB) -lh5zbshuf -BLOSCFILTER = libbshuf_h5filter -else -BLOSCSOLIBS = -BLOSCdep = -endif - - - -# -# Definition of python to use -# -#PYTHON = python -PYTHON ?= python2 - - -# -# Definitions to get a stable version of regex -# -REGEX_PREFIX ?= $(PWD) -ifneq ($(REGEX_PREFIX),$(PWD)) -CBFLIB_DONT_USE_LOCAL_REGEX ?= yes -endif - - -REGEX_LIBDIR ?= $(REGEX_PREFIX)/lib -ifneq ($(CBFLIB_DONT_USE_LOCAL_REGEX),yes) -REGEX ?= pcre-8.38 -REGEXDEP = $(REGEX) -REGEX_INSTALL = $(REGEX)_INSTALL -REGEX_LIB ?= pcreposix -REGEX_LIB2 ?= pcre -ifneq ($(MSYS2),yes) -REGEX_LIBS ?= -L $(REGEX_LIBDIR) -l$(REGEX_LIB) -l$(REGEX_LIB2) -REGEX_LIBS_STATIC = $(LIB)/libpcreposix.a $(LIB)/libpcre.a -else -REGEX_LIBS ?= -L $(REGEX_LIBDIR) -l$(REGEX_LIB) -l$(REGEX_LIB).dll -l$(REGEX_LIB2) -l$(REGEX_LIB2).dll -REGEX_LIBS_STATIC = $(REGEX_LIBS) -endif -REGEX_INCLUDES ?= -I $(REGEX_PREFIX) -else -REGEX = -REGEXDEP = -REGEX_INSTALL = -REGEX_LIB ?= -REGEX_LIB2 ?= -REGEX_LIBS ?= -REGEX_INCLUDES ?= -endif - - -# Program to use to retrieve a URL - -DOWNLOAD ?= wget -N -#DOWNLOAD ?= curl -O -L - -# Flag to control symlinks versus copying - -SLFLAGS = --use_ln -LN = ln -s -f - -# -# Program to use to pack shars -# -SHAR = /usr/bin/shar -#SHAR = /usr/local/bin/gshar - -# -# Program to use to create archives -# -AR = /usr/bin/ar - -# -# Program to use to add an index to an archive -# -RANLIB = /usr/bin/ranlib - - -# -# Program to use to generate a signature -# -#SIGNATURE ?= /usr/bin/openssl dgst -md5 -#SIGNATURE ?= (/usr/bin/openssl dgst -md5 | sed "s/^.*= //") -SIGNATURE ?= ( cat > md5tmp; cmake -E md5sum md5tmp| sed "s/ .*//") - -# -# Pipe command to extract all but the first line of a text file -# -ALLBUTONE = tail -n +2 - - -# -# Extension for signatures of files -# -SEXT = .md5 - -# Default shell - -SHELL = bash - -# call to time a command - -#TIME = -#TIME = time - -# -# Program to display differences between files -# -DIFF = diff -u -b - - -# -# Program to generate wrapper classes for Python -# -PYSWIG = swig -python - -# -# Program to generate wrapper classes for Java -# -JSWIG = swig -java - -# -# Program to generate LaTex and HTML program documentation -# - -NUWEB = nuweb - -# -# Compiler for Java -# -JAVAC = javac - -# -# Java archiver for compiled classes -# -JAR = jar - -# -# Java SDK root directory -# -ifeq ($(JDKDIR),) - JDKDIR = /usr/lib/java -endif - -ifneq ($(CBF_DONT_USE_LONG_LONG),) -NOLLFLAG = -DCBF_DONT_USE_LONG_LONG -else -NOLLFLAG = -endif - -ifneq ($(CBF_NO_REGEX),) -CBF_REGEXFLAG = -DCBF_NO_REGEX -else -CBF_REGEXFLAG = -DCBF_REGEXLIB_REGEX -endif - -ifneq ($(CBF_USE_ULP),) -ULPFLAG = -DCBF_USE_ULP -else -ULPFLAG = -endif - -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -LZ4FLAG = -DCBF_H5Z_USE_LZ4 -else -LZ4FLAG = -endif - -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -BSHUFFLAG = -DCBF_H5Z_USE_BSHUF -else -BSHUFFLAG = -endif - - - -MISCFLAG = $(NOLLFLAG) $(ULPFLAG) - -# -# PYCBF definitions -# -PYCBFEXT = so -PYCBFBOPT = -PYCBFIOPT = -SETUP_PY = setup.py -INSTALLSETUP_PY = installsetup.py - -# -# Set the compiler and flags -# - -######################################################### -# -# Appropriate compiler definitions for AIX -# -######################################################### -CC = xlc -C++ = xlC -CFLAGS = -g -O2 -Wall -LDFLAGS = -F90C = xlf90 -F90FLAGS = -g -qsuffix=f=f90 -F90LDFLAGS = -M4FLAGS = -Dfcb_bytes_in_rec=131072 -LDPREFIX = LIBPATH=$(SOLIB):$$LIBPATH;export LIBPATH; -RUNLDPREFIX = LIBPATH=$(CBF_PREFIX)/lib:$$LIBPATH;export LIBPATH; -EXTRALIBS = -lm -TIME = time - -ifneq ($(NOFORTRAN),) -F90C = -endif - -# -# URLs from which to retrieve the data directories -# -DATAURLBASE = http://downloads.sf.net/cbflib/ -DATAURLI = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Input.tar.gz -DATAURLO = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output.tar.gz -DATAURLS = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz - -# -# URLs from which to retrieve needed external package snapshots -# -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWURL = http://downloads.sf.net/cbflib/$(PYCIFRW).tar.gz -PLYURL = http://www.dabeaz.com/ply/$(PLY).tar.gz -endif -REGEX_URL ?= http://downloads.sf.net/cbflib/$(REGEX).tar.gz -TIFF_URL ?= http://downloads.sf.net/cbflib/$(TIFF).tar.gz -HDF5_URL ?= http://downloads.sf.net/cbflib/$(HDF5).tar.gz -ifneq ($(MSYS2),yes) -LZ4_URL = http://downloads.sf.net/cbflib/$(LZ4).tar.gz -else -LZ4_URL = http://www.github.com/yayahjb/$(LZ4).git -endif -BSHUFURL = http://downloads.sf.net/cbflib/$(BSHUF).tar.gz - - -# -# Include directories -# -INCLUDES = -I$(INCLUDE) -I$(SRC) $(HDF5include) - -# -# runtime library path export commands -# -RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export LD_LIBRARY_PATH; \ - DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export DYLD_LIBRARY_PATH; \ - LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib;export LD_RUN_PATH; - - -###################################################################### -# You should not need to make modifications below this line # -###################################################################### - -ifneq ($(CBF_USE_ULP),) -SRC_CBF_ULP_C = $(SRC)/cbf_ulp.c -INCLUDE_CBF_ULP_H = $(INCLUDE)/cbf_ulp.h -BIN_TESTULP = $(BIN)/testulp -else -SRC_CBF_ULP_C = -INCLUyDE_CBF_ULP_H = -BIN_TESTULP = -endif - -ifneq ($(MSYS2),yes) -SRC_REALPATH = -else -SRC_REALPATH = $(SRC)/realpath.c -endif - - -# -# Suffixes of files to be used or built -# -.SUFFIXES: .c .o .f90 .m4 - -.m4.f90: - m4 -P $(M4FLAGS) $< > $@ - -ifneq ($(F90C),) -.f90.o: - $(F90C) $(F90FLAGS) -c $< -o $@ -endif - - -# -# Common dependencies -# -COMMONDEP = $(M4)/Makefile.m4 - -# -# Source files -# - -SOURCE = $(SRC)/cbf.c \ - $(SRC)/cbf_airy_disk.c \ - $(SRC)/cbf_alloc.c \ - $(SRC)/cbf_ascii.c \ - $(SRC)/cbf_binary.c \ - $(SRC)/cbf_byte_offset.c \ - $(SRC)/cbf_canonical.c \ - $(SRC)/cbf_codes.c \ - $(SRC)/cbf_compress.c \ - $(SRC)/cbf_context.c \ - $(SRC)/cbf_copy.c \ - $(SRC)/cbf_file.c \ - $(SRC)/cbf_getopt.c \ - $(SRC)/cbf_hdf5.c \ - $(SRC)/cbf_hdf5_filter.c \ - $(SRC)/cbf_lex.c \ - $(SRC)/cbf_minicbf_header.c\ - $(SRC)/cbf_nibble_offset.c \ - $(SRC)/cbf_packed.c \ - $(SRC)/cbf_predictor.c \ - $(SRC)/cbf_read_binary.c \ - $(SRC)/cbf_read_mime.c \ - $(SRC)/cbf_simple.c \ - $(SRC)/cbf_string.c \ - $(SRC)/cbf_stx.c \ - $(SRC)/cbf_tree.c \ - $(SRC_CBF_ULP_C) \ - $(SRC)/cbf_uncompressed.c \ - $(SRC)/cbf_write.c \ - $(SRC)/cbf_write_binary.c \ - $(SRC)/cbf_ws.c \ - $(SRC)/cbff.c \ - $(SRC)/md5c.c \ - $(SRC)/img.c \ - $(SRC_FGETLN) $(SRC_REALPATH) - -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYSOURCE = $(SRC)/drel_lex.py \ - $(SRC)/drel_yacc.py \ - $(SRC)/drelc.py \ - $(SRC)/drel_prep.py -endif - -F90SOURCE = $(SRC)/fcb_atol_wcnt.f90 \ - $(SRC)/fcb_ci_strncmparr.f90 \ - $(SRC)/fcb_exit_binary.f90 \ - $(SRC)/fcb_nblen_array.f90 \ - $(SRC)/fcb_next_binary.f90 \ - $(SRC)/fcb_open_cifin.f90 \ - $(SRC)/fcb_packed.f90 \ - $(SRC)/fcb_read_bits.f90 \ - $(SRC)/fcb_read_byte.f90 \ - $(SRC)/fcb_read_image.f90 \ - $(SRC)/fcb_read_line.f90 \ - $(SRC)/fcb_read_xds_i2.f90 \ - $(SRC)/fcb_skip_whitespace.f90 - - -# -# Header files -# -HEADERS = $(INCLUDE)/cbf.h \ - $(INCLUDE)/cbf_airy_disk.h \ - $(INCLUDE)/cbf_alloc.h \ - $(INCLUDE)/cbf_ascii.h \ - $(INCLUDE)/cbf_binary.h \ - $(INCLUDE)/cbf_byte_offset.h \ - $(INCLUDE)/cbf_canonical.h \ - $(INCLUDE)/cbf_codes.h \ - $(INCLUDE)/cbf_compress.h \ - $(INCLUDE)/cbf_context.h \ - $(INCLUDE)/cbf_copy.h \ - $(INCLUDE)/cbf_file.h \ - $(INCLUDE)/cbf_getopt.h \ - $(INCLUDE)/cbf_hdf5.h \ - $(INCLUDE)/cbf_hdf5_filter.h \ - $(INCLUDE)/cbf_lex.h \ - $(INCLUDE)/cbf_minicbf_header.h\ - $(INCLUDE)/cbf_nibble_offset.h \ - $(INCLUDE)/cbf_packed.h \ - $(INCLUDE)/cbf_predictor.h \ - $(INCLUDE)/cbf_read_binary.h \ - $(INCLUDE)/cbf_read_mime.h \ - $(INCLUDE)/cbf_simple.h \ - $(INCLUDE)/cbf_string.h \ - $(INCLUDE)/cbf_stx.h \ - $(INCLUDE)/cbf_tree.h \ - $(INCLUDE)/cbf_uncompressed.h \ - $(INCLUDE_CBF_ULP_H) \ - $(INCLUDE)/cbf_write.h \ - $(INCLUDE)/cbf_write_binary.h \ - $(INCLUDE)/cbf_ws.h \ - $(INCLUDE)/global.h \ - $(INCLUDE)/cbff.h \ - $(INCLUDE)/md5.h \ - $(INCLUDE)/img.h - -# -# m4 macro files -# -M4FILES = $(M4)/fcblib_defines.m4 \ - $(M4)/fcb_exit_binary.m4 \ - $(M4)/fcb_next_binary.m4 \ - $(M4)/fcb_open_cifin.m4 \ - $(M4)/fcb_packed.m4 \ - $(M4)/fcb_read_bits.m4 \ - $(M4)/fcb_read_image.m4 \ - $(M4)/fcb_read_xds_i2.m4 \ - $(M4)/test_fcb_read_image.m4 \ - $(M4)/test_xds_binary.m4 - - -# -# Documentation files -# -DOCUMENTS = $(DOC)/CBFlib.html \ - $(DOC)/CBFlib.txt \ - $(DOC)/CBFlib_NOTICES.html \ - $(DOC)/CBFlib_NOTICES.txt \ - $(DOC)/ChangeLog \ - $(DOC)/ChangeLog.html \ - $(DOC)/MANIFES \ - $(DOC)/gpl.txt $(DOC)/lgpl.txt - -# -# HTML Graphics files -# -JPEGS = $(GRAPHICS)/CBFbackground.jpg \ - $(GRAPHICS)/CBFbig.jpg \ - $(GRAPHICS)/CBFbutton.jpg \ - $(GRAPHICS)/cbflibbackground.jpg\ - $(GRAPHICS)/cbflibbig.jpg \ - $(GRAPHICS)/cbflibbutton.jpg \ - $(GRAPHICS)/cifhome.jpg \ - $(GRAPHICS)/iucrhome.jpg \ - $(GRAPHICS)/noticeButton.jpg - - -# -# Default: instructions -# -default: - @echo ' ' - @echo '***************************************************************' - @echo ' ' - @echo ' PLEASE READ README and doc/CBFlib_NOTICES.txt' - @echo ' ' - @echo ' Before making the CBF library and example programs, check' - @echo ' that the C compiler name and flags are correct:' - @echo ' ' - @echo ' The current values are:' - @echo ' ' - @echo ' $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(PYCIFRWFLAG)' - @echo ' ' - @echo ' Before installing the CBF library and example programs, check' - @echo ' that the install directory is correct:' - @echo ' ' - @echo ' The current value :' - @echo ' ' - @echo ' $(CBF_PREFIX) ' - @echo ' ' - @echo ' To compile the CBF library and example programs type:' - @echo ' ' - @echo ' make clean' - @echo ' make all' - @echo ' ' - @echo ' To compile the CBF library as a shared object library, type:' - @echo ' ' - @echo ' make shared' - @echo ' ' - @echo ' To compile the Java wrapper classes for CBF library, type:' - @echo ' ' - @echo ' make javawrapper' - @echo ' ' - @echo ' To run a set of tests type:' - @echo ' ' - @echo ' make tests' - @echo ' ' - @echo ' To run some java tests type:' - @echo ' ' - @echo ' make javatests' - @echo ' ' - @echo ' The tests assume that several data files are in the directories' - @echo ' $(DATADIRI) and $(DATADIRO)' - @echo ' ' - @echo ' Alternatively tests can be run comparing MD5 signatures only by' - @echo ' ' - @echo ' make tests_sigs_only' - @echo ' ' - @echo ' These signature only tests save space and download time by' - @echo ' assuming that input data files and the output signatures' - @echo ' are in the directories' - @echo ' $(DATADIRI) and $(DATADIRS)' - @echo ' ' - @echo ' These directory can be obtained from' - @echo ' ' - @echo ' $(DATAURLI) ' - @echo ' $(DATAURLO) ' - @echo ' $(DATAURLS) ' - @echo ' ' - @echo ' To clean up the directories type:' - @echo ' ' - @echo ' make clean' - @echo ' ' - @echo ' To install the library and binaries type:' - @echo ' ' - @echo ' make install' - @echo ' ' - @echo '***************************************************************' - @echo ' ' - -# -# Compile the library and examples -# -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEPS = $(PYCIFRW) $(PLY) -else -PYCIFRWDEPS = -endif - -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -LZ4DEPS = $(LZ4) -else -LZ4DEPS = -endif - -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -BSHUFDEPS = $(BSHUF) -else -BSHUFDEPS = -endif - - -all:: $(BIN) $(SOURCE) $(F90SOURCE) $(HEADERS) \ - $(HDF5) \ - $(LZ4DEPS) \ - $(BSHUFDEPS) \ - $(PYCIFRWDEPS) \ - symlinksdone \ - $(REGEXDEP) \ - $(LIB) \ - $(LIB)/libcbf.a \ - $(LIB)/libfcb.a \ - $(LIB)/libimg.a \ - $(BIN)/adscimg2cbf \ - $(BIN)/arvai_test \ - $(BIN)/cbf2adscimg \ - $(BIN)/cbf2nexus \ - $(BIN)/cif2c \ - $(BIN)/cif2cbf \ - $(BIN)/cbf_standardize_numbers \ - $(BIN)/convert_image \ - $(BIN)/convert_minicbf\ - $(BIN)/img2cif \ - $(BIN)/makecbf \ - $(BIN)/minicbf2nexus \ - $(BIN)/nexus2cbf \ - $(BIN)/roi_peaksearch \ - $(BIN)/sequence_match \ - $(BIN)/testcell \ - $(BIN)/testalloc \ - $(BIN)/testreals \ - $(BIN)/testflat \ - $(BIN)/testflatpacked \ - $(BIN)/testhdf5 \ - $(BIN_TESTULP) \ - $(BIN)/tiff2cbf \ - $(BIN)/test_cbf_airy_disk \ - $(BIN)/cbf_testxfelread - -ifneq ($(F90C),) -all:: $(BIN)/test_xds_binary \ - $(BIN)/test_fcb_read_image -endif - -shared: $(SOLIB)/libcbf.so $(SOLIB)/libfcb.so $(SOLIB)/libimg.so - -javawrapper: shared $(JCBF) $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so - -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEF = -Dcbf_use_pycifrw=yes -else -PYCIFRWDEF = -endif - - -Makefiles: Makefile \ - Makefile_LINUX \ - Makefile_LINUX_64 \ - Makefile_LINUX_gcc42 \ - Makefile_LINUX_DMALLOC \ - Makefile_LINUX_gcc42_DMALLOC \ - Makefile_OSX \ - Makefile_OSX_gcc42 \ - Makefile_OSX_gcc42_DMALLOC \ - Makefile_AIX \ - Makefile_MINGW \ - Makefile_MSYS2 \ - Makefile_IRIX_gcc - - -Makefile_LINUX: $(M4)/Makefile.m4 - -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX $(M4)/Makefile.m4 > Makefile_LINUX.tmp - mv Makefile_LINUX.tmp Makefile_LINUX - -Makefile_LINUX_DMALLOC: $(M4)/Makefile.m4 - -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_DMALLOC.tmp - mv Makefile_LINUX_DMALLOC.tmp Makefile_LINUX_DMALLOC - -Makefile_LINUX_64: $(M4)/Makefile.m4 - -cp Makefile_LINUX_64 Makefile_LINUX_64_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_64 $(M4)/Makefile.m4 > Makefile_LINUX_64.tmp - mv Makefile_LINUX_64.tmp Makefile_LINUX_64 - -Makefile_LINUX_gcc42: $(M4)/Makefile.m4 - -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42 $(M4)/Makefile.m4 > Makefile_LINUX_gcc42.tmp - mv Makefile_LINUX_gcc42.tmp Makefile_LINUX_gcc42 - -Makefile_LINUX_gcc42_DMALLOC: $(M4)/Makefile.m4 - -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_gcc42_DMALLOC.tmp - mv Makefile_LINUX_gcc42_DMALLOC.tmp Makefile_LINUX_gcc42_DMALLOC - -Makefile_OSX: $(M4)/Makefile.m4 - -cp Makefile_OSX Makefile_OSX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX $(M4)/Makefile.m4 > Makefile_OSX.tmp - mv Makefile_OSX.tmp Makefile_OSX - -Makefile_OSX_gcc42: $(M4)/Makefile.m4 - -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42 $(M4)/Makefile.m4 > Makefile_OSX_gcc42.tmp - mv Makefile_OSX_gcc42.tmp Makefile_OSX_gcc42 - -Makefile_OSX_gcc42_DMALLOC: $(M4)/Makefile.m4 - -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_OSX_gcc42_DMALLOC.tmp - mv Makefile_OSX_gcc42_DMALLOC.tmp Makefile_OSX_gcc42_DMALLOC - -Makefile_AIX: $(M4)/Makefile.m4 - -cp Makefile_AIX Makefile_AIX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=AIX $(M4)/Makefile.m4 > Makefile_AIX.tmp - mv Makefile_AIX.tmp Makefile_AIX - -Makefile_MINGW: $(M4)/Makefile.m4 - -cp Makefile_MINGW Makefile_MINGW_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MINGW $(M4)/Makefile.m4 > Makefile_MINGW.tmp - mv Makefile_MINGW.tmp Makefile_MINGW - -Makefile_MSYS2: $(M4)/Makefile.m4 - -cp Makefile_MSYS2 Makefile_MSYS2_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MSYS2 $(M4)/Makefile.m4 > Makefile_MSYS2.tmp - mv Makefile_MSYS2.tmp Makefile_MSYS2 - -Makefile_IRIX_gcc: $(M4)/Makefile.m4 - -cp Makefile_IRIX_gcc Makefile_IRIX_gcc_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=IRIX_gcc $(M4)/Makefile.m4 > Makefile_IRIX_gcc.tmp - mv Makefile_IRIX_gcc.tmp Makefile_IRIX_gcc - - -Makefile: $(M4)/Makefile.m4 - -cp Makefile Makefile_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=default $(M4)/Makefile.m4 > Makefile.tmp - mv Makefile.tmp Makefile - -cbflib.ini: $(M4)/Makefile.m4 - echo "$(LDPREFIX)" > cbflib.ini - echo "HDF5_PLUGIN_PATH=$(SOLIB):$$HDF5_PLUGIN_PATH" >> cbflib.ini - echo "export HDF5_PLUGIN_PATH" >> cbflib.ini - -symlinksdone: - chmod a+x .symlinks - chmod a+x .undosymlinks - chmod a+x doc/.symlinks - chmod a+x doc/.undosymlinks - ./.symlinks $(SLFLAGS) - touch symlinksdone - -install: baseinstall pycbfinstall \ - $(HDF5_INSTALL) \ - $(TIFF_INSTALL) \ - $(REGEX_INSTALL) - -userinstall: baseinstall pycbfuserinstall \ - $(HDF5_INSTALL) \ - $(TIFF_INSTALL) \ - $(REGEX_INSTALL) - -baseinstall: all $(CBF_PREFIX) $(CBF_PREFIX)/lib $(CBF_PREFIX)/bin \ - $(CBF_PREFIX)/include $(CBF_PREFIX)/include/cbflib \ - $(PYSOURCE) shared $(EXAMPLES)/batch_convert_minicbf.sh \ - $(LIB)/libcbf.a $(LIB)/libimg.a $(LIB)/libfcb.a \ - $(SOLIB)/libcbf.so $(SOLIB)/libimg.so $(SOLIB)/libfcb.so - -chmod -R 755 $(CBF_PREFIX)/include/cbflib - -chmod 755 $(CBF_PREFIX)/lib/libcbf.a - -cp $(CBF_PREFIX)/lib/libcbf.a $(CBF_PREFIX)/lib/libcbf_old.a - cp $(LIB)/libcbf.a $(CBF_PREFIX)/lib/libcbf.a - -chmod 755 $(CBF_PREFIX)/lib/libimg.a - -cp $(CBF_PREFIX)/lib/libimg.a $(CBF_PREFIX)/lib/libimg_old.a - cp $(LIB)/libimg.a $(CBF_PREFIX)/lib/libimg.a - -chmod 755 $(CBF_PREFIX)/lib/libfcb.a - -cp $(CBF_PREFIX)/lib/libfcb.a $(CBF_PREFIX)/lib/libfcb_old.a - cp $(LIB)/libfcb.a $(CBF_PREFIX)/lib/libfcb.a - -chmod 755 $(CBF_PREFIX)/lib/libcbf.so - -cp $(CBF_PREFIX)/lib/libcbf.so $(CBF_PREFIX)/lib/libcbf_old.so - cp $(SOLIB)/libcbf.so $(CBF_PREFIX)/lib/libcbf.so - $(LN) $(CBF_PREFIX)/lib/libcbf.so $(CBF_PREFIX)/lib/lib_cbf.so - -chmod 755 $(CBF_PREFIX)/lib/libimg.so - -cp $(CBF_PREFIX)/lib/libimg.so $(CBF_PREFIX)/lib/libimg_old.so - cp $(SOLIB)/libimg.so $(CBF_PREFIX)/lib/libimg.so - $(LN) $(CBF_PREFIX)/lib/libimg.so $(CBF_PREFIX)/lib/lib_img.so - -chmod 755 $(CBF_PREFIX)/lib/libfcb.so - -cp $(CBF_PREFIX)/lib/libfcb.so $(CBF_PREFIX)/lib/libfcb_old.so - cp $(SOLIB)/libfcb.so $(CBF_PREFIX)/lib/libfcb.so - $(LN) $(CBF_PREFIX)/lib/libfcb.so $(CBF_PREFIX)/lib/lib_fcb.so - -cp $(CBF_PREFIX)/bin/cbflib.ini $(CBF_PREFIX)/bin/cbflib.ini_old - echo "$(RUNLDPREFIX)" > $(CBF_PREFIX)/bin/cbflib.ini - echo "HDF5_PLUGIN_PATH=$(CBF_PREFIX)/lib:$$HDF5_PLUGIN_PATH" >> $(CBF_PREFIX)/bin/cbflib.ini - echo "export HDF5_PLUGIN_PATH" >> $(CBF_PREFIX)/bin/cbflib.ini - -cp $(CBF_PREFIX)/bin/adscimg2cbf $(CBF_PREFIX)/bin/adscimg2cbf_old - cp $(BIN)/adscimg2cbf $(CBF_PREFIX)/bin/adscimg2cbf - -cp $(CBF_PREFIX)/bin/cbf2adscimg $(CBF_PREFIX)/bin/cbf2adscimg_old - cp $(BIN)/cbf2adscimg $(CBF_PREFIX)/bin/cbf2adscimg - -cp $(CBF_PREFIX)/bin/cbf_standardize_numbers \ - $(CBF_PREFIX)/bin/cbf_standardize_numbers_old - cp $(BIN)/cbf_standardize_numbers $(CBF_PREFIX)/bin/cbf_standardize_numbers - -cp $(CBF_PREFIX)/bin/convert_image $(CBF_PREFIX)/bin/convert_image_old - cp $(BIN)/convert_image $(CBF_PREFIX)/bin/convert_image - -cp $(CBF_PREFIX)/bin/convert_minicbf $(CBF_PREFIX)/bin/convert_minicbf_old - cp $(BIN)/convert_minicbf $(CBF_PREFIX)/bin/convert_minicbf - -cp $(CBF_PREFIX)/bin/makecbf $(CBF_PREFIX)/bin/makecbf_old - cp $(BIN)/makecbf $(CBF_PREFIX)/bin/makecbf - -cp $(CBF_PREFIX)/bin/img2cif $(CBF_PREFIX)/bin/img2cif_old - cp $(BIN)/img2cif $(CBF_PREFIX)/bin/img2cif - -cp $(CBF_PREFIX)/bin/cif2cbf $(CBF_PREFIX)/bin/cif2cbf_old - cp $(BIN)/cif2cbf $(CBF_PREFIX)/bin/cif2cbf - -cp $(CBF_PREFIX)/bin/minicbf2nexus $(CBF_PREFIX)/bin/minicbf2nexus_old - cp $(BIN)/minicbf2nexus $(CBF_PREFIX)/bin/minicbf2nexus - -cp $(CBF_PREFIX)/bin/cbf2nexus $(CBF_PREFIX)/bin/cbf2nexus_old - cp $(BIN)/cbf2nexus $(CBF_PREFIX)/bin/cbf2nexus - -cp $(CBF_PREFIX)/bin/nexus2cbf $(CBF_PREFIX)/bin/nexus2cbf_old - cp $(BIN)/nexus2cbf $(CBF_PREFIX)/bin/nexus2cbf - -cp $(CBF_PREFIX)/bin/roi_peaksearch $(CBF_PREFIX)/bin/roi_peaksearch_old - cp $(BIN)/roi_peaksearch $(CBF_PREFIX)/bin/roi_peaksearch - -cp $(CBF_PREFIX)/bin/sequence_match $(CBF_PREFIX)/bin/sequence_match_old - cp $(BIN)/sequence_match $(CBF_PREFIX)/bin/sequence_match - -cp $(CBF_PREFIX)/bin/testalloc $(CBF_PREFIX)/bin/testalloc_old - cp $(BIN)/testalloc $(CBF_PREFIX)/bin/testalloc - -cp $(CBF_PREFIX)/bin/arvai_test $(CBF_PREFIX)/bin/arvai_test_old - cp $(BIN)/arvai_test $(CBF_PREFIX)/bin/arvai_test - -cp $(CBF_PREFIX)/bin/cif2c $(CBF_PREFIX)/bin/cif2c_old - cp $(BIN)/cif2c $(CBF_PREFIX)/bin/cif2c - -cp $(CBF_PREFIX)/bin/testreals $(CBF_PREFIX)/bin/testreals_old - cp $(BIN)/testreals $(CBF_PREFIX)/bin/testreals - -cp $(CBF_PREFIX)/bin/testflat $(CBF_PREFIX)/bin/testflat_old - cp $(BIN)/testflat $(CBF_PREFIX)/bin/testflat - -cp $(CBF_PREFIX)/bin/testflatpacked $(CBF_PREFIX)/bin/testflatpacked_old - cp $(BIN)/testflatpacked $(CBF_PREFIX)/bin/testflatpacked - -cp $(CBF_PREFIX)/bin/tiff2cbf $(CBF_PREFIX)/bin/tiff2cbf_old - cp $(BIN)/tiff2cbf $(CBF_PREFIX)/bin/tiff2cbf - -cp $(CBF_PREFIX)/bin/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk_old - cp $(BIN)/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk - -cp $(CBF_PREFIX)/bin/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk_old - cp $(BIN)/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk - -cp $(CBF_PREFIX)/bin/testhdf5 $(CBF_PREFIX)/bin/testhdf5_old - cp $(BIN)/testhdf5 $(CBF_PREFIX)/bin/testhdf5 -ifneq ($(CBF_USE_ULP),) - -cp $(CBF_PREFIX)/bin/testulp $(CBF_PREFIX)/bin/testulp_old - cp $(BIN)/testulp $(CBF_PREFIX)/bin/testulp -endif - -cp $(CBF_PREFIX)/bin/batch_convert_minicbf.sh $(CBF_PREFIX)/bin/batch_convert_minicbf_old.sh - cp $(EXAMPLES)/batch_convert_minicbf.sh $(CBF_PREFIX)/bin/batch_convert_minicbf.sh -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) - cp $(SRC)/drel_lex.py $(CBF_PREFIX)/bin/drel_lex.py - cp $(SRC)/drel_yacc.py $(CBF_PREFIX)/bin/drel_yacc.py - cp $(SRC)/drelc.py $(CBF_PREFIX)/bin/drelc.py - cp $(SRC)/drel_prep.py $(CBF_PREFIX)/bin/drel_prep.py -endif - chmod -R 755 $(CBF_PREFIX)/include/cbflib - -rm -rf $(CBF_PREFIX)/include/cbflib_old - -cp -r $(CBF_PREFIX)/include/cbflib $(CBF_PREFIX)/include/cbflib_old - -rm -rf $(CBF_PREFIX)/include/cbflib - cp -r $(INCLUDE) $(CBF_PREFIX)/include/cbflib - chmod 644 $(CBF_PREFIX)/lib/libcbf.a - chmod 644 $(CBF_PREFIX)/lib/libimg.a - chmod 644 $(CBF_PREFIX)/lib/libfcb.a - chmod 755 $(CBF_PREFIX)/lib/libcbf.so - chmod 755 $(CBF_PREFIX)/lib/libimg.so - chmod 755 $(CBF_PREFIX)/lib/libfcb.so - chmod 755 $(CBF_PREFIX)/bin/arvai_test - chmod 755 $(CBF_PREFIX)/bin/cbf2nexus - chmod 755 $(CBF_PREFIX)/bin/cbf_standardize_numbers - chmod 755 $(CBF_PREFIX)/bin/cif2c - chmod 755 $(CBF_PREFIX)/bin/cif2cbf - chmod 755 $(CBF_PREFIX)/bin/convert_image - chmod 755 $(CBF_PREFIX)/bin/convert_minicbf - chmod 755 $(CBF_PREFIX)/bin/img2cif - chmod 755 $(CBF_PREFIX)/bin/makecbf - chmod 755 $(CBF_PREFIX)/bin/minicbf2nexus - chmod 755 $(CBF_PREFIX)/bin/nexus2cbf - chmod 755 $(CBF_PREFIX)/bin/roi_peaksearch - chmod 755 $(CBF_PREFIX)/bin/sequence_match - chmod 755 $(CBF_PREFIX)/bin/testalloc - chmod 755 $(CBF_PREFIX)/bin/testflat - chmod 755 $(CBF_PREFIX)/bin/testflatpacked - chmod 755 $(CBF_PREFIX)/bin/testhdf5 - chmod 755 $(CBF_PREFIX)/bin/testreals -ifneq ($(CBF_USE_ULP),) - chmod 755 $(CBF_PREFIX)/bin/testulp -endif - chmod 755 $(CBF_PREFIX)/bin/tiff2cbf - chmod 755 $(CBF_PREFIX)/bin/test_cbf_airy_disk - chmod 755 $(CBF_PREFIX)/bin/batch_convert_minicbf.sh - chmod 644 $(CBF_PREFIX)/include/cbflib/*.h - -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -# -# PyCifRW -# -build_pycifrw: $(M4)/Makefile.m4 - touch build_pycifrw -$(PYCIFRW): build_pycifrw - -rm -rf $(PYCIFRW) - -rm -rf $(PYCIFRW).tar.gz - $(DOWNLOAD) $(PYCIFRWURL) - tar -xvf $(PYCIFRW).tar.gz - -rm $(PYCIFRW).tar.gz - (cd $(PYCIFRW); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) - -# -# PLY -# -build_ply: $(M4)/Makefile.m4 - touch build_ply -$(PLY): build_ply - -rm -rf $(PLY) - -rm -rf $(PLY).tar.gz - $(DOWNLOAD) $(PLYURL) - tar -xvf $(PLY).tar.gz - -rm $(PLY).tar.gz - (cd $(PLY); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) -endif - -# -# REGEX -# - -build_regex: $(M4)/Makefile.m4 - touch build_regex -$(REGEX): build_regex - -rm -rf $(REGEX) - -rm -rf $(REGEX).tar.gz - $(DOWNLOAD) $(REGEX_URL) - tar -xvf $(REGEX).tar.gz - touch $(REGEX) - -rm $(REGEX).tar.gz - cp config.guess config.sub $(REGEX) - (cd $(REGEX); \ - prefix=$(REGEX_PREFIX); export prefix; \ - ./configure --prefix=$(REGEX_PREFIX); make install) - @-cp $(REGEX_PREFIX)/include/pcreposix.h $(REGEX_PREFIX)/include/regex.h -$(REGEX)_INSTALL: $(REGEX) - -rm -rf $(REGEX)_install - rsync -avz $(REGEX)/ $(REGEX)_install - (cd $(REGEX)_install; prefix=$(CBF_PREFIX); export prefix; \ - make distclean; ./configure --prefix=$(CBF_PREFIX); make install ) - @-cp $(CBF_PREFIX)/include/pcreposix.h $(CBF_PREFIX)/include/regex.h - -# -# TIFF -# -build_tiff: $(M4)/Makefile.m4 - touch build_tiff -$(TIFF): build_tiff config.guess config.sub - -rm -rf $(TIFF) - -rm -rf $(TIFF).tar.gz - $(DOWNLOAD) $(TIFF_URL) - tar -xvf $(TIFF).tar.gz - touch $(TIFF) - -rm $(TIFF).tar.gz - cp config.guess config.sub $(TIFF)/config/ - (cd $(TIFF); prefix=$(TIFF_PREFIX); export prefix; \ - ./configure --prefix=$(TIFF_PREFIX); make install) -$(TIFF)_INSTALL: $(TIFF) - -rm -rf $(TIFF)_install - rsync -avz $(TIFF)/ $(TIFF)_install - (cd $(TIFF)_install; make distclean; prefix=$(CBF_PREFIX); export prefix; \ - ./configure --prefix=$(CBF_PREFIX); make install) - - -ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes) -# -# HDF5 -# - -build_hdf5: $(M4)/Makefile.m4 - touch build_hdf5 -$(HDF5): build_hdf5 - -rm -rf $(HDF5) - -rm -rf $(HDF5).tar.gz - $(DOWNLOAD) $(HDF5_URL) - tar -xvf $(HDF5).tar.gz - cp config.guess $(HDF5)/bin/config.guess - cp config.sub $(HDF5)/bin/config.sub - touch $(HDF5) - -rm $(HDF5).tar.gz - echo "first level HDF5 install in "$(HDF5_PREFIX) - (cd $(ROOT)/$(HDF5); \ - CFLAGS="$(CFLAGS)"; export CFLAGS; \ - mkdir -p hdf5; prefix=$(ROOT)/$(HDF5)/hdf5; export prefix; \ - ./configure --prefix=$(ROOT)/$(HDF5)/hdf5 --enable-build-mode=production \ - --enable-trace --enable-fortran --enable-using-memchecker ;\ - make install; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/bin/ $(HDF5_PREFIX)/bin; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/lib/ $(HDF5_PREFIX)/lib; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/include/ $(HDF5_PREFIX)/include; \ - cd $(HDF5_PREFIX)/bin; $(ROOT)/$(HDF5)/hdf5/bin/h5redeploy -force ) -$(HDF5)_INSTALL: $(HDF5) - -rm -rf $(HDF5)_install - echo "final HDF5 install in "$(CBF_PREFIX) - rsync -avz $(ROOT)/$(HDF5)/hdf5/bin/ $(CBF_PREFIX)/bin; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/lib/ $(CBF_PREFIX)/lib; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/include/ $(CBF_PREFIX)/include; \ - cd $(CBF_PREFIX)/bin; $(ROOT)/$(HDF5)/hdf5/bin/h5redeploy -force -endif - - -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -# -# LZ4 -# -build_lz4: $(M4)/Makefile.m4 - touch build_lz4 -$(LZ4): $(HDF5) build_lz4 - mkdir -p $(SOLIB) - -rm -rf $(LZ4) -ifneq ($(MSYS2),yes) - -rm -rf $(LZ4).tar.gz - $(DOWNLOAD) $(LZ4_URL) - tar -xvf $(LZ4).tar.gz - -rm $(LZ4).tar.gz - (cp $(LZ4include)/lz4.h $(INCLUDE); \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/lz4.c -o lz4.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/h5zlz4.c -o h5zlz4.o; \ - $(CC) -shared lz4.o h5zlz4.o -o $(SOLIB)/libh5zlz4.so; \ - rm lz4.o h5zlz4.o) -else - git clone $(LZ4_URL) - (cd $(LZ4); mkdir build; cd build; cmake .. -G 'MSYS Makefiles' -DENABLE_LZ4_PLUGIN="yes"; make all; cp plugins/* $(SOLIB)) -endif - touch $(LZ4) -endif - - -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -# -# BSHUF -# -build_BSHUF: $(M4)/Makefile.m4 - touch build_BSHUF -$(BSHUF): $(HDF5) build_BSHUF $(LZ4dep) - mkdir -p $(SOLIB) - -rm -rf $(BSHUF) - -rm -rf $(BSHUF).tar.gz - -rm -rf *.o - $(DOWNLOAD) $(BSHUFURL) - tar -xvf $(BSHUF).tar.gz - -rm $(BSHUF).tar.gz - (cp $(BSHUFinclude)/bitshuffle.h \ - $(BSHUFinclude)/bitshuffle_core.h \ - $(BSHUFinclude)/bitshuffle_internals.h \ - $(BSHUFinclude)/bshuf_h5filter.h $(BSHUFinclude)/iochain.h $(INCLUDE); \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bshuf_h5plugin.c -o bshuf_h5plugin.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/iochain.c -o iochain.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o; \ - $(CC) -shared bshuf_h5filter.o bitshuffle.o bitshuffle_core.o iochain.o lz4.o $(HDF5SOLIBS_LOCAL) $(HDF5SOLIBS_SYSTEM)\ - -o $(SOLIB)/libh5zbshuf.so; \ - $(CC) -shared bshuf_h5filter.o bitshuffle.o bitshuffle_core.o lz4.o bshuf_h5plugin.o iochain.o \ - $(HDF5SOLIBS_LOCAL) \ - $(HDF5SOLIBS_SYSTEM) -o $(SOLIB)/$(BSHUFFILTER).so; \ - rm bshuf_h5filter.o bitshuffle.o lz4.o iochain.o bshuf_h5plugin.o) - touch $(BSHUF) -endif - - -# -# Directories -# -$(CBF_PREFIX): - mkdir -p $(CBF_PREFIX) - -$(CBF_PREFIX)/lib: $(CBF_PREFIX) - mkdir -p $(CBF_PREFIX)/lib - -$(CBF_PREFIX)/bin: $(CBF_PREFIX) - mkdir -p $(CBF_PREFIX)/bin - -$(CBF_PREFIX)/include: $(CBF_PREFIX) - mkdir -p $(CBF_PREFIX)/include - -$(CBF_PREFIX)/include/cbflib: $(CBF_PREFIX)/include - mkdir -p $(CBF_PREFIX)/include/cbflib - - - -$(LIB): - mkdir -p $@ - -$(BIN): - mkdir -p $@ - -$(SOLIB): - mkdir -p $@ - -$(JCBF): - mkdir -p $@ - -$(MINICBF_TESTS): - mkdir -p $@ - -# -# Parser -# -$(SRC)/cbf_stx.c: $(SRC)/cbf.stx.y - bison $(SRC)/cbf.stx.y -o $(SRC)/cbf.stx.tab.c -d - mv $(SRC)/cbf.stx.tab.c $(SRC)/cbf_stx.c - mv $(SRC)/cbf.stx.tab.h $(INCLUDE)/cbf_stx.h - -# -# CBF library -# -$(LIB)/libcbf.a: $(SOURCE) $(HEADERS) $(COMMONDEP) $(HDF5) $(LZ4DEPS) $(BSHUFDEPS) $(REGEXDEPS) - -rm -f $@ - -rm -f *.o - mkdir -p $(LIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) \ - -DCBF_FILTER_STATIC $(LZ4FLAG) $(BSHUFFLAG) $(PYCIFRWFLAG) $(INCLUDES) $(WARNINGS) -c $(SOURCE) -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -ifneq ($(MSYS2),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(LZ4src)/h5zlz4.c -o h5zlz4.o -else - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(LZ4)/LZ4/src/H5Zlz4.c -o h5zlz4.o -endif -endif -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/iochain.c -o iochain.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o -endif - $(AR) cr $@ *.o -ifneq ($(RANLIB),) - $(RANLIB) $@ -endif - -rm -f *.o - -$(SOLIB)/libcbf.so: $(SOURCE) $(HEADERS) $(COMMONDEP) $(HDF5) $(LZ4DEPS) $(BSHUFDEPS) - -rm -f $@ - -rm -f *.o - mkdir -p $(SOLIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(LZ4FLAG) $(BSHUFFLAG) $(PYCIFRWFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(SOURCE) -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -ifneq ($(MSYS2),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(LZ4src)/h5zlz4.c -o h5zlz4.o -else - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(LZ4)/LZ4/src/H5Zlz4.c -o h5zlz4.o -endif -endif -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle..o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/iochain.c -o iochain.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o -endif - - $(CC) -o $@ *.o $(SOLDFLAGS) $(EXTRALIBS) $(REGEX_LIBS) $(HDF5SOLIBS_LOCAL) $(HDF5SOLIBS_SYSTEM) - -rm -f *.o - -# -# IMG library -# -$(LIB)/libimg.a: $(SRC)/img.c $(HEADERS) $(COMMONDEP) - mkdir -p $(LIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) -c $(SRC)/img.c - $(AR) cr $@ img.o -ifneq ($(RANLIB),) - $(RANLIB) $@ -endif - rm img.o - -$(SOLIB)/libimg.so: $(SOURCE) $(HEADERS) $(COMMONDEP) - -rm -f $@ - mkdir -p $(SOLIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(SRC)/img.c - $(CC) -o $@ img.o $(SOLDFLAGS) - rm img.o - -# -# CBF and IMG libraries -# -CBF_IMG_LIBS: $(LIB)/libcbf.a $(LIB)/libimg.a - - -# -# FCB library -# -$(LIB)/libfcb.a: $(F90SOURCE) $(COMMONDEP) $(HDF5) - mkdir -p $(LIB) -ifneq ($(F90C),) - $(F90C) $(F90FLAGS) -c $(F90SOURCE) - $(AR) cr $@ *.o -ifneq ($(RANLIB),) - $(RANLIB) $@ -endif - rm *.o -else - echo "Define F90C to build $(LIB)/libfcb.a" -endif - -$(SOLIB)/libfcb.so: $(F90SOURCE) $(HEADERS) $(COMMONDEP) $(SOLIB) -ifneq ($(F90C),) - -rm -f $@ - mkdir -p $(SOLIB) - $(F90C) $(F90FLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(F90SOURCE) - $(F90C) $(F90FLAGS) -o $@ *.o $(SOLDFLAGS) - rm *.o -else - echo "Define F90C to build $(SOLIB)/libfcb.so" -endif - - -# -# Python bindings -# -$(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ - $(PYCBF)/$(SETUP_PY) \ - $(PYCBF)/pycbf.i \ - $(PYCBF)/cbfhandlewrappers.i \ - $(PYCBF)/cbfdetectorwrappers.i \ - $(PYCBF)/cbfgenericwrappers.i \ - $(PYCBF)/cbfgoniometerwrappers.i - -cp $(SOLIB)/*.so $(LIB) - (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) - -$(PYCBF)/pycbfinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --prefix=$(CBF_PREFIX)) - -$(PYCBF)/pycbfuserinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --user) - -$(PYCBF)/setup.py: $(M4)/setup_py.m4 - (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ - -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) - -$(PYCBF)/setup_MINGW.py: m4/setup_py.m4 - (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ - -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) - -$(LIB)/_pycbf.$(PYCBFEXT): $(PYCBF)/_pycbf.$(PYCBFEXT) - mkdir -p $(LIB) - cp $(PYCBF)/_pycbf.$(PYCBFEXT) $(LIB)/_pycbf.$(PYCBFEXT) - -$(PYCBF)/pycbf.pdf: $(PYCBF)/pycbf.w - (cd $(PYCBF); \ - $(NUWEB) pycbf; \ - latex pycbf; \ - $(NUWEB) pycbf; \ - latex pycbf; \ - dvipdfm pycbf ) - -$(PYCBF)/CBFlib.txt: $(DOC)/CBFlib.html - links -dump $(DOC)/CBFlib.html > $(PYCBF)/CBFlib.txt - -$(PYCBF)/cbfhandlewrappers.i \ -$(PYCBF)/cbfdetectorwrappers.i \ -$(PYCBF)/cbfgenericwrappers.i \ -$(PYCBF)/cbfgoniometerwrappers.i: $(PYCBF)/CBFlib.txt $(PYCBF)/make_pycbf.py - (cd $(PYCBF); $(PYTHON) make_pycbf.py; $(PYSWIG) pycbf.i; $(PYTHON) setup.py build) - - -# -# Java bindings -# -$(JCBF)/cbflib-$(VERSION).jar: $(JCBF) $(SRC)/jcbf.i - $(JSWIG) -I$(INCLUDE) -package org.iucr.cbflib -outdir $(JCBF) -o $(JCBF)/jcbf_wrap.c $(SRC)/jcbf.i - $(JAVAC) -d . $(JCBF)/*.java - $(JAR) cf $@ org - -$(SOLIB)/libcbf_wrap.so: $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf.so - mkdir -p $(SOLIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) $(JAVAINCLUDES) -c $(JCBF)/jcbf_wrap.c - $(CC) -o $@ jcbf_wrap.o $(SOLDFLAGS) -L$(SOLIB) -lcbf $(REGEX_LIBS) - rm jcbf_wrap.o - -# -# F90SOURCE -# -$(SRC)/fcb_exit_binary.f90: $(M4)/fcb_exit_binary.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_exit_binary.m4) > $(SRC)/fcb_exit_binary.f90 -$(SRC)/fcb_next_binary.f90: $(M4)/fcb_next_binary.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_next_binary.m4) > $(SRC)/fcb_next_binary.f90 -$(SRC)/fcb_open_cifin.f90: $(M4)/fcb_open_cifin.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_open_cifin.m4) > $(SRC)/fcb_open_cifin.f90 -$(SRC)/fcb_packed.f90: $(M4)/fcb_packed.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_packed.m4) > $(SRC)/fcb_packed.f90 -$(SRC)/fcb_read_bits.f90: $(M4)/fcb_read_bits.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_read_bits.m4) > $(SRC)/fcb_read_bits.f90 -$(SRC)/fcb_read_image.f90: $(M4)/fcb_read_image.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_read_image.m4) > $(SRC)/fcb_read_image.f90 -$(SRC)/fcb_read_xds_i2.f90: $(M4)/fcb_read_xds_i2.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_read_xds_i2.m4) > $(SRC)/fcb_read_xds_i2.f90 -$(EXAMPLES)/test_fcb_read_image.f90: $(M4)/test_fcb_read_image.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) test_fcb_read_image.m4) > $(EXAMPLES)/test_fcb_read_image.f90 -$(EXAMPLES)/test_xds_binary.f90: $(M4)/test_xds_binary.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) test_xds_binary.m4) > $(EXAMPLES)/test_xds_binary.f90 - -# -# convert_image example program -# -$(BIN)/convert_image: $(LIB)/libcbf.a $(EXAMPLES)/convert_image.c $(SRC)/img.c \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/convert_image.c $(SRC)/img.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ -# -# convert_minicbf example program -# -$(BIN)/convert_minicbf: $(LIB)/libcbf.a $(EXAMPLES)/convert_minicbf.c \ - $(GOPTLIB) $(GOPTINC) $(EXAMPLES)/batch_convert_minicbf.sh - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/convert_minicbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - chmod 755 $(EXAMPLES)/batch_convert_minicbf.sh - -# -# makecbf example program -# -$(BIN)/makecbf: $(LIB)/libcbf.a $(EXAMPLES)/makecbf.c $(LIB)/libimg.a - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/makecbf.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - - -# -# adscimg2cbf example program -# -$(BIN)/adscimg2cbf: $(LIB)/libcbf.a $(EXAMPLES)/adscimg2cbf.c $(EXAMPLES)/adscimg2cbf_sub.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/adscimg2cbf.c $(EXAMPLES)/adscimg2cbf_sub.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# cbf2adscimg example program -# -$(BIN)/cbf2adscimg: $(LIB)/libcbf.a $(EXAMPLES)/cbf2adscimg.c $(EXAMPLES)/cbf2adscimg_sub.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf2adscimg.c $(EXAMPLES)/cbf2adscimg_sub.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# cbf_standardize_numbers example program -# -$(BIN)/cbf_standardize_numbers: $(EXAMPLES)/cbf_standardize_numbers.c $(EXAMPLES)/cbf_standardize_numbers.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf_standardize_numbers.c $(SRC_FGETLN) $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@ - -# -# changtestcompression example program -# -$(BIN)/changtestcompression: $(LIB)/libcbf.a $(EXAMPLES)/changtestcompression.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/changtestcompression.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# img2cif example program -# -$(BIN)/img2cif: $(LIB)/libcbf.a $(EXAMPLES)/img2cif.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOTPINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/img2cif.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# cif2cbf example program -# -$(BIN)/cif2cbf: $(LIB)/libcbf.a $(EXAMPLES)/cif2cbf.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cif2cbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# cbf2nexus example program -# -$(BIN)/cbf2nexus: $(LIB)/libcbf.a $(EXAMPLES)/cbf2nexus.c \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf2nexus.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) \ - -lhdf5 -limg -o $@ - -# -# minicbf2nexus example program -# -$(BIN)/minicbf2nexus: $(LIB)/libcbf.a $(EXAMPLES)/minicbf2nexus.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/minicbf2nexus.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# nexus2cbf example program -# -$(BIN)/nexus2cbf: $(LIB)/libcbf.a $(EXAMPLES)/nexus2cbf.c \ - $(GOPTLIB) $(GOPTINC) $(REGEX) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/nexus2cbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# roi_peaksearch example program -# -$(BIN)/roi_peaksearch: $(LIB)/libcbf.a $(EXAMPLES)/roi_peaksearch.c \ - $(EXAMPLES)/dps_peaksearch.c $(EXAMPLES)/dps_peaksearch.h $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/roi_peaksearch.c $(EXAMPLES)/dps_peaksearch.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - - -# -# dectris cbf_template_t program -# -$(BIN)/cbf_template_t: $(DECTRIS_EXAMPLES)/cbf_template_t.c \ - $(DECTRIS_EXAMPLES)/mx_cbf_t_extras.h \ - $(DECTRIS_EXAMPLES)/mx_parms.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -I $(DECTRIS_EXAMPLES) $(WARNINGS) \ - $(DECTRIS_EXAMPLES)/cbf_template_t.c -o $@ - -# -# testcell example program -# -$(BIN)/testcell: $(LIB)/libcbf.a $(EXAMPLES)/testcell.C - mkdir -p $(BIN) - $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testcell.C -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# cif2c example program -# -$(BIN)/cif2c: $(LIB)/libcbf.a $(EXAMPLES)/cif2c.c - mkdir -p $(BIN) - $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cif2c.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# sauter_test example program -# -$(BIN)/sauter_test: $(LIB)/libcbf.a $(EXAMPLES)/sauter_test.C - mkdir -p $(BIN) - $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/sauter_test.C -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# sequence_match example program -# -$(BIN)/sequence_match: $(LIB)/libcbf.a $(EXAMPLES)/sequence_match.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/sequence_match.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# tiff2cbf example program -# -$(BIN)/tiff2cbf: $(LIB)/libcbf.a $(EXAMPLES)/tiff2cbf.c \ - $(GOPTLIB) $(GOPTINC) $(TIFF) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - -I$(TIFF)/libtiff $(EXAMPLES)/tiff2cbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf -L$(TIFF_PREFIX)/lib -ltiff $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# Andy Arvai's buffered read test program -# -$(BIN)/arvai_test: $(LIB)/libcbf.a $(EXAMPLES)/arvai_test.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/arvai_test.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# testreals example program -# -$(BIN)/testreals: $(LIB)/libcbf.a $(EXAMPLES)/testreals.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testreals.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# testflat example program -# -$(BIN)/testflat: $(LIB)/libcbf.a $(EXAMPLES)/testflat.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testflat.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ -# -# testflatpacked example program -# -$(BIN)/testflatpacked: $(LIB)/libcbf.a $(EXAMPLES)/testflatpacked.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testflatpacked.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -ifneq ($(F90C),) -# -# test_xds_binary example program -# -$(BIN)/test_xds_binary: $(LIB)/libfcb.a $(EXAMPLES)/test_xds_binary.f90 - mkdir -p $(BIN) - $(F90C) $(F90FLAGS) $(F90LDFLAGS) $(EXAMPLES)/test_xds_binary.f90 \ - -L$(LIB) -lfcb -o $@ - -# -# test_fcb_read_image example program -# -$(BIN)/test_fcb_read_image: $(LIB)/libfcb.a $(EXAMPLES)/test_fcb_read_image.f90 - mkdir -p $(BIN) - $(F90C) $(F90FLAGS) $(F90LDFLAGS) $(EXAMPLES)/test_fcb_read_image.f90 \ - -L$(LIB) -lfcb -o $@ -endif - -# -# testcbf (C) -# -$(BIN)/ctestcbf: $(EXAMPLES)/testcbf.c $(LIB)/libcbf.a - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testcbf.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# testcbf (Java) -# -$(BIN)/testcbf.class: $(EXAMPLES)/testcbf.java $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so - mkdir -p $(BIN) - $(JAVAC) -cp $(JCBF)/cbflib-$(VERSION).jar -d $(BIN) $(EXAMPLES)/testcbf.java - -ifneq ($(CBF_USE_ULP),) -# -# testulp test program -# -$(BIN)/testulp: $(LIB)/libcbf.a $(EXAMPLES)/testulp.c $(EXAMPLES)/unittest.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/testulp.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ -endif - -# -# testhdf5 test program -# -$(BIN)/testhdf5: $(LIB)/libcbf.a $(EXAMPLES)/testhdf5.c $(EXAMPLES)/unittest.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/testhdf5.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) \ - -o $@.tmp - mv $@.tmp $@ - -# -# testalloc test program -# -$(BIN)/testalloc: $(LIB)/libcbf.a $(EXAMPLES)/testalloc.c $(EXAMPLES)/unittest.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/testalloc.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ - -# -# test_cbf_airy_disk test program -# -$(BIN)/test_cbf_airy_disk: $(LIB)/libcbf.a $(EXAMPLES)/test_cbf_airy_disk.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/test_cbf_airy_disk.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ - -# -# cbf_testxfelread: test program -# -$(BIN)/cbf_testxfelread: $(LIB)/libcbf.a $(EXAMPLES)/cbf_testxfelread.c $(EXAMPLES)/cbf_testxfelread.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf_testxfelread.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ - -# -# Data files for tests -# - -$(DATADIRI): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLI)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Input.tar.gz) - touch $(DATADIRI) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Input.tar.gz) - -$(DATADIRO): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLO)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output.tar.gz) - touch $(DATADIRO) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output.tar.gz) - -$(DATADIRS): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLS)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - touch $(DATADIRS) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - - -# Input Data Files - -TESTINPUT_BASIC = example.mar2300 -DATADIRI_INPUT_BASIC = $(DATADIRI)/example.mar2300 - - -TESTINPUT_EXTRA = \ - 1191_00005.cbf \ - 9ins.cif \ - hit-20140306005258847.cbf \ - insulin_pilatus6m.cbf \ - mb_LP_1_001.img \ - testflatin.cbf \ - testflatpackedin.cbf \ - testrealin.cbf \ - thaumatin_die_M1S5_1_0005_2.cbf \ - X4_lots_M1S4_1_0001.cbf \ - X4_lots_M1S4_1_0002.cbf \ - X4_lots_M1S4_1_0003.cbf \ - X4_lots_M1S4_1_0004.cbf \ - X4_lots_M1S4_1_0005.cbf \ - XRD1621.tif - - - -DATADIRI_INPUT_EXTRA = \ - $(DATADIRI)/1191_00005.cbf \ - $(DATADIRI)/9ins.cif \ - $(DATADIRI)/hit-20140306005258847.cbf \ - $(DATADIRI)/insulin_pilatus6m.cbf \ - $(DATADIRI)/mb_LP_1_001.img \ - $(DATADIRI)/testflatin.cbf \ - $(DATADIRI)/testflatpackedin.cbf \ - $(DATADIRI)/testrealin.cbf \ - $(DATADIRI)/thaumatin_die_M1S5_1_0005_2.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0001.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0002.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0003.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0004.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0005.cbf \ - $(DATADIRI)/XRD1621.tif - - -# Output Data Files - -TESTOUTPUT = adscconverted_flat_orig.cbf \ - adscconverted_orig.cbf converted_flat_orig.cbf converted_orig.cbf \ - insulin_pilatus6mconverted_orig.cbf.h5.cbf \ - insulin_pilatus6mconverted_orig.cbf.h5 \ - insulin_pilatus6mconverted_v2_orig.cbf \ - mb_LP_1_001_orig.cbf testcell_orig.prt \ - test_xds_bin_testflatout_orig.out \ - test_xds_bin_testflatpackedout_orig.out test_fcb_read_testflatout_orig.out \ - test_fcb_read_testflatpackedout_orig.out \ - XRD1621_orig.cbf XRD1621_I4encbC100_orig.cbf \ - minicbf_orig.h5 -NEWTESTOUTPUT = adscconverted_flat.cbf \ - adscconverted.cbf converted_flat.cbf converted.cbf \ - insulin_pilatus6mconverted.cbf \ - insulin_pilatus6mconverted.cbf.h5 \ - insulin_pilatus6mconverted.cbf.h5.cbf \ - insulin_pilatus6mconverted_v2.cbf \ - mb_LP_1_001.cbf testcell.prt \ - test_xds_bin_testflatout.out \ - test_xds_bin_testflatpackedout.out test_fcb_read_testflatout.out \ - test_fcb_read_testflatpackedout.out \ - XRD1621.cbf XRD1621_I4encbC100.cbf \ - $(MINICBF_TEST)/minicbf.h5 -DATADIRO_OUTPUT = $(DATADIRO)/adscconverted_flat_orig.cbf \ - $(DATADIRO)/adscconverted_orig.cbf \ - $(DATADIRO)/converted_flat_orig.cbf \ - $(DATADIRO)/converted_orig.cbf \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5 \ - $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf \ - $(DATADIRO)/mb_LP_1_001_orig.cbf \ - $(DATADIRO)/testcell_orig.prt \ - $(DATADIRO)/test_xds_bin_testflatout_orig.out \ - $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out \ - $(DATADIRO)/test_fcb_read_testflatout_orig.out \ - $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out \ - $(DATADIRO)/XRD1621_orig.cbf \ - $(DATADIRO)/XRD1621_I4encbC100_orig.cbf \ - $(DATADIRO)/minicbf_orig.h5 -DATADIRO_OUTPUT_SIGNATURES = $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) \ - $(DATADIRO)/adscconverted_orig.cbf$(SEXT) \ - $(DATADIRO)/converted_flat_orig.cbf$(SEXT) \ - $(DATADIRO)/converted_orig.cbf$(SEXT) \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ - $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ - $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) \ - $(DATADIRO)/testcell_orig.prt$(SEXT) \ - $(DATADIRO)/test_xds_bin_testflatout_orig.out$(SEXT) \ - $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRO)/test_fcb_read_testflatout_orig.out$(SEXT) \ - $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRO)/XRD1621_orig.cbf$(SEXT) \ - $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) \ - $(DATADIRO)/minicbf_orig.h5$(SEXT) - - - -# Output Data File Signatures - -TESTOUTPUTSIGS = adscconverted_flat_orig.cbf$(SEXT) \ - adscconverted_orig.cbf$(SEXT) converted_flat_orig.cbf$(SEXT) converted_orig.cbf$(SEXT) \ - insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ - insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ - insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ - mb_LP_1_001_orig.cbf$(SEXT) testcell_orig.prt$(SEXT) \ - test_xds_bin_testflatout_orig.out$(SEXT) \ - test_xds_bin_testflatpackedout_orig.out$(SEXT) test_fcb_read_testflatout_orig.out$(SEXT) \ - test_fcb_read_testflatpackedout_orig.out$(SEXT) \ - XRD1621_orig.cbf$(SEXT) \ - XRD1621_I4encbC100_orig.cbf$(SEXT) \ - minicbf_orig.h5$(SEXT) -DATADIRS_OUTPUT_SIGNATURES = $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) \ - $(DATADIRS)/adscconverted_orig.cbf$(SEXT) \ - $(DATADIRS)/converted_flat_orig.cbf$(SEXT) \ - $(DATADIRS)/converted_orig.cbf$(SEXT) \ - $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ - $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ - $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ - $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) \ - $(DATADIRS)/testcell_orig.prt$(SEXT) \ - $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) \ - $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) \ - $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRS)/XRD1621_orig.cbf$(SEXT) \ - $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) \ - $(DATADIRS)/minicbf_orig.h5$(SEXT) - -# Fetch Input Data Files - -$(TESTINPUT_BASIC): $(DATADIRI) $(DATADIRI_INPUT_BASIC) - cp $(DATADIRI)/$@ $@ - cp $(DATADIRI)/$@$(SEXT) $@$(SEXT) - -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) - -$(TESTINPUT_EXTRA): $(DATADIRI) $(DATADIRI_INPUT_EXTRA) - cp $(DATADIRI)/$@ $@ - cp $(DATADIRI)/$@$(SEXT) $@$(SEXT) - -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) - - -# Fetch Output Data Files and Signatures - -$(TESTOUTPUT): $(DATADIRO) $(DATADIRO_OUTPUT) $(DATADIRO_OUTPUT_SIGNATURES) - cp $(DATADIRO)/$@ $@ - cp $(DATADIRO)/$@$(SEXT) $@$(SEXT) - -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) - -# Fetch Output Data File Signatures - -$(TESTOUTPUTSIGS): $(DATADIRS) $(DATADIRS_OUTPUT_SIGNATURES) - cp $(DATADIRS)/$@ $@ - - - -# -# Tests -# - - -tests: all $(LIB) $(BIN) symlinksdone basic extra dectristests pycbftests -tests_sigs_only: $(LIB) $(BIN) symlinksdone basic extra_sigs_only -restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 - $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < adscconverted.cbf > $(DATADIRO)/adscconverted_orig.cbf$(SEXT) - $(SIGNATURE) < converted_flat.cbf > $(DATADIRO)/converted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < converted.cbf > $(DATADIRO)/converted_orig.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5 > $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5.cbf > $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) - $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) - $(SIGNATURE) < testcell.prt > $(DATADIRO)/testcell_orig.prt$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRO)/test_xds_bin_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRO)/test_fcb_read_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < XRD1621.cbf > $(DATADIRO)/XRD1621_orig.cbf$(SEXT) - $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) - $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRO)/minicbf_orig.h5$(SEXT) - cp adscconverted_flat.cbf $(DATADIRO)/adscconverted_flat_orig.cbf$ - cp adscconverted.cbf $(DATADIRO)/adscconverted_orig.cbf - cp converted_flat.cbf $(DATADIRO)/converted_flat_orig.cbf - cp converted.cbf $(DATADIRO)/converted_orig.cbf - cp insulin_pilatus6mconverted.cbf.h5 $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5 - cp insulin_pilatus6mconverted.cbf.h5.cbf $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf - cp insulin_pilatus6mconverted_v2.cbf $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf - cp mb_LP_1_001.cbf$ $(DATADIRO)/mb_LP_1_001_orig.cbf - cp testcell.prt $(DATADIRO)/testcell_orig.prt - cp test_xds_bin_testflatout.out $(DATADIRO)/test_xds_bin_testflatout_orig.out - cp test_xds_bin_testflatpackedout.out $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out - cp test_fcb_read_testflatout.out $(DATADIRO)/test_fcb_read_testflatout_orig.out - cp test_fcb_read_testflatpackedout.out $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out - cp XRD1621.cbf $(DATADIRO)/XRD1621_orig.cbf - cp XRD1621_I4encbC100.cbf $(DATADIRO)/XRD1621_I4encbC100_orig.cbf - cp $(MINICBF_TEST)/minicbf.h5 $(DATADIRO)/minicbf_orig.h5 - -restore_sigs_only: $(NEWTESTOUTPUT) $(DATADIRS) - $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < adscconverted.cbf > $(DATADIRS)/adscconverted_orig.cbf$(SEXT) - $(SIGNATURE) < converted_flat.cbf > $(DATADIRS)/converted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < converted.cbf > $(DATADIRS)/converted_orig.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5 > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5.cbf > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) - $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) - $(SIGNATURE) < testcell.prt > $(DATADIRS)/testcell_orig.prt$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < XRD1621.cbf > $(DATADIRS)/XRD1621_orig.cbf$(SEXT) - $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) - $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRS)/minicbf_orig.h5$(SEXT) -restore_signatures: restore_output restore_sigs_only - -# -# Basic Tests -# - -basic: $(BIN)/makecbf $(BIN)/img2cif $(BIN)/cif2cbf $(TESTINPUT_BASIC) - $(LDPREFIX) $(BIN)/makecbf example.mar2300 makecbf.cbf - $(LDPREFIX) $(BIN)/img2cif -c flatpacked -m headers -d digest \ - -e base64 example.mar2300 img2cif_packed.cif - $(LDPREFIX) $(BIN)/img2cif -c canonical -m headers -d digest \ - -e base64 example.mar2300 img2cif_canonical.cif - $(LDPREFIX) $(BIN)/img2cif -c flatpacked -m headers -d digest \ - -e none example.mar2300 img2cif_packed.cbf - $(LDPREFIX) $(BIN)/img2cif -c canonical -m headers -d digest \ - -e none example.mar2300 img2cif_canonical.cbf - $(LDPREFIX) $(BIN)/cif2cbf -e none -c flatpacked \ - img2cif_canonical.cif cif2cbf_packed.cbf - $(LDPREFIX) $(BIN)/cif2cbf -e none -c canonical \ - img2cif_packed.cif cif2cbf_canonical.cbf - -cmp cif2cbf_packed.cbf makecbf.cbf - -cmp cif2cbf_packed.cbf img2cif_packed.cbf - -cmp cif2cbf_canonical.cbf img2cif_canonical.cbf - - -# -# Extra Tests -# -$(MINICBF_TEST)/minicbf.h5: - cd $(MINICBF_TEST); $(LDPREFIX) $(TIME) $(BIN)/minicbf2nexus -c zlib \ - -C config $(HDF5REGISTER) -o minicbf.h5 ../X4_lots_M1S4_1_*.cbf -mb_LP_1_001.cbf: - $(LDPREFIX) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - - - -ifneq ($(F90C),) -extra: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf \ - $(BIN)/minicbf2nexus $(BIN)/cbf2nexus $(BIN)/nexus2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf \ - $(BIN)/testhdf5 $(BIN)/testalloc \ - $(BIN_TESTULP) \ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUT) $(EXAMPLES)/batch_convert_minicbf.sh \ - $(TEMPLATES)/template_X4_lots_M1S4.cbf -else -extra: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf \ - $(BIN)/minicbf2nexus $(BIN)/cbf2nexus $(BIN)/nexus2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf $(BIN)/cbf2adscimg \ - $(BIN)/testhdf5 $(BIN)/testalloc \ - $(BIN_TESTULP) \ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUT) $(EXAMPLES)/batch_convert_minicbf.sh -endif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e hex -c none \ - makecbf.cbf cif2cbf_ehcn.cif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ - cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf -F example.mar2300 converted_flat.cbf - -cmp converted_flat.cbf converted_flat_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf example.mar2300 converted.cbf - -cmp converted.cbf converted_orig.cbf - -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat > testcell.prt - -cmp testcell.prt testcell_orig.prt - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -cmp adscconverted_flat.cbf adscconverted_flat_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -cmp adscconverted.cbf adscconverted_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -cmp mb_LP_1_001.cbf mb_LP_1_001_orig.cbf -ifneq ($(CLEANTESTS),) - mv mb_LP_1_001.cbf nmb_LP_1_001.cbf -else - cp mb_LP_1_001.cbf nmb_LP_1_001.cbf -endif - $(LDPREFIX) $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf - -cmp nmb_LP_1_001.img mb_LP_1_001.img - rm nmb_LP_1_001.cbf -ifneq ($(CLEANTESTS),) - rm nmb_LP_1_001.img -endif - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -cmp insulin_pilatus6mconverted.cbf insulin_pilatus6mconverted_rev_orig.cbf - -$(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -cmp insulin_pilatus6mconverted_v2.cbf insulin_pilatus6mconverted_v2_orig.cbf - (CBF_CONVERT_MINICBF_PATH=$(BIN); export CBF_CONVERT_MINICBF_PATH; \ - $(LDPREFIX) $(EXAMPLES)/batch_convert_minicbf.sh "." "minicbf_test" \ - "X4_lots_M1S4_1_*.cbf" $(TEMPLATES)/template_X4_lots_M1S4.cbf) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w -O $(HDF5REGISTER) -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encI.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encp.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cb -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encb.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cc -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encc.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cz -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encz.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cl -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encl.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -c2 -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(H5DUMP) insulin_pilatus6mconverted_orig.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted_orig.cbf.h5.dump) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(H5DUMP) insulin_pilatus6mconverted.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted.cbf.h5.dump) - -$(DIFF) insulin_pilatus6mconverted_orig.cbf.h5.dump insulin_pilatus6mconverted.cbf.h5.dump - -rm -f insulin_pilatus6mconverted_orig.cbf.h5.dump - -rm -f insulin_pilatus6mconverted.cbf.h5.dump - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_orig.cbf.h5.cbf -o insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf.h5 -o insulin_pilatus6mconverted.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted.cbf.h5.cbf -o insulin_pilatus6mconverted.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encp.cbf.h5 -o insulin_pilatus6mconverted_encp.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encp.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encb.cbf.h5 -o insulin_pilatus6mconverted_encb.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encb.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encI.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encI.cbf.h5.cbf -o insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encc.cbf.h5 -o insulin_pilatus6mconverted_encc.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encc.cbf.h5.cbf -o insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encz.cbf.h5 -o insulin_pilatus6mconverted_encz.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encz.cbf.h5.cbf -o insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encl.cbf.h5 -o insulin_pilatus6mconverted_encl.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encl.cbf.h5.cbf -o insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_enc2.cbf.h5 -o insulin_pilatus6mconverted_enc2.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_enc2.cbf.h5.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -rm -f insulin_pilatus6mconverted*.cbf.h5.eqcI.cbf - $(LDPREFIX) $(TINE) $(BIN)/test_cbf_airy_disk - $(LDPREFIX) $(TIME) $(BIN)/cbf_testxfelread - $(LDPREFIX) $(TIME) $(BIN)/testalloc - $(LDPREFIX) $(TIME) $(BIN)/testhdf5; rm -f testfile.h5 -ifneq ($(CBF_USE_ULP),) - $(LDPREFIX) $(TIME) $(BIN)/testulp -endif - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/minicbf2nexus -c zlib \ - -C config $(HDF5REGISTER) -o minicbf.h5 ../X4_lots_M1S4_1_*.cbf - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) ../minicbf_orig.h5 | $(ALLBUTONE) > minicbf_original.dump - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) minicbf.h5 | $(ALLBUTONE) > minicbf.dump - -cd $(MINICBF_TEST); $(DIFF) minicbf_original.dump minicbf.dump - $(LDPREFIX) cd $(MINICBF_TEST); rm -f minicbf_original.dump - $(LDPREFIX) cd $(MINICBF_TEST); rm -f minicbf.dump - #cd $(MINICBF_TEST); rm -f minicbf.h5 - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/cbf2nexus -c zlib \ - --list -o i19-1.h5 ../1191_00005.cbf - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/nexus2cbf \ - -o i19-1.cbf i19-1.h5 - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/cbf2nexus -c zlib \ - --list -o i19-2.h5 i19-1.cbf - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/nexus2cbf \ - -o i19-2.cbf i19-2.h5 - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) i19-1.h5 | $(ALLBUTONE) > i19-1.dump - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) i19-2.h5 | $(ALLBUTONE) > i19-2.dump - -cd $(MINICBF_TEST); $(DIFF) i19-1.dump i19-2.dump - -cd $(MINICBF_TEST); $(DIFF) i19-1.cbf i19-2.cbf - $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf -ifneq ($(F90C),) - $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatout.out) - -$(DIFF) test_xds_bin_testflatout.out test_xds_bin_testflatout_orig.out - $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatpackedout.out) - -$(DIFF) test_xds_bin_testflatpackedout.out test_xds_bin_testflatpackedout_orig.out - $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatout.out) - -$(DIFF) test_fcb_read_testflatout.out test_fcb_read_testflatout_orig.out - $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatpackedout.out) - -$(DIFF) test_fcb_read_testflatpackedout.out test_fcb_read_testflatpackedout_orig.out -endif - $(LDPREFIX) $(TIME) $(BIN)/sauter_test - $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - -$(DIFF) XRD1621.cbf XRD1621_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(DIFF) XRD1621_I4encbC100.cbf XRD1621_I4encbC100_orig.cbf - -ifneq ($(F90C),) -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf \ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -else -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf\ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -endif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e hex -c none \ - makecbf.cbf cif2cbf_ehcn.cif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ - cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F example.mar2300 converted_flat.cbf - -$(SIGNATURE) < converted_flat.cbf | $(DIFF) - converted_flat_orig.cbf$(SEXT); rm converted_flat.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image example.mar2300 converted.cbf - -$(SIGNATURE) < converted.cbf | $(DIFF) - converted_orig.cbf$(SEXT); rm converted.cbf - -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat | \ - $(SIGNATURE) | $(DIFF) - testcell_orig.prt$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -$(SIGNATURE) < adscconverted_flat.cbf | $(DIFF) - adscconverted_flat_orig.cbf$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -$(SIGNATURE) < adscconverted.cbf | $(DIFF) - adscconverted_orig.cbf$(SEXT); rm adscconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -$(SIGNATURE) < mb_LP_1_001.cbf | $(DIFF) - mb_LP_1_001_orig.cbf$(SEXT) - mv mb_LP_1_001.cbf nmb_LP_1_001.cbf - $(LDPREFIX) $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf - -cmp nmb_LP_1_001.img mb_LP_1_001.img - rm nmb_LP_1_001.cbf - rm nmb_LP_1_001.img - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted.cbf | $(DIFF) - insulin_pilatus6mconverted_rev_orig.cbf$(SEXT); rm insulin_pilatus6mconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf | $(DIFF) - insulin_pilatus6mconverted_v2_orig.cbf$(SEXT); rm insulin_pilatus6mconverted_v2.cbf - $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf -ifneq ($(F90C),) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatpackedout_orig.out$(SEXT) -endif - $(LDPREFIX) $(TIME) $(BIN)/sauter_test - $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(SIGNATURE) < XRD1621.cbf | $(DIFF) - XRD1621_orig.cbf$(SEXT); rm XRD1621.cbf - -$(SIGNATURE) < XRD1621_I4encbC100.cbf | $(DIFF) - XRD1621_I4encbC100_orig.cbf$(SEXT); rm XRD1621_I4encbC100.cbf - @-rm -f adscconverted_flat.cbf - @-rm -f $(TESTINPUT_BASIC) $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) - @-rm -f cif2cbf_packed.cbf makecbf.cbf \ - cif2cbf_packed.cbf img2cif_packed.cbf \ - cif2cbf_canonical.cbf img2cif_canonical.cbf - @-rm -f testrealout.cbf testflatout.cbf testflatpackedout.cbf \ - cif2cbf_encp.cbf img2cif_canonical.cif img2cif_packed.cif 9ins.cbf - - - -pycbftests: $(PYCBF)/_pycbf.$(PYCBFEXT) $(BIN)/cbf_standardize_numbers - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test1.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test2.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test3.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test4.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test1.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test2.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py ../hit-20140306005258847.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test1_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test1.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test2_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test2.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test3_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test3.out - - -pycbfinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfinstall - -pycbfuserinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfuserinstall - -javatests: $(BIN)/ctestcbf $(BIN)/testcbf.class $(SOLIB)/libcbf_wrap.so - $(LDPREFIX) $(BIN)/ctestcbf > testcbfc.txt - $(LDPREFIX) java -cp $(JCBF)/cbflib-$(VERSION).jar:$(BIN) testcbf > testcbfj.txt - $(DIFF) testcbfc.txt testcbfj.txt - -dectristests: $(BIN)/cbf_template_t $(TEMPLATES)/cbf_test_orig.out - $(LDPREFIX) (cd templates; ../bin/cbf_template_t; diff -a -u cbf_test_orig.out cbf_template_t.out) - -# -# Remove all non-source files -# -empty: - @-rm -rf $(LIB)/* - @-rm -rf $(INCLUDE)/bitshuf* - @-rm -rf $(INCLUDE)/bshuf* - @-rm -rf $(INCLUDE)/H5* - @-rm -rf $(BIN)/* - @-rm -f $(PYCBF)/_pycbf.$(PYCBFEXT) - @-rm -rf $(PYCBF)/build/* - @-rm -f $(PYCBF)/newtest1.cbf - @-rm -f $(PYCBF)/fel_test1.out - @-rm -f $(PYCBF)/fel_test2.out - @-rm -f $(PYCBF)/setup.py - @-rm -f $(PYCBF)/setup_MINGW.py - @-rm -f makecbf.cbf - @-rm -f img2cif_packed.cif - @-rm -f img2cif_canonical.cif - @-rm -f img2cif_packed.cbf - @-rm -f img2cif_canonical.cbf - @-rm -f img2cif_raw.cbf - @-rm -f cif2cbf_packed.cbf - @-rm -f cif2cbf_canonical.cbf - @-rm -f converted.cbf - @-rm -f adscconverted.cbf - @-rm -f converted_flat.cbf - @-rm -f adscconverted_flat.cbf - @-rm -f adscconverted_flat_rev.cbf - @-rm -f mb_LP_1_001.cbf - @-rm -f cif2cbf_ehcn.cif - @-rm -f cif2cbf_encp.cbf - @-rm -f 9ins.cbf - @-rm -f 9ins.cif - @-rm -f testcell.prt - @-rm -f example.mar2300 - @-rm -f converted_orig.cbf - @-rm -f adscconverted_orig.cbf - @-rm -f converted_flat_orig.cbf - @-rm -f adscconverted_flat_orig.cbf - @-rm -f adscconverted_flat_rev_orig.cbf - @-rm -f mb_LP_1_001_orig.cbf - @-rm -f insulin_pilatus6mconverted*.cbf - @-rm -f insulin_pilatus6mconverted*.h5 - @-rm -f insulin_pilatus6m.cbf - @-rm -f testrealin.cbf - @-rm -f testrealout.cbf - @-rm -f testflatin.cbf - @-rm -f testflatout.cbf - @-rm -f testflatpackedin.cbf - @-rm -f testflatpackedout.cbf - @-rm -f CTC.cbf - @-rm -f test_fcb_read_testflatout.out - @-rm -f test_fcb_read_testflatpackedout.out - @-rm -f test_xds_bin_testflatpackedout.out - @-rm -f test_xds_bin_testflatout.out - @-rm -f test_fcb_read_testflatout_orig.out - @-rm -f test_fcb_read_testflatpackedout_orig.out - @-rm -f test_xds_bin_testflatpackedout_orig.out - @-rm -f test_xds_bin_testflatout_orig.out - @-rm -f mb_LP_1_001.img - @-rm -f 9ins.cif - @-rm -f testcell_orig.prt - @-rm -f $(DECTRIS_EXAMPLES)/cbf_template_t.out - @-rm -f XRD1621.cbf - @-rm -f XRD1621_orig.cbf - @-rm -f XRD1621_I4encbC100_orig.cbf - @-rm -f XRD1621_I4encbC100.cbf - @-rm -f minicbf_orig.h5 - @-rm -f $(SRC)/fcb_exit_binary.f90 - @-rm -f $(SRC)/fcb_next_binary.f90 - @-rm -f $(SRC)/fcb_open_cifin.f90 - @-rm -f $(SRC)/fcb_packed.f90 - @-rm -f $(SRC)/fcb_read_bits.f90 - @-rm -f $(SRC)/fcb_read_image.f90 - @-rm -f $(SRC)/fcb_read_xds_i2.f90 - @-rm -f $(EXAMPLES)/test_fcb_read_image.f90 - @-rm -f $(EXAMPLES)/test_xds_binary.f90 - @-rm -f symlinksdone - @-rm -f $(TESTOUTPUT) *$(SEXT) - @-rm -rf $(SOLIB) - @-rm -rf org - @-rm -rf $(JCBF) - @-rm -rf $(REGEX) - @-rm -rf $(REGEX)_install - @-rm -rf $(TIFF) - @-rm -rf $(TIFF)_install - @-rm -rf $(HDF5) - @-rm -rf $(HDF5)_install - @-rm -rf $(INCLUDE)/tiff* - @-rm -rf $(INCLUDE)/H5* - @-rm -rf $(INCLUDE)/hdf5* - @-rm -rf share - @-rm -rf $(MINICBF_TEST)/i19* - @-rm -rf solib - @-rm -f thaumatin_die_M1S5_1_0005_2.cbf - @-rm -f 1191_00005.cbf - @-rm -f XRD1621.tif - @-rm -f md5tmp - @-rm -rf $(PYCBF)/build - @-rm -f *_old - @-rm -f X4_lots_M1S4_1_*.cbf - @-rm -f testfile.h5 - @-rm -f hit-20140306005258847.cbf - @-rm -f build_* - ./.undosymlinks - -# -# Remove temporary files -# -clean: - @-rm -f core - @-rm -f *.o - @-rm -f *.u -# -# Restore to distribution state -# -distclean: clean empty - -# -# Create a Tape Archive for distribution -# - -tar: $(DOCUMENTS) $(SOURCE) $(SRC)/cbf.stx $(HEADERS) $(M4FILES)\ - $(EXAMPLES) \ - README.html README Makefile \ - $(JPEGS) - -/bin/rm -f CBFlib.tar* - tar cvBf CBFlib.tar \ - $(DOCUMENTS) $(SOURCE) $(SRC)/cbf.stx $(HEADERS) $(M4FILES)\ - $(EXAMPLES) \ - README.html README Makefile \ - $(JPEGS) - gzip --best CBFlib.tar - diff --git a/Makefile_LINUX_gcc42 b/Makefile_DIALS similarity index 77% rename from Makefile_LINUX_gcc42 rename to Makefile_DIALS index 66576112..d5e302db 100644 --- a/Makefile_LINUX_gcc42 +++ b/Makefile_DIALS @@ -2,12 +2,12 @@ ###################################################################### # Makefile - command file for make to create CBFlib # # # -# Version 0.9.6 19 May 2020 # +# Version 0.9.7 28 June 2021 # # # # Paul Ellis and # # Herbert J. Bernstein (yaya@bernstein-plus-sons.com) # # # -# (C) Copyright 2006 - 2020 Herbert J. Bernstein # +# (C) Copyright 2006 - 2021 Herbert J. Bernstein # # # ###################################################################### @@ -251,7 +251,7 @@ .DELETE_ON_ERROR: # Version string -VERSION = 0.9.6 +VERSION = 0.9.7 # # Directories @@ -265,7 +265,8 @@ BIN = $(ROOT)/bin SRC = $(ROOT)/src INCLUDE = $(ROOT)/include M4 = $(ROOT)/m4 -PYCBF = $(ROOT)/pycbf +PY2CBF = $(ROOT)/py2cbf +PY3CBF = $(ROOT)/pycbf EXAMPLES = $(ROOT)/examples TEMPLATES= $(ROOT)/templates DECTRIS_EXAMPLES = $(EXAMPLES)/dectris_cbf_template_test @@ -274,7 +275,6 @@ MINICBF_TEST = $(ROOT)/minicbf_test GRAPHICS = $(ROOT)/html_graphics DATADIRI = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Input DATADIRO = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output -DATADIRS = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only CBF_PREFIX ?= $(HOME) # @@ -289,6 +289,19 @@ CBFLIB_DONT_USE_LZ4?=no CBFLIB_DONT_USE_BSHUF?=no +CBFLIB_DONT_USE_LOCAL_NUWEB ?= no +ifeq ($(CBFLIB_DONT_USE_LOCAL_NUWEB),yes) +NUWEB=nuweb +NUWEB_DEP= +NUWEB_DEP2= +else +NUWEB=$(BIN)/nuweb +NUWEB_DEP=nuweb-1.60 +NUWEB_DEP2=$(BIN)/nuweb +endif + + + CBFLIB_DONT_HAVE_FGETLN ?= yes ifeq ($(CBFLIB_DONT_HAVE_FGETLN),yes) SRC_FGETLN = $(SRC)/fgetln.c @@ -297,15 +310,26 @@ SRC_FGETLN = endif -CBFLIB_DONT_USE_PYCIFRW ?= no -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) +CBFLIB_DONT_USE_PY2CIFRW ?= no +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) # -# Definitions to get versions of PyCifRW and PLY +# Definitions to get versions of python2 PyCifRW and PLY # -PYCIFRW ?= PyCifRW-4.1 -PLY = ply-3.2 -PYCIFRWFLAG = -DCBF_USE_PYCIFRW -PYCIFRW_PREFIX ?= $(HOME)/.local +PY2CIFRW ?= PyCifRW-4.1 +PY2PLY = ply-3.2 +PY2CIFRWFLAG = -DCBF_USE_PYCIFRW +PY2CIFRW_PREFIX ?= $(HOME)/.local +endif + +CBFLIB_DONT_USE_PY3CIFRW ?= no +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +# +# Definitions to get versions of python3 PyCifRW and PLY +# +PY3CIFRW ?= PyCifRW-4.3_rev_19Jun21 +PY3PLY = ply-3.11 +PY3CIFRWFLAG = -DCBF_USE_PYCIFRW +PY3CIFRW_PREFIX ?= $(HOME)/.local endif # @@ -322,13 +346,20 @@ TIFF_INSTALL = $(TIFF)_INSTALL ifneq ($(HDF5_PREFIX),) # already installed on system CBFLIB_DONT_USE_LOCAL_HDF5 = yes +HDF5CFLAGS=-DH5_USE_110_API endif ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes) HDF5_PREFIX ?= $(PWD) -HDF5 ?= hdf5-1.10.6 +HDF5 ?= hdf5-1.12.0 +#HDF5 ?= hdf5-1.10.6 #HDF5 = hdf5-1.8.18 #HDF5 = hdf5-1.10.5 +ifeq ($(HDF5),hdf5-1.12.0) +HDF5CFLAGS=-DH5_USE_110_API +else +HDF5CFLAGS= +endif HDF5dep = $(HDF5) HDF5_INSTALL = $(HDF5)_INSTALL ifneq ($(MSYS2),yes) @@ -379,7 +410,7 @@ ifneq ($(CBFLIB_DONT_USE_LZ4),yes) # Definitions to get a version of HDF5Plugin for LZ4 # ifneq ($(MSYS2),yes) -LZ4 ?= HDF5Plugin_14Aug20 +LZ4 ?= HDF5Plugin_5Jun21 else LZ4 ?= HDF5-External-Filter-Plugins endif @@ -430,9 +461,8 @@ endif # # Definition of python to use # -#PYTHON = python -PYTHON ?= python2 - +PYTHON2 ?= python2 +PYTHON3 ?= python3 # # Definitions to get a stable version of regex @@ -539,12 +569,6 @@ PYSWIG = swig -python # JSWIG = swig -java -# -# Program to generate LaTex and HTML program documentation -# - -NUWEB = nuweb - # # Compiler for Java # @@ -597,36 +621,55 @@ endif MISCFLAG = $(NOLLFLAG) $(ULPFLAG) # -# PYCBF definitions +# PY2CBF definitions # -PYCBFEXT = so -PYCBFBOPT = -PYCBFIOPT = +PY2CBFEXT = so +PY2CBFBOPT = +PY2CBFIOPT = SETUP_PY = setup.py INSTALLSETUP_PY = installsetup.py +# +# PY3CBF definitions +# +PY3CBFEXT = so +PY3CBFBOPT = +PY3CBFIOPT = +SETUP_PY = setup.py +INSTALLSETUP_PY = installsetup.py + + # # Set the compiler and flags # ######################################################### # -# Appropriate compiler definitions for Linux -# with gcc version 4.2 +# Appropriate compiler definitions for default (Linux) # ######################################################### CC = gcc C++ = g++ -CFLAGS = -g -O2 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing +ifneq ($(CBFDEBUG),) +CFLAGS = -g -O0 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing -DCBFDEBUG=1 $(HDF5CFLAGS) +else +CFLAGS = -g -O3 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing $(HDF5CFLAGS) +endif LDFLAGS = F90C = gfortran +#F90FLAGS = -g -fno-range-check -fallow-invalid-boz F90FLAGS = -g -fno-range-check F90LDFLAGS = SOCFLAGS = -fPIC SOLDFLAGS = -shared -Wl,-rpath,$(CBF_PREFIX)/lib JAVAINCLUDES = -I$(JDKDIR)/include -I$(JDKDIR)/include/linux -LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; -RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/lib:$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +ifeq ($(HDF5_PREFIX),) +LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/LIB:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +else +LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$(HDF5_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/LIB:$(HDF5_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +endif EXTRALIBS = -lm M4FLAGS = -Dfcb_bytes_in_rec=131072 TIME = time @@ -641,18 +684,24 @@ endif DATAURLBASE = http://downloads.sf.net/cbflib/ DATAURLI = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Input.tar.gz DATAURLO = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output.tar.gz -DATAURLS = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz # # URLs from which to retrieve needed external package snapshots # -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWURL = http://downloads.sf.net/cbflib/$(PYCIFRW).tar.gz -PLYURL = http://www.dabeaz.com/ply/$(PLY).tar.gz +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2CIFRWURL = http://downloads.sf.net/cbflib/$(PY2CIFRW).tar.gz +PY2PLYURL = http://www.dabeaz.com/ply/$(PY2PLY).tar.gz +endif +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3CIFRWURL = http://downloads.sf.net/cbflib/$(PY3CIFRW).tar.gz +PY3PLYURL = http://downloads.sf.net/cbflib/$(PY3PLY).tar.gz endif REGEX_URL ?= http://downloads.sf.net/cbflib/$(REGEX).tar.gz TIFF_URL ?= http://downloads.sf.net/cbflib/$(TIFF).tar.gz HDF5_URL ?= http://downloads.sf.net/cbflib/$(HDF5).tar.gz +ifneq ($(CBFLIB_DONT_USE_LOCAL_NUWEB),yes) +NUWEB_URL ?= http://downloads.sf.net/cbflib/$(NUWEB_DEP).tar.gz +endif ifneq ($(MSYS2),yes) LZ4_URL = http://downloads.sf.net/cbflib/$(LZ4).tar.gz else @@ -669,10 +718,11 @@ INCLUDES = -I$(INCLUDE) -I$(SRC) $(HDF5include) # # runtime library path export commands # -RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export LD_LIBRARY_PATH; \ - DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export DYLD_LIBRARY_PATH; \ - LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib;export LD_RUN_PATH; - +ifeq ($(HDF5_PREFIX),) +RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export LD_LIBRARY_PATH; DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export DYLD_LIBRARY_PATH; LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib;export LD_RUN_PATH; +else +RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib:$(HDF5_PREFIX)/lib;export LD_LIBRARY_PATH; DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib:$(HDF5_PREFIX)/lib;export DYLD_LIBRARY_PATH; LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib:$(HDF5_PREFIX)/lib;export LD_RUN_PATH; +endif ###################################################################### # You should not need to make modifications below this line # @@ -754,8 +804,15 @@ SOURCE = $(SRC)/cbf.c \ $(SRC)/img.c \ $(SRC_FGETLN) $(SRC_REALPATH) -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYSOURCE = $(SRC)/drel_lex.py \ +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2SOURCE = $(SRC)/drel_lex.py \ + $(SRC)/drel_yacc.py \ + $(SRC)/drelc.py \ + $(SRC)/drel_prep.py +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3SOURCE = $(SRC)/drel_lex.py \ $(SRC)/drel_yacc.py \ $(SRC)/drelc.py \ $(SRC)/drel_prep.py @@ -872,6 +929,26 @@ default: @echo ' ' @echo ' $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(PYCIFRWFLAG)' @echo ' ' + @echo ' If you have changed any of the nuweb .w input files, you will need' + @echo ' need nuweb installed, check that CBFLIB_DONT_USE_LOCAL_NUWEB,' + @echo ' and NUWEB are defined correctly :' + @echo ' ' + @echo ' The current values are:' + @echo ' ' + @echo ' CBFLIB_DONT_USE_LOCAL_NUWEB = $(CBFLIB_DONT_USE_LOCAL_NUWEB)' + @echo ' NUWEB = $(NUWEB)' + @echo ' NUWEB_DEP = $(NUWEB_DEP)' + @echo ' NUWEB_DEP2 = $(NUWEB_DEP2)' + @echo ' ' + @echo ' You will need either a system HDF5 1.12 or it to be installed here.' + @echo ' Check that CBFLIB_DONT_USE_LOCAL_HDF5 and HDF5 are defined correctly :' + @echo ' ' + @echo ' The current values are:' + @echo ' ' + @echo ' CBFLIB_DONT_USE_LOCAL_HDF5 = $(CBFLIB_DONT_USE_LOCAL_HDF5)' + @echo ' HDF5 = $(HDF5)' + @echo ' HDF5_PREFIX = $(HDF5_PREFIX)' + @echo ' ' @echo ' Before installing the CBF library and example programs, check' @echo ' that the install directory is correct:' @echo ' ' @@ -903,20 +980,10 @@ default: @echo ' The tests assume that several data files are in the directories' @echo ' $(DATADIRI) and $(DATADIRO)' @echo ' ' - @echo ' Alternatively tests can be run comparing MD5 signatures only by' - @echo ' ' - @echo ' make tests_sigs_only' - @echo ' ' - @echo ' These signature only tests save space and download time by' - @echo ' assuming that input data files and the output signatures' - @echo ' are in the directories' - @echo ' $(DATADIRI) and $(DATADIRS)' - @echo ' ' @echo ' These directory can be obtained from' @echo ' ' @echo ' $(DATAURLI) ' @echo ' $(DATAURLO) ' - @echo ' $(DATAURLS) ' @echo ' ' @echo ' To clean up the directories type:' @echo ' ' @@ -932,10 +999,16 @@ default: # # Compile the library and examples # -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEPS = $(PYCIFRW) $(PLY) +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2CIFRWDEPS = $(PY2CIFRW) $(PY2PLY) else -PYCIFRWDEPS = +PY2CIFRWDEPS = +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3CIFRWDEPS = $(PY3CIFRW) $(PY3PLY) +else +PY3CIFRWDEPS = endif ifneq ($(CBFLIB_DONT_USE_LZ4),yes) @@ -955,7 +1028,8 @@ all:: $(BIN) $(SOURCE) $(F90SOURCE) $(HEADERS) \ $(HDF5) \ $(LZ4DEPS) \ $(BSHUFDEPS) \ - $(PYCIFRWDEPS) \ + $(PY2CIFRWDEPS) \ + $(PY3CIFRWDEPS) \ symlinksdone \ $(REGEXDEP) \ $(LIB) \ @@ -997,92 +1071,101 @@ shared: $(SOLIB)/libcbf.so $(SOLIB)/libfcb.so $(SOLIB)/libimg.so javawrapper: shared $(JCBF) $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEF = -Dcbf_use_pycifrw=yes +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2CIFRWDEF = -Dcbf_use_py2cifrw=yes else -PYCIFRWDEF = +PY2CIFRWDEF = +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3CIFRWDEF = -Dcbf_use_py3cifrw=yes +else +PY3CIFRWDEF = endif -Makefiles: Makefile \ - Makefile_LINUX \ - Makefile_LINUX_64 \ +Makefiles: \ + Makefile \ + Makefile_LINUX \ + Makefile_OSX \ + Makefile_MINGW \ + Makefile_MSYS2 + +Makefiles_pre_0.9.7: \ + Makefile_LINUX_64 \ Makefile_LINUX_gcc42 \ Makefile_LINUX_DMALLOC \ Makefile_LINUX_gcc42_DMALLOC \ - Makefile_OSX \ Makefile_OSX_gcc42 \ Makefile_OSX_gcc42_DMALLOC \ - Makefile_AIX \ - Makefile_MINGW \ - Makefile_MSYS2 \ + Makefile_AIX \ Makefile_IRIX_gcc Makefile_LINUX: $(M4)/Makefile.m4 -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX $(M4)/Makefile.m4 > Makefile_LINUX.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX $(M4)/Makefile.m4 > Makefile_LINUX.tmp mv Makefile_LINUX.tmp Makefile_LINUX Makefile_LINUX_DMALLOC: $(M4)/Makefile.m4 -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_DMALLOC.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_DMALLOC.tmp mv Makefile_LINUX_DMALLOC.tmp Makefile_LINUX_DMALLOC Makefile_LINUX_64: $(M4)/Makefile.m4 -cp Makefile_LINUX_64 Makefile_LINUX_64_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_64 $(M4)/Makefile.m4 > Makefile_LINUX_64.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_64 $(M4)/Makefile.m4 > Makefile_LINUX_64.tmp mv Makefile_LINUX_64.tmp Makefile_LINUX_64 Makefile_LINUX_gcc42: $(M4)/Makefile.m4 -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42 $(M4)/Makefile.m4 > Makefile_LINUX_gcc42.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_gcc42 $(M4)/Makefile.m4 > Makefile_LINUX_gcc42.tmp mv Makefile_LINUX_gcc42.tmp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_DMALLOC: $(M4)/Makefile.m4 -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_gcc42_DMALLOC.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_gcc42_DMALLOC.tmp mv Makefile_LINUX_gcc42_DMALLOC.tmp Makefile_LINUX_gcc42_DMALLOC Makefile_OSX: $(M4)/Makefile.m4 -cp Makefile_OSX Makefile_OSX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX $(M4)/Makefile.m4 > Makefile_OSX.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=OSX $(M4)/Makefile.m4 > Makefile_OSX.tmp mv Makefile_OSX.tmp Makefile_OSX Makefile_OSX_gcc42: $(M4)/Makefile.m4 -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42 $(M4)/Makefile.m4 > Makefile_OSX_gcc42.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=OSX_gcc42 $(M4)/Makefile.m4 > Makefile_OSX_gcc42.tmp mv Makefile_OSX_gcc42.tmp Makefile_OSX_gcc42 Makefile_OSX_gcc42_DMALLOC: $(M4)/Makefile.m4 -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_OSX_gcc42_DMALLOC.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=OSX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_OSX_gcc42_DMALLOC.tmp mv Makefile_OSX_gcc42_DMALLOC.tmp Makefile_OSX_gcc42_DMALLOC Makefile_AIX: $(M4)/Makefile.m4 -cp Makefile_AIX Makefile_AIX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=AIX $(M4)/Makefile.m4 > Makefile_AIX.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=AIX $(M4)/Makefile.m4 > Makefile_AIX.tmp mv Makefile_AIX.tmp Makefile_AIX Makefile_MINGW: $(M4)/Makefile.m4 -cp Makefile_MINGW Makefile_MINGW_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MINGW $(M4)/Makefile.m4 > Makefile_MINGW.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=MINGW $(M4)/Makefile.m4 > Makefile_MINGW.tmp mv Makefile_MINGW.tmp Makefile_MINGW Makefile_MSYS2: $(M4)/Makefile.m4 -cp Makefile_MSYS2 Makefile_MSYS2_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MSYS2 $(M4)/Makefile.m4 > Makefile_MSYS2.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=MSYS2 $(M4)/Makefile.m4 > Makefile_MSYS2.tmp mv Makefile_MSYS2.tmp Makefile_MSYS2 Makefile_IRIX_gcc: $(M4)/Makefile.m4 -cp Makefile_IRIX_gcc Makefile_IRIX_gcc_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=IRIX_gcc $(M4)/Makefile.m4 > Makefile_IRIX_gcc.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=IRIX_gcc $(M4)/Makefile.m4 > Makefile_IRIX_gcc.tmp mv Makefile_IRIX_gcc.tmp Makefile_IRIX_gcc Makefile: $(M4)/Makefile.m4 -cp Makefile Makefile_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=default $(M4)/Makefile.m4 > Makefile.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=default $(M4)/Makefile.m4 > Makefile.tmp mv Makefile.tmp Makefile cbflib.ini: $(M4)/Makefile.m4 @@ -1098,12 +1181,12 @@ symlinksdone: ./.symlinks $(SLFLAGS) touch symlinksdone -install: baseinstall pycbfinstall \ +install: baseinstall py2cbfinstall py3cbfinstall \ $(HDF5_INSTALL) \ $(TIFF_INSTALL) \ $(REGEX_INSTALL) -userinstall: baseinstall pycbfuserinstall \ +userinstall: baseinstall py2cbfuserinstall py3cbfuserinstall \ $(HDF5_INSTALL) \ $(TIFF_INSTALL) \ $(REGEX_INSTALL) @@ -1235,38 +1318,96 @@ endif chmod 755 $(CBF_PREFIX)/bin/batch_convert_minicbf.sh chmod 644 $(CBF_PREFIX)/include/cbflib/*.h -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -# -# PyCifRW -# -build_pycifrw: $(M4)/Makefile.m4 - touch build_pycifrw -$(PYCIFRW): build_pycifrw - -rm -rf $(PYCIFRW) - -rm -rf $(PYCIFRW).tar.gz - $(DOWNLOAD) $(PYCIFRWURL) - tar -xvf $(PYCIFRW).tar.gz - -rm $(PYCIFRW).tar.gz - (cd $(PYCIFRW); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +# +# Py2CifRW +# +build_py2cifrw: $(M4)/Makefile.m4 + touch build_py2cifrw +$(PY2CIFRW): build_py2cifrw + -rm -rf $(PY2CIFRW) + -rm -rf $(PY2CIFRW).tar.gz + $(DOWNLOAD) $(PY2CIFRWURL) + tar -xvf $(PY2CIFRW).tar.gz + -rm $(PY2CIFRW).tar.gz + (cd $(PY2CIFRW); \ + PYTHONPATH=$(PY2CIFRW_PREFIX)/lib/python:$(PY2CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON2) setup.py install --prefix= --home=$(PY2CIFRW_PREFIX) ) + +# +# PY2PLY +# +build_py2ply: $(M4)/Makefile.m4 + touch build_py2ply +$(PY2PLY): build_py2ply + -rm -rf $(PY2PLY) + -rm -rf $(PY2PLY).tar.gz + $(DOWNLOAD) $(PY2PLYURL) + tar -xvf $(PY2PLY).tar.gz + -rm $(PY2PLY).tar.gz + (cd $(PY2PLY); \ + PYTHONPATH=$(PY2CIFRW_PREFIX)/lib/python:$(PY2CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON2) setup.py install --prefix= --home=$(PY2CIFRW_PREFIX) ) +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +# +# Py3CifRW +# +build_py3cifrw: $(M4)/Makefile.m4 + touch build_py3cifrw +$(PY3CIFRW): build_py3cifrw + -rm -rf $(PY3CIFRW) + -rm -rf $(PY3CIFRW).tar.gz + $(DOWNLOAD) $(PY3CIFRWURL) + tar -xvf $(PY3CIFRW).tar.gz + -rm $(PY3CIFRW).tar.gz + (cd $(PY3CIFRW); \ + PYTHONPATH=$(PY3CIFRW_PREFIX)/lib/python:$(PY3CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON3) setup.py install --prefix= --home=$(PY3CIFRW_PREFIX) ) + +# +# PY3PLY +# +build_py3ply: $(M4)/Makefile.m4 + touch build_py3ply +$(PY3PLY): build_py3ply + -rm -rf $(PY3PLY) + -rm -rf $(PY3PLY).tar.gz + $(DOWNLOAD) $(PY3PLYURL) + tar -xvf $(PY3PLY).tar.gz + -rm $(PY3PLY).tar.gz + (cd $(PY3PLY); \ + PYTHONPATH=$(PY3CIFRW_PREFIX)/lib/python:$(PY3CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON3) setup.py install --prefix= --home=$(PY3CIFRW_PREFIX) ) +endif + # -# PLY +# NUWEB # -build_ply: $(M4)/Makefile.m4 - touch build_ply -$(PLY): build_ply - -rm -rf $(PLY) - -rm -rf $(PLY).tar.gz - $(DOWNLOAD) $(PLYURL) - tar -xvf $(PLY).tar.gz - -rm $(PLY).tar.gz - (cd $(PLY); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) +ifneq ($(NUWEB_DEP),'') +$(NUWEB_DEP): + -rm -rf $(NUWEB_DEP) + -rm -rf $(NUWEB_DEP).tar.gz + $(DOWNLOAD) $(NUWEB_URL) + tar -xvf $(NUWEB_DEP).tar.gz + touch $(NUWEB_DEP) + rm $(NUWEB_DEP).tar.gz + +$(NUWEB_DEP2): $(NUWEB_DEP) + (cd $(NUWEB_DEP); make nuweb; cp nuweb $(NUWEB_DEP2)) endif + # # REGEX # @@ -1366,7 +1507,7 @@ ifneq ($(MSYS2),yes) tar -xvf $(LZ4).tar.gz -rm $(LZ4).tar.gz (cp $(LZ4include)/lz4.h $(INCLUDE); \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/lz4.c -o lz4.o; \ + $(CC) $(CFLAGS) $(SOWCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/lz4.c -o lz4.o; \ $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/h5zlz4.c -o h5zlz4.o; \ $(CC) -shared lz4.o h5zlz4.o -o $(SOLIB)/libh5zlz4.so; \ rm lz4.o h5zlz4.o) @@ -1563,53 +1704,149 @@ endif # # Python bindings # -$(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ - $(PYCBF)/$(SETUP_PY) \ - $(PYCBF)/pycbf.i \ - $(PYCBF)/cbfhandlewrappers.i \ - $(PYCBF)/cbfdetectorwrappers.i \ - $(PYCBF)/cbfgenericwrappers.i \ - $(PYCBF)/cbfgoniometerwrappers.i + +$(PY2CBF)/make_pycbf.py: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/make_pycbf.w + (cd $(PY2CBF); $(NUWEB) make_pycbf.w) + +$(PY2CBF)/pycbf.i: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf_i.w + (cd $(PY2CBF); $(NUWEB) pycbf_i.w) + +$(PY2CBF)/py2setup_py.m4 \ +$(PY2CBF)/win32.bat \ +$(PY2CBF)/linux.sh \ +$(PY2CBF)/makeflatascii.py \ +$(PY2CBF)/pycbf_test1.py \ +$(PY2CBF)/pycbf_test2.py \ +$(PY2CBF)/pycbf_test3.py \ +$(PY2CBF)/pycbf_test4.py \ +$(PY2CBF)/pycbf_testfelaxes.py \ +$(PY2CBF)/xmas/readmarheader.py \ +$(PY2CBF)/xmas/xmasheaders.py \ +$(PY2CBF)/xmas/xmas_cif_template.cif : $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w + (cd $(PY2CBF); $(NUWEB) pycbf.w) + touch $(PY2CBF)/py2setup_py.m4 + +$(PY2CBF)/_py2cbf.$(PY2CBFEXT): $(PY2CBF) shared \ + $(PY2CBF)/py2setup.py \ + $(PY2CBF)/pycbf.i \ + $(PY2CBF)/cbfhandlewrappers.i \ + $(PY2CBF)/cbfdetectorwrappers.i \ + $(PY2CBF)/cbfgenericwrappers.i \ + $(PY2CBF)/cbfgoniometerwrappers.i -cp $(SOLIB)/*.so $(LIB) - (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) + (cd $(PY2CBF); $(PYTHON2) py2setup.py build $(PY2CBFBOPT); cp build/lib*/_py2cbf*.$(PY2CBFEXT) .) -$(PYCBF)/pycbfinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --prefix=$(CBF_PREFIX)) +$(PY2CBF)/py2cbfinstall: $(PY2CBF)/pycbf.py + (cd $(PY2CBF); $(PYTHON2) $(INSTALLSETUP_PY) install $(PY2CBFIOPT) --prefix=$(CBF_PREFIX)) -$(PYCBF)/pycbfuserinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --user) +$(PY2CBF)/py2cbfuserinstall: $(PY2CBF)/pycbf.py + (cd $(PY2CBF); $(PYTHON2) $(INSTALLSETUP_PY) install $(PY2CBFIOPT) --user) -$(PYCBF)/setup.py: $(M4)/setup_py.m4 +$(PY2CBF)/py2setup.py: $(PY2CBF)/py2setup_py.m4 + echo m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ + -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ + $(PY2CBF)/py2setup_py.m4 (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) + $(PY2CBF)/py2setup_py.m4 > $@) -$(PYCBF)/setup_MINGW.py: m4/setup_py.m4 +$(PY2CBF)/py2setup_MINGW.py: $(PY2CBF)/setup_py.m4 (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) + $(PY2CBF)/py2setup_py.m4 > $@) -$(LIB)/_pycbf.$(PYCBFEXT): $(PYCBF)/_pycbf.$(PYCBFEXT) +$(LIB)/_py2cbf.$(PY2CBFEXT): $(PY2CBF)/_py2cbf.$(PY2CBFEXT) mkdir -p $(LIB) - cp $(PYCBF)/_pycbf.$(PYCBFEXT) $(LIB)/_pycbf.$(PYCBFEXT) + cp $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(LIB)/_py2cbf.$(PY2CBFEXT) -$(PYCBF)/pycbf.pdf: $(PYCBF)/pycbf.w - (cd $(PYCBF); \ +$(PY2CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w + (cd $(PY2CBF); \ $(NUWEB) pycbf; \ latex pycbf; \ $(NUWEB) pycbf; \ latex pycbf; \ dvipdfm pycbf ) -$(PYCBF)/CBFlib.txt: $(DOC)/CBFlib.html - links -dump $(DOC)/CBFlib.html > $(PYCBF)/CBFlib.txt +$(PY2CBF)/CBFlib.txt: $(DOC)/CBFlib.html + links -dump $(DOC)/CBFlib.html > $(PY2CBF)/CBFlib.txt + +$(PY2CBF)/pycbf.py: $(PY2CBF)/pycbf.pdf $(PY2CBF)/cbfdetectorwrappers.i \ + $(PY2CBF)/cbfgenericwrappers.i \ + $(PY2CBF)/cbfgoniometerwrappers.i \ + $(PY2CBF)/CBFlib.txt $(PY2CBF)/make_pycbf.py + (cd $(PY2CBF); $(PYTHON2) make_pycbf.py; $(PYSWIG) -module py2cbf pycbf.i; \ + $(PYTHON2) py2setup.py build; mv pycbf.py rawpycbf.py; \ + cat rawpycbf.py | sed "s/ _pycbf/ _py2cbf/" > pycbf.py ) + +$(PY3CBF)/make_pycbf.py: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/make_pycbf.w + (cd $(PY3CBF); $(NUWEB) make_pycbf.w) + +$(PY3CBF)/pycbf.i: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf_i.w + (cd $(PY3CBF); $(NUWEB) pycbf_i.w) + +$(PY3CBF)/py3setup_py.m4 \ +$(PY3CBF)/win32.bat \ +$(PY3CBF)/linux.sh \ +$(PY3CBF)/makeflatascii.py \ +$(PY3CBF)/pycbf_test1.py \ +$(PY3CBF)/pycbf_test2.py \ +$(PY3CBF)/pycbf_test3.py \ +$(PY3CBF)/pycbf_test4.py \ +$(PY3CBF)/pycbf_testfelaxes.py \ +$(PY3CBF)/xmas/readmarheader.py \ +$(PY3CBF)/xmas/xmasheaders.py \ +$(PY3CBF)/xmas/xmas_cif_template.cif: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w + (cd $(PY3CBF); $(NUWEB) pycbf.w ) + touch $(PY3CBF)/py3setup_py.m4 + +$(PY3CBF)/_pycbf.$(PY3CBFEXT): $(PY3CBF) shared \ + $(PY3CBF)/py3setup.py \ + $(PY3CBF)/pycbf.i \ + $(PY3CBF)/cbfhandlewrappers.i \ + $(PY3CBF)/cbfdetectorwrappers.i \ + $(PY3CBF)/cbfgenericwrappers.i \ + $(PY3CBF)/cbfgoniometerwrappers.i + -cp $(SOLIB)/*.so $(LIB) + (cd $(PY3CBF); $(PYTHON3) py3setup.py build $(PY3CBFBOPT); cp build/lib*/_pycbf*.$(PY3CBFEXT) .) + +$(PY3CBF)/py3cbfinstall: $(PY3CBF)/pycbf.py + (cd $(PY3CBF); $(PYTHON3) $(INSTALLSETUP_PY) install $(PY3CBFIOPT) --prefix=$(CBF_PREFIX)) -$(PYCBF)/cbfhandlewrappers.i \ -$(PYCBF)/cbfdetectorwrappers.i \ -$(PYCBF)/cbfgenericwrappers.i \ -$(PYCBF)/cbfgoniometerwrappers.i: $(PYCBF)/CBFlib.txt $(PYCBF)/make_pycbf.py - (cd $(PYCBF); $(PYTHON) make_pycbf.py; $(PYSWIG) pycbf.i; $(PYTHON) setup.py build) +$(PY3CBF)/py3cbfuserinstall: $(PY3CBF)/pycbf.py + (cd $(PY3CBF); $(PYTHON3) $(INSTALLSETUP_PY) install $(PY3CBFIOPT) --user) + +$(PY3CBF)/py3setup.py: $(PY3CBF)/py3setup_py.m4 + (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ + -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ + $(PY3CBF)/py3setup_py.m4 > $@) + +$(PY3CBF)/py3setup_MINGW.py: $(PY3CBF)/py3setup_py.m4 + (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ + -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ + $(PY3CBF)/py3setup_py.m4 > $@) + +$(LIB)/_pycbf.$(PY3CBFEXT): $(PY3CBF)/_pycbf.$(PY3CBFEXT) + mkdir -p $(LIB) + cp $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(LIB)/_pycbf.$(PY3CBFEXT) + +$(PY3CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w + (cd $(PY3CBF); \ + $(NUWEB) pycbf; \ + latex pycbf; \ + $(NUWEB) pycbf; \ + latex pycbf; \ + dvipdfm pycbf ) + +$(PY3CBF)/CBFlib.txt: $(DOC)/CBFlib.html + links -dump $(DOC)/CBFlib.html > $(PY3CBF)/CBFlib.txt +$(PY3CBF)/pycbf.py: $(PY3CBF)/pycbf.pdf $(PY3CBF)/cbfdetectorwrappers.i \ + $(PY3CBF)/cbfgenericwrappers.i \ + $(PY3CBF)/cbfgoniometerwrappers.i \ + $(PY3CBF)/CBFlib.txt $(PY3CBF)/make_pycbf.py + (cd $(PY3CBF); $(PYTHON3) make_pycbf.py; $(PYSWIG) pycbf.i; \ + $(PYTHON3) py3setup.py build; mv pycbf.py rawpycbf.py; \ + echo "# coding=utf-8" | cat - rawpycbf.py > pycbf.py) # # Java bindings @@ -1824,11 +2061,11 @@ $(BIN)/sequence_match: $(LIB)/libcbf.a $(EXAMPLES)/sequence_match.c $(LIB)/libim # # tiff2cbf example program # -$(BIN)/tiff2cbf: $(LIB)/libcbf.a $(EXAMPLES)/tiff2cbf.c \ +$(BIN)/tiff2cbf: $(LIB)/libcbf.a $(EXAMPLES)/tiff2cbf.c $(EXAMPLES)/tif_sprint.c \ $(GOPTLIB) $(GOPTINC) $(TIFF) mkdir -p $(BIN) $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - -I$(TIFF)/libtiff $(EXAMPLES)/tiff2cbf.c $(GOPTLIB) -L$(LIB) \ + -I$(TIFF)/libtiff $(EXAMPLES)/tiff2cbf.c $(EXAMPLES)/tif_sprint.c $(GOPTLIB) -L$(LIB) \ -lcbf -L$(TIFF_PREFIX)/lib -ltiff $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ # @@ -1970,13 +2207,6 @@ $(DATADIRO): $(M4)/Makefile.m4 touch $(DATADIRO) -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output.tar.gz) -$(DATADIRS): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLS)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - touch $(DATADIRS) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - - # Input Data Files TESTINPUT_BASIC = example.mar2300 @@ -2026,31 +2256,48 @@ TESTOUTPUT = adscconverted_flat_orig.cbf \ adscconverted_orig.cbf converted_flat_orig.cbf converted_orig.cbf \ insulin_pilatus6mconverted_orig.cbf.h5.cbf \ insulin_pilatus6mconverted_orig.cbf.h5 \ + insulin_pilatus6mconverted_orig.cbf \ insulin_pilatus6mconverted_v2_orig.cbf \ mb_LP_1_001_orig.cbf testcell_orig.prt \ test_xds_bin_testflatout_orig.out \ test_xds_bin_testflatpackedout_orig.out test_fcb_read_testflatout_orig.out \ test_fcb_read_testflatpackedout_orig.out \ XRD1621_orig.cbf XRD1621_I4encbC100_orig.cbf \ - minicbf_orig.h5 + minicbf_orig.h5 \ + pycbf_test1_orig.out \ + pycbf_test2_orig.out \ + pycbf_test3_orig.out \ + pycbf_test4_orig.out \ + fel_test1_orig.out \ + fel_test2_orig.out \ + fel_test3_orig.out NEWTESTOUTPUT = adscconverted_flat.cbf \ adscconverted.cbf converted_flat.cbf converted.cbf \ insulin_pilatus6mconverted.cbf \ insulin_pilatus6mconverted.cbf.h5 \ insulin_pilatus6mconverted.cbf.h5.cbf \ + insulin_pilatus6mconverted_orig.cbf \ insulin_pilatus6mconverted_v2.cbf \ mb_LP_1_001.cbf testcell.prt \ test_xds_bin_testflatout.out \ test_xds_bin_testflatpackedout.out test_fcb_read_testflatout.out \ test_fcb_read_testflatpackedout.out \ XRD1621.cbf XRD1621_I4encbC100.cbf \ - $(MINICBF_TEST)/minicbf.h5 + $(MINICBF_TEST)/minicbf.h5 \ + pycbf_test1.out \ + pycbf_test2.out \ + pycbf_test3.out \ + pycbf_test4.out \ + fel_test1.out \ + fel_test2.out \ + fel_test3.out DATADIRO_OUTPUT = $(DATADIRO)/adscconverted_flat_orig.cbf \ $(DATADIRO)/adscconverted_orig.cbf \ $(DATADIRO)/converted_flat_orig.cbf \ $(DATADIRO)/converted_orig.cbf \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5 \ + $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf \ $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf \ $(DATADIRO)/mb_LP_1_001_orig.cbf \ $(DATADIRO)/testcell_orig.prt \ @@ -2067,6 +2314,7 @@ DATADIRO_OUTPUT_SIGNATURES = $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) \ $(DATADIRO)/converted_orig.cbf$(SEXT) \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ + $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf$(SEXT) \ $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) \ $(DATADIRO)/testcell_orig.prt$(SEXT) \ @@ -2086,6 +2334,7 @@ TESTOUTPUTSIGS = adscconverted_flat_orig.cbf$(SEXT) \ adscconverted_orig.cbf$(SEXT) converted_flat_orig.cbf$(SEXT) converted_orig.cbf$(SEXT) \ insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ + insulin_pilatus6mconverted_orig.cbf$(SEXT) \ insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ mb_LP_1_001_orig.cbf$(SEXT) testcell_orig.prt$(SEXT) \ test_xds_bin_testflatout_orig.out$(SEXT) \ @@ -2093,13 +2342,21 @@ TESTOUTPUTSIGS = adscconverted_flat_orig.cbf$(SEXT) \ test_fcb_read_testflatpackedout_orig.out$(SEXT) \ XRD1621_orig.cbf$(SEXT) \ XRD1621_I4encbC100_orig.cbf$(SEXT) \ - minicbf_orig.h5$(SEXT) + minicbf_orig.h5$(SEXT) \ + pycbf_test1_orig.out$(SEXT) \ + pycbf_test2_orig.out$(SEXT) \ + pycbf_test3_orig.out$(SEXT) \ + pycbf_test4_orig.out$(SEXT) \ + fel_test1_orig.out$(SEXT) \ + fel_test2_orig.out$(SEXT) \ + fel_test3_orig.out$(SEXT) DATADIRS_OUTPUT_SIGNATURES = $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) \ $(DATADIRS)/adscconverted_orig.cbf$(SEXT) \ $(DATADIRS)/converted_flat_orig.cbf$(SEXT) \ $(DATADIRS)/converted_orig.cbf$(SEXT) \ $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ + $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf$(SEXT) \ $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) \ $(DATADIRS)/testcell_orig.prt$(SEXT) \ @@ -2109,7 +2366,14 @@ DATADIRS_OUTPUT_SIGNATURES = $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) \ $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \ $(DATADIRS)/XRD1621_orig.cbf$(SEXT) \ $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) \ - $(DATADIRS)/minicbf_orig.h5$(SEXT) + $(DATADIRS)/minicbf_orig.h5$(SEXT) \ + $(DATADIRS)/pycbf_test1_orig.out$(SEXT) \ + $(DATADIRS)/pycbf_test2_orig.out$(SEXT) \ + $(DATADIRS)/pycbf_test3_orig.out$(SEXT) \ + $(DATADIRS)/pycbf_test4_orig.out$(SEXT) \ + $(DATADIRS)/fel_test1_orig.out$(SEXT) \ + $(DATADIRS)/fel_test2_orig.out$(SEXT) \ + $(DATADIRS)/fel_test3_orig.out$(SEXT) # Fetch Input Data Files @@ -2131,20 +2395,13 @@ $(TESTOUTPUT): $(DATADIRO) $(DATADIRO_OUTPUT) $(DATADIRO_OUTPUT_SIGNATURES) cp $(DATADIRO)/$@$(SEXT) $@$(SEXT) -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) -# Fetch Output Data File Signatures - -$(TESTOUTPUTSIGS): $(DATADIRS) $(DATADIRS_OUTPUT_SIGNATURES) - cp $(DATADIRS)/$@ $@ - - # # Tests # -tests: all $(LIB) $(BIN) symlinksdone basic extra dectristests pycbftests -tests_sigs_only: $(LIB) $(BIN) symlinksdone basic extra_sigs_only +tests: all $(LIB) $(BIN) symlinksdone basic extra dectristests py2cbftests py3cbftests restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) $(SIGNATURE) < adscconverted.cbf > $(DATADIRO)/adscconverted_orig.cbf$(SEXT) @@ -2162,6 +2419,13 @@ restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 $(SIGNATURE) < XRD1621.cbf > $(DATADIRO)/XRD1621_orig.cbf$(SEXT) $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRO)/minicbf_orig.h5$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test1.out > $(DATADIRO)/pycbf_test1_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test2.out > $(DATADIRO)/pycbf_test2_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test3.out > $(DATADIRO)/pycbf_test3_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test4.out > $(DATADIRO)/pycbf_test4_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/fel_test1.out > $(DATADIRO)/fel_test1_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/fel_test2.out > $(DATADIRO)/fel_test2_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/fel_test3.out > $(DATADIRO)/fel_test3_orig.out$(SEXT) cp adscconverted_flat.cbf $(DATADIRO)/adscconverted_flat_orig.cbf$ cp adscconverted.cbf $(DATADIRO)/adscconverted_orig.cbf cp converted_flat.cbf $(DATADIRO)/converted_flat_orig.cbf @@ -2178,25 +2442,15 @@ restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 cp XRD1621.cbf $(DATADIRO)/XRD1621_orig.cbf cp XRD1621_I4encbC100.cbf $(DATADIRO)/XRD1621_I4encbC100_orig.cbf cp $(MINICBF_TEST)/minicbf.h5 $(DATADIRO)/minicbf_orig.h5 - -restore_sigs_only: $(NEWTESTOUTPUT) $(DATADIRS) - $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < adscconverted.cbf > $(DATADIRS)/adscconverted_orig.cbf$(SEXT) - $(SIGNATURE) < converted_flat.cbf > $(DATADIRS)/converted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < converted.cbf > $(DATADIRS)/converted_orig.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5 > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5.cbf > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) - $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) - $(SIGNATURE) < testcell.prt > $(DATADIRS)/testcell_orig.prt$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < XRD1621.cbf > $(DATADIRS)/XRD1621_orig.cbf$(SEXT) - $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) - $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRS)/minicbf_orig.h5$(SEXT) -restore_signatures: restore_output restore_sigs_only + cp $(PY2CBF)/pycbf_test1.out $(DATADIRO)/pycbf_test1_orig.out + cp $(PY2CBF)/pycbf_test2.out $(DATADIRO)/pycbf_test2_orig.out + cp $(PY2CBF)/pycbf_test3.out $(DATADIRO)/pycbf_test3_orig.out + cp $(PY2CBF)/pycbf_test4.out $(DATADIRO)/pycbf_test4_orig.out + cp $(PY2CBF)/fel_test1.out $(DATADIRO)/fel_test1_orig.out + cp $(PY2CBF)/fel_test2.out $(DATADIRO)/fel_test2_orig.out + cp $(PY2CBF)/fel_test3.out $(DATADIRO)/fel_test3_orig.out + +restore_signatures: restore_output # # Basic Tests @@ -2216,9 +2470,12 @@ basic: $(BIN)/makecbf $(BIN)/img2cif $(BIN)/cif2cbf $(TESTINPUT_BASIC) img2cif_canonical.cif cif2cbf_packed.cbf $(LDPREFIX) $(BIN)/cif2cbf -e none -c canonical \ img2cif_packed.cif cif2cbf_canonical.cbf - -cmp cif2cbf_packed.cbf makecbf.cbf - -cmp cif2cbf_packed.cbf img2cif_packed.cbf - -cmp cif2cbf_canonical.cbf img2cif_canonical.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_packed.cbf | diff -a - makecbf.cbf + #-cmp cif2cbf_packed.cbf makecbf.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_packed.cbf | diff -a - img2cif_packed.cbf + #-cmp cif2cbf_packed.cbf img2cif_packed.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_canonical.cbf | diff -a - img2cif_canonical.cbf + #-cmp cif2cbf_canonical.cbf img2cif_canonical.cbf # @@ -2257,21 +2514,27 @@ endif makecbf.cbf cif2cbf_ehcn.cif $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_encp.cbf | diff -a - makecbf.cbf $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf + -cat 9ins.cif |sed "1,1s/10/11/" | sed "2,2s/0.9.5/0.9.7/" | diff -a - 9ins.cbf + #-cmp 9ins.cif 9ins.cbf $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf -F example.mar2300 converted_flat.cbf - -cmp converted_flat.cbf converted_flat_orig.cbf + -cat converted_flat_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - converted_flat.cbf + #-cmp converted_flat.cbf converted_flat_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf example.mar2300 converted.cbf - -cmp converted.cbf converted_orig.cbf + -cat converted_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - converted.cbf + #-cmp converted.cbf converted_orig.cbf -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat > testcell.prt -cmp testcell.prt testcell_orig.prt $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -cmp adscconverted_flat.cbf adscconverted_flat_orig.cbf + -cat adscconverted_flat_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - adscconverted_flat.cbf + #-cmp adscconverted_flat.cbf adscconverted_flat_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -cmp adscconverted.cbf adscconverted_orig.cbf + -cat adscconverted_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - adscconverted.cbf + #-cmp adscconverted.cbf adscconverted_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -cmp mb_LP_1_001.cbf mb_LP_1_001_orig.cbf + -cat mb_LP_1_001_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - mb_LP_1_001.cbf + #-cmp mb_LP_1_001.cbf mb_LP_1_001_orig.cbf ifneq ($(CLEANTESTS),) mv mb_LP_1_001.cbf nmb_LP_1_001.cbf else @@ -2284,12 +2547,17 @@ ifneq ($(CLEANTESTS),) rm nmb_LP_1_001.img endif $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -cmp insulin_pilatus6mconverted.cbf insulin_pilatus6mconverted_rev_orig.cbf + -cat insulin_pilatus6mconverted_orig.cbf | sed "1,1s/1.7.6/1.7.11/" | sed "2,2s/0.9.3/0.9.7/" | diff -a - insulin_pilatus6mconverted.cbf + #-cmp insulin_pilatus6mconverted.cbf insulin_pilatus6mconverted_orig.cbf -$(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -cmp insulin_pilatus6mconverted_v2.cbf insulin_pilatus6mconverted_v2_orig.cbf + -cat insulin_pilatus6mconverted_v2_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - insulin_pilatus6mconverted_v2.cbf + #-cmp insulin_pilatus6mconverted_v2.cbf insulin_pilatus6mconverted_v2_orig.cbf (CBF_CONVERT_MINICBF_PATH=$(BIN); export CBF_CONVERT_MINICBF_PATH; \ $(LDPREFIX) $(EXAMPLES)/batch_convert_minicbf.sh "." "minicbf_test" \ "X4_lots_M1S4_1_*.cbf" $(TEMPLATES)/template_X4_lots_M1S4.cbf) +# +# Starting with insulin_pilatus6mconverted.cbf, create hdf5 files using opaque, encI, encp, encb, encc, encz +# -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ $(TIME) $(BIN)/cif2cbf -5 w -O $(HDF5REGISTER) -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted.cbf.h5) -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ @@ -2302,10 +2570,9 @@ endif $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cc -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encc.cbf.h5) -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cz -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encz.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cl -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encl.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -c2 -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5) +# +# check the default as hdf5 dumps +# -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ $(H5DUMP) insulin_pilatus6mconverted_orig.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted_orig.cbf.h5.dump) -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ @@ -2313,41 +2580,26 @@ endif -$(DIFF) insulin_pilatus6mconverted_orig.cbf.h5.dump insulin_pilatus6mconverted.cbf.h5.dump -rm -f insulin_pilatus6mconverted_orig.cbf.h5.dump -rm -f insulin_pilatus6mconverted.cbf.h5.dump - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_orig.cbf.h5.cbf -o insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf.h5 -o insulin_pilatus6mconverted.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted.cbf.h5.cbf -o insulin_pilatus6mconverted.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encp.cbf.h5 -o insulin_pilatus6mconverted_encp.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encp.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encb.cbf.h5 -o insulin_pilatus6mconverted_encb.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encb.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encI.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encI.cbf.h5.cbf -o insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encc.cbf.h5 -o insulin_pilatus6mconverted_encc.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encc.cbf.h5.cbf -o insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encz.cbf.h5 -o insulin_pilatus6mconverted_encz.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encz.cbf.h5.cbf -o insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encl.cbf.h5 -o insulin_pilatus6mconverted_encl.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encl.cbf.h5.cbf -o insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_enc2.cbf.h5 -o insulin_pilatus6mconverted_enc2.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_enc2.cbf.h5.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -rm -f insulin_pilatus6mconverted*.cbf.h5.eqcI.cbf +# +# Convert each of the non-opaque h5 files to encI cbfs and compare them +# + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encI.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + cp insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encp.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encb.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encc.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encz.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + $(LDPREFIX) $(TINE) $(BIN)/test_cbf_airy_disk $(LDPREFIX) $(TIME) $(BIN)/cbf_testxfelread $(LDPREFIX) $(TIME) $(BIN)/testalloc @@ -2376,14 +2628,18 @@ endif -cd $(MINICBF_TEST); $(DIFF) i19-1.dump i19-2.dump -cd $(MINICBF_TEST); $(DIFF) i19-1.cbf i19-2.cbf $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf + -cat testrealin.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - testrealout.cbf + #-cmp testrealin.cbf testrealout.cbf $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf + -cat testflatin.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - testflatout.cbf + #-cmp testflatin.cbf testflatout.cbf $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf + -cat testflatpackedin.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - testflatpackedout.cbf + #-cmp testflatpackedin.cbf testflatpackedout.cbf ifneq ($(F90C),) $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatout.out) - -$(DIFF) test_xds_bin_testflatout.out test_xds_bin_testflatout_orig.out + -cat test_xds_bin_testflatout_orig.out | sed "2,2s/0.9.6/0.9.7/" | $(DIFF) -a - test_xds_bin_testflatout.out + #-$(DIFF) test_xds_bin_testflatout.out test_xds_bin_testflatout_orig.out $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatpackedout.out) -$(DIFF) test_xds_bin_testflatpackedout.out test_xds_bin_testflatpackedout_orig.out $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatout.out) @@ -2393,109 +2649,59 @@ ifneq ($(F90C),) endif $(LDPREFIX) $(TIME) $(BIN)/sauter_test $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - -$(DIFF) XRD1621.cbf XRD1621_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(DIFF) XRD1621_I4encbC100.cbf XRD1621_I4encbC100_orig.cbf - -ifneq ($(F90C),) -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf \ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -else -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf\ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -endif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e hex -c none \ - makecbf.cbf cif2cbf_ehcn.cif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ - cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F example.mar2300 converted_flat.cbf - -$(SIGNATURE) < converted_flat.cbf | $(DIFF) - converted_flat_orig.cbf$(SEXT); rm converted_flat.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image example.mar2300 converted.cbf - -$(SIGNATURE) < converted.cbf | $(DIFF) - converted_orig.cbf$(SEXT); rm converted.cbf - -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat | \ - $(SIGNATURE) | $(DIFF) - testcell_orig.prt$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -$(SIGNATURE) < adscconverted_flat.cbf | $(DIFF) - adscconverted_flat_orig.cbf$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -$(SIGNATURE) < adscconverted.cbf | $(DIFF) - adscconverted_orig.cbf$(SEXT); rm adscconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -$(SIGNATURE) < mb_LP_1_001.cbf | $(DIFF) - mb_LP_1_001_orig.cbf$(SEXT) - mv mb_LP_1_001.cbf nmb_LP_1_001.cbf - $(LDPREFIX) $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf - -cmp nmb_LP_1_001.img mb_LP_1_001.img - rm nmb_LP_1_001.cbf - rm nmb_LP_1_001.img - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted.cbf | $(DIFF) - insulin_pilatus6mconverted_rev_orig.cbf$(SEXT); rm insulin_pilatus6mconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf | $(DIFF) - insulin_pilatus6mconverted_v2_orig.cbf$(SEXT); rm insulin_pilatus6mconverted_v2.cbf - $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf -ifneq ($(F90C),) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatpackedout_orig.out$(SEXT) -endif - $(LDPREFIX) $(TIME) $(BIN)/sauter_test - $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) + $(LDPREFIX) $(TIME) $(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf + -cat XRD1621_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - XRD1621.cbf + #-$(DIFF) XRD1621.cbf XRD1621_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(SIGNATURE) < XRD1621.cbf | $(DIFF) - XRD1621_orig.cbf$(SEXT); rm XRD1621.cbf - -$(SIGNATURE) < XRD1621_I4encbC100.cbf | $(DIFF) - XRD1621_I4encbC100_orig.cbf$(SEXT); rm XRD1621_I4encbC100.cbf - @-rm -f adscconverted_flat.cbf - @-rm -f $(TESTINPUT_BASIC) $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) - @-rm -f cif2cbf_packed.cbf makecbf.cbf \ - cif2cbf_packed.cbf img2cif_packed.cbf \ - cif2cbf_canonical.cbf img2cif_canonical.cbf - @-rm -f testrealout.cbf testflatout.cbf testflatpackedout.cbf \ - cif2cbf_encp.cbf img2cif_canonical.cif img2cif_packed.cif 9ins.cbf - + -cat XRD1621_I4encbC100_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - XRD1621_I4encbC100.cbf + #-$(DIFF) XRD1621_I4encbC100.cbf XRD1621_I4encbC100_orig.cbf -pycbftests: $(PYCBF)/_pycbf.$(PYCBFEXT) $(BIN)/cbf_standardize_numbers - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test1.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test2.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test3.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test4.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test1.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test2.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py ../hit-20140306005258847.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test1_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test1.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test2_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test2.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test3_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test3.out - - -pycbfinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfinstall - -pycbfuserinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfuserinstall +py2cbftests: $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(BIN)/cbf_standardize_numbers $(TESTOUTPUT) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test1.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test1.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test1.out $(ROOT)/pycbf_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test2.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test2.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test2.out $(ROOT)/pycbf_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test3.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test3.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test3.out $(ROOT)/pycbf_test3_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test4.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test4.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test4.out $(ROOT)/pycbf_test4_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_testfelaxes.py fel_test1.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) + -(cd $(PY2CBF); $(DIFF) fel_test1.out $(ROOT)/fel_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_testfelaxes.py fel_test2.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) + -(cd $(PY2CBF); $(DIFF) fel_test2.out $(ROOT)/fel_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_testfelaxes.py ../hit-20140306005258847.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) + -(cd $(PY2CBF); $(DIFF) fel_test3.out $(ROOT)/fel_test3_orig.out) + +py2cbfinstall: $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(PY2CBF)/py2cbfinstall + +py2cbfuserinstall: $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(PY2CBF)/py2cbfuserinstall + +py3cbftests: $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(BIN)/cbf_standardize_numbers $(TESTOUTPUT) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test1.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test1.out) + -(cd $(PY3CBF); grep -v "__builtins__" $(ROOT)/pycbf_test1_orig.out | \ + grep -v "__add__" | grep -v "Foundthebinary" > pycbf_test1_orig.out; \ + grep -v "__builtins__" pycbf_test1.out | \ + grep -v "__add__" | grep -v "Foundthebinary" |$(DIFF) - pycbf_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test2.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test2.out) + -(cd $(PY3CBF); $(DIFF) pycbf_test2.out $(ROOT)/pycbf_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test3.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test3.out) + -(cd $(PY3CBF); $(DIFF) pycbf_test3.out $(ROOT)/pycbf_test3_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test4.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test4.out) + -(cd $(PY3CBF); grep -v "__builtins__" $(ROOT)/pycbf_test4_orig.out | \ + grep -v "__add__" | grep -v "Foundthebinary" > pycbf_test4_orig.out; \ + grep -v "__builtins__" pycbf_test4.out | grep -v "__add__" | \ + grep -v "Foundthebinary" | $(DIFF) - pycbf_test4_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_testfelaxes.py fel_test1.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) + -(cd $(PY3CBF); $(DIFF) fel_test1.out $(ROOT)/fel_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_testfelaxes.py fel_test2.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) + -(cd $(PY3CBF); $(DIFF) fel_test2.out $(ROOT)/fel_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_testfelaxes.py ../hit-20140306005258847.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) + -(cd $(PY3CBF); $(DIFF) fel_test3.out $(ROOT)/fel_test3_orig.out) + +py3cbfinstall: $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(PY3CBF)/py3cbfinstall + +py3cbfuserinstall: $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(PY3CBF)/py3cbfuserinstall javatests: $(BIN)/ctestcbf $(BIN)/testcbf.class $(SOLIB)/libcbf_wrap.so $(LDPREFIX) $(BIN)/ctestcbf > testcbfc.txt @@ -2514,13 +2720,13 @@ empty: @-rm -rf $(INCLUDE)/bshuf* @-rm -rf $(INCLUDE)/H5* @-rm -rf $(BIN)/* - @-rm -f $(PYCBF)/_pycbf.$(PYCBFEXT) - @-rm -rf $(PYCBF)/build/* - @-rm -f $(PYCBF)/newtest1.cbf - @-rm -f $(PYCBF)/fel_test1.out - @-rm -f $(PYCBF)/fel_test2.out - @-rm -f $(PYCBF)/setup.py - @-rm -f $(PYCBF)/setup_MINGW.py + @-rm -f $(PY2CBF)/_py2cbf.$(PY2CBFEXT) + @-rm -rf $(PY2CBF)/build/* + @-rm -f $(PY2CBF)/newtest1.cbf + @-rm -f $(PY2CBF)/fel_test1.out + @-rm -f $(PY2CBF)/fel_test2.out + @-rm -f $(PY2CBF)/setup.py + @-rm -f $(PY2CBF)/setup_MINGW.py @-rm -f makecbf.cbf @-rm -f img2cif_packed.cif @-rm -f img2cif_canonical.cif @@ -2604,12 +2810,39 @@ empty: @-rm -f 1191_00005.cbf @-rm -f XRD1621.tif @-rm -f md5tmp - @-rm -rf $(PYCBF)/build + @-rm -rf $(PY2CBF)/build @-rm -f *_old @-rm -f X4_lots_M1S4_1_*.cbf @-rm -f testfile.h5 @-rm -f hit-20140306005258847.cbf @-rm -f build_* + @-rm -rf HDF5Plugin_5Jun21/ + @-rm -rf PyCifRW-4.1/ + @-rm -rf PyCifRW-4.3/ + @-rm -rf bitshuffle-0.2.2.1_15Jun16/ + @-rm -f idx-s00-20131106040304531_flat.cbf + @-rm -f include/iochain.h + @-rm -f include/lz4.h + @-rm -f include/pcre.h + @-rm -f include/pcre_scanner.h + @-rm -f include/pcre_stringpiece.h + @-rm -f include/pcrecpp.h + @-rm -f include/pcrecpparg.h + @-rm -f include/pcreposix.h + @-rm -f include/regex.h + @-rm -f minicbf_test/X4_lots_M1S4_1_0001.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0002.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0003.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0004.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0005.cbf + @-rm -f minicbf_test/minicbf.h5 + @-rm -rf ply-3.2/dist/ + @-rm -f $(PY2CBF)/fel_test3.out + @-rm -f $(PY2CBF)/pycbf.pyc + @-rm -f $(PY2CBF)/pycbf_test1.out + @-rm -f $(PY2CBF)/pycbf_test2.out + @-rm -f $(PY2CBF)/pycbf_test3.out + @-rm -f $(PY2CBF)/pycbf_test4.out ./.undosymlinks # diff --git a/Makefile_IRIX_gcc b/Makefile_IRIX_gcc deleted file mode 100644 index 6e6d2e8a..00000000 --- a/Makefile_IRIX_gcc +++ /dev/null @@ -1,2644 +0,0 @@ - -###################################################################### -# Makefile - command file for make to create CBFlib # -# # -# Version 0.9.6 19 May 2020 # -# # -# Paul Ellis and # -# Herbert J. Bernstein (yaya@bernstein-plus-sons.com) # -# # -# (C) Copyright 2006 - 2020 Herbert J. Bernstein # -# # -###################################################################### - -###################################################################### -# # -# YOU MAY REDISTRIBUTE THE CBFLIB PACKAGE UNDER THE TERMS OF THE GPL # -# # -# ALTERNATIVELY YOU MAY REDISTRIBUTE THE CBFLIB API UNDER THE TERMS # -# OF THE LGPL # -# # -###################################################################### - -########################### GPL NOTICES ############################## -# # -# This program is free software; you can redistribute it and/or # -# modify it under the terms of the GNU General Public License as # -# published by the Free Software Foundation; either version 2 of # -# (the License, or (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program; if not, write to the Free Software # -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # -# 02111-1307 USA # -# # -###################################################################### - -######################### LGPL NOTICES ############################### -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of the GNU Lesser General Public # -# License as published by the Free Software Foundation; either # -# version 2.1 of the License, or (at your option) any later version. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # -# Lesser General Public License for more details. # -# # -# You should have received a copy of the GNU Lesser General Public # -# License along with this library; if not, write to the Free # -# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # -# MA 02110-1301 USA # -# # -###################################################################### - -###################################################################### -# # -# Stanford University Notices # -# for the CBFlib software package that incorporates SLAC software # -# on which copyright is disclaimed # -# # -# This software # -# ------------- # -# The term "this software", as used in these Notices, refers to # -# those portions of the software package CBFlib that were created by # -# employees of the Stanford Linear Accelerator Center, Stanford # -# University. # -# # -# Stanford disclaimer of copyright # -# -------------------------------- # -# Stanford University, owner of the copyright, hereby disclaims its # -# copyright and all other rights in this software. Hence, anyone # -# may freely use it for any purpose without restriction. # -# # -# Acknowledgement of sponsorship # -# ------------------------------ # -# This software was produced by the Stanford Linear Accelerator # -# Center, Stanford University, under Contract DE-AC03-76SFO0515 with # -# the Department of Energy. # -# # -# Government disclaimer of liability # -# ---------------------------------- # -# Neither the United States nor the United States Department of # -# Energy, nor any of their employees, makes any warranty, express or # -# implied, or assumes any legal liability or responsibility for the # -# accuracy, completeness, or usefulness of any data, apparatus, # -# product, or process disclosed, or represents that its use would # -# not infringe privately owned rights. # -# # -# Stanford disclaimer of liability # -# -------------------------------- # -# Stanford University makes no representations or warranties, # -# express or implied, nor assumes any liability for the use of this # -# software. # -# # -# Maintenance of notices # -# ---------------------- # -# In the interest of clarity regarding the origin and status of this # -# software, this and all the preceding Stanford University notices # -# are to remain affixed to any copy or derivative of this software # -# made or distributed by the recipient and are to be affixed to any # -# copy of software made or distributed by the recipient that # -# contains a copy or derivative of this software. # -# # -# Based on SLAC Software Notices, Set 4 # -# OTT.002a, 2004 FEB 03 # -###################################################################### - - - -###################################################################### -# NOTICE # -# Creative endeavors depend on the lively exchange of ideas. There # -# are laws and customs which establish rights and responsibilities # -# for authors and the users of what authors create. This notice # -# is not intended to prevent you from using the software and # -# documents in this package, but to ensure that there are no # -# misunderstandings about terms and conditions of such use. # -# # -# Please read the following notice carefully. If you do not # -# understand any portion of this notice, please seek appropriate # -# professional legal advice before making use of the software and # -# documents included in this software package. In addition to # -# whatever other steps you may be obliged to take to respect the # -# intellectual property rights of the various parties involved, if # -# you do make use of the software and documents in this package, # -# please give credit where credit is due by citing this package, # -# its authors and the URL or other source from which you obtained # -# it, or equivalent primary references in the literature with the # -# same authors. # -# # -# Some of the software and documents included within this software # -# package are the intellectual property of various parties, and # -# placement in this package does not in any way imply that any # -# such rights have in any way been waived or diminished. # -# # -# With respect to any software or documents for which a copyright # -# exists, ALL RIGHTS ARE RESERVED TO THE OWNERS OF SUCH COPYRIGHT. # -# # -# Even though the authors of the various documents and software # -# found here have made a good faith effort to ensure that the # -# documents are correct and that the software performs according # -# to its documentation, and we would greatly appreciate hearing of # -# any problems you may encounter, the programs and documents any # -# files created by the programs are provided **AS IS** without any * -# warranty as to correctness, merchantability or fitness for any # -# particular or general use. # -# # -# THE RESPONSIBILITY FOR ANY ADVERSE CONSEQUENCES FROM THE USE OF # -# PROGRAMS OR DOCUMENTS OR ANY FILE OR FILES CREATED BY USE OF THE # -# PROGRAMS OR DOCUMENTS LIES SOLELY WITH THE USERS OF THE PROGRAMS # -# OR DOCUMENTS OR FILE OR FILES AND NOT WITH AUTHORS OF THE # -# PROGRAMS OR DOCUMENTS. # -###################################################################### - -###################################################################### -# # -# The IUCr Policy # -# for the Protection and the Promotion of the STAR File and # -# CIF Standards for Exchanging and Archiving Electronic Data # -# # -# Overview # -# # -# The Crystallographic Information File (CIF)[1] is a standard for # -# information interchange promulgated by the International Union of # -# Crystallography (IUCr). CIF (Hall, Allen & Brown, 1991) is the # -# recommended method for submitting publications to Acta # -# Crystallographica Section C and reports of crystal structure # -# determinations to other sections of Acta Crystallographica # -# and many other journals. The syntax of a CIF is a subset of the # -# more general STAR File[2] format. The CIF and STAR File approaches # -# are used increasingly in the structural sciences for data exchange # -# and archiving, and are having a significant influence on these # -# activities in other fields. # -# # -# Statement of intent # -# # -# The IUCr's interest in the STAR File is as a general data # -# interchange standard for science, and its interest in the CIF, # -# a conformant derivative of the STAR File, is as a concise data # -# exchange and archival standard for crystallography and structural # -# science. # -# # -# Protection of the standards # -# # -# To protect the STAR File and the CIF as standards for # -# interchanging and archiving electronic data, the IUCr, on behalf # -# of the scientific community, # -# # -# # holds the copyrights on the standards themselves, * -# # -# # owns the associated trademarks and service marks, and * -# # -# # holds a patent on the STAR File. * -# # -# These intellectual property rights relate solely to the # -# interchange formats, not to the data contained therein, nor to # -# the software used in the generation, access or manipulation of # -# the data. # -# # -# Promotion of the standards # -# # -# The sole requirement that the IUCr, in its protective role, # -# imposes on software purporting to process STAR File or CIF data # -# is that the following conditions be met prior to sale or # -# distribution. # -# # -# # Software claiming to read files written to either the STAR * -# File or the CIF standard must be able to extract the pertinent # -# data from a file conformant to the STAR File syntax, or the CIF # -# syntax, respectively. # -# # -# # Software claiming to write files in either the STAR File, or * -# the CIF, standard must produce files that are conformant to the # -# STAR File syntax, or the CIF syntax, respectively. # -# # -# # Software claiming to read definitions from a specific data * -# dictionary approved by the IUCr must be able to extract any # -# pertinent definition which is conformant to the dictionary # -# definition language (DDL)[3] associated with that dictionary. # -# # -# The IUCr, through its Committee on CIF Standards, will assist # -# any developer to verify that software meets these conformance # -# conditions. # -# # -# Glossary of terms # -# # -# [1] CIF: is a data file conformant to the file syntax defined # -# at http://www.iucr.org/iucr-top/cif/spec/index.html # -# # -# [2] STAR File: is a data file conformant to the file syntax # -# defined at http://www.iucr.org/iucr-top/cif/spec/star/index.html # -# # -# [3] DDL: is a language used in a data dictionary to define data # -# items in terms of "attributes". Dictionaries currently approved # -# by the IUCr, and the DDL versions used to construct these # -# dictionaries, are listed at # -# http://www.iucr.org/iucr-top/cif/spec/ddl/index.html # -# # -# Last modified: 30 September 2000 # -# # -# IUCr Policy Copyright (C) 2000 International Union of # -# Crystallography # -###################################################################### - -.DELETE_ON_ERROR: - -# Version string -VERSION = 0.9.6 - -# -# Directories -# -ROOT = $(PWD) -LIB = $(ROOT)/lib -SOLIB = $(ROOT)/solib -JCBF = $(ROOT)/jcbf -JAVADIR = $(ROOT)/java -BIN = $(ROOT)/bin -SRC = $(ROOT)/src -INCLUDE = $(ROOT)/include -M4 = $(ROOT)/m4 -PYCBF = $(ROOT)/pycbf -EXAMPLES = $(ROOT)/examples -TEMPLATES= $(ROOT)/templates -DECTRIS_EXAMPLES = $(EXAMPLES)/dectris_cbf_template_test -DOC = $(ROOT)/doc -MINICBF_TEST = $(ROOT)/minicbf_test -GRAPHICS = $(ROOT)/html_graphics -DATADIRI = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Input -DATADIRO = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output -DATADIRS = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only -CBF_PREFIX ?= $(HOME) - -# -# Comment out the next line if scratch test files should be retained -# -CLEANTESTS = yes - - -MSYS2=no -CBFLIB_DONT_USE_LOCAL_HDF5?=no -CBFLIB_DONT_USE_LZ4?=no -CBFLIB_DONT_USE_BSHUF?=no - - -CBFLIB_DONT_HAVE_FGETLN ?= yes -ifeq ($(CBFLIB_DONT_HAVE_FGETLN),yes) -SRC_FGETLN = $(SRC)/fgetln.c -else -SRC_FGETLN = -endif - - -CBFLIB_DONT_USE_PYCIFRW ?= no -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -# -# Definitions to get versions of PyCifRW and PLY -# -PYCIFRW ?= PyCifRW-4.1 -PLY = ply-3.2 -PYCIFRWFLAG = -DCBF_USE_PYCIFRW -PYCIFRW_PREFIX ?= $(HOME)/.local -endif - -# -# Definition to get a version of tifflib to support tiff2cbf -# -TIFF ?= tiff-4.0.6_rev_3Nov16 -TIFF_PREFIX ?= $(PWD) -TIFF_INSTALL = $(TIFF)_INSTALL - - -# -# Definitions to get a version of HDF5 -# - -ifneq ($(HDF5_PREFIX),) # already installed on system -CBFLIB_DONT_USE_LOCAL_HDF5 = yes -endif - -ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes) -HDF5_PREFIX ?= $(PWD) -HDF5 ?= hdf5-1.10.6 -#HDF5 = hdf5-1.8.18 -#HDF5 = hdf5-1.10.5 -HDF5dep = $(HDF5) -HDF5_INSTALL = $(HDF5)_INSTALL -ifneq ($(MSYS2),yes) -HDF5LIBS_LOCAL = $(LIB)/libhdf5.a -HDF5LIBS_SYSTEM = -lz -ldl -HDF5SOLIBS_LOCAL = -L$(LIB) -lhdf5 -HDF5SOLIBS_SYSTEM = -lz -else -HDF5LIBS_LOCAL = -L$(LIB) -lhdf5 -lhdf5.dll -HDF5LIBS_SYSTEM = -lz -ldl -HDF5SOLIBS_LOCAL = -L$(LIB) -lhdf5 -lhdf5.dll -HDF5SOLIBS_SYSTEM = -lz -endif -else -HDF5 = -HDF5dep = -HDF5_INSTALL = -HDF5LIBS_LOCAL = -ifneq ($(HDF5_PREFIX),) -HDF5lib = -L$(HDF5_PREFIX)/lib -endif -ifneq ($(MSYS2),yes) -HDF5LIBS_SYSTEM = $(HDF5lib) -lhdf5 -lz -ldl -HDF5SOLIBS_LOCAL = -HDF5SOLIBS_SYSTEM = $(HDF5lib) -lhdf5 -lz -else -HDF5LIBS_SYSTEM = $(HDF5lib) -lhdf5 -lhdf5.dll -lz -ldl -HDF5SOLIBS_LOCAL = -HDF5SOLIBS_SYSTEM = $(HDF5lib) -lhdf5 -lhdf5.dll -lz -endif -endif - -HDF5REGISTER ?= --register manual -ifneq ($(HDF5_PREFIX),) -HDF5include = -I$(HDF5_PREFIX)/include -endif - -ifneq ($(MSYS2),yes) -H5DUMP = $(HDF5_PREFIX)/bin/h5dump -else -H5DUMP = /MINGW32/bin/h5dump -endif - - -CBFLIB_DONT_USE_LZ4 ?= no -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -# -# Definitions to get a version of HDF5Plugin for LZ4 -# -ifneq ($(MSYS2),yes) -LZ4 ?= HDF5Plugin_14Aug20 -else -LZ4 ?= HDF5-External-Filter-Plugins -endif -LZ4dep = $(LZ4) -LZ4src = $(LZ4)/src -LZ4include = $(LZ4)/include -LZ4SOLIBS = -L$(SOLIB) -lh5zlz4 -else -LZ4SOLIBS = -LZ4dep = -endif - -CBFLIB_DONT_USE_BSHUF ?= no -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -# -# Definitions to get a version of HDF5Plugin for BSHUFFLE WITH LZ4 -# -BSHUF ?= bitshuffle-0.2.2.1_15Jun16 -BSUFdep = $(BSHUF) -BSHUFsrc = $(BSHUF)/src -BSHUFinclude = $(BSHUF)/src -BSHUFSOLIBS = -L$(SOLIB) -lh5zbshuf -BSHUFFILTER = libbshuf_h5filter -else -BSHUFSOLIBS = -BSHUFdep = -endif - -CBFLIB_DONT_USE_BLOSC ?= no -ifneq ($(CBFLIB_DONT_USE_BLOSC),yes) -# -# Definitions to get a version of HDF5Plugin for BLOSC -# -BLOSC = ?c-blosc_4Sep16.tar.gz -BLOSCdep = $(BLOSC) -BLOSCFILTER = hdf5-blosc_2Sep16.tar.gz -BLOSCsrc = $(BLOSC)/src -BLOSCinclude = $(BLOSC)/src -BLOSCSOLIBS = -L$(SOLIB) -lh5zbshuf -BLOSCFILTER = libbshuf_h5filter -else -BLOSCSOLIBS = -BLOSCdep = -endif - - - -# -# Definition of python to use -# -#PYTHON = python -PYTHON ?= python2 - - -# -# Definitions to get a stable version of regex -# -REGEX_PREFIX ?= $(PWD) -ifneq ($(REGEX_PREFIX),$(PWD)) -CBFLIB_DONT_USE_LOCAL_REGEX ?= yes -endif - - -REGEX_LIBDIR ?= $(REGEX_PREFIX)/lib -ifneq ($(CBFLIB_DONT_USE_LOCAL_REGEX),yes) -REGEX ?= pcre-8.38 -REGEXDEP = $(REGEX) -REGEX_INSTALL = $(REGEX)_INSTALL -REGEX_LIB ?= pcreposix -REGEX_LIB2 ?= pcre -ifneq ($(MSYS2),yes) -REGEX_LIBS ?= -L $(REGEX_LIBDIR) -l$(REGEX_LIB) -l$(REGEX_LIB2) -REGEX_LIBS_STATIC = $(LIB)/libpcreposix.a $(LIB)/libpcre.a -else -REGEX_LIBS ?= -L $(REGEX_LIBDIR) -l$(REGEX_LIB) -l$(REGEX_LIB).dll -l$(REGEX_LIB2) -l$(REGEX_LIB2).dll -REGEX_LIBS_STATIC = $(REGEX_LIBS) -endif -REGEX_INCLUDES ?= -I $(REGEX_PREFIX) -else -REGEX = -REGEXDEP = -REGEX_INSTALL = -REGEX_LIB ?= -REGEX_LIB2 ?= -REGEX_LIBS ?= -REGEX_INCLUDES ?= -endif - - -# Program to use to retrieve a URL - -DOWNLOAD ?= wget -N -#DOWNLOAD ?= curl -O -L - -# Flag to control symlinks versus copying - -SLFLAGS = --use_ln -LN = ln -s -f - -# -# Program to use to pack shars -# -SHAR = /usr/bin/shar -#SHAR = /usr/local/bin/gshar - -# -# Program to use to create archives -# -AR = /usr/bin/ar - -# -# Program to use to add an index to an archive -# -RANLIB = /usr/bin/ranlib - - -# -# Program to use to generate a signature -# -#SIGNATURE ?= /usr/bin/openssl dgst -md5 -#SIGNATURE ?= (/usr/bin/openssl dgst -md5 | sed "s/^.*= //") -SIGNATURE ?= ( cat > md5tmp; cmake -E md5sum md5tmp| sed "s/ .*//") - -# -# Pipe command to extract all but the first line of a text file -# -ALLBUTONE = tail -n +2 - - -# -# Extension for signatures of files -# -SEXT = .md5 - -# Default shell - -SHELL = bash - -# call to time a command - -#TIME = -#TIME = time - -# -# Program to display differences between files -# -DIFF = diff -u -b - - -# -# Program to generate wrapper classes for Python -# -PYSWIG = swig -python - -# -# Program to generate wrapper classes for Java -# -JSWIG = swig -java - -# -# Program to generate LaTex and HTML program documentation -# - -NUWEB = nuweb - -# -# Compiler for Java -# -JAVAC = javac - -# -# Java archiver for compiled classes -# -JAR = jar - -# -# Java SDK root directory -# -ifeq ($(JDKDIR),) - JDKDIR = /usr/lib/java -endif - -ifneq ($(CBF_DONT_USE_LONG_LONG),) -NOLLFLAG = -DCBF_DONT_USE_LONG_LONG -else -NOLLFLAG = -endif - -ifneq ($(CBF_NO_REGEX),) -CBF_REGEXFLAG = -DCBF_NO_REGEX -else -CBF_REGEXFLAG = -DCBF_REGEXLIB_REGEX -endif - -ifneq ($(CBF_USE_ULP),) -ULPFLAG = -DCBF_USE_ULP -else -ULPFLAG = -endif - -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -LZ4FLAG = -DCBF_H5Z_USE_LZ4 -else -LZ4FLAG = -endif - -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -BSHUFFLAG = -DCBF_H5Z_USE_BSHUF -else -BSHUFFLAG = -endif - - - -MISCFLAG = $(NOLLFLAG) $(ULPFLAG) - -# -# PYCBF definitions -# -PYCBFEXT = so -PYCBFBOPT = -PYCBFIOPT = -SETUP_PY = setup.py -INSTALLSETUP_PY = installsetup.py - -# -# Set the compiler and flags -# - - -######################################################### -# -# Appropriate compiler definitions for IRIX w. gcc -# No f90 -# use default paths for utilities -# -######################################################### -CC = gcc -C++ = g++ -CFLAGS = -g -O2 -Wall -LDFLAGS = -F90C = -F90FLAGS = -M4FLAGS = -Dfcb_bytes_in_rec=4096 -JAVAINCLUDES = -I$(JDKDIR)/include -I$(JDKDIR)/include/linux -LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; -RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/LIB:$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; -EXTRALIBS = -lm -TIME = -SHAR = shar -AR = ar -RANLIB = - -ifneq ($(NOFORTRAN),) -F90C = -endif - -# -# URLs from which to retrieve the data directories -# -DATAURLBASE = http://downloads.sf.net/cbflib/ -DATAURLI = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Input.tar.gz -DATAURLO = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output.tar.gz -DATAURLS = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz - -# -# URLs from which to retrieve needed external package snapshots -# -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWURL = http://downloads.sf.net/cbflib/$(PYCIFRW).tar.gz -PLYURL = http://www.dabeaz.com/ply/$(PLY).tar.gz -endif -REGEX_URL ?= http://downloads.sf.net/cbflib/$(REGEX).tar.gz -TIFF_URL ?= http://downloads.sf.net/cbflib/$(TIFF).tar.gz -HDF5_URL ?= http://downloads.sf.net/cbflib/$(HDF5).tar.gz -ifneq ($(MSYS2),yes) -LZ4_URL = http://downloads.sf.net/cbflib/$(LZ4).tar.gz -else -LZ4_URL = http://www.github.com/yayahjb/$(LZ4).git -endif -BSHUFURL = http://downloads.sf.net/cbflib/$(BSHUF).tar.gz - - -# -# Include directories -# -INCLUDES = -I$(INCLUDE) -I$(SRC) $(HDF5include) - -# -# runtime library path export commands -# -RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export LD_LIBRARY_PATH; \ - DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export DYLD_LIBRARY_PATH; \ - LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib;export LD_RUN_PATH; - - -###################################################################### -# You should not need to make modifications below this line # -###################################################################### - -ifneq ($(CBF_USE_ULP),) -SRC_CBF_ULP_C = $(SRC)/cbf_ulp.c -INCLUDE_CBF_ULP_H = $(INCLUDE)/cbf_ulp.h -BIN_TESTULP = $(BIN)/testulp -else -SRC_CBF_ULP_C = -INCLUyDE_CBF_ULP_H = -BIN_TESTULP = -endif - -ifneq ($(MSYS2),yes) -SRC_REALPATH = -else -SRC_REALPATH = $(SRC)/realpath.c -endif - - -# -# Suffixes of files to be used or built -# -.SUFFIXES: .c .o .f90 .m4 - -.m4.f90: - m4 -P $(M4FLAGS) $< > $@ - -ifneq ($(F90C),) -.f90.o: - $(F90C) $(F90FLAGS) -c $< -o $@ -endif - - -# -# Common dependencies -# -COMMONDEP = $(M4)/Makefile.m4 - -# -# Source files -# - -SOURCE = $(SRC)/cbf.c \ - $(SRC)/cbf_airy_disk.c \ - $(SRC)/cbf_alloc.c \ - $(SRC)/cbf_ascii.c \ - $(SRC)/cbf_binary.c \ - $(SRC)/cbf_byte_offset.c \ - $(SRC)/cbf_canonical.c \ - $(SRC)/cbf_codes.c \ - $(SRC)/cbf_compress.c \ - $(SRC)/cbf_context.c \ - $(SRC)/cbf_copy.c \ - $(SRC)/cbf_file.c \ - $(SRC)/cbf_getopt.c \ - $(SRC)/cbf_hdf5.c \ - $(SRC)/cbf_hdf5_filter.c \ - $(SRC)/cbf_lex.c \ - $(SRC)/cbf_minicbf_header.c\ - $(SRC)/cbf_nibble_offset.c \ - $(SRC)/cbf_packed.c \ - $(SRC)/cbf_predictor.c \ - $(SRC)/cbf_read_binary.c \ - $(SRC)/cbf_read_mime.c \ - $(SRC)/cbf_simple.c \ - $(SRC)/cbf_string.c \ - $(SRC)/cbf_stx.c \ - $(SRC)/cbf_tree.c \ - $(SRC_CBF_ULP_C) \ - $(SRC)/cbf_uncompressed.c \ - $(SRC)/cbf_write.c \ - $(SRC)/cbf_write_binary.c \ - $(SRC)/cbf_ws.c \ - $(SRC)/cbff.c \ - $(SRC)/md5c.c \ - $(SRC)/img.c \ - $(SRC_FGETLN) $(SRC_REALPATH) - -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYSOURCE = $(SRC)/drel_lex.py \ - $(SRC)/drel_yacc.py \ - $(SRC)/drelc.py \ - $(SRC)/drel_prep.py -endif - -F90SOURCE = $(SRC)/fcb_atol_wcnt.f90 \ - $(SRC)/fcb_ci_strncmparr.f90 \ - $(SRC)/fcb_exit_binary.f90 \ - $(SRC)/fcb_nblen_array.f90 \ - $(SRC)/fcb_next_binary.f90 \ - $(SRC)/fcb_open_cifin.f90 \ - $(SRC)/fcb_packed.f90 \ - $(SRC)/fcb_read_bits.f90 \ - $(SRC)/fcb_read_byte.f90 \ - $(SRC)/fcb_read_image.f90 \ - $(SRC)/fcb_read_line.f90 \ - $(SRC)/fcb_read_xds_i2.f90 \ - $(SRC)/fcb_skip_whitespace.f90 - - -# -# Header files -# -HEADERS = $(INCLUDE)/cbf.h \ - $(INCLUDE)/cbf_airy_disk.h \ - $(INCLUDE)/cbf_alloc.h \ - $(INCLUDE)/cbf_ascii.h \ - $(INCLUDE)/cbf_binary.h \ - $(INCLUDE)/cbf_byte_offset.h \ - $(INCLUDE)/cbf_canonical.h \ - $(INCLUDE)/cbf_codes.h \ - $(INCLUDE)/cbf_compress.h \ - $(INCLUDE)/cbf_context.h \ - $(INCLUDE)/cbf_copy.h \ - $(INCLUDE)/cbf_file.h \ - $(INCLUDE)/cbf_getopt.h \ - $(INCLUDE)/cbf_hdf5.h \ - $(INCLUDE)/cbf_hdf5_filter.h \ - $(INCLUDE)/cbf_lex.h \ - $(INCLUDE)/cbf_minicbf_header.h\ - $(INCLUDE)/cbf_nibble_offset.h \ - $(INCLUDE)/cbf_packed.h \ - $(INCLUDE)/cbf_predictor.h \ - $(INCLUDE)/cbf_read_binary.h \ - $(INCLUDE)/cbf_read_mime.h \ - $(INCLUDE)/cbf_simple.h \ - $(INCLUDE)/cbf_string.h \ - $(INCLUDE)/cbf_stx.h \ - $(INCLUDE)/cbf_tree.h \ - $(INCLUDE)/cbf_uncompressed.h \ - $(INCLUDE_CBF_ULP_H) \ - $(INCLUDE)/cbf_write.h \ - $(INCLUDE)/cbf_write_binary.h \ - $(INCLUDE)/cbf_ws.h \ - $(INCLUDE)/global.h \ - $(INCLUDE)/cbff.h \ - $(INCLUDE)/md5.h \ - $(INCLUDE)/img.h - -# -# m4 macro files -# -M4FILES = $(M4)/fcblib_defines.m4 \ - $(M4)/fcb_exit_binary.m4 \ - $(M4)/fcb_next_binary.m4 \ - $(M4)/fcb_open_cifin.m4 \ - $(M4)/fcb_packed.m4 \ - $(M4)/fcb_read_bits.m4 \ - $(M4)/fcb_read_image.m4 \ - $(M4)/fcb_read_xds_i2.m4 \ - $(M4)/test_fcb_read_image.m4 \ - $(M4)/test_xds_binary.m4 - - -# -# Documentation files -# -DOCUMENTS = $(DOC)/CBFlib.html \ - $(DOC)/CBFlib.txt \ - $(DOC)/CBFlib_NOTICES.html \ - $(DOC)/CBFlib_NOTICES.txt \ - $(DOC)/ChangeLog \ - $(DOC)/ChangeLog.html \ - $(DOC)/MANIFES \ - $(DOC)/gpl.txt $(DOC)/lgpl.txt - -# -# HTML Graphics files -# -JPEGS = $(GRAPHICS)/CBFbackground.jpg \ - $(GRAPHICS)/CBFbig.jpg \ - $(GRAPHICS)/CBFbutton.jpg \ - $(GRAPHICS)/cbflibbackground.jpg\ - $(GRAPHICS)/cbflibbig.jpg \ - $(GRAPHICS)/cbflibbutton.jpg \ - $(GRAPHICS)/cifhome.jpg \ - $(GRAPHICS)/iucrhome.jpg \ - $(GRAPHICS)/noticeButton.jpg - - -# -# Default: instructions -# -default: - @echo ' ' - @echo '***************************************************************' - @echo ' ' - @echo ' PLEASE READ README and doc/CBFlib_NOTICES.txt' - @echo ' ' - @echo ' Before making the CBF library and example programs, check' - @echo ' that the C compiler name and flags are correct:' - @echo ' ' - @echo ' The current values are:' - @echo ' ' - @echo ' $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(PYCIFRWFLAG)' - @echo ' ' - @echo ' Before installing the CBF library and example programs, check' - @echo ' that the install directory is correct:' - @echo ' ' - @echo ' The current value :' - @echo ' ' - @echo ' $(CBF_PREFIX) ' - @echo ' ' - @echo ' To compile the CBF library and example programs type:' - @echo ' ' - @echo ' make clean' - @echo ' make all' - @echo ' ' - @echo ' To compile the CBF library as a shared object library, type:' - @echo ' ' - @echo ' make shared' - @echo ' ' - @echo ' To compile the Java wrapper classes for CBF library, type:' - @echo ' ' - @echo ' make javawrapper' - @echo ' ' - @echo ' To run a set of tests type:' - @echo ' ' - @echo ' make tests' - @echo ' ' - @echo ' To run some java tests type:' - @echo ' ' - @echo ' make javatests' - @echo ' ' - @echo ' The tests assume that several data files are in the directories' - @echo ' $(DATADIRI) and $(DATADIRO)' - @echo ' ' - @echo ' Alternatively tests can be run comparing MD5 signatures only by' - @echo ' ' - @echo ' make tests_sigs_only' - @echo ' ' - @echo ' These signature only tests save space and download time by' - @echo ' assuming that input data files and the output signatures' - @echo ' are in the directories' - @echo ' $(DATADIRI) and $(DATADIRS)' - @echo ' ' - @echo ' These directory can be obtained from' - @echo ' ' - @echo ' $(DATAURLI) ' - @echo ' $(DATAURLO) ' - @echo ' $(DATAURLS) ' - @echo ' ' - @echo ' To clean up the directories type:' - @echo ' ' - @echo ' make clean' - @echo ' ' - @echo ' To install the library and binaries type:' - @echo ' ' - @echo ' make install' - @echo ' ' - @echo '***************************************************************' - @echo ' ' - -# -# Compile the library and examples -# -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEPS = $(PYCIFRW) $(PLY) -else -PYCIFRWDEPS = -endif - -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -LZ4DEPS = $(LZ4) -else -LZ4DEPS = -endif - -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -BSHUFDEPS = $(BSHUF) -else -BSHUFDEPS = -endif - - -all:: $(BIN) $(SOURCE) $(F90SOURCE) $(HEADERS) \ - $(HDF5) \ - $(LZ4DEPS) \ - $(BSHUFDEPS) \ - $(PYCIFRWDEPS) \ - symlinksdone \ - $(REGEXDEP) \ - $(LIB) \ - $(LIB)/libcbf.a \ - $(LIB)/libfcb.a \ - $(LIB)/libimg.a \ - $(BIN)/adscimg2cbf \ - $(BIN)/arvai_test \ - $(BIN)/cbf2adscimg \ - $(BIN)/cbf2nexus \ - $(BIN)/cif2c \ - $(BIN)/cif2cbf \ - $(BIN)/cbf_standardize_numbers \ - $(BIN)/convert_image \ - $(BIN)/convert_minicbf\ - $(BIN)/img2cif \ - $(BIN)/makecbf \ - $(BIN)/minicbf2nexus \ - $(BIN)/nexus2cbf \ - $(BIN)/roi_peaksearch \ - $(BIN)/sequence_match \ - $(BIN)/testcell \ - $(BIN)/testalloc \ - $(BIN)/testreals \ - $(BIN)/testflat \ - $(BIN)/testflatpacked \ - $(BIN)/testhdf5 \ - $(BIN_TESTULP) \ - $(BIN)/tiff2cbf \ - $(BIN)/test_cbf_airy_disk \ - $(BIN)/cbf_testxfelread - -ifneq ($(F90C),) -all:: $(BIN)/test_xds_binary \ - $(BIN)/test_fcb_read_image -endif - -shared: $(SOLIB)/libcbf.so $(SOLIB)/libfcb.so $(SOLIB)/libimg.so - -javawrapper: shared $(JCBF) $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so - -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEF = -Dcbf_use_pycifrw=yes -else -PYCIFRWDEF = -endif - - -Makefiles: Makefile \ - Makefile_LINUX \ - Makefile_LINUX_64 \ - Makefile_LINUX_gcc42 \ - Makefile_LINUX_DMALLOC \ - Makefile_LINUX_gcc42_DMALLOC \ - Makefile_OSX \ - Makefile_OSX_gcc42 \ - Makefile_OSX_gcc42_DMALLOC \ - Makefile_AIX \ - Makefile_MINGW \ - Makefile_MSYS2 \ - Makefile_IRIX_gcc - - -Makefile_LINUX: $(M4)/Makefile.m4 - -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX $(M4)/Makefile.m4 > Makefile_LINUX.tmp - mv Makefile_LINUX.tmp Makefile_LINUX - -Makefile_LINUX_DMALLOC: $(M4)/Makefile.m4 - -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_DMALLOC.tmp - mv Makefile_LINUX_DMALLOC.tmp Makefile_LINUX_DMALLOC - -Makefile_LINUX_64: $(M4)/Makefile.m4 - -cp Makefile_LINUX_64 Makefile_LINUX_64_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_64 $(M4)/Makefile.m4 > Makefile_LINUX_64.tmp - mv Makefile_LINUX_64.tmp Makefile_LINUX_64 - -Makefile_LINUX_gcc42: $(M4)/Makefile.m4 - -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42 $(M4)/Makefile.m4 > Makefile_LINUX_gcc42.tmp - mv Makefile_LINUX_gcc42.tmp Makefile_LINUX_gcc42 - -Makefile_LINUX_gcc42_DMALLOC: $(M4)/Makefile.m4 - -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_gcc42_DMALLOC.tmp - mv Makefile_LINUX_gcc42_DMALLOC.tmp Makefile_LINUX_gcc42_DMALLOC - -Makefile_OSX: $(M4)/Makefile.m4 - -cp Makefile_OSX Makefile_OSX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX $(M4)/Makefile.m4 > Makefile_OSX.tmp - mv Makefile_OSX.tmp Makefile_OSX - -Makefile_OSX_gcc42: $(M4)/Makefile.m4 - -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42 $(M4)/Makefile.m4 > Makefile_OSX_gcc42.tmp - mv Makefile_OSX_gcc42.tmp Makefile_OSX_gcc42 - -Makefile_OSX_gcc42_DMALLOC: $(M4)/Makefile.m4 - -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_OSX_gcc42_DMALLOC.tmp - mv Makefile_OSX_gcc42_DMALLOC.tmp Makefile_OSX_gcc42_DMALLOC - -Makefile_AIX: $(M4)/Makefile.m4 - -cp Makefile_AIX Makefile_AIX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=AIX $(M4)/Makefile.m4 > Makefile_AIX.tmp - mv Makefile_AIX.tmp Makefile_AIX - -Makefile_MINGW: $(M4)/Makefile.m4 - -cp Makefile_MINGW Makefile_MINGW_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MINGW $(M4)/Makefile.m4 > Makefile_MINGW.tmp - mv Makefile_MINGW.tmp Makefile_MINGW - -Makefile_MSYS2: $(M4)/Makefile.m4 - -cp Makefile_MSYS2 Makefile_MSYS2_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MSYS2 $(M4)/Makefile.m4 > Makefile_MSYS2.tmp - mv Makefile_MSYS2.tmp Makefile_MSYS2 - -Makefile_IRIX_gcc: $(M4)/Makefile.m4 - -cp Makefile_IRIX_gcc Makefile_IRIX_gcc_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=IRIX_gcc $(M4)/Makefile.m4 > Makefile_IRIX_gcc.tmp - mv Makefile_IRIX_gcc.tmp Makefile_IRIX_gcc - - -Makefile: $(M4)/Makefile.m4 - -cp Makefile Makefile_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=default $(M4)/Makefile.m4 > Makefile.tmp - mv Makefile.tmp Makefile - -cbflib.ini: $(M4)/Makefile.m4 - echo "$(LDPREFIX)" > cbflib.ini - echo "HDF5_PLUGIN_PATH=$(SOLIB):$$HDF5_PLUGIN_PATH" >> cbflib.ini - echo "export HDF5_PLUGIN_PATH" >> cbflib.ini - -symlinksdone: - chmod a+x .symlinks - chmod a+x .undosymlinks - chmod a+x doc/.symlinks - chmod a+x doc/.undosymlinks - ./.symlinks $(SLFLAGS) - touch symlinksdone - -install: baseinstall pycbfinstall \ - $(HDF5_INSTALL) \ - $(TIFF_INSTALL) \ - $(REGEX_INSTALL) - -userinstall: baseinstall pycbfuserinstall \ - $(HDF5_INSTALL) \ - $(TIFF_INSTALL) \ - $(REGEX_INSTALL) - -baseinstall: all $(CBF_PREFIX) $(CBF_PREFIX)/lib $(CBF_PREFIX)/bin \ - $(CBF_PREFIX)/include $(CBF_PREFIX)/include/cbflib \ - $(PYSOURCE) shared $(EXAMPLES)/batch_convert_minicbf.sh \ - $(LIB)/libcbf.a $(LIB)/libimg.a $(LIB)/libfcb.a \ - $(SOLIB)/libcbf.so $(SOLIB)/libimg.so $(SOLIB)/libfcb.so - -chmod -R 755 $(CBF_PREFIX)/include/cbflib - -chmod 755 $(CBF_PREFIX)/lib/libcbf.a - -cp $(CBF_PREFIX)/lib/libcbf.a $(CBF_PREFIX)/lib/libcbf_old.a - cp $(LIB)/libcbf.a $(CBF_PREFIX)/lib/libcbf.a - -chmod 755 $(CBF_PREFIX)/lib/libimg.a - -cp $(CBF_PREFIX)/lib/libimg.a $(CBF_PREFIX)/lib/libimg_old.a - cp $(LIB)/libimg.a $(CBF_PREFIX)/lib/libimg.a - -chmod 755 $(CBF_PREFIX)/lib/libfcb.a - -cp $(CBF_PREFIX)/lib/libfcb.a $(CBF_PREFIX)/lib/libfcb_old.a - cp $(LIB)/libfcb.a $(CBF_PREFIX)/lib/libfcb.a - -chmod 755 $(CBF_PREFIX)/lib/libcbf.so - -cp $(CBF_PREFIX)/lib/libcbf.so $(CBF_PREFIX)/lib/libcbf_old.so - cp $(SOLIB)/libcbf.so $(CBF_PREFIX)/lib/libcbf.so - $(LN) $(CBF_PREFIX)/lib/libcbf.so $(CBF_PREFIX)/lib/lib_cbf.so - -chmod 755 $(CBF_PREFIX)/lib/libimg.so - -cp $(CBF_PREFIX)/lib/libimg.so $(CBF_PREFIX)/lib/libimg_old.so - cp $(SOLIB)/libimg.so $(CBF_PREFIX)/lib/libimg.so - $(LN) $(CBF_PREFIX)/lib/libimg.so $(CBF_PREFIX)/lib/lib_img.so - -chmod 755 $(CBF_PREFIX)/lib/libfcb.so - -cp $(CBF_PREFIX)/lib/libfcb.so $(CBF_PREFIX)/lib/libfcb_old.so - cp $(SOLIB)/libfcb.so $(CBF_PREFIX)/lib/libfcb.so - $(LN) $(CBF_PREFIX)/lib/libfcb.so $(CBF_PREFIX)/lib/lib_fcb.so - -cp $(CBF_PREFIX)/bin/cbflib.ini $(CBF_PREFIX)/bin/cbflib.ini_old - echo "$(RUNLDPREFIX)" > $(CBF_PREFIX)/bin/cbflib.ini - echo "HDF5_PLUGIN_PATH=$(CBF_PREFIX)/lib:$$HDF5_PLUGIN_PATH" >> $(CBF_PREFIX)/bin/cbflib.ini - echo "export HDF5_PLUGIN_PATH" >> $(CBF_PREFIX)/bin/cbflib.ini - -cp $(CBF_PREFIX)/bin/adscimg2cbf $(CBF_PREFIX)/bin/adscimg2cbf_old - cp $(BIN)/adscimg2cbf $(CBF_PREFIX)/bin/adscimg2cbf - -cp $(CBF_PREFIX)/bin/cbf2adscimg $(CBF_PREFIX)/bin/cbf2adscimg_old - cp $(BIN)/cbf2adscimg $(CBF_PREFIX)/bin/cbf2adscimg - -cp $(CBF_PREFIX)/bin/cbf_standardize_numbers \ - $(CBF_PREFIX)/bin/cbf_standardize_numbers_old - cp $(BIN)/cbf_standardize_numbers $(CBF_PREFIX)/bin/cbf_standardize_numbers - -cp $(CBF_PREFIX)/bin/convert_image $(CBF_PREFIX)/bin/convert_image_old - cp $(BIN)/convert_image $(CBF_PREFIX)/bin/convert_image - -cp $(CBF_PREFIX)/bin/convert_minicbf $(CBF_PREFIX)/bin/convert_minicbf_old - cp $(BIN)/convert_minicbf $(CBF_PREFIX)/bin/convert_minicbf - -cp $(CBF_PREFIX)/bin/makecbf $(CBF_PREFIX)/bin/makecbf_old - cp $(BIN)/makecbf $(CBF_PREFIX)/bin/makecbf - -cp $(CBF_PREFIX)/bin/img2cif $(CBF_PREFIX)/bin/img2cif_old - cp $(BIN)/img2cif $(CBF_PREFIX)/bin/img2cif - -cp $(CBF_PREFIX)/bin/cif2cbf $(CBF_PREFIX)/bin/cif2cbf_old - cp $(BIN)/cif2cbf $(CBF_PREFIX)/bin/cif2cbf - -cp $(CBF_PREFIX)/bin/minicbf2nexus $(CBF_PREFIX)/bin/minicbf2nexus_old - cp $(BIN)/minicbf2nexus $(CBF_PREFIX)/bin/minicbf2nexus - -cp $(CBF_PREFIX)/bin/cbf2nexus $(CBF_PREFIX)/bin/cbf2nexus_old - cp $(BIN)/cbf2nexus $(CBF_PREFIX)/bin/cbf2nexus - -cp $(CBF_PREFIX)/bin/nexus2cbf $(CBF_PREFIX)/bin/nexus2cbf_old - cp $(BIN)/nexus2cbf $(CBF_PREFIX)/bin/nexus2cbf - -cp $(CBF_PREFIX)/bin/roi_peaksearch $(CBF_PREFIX)/bin/roi_peaksearch_old - cp $(BIN)/roi_peaksearch $(CBF_PREFIX)/bin/roi_peaksearch - -cp $(CBF_PREFIX)/bin/sequence_match $(CBF_PREFIX)/bin/sequence_match_old - cp $(BIN)/sequence_match $(CBF_PREFIX)/bin/sequence_match - -cp $(CBF_PREFIX)/bin/testalloc $(CBF_PREFIX)/bin/testalloc_old - cp $(BIN)/testalloc $(CBF_PREFIX)/bin/testalloc - -cp $(CBF_PREFIX)/bin/arvai_test $(CBF_PREFIX)/bin/arvai_test_old - cp $(BIN)/arvai_test $(CBF_PREFIX)/bin/arvai_test - -cp $(CBF_PREFIX)/bin/cif2c $(CBF_PREFIX)/bin/cif2c_old - cp $(BIN)/cif2c $(CBF_PREFIX)/bin/cif2c - -cp $(CBF_PREFIX)/bin/testreals $(CBF_PREFIX)/bin/testreals_old - cp $(BIN)/testreals $(CBF_PREFIX)/bin/testreals - -cp $(CBF_PREFIX)/bin/testflat $(CBF_PREFIX)/bin/testflat_old - cp $(BIN)/testflat $(CBF_PREFIX)/bin/testflat - -cp $(CBF_PREFIX)/bin/testflatpacked $(CBF_PREFIX)/bin/testflatpacked_old - cp $(BIN)/testflatpacked $(CBF_PREFIX)/bin/testflatpacked - -cp $(CBF_PREFIX)/bin/tiff2cbf $(CBF_PREFIX)/bin/tiff2cbf_old - cp $(BIN)/tiff2cbf $(CBF_PREFIX)/bin/tiff2cbf - -cp $(CBF_PREFIX)/bin/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk_old - cp $(BIN)/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk - -cp $(CBF_PREFIX)/bin/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk_old - cp $(BIN)/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk - -cp $(CBF_PREFIX)/bin/testhdf5 $(CBF_PREFIX)/bin/testhdf5_old - cp $(BIN)/testhdf5 $(CBF_PREFIX)/bin/testhdf5 -ifneq ($(CBF_USE_ULP),) - -cp $(CBF_PREFIX)/bin/testulp $(CBF_PREFIX)/bin/testulp_old - cp $(BIN)/testulp $(CBF_PREFIX)/bin/testulp -endif - -cp $(CBF_PREFIX)/bin/batch_convert_minicbf.sh $(CBF_PREFIX)/bin/batch_convert_minicbf_old.sh - cp $(EXAMPLES)/batch_convert_minicbf.sh $(CBF_PREFIX)/bin/batch_convert_minicbf.sh -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) - cp $(SRC)/drel_lex.py $(CBF_PREFIX)/bin/drel_lex.py - cp $(SRC)/drel_yacc.py $(CBF_PREFIX)/bin/drel_yacc.py - cp $(SRC)/drelc.py $(CBF_PREFIX)/bin/drelc.py - cp $(SRC)/drel_prep.py $(CBF_PREFIX)/bin/drel_prep.py -endif - chmod -R 755 $(CBF_PREFIX)/include/cbflib - -rm -rf $(CBF_PREFIX)/include/cbflib_old - -cp -r $(CBF_PREFIX)/include/cbflib $(CBF_PREFIX)/include/cbflib_old - -rm -rf $(CBF_PREFIX)/include/cbflib - cp -r $(INCLUDE) $(CBF_PREFIX)/include/cbflib - chmod 644 $(CBF_PREFIX)/lib/libcbf.a - chmod 644 $(CBF_PREFIX)/lib/libimg.a - chmod 644 $(CBF_PREFIX)/lib/libfcb.a - chmod 755 $(CBF_PREFIX)/lib/libcbf.so - chmod 755 $(CBF_PREFIX)/lib/libimg.so - chmod 755 $(CBF_PREFIX)/lib/libfcb.so - chmod 755 $(CBF_PREFIX)/bin/arvai_test - chmod 755 $(CBF_PREFIX)/bin/cbf2nexus - chmod 755 $(CBF_PREFIX)/bin/cbf_standardize_numbers - chmod 755 $(CBF_PREFIX)/bin/cif2c - chmod 755 $(CBF_PREFIX)/bin/cif2cbf - chmod 755 $(CBF_PREFIX)/bin/convert_image - chmod 755 $(CBF_PREFIX)/bin/convert_minicbf - chmod 755 $(CBF_PREFIX)/bin/img2cif - chmod 755 $(CBF_PREFIX)/bin/makecbf - chmod 755 $(CBF_PREFIX)/bin/minicbf2nexus - chmod 755 $(CBF_PREFIX)/bin/nexus2cbf - chmod 755 $(CBF_PREFIX)/bin/roi_peaksearch - chmod 755 $(CBF_PREFIX)/bin/sequence_match - chmod 755 $(CBF_PREFIX)/bin/testalloc - chmod 755 $(CBF_PREFIX)/bin/testflat - chmod 755 $(CBF_PREFIX)/bin/testflatpacked - chmod 755 $(CBF_PREFIX)/bin/testhdf5 - chmod 755 $(CBF_PREFIX)/bin/testreals -ifneq ($(CBF_USE_ULP),) - chmod 755 $(CBF_PREFIX)/bin/testulp -endif - chmod 755 $(CBF_PREFIX)/bin/tiff2cbf - chmod 755 $(CBF_PREFIX)/bin/test_cbf_airy_disk - chmod 755 $(CBF_PREFIX)/bin/batch_convert_minicbf.sh - chmod 644 $(CBF_PREFIX)/include/cbflib/*.h - -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -# -# PyCifRW -# -build_pycifrw: $(M4)/Makefile.m4 - touch build_pycifrw -$(PYCIFRW): build_pycifrw - -rm -rf $(PYCIFRW) - -rm -rf $(PYCIFRW).tar.gz - $(DOWNLOAD) $(PYCIFRWURL) - tar -xvf $(PYCIFRW).tar.gz - -rm $(PYCIFRW).tar.gz - (cd $(PYCIFRW); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) - -# -# PLY -# -build_ply: $(M4)/Makefile.m4 - touch build_ply -$(PLY): build_ply - -rm -rf $(PLY) - -rm -rf $(PLY).tar.gz - $(DOWNLOAD) $(PLYURL) - tar -xvf $(PLY).tar.gz - -rm $(PLY).tar.gz - (cd $(PLY); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) -endif - -# -# REGEX -# - -build_regex: $(M4)/Makefile.m4 - touch build_regex -$(REGEX): build_regex - -rm -rf $(REGEX) - -rm -rf $(REGEX).tar.gz - $(DOWNLOAD) $(REGEX_URL) - tar -xvf $(REGEX).tar.gz - touch $(REGEX) - -rm $(REGEX).tar.gz - cp config.guess config.sub $(REGEX) - (cd $(REGEX); \ - prefix=$(REGEX_PREFIX); export prefix; \ - ./configure --prefix=$(REGEX_PREFIX); make install) - @-cp $(REGEX_PREFIX)/include/pcreposix.h $(REGEX_PREFIX)/include/regex.h -$(REGEX)_INSTALL: $(REGEX) - -rm -rf $(REGEX)_install - rsync -avz $(REGEX)/ $(REGEX)_install - (cd $(REGEX)_install; prefix=$(CBF_PREFIX); export prefix; \ - make distclean; ./configure --prefix=$(CBF_PREFIX); make install ) - @-cp $(CBF_PREFIX)/include/pcreposix.h $(CBF_PREFIX)/include/regex.h - -# -# TIFF -# -build_tiff: $(M4)/Makefile.m4 - touch build_tiff -$(TIFF): build_tiff config.guess config.sub - -rm -rf $(TIFF) - -rm -rf $(TIFF).tar.gz - $(DOWNLOAD) $(TIFF_URL) - tar -xvf $(TIFF).tar.gz - touch $(TIFF) - -rm $(TIFF).tar.gz - cp config.guess config.sub $(TIFF)/config/ - (cd $(TIFF); prefix=$(TIFF_PREFIX); export prefix; \ - ./configure --prefix=$(TIFF_PREFIX); make install) -$(TIFF)_INSTALL: $(TIFF) - -rm -rf $(TIFF)_install - rsync -avz $(TIFF)/ $(TIFF)_install - (cd $(TIFF)_install; make distclean; prefix=$(CBF_PREFIX); export prefix; \ - ./configure --prefix=$(CBF_PREFIX); make install) - - -ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes) -# -# HDF5 -# - -build_hdf5: $(M4)/Makefile.m4 - touch build_hdf5 -$(HDF5): build_hdf5 - -rm -rf $(HDF5) - -rm -rf $(HDF5).tar.gz - $(DOWNLOAD) $(HDF5_URL) - tar -xvf $(HDF5).tar.gz - cp config.guess $(HDF5)/bin/config.guess - cp config.sub $(HDF5)/bin/config.sub - touch $(HDF5) - -rm $(HDF5).tar.gz - echo "first level HDF5 install in "$(HDF5_PREFIX) - (cd $(ROOT)/$(HDF5); \ - CFLAGS="$(CFLAGS)"; export CFLAGS; \ - mkdir -p hdf5; prefix=$(ROOT)/$(HDF5)/hdf5; export prefix; \ - ./configure --prefix=$(ROOT)/$(HDF5)/hdf5 --enable-build-mode=production \ - --enable-trace --enable-fortran --enable-using-memchecker ;\ - make install; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/bin/ $(HDF5_PREFIX)/bin; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/lib/ $(HDF5_PREFIX)/lib; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/include/ $(HDF5_PREFIX)/include; \ - cd $(HDF5_PREFIX)/bin; $(ROOT)/$(HDF5)/hdf5/bin/h5redeploy -force ) -$(HDF5)_INSTALL: $(HDF5) - -rm -rf $(HDF5)_install - echo "final HDF5 install in "$(CBF_PREFIX) - rsync -avz $(ROOT)/$(HDF5)/hdf5/bin/ $(CBF_PREFIX)/bin; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/lib/ $(CBF_PREFIX)/lib; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/include/ $(CBF_PREFIX)/include; \ - cd $(CBF_PREFIX)/bin; $(ROOT)/$(HDF5)/hdf5/bin/h5redeploy -force -endif - - -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -# -# LZ4 -# -build_lz4: $(M4)/Makefile.m4 - touch build_lz4 -$(LZ4): $(HDF5) build_lz4 - mkdir -p $(SOLIB) - -rm -rf $(LZ4) -ifneq ($(MSYS2),yes) - -rm -rf $(LZ4).tar.gz - $(DOWNLOAD) $(LZ4_URL) - tar -xvf $(LZ4).tar.gz - -rm $(LZ4).tar.gz - (cp $(LZ4include)/lz4.h $(INCLUDE); \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/lz4.c -o lz4.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/h5zlz4.c -o h5zlz4.o; \ - $(CC) -shared lz4.o h5zlz4.o -o $(SOLIB)/libh5zlz4.so; \ - rm lz4.o h5zlz4.o) -else - git clone $(LZ4_URL) - (cd $(LZ4); mkdir build; cd build; cmake .. -G 'MSYS Makefiles' -DENABLE_LZ4_PLUGIN="yes"; make all; cp plugins/* $(SOLIB)) -endif - touch $(LZ4) -endif - - -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -# -# BSHUF -# -build_BSHUF: $(M4)/Makefile.m4 - touch build_BSHUF -$(BSHUF): $(HDF5) build_BSHUF $(LZ4dep) - mkdir -p $(SOLIB) - -rm -rf $(BSHUF) - -rm -rf $(BSHUF).tar.gz - -rm -rf *.o - $(DOWNLOAD) $(BSHUFURL) - tar -xvf $(BSHUF).tar.gz - -rm $(BSHUF).tar.gz - (cp $(BSHUFinclude)/bitshuffle.h \ - $(BSHUFinclude)/bitshuffle_core.h \ - $(BSHUFinclude)/bitshuffle_internals.h \ - $(BSHUFinclude)/bshuf_h5filter.h $(BSHUFinclude)/iochain.h $(INCLUDE); \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bshuf_h5plugin.c -o bshuf_h5plugin.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/iochain.c -o iochain.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o; \ - $(CC) -shared bshuf_h5filter.o bitshuffle.o bitshuffle_core.o iochain.o lz4.o $(HDF5SOLIBS_LOCAL) $(HDF5SOLIBS_SYSTEM)\ - -o $(SOLIB)/libh5zbshuf.so; \ - $(CC) -shared bshuf_h5filter.o bitshuffle.o bitshuffle_core.o lz4.o bshuf_h5plugin.o iochain.o \ - $(HDF5SOLIBS_LOCAL) \ - $(HDF5SOLIBS_SYSTEM) -o $(SOLIB)/$(BSHUFFILTER).so; \ - rm bshuf_h5filter.o bitshuffle.o lz4.o iochain.o bshuf_h5plugin.o) - touch $(BSHUF) -endif - - -# -# Directories -# -$(CBF_PREFIX): - mkdir -p $(CBF_PREFIX) - -$(CBF_PREFIX)/lib: $(CBF_PREFIX) - mkdir -p $(CBF_PREFIX)/lib - -$(CBF_PREFIX)/bin: $(CBF_PREFIX) - mkdir -p $(CBF_PREFIX)/bin - -$(CBF_PREFIX)/include: $(CBF_PREFIX) - mkdir -p $(CBF_PREFIX)/include - -$(CBF_PREFIX)/include/cbflib: $(CBF_PREFIX)/include - mkdir -p $(CBF_PREFIX)/include/cbflib - - - -$(LIB): - mkdir -p $@ - -$(BIN): - mkdir -p $@ - -$(SOLIB): - mkdir -p $@ - -$(JCBF): - mkdir -p $@ - -$(MINICBF_TESTS): - mkdir -p $@ - -# -# Parser -# -$(SRC)/cbf_stx.c: $(SRC)/cbf.stx.y - bison $(SRC)/cbf.stx.y -o $(SRC)/cbf.stx.tab.c -d - mv $(SRC)/cbf.stx.tab.c $(SRC)/cbf_stx.c - mv $(SRC)/cbf.stx.tab.h $(INCLUDE)/cbf_stx.h - -# -# CBF library -# -$(LIB)/libcbf.a: $(SOURCE) $(HEADERS) $(COMMONDEP) $(HDF5) $(LZ4DEPS) $(BSHUFDEPS) $(REGEXDEPS) - -rm -f $@ - -rm -f *.o - mkdir -p $(LIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) \ - -DCBF_FILTER_STATIC $(LZ4FLAG) $(BSHUFFLAG) $(PYCIFRWFLAG) $(INCLUDES) $(WARNINGS) -c $(SOURCE) -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -ifneq ($(MSYS2),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(LZ4src)/h5zlz4.c -o h5zlz4.o -else - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(LZ4)/LZ4/src/H5Zlz4.c -o h5zlz4.o -endif -endif -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/iochain.c -o iochain.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o -endif - $(AR) cr $@ *.o -ifneq ($(RANLIB),) - $(RANLIB) $@ -endif - -rm -f *.o - -$(SOLIB)/libcbf.so: $(SOURCE) $(HEADERS) $(COMMONDEP) $(HDF5) $(LZ4DEPS) $(BSHUFDEPS) - -rm -f $@ - -rm -f *.o - mkdir -p $(SOLIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(LZ4FLAG) $(BSHUFFLAG) $(PYCIFRWFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(SOURCE) -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -ifneq ($(MSYS2),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(LZ4src)/h5zlz4.c -o h5zlz4.o -else - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(LZ4)/LZ4/src/H5Zlz4.c -o h5zlz4.o -endif -endif -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle..o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/iochain.c -o iochain.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o -endif - - $(CC) -o $@ *.o $(SOLDFLAGS) $(EXTRALIBS) $(REGEX_LIBS) $(HDF5SOLIBS_LOCAL) $(HDF5SOLIBS_SYSTEM) - -rm -f *.o - -# -# IMG library -# -$(LIB)/libimg.a: $(SRC)/img.c $(HEADERS) $(COMMONDEP) - mkdir -p $(LIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) -c $(SRC)/img.c - $(AR) cr $@ img.o -ifneq ($(RANLIB),) - $(RANLIB) $@ -endif - rm img.o - -$(SOLIB)/libimg.so: $(SOURCE) $(HEADERS) $(COMMONDEP) - -rm -f $@ - mkdir -p $(SOLIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(SRC)/img.c - $(CC) -o $@ img.o $(SOLDFLAGS) - rm img.o - -# -# CBF and IMG libraries -# -CBF_IMG_LIBS: $(LIB)/libcbf.a $(LIB)/libimg.a - - -# -# FCB library -# -$(LIB)/libfcb.a: $(F90SOURCE) $(COMMONDEP) $(HDF5) - mkdir -p $(LIB) -ifneq ($(F90C),) - $(F90C) $(F90FLAGS) -c $(F90SOURCE) - $(AR) cr $@ *.o -ifneq ($(RANLIB),) - $(RANLIB) $@ -endif - rm *.o -else - echo "Define F90C to build $(LIB)/libfcb.a" -endif - -$(SOLIB)/libfcb.so: $(F90SOURCE) $(HEADERS) $(COMMONDEP) $(SOLIB) -ifneq ($(F90C),) - -rm -f $@ - mkdir -p $(SOLIB) - $(F90C) $(F90FLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(F90SOURCE) - $(F90C) $(F90FLAGS) -o $@ *.o $(SOLDFLAGS) - rm *.o -else - echo "Define F90C to build $(SOLIB)/libfcb.so" -endif - - -# -# Python bindings -# -$(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ - $(PYCBF)/$(SETUP_PY) \ - $(PYCBF)/pycbf.i \ - $(PYCBF)/cbfhandlewrappers.i \ - $(PYCBF)/cbfdetectorwrappers.i \ - $(PYCBF)/cbfgenericwrappers.i \ - $(PYCBF)/cbfgoniometerwrappers.i - -cp $(SOLIB)/*.so $(LIB) - (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) - -$(PYCBF)/pycbfinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --prefix=$(CBF_PREFIX)) - -$(PYCBF)/pycbfuserinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --user) - -$(PYCBF)/setup.py: $(M4)/setup_py.m4 - (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ - -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) - -$(PYCBF)/setup_MINGW.py: m4/setup_py.m4 - (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ - -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) - -$(LIB)/_pycbf.$(PYCBFEXT): $(PYCBF)/_pycbf.$(PYCBFEXT) - mkdir -p $(LIB) - cp $(PYCBF)/_pycbf.$(PYCBFEXT) $(LIB)/_pycbf.$(PYCBFEXT) - -$(PYCBF)/pycbf.pdf: $(PYCBF)/pycbf.w - (cd $(PYCBF); \ - $(NUWEB) pycbf; \ - latex pycbf; \ - $(NUWEB) pycbf; \ - latex pycbf; \ - dvipdfm pycbf ) - -$(PYCBF)/CBFlib.txt: $(DOC)/CBFlib.html - links -dump $(DOC)/CBFlib.html > $(PYCBF)/CBFlib.txt - -$(PYCBF)/cbfhandlewrappers.i \ -$(PYCBF)/cbfdetectorwrappers.i \ -$(PYCBF)/cbfgenericwrappers.i \ -$(PYCBF)/cbfgoniometerwrappers.i: $(PYCBF)/CBFlib.txt $(PYCBF)/make_pycbf.py - (cd $(PYCBF); $(PYTHON) make_pycbf.py; $(PYSWIG) pycbf.i; $(PYTHON) setup.py build) - - -# -# Java bindings -# -$(JCBF)/cbflib-$(VERSION).jar: $(JCBF) $(SRC)/jcbf.i - $(JSWIG) -I$(INCLUDE) -package org.iucr.cbflib -outdir $(JCBF) -o $(JCBF)/jcbf_wrap.c $(SRC)/jcbf.i - $(JAVAC) -d . $(JCBF)/*.java - $(JAR) cf $@ org - -$(SOLIB)/libcbf_wrap.so: $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf.so - mkdir -p $(SOLIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) $(JAVAINCLUDES) -c $(JCBF)/jcbf_wrap.c - $(CC) -o $@ jcbf_wrap.o $(SOLDFLAGS) -L$(SOLIB) -lcbf $(REGEX_LIBS) - rm jcbf_wrap.o - -# -# F90SOURCE -# -$(SRC)/fcb_exit_binary.f90: $(M4)/fcb_exit_binary.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_exit_binary.m4) > $(SRC)/fcb_exit_binary.f90 -$(SRC)/fcb_next_binary.f90: $(M4)/fcb_next_binary.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_next_binary.m4) > $(SRC)/fcb_next_binary.f90 -$(SRC)/fcb_open_cifin.f90: $(M4)/fcb_open_cifin.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_open_cifin.m4) > $(SRC)/fcb_open_cifin.f90 -$(SRC)/fcb_packed.f90: $(M4)/fcb_packed.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_packed.m4) > $(SRC)/fcb_packed.f90 -$(SRC)/fcb_read_bits.f90: $(M4)/fcb_read_bits.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_read_bits.m4) > $(SRC)/fcb_read_bits.f90 -$(SRC)/fcb_read_image.f90: $(M4)/fcb_read_image.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_read_image.m4) > $(SRC)/fcb_read_image.f90 -$(SRC)/fcb_read_xds_i2.f90: $(M4)/fcb_read_xds_i2.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_read_xds_i2.m4) > $(SRC)/fcb_read_xds_i2.f90 -$(EXAMPLES)/test_fcb_read_image.f90: $(M4)/test_fcb_read_image.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) test_fcb_read_image.m4) > $(EXAMPLES)/test_fcb_read_image.f90 -$(EXAMPLES)/test_xds_binary.f90: $(M4)/test_xds_binary.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) test_xds_binary.m4) > $(EXAMPLES)/test_xds_binary.f90 - -# -# convert_image example program -# -$(BIN)/convert_image: $(LIB)/libcbf.a $(EXAMPLES)/convert_image.c $(SRC)/img.c \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/convert_image.c $(SRC)/img.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ -# -# convert_minicbf example program -# -$(BIN)/convert_minicbf: $(LIB)/libcbf.a $(EXAMPLES)/convert_minicbf.c \ - $(GOPTLIB) $(GOPTINC) $(EXAMPLES)/batch_convert_minicbf.sh - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/convert_minicbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - chmod 755 $(EXAMPLES)/batch_convert_minicbf.sh - -# -# makecbf example program -# -$(BIN)/makecbf: $(LIB)/libcbf.a $(EXAMPLES)/makecbf.c $(LIB)/libimg.a - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/makecbf.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - - -# -# adscimg2cbf example program -# -$(BIN)/adscimg2cbf: $(LIB)/libcbf.a $(EXAMPLES)/adscimg2cbf.c $(EXAMPLES)/adscimg2cbf_sub.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/adscimg2cbf.c $(EXAMPLES)/adscimg2cbf_sub.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# cbf2adscimg example program -# -$(BIN)/cbf2adscimg: $(LIB)/libcbf.a $(EXAMPLES)/cbf2adscimg.c $(EXAMPLES)/cbf2adscimg_sub.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf2adscimg.c $(EXAMPLES)/cbf2adscimg_sub.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# cbf_standardize_numbers example program -# -$(BIN)/cbf_standardize_numbers: $(EXAMPLES)/cbf_standardize_numbers.c $(EXAMPLES)/cbf_standardize_numbers.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf_standardize_numbers.c $(SRC_FGETLN) $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@ - -# -# changtestcompression example program -# -$(BIN)/changtestcompression: $(LIB)/libcbf.a $(EXAMPLES)/changtestcompression.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/changtestcompression.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# img2cif example program -# -$(BIN)/img2cif: $(LIB)/libcbf.a $(EXAMPLES)/img2cif.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOTPINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/img2cif.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# cif2cbf example program -# -$(BIN)/cif2cbf: $(LIB)/libcbf.a $(EXAMPLES)/cif2cbf.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cif2cbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# cbf2nexus example program -# -$(BIN)/cbf2nexus: $(LIB)/libcbf.a $(EXAMPLES)/cbf2nexus.c \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf2nexus.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) \ - -lhdf5 -limg -o $@ - -# -# minicbf2nexus example program -# -$(BIN)/minicbf2nexus: $(LIB)/libcbf.a $(EXAMPLES)/minicbf2nexus.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/minicbf2nexus.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# nexus2cbf example program -# -$(BIN)/nexus2cbf: $(LIB)/libcbf.a $(EXAMPLES)/nexus2cbf.c \ - $(GOPTLIB) $(GOPTINC) $(REGEX) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/nexus2cbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# roi_peaksearch example program -# -$(BIN)/roi_peaksearch: $(LIB)/libcbf.a $(EXAMPLES)/roi_peaksearch.c \ - $(EXAMPLES)/dps_peaksearch.c $(EXAMPLES)/dps_peaksearch.h $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/roi_peaksearch.c $(EXAMPLES)/dps_peaksearch.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - - -# -# dectris cbf_template_t program -# -$(BIN)/cbf_template_t: $(DECTRIS_EXAMPLES)/cbf_template_t.c \ - $(DECTRIS_EXAMPLES)/mx_cbf_t_extras.h \ - $(DECTRIS_EXAMPLES)/mx_parms.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -I $(DECTRIS_EXAMPLES) $(WARNINGS) \ - $(DECTRIS_EXAMPLES)/cbf_template_t.c -o $@ - -# -# testcell example program -# -$(BIN)/testcell: $(LIB)/libcbf.a $(EXAMPLES)/testcell.C - mkdir -p $(BIN) - $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testcell.C -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# cif2c example program -# -$(BIN)/cif2c: $(LIB)/libcbf.a $(EXAMPLES)/cif2c.c - mkdir -p $(BIN) - $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cif2c.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# sauter_test example program -# -$(BIN)/sauter_test: $(LIB)/libcbf.a $(EXAMPLES)/sauter_test.C - mkdir -p $(BIN) - $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/sauter_test.C -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# sequence_match example program -# -$(BIN)/sequence_match: $(LIB)/libcbf.a $(EXAMPLES)/sequence_match.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/sequence_match.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# tiff2cbf example program -# -$(BIN)/tiff2cbf: $(LIB)/libcbf.a $(EXAMPLES)/tiff2cbf.c \ - $(GOPTLIB) $(GOPTINC) $(TIFF) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - -I$(TIFF)/libtiff $(EXAMPLES)/tiff2cbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf -L$(TIFF_PREFIX)/lib -ltiff $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# Andy Arvai's buffered read test program -# -$(BIN)/arvai_test: $(LIB)/libcbf.a $(EXAMPLES)/arvai_test.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/arvai_test.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# testreals example program -# -$(BIN)/testreals: $(LIB)/libcbf.a $(EXAMPLES)/testreals.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testreals.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# testflat example program -# -$(BIN)/testflat: $(LIB)/libcbf.a $(EXAMPLES)/testflat.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testflat.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ -# -# testflatpacked example program -# -$(BIN)/testflatpacked: $(LIB)/libcbf.a $(EXAMPLES)/testflatpacked.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testflatpacked.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -ifneq ($(F90C),) -# -# test_xds_binary example program -# -$(BIN)/test_xds_binary: $(LIB)/libfcb.a $(EXAMPLES)/test_xds_binary.f90 - mkdir -p $(BIN) - $(F90C) $(F90FLAGS) $(F90LDFLAGS) $(EXAMPLES)/test_xds_binary.f90 \ - -L$(LIB) -lfcb -o $@ - -# -# test_fcb_read_image example program -# -$(BIN)/test_fcb_read_image: $(LIB)/libfcb.a $(EXAMPLES)/test_fcb_read_image.f90 - mkdir -p $(BIN) - $(F90C) $(F90FLAGS) $(F90LDFLAGS) $(EXAMPLES)/test_fcb_read_image.f90 \ - -L$(LIB) -lfcb -o $@ -endif - -# -# testcbf (C) -# -$(BIN)/ctestcbf: $(EXAMPLES)/testcbf.c $(LIB)/libcbf.a - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testcbf.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# testcbf (Java) -# -$(BIN)/testcbf.class: $(EXAMPLES)/testcbf.java $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so - mkdir -p $(BIN) - $(JAVAC) -cp $(JCBF)/cbflib-$(VERSION).jar -d $(BIN) $(EXAMPLES)/testcbf.java - -ifneq ($(CBF_USE_ULP),) -# -# testulp test program -# -$(BIN)/testulp: $(LIB)/libcbf.a $(EXAMPLES)/testulp.c $(EXAMPLES)/unittest.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/testulp.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ -endif - -# -# testhdf5 test program -# -$(BIN)/testhdf5: $(LIB)/libcbf.a $(EXAMPLES)/testhdf5.c $(EXAMPLES)/unittest.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/testhdf5.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) \ - -o $@.tmp - mv $@.tmp $@ - -# -# testalloc test program -# -$(BIN)/testalloc: $(LIB)/libcbf.a $(EXAMPLES)/testalloc.c $(EXAMPLES)/unittest.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/testalloc.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ - -# -# test_cbf_airy_disk test program -# -$(BIN)/test_cbf_airy_disk: $(LIB)/libcbf.a $(EXAMPLES)/test_cbf_airy_disk.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/test_cbf_airy_disk.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ - -# -# cbf_testxfelread: test program -# -$(BIN)/cbf_testxfelread: $(LIB)/libcbf.a $(EXAMPLES)/cbf_testxfelread.c $(EXAMPLES)/cbf_testxfelread.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf_testxfelread.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ - -# -# Data files for tests -# - -$(DATADIRI): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLI)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Input.tar.gz) - touch $(DATADIRI) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Input.tar.gz) - -$(DATADIRO): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLO)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output.tar.gz) - touch $(DATADIRO) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output.tar.gz) - -$(DATADIRS): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLS)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - touch $(DATADIRS) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - - -# Input Data Files - -TESTINPUT_BASIC = example.mar2300 -DATADIRI_INPUT_BASIC = $(DATADIRI)/example.mar2300 - - -TESTINPUT_EXTRA = \ - 1191_00005.cbf \ - 9ins.cif \ - hit-20140306005258847.cbf \ - insulin_pilatus6m.cbf \ - mb_LP_1_001.img \ - testflatin.cbf \ - testflatpackedin.cbf \ - testrealin.cbf \ - thaumatin_die_M1S5_1_0005_2.cbf \ - X4_lots_M1S4_1_0001.cbf \ - X4_lots_M1S4_1_0002.cbf \ - X4_lots_M1S4_1_0003.cbf \ - X4_lots_M1S4_1_0004.cbf \ - X4_lots_M1S4_1_0005.cbf \ - XRD1621.tif - - - -DATADIRI_INPUT_EXTRA = \ - $(DATADIRI)/1191_00005.cbf \ - $(DATADIRI)/9ins.cif \ - $(DATADIRI)/hit-20140306005258847.cbf \ - $(DATADIRI)/insulin_pilatus6m.cbf \ - $(DATADIRI)/mb_LP_1_001.img \ - $(DATADIRI)/testflatin.cbf \ - $(DATADIRI)/testflatpackedin.cbf \ - $(DATADIRI)/testrealin.cbf \ - $(DATADIRI)/thaumatin_die_M1S5_1_0005_2.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0001.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0002.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0003.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0004.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0005.cbf \ - $(DATADIRI)/XRD1621.tif - - -# Output Data Files - -TESTOUTPUT = adscconverted_flat_orig.cbf \ - adscconverted_orig.cbf converted_flat_orig.cbf converted_orig.cbf \ - insulin_pilatus6mconverted_orig.cbf.h5.cbf \ - insulin_pilatus6mconverted_orig.cbf.h5 \ - insulin_pilatus6mconverted_v2_orig.cbf \ - mb_LP_1_001_orig.cbf testcell_orig.prt \ - test_xds_bin_testflatout_orig.out \ - test_xds_bin_testflatpackedout_orig.out test_fcb_read_testflatout_orig.out \ - test_fcb_read_testflatpackedout_orig.out \ - XRD1621_orig.cbf XRD1621_I4encbC100_orig.cbf \ - minicbf_orig.h5 -NEWTESTOUTPUT = adscconverted_flat.cbf \ - adscconverted.cbf converted_flat.cbf converted.cbf \ - insulin_pilatus6mconverted.cbf \ - insulin_pilatus6mconverted.cbf.h5 \ - insulin_pilatus6mconverted.cbf.h5.cbf \ - insulin_pilatus6mconverted_v2.cbf \ - mb_LP_1_001.cbf testcell.prt \ - test_xds_bin_testflatout.out \ - test_xds_bin_testflatpackedout.out test_fcb_read_testflatout.out \ - test_fcb_read_testflatpackedout.out \ - XRD1621.cbf XRD1621_I4encbC100.cbf \ - $(MINICBF_TEST)/minicbf.h5 -DATADIRO_OUTPUT = $(DATADIRO)/adscconverted_flat_orig.cbf \ - $(DATADIRO)/adscconverted_orig.cbf \ - $(DATADIRO)/converted_flat_orig.cbf \ - $(DATADIRO)/converted_orig.cbf \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5 \ - $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf \ - $(DATADIRO)/mb_LP_1_001_orig.cbf \ - $(DATADIRO)/testcell_orig.prt \ - $(DATADIRO)/test_xds_bin_testflatout_orig.out \ - $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out \ - $(DATADIRO)/test_fcb_read_testflatout_orig.out \ - $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out \ - $(DATADIRO)/XRD1621_orig.cbf \ - $(DATADIRO)/XRD1621_I4encbC100_orig.cbf \ - $(DATADIRO)/minicbf_orig.h5 -DATADIRO_OUTPUT_SIGNATURES = $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) \ - $(DATADIRO)/adscconverted_orig.cbf$(SEXT) \ - $(DATADIRO)/converted_flat_orig.cbf$(SEXT) \ - $(DATADIRO)/converted_orig.cbf$(SEXT) \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ - $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ - $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) \ - $(DATADIRO)/testcell_orig.prt$(SEXT) \ - $(DATADIRO)/test_xds_bin_testflatout_orig.out$(SEXT) \ - $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRO)/test_fcb_read_testflatout_orig.out$(SEXT) \ - $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRO)/XRD1621_orig.cbf$(SEXT) \ - $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) \ - $(DATADIRO)/minicbf_orig.h5$(SEXT) - - - -# Output Data File Signatures - -TESTOUTPUTSIGS = adscconverted_flat_orig.cbf$(SEXT) \ - adscconverted_orig.cbf$(SEXT) converted_flat_orig.cbf$(SEXT) converted_orig.cbf$(SEXT) \ - insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ - insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ - insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ - mb_LP_1_001_orig.cbf$(SEXT) testcell_orig.prt$(SEXT) \ - test_xds_bin_testflatout_orig.out$(SEXT) \ - test_xds_bin_testflatpackedout_orig.out$(SEXT) test_fcb_read_testflatout_orig.out$(SEXT) \ - test_fcb_read_testflatpackedout_orig.out$(SEXT) \ - XRD1621_orig.cbf$(SEXT) \ - XRD1621_I4encbC100_orig.cbf$(SEXT) \ - minicbf_orig.h5$(SEXT) -DATADIRS_OUTPUT_SIGNATURES = $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) \ - $(DATADIRS)/adscconverted_orig.cbf$(SEXT) \ - $(DATADIRS)/converted_flat_orig.cbf$(SEXT) \ - $(DATADIRS)/converted_orig.cbf$(SEXT) \ - $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ - $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ - $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ - $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) \ - $(DATADIRS)/testcell_orig.prt$(SEXT) \ - $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) \ - $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) \ - $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRS)/XRD1621_orig.cbf$(SEXT) \ - $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) \ - $(DATADIRS)/minicbf_orig.h5$(SEXT) - -# Fetch Input Data Files - -$(TESTINPUT_BASIC): $(DATADIRI) $(DATADIRI_INPUT_BASIC) - cp $(DATADIRI)/$@ $@ - cp $(DATADIRI)/$@$(SEXT) $@$(SEXT) - -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) - -$(TESTINPUT_EXTRA): $(DATADIRI) $(DATADIRI_INPUT_EXTRA) - cp $(DATADIRI)/$@ $@ - cp $(DATADIRI)/$@$(SEXT) $@$(SEXT) - -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) - - -# Fetch Output Data Files and Signatures - -$(TESTOUTPUT): $(DATADIRO) $(DATADIRO_OUTPUT) $(DATADIRO_OUTPUT_SIGNATURES) - cp $(DATADIRO)/$@ $@ - cp $(DATADIRO)/$@$(SEXT) $@$(SEXT) - -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) - -# Fetch Output Data File Signatures - -$(TESTOUTPUTSIGS): $(DATADIRS) $(DATADIRS_OUTPUT_SIGNATURES) - cp $(DATADIRS)/$@ $@ - - - -# -# Tests -# - - -tests: all $(LIB) $(BIN) symlinksdone basic extra dectristests pycbftests -tests_sigs_only: $(LIB) $(BIN) symlinksdone basic extra_sigs_only -restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 - $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < adscconverted.cbf > $(DATADIRO)/adscconverted_orig.cbf$(SEXT) - $(SIGNATURE) < converted_flat.cbf > $(DATADIRO)/converted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < converted.cbf > $(DATADIRO)/converted_orig.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5 > $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5.cbf > $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) - $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) - $(SIGNATURE) < testcell.prt > $(DATADIRO)/testcell_orig.prt$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRO)/test_xds_bin_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRO)/test_fcb_read_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < XRD1621.cbf > $(DATADIRO)/XRD1621_orig.cbf$(SEXT) - $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) - $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRO)/minicbf_orig.h5$(SEXT) - cp adscconverted_flat.cbf $(DATADIRO)/adscconverted_flat_orig.cbf$ - cp adscconverted.cbf $(DATADIRO)/adscconverted_orig.cbf - cp converted_flat.cbf $(DATADIRO)/converted_flat_orig.cbf - cp converted.cbf $(DATADIRO)/converted_orig.cbf - cp insulin_pilatus6mconverted.cbf.h5 $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5 - cp insulin_pilatus6mconverted.cbf.h5.cbf $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf - cp insulin_pilatus6mconverted_v2.cbf $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf - cp mb_LP_1_001.cbf$ $(DATADIRO)/mb_LP_1_001_orig.cbf - cp testcell.prt $(DATADIRO)/testcell_orig.prt - cp test_xds_bin_testflatout.out $(DATADIRO)/test_xds_bin_testflatout_orig.out - cp test_xds_bin_testflatpackedout.out $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out - cp test_fcb_read_testflatout.out $(DATADIRO)/test_fcb_read_testflatout_orig.out - cp test_fcb_read_testflatpackedout.out $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out - cp XRD1621.cbf $(DATADIRO)/XRD1621_orig.cbf - cp XRD1621_I4encbC100.cbf $(DATADIRO)/XRD1621_I4encbC100_orig.cbf - cp $(MINICBF_TEST)/minicbf.h5 $(DATADIRO)/minicbf_orig.h5 - -restore_sigs_only: $(NEWTESTOUTPUT) $(DATADIRS) - $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < adscconverted.cbf > $(DATADIRS)/adscconverted_orig.cbf$(SEXT) - $(SIGNATURE) < converted_flat.cbf > $(DATADIRS)/converted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < converted.cbf > $(DATADIRS)/converted_orig.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5 > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5.cbf > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) - $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) - $(SIGNATURE) < testcell.prt > $(DATADIRS)/testcell_orig.prt$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < XRD1621.cbf > $(DATADIRS)/XRD1621_orig.cbf$(SEXT) - $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) - $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRS)/minicbf_orig.h5$(SEXT) -restore_signatures: restore_output restore_sigs_only - -# -# Basic Tests -# - -basic: $(BIN)/makecbf $(BIN)/img2cif $(BIN)/cif2cbf $(TESTINPUT_BASIC) - $(LDPREFIX) $(BIN)/makecbf example.mar2300 makecbf.cbf - $(LDPREFIX) $(BIN)/img2cif -c flatpacked -m headers -d digest \ - -e base64 example.mar2300 img2cif_packed.cif - $(LDPREFIX) $(BIN)/img2cif -c canonical -m headers -d digest \ - -e base64 example.mar2300 img2cif_canonical.cif - $(LDPREFIX) $(BIN)/img2cif -c flatpacked -m headers -d digest \ - -e none example.mar2300 img2cif_packed.cbf - $(LDPREFIX) $(BIN)/img2cif -c canonical -m headers -d digest \ - -e none example.mar2300 img2cif_canonical.cbf - $(LDPREFIX) $(BIN)/cif2cbf -e none -c flatpacked \ - img2cif_canonical.cif cif2cbf_packed.cbf - $(LDPREFIX) $(BIN)/cif2cbf -e none -c canonical \ - img2cif_packed.cif cif2cbf_canonical.cbf - -cmp cif2cbf_packed.cbf makecbf.cbf - -cmp cif2cbf_packed.cbf img2cif_packed.cbf - -cmp cif2cbf_canonical.cbf img2cif_canonical.cbf - - -# -# Extra Tests -# -$(MINICBF_TEST)/minicbf.h5: - cd $(MINICBF_TEST); $(LDPREFIX) $(TIME) $(BIN)/minicbf2nexus -c zlib \ - -C config $(HDF5REGISTER) -o minicbf.h5 ../X4_lots_M1S4_1_*.cbf -mb_LP_1_001.cbf: - $(LDPREFIX) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - - - -ifneq ($(F90C),) -extra: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf \ - $(BIN)/minicbf2nexus $(BIN)/cbf2nexus $(BIN)/nexus2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf \ - $(BIN)/testhdf5 $(BIN)/testalloc \ - $(BIN_TESTULP) \ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUT) $(EXAMPLES)/batch_convert_minicbf.sh \ - $(TEMPLATES)/template_X4_lots_M1S4.cbf -else -extra: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf \ - $(BIN)/minicbf2nexus $(BIN)/cbf2nexus $(BIN)/nexus2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf $(BIN)/cbf2adscimg \ - $(BIN)/testhdf5 $(BIN)/testalloc \ - $(BIN_TESTULP) \ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUT) $(EXAMPLES)/batch_convert_minicbf.sh -endif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e hex -c none \ - makecbf.cbf cif2cbf_ehcn.cif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ - cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf -F example.mar2300 converted_flat.cbf - -cmp converted_flat.cbf converted_flat_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf example.mar2300 converted.cbf - -cmp converted.cbf converted_orig.cbf - -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat > testcell.prt - -cmp testcell.prt testcell_orig.prt - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -cmp adscconverted_flat.cbf adscconverted_flat_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -cmp adscconverted.cbf adscconverted_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -cmp mb_LP_1_001.cbf mb_LP_1_001_orig.cbf -ifneq ($(CLEANTESTS),) - mv mb_LP_1_001.cbf nmb_LP_1_001.cbf -else - cp mb_LP_1_001.cbf nmb_LP_1_001.cbf -endif - $(LDPREFIX) $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf - -cmp nmb_LP_1_001.img mb_LP_1_001.img - rm nmb_LP_1_001.cbf -ifneq ($(CLEANTESTS),) - rm nmb_LP_1_001.img -endif - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -cmp insulin_pilatus6mconverted.cbf insulin_pilatus6mconverted_rev_orig.cbf - -$(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -cmp insulin_pilatus6mconverted_v2.cbf insulin_pilatus6mconverted_v2_orig.cbf - (CBF_CONVERT_MINICBF_PATH=$(BIN); export CBF_CONVERT_MINICBF_PATH; \ - $(LDPREFIX) $(EXAMPLES)/batch_convert_minicbf.sh "." "minicbf_test" \ - "X4_lots_M1S4_1_*.cbf" $(TEMPLATES)/template_X4_lots_M1S4.cbf) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w -O $(HDF5REGISTER) -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encI.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encp.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cb -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encb.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cc -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encc.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cz -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encz.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cl -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encl.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -c2 -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(H5DUMP) insulin_pilatus6mconverted_orig.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted_orig.cbf.h5.dump) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(H5DUMP) insulin_pilatus6mconverted.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted.cbf.h5.dump) - -$(DIFF) insulin_pilatus6mconverted_orig.cbf.h5.dump insulin_pilatus6mconverted.cbf.h5.dump - -rm -f insulin_pilatus6mconverted_orig.cbf.h5.dump - -rm -f insulin_pilatus6mconverted.cbf.h5.dump - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_orig.cbf.h5.cbf -o insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf.h5 -o insulin_pilatus6mconverted.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted.cbf.h5.cbf -o insulin_pilatus6mconverted.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encp.cbf.h5 -o insulin_pilatus6mconverted_encp.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encp.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encb.cbf.h5 -o insulin_pilatus6mconverted_encb.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encb.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encI.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encI.cbf.h5.cbf -o insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encc.cbf.h5 -o insulin_pilatus6mconverted_encc.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encc.cbf.h5.cbf -o insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encz.cbf.h5 -o insulin_pilatus6mconverted_encz.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encz.cbf.h5.cbf -o insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encl.cbf.h5 -o insulin_pilatus6mconverted_encl.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encl.cbf.h5.cbf -o insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_enc2.cbf.h5 -o insulin_pilatus6mconverted_enc2.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_enc2.cbf.h5.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -rm -f insulin_pilatus6mconverted*.cbf.h5.eqcI.cbf - $(LDPREFIX) $(TINE) $(BIN)/test_cbf_airy_disk - $(LDPREFIX) $(TIME) $(BIN)/cbf_testxfelread - $(LDPREFIX) $(TIME) $(BIN)/testalloc - $(LDPREFIX) $(TIME) $(BIN)/testhdf5; rm -f testfile.h5 -ifneq ($(CBF_USE_ULP),) - $(LDPREFIX) $(TIME) $(BIN)/testulp -endif - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/minicbf2nexus -c zlib \ - -C config $(HDF5REGISTER) -o minicbf.h5 ../X4_lots_M1S4_1_*.cbf - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) ../minicbf_orig.h5 | $(ALLBUTONE) > minicbf_original.dump - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) minicbf.h5 | $(ALLBUTONE) > minicbf.dump - -cd $(MINICBF_TEST); $(DIFF) minicbf_original.dump minicbf.dump - $(LDPREFIX) cd $(MINICBF_TEST); rm -f minicbf_original.dump - $(LDPREFIX) cd $(MINICBF_TEST); rm -f minicbf.dump - #cd $(MINICBF_TEST); rm -f minicbf.h5 - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/cbf2nexus -c zlib \ - --list -o i19-1.h5 ../1191_00005.cbf - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/nexus2cbf \ - -o i19-1.cbf i19-1.h5 - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/cbf2nexus -c zlib \ - --list -o i19-2.h5 i19-1.cbf - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/nexus2cbf \ - -o i19-2.cbf i19-2.h5 - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) i19-1.h5 | $(ALLBUTONE) > i19-1.dump - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) i19-2.h5 | $(ALLBUTONE) > i19-2.dump - -cd $(MINICBF_TEST); $(DIFF) i19-1.dump i19-2.dump - -cd $(MINICBF_TEST); $(DIFF) i19-1.cbf i19-2.cbf - $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf -ifneq ($(F90C),) - $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatout.out) - -$(DIFF) test_xds_bin_testflatout.out test_xds_bin_testflatout_orig.out - $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatpackedout.out) - -$(DIFF) test_xds_bin_testflatpackedout.out test_xds_bin_testflatpackedout_orig.out - $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatout.out) - -$(DIFF) test_fcb_read_testflatout.out test_fcb_read_testflatout_orig.out - $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatpackedout.out) - -$(DIFF) test_fcb_read_testflatpackedout.out test_fcb_read_testflatpackedout_orig.out -endif - $(LDPREFIX) $(TIME) $(BIN)/sauter_test - $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - -$(DIFF) XRD1621.cbf XRD1621_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(DIFF) XRD1621_I4encbC100.cbf XRD1621_I4encbC100_orig.cbf - -ifneq ($(F90C),) -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf \ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -else -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf\ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -endif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e hex -c none \ - makecbf.cbf cif2cbf_ehcn.cif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ - cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F example.mar2300 converted_flat.cbf - -$(SIGNATURE) < converted_flat.cbf | $(DIFF) - converted_flat_orig.cbf$(SEXT); rm converted_flat.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image example.mar2300 converted.cbf - -$(SIGNATURE) < converted.cbf | $(DIFF) - converted_orig.cbf$(SEXT); rm converted.cbf - -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat | \ - $(SIGNATURE) | $(DIFF) - testcell_orig.prt$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -$(SIGNATURE) < adscconverted_flat.cbf | $(DIFF) - adscconverted_flat_orig.cbf$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -$(SIGNATURE) < adscconverted.cbf | $(DIFF) - adscconverted_orig.cbf$(SEXT); rm adscconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -$(SIGNATURE) < mb_LP_1_001.cbf | $(DIFF) - mb_LP_1_001_orig.cbf$(SEXT) - mv mb_LP_1_001.cbf nmb_LP_1_001.cbf - $(LDPREFIX) $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf - -cmp nmb_LP_1_001.img mb_LP_1_001.img - rm nmb_LP_1_001.cbf - rm nmb_LP_1_001.img - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted.cbf | $(DIFF) - insulin_pilatus6mconverted_rev_orig.cbf$(SEXT); rm insulin_pilatus6mconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf | $(DIFF) - insulin_pilatus6mconverted_v2_orig.cbf$(SEXT); rm insulin_pilatus6mconverted_v2.cbf - $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf -ifneq ($(F90C),) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatpackedout_orig.out$(SEXT) -endif - $(LDPREFIX) $(TIME) $(BIN)/sauter_test - $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(SIGNATURE) < XRD1621.cbf | $(DIFF) - XRD1621_orig.cbf$(SEXT); rm XRD1621.cbf - -$(SIGNATURE) < XRD1621_I4encbC100.cbf | $(DIFF) - XRD1621_I4encbC100_orig.cbf$(SEXT); rm XRD1621_I4encbC100.cbf - @-rm -f adscconverted_flat.cbf - @-rm -f $(TESTINPUT_BASIC) $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) - @-rm -f cif2cbf_packed.cbf makecbf.cbf \ - cif2cbf_packed.cbf img2cif_packed.cbf \ - cif2cbf_canonical.cbf img2cif_canonical.cbf - @-rm -f testrealout.cbf testflatout.cbf testflatpackedout.cbf \ - cif2cbf_encp.cbf img2cif_canonical.cif img2cif_packed.cif 9ins.cbf - - - -pycbftests: $(PYCBF)/_pycbf.$(PYCBFEXT) $(BIN)/cbf_standardize_numbers - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test1.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test2.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test3.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test4.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test1.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test2.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py ../hit-20140306005258847.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test1_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test1.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test2_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test2.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test3_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test3.out - - -pycbfinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfinstall - -pycbfuserinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfuserinstall - -javatests: $(BIN)/ctestcbf $(BIN)/testcbf.class $(SOLIB)/libcbf_wrap.so - $(LDPREFIX) $(BIN)/ctestcbf > testcbfc.txt - $(LDPREFIX) java -cp $(JCBF)/cbflib-$(VERSION).jar:$(BIN) testcbf > testcbfj.txt - $(DIFF) testcbfc.txt testcbfj.txt - -dectristests: $(BIN)/cbf_template_t $(TEMPLATES)/cbf_test_orig.out - $(LDPREFIX) (cd templates; ../bin/cbf_template_t; diff -a -u cbf_test_orig.out cbf_template_t.out) - -# -# Remove all non-source files -# -empty: - @-rm -rf $(LIB)/* - @-rm -rf $(INCLUDE)/bitshuf* - @-rm -rf $(INCLUDE)/bshuf* - @-rm -rf $(INCLUDE)/H5* - @-rm -rf $(BIN)/* - @-rm -f $(PYCBF)/_pycbf.$(PYCBFEXT) - @-rm -rf $(PYCBF)/build/* - @-rm -f $(PYCBF)/newtest1.cbf - @-rm -f $(PYCBF)/fel_test1.out - @-rm -f $(PYCBF)/fel_test2.out - @-rm -f $(PYCBF)/setup.py - @-rm -f $(PYCBF)/setup_MINGW.py - @-rm -f makecbf.cbf - @-rm -f img2cif_packed.cif - @-rm -f img2cif_canonical.cif - @-rm -f img2cif_packed.cbf - @-rm -f img2cif_canonical.cbf - @-rm -f img2cif_raw.cbf - @-rm -f cif2cbf_packed.cbf - @-rm -f cif2cbf_canonical.cbf - @-rm -f converted.cbf - @-rm -f adscconverted.cbf - @-rm -f converted_flat.cbf - @-rm -f adscconverted_flat.cbf - @-rm -f adscconverted_flat_rev.cbf - @-rm -f mb_LP_1_001.cbf - @-rm -f cif2cbf_ehcn.cif - @-rm -f cif2cbf_encp.cbf - @-rm -f 9ins.cbf - @-rm -f 9ins.cif - @-rm -f testcell.prt - @-rm -f example.mar2300 - @-rm -f converted_orig.cbf - @-rm -f adscconverted_orig.cbf - @-rm -f converted_flat_orig.cbf - @-rm -f adscconverted_flat_orig.cbf - @-rm -f adscconverted_flat_rev_orig.cbf - @-rm -f mb_LP_1_001_orig.cbf - @-rm -f insulin_pilatus6mconverted*.cbf - @-rm -f insulin_pilatus6mconverted*.h5 - @-rm -f insulin_pilatus6m.cbf - @-rm -f testrealin.cbf - @-rm -f testrealout.cbf - @-rm -f testflatin.cbf - @-rm -f testflatout.cbf - @-rm -f testflatpackedin.cbf - @-rm -f testflatpackedout.cbf - @-rm -f CTC.cbf - @-rm -f test_fcb_read_testflatout.out - @-rm -f test_fcb_read_testflatpackedout.out - @-rm -f test_xds_bin_testflatpackedout.out - @-rm -f test_xds_bin_testflatout.out - @-rm -f test_fcb_read_testflatout_orig.out - @-rm -f test_fcb_read_testflatpackedout_orig.out - @-rm -f test_xds_bin_testflatpackedout_orig.out - @-rm -f test_xds_bin_testflatout_orig.out - @-rm -f mb_LP_1_001.img - @-rm -f 9ins.cif - @-rm -f testcell_orig.prt - @-rm -f $(DECTRIS_EXAMPLES)/cbf_template_t.out - @-rm -f XRD1621.cbf - @-rm -f XRD1621_orig.cbf - @-rm -f XRD1621_I4encbC100_orig.cbf - @-rm -f XRD1621_I4encbC100.cbf - @-rm -f minicbf_orig.h5 - @-rm -f $(SRC)/fcb_exit_binary.f90 - @-rm -f $(SRC)/fcb_next_binary.f90 - @-rm -f $(SRC)/fcb_open_cifin.f90 - @-rm -f $(SRC)/fcb_packed.f90 - @-rm -f $(SRC)/fcb_read_bits.f90 - @-rm -f $(SRC)/fcb_read_image.f90 - @-rm -f $(SRC)/fcb_read_xds_i2.f90 - @-rm -f $(EXAMPLES)/test_fcb_read_image.f90 - @-rm -f $(EXAMPLES)/test_xds_binary.f90 - @-rm -f symlinksdone - @-rm -f $(TESTOUTPUT) *$(SEXT) - @-rm -rf $(SOLIB) - @-rm -rf org - @-rm -rf $(JCBF) - @-rm -rf $(REGEX) - @-rm -rf $(REGEX)_install - @-rm -rf $(TIFF) - @-rm -rf $(TIFF)_install - @-rm -rf $(HDF5) - @-rm -rf $(HDF5)_install - @-rm -rf $(INCLUDE)/tiff* - @-rm -rf $(INCLUDE)/H5* - @-rm -rf $(INCLUDE)/hdf5* - @-rm -rf share - @-rm -rf $(MINICBF_TEST)/i19* - @-rm -rf solib - @-rm -f thaumatin_die_M1S5_1_0005_2.cbf - @-rm -f 1191_00005.cbf - @-rm -f XRD1621.tif - @-rm -f md5tmp - @-rm -rf $(PYCBF)/build - @-rm -f *_old - @-rm -f X4_lots_M1S4_1_*.cbf - @-rm -f testfile.h5 - @-rm -f hit-20140306005258847.cbf - @-rm -f build_* - ./.undosymlinks - -# -# Remove temporary files -# -clean: - @-rm -f core - @-rm -f *.o - @-rm -f *.u -# -# Restore to distribution state -# -distclean: clean empty - -# -# Create a Tape Archive for distribution -# - -tar: $(DOCUMENTS) $(SOURCE) $(SRC)/cbf.stx $(HEADERS) $(M4FILES)\ - $(EXAMPLES) \ - README.html README Makefile \ - $(JPEGS) - -/bin/rm -f CBFlib.tar* - tar cvBf CBFlib.tar \ - $(DOCUMENTS) $(SOURCE) $(SRC)/cbf.stx $(HEADERS) $(M4FILES)\ - $(EXAMPLES) \ - README.html README Makefile \ - $(JPEGS) - gzip --best CBFlib.tar - diff --git a/Makefile_LINUX b/Makefile_LINUX index 33580928..2eb1e57c 100644 --- a/Makefile_LINUX +++ b/Makefile_LINUX @@ -2,12 +2,12 @@ ###################################################################### # Makefile - command file for make to create CBFlib # # # -# Version 0.9.6 19 May 2020 # +# Version 0.9.7 28 June 2021 # # # # Paul Ellis and # # Herbert J. Bernstein (yaya@bernstein-plus-sons.com) # # # -# (C) Copyright 2006 - 2020 Herbert J. Bernstein # +# (C) Copyright 2006 - 2021 Herbert J. Bernstein # # # ###################################################################### @@ -251,7 +251,7 @@ .DELETE_ON_ERROR: # Version string -VERSION = 0.9.6 +VERSION = 0.9.7 # # Directories @@ -265,7 +265,8 @@ BIN = $(ROOT)/bin SRC = $(ROOT)/src INCLUDE = $(ROOT)/include M4 = $(ROOT)/m4 -PYCBF = $(ROOT)/pycbf +PY2CBF = $(ROOT)/py2cbf +PY3CBF = $(ROOT)/pycbf EXAMPLES = $(ROOT)/examples TEMPLATES= $(ROOT)/templates DECTRIS_EXAMPLES = $(EXAMPLES)/dectris_cbf_template_test @@ -274,7 +275,6 @@ MINICBF_TEST = $(ROOT)/minicbf_test GRAPHICS = $(ROOT)/html_graphics DATADIRI = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Input DATADIRO = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output -DATADIRS = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only CBF_PREFIX ?= $(HOME) # @@ -289,6 +289,19 @@ CBFLIB_DONT_USE_LZ4?=no CBFLIB_DONT_USE_BSHUF?=no +CBFLIB_DONT_USE_LOCAL_NUWEB ?= no +ifeq ($(CBFLIB_DONT_USE_LOCAL_NUWEB),yes) +NUWEB=nuweb +NUWEB_DEP= +NUWEB_DEP2= +else +NUWEB=$(BIN)/nuweb +NUWEB_DEP=nuweb-1.60 +NUWEB_DEP2=$(BIN)/nuweb +endif + + + CBFLIB_DONT_HAVE_FGETLN ?= yes ifeq ($(CBFLIB_DONT_HAVE_FGETLN),yes) SRC_FGETLN = $(SRC)/fgetln.c @@ -297,15 +310,26 @@ SRC_FGETLN = endif -CBFLIB_DONT_USE_PYCIFRW ?= no -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) +CBFLIB_DONT_USE_PY2CIFRW ?= no +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) # -# Definitions to get versions of PyCifRW and PLY +# Definitions to get versions of python2 PyCifRW and PLY # -PYCIFRW ?= PyCifRW-4.1 -PLY = ply-3.2 -PYCIFRWFLAG = -DCBF_USE_PYCIFRW -PYCIFRW_PREFIX ?= $(HOME)/.local +PY2CIFRW ?= PyCifRW-4.1 +PY2PLY = ply-3.2 +PY2CIFRWFLAG = -DCBF_USE_PYCIFRW +PY2CIFRW_PREFIX ?= $(HOME)/.local +endif + +CBFLIB_DONT_USE_PY3CIFRW ?= no +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +# +# Definitions to get versions of python3 PyCifRW and PLY +# +PY3CIFRW ?= PyCifRW-4.3_rev_19Jun21 +PY3PLY = ply-3.11 +PY3CIFRWFLAG = -DCBF_USE_PYCIFRW +PY3CIFRW_PREFIX ?= $(HOME)/.local endif # @@ -322,13 +346,20 @@ TIFF_INSTALL = $(TIFF)_INSTALL ifneq ($(HDF5_PREFIX),) # already installed on system CBFLIB_DONT_USE_LOCAL_HDF5 = yes +HDF5CFLAGS=-DH5_USE_110_API endif ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes) HDF5_PREFIX ?= $(PWD) -HDF5 ?= hdf5-1.10.6 +HDF5 ?= hdf5-1.12.0 +#HDF5 ?= hdf5-1.10.6 #HDF5 = hdf5-1.8.18 #HDF5 = hdf5-1.10.5 +ifeq ($(HDF5),hdf5-1.12.0) +HDF5CFLAGS=-DH5_USE_110_API +else +HDF5CFLAGS= +endif HDF5dep = $(HDF5) HDF5_INSTALL = $(HDF5)_INSTALL ifneq ($(MSYS2),yes) @@ -379,7 +410,7 @@ ifneq ($(CBFLIB_DONT_USE_LZ4),yes) # Definitions to get a version of HDF5Plugin for LZ4 # ifneq ($(MSYS2),yes) -LZ4 ?= HDF5Plugin_14Aug20 +LZ4 ?= HDF5Plugin_5Jun21 else LZ4 ?= HDF5-External-Filter-Plugins endif @@ -430,9 +461,8 @@ endif # # Definition of python to use # -#PYTHON = python -PYTHON ?= python2 - +PYTHON2 ?= python2 +PYTHON3 ?= python3 # # Definitions to get a stable version of regex @@ -539,12 +569,6 @@ PYSWIG = swig -python # JSWIG = swig -java -# -# Program to generate LaTex and HTML program documentation -# - -NUWEB = nuweb - # # Compiler for Java # @@ -597,14 +621,24 @@ endif MISCFLAG = $(NOLLFLAG) $(ULPFLAG) # -# PYCBF definitions +# PY2CBF definitions # -PYCBFEXT = so -PYCBFBOPT = -PYCBFIOPT = +PY2CBFEXT = so +PY2CBFBOPT = +PY2CBFIOPT = SETUP_PY = setup.py INSTALLSETUP_PY = installsetup.py +# +# PY3CBF definitions +# +PY3CBFEXT = so +PY3CBFBOPT = +PY3CBFIOPT = +SETUP_PY = setup.py +INSTALLSETUP_PY = installsetup.py + + # # Set the compiler and flags # @@ -616,16 +650,21 @@ INSTALLSETUP_PY = installsetup.py ######################################################### CC = gcc C++ = g++ -CFLAGS = -g -O2 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing +CFLAGS = -g -O2 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing $(HDF5CFLAGS) LDFLAGS = F90C = gfortran -F90FLAGS = -g +F90FLAGS = -g -fno-range-check -fallow-invalid-boz F90LDFLAGS = SOCFLAGS = -fPIC SOLDFLAGS = -shared -Wl,-rpath,$(CBF_PREFIX)/lib JAVAINCLUDES = -I$(JDKDIR)/include -I$(JDKDIR)/include/linux -LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; -RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/lib:$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +ifeq ($(HDF5_PREFIX),) +LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +else +LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$(HDF5_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/lib:$(HDF5_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +endif EXTRALIBS = -lm M4FLAGS = -Dfcb_bytes_in_rec=131072 TIME = time @@ -640,18 +679,24 @@ endif DATAURLBASE = http://downloads.sf.net/cbflib/ DATAURLI = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Input.tar.gz DATAURLO = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output.tar.gz -DATAURLS = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz # # URLs from which to retrieve needed external package snapshots # -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWURL = http://downloads.sf.net/cbflib/$(PYCIFRW).tar.gz -PLYURL = http://www.dabeaz.com/ply/$(PLY).tar.gz +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2CIFRWURL = http://downloads.sf.net/cbflib/$(PY2CIFRW).tar.gz +PY2PLYURL = http://www.dabeaz.com/ply/$(PY2PLY).tar.gz +endif +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3CIFRWURL = http://downloads.sf.net/cbflib/$(PY3CIFRW).tar.gz +PY3PLYURL = http://downloads.sf.net/cbflib/$(PY3PLY).tar.gz endif REGEX_URL ?= http://downloads.sf.net/cbflib/$(REGEX).tar.gz TIFF_URL ?= http://downloads.sf.net/cbflib/$(TIFF).tar.gz HDF5_URL ?= http://downloads.sf.net/cbflib/$(HDF5).tar.gz +ifneq ($(CBFLIB_DONT_USE_LOCAL_NUWEB),yes) +NUWEB_URL ?= http://downloads.sf.net/cbflib/$(NUWEB_DEP).tar.gz +endif ifneq ($(MSYS2),yes) LZ4_URL = http://downloads.sf.net/cbflib/$(LZ4).tar.gz else @@ -668,10 +713,11 @@ INCLUDES = -I$(INCLUDE) -I$(SRC) $(HDF5include) # # runtime library path export commands # -RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export LD_LIBRARY_PATH; \ - DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export DYLD_LIBRARY_PATH; \ - LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib;export LD_RUN_PATH; - +ifeq ($(HDF5_PREFIX),) +RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export LD_LIBRARY_PATH; DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export DYLD_LIBRARY_PATH; LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib;export LD_RUN_PATH; +else +RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib:$(HDF5_PREFIX)/lib;export LD_LIBRARY_PATH; DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib:$(HDF5_PREFIX)/lib;export DYLD_LIBRARY_PATH; LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib:$(HDF5_PREFIX)/lib;export LD_RUN_PATH; +endif ###################################################################### # You should not need to make modifications below this line # @@ -753,8 +799,15 @@ SOURCE = $(SRC)/cbf.c \ $(SRC)/img.c \ $(SRC_FGETLN) $(SRC_REALPATH) -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYSOURCE = $(SRC)/drel_lex.py \ +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2SOURCE = $(SRC)/drel_lex.py \ + $(SRC)/drel_yacc.py \ + $(SRC)/drelc.py \ + $(SRC)/drel_prep.py +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3SOURCE = $(SRC)/drel_lex.py \ $(SRC)/drel_yacc.py \ $(SRC)/drelc.py \ $(SRC)/drel_prep.py @@ -871,6 +924,26 @@ default: @echo ' ' @echo ' $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(PYCIFRWFLAG)' @echo ' ' + @echo ' If you have changed any of the nuweb .w input files, you will need' + @echo ' need nuweb installed, check that CBFLIB_DONT_USE_LOCAL_NUWEB,' + @echo ' and NUWEB are defined correctly :' + @echo ' ' + @echo ' The current values are:' + @echo ' ' + @echo ' CBFLIB_DONT_USE_LOCAL_NUWEB = $(CBFLIB_DONT_USE_LOCAL_NUWEB)' + @echo ' NUWEB = $(NUWEB)' + @echo ' NUWEB_DEP = $(NUWEB_DEP)' + @echo ' NUWEB_DEP2 = $(NUWEB_DEP2)' + @echo ' ' + @echo ' You will need either a system HDF5 1.12 or it to be installed here.' + @echo ' Check that CBFLIB_DONT_USE_LOCAL_HDF5 and HDF5 are defined correctly :' + @echo ' ' + @echo ' The current values are:' + @echo ' ' + @echo ' CBFLIB_DONT_USE_LOCAL_HDF5 = $(CBFLIB_DONT_USE_LOCAL_HDF5)' + @echo ' HDF5 = $(HDF5)' + @echo ' HDF5_PREFIX = $(HDF5_PREFIX)' + @echo ' ' @echo ' Before installing the CBF library and example programs, check' @echo ' that the install directory is correct:' @echo ' ' @@ -902,20 +975,10 @@ default: @echo ' The tests assume that several data files are in the directories' @echo ' $(DATADIRI) and $(DATADIRO)' @echo ' ' - @echo ' Alternatively tests can be run comparing MD5 signatures only by' - @echo ' ' - @echo ' make tests_sigs_only' - @echo ' ' - @echo ' These signature only tests save space and download time by' - @echo ' assuming that input data files and the output signatures' - @echo ' are in the directories' - @echo ' $(DATADIRI) and $(DATADIRS)' - @echo ' ' @echo ' These directory can be obtained from' @echo ' ' @echo ' $(DATAURLI) ' @echo ' $(DATAURLO) ' - @echo ' $(DATAURLS) ' @echo ' ' @echo ' To clean up the directories type:' @echo ' ' @@ -931,10 +994,16 @@ default: # # Compile the library and examples # -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEPS = $(PYCIFRW) $(PLY) +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2CIFRWDEPS = $(PY2CIFRW) $(PY2PLY) else -PYCIFRWDEPS = +PY2CIFRWDEPS = +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3CIFRWDEPS = $(PY3CIFRW) $(PY3PLY) +else +PY3CIFRWDEPS = endif ifneq ($(CBFLIB_DONT_USE_LZ4),yes) @@ -954,7 +1023,8 @@ all:: $(BIN) $(SOURCE) $(F90SOURCE) $(HEADERS) \ $(HDF5) \ $(LZ4DEPS) \ $(BSHUFDEPS) \ - $(PYCIFRWDEPS) \ + $(PY2CIFRWDEPS) \ + $(PY3CIFRWDEPS) \ symlinksdone \ $(REGEXDEP) \ $(LIB) \ @@ -996,92 +1066,101 @@ shared: $(SOLIB)/libcbf.so $(SOLIB)/libfcb.so $(SOLIB)/libimg.so javawrapper: shared $(JCBF) $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEF = -Dcbf_use_pycifrw=yes +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2CIFRWDEF = -Dcbf_use_py2cifrw=yes +else +PY2CIFRWDEF = +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3CIFRWDEF = -Dcbf_use_py3cifrw=yes else -PYCIFRWDEF = +PY3CIFRWDEF = endif -Makefiles: Makefile \ - Makefile_LINUX \ - Makefile_LINUX_64 \ +Makefiles: \ + Makefile \ + Makefile_LINUX \ + Makefile_OSX \ + Makefile_MINGW \ + Makefile_MSYS2 + +Makefiles_pre_0.9.7: \ + Makefile_LINUX_64 \ Makefile_LINUX_gcc42 \ Makefile_LINUX_DMALLOC \ Makefile_LINUX_gcc42_DMALLOC \ - Makefile_OSX \ Makefile_OSX_gcc42 \ Makefile_OSX_gcc42_DMALLOC \ - Makefile_AIX \ - Makefile_MINGW \ - Makefile_MSYS2 \ + Makefile_AIX \ Makefile_IRIX_gcc Makefile_LINUX: $(M4)/Makefile.m4 -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX $(M4)/Makefile.m4 > Makefile_LINUX.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX $(M4)/Makefile.m4 > Makefile_LINUX.tmp mv Makefile_LINUX.tmp Makefile_LINUX Makefile_LINUX_DMALLOC: $(M4)/Makefile.m4 -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_DMALLOC.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_DMALLOC.tmp mv Makefile_LINUX_DMALLOC.tmp Makefile_LINUX_DMALLOC Makefile_LINUX_64: $(M4)/Makefile.m4 -cp Makefile_LINUX_64 Makefile_LINUX_64_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_64 $(M4)/Makefile.m4 > Makefile_LINUX_64.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_64 $(M4)/Makefile.m4 > Makefile_LINUX_64.tmp mv Makefile_LINUX_64.tmp Makefile_LINUX_64 Makefile_LINUX_gcc42: $(M4)/Makefile.m4 -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42 $(M4)/Makefile.m4 > Makefile_LINUX_gcc42.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_gcc42 $(M4)/Makefile.m4 > Makefile_LINUX_gcc42.tmp mv Makefile_LINUX_gcc42.tmp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_DMALLOC: $(M4)/Makefile.m4 -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_gcc42_DMALLOC.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_gcc42_DMALLOC.tmp mv Makefile_LINUX_gcc42_DMALLOC.tmp Makefile_LINUX_gcc42_DMALLOC Makefile_OSX: $(M4)/Makefile.m4 -cp Makefile_OSX Makefile_OSX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX $(M4)/Makefile.m4 > Makefile_OSX.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=OSX $(M4)/Makefile.m4 > Makefile_OSX.tmp mv Makefile_OSX.tmp Makefile_OSX Makefile_OSX_gcc42: $(M4)/Makefile.m4 -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42 $(M4)/Makefile.m4 > Makefile_OSX_gcc42.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=OSX_gcc42 $(M4)/Makefile.m4 > Makefile_OSX_gcc42.tmp mv Makefile_OSX_gcc42.tmp Makefile_OSX_gcc42 Makefile_OSX_gcc42_DMALLOC: $(M4)/Makefile.m4 -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_OSX_gcc42_DMALLOC.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=OSX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_OSX_gcc42_DMALLOC.tmp mv Makefile_OSX_gcc42_DMALLOC.tmp Makefile_OSX_gcc42_DMALLOC Makefile_AIX: $(M4)/Makefile.m4 -cp Makefile_AIX Makefile_AIX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=AIX $(M4)/Makefile.m4 > Makefile_AIX.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=AIX $(M4)/Makefile.m4 > Makefile_AIX.tmp mv Makefile_AIX.tmp Makefile_AIX Makefile_MINGW: $(M4)/Makefile.m4 -cp Makefile_MINGW Makefile_MINGW_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MINGW $(M4)/Makefile.m4 > Makefile_MINGW.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=MINGW $(M4)/Makefile.m4 > Makefile_MINGW.tmp mv Makefile_MINGW.tmp Makefile_MINGW Makefile_MSYS2: $(M4)/Makefile.m4 -cp Makefile_MSYS2 Makefile_MSYS2_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MSYS2 $(M4)/Makefile.m4 > Makefile_MSYS2.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=MSYS2 $(M4)/Makefile.m4 > Makefile_MSYS2.tmp mv Makefile_MSYS2.tmp Makefile_MSYS2 Makefile_IRIX_gcc: $(M4)/Makefile.m4 -cp Makefile_IRIX_gcc Makefile_IRIX_gcc_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=IRIX_gcc $(M4)/Makefile.m4 > Makefile_IRIX_gcc.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=IRIX_gcc $(M4)/Makefile.m4 > Makefile_IRIX_gcc.tmp mv Makefile_IRIX_gcc.tmp Makefile_IRIX_gcc Makefile: $(M4)/Makefile.m4 -cp Makefile Makefile_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=default $(M4)/Makefile.m4 > Makefile.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=default $(M4)/Makefile.m4 > Makefile.tmp mv Makefile.tmp Makefile cbflib.ini: $(M4)/Makefile.m4 @@ -1097,12 +1176,12 @@ symlinksdone: ./.symlinks $(SLFLAGS) touch symlinksdone -install: baseinstall pycbfinstall \ +install: baseinstall py2cbfinstall py3cbfinstall \ $(HDF5_INSTALL) \ $(TIFF_INSTALL) \ $(REGEX_INSTALL) -userinstall: baseinstall pycbfuserinstall \ +userinstall: baseinstall py2cbfuserinstall py3cbfuserinstall \ $(HDF5_INSTALL) \ $(TIFF_INSTALL) \ $(REGEX_INSTALL) @@ -1234,38 +1313,96 @@ endif chmod 755 $(CBF_PREFIX)/bin/batch_convert_minicbf.sh chmod 644 $(CBF_PREFIX)/include/cbflib/*.h -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -# -# PyCifRW -# -build_pycifrw: $(M4)/Makefile.m4 - touch build_pycifrw -$(PYCIFRW): build_pycifrw - -rm -rf $(PYCIFRW) - -rm -rf $(PYCIFRW).tar.gz - $(DOWNLOAD) $(PYCIFRWURL) - tar -xvf $(PYCIFRW).tar.gz - -rm $(PYCIFRW).tar.gz - (cd $(PYCIFRW); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +# +# Py2CifRW +# +build_py2cifrw: $(M4)/Makefile.m4 + touch build_py2cifrw +$(PY2CIFRW): build_py2cifrw + -rm -rf $(PY2CIFRW) + -rm -rf $(PY2CIFRW).tar.gz + $(DOWNLOAD) $(PY2CIFRWURL) + tar -xvf $(PY2CIFRW).tar.gz + -rm $(PY2CIFRW).tar.gz + (cd $(PY2CIFRW); \ + PYTHONPATH=$(PY2CIFRW_PREFIX)/lib/python:$(PY2CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON2) setup.py install --prefix= --home=$(PY2CIFRW_PREFIX) ) + +# +# PY2PLY +# +build_py2ply: $(M4)/Makefile.m4 + touch build_py2ply +$(PY2PLY): build_py2ply + -rm -rf $(PY2PLY) + -rm -rf $(PY2PLY).tar.gz + $(DOWNLOAD) $(PY2PLYURL) + tar -xvf $(PY2PLY).tar.gz + -rm $(PY2PLY).tar.gz + (cd $(PY2PLY); \ + PYTHONPATH=$(PY2CIFRW_PREFIX)/lib/python:$(PY2CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON2) setup.py install --prefix= --home=$(PY2CIFRW_PREFIX) ) +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +# +# Py3CifRW +# +build_py3cifrw: $(M4)/Makefile.m4 + touch build_py3cifrw +$(PY3CIFRW): build_py3cifrw + -rm -rf $(PY3CIFRW) + -rm -rf $(PY3CIFRW).tar.gz + $(DOWNLOAD) $(PY3CIFRWURL) + tar -xvf $(PY3CIFRW).tar.gz + -rm $(PY3CIFRW).tar.gz + (cd $(PY3CIFRW); \ + PYTHONPATH=$(PY3CIFRW_PREFIX)/lib/python:$(PY3CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON3) setup.py install --prefix= --home=$(PY3CIFRW_PREFIX) ) + +# +# PY3PLY +# +build_py3ply: $(M4)/Makefile.m4 + touch build_py3ply +$(PY3PLY): build_py3ply + -rm -rf $(PY3PLY) + -rm -rf $(PY3PLY).tar.gz + $(DOWNLOAD) $(PY3PLYURL) + tar -xvf $(PY3PLY).tar.gz + -rm $(PY3PLY).tar.gz + (cd $(PY3PLY); \ + PYTHONPATH=$(PY3CIFRW_PREFIX)/lib/python:$(PY3CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON3) setup.py install --prefix= --home=$(PY3CIFRW_PREFIX) ) +endif + # -# PLY +# NUWEB # -build_ply: $(M4)/Makefile.m4 - touch build_ply -$(PLY): build_ply - -rm -rf $(PLY) - -rm -rf $(PLY).tar.gz - $(DOWNLOAD) $(PLYURL) - tar -xvf $(PLY).tar.gz - -rm $(PLY).tar.gz - (cd $(PLY); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) +ifneq ($(NUWEB_DEP),'') +$(NUWEB_DEP): + -rm -rf $(NUWEB_DEP) + -rm -rf $(NUWEB_DEP).tar.gz + $(DOWNLOAD) $(NUWEB_URL) + tar -xvf $(NUWEB_DEP).tar.gz + touch $(NUWEB_DEP) + rm $(NUWEB_DEP).tar.gz + +$(NUWEB_DEP2): $(NUWEB_DEP) + (cd $(NUWEB_DEP); make nuweb; cp nuweb $(NUWEB_DEP2)) endif + # # REGEX # @@ -1365,7 +1502,7 @@ ifneq ($(MSYS2),yes) tar -xvf $(LZ4).tar.gz -rm $(LZ4).tar.gz (cp $(LZ4include)/lz4.h $(INCLUDE); \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/lz4.c -o lz4.o; \ + $(CC) $(CFLAGS) $(SOWCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/lz4.c -o lz4.o; \ $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/h5zlz4.c -o h5zlz4.o; \ $(CC) -shared lz4.o h5zlz4.o -o $(SOLIB)/libh5zlz4.so; \ rm lz4.o h5zlz4.o) @@ -1562,53 +1699,147 @@ endif # # Python bindings # -$(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ - $(PYCBF)/$(SETUP_PY) \ - $(PYCBF)/pycbf.i \ - $(PYCBF)/cbfhandlewrappers.i \ - $(PYCBF)/cbfdetectorwrappers.i \ - $(PYCBF)/cbfgenericwrappers.i \ - $(PYCBF)/cbfgoniometerwrappers.i + +$(PY2CBF)/make_pycbf.py: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/make_pycbf.w + (cd $(PY2CBF); $(NUWEB) make_pycbf.w) + +$(PY2CBF)/pycbf.i: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf_i.w + (cd $(PY2CBF); $(NUWEB) pycbf_i.w) + +$(PY2CBF)/py2setup_py.m4 \ +$(PY2CBF)/win32.bat \ +$(PY2CBF)/linux.sh \ +$(PY2CBF)/makeflatascii.py \ +$(PY2CBF)/pycbf_test1.py \ +$(PY2CBF)/pycbf_test2.py \ +$(PY2CBF)/pycbf_test3.py \ +$(PY2CBF)/pycbf_test4.py \ +$(PY2CBF)/pycbf_testfelaxes.py \ +$(PY2CBF)/xmas/readmarheader.py \ +$(PY2CBF)/xmas/xmasheaders.py \ +$(PY2CBF)/xmas/xmas_cif_template.cif : $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w + (cd $(PY2CBF); $(NUWEB) pycbf.w ) + touch $(PY2CBF)/py2setup_py.m4 + +$(PY2CBF)/_py2cbf.$(PY2CBFEXT): $(PY2CBF) shared \ + $(PY2CBF)/py2setup.py \ + $(PY2CBF)/pycbf.i \ + $(PY2CBF)/cbfhandlewrappers.i \ + $(PY2CBF)/cbfdetectorwrappers.i \ + $(PY2CBF)/cbfgenericwrappers.i \ + $(PY2CBF)/cbfgoniometerwrappers.i -cp $(SOLIB)/*.so $(LIB) - (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) + (cd $(PY2CBF); $(PYTHON2) py2setup.py build $(PY2CBFBOPT); cp build/lib*/_py2cbf*.$(PY2CBFEXT) .) -$(PYCBF)/pycbfinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --prefix=$(CBF_PREFIX)) +$(PY2CBF)/py2cbfinstall: $(PY2CBF)/pycbf.py + (cd $(PY2CBF); $(PYTHON2) $(INSTALLSETUP_PY) install $(PY2CBFIOPT) --prefix=$(CBF_PREFIX)) -$(PYCBF)/pycbfuserinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --user) +$(PY2CBF)/py2cbfuserinstall: $(PY2CBF)/pycbf.py + (cd $(PY2CBF); $(PYTHON2) $(INSTALLSETUP_PY) install $(PY2CBFIOPT) --user) -$(PYCBF)/setup.py: $(M4)/setup_py.m4 +$(PY2CBF)/py2setup.py: $(PY2CBF)/py2setup_py.m4 (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) + $(PY2CBF)/py2setup_py.m4 > $@) -$(PYCBF)/setup_MINGW.py: m4/setup_py.m4 +$(PY2CBF)/py2setup_MINGW.py: $(PY2CBF)/setup_py.m4 (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) + $(PY2CBF)/py2setup_py.m4 > $@) -$(LIB)/_pycbf.$(PYCBFEXT): $(PYCBF)/_pycbf.$(PYCBFEXT) +$(LIB)/_py2cbf.$(PY2CBFEXT): $(PY2CBF)/_py2cbf.$(PY2CBFEXT) mkdir -p $(LIB) - cp $(PYCBF)/_pycbf.$(PYCBFEXT) $(LIB)/_pycbf.$(PYCBFEXT) + cp $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(LIB)/_py2cbf.$(PY2CBFEXT) -$(PYCBF)/pycbf.pdf: $(PYCBF)/pycbf.w - (cd $(PYCBF); \ +$(PY2CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w + (cd $(PY2CBF); \ $(NUWEB) pycbf; \ latex pycbf; \ $(NUWEB) pycbf; \ latex pycbf; \ dvipdfm pycbf ) -$(PYCBF)/CBFlib.txt: $(DOC)/CBFlib.html - links -dump $(DOC)/CBFlib.html > $(PYCBF)/CBFlib.txt +$(PY2CBF)/CBFlib.txt: $(DOC)/CBFlib.html + links -dump $(DOC)/CBFlib.html > $(PY2CBF)/CBFlib.txt + +$(PY2CBF)/pycbf.py: $(PY2CBF)/pycbf.pdf $(PY2CBF)/cbfdetectorwrappers.i \ + $(PY2CBF)/cbfgenericwrappers.i \ + $(PY2CBF)/cbfgoniometerwrappers.i \ + $(PY2CBF)/CBFlib.txt $(PY2CBF)/make_pycbf.py + (cd $(PY2CBF); $(PYTHON2) make_pycbf.py; $(PYSWIG) -module py2cbf pycbf.i; \ + $(PYTHON2) py2setup.py build; mv pycbf.py rawpycbf.py; \ + cat rawpycbf.py | sed "s/ _pycbf/ _py2cbf/" > pycbf.py ) + +$(PY3CBF)/make_pycbf.py: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/make_pycbf.w + (cd $(PY3CBF); $(NUWEB) make_pycbf.w) + +$(PY3CBF)/pycbf.i: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf_i.w + (cd $(PY3CBF); $(NUWEB) pycbf_i.w) + +$(PY3CBF)/py3setup_py.m4 \ +$(PY3CBF)/win32.bat \ +$(PY3CBF)/linux.sh \ +$(PY3CBF)/makeflatascii.py \ +$(PY3CBF)/pycbf_test1.py \ +$(PY3CBF)/pycbf_test2.py \ +$(PY3CBF)/pycbf_test3.py \ +$(PY3CBF)/pycbf_test4.py \ +$(PY3CBF)/pycbf_testfelaxes.py \ +$(PY3CBF)/xmas/readmarheader.py \ +$(PY3CBF)/xmas/xmasheaders.py \ +$(PY3CBF)/xmas/xmas_cif_template.cif: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w + (cd $(PY3CBF); $(NUWEB) pycbf.w ) + touch $(PY3CBF)/py3setup_py.m4 + + +$(PY3CBF)/_pycbf.$(PY3CBFEXT): $(PY3CBF) shared \ + $(PY3CBF)/py3setup.py \ + $(PY3CBF)/pycbf.i \ + $(PY3CBF)/cbfhandlewrappers.i \ + $(PY3CBF)/cbfdetectorwrappers.i \ + $(PY3CBF)/cbfgenericwrappers.i \ + $(PY3CBF)/cbfgoniometerwrappers.i + -cp $(SOLIB)/*.so $(LIB) + (cd $(PY3CBF); $(PYTHON3) py3setup.py build $(PY3CBFBOPT); cp build/lib*/_pycbf*.$(PY3CBFEXT) .) + +$(PY3CBF)/py3cbfinstall: $(PY3CBF)/pycbf.py + (cd $(PY3CBF); $(PYTHON3) $(INSTALLSETUP_PY) install $(PY3CBFIOPT) --prefix=$(CBF_PREFIX)) + +$(PY3CBF)/py3cbfuserinstall: $(PY3CBF)/pycbf.py + (cd $(PY3CBF); $(PYTHON3) $(INSTALLSETUP_PY) install $(PY3CBFIOPT) --user) + +$(PY3CBF)/py3setup.py: $(PY3CBF)/py3setup_py.m4 + (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ + -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ + $(PY3CBF)/py3setup_py.m4 > $@) + +$(PY3CBF)/py3setup_MINGW.py: $(PY3CBF)/py3setup_py.m4 + (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ + -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ + $(PY3CBF)/py3setup_py.m4 > $@) -$(PYCBF)/cbfhandlewrappers.i \ -$(PYCBF)/cbfdetectorwrappers.i \ -$(PYCBF)/cbfgenericwrappers.i \ -$(PYCBF)/cbfgoniometerwrappers.i: $(PYCBF)/CBFlib.txt $(PYCBF)/make_pycbf.py - (cd $(PYCBF); $(PYTHON) make_pycbf.py; $(PYSWIG) pycbf.i; $(PYTHON) setup.py build) +$(LIB)/_pycbf.$(PY3CBFEXT): $(PY3CBF)/_pycbf.$(PY3CBFEXT) + mkdir -p $(LIB) + cp $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(LIB)/_pycbf.$(PY3CBFEXT) + +$(PY3CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w + (cd $(PY3CBF); \ + $(NUWEB) pycbf; \ + latex pycbf; \ + $(NUWEB) pycbf; \ + latex pycbf; \ + dvipdfm pycbf ) + +$(PY3CBF)/CBFlib.txt: $(DOC)/CBFlib.html + links -dump $(DOC)/CBFlib.html > $(PY3CBF)/CBFlib.txt +$(PY3CBF)/pycbf.py: $(PY3CBF)/pycbf.pdf $(PY3CBF)/cbfdetectorwrappers.i \ + $(PY3CBF)/cbfgenericwrappers.i \ + $(PY3CBF)/cbfgoniometerwrappers.i \ + $(PY3CBF)/CBFlib.txt $(PY3CBF)/make_pycbf.py + (cd $(PY3CBF); $(PYTHON3) make_pycbf.py; $(PYSWIG) pycbf.i; \ + $(PYTHON3) py3setup.py build; mv pycbf.py rawpycbf.py; \ + echo "# coding=utf-8" | cat - rawpycbf.py > pycbf.py) # # Java bindings @@ -1823,7 +2054,7 @@ $(BIN)/sequence_match: $(LIB)/libcbf.a $(EXAMPLES)/sequence_match.c $(LIB)/libim # # tiff2cbf example program # -$(BIN)/tiff2cbf: $(LIB)/libcbf.a $(EXAMPLES)/tiff2cbf.c \ +$(BIN)/tiff2cbf: $(LIB)/libcbf.a $(EXAMPLES)/tiff2cbf.c $(EXAMPLES)/tif_sprint.c \ $(GOPTLIB) $(GOPTINC) $(TIFF) mkdir -p $(BIN) $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ @@ -1969,13 +2200,6 @@ $(DATADIRO): $(M4)/Makefile.m4 touch $(DATADIRO) -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output.tar.gz) -$(DATADIRS): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLS)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - touch $(DATADIRS) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - - # Input Data Files TESTINPUT_BASIC = example.mar2300 @@ -2025,31 +2249,48 @@ TESTOUTPUT = adscconverted_flat_orig.cbf \ adscconverted_orig.cbf converted_flat_orig.cbf converted_orig.cbf \ insulin_pilatus6mconverted_orig.cbf.h5.cbf \ insulin_pilatus6mconverted_orig.cbf.h5 \ + insulin_pilatus6mconverted_orig.cbf \ insulin_pilatus6mconverted_v2_orig.cbf \ mb_LP_1_001_orig.cbf testcell_orig.prt \ test_xds_bin_testflatout_orig.out \ test_xds_bin_testflatpackedout_orig.out test_fcb_read_testflatout_orig.out \ test_fcb_read_testflatpackedout_orig.out \ XRD1621_orig.cbf XRD1621_I4encbC100_orig.cbf \ - minicbf_orig.h5 + minicbf_orig.h5 \ + pycbf_test1_orig.out \ + pycbf_test2_orig.out \ + pycbf_test3_orig.out \ + pycbf_test4_orig.out \ + fel_test1_orig.out \ + fel_test2_orig.out \ + fel_test3_orig.out NEWTESTOUTPUT = adscconverted_flat.cbf \ adscconverted.cbf converted_flat.cbf converted.cbf \ insulin_pilatus6mconverted.cbf \ insulin_pilatus6mconverted.cbf.h5 \ insulin_pilatus6mconverted.cbf.h5.cbf \ + insulin_pilatus6mconverted_orig.cbf \ insulin_pilatus6mconverted_v2.cbf \ mb_LP_1_001.cbf testcell.prt \ test_xds_bin_testflatout.out \ test_xds_bin_testflatpackedout.out test_fcb_read_testflatout.out \ test_fcb_read_testflatpackedout.out \ XRD1621.cbf XRD1621_I4encbC100.cbf \ - $(MINICBF_TEST)/minicbf.h5 + $(MINICBF_TEST)/minicbf.h5 \ + pycbf_test1.out \ + pycbf_test2.out \ + pycbf_test3.out \ + pycbf_test4.out \ + fel_test1.out \ + fel_test2.out \ + fel_test3.out DATADIRO_OUTPUT = $(DATADIRO)/adscconverted_flat_orig.cbf \ $(DATADIRO)/adscconverted_orig.cbf \ $(DATADIRO)/converted_flat_orig.cbf \ $(DATADIRO)/converted_orig.cbf \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5 \ + $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf \ $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf \ $(DATADIRO)/mb_LP_1_001_orig.cbf \ $(DATADIRO)/testcell_orig.prt \ @@ -2066,6 +2307,7 @@ DATADIRO_OUTPUT_SIGNATURES = $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) \ $(DATADIRO)/converted_orig.cbf$(SEXT) \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ + $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf$(SEXT) \ $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) \ $(DATADIRO)/testcell_orig.prt$(SEXT) \ @@ -2085,6 +2327,7 @@ TESTOUTPUTSIGS = adscconverted_flat_orig.cbf$(SEXT) \ adscconverted_orig.cbf$(SEXT) converted_flat_orig.cbf$(SEXT) converted_orig.cbf$(SEXT) \ insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ + insulin_pilatus6mconverted_orig.cbf$(SEXT) \ insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ mb_LP_1_001_orig.cbf$(SEXT) testcell_orig.prt$(SEXT) \ test_xds_bin_testflatout_orig.out$(SEXT) \ @@ -2092,13 +2335,21 @@ TESTOUTPUTSIGS = adscconverted_flat_orig.cbf$(SEXT) \ test_fcb_read_testflatpackedout_orig.out$(SEXT) \ XRD1621_orig.cbf$(SEXT) \ XRD1621_I4encbC100_orig.cbf$(SEXT) \ - minicbf_orig.h5$(SEXT) + minicbf_orig.h5$(SEXT) \ + pycbf_test1_orig.out$(SEXT) \ + pycbf_test2_orig.out$(SEXT) \ + pycbf_test3_orig.out$(SEXT) \ + pycbf_test4_orig.out$(SEXT) \ + fel_test1_orig.out$(SEXT) \ + fel_test2_orig.out$(SEXT) \ + fel_test3_orig.out$(SEXT) DATADIRS_OUTPUT_SIGNATURES = $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) \ $(DATADIRS)/adscconverted_orig.cbf$(SEXT) \ $(DATADIRS)/converted_flat_orig.cbf$(SEXT) \ $(DATADIRS)/converted_orig.cbf$(SEXT) \ $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ + $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf$(SEXT) \ $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) \ $(DATADIRS)/testcell_orig.prt$(SEXT) \ @@ -2108,7 +2359,14 @@ DATADIRS_OUTPUT_SIGNATURES = $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) \ $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \ $(DATADIRS)/XRD1621_orig.cbf$(SEXT) \ $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) \ - $(DATADIRS)/minicbf_orig.h5$(SEXT) + $(DATADIRS)/minicbf_orig.h5$(SEXT) \ + $(DATADIRS)/pycbf_test1_orig.out$(SEXT) \ + $(DATADIRS)/pycbf_test2_orig.out$(SEXT) \ + $(DATADIRS)/pycbf_test3_orig.out$(SEXT) \ + $(DATADIRS)/pycbf_test4_orig.out$(SEXT) \ + $(DATADIRS)/fel_test1_orig.out$(SEXT) \ + $(DATADIRS)/fel_test2_orig.out$(SEXT) \ + $(DATADIRS)/fel_test3_orig.out$(SEXT) # Fetch Input Data Files @@ -2130,20 +2388,13 @@ $(TESTOUTPUT): $(DATADIRO) $(DATADIRO_OUTPUT) $(DATADIRO_OUTPUT_SIGNATURES) cp $(DATADIRO)/$@$(SEXT) $@$(SEXT) -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) -# Fetch Output Data File Signatures - -$(TESTOUTPUTSIGS): $(DATADIRS) $(DATADIRS_OUTPUT_SIGNATURES) - cp $(DATADIRS)/$@ $@ - - # # Tests # -tests: all $(LIB) $(BIN) symlinksdone basic extra dectristests pycbftests -tests_sigs_only: $(LIB) $(BIN) symlinksdone basic extra_sigs_only +tests: all $(LIB) $(BIN) symlinksdone basic extra dectristests py2cbftests py3cbftests restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) $(SIGNATURE) < adscconverted.cbf > $(DATADIRO)/adscconverted_orig.cbf$(SEXT) @@ -2161,6 +2412,13 @@ restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 $(SIGNATURE) < XRD1621.cbf > $(DATADIRO)/XRD1621_orig.cbf$(SEXT) $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRO)/minicbf_orig.h5$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test1.out > $(DATADIRO)/pycbf_test1_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test2.out > $(DATADIRO)/pycbf_test2_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test3.out > $(DATADIRO)/pycbf_test3_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test4.out > $(DATADIRO)/pycbf_test4_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/fel_test1.out > $(DATADIRO)/fel_test1_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/fel_test2.out > $(DATADIRO)/fel_test2_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/fel_test3.out > $(DATADIRO)/fel_test3_orig.out$(SEXT) cp adscconverted_flat.cbf $(DATADIRO)/adscconverted_flat_orig.cbf$ cp adscconverted.cbf $(DATADIRO)/adscconverted_orig.cbf cp converted_flat.cbf $(DATADIRO)/converted_flat_orig.cbf @@ -2177,25 +2435,15 @@ restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 cp XRD1621.cbf $(DATADIRO)/XRD1621_orig.cbf cp XRD1621_I4encbC100.cbf $(DATADIRO)/XRD1621_I4encbC100_orig.cbf cp $(MINICBF_TEST)/minicbf.h5 $(DATADIRO)/minicbf_orig.h5 - -restore_sigs_only: $(NEWTESTOUTPUT) $(DATADIRS) - $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < adscconverted.cbf > $(DATADIRS)/adscconverted_orig.cbf$(SEXT) - $(SIGNATURE) < converted_flat.cbf > $(DATADIRS)/converted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < converted.cbf > $(DATADIRS)/converted_orig.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5 > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5.cbf > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) - $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) - $(SIGNATURE) < testcell.prt > $(DATADIRS)/testcell_orig.prt$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < XRD1621.cbf > $(DATADIRS)/XRD1621_orig.cbf$(SEXT) - $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) - $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRS)/minicbf_orig.h5$(SEXT) -restore_signatures: restore_output restore_sigs_only + cp $(PY2CBF)/pycbf_test1.out $(DATADIRO)/pycbf_test1_orig.out + cp $(PY2CBF)/pycbf_test2.out $(DATADIRO)/pycbf_test2_orig.out + cp $(PY2CBF)/pycbf_test3.out $(DATADIRO)/pycbf_test3_orig.out + cp $(PY2CBF)/pycbf_test4.out $(DATADIRO)/pycbf_test4_orig.out + cp $(PY2CBF)/fel_test1.out $(DATADIRO)/fel_test1_orig.out + cp $(PY2CBF)/fel_test2.out $(DATADIRO)/fel_test2_orig.out + cp $(PY2CBF)/fel_test3.out $(DATADIRO)/fel_test3_orig.out + +restore_signatures: restore_output # # Basic Tests @@ -2215,9 +2463,12 @@ basic: $(BIN)/makecbf $(BIN)/img2cif $(BIN)/cif2cbf $(TESTINPUT_BASIC) img2cif_canonical.cif cif2cbf_packed.cbf $(LDPREFIX) $(BIN)/cif2cbf -e none -c canonical \ img2cif_packed.cif cif2cbf_canonical.cbf - -cmp cif2cbf_packed.cbf makecbf.cbf - -cmp cif2cbf_packed.cbf img2cif_packed.cbf - -cmp cif2cbf_canonical.cbf img2cif_canonical.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_packed.cbf | diff -a - makecbf.cbf + #-cmp cif2cbf_packed.cbf makecbf.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_packed.cbf | diff -a - img2cif_packed.cbf + #-cmp cif2cbf_packed.cbf img2cif_packed.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_canonical.cbf | diff -a - img2cif_canonical.cbf + #-cmp cif2cbf_canonical.cbf img2cif_canonical.cbf # @@ -2256,21 +2507,27 @@ endif makecbf.cbf cif2cbf_ehcn.cif $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_encp.cbf | diff -a - makecbf.cbf $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf + -cat 9ins.cif |sed "1,1s/10/11/" | sed "2,2s/0.9.5/0.9.7/" | diff -a - 9ins.cbf + #-cmp 9ins.cif 9ins.cbf $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf -F example.mar2300 converted_flat.cbf - -cmp converted_flat.cbf converted_flat_orig.cbf + -cat converted_flat_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - converted_flat.cbf + #-cmp converted_flat.cbf converted_flat_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf example.mar2300 converted.cbf - -cmp converted.cbf converted_orig.cbf + -cat converted_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - converted.cbf + #-cmp converted.cbf converted_orig.cbf -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat > testcell.prt -cmp testcell.prt testcell_orig.prt $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -cmp adscconverted_flat.cbf adscconverted_flat_orig.cbf + -cat adscconverted_flat_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - adscconverted_flat.cbf + #-cmp adscconverted_flat.cbf adscconverted_flat_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -cmp adscconverted.cbf adscconverted_orig.cbf + -cat adscconverted_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - adscconverted.cbf + #-cmp adscconverted.cbf adscconverted_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -cmp mb_LP_1_001.cbf mb_LP_1_001_orig.cbf + -cat mb_LP_1_001_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - mb_LP_1_001.cbf + #-cmp mb_LP_1_001.cbf mb_LP_1_001_orig.cbf ifneq ($(CLEANTESTS),) mv mb_LP_1_001.cbf nmb_LP_1_001.cbf else @@ -2283,12 +2540,17 @@ ifneq ($(CLEANTESTS),) rm nmb_LP_1_001.img endif $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -cmp insulin_pilatus6mconverted.cbf insulin_pilatus6mconverted_rev_orig.cbf + -cat insulin_pilatus6mconverted_orig.cbf | sed "1,1s/1.7.6/1.7.11/" | sed "2,2s/0.9.3/0.9.7/" | diff -a - insulin_pilatus6mconverted.cbf + #-cmp insulin_pilatus6mconverted.cbf insulin_pilatus6mconverted_orig.cbf -$(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -cmp insulin_pilatus6mconverted_v2.cbf insulin_pilatus6mconverted_v2_orig.cbf + -cat insulin_pilatus6mconverted_v2_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - insulin_pilatus6mconverted_v2.cbf + #-cmp insulin_pilatus6mconverted_v2.cbf insulin_pilatus6mconverted_v2_orig.cbf (CBF_CONVERT_MINICBF_PATH=$(BIN); export CBF_CONVERT_MINICBF_PATH; \ $(LDPREFIX) $(EXAMPLES)/batch_convert_minicbf.sh "." "minicbf_test" \ "X4_lots_M1S4_1_*.cbf" $(TEMPLATES)/template_X4_lots_M1S4.cbf) +# +# Starting with insulin_pilatus6mconverted.cbf, create hdf5 files using opaque, encI, encp, encb, encc, encz +# -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ $(TIME) $(BIN)/cif2cbf -5 w -O $(HDF5REGISTER) -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted.cbf.h5) -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ @@ -2301,10 +2563,9 @@ endif $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cc -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encc.cbf.h5) -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cz -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encz.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cl -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encl.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -c2 -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5) +# +# check the default as hdf5 dumps +# -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ $(H5DUMP) insulin_pilatus6mconverted_orig.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted_orig.cbf.h5.dump) -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ @@ -2312,41 +2573,26 @@ endif -$(DIFF) insulin_pilatus6mconverted_orig.cbf.h5.dump insulin_pilatus6mconverted.cbf.h5.dump -rm -f insulin_pilatus6mconverted_orig.cbf.h5.dump -rm -f insulin_pilatus6mconverted.cbf.h5.dump - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_orig.cbf.h5.cbf -o insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf.h5 -o insulin_pilatus6mconverted.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted.cbf.h5.cbf -o insulin_pilatus6mconverted.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encp.cbf.h5 -o insulin_pilatus6mconverted_encp.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encp.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encb.cbf.h5 -o insulin_pilatus6mconverted_encb.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encb.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encI.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encI.cbf.h5.cbf -o insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encc.cbf.h5 -o insulin_pilatus6mconverted_encc.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encc.cbf.h5.cbf -o insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encz.cbf.h5 -o insulin_pilatus6mconverted_encz.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encz.cbf.h5.cbf -o insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encl.cbf.h5 -o insulin_pilatus6mconverted_encl.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encl.cbf.h5.cbf -o insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_enc2.cbf.h5 -o insulin_pilatus6mconverted_enc2.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_enc2.cbf.h5.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -rm -f insulin_pilatus6mconverted*.cbf.h5.eqcI.cbf +# +# Convert each of the non-opaque h5 files to encI cbfs and compare them +# + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encI.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + cp insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encp.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encb.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encc.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encz.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + $(LDPREFIX) $(TINE) $(BIN)/test_cbf_airy_disk $(LDPREFIX) $(TIME) $(BIN)/cbf_testxfelread $(LDPREFIX) $(TIME) $(BIN)/testalloc @@ -2375,14 +2621,18 @@ endif -cd $(MINICBF_TEST); $(DIFF) i19-1.dump i19-2.dump -cd $(MINICBF_TEST); $(DIFF) i19-1.cbf i19-2.cbf $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf + -cat testrealin.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - testrealout.cbf + #-cmp testrealin.cbf testrealout.cbf $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf + -cat testflatin.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - testflatout.cbf + #-cmp testflatin.cbf testflatout.cbf $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf + -cat testflatpackedin.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - testflatpackedout.cbf + #-cmp testflatpackedin.cbf testflatpackedout.cbf ifneq ($(F90C),) $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatout.out) - -$(DIFF) test_xds_bin_testflatout.out test_xds_bin_testflatout_orig.out + -cat test_xds_bin_testflatout_orig.out | sed "2,2s/0.9.6/0.9.7/" | $(DIFF) -a - test_xds_bin_testflatout.out + #-$(DIFF) test_xds_bin_testflatout.out test_xds_bin_testflatout_orig.out $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatpackedout.out) -$(DIFF) test_xds_bin_testflatpackedout.out test_xds_bin_testflatpackedout_orig.out $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatout.out) @@ -2392,109 +2642,59 @@ ifneq ($(F90C),) endif $(LDPREFIX) $(TIME) $(BIN)/sauter_test $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - -$(DIFF) XRD1621.cbf XRD1621_orig.cbf + $(LDPREFIX) $(TIME) $(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf + -cat XRD1621_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - XRD1621.cbf + #-$(DIFF) XRD1621.cbf XRD1621_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(DIFF) XRD1621_I4encbC100.cbf XRD1621_I4encbC100_orig.cbf - -ifneq ($(F90C),) -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf \ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -else -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf\ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -endif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e hex -c none \ - makecbf.cbf cif2cbf_ehcn.cif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ - cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F example.mar2300 converted_flat.cbf - -$(SIGNATURE) < converted_flat.cbf | $(DIFF) - converted_flat_orig.cbf$(SEXT); rm converted_flat.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image example.mar2300 converted.cbf - -$(SIGNATURE) < converted.cbf | $(DIFF) - converted_orig.cbf$(SEXT); rm converted.cbf - -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat | \ - $(SIGNATURE) | $(DIFF) - testcell_orig.prt$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -$(SIGNATURE) < adscconverted_flat.cbf | $(DIFF) - adscconverted_flat_orig.cbf$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -$(SIGNATURE) < adscconverted.cbf | $(DIFF) - adscconverted_orig.cbf$(SEXT); rm adscconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -$(SIGNATURE) < mb_LP_1_001.cbf | $(DIFF) - mb_LP_1_001_orig.cbf$(SEXT) - mv mb_LP_1_001.cbf nmb_LP_1_001.cbf - $(LDPREFIX) $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf - -cmp nmb_LP_1_001.img mb_LP_1_001.img - rm nmb_LP_1_001.cbf - rm nmb_LP_1_001.img - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted.cbf | $(DIFF) - insulin_pilatus6mconverted_rev_orig.cbf$(SEXT); rm insulin_pilatus6mconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf | $(DIFF) - insulin_pilatus6mconverted_v2_orig.cbf$(SEXT); rm insulin_pilatus6mconverted_v2.cbf - $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf -ifneq ($(F90C),) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatpackedout_orig.out$(SEXT) -endif - $(LDPREFIX) $(TIME) $(BIN)/sauter_test - $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(SIGNATURE) < XRD1621.cbf | $(DIFF) - XRD1621_orig.cbf$(SEXT); rm XRD1621.cbf - -$(SIGNATURE) < XRD1621_I4encbC100.cbf | $(DIFF) - XRD1621_I4encbC100_orig.cbf$(SEXT); rm XRD1621_I4encbC100.cbf - @-rm -f adscconverted_flat.cbf - @-rm -f $(TESTINPUT_BASIC) $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) - @-rm -f cif2cbf_packed.cbf makecbf.cbf \ - cif2cbf_packed.cbf img2cif_packed.cbf \ - cif2cbf_canonical.cbf img2cif_canonical.cbf - @-rm -f testrealout.cbf testflatout.cbf testflatpackedout.cbf \ - cif2cbf_encp.cbf img2cif_canonical.cif img2cif_packed.cif 9ins.cbf - + -cat XRD1621_I4encbC100_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - XRD1621_I4encbC100.cbf + #-$(DIFF) XRD1621_I4encbC100.cbf XRD1621_I4encbC100_orig.cbf -pycbftests: $(PYCBF)/_pycbf.$(PYCBFEXT) $(BIN)/cbf_standardize_numbers - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test1.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test2.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test3.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test4.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test1.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test2.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py ../hit-20140306005258847.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test1_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test1.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test2_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test2.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test3_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test3.out - - -pycbfinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfinstall - -pycbfuserinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfuserinstall +py2cbftests: $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(BIN)/cbf_standardize_numbers $(TESTOUTPUT) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test1.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test1.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test1.out $(ROOT)/pycbf_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test2.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test2.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test2.out $(ROOT)/pycbf_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test3.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test3.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test3.out $(ROOT)/pycbf_test3_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test4.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test4.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test4.out $(ROOT)/pycbf_test4_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_testfelaxes.py fel_test1.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) + -(cd $(PY2CBF); $(DIFF) fel_test1.out $(ROOT)/fel_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_testfelaxes.py fel_test2.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) + -(cd $(PY2CBF); $(DIFF) fel_test2.out $(ROOT)/fel_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_testfelaxes.py ../hit-20140306005258847.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) + -(cd $(PY2CBF); $(DIFF) fel_test3.out $(ROOT)/fel_test3_orig.out) + +py2cbfinstall: $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(PY2CBF)/py2cbfinstall + +py2cbfuserinstall: $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(PY2CBF)/py2cbfuserinstall + +py3cbftests: $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(BIN)/cbf_standardize_numbers $(TESTOUTPUT) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test1.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test1.out) + -(cd $(PY3CBF); grep -v "__builtins__" $(ROOT)/pycbf_test1_orig.out | \ + grep -v "__add__" | grep -v "Foundthebinary" > pycbf_test1_orig.out; \ + grep -v "__builtins__" pycbf_test1.out | \ + grep -v "__add__" | grep -v "Foundthebinary" |$(DIFF) - pycbf_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test2.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test2.out) + -(cd $(PY3CBF); $(DIFF) pycbf_test2.out $(ROOT)/pycbf_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test3.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test3.out) + -(cd $(PY3CBF); $(DIFF) pycbf_test3.out $(ROOT)/pycbf_test3_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test4.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test4.out) + -(cd $(PY3CBF); grep -v "__builtins__" $(ROOT)/pycbf_test4_orig.out | \ + grep -v "__add__" | grep -v "Foundthebinary" > pycbf_test4_orig.out; \ + grep -v "__builtins__" pycbf_test4.out | grep -v "__add__" | \ + grep -v "Foundthebinary" | $(DIFF) - pycbf_test4_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_testfelaxes.py fel_test1.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) + -(cd $(PY3CBF); $(DIFF) fel_test1.out $(ROOT)/fel_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_testfelaxes.py fel_test2.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) + -(cd $(PY3CBF); $(DIFF) fel_test2.out $(ROOT)/fel_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_testfelaxes.py ../hit-20140306005258847.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) + -(cd $(PY3CBF); $(DIFF) fel_test3.out $(ROOT)/fel_test3_orig.out) + +py3cbfinstall: $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(PY3CBF)/py3cbfinstall + +py3cbfuserinstall: $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(PY3CBF)/py3cbfuserinstall javatests: $(BIN)/ctestcbf $(BIN)/testcbf.class $(SOLIB)/libcbf_wrap.so $(LDPREFIX) $(BIN)/ctestcbf > testcbfc.txt @@ -2513,13 +2713,13 @@ empty: @-rm -rf $(INCLUDE)/bshuf* @-rm -rf $(INCLUDE)/H5* @-rm -rf $(BIN)/* - @-rm -f $(PYCBF)/_pycbf.$(PYCBFEXT) - @-rm -rf $(PYCBF)/build/* - @-rm -f $(PYCBF)/newtest1.cbf - @-rm -f $(PYCBF)/fel_test1.out - @-rm -f $(PYCBF)/fel_test2.out - @-rm -f $(PYCBF)/setup.py - @-rm -f $(PYCBF)/setup_MINGW.py + @-rm -f $(PY2CBF)/_py2cbf.$(PY2CBFEXT) + @-rm -rf $(PY2CBF)/build/* + @-rm -f $(PY2CBF)/newtest1.cbf + @-rm -f $(PY2CBF)/fel_test1.out + @-rm -f $(PY2CBF)/fel_test2.out + @-rm -f $(PY2CBF)/setup.py + @-rm -f $(PY2CBF)/setup_MINGW.py @-rm -f makecbf.cbf @-rm -f img2cif_packed.cif @-rm -f img2cif_canonical.cif @@ -2603,12 +2803,39 @@ empty: @-rm -f 1191_00005.cbf @-rm -f XRD1621.tif @-rm -f md5tmp - @-rm -rf $(PYCBF)/build + @-rm -rf $(PY2CBF)/build @-rm -f *_old @-rm -f X4_lots_M1S4_1_*.cbf @-rm -f testfile.h5 @-rm -f hit-20140306005258847.cbf @-rm -f build_* + @-rm -rf HDF5Plugin_5Jun21/ + @-rm -rf PyCifRW-4.1/ + @-rm -rf PyCifRW-4.3/ + @-rm -rf bitshuffle-0.2.2.1_15Jun16/ + @-rm -f idx-s00-20131106040304531_flat.cbf + @-rm -f include/iochain.h + @-rm -f include/lz4.h + @-rm -f include/pcre.h + @-rm -f include/pcre_scanner.h + @-rm -f include/pcre_stringpiece.h + @-rm -f include/pcrecpp.h + @-rm -f include/pcrecpparg.h + @-rm -f include/pcreposix.h + @-rm -f include/regex.h + @-rm -f minicbf_test/X4_lots_M1S4_1_0001.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0002.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0003.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0004.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0005.cbf + @-rm -f minicbf_test/minicbf.h5 + @-rm -rf ply-3.2/dist/ + @-rm -f $(PY2CBF)/fel_test3.out + @-rm -f $(PY2CBF)/pycbf.pyc + @-rm -f $(PY2CBF)/pycbf_test1.out + @-rm -f $(PY2CBF)/pycbf_test2.out + @-rm -f $(PY2CBF)/pycbf_test3.out + @-rm -f $(PY2CBF)/pycbf_test4.out ./.undosymlinks # diff --git a/Makefile_LINUX_64 b/Makefile_LINUX_64 deleted file mode 100644 index e691bf4d..00000000 --- a/Makefile_LINUX_64 +++ /dev/null @@ -1,2642 +0,0 @@ - -###################################################################### -# Makefile - command file for make to create CBFlib # -# # -# Version 0.9.6 19 May 2020 # -# # -# Paul Ellis and # -# Herbert J. Bernstein (yaya@bernstein-plus-sons.com) # -# # -# (C) Copyright 2006 - 2020 Herbert J. Bernstein # -# # -###################################################################### - -###################################################################### -# # -# YOU MAY REDISTRIBUTE THE CBFLIB PACKAGE UNDER THE TERMS OF THE GPL # -# # -# ALTERNATIVELY YOU MAY REDISTRIBUTE THE CBFLIB API UNDER THE TERMS # -# OF THE LGPL # -# # -###################################################################### - -########################### GPL NOTICES ############################## -# # -# This program is free software; you can redistribute it and/or # -# modify it under the terms of the GNU General Public License as # -# published by the Free Software Foundation; either version 2 of # -# (the License, or (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program; if not, write to the Free Software # -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # -# 02111-1307 USA # -# # -###################################################################### - -######################### LGPL NOTICES ############################### -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of the GNU Lesser General Public # -# License as published by the Free Software Foundation; either # -# version 2.1 of the License, or (at your option) any later version. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # -# Lesser General Public License for more details. # -# # -# You should have received a copy of the GNU Lesser General Public # -# License along with this library; if not, write to the Free # -# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # -# MA 02110-1301 USA # -# # -###################################################################### - -###################################################################### -# # -# Stanford University Notices # -# for the CBFlib software package that incorporates SLAC software # -# on which copyright is disclaimed # -# # -# This software # -# ------------- # -# The term "this software", as used in these Notices, refers to # -# those portions of the software package CBFlib that were created by # -# employees of the Stanford Linear Accelerator Center, Stanford # -# University. # -# # -# Stanford disclaimer of copyright # -# -------------------------------- # -# Stanford University, owner of the copyright, hereby disclaims its # -# copyright and all other rights in this software. Hence, anyone # -# may freely use it for any purpose without restriction. # -# # -# Acknowledgement of sponsorship # -# ------------------------------ # -# This software was produced by the Stanford Linear Accelerator # -# Center, Stanford University, under Contract DE-AC03-76SFO0515 with # -# the Department of Energy. # -# # -# Government disclaimer of liability # -# ---------------------------------- # -# Neither the United States nor the United States Department of # -# Energy, nor any of their employees, makes any warranty, express or # -# implied, or assumes any legal liability or responsibility for the # -# accuracy, completeness, or usefulness of any data, apparatus, # -# product, or process disclosed, or represents that its use would # -# not infringe privately owned rights. # -# # -# Stanford disclaimer of liability # -# -------------------------------- # -# Stanford University makes no representations or warranties, # -# express or implied, nor assumes any liability for the use of this # -# software. # -# # -# Maintenance of notices # -# ---------------------- # -# In the interest of clarity regarding the origin and status of this # -# software, this and all the preceding Stanford University notices # -# are to remain affixed to any copy or derivative of this software # -# made or distributed by the recipient and are to be affixed to any # -# copy of software made or distributed by the recipient that # -# contains a copy or derivative of this software. # -# # -# Based on SLAC Software Notices, Set 4 # -# OTT.002a, 2004 FEB 03 # -###################################################################### - - - -###################################################################### -# NOTICE # -# Creative endeavors depend on the lively exchange of ideas. There # -# are laws and customs which establish rights and responsibilities # -# for authors and the users of what authors create. This notice # -# is not intended to prevent you from using the software and # -# documents in this package, but to ensure that there are no # -# misunderstandings about terms and conditions of such use. # -# # -# Please read the following notice carefully. If you do not # -# understand any portion of this notice, please seek appropriate # -# professional legal advice before making use of the software and # -# documents included in this software package. In addition to # -# whatever other steps you may be obliged to take to respect the # -# intellectual property rights of the various parties involved, if # -# you do make use of the software and documents in this package, # -# please give credit where credit is due by citing this package, # -# its authors and the URL or other source from which you obtained # -# it, or equivalent primary references in the literature with the # -# same authors. # -# # -# Some of the software and documents included within this software # -# package are the intellectual property of various parties, and # -# placement in this package does not in any way imply that any # -# such rights have in any way been waived or diminished. # -# # -# With respect to any software or documents for which a copyright # -# exists, ALL RIGHTS ARE RESERVED TO THE OWNERS OF SUCH COPYRIGHT. # -# # -# Even though the authors of the various documents and software # -# found here have made a good faith effort to ensure that the # -# documents are correct and that the software performs according # -# to its documentation, and we would greatly appreciate hearing of # -# any problems you may encounter, the programs and documents any # -# files created by the programs are provided **AS IS** without any * -# warranty as to correctness, merchantability or fitness for any # -# particular or general use. # -# # -# THE RESPONSIBILITY FOR ANY ADVERSE CONSEQUENCES FROM THE USE OF # -# PROGRAMS OR DOCUMENTS OR ANY FILE OR FILES CREATED BY USE OF THE # -# PROGRAMS OR DOCUMENTS LIES SOLELY WITH THE USERS OF THE PROGRAMS # -# OR DOCUMENTS OR FILE OR FILES AND NOT WITH AUTHORS OF THE # -# PROGRAMS OR DOCUMENTS. # -###################################################################### - -###################################################################### -# # -# The IUCr Policy # -# for the Protection and the Promotion of the STAR File and # -# CIF Standards for Exchanging and Archiving Electronic Data # -# # -# Overview # -# # -# The Crystallographic Information File (CIF)[1] is a standard for # -# information interchange promulgated by the International Union of # -# Crystallography (IUCr). CIF (Hall, Allen & Brown, 1991) is the # -# recommended method for submitting publications to Acta # -# Crystallographica Section C and reports of crystal structure # -# determinations to other sections of Acta Crystallographica # -# and many other journals. The syntax of a CIF is a subset of the # -# more general STAR File[2] format. The CIF and STAR File approaches # -# are used increasingly in the structural sciences for data exchange # -# and archiving, and are having a significant influence on these # -# activities in other fields. # -# # -# Statement of intent # -# # -# The IUCr's interest in the STAR File is as a general data # -# interchange standard for science, and its interest in the CIF, # -# a conformant derivative of the STAR File, is as a concise data # -# exchange and archival standard for crystallography and structural # -# science. # -# # -# Protection of the standards # -# # -# To protect the STAR File and the CIF as standards for # -# interchanging and archiving electronic data, the IUCr, on behalf # -# of the scientific community, # -# # -# # holds the copyrights on the standards themselves, * -# # -# # owns the associated trademarks and service marks, and * -# # -# # holds a patent on the STAR File. * -# # -# These intellectual property rights relate solely to the # -# interchange formats, not to the data contained therein, nor to # -# the software used in the generation, access or manipulation of # -# the data. # -# # -# Promotion of the standards # -# # -# The sole requirement that the IUCr, in its protective role, # -# imposes on software purporting to process STAR File or CIF data # -# is that the following conditions be met prior to sale or # -# distribution. # -# # -# # Software claiming to read files written to either the STAR * -# File or the CIF standard must be able to extract the pertinent # -# data from a file conformant to the STAR File syntax, or the CIF # -# syntax, respectively. # -# # -# # Software claiming to write files in either the STAR File, or * -# the CIF, standard must produce files that are conformant to the # -# STAR File syntax, or the CIF syntax, respectively. # -# # -# # Software claiming to read definitions from a specific data * -# dictionary approved by the IUCr must be able to extract any # -# pertinent definition which is conformant to the dictionary # -# definition language (DDL)[3] associated with that dictionary. # -# # -# The IUCr, through its Committee on CIF Standards, will assist # -# any developer to verify that software meets these conformance # -# conditions. # -# # -# Glossary of terms # -# # -# [1] CIF: is a data file conformant to the file syntax defined # -# at http://www.iucr.org/iucr-top/cif/spec/index.html # -# # -# [2] STAR File: is a data file conformant to the file syntax # -# defined at http://www.iucr.org/iucr-top/cif/spec/star/index.html # -# # -# [3] DDL: is a language used in a data dictionary to define data # -# items in terms of "attributes". Dictionaries currently approved # -# by the IUCr, and the DDL versions used to construct these # -# dictionaries, are listed at # -# http://www.iucr.org/iucr-top/cif/spec/ddl/index.html # -# # -# Last modified: 30 September 2000 # -# # -# IUCr Policy Copyright (C) 2000 International Union of # -# Crystallography # -###################################################################### - -.DELETE_ON_ERROR: - -# Version string -VERSION = 0.9.6 - -# -# Directories -# -ROOT = $(PWD) -LIB = $(ROOT)/lib -SOLIB = $(ROOT)/solib -JCBF = $(ROOT)/jcbf -JAVADIR = $(ROOT)/java -BIN = $(ROOT)/bin -SRC = $(ROOT)/src -INCLUDE = $(ROOT)/include -M4 = $(ROOT)/m4 -PYCBF = $(ROOT)/pycbf -EXAMPLES = $(ROOT)/examples -TEMPLATES= $(ROOT)/templates -DECTRIS_EXAMPLES = $(EXAMPLES)/dectris_cbf_template_test -DOC = $(ROOT)/doc -MINICBF_TEST = $(ROOT)/minicbf_test -GRAPHICS = $(ROOT)/html_graphics -DATADIRI = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Input -DATADIRO = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output -DATADIRS = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only -CBF_PREFIX ?= $(HOME) - -# -# Comment out the next line if scratch test files should be retained -# -CLEANTESTS = yes - - -MSYS2=no -CBFLIB_DONT_USE_LOCAL_HDF5?=no -CBFLIB_DONT_USE_LZ4?=no -CBFLIB_DONT_USE_BSHUF?=no - - -CBFLIB_DONT_HAVE_FGETLN ?= yes -ifeq ($(CBFLIB_DONT_HAVE_FGETLN),yes) -SRC_FGETLN = $(SRC)/fgetln.c -else -SRC_FGETLN = -endif - - -CBFLIB_DONT_USE_PYCIFRW ?= no -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -# -# Definitions to get versions of PyCifRW and PLY -# -PYCIFRW ?= PyCifRW-4.1 -PLY = ply-3.2 -PYCIFRWFLAG = -DCBF_USE_PYCIFRW -PYCIFRW_PREFIX ?= $(HOME)/.local -endif - -# -# Definition to get a version of tifflib to support tiff2cbf -# -TIFF ?= tiff-4.0.6_rev_3Nov16 -TIFF_PREFIX ?= $(PWD) -TIFF_INSTALL = $(TIFF)_INSTALL - - -# -# Definitions to get a version of HDF5 -# - -ifneq ($(HDF5_PREFIX),) # already installed on system -CBFLIB_DONT_USE_LOCAL_HDF5 = yes -endif - -ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes) -HDF5_PREFIX ?= $(PWD) -HDF5 ?= hdf5-1.10.6 -#HDF5 = hdf5-1.8.18 -#HDF5 = hdf5-1.10.5 -HDF5dep = $(HDF5) -HDF5_INSTALL = $(HDF5)_INSTALL -ifneq ($(MSYS2),yes) -HDF5LIBS_LOCAL = $(LIB)/libhdf5.a -HDF5LIBS_SYSTEM = -lz -ldl -HDF5SOLIBS_LOCAL = -L$(LIB) -lhdf5 -HDF5SOLIBS_SYSTEM = -lz -else -HDF5LIBS_LOCAL = -L$(LIB) -lhdf5 -lhdf5.dll -HDF5LIBS_SYSTEM = -lz -ldl -HDF5SOLIBS_LOCAL = -L$(LIB) -lhdf5 -lhdf5.dll -HDF5SOLIBS_SYSTEM = -lz -endif -else -HDF5 = -HDF5dep = -HDF5_INSTALL = -HDF5LIBS_LOCAL = -ifneq ($(HDF5_PREFIX),) -HDF5lib = -L$(HDF5_PREFIX)/lib -endif -ifneq ($(MSYS2),yes) -HDF5LIBS_SYSTEM = $(HDF5lib) -lhdf5 -lz -ldl -HDF5SOLIBS_LOCAL = -HDF5SOLIBS_SYSTEM = $(HDF5lib) -lhdf5 -lz -else -HDF5LIBS_SYSTEM = $(HDF5lib) -lhdf5 -lhdf5.dll -lz -ldl -HDF5SOLIBS_LOCAL = -HDF5SOLIBS_SYSTEM = $(HDF5lib) -lhdf5 -lhdf5.dll -lz -endif -endif - -HDF5REGISTER ?= --register manual -ifneq ($(HDF5_PREFIX),) -HDF5include = -I$(HDF5_PREFIX)/include -endif - -ifneq ($(MSYS2),yes) -H5DUMP = $(HDF5_PREFIX)/bin/h5dump -else -H5DUMP = /MINGW32/bin/h5dump -endif - - -CBFLIB_DONT_USE_LZ4 ?= no -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -# -# Definitions to get a version of HDF5Plugin for LZ4 -# -ifneq ($(MSYS2),yes) -LZ4 ?= HDF5Plugin_14Aug20 -else -LZ4 ?= HDF5-External-Filter-Plugins -endif -LZ4dep = $(LZ4) -LZ4src = $(LZ4)/src -LZ4include = $(LZ4)/include -LZ4SOLIBS = -L$(SOLIB) -lh5zlz4 -else -LZ4SOLIBS = -LZ4dep = -endif - -CBFLIB_DONT_USE_BSHUF ?= no -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -# -# Definitions to get a version of HDF5Plugin for BSHUFFLE WITH LZ4 -# -BSHUF ?= bitshuffle-0.2.2.1_15Jun16 -BSUFdep = $(BSHUF) -BSHUFsrc = $(BSHUF)/src -BSHUFinclude = $(BSHUF)/src -BSHUFSOLIBS = -L$(SOLIB) -lh5zbshuf -BSHUFFILTER = libbshuf_h5filter -else -BSHUFSOLIBS = -BSHUFdep = -endif - -CBFLIB_DONT_USE_BLOSC ?= no -ifneq ($(CBFLIB_DONT_USE_BLOSC),yes) -# -# Definitions to get a version of HDF5Plugin for BLOSC -# -BLOSC = ?c-blosc_4Sep16.tar.gz -BLOSCdep = $(BLOSC) -BLOSCFILTER = hdf5-blosc_2Sep16.tar.gz -BLOSCsrc = $(BLOSC)/src -BLOSCinclude = $(BLOSC)/src -BLOSCSOLIBS = -L$(SOLIB) -lh5zbshuf -BLOSCFILTER = libbshuf_h5filter -else -BLOSCSOLIBS = -BLOSCdep = -endif - - - -# -# Definition of python to use -# -#PYTHON = python -PYTHON ?= python2 - - -# -# Definitions to get a stable version of regex -# -REGEX_PREFIX ?= $(PWD) -ifneq ($(REGEX_PREFIX),$(PWD)) -CBFLIB_DONT_USE_LOCAL_REGEX ?= yes -endif - - -REGEX_LIBDIR ?= $(REGEX_PREFIX)/lib -ifneq ($(CBFLIB_DONT_USE_LOCAL_REGEX),yes) -REGEX ?= pcre-8.38 -REGEXDEP = $(REGEX) -REGEX_INSTALL = $(REGEX)_INSTALL -REGEX_LIB ?= pcreposix -REGEX_LIB2 ?= pcre -ifneq ($(MSYS2),yes) -REGEX_LIBS ?= -L $(REGEX_LIBDIR) -l$(REGEX_LIB) -l$(REGEX_LIB2) -REGEX_LIBS_STATIC = $(LIB)/libpcreposix.a $(LIB)/libpcre.a -else -REGEX_LIBS ?= -L $(REGEX_LIBDIR) -l$(REGEX_LIB) -l$(REGEX_LIB).dll -l$(REGEX_LIB2) -l$(REGEX_LIB2).dll -REGEX_LIBS_STATIC = $(REGEX_LIBS) -endif -REGEX_INCLUDES ?= -I $(REGEX_PREFIX) -else -REGEX = -REGEXDEP = -REGEX_INSTALL = -REGEX_LIB ?= -REGEX_LIB2 ?= -REGEX_LIBS ?= -REGEX_INCLUDES ?= -endif - - -# Program to use to retrieve a URL - -DOWNLOAD ?= wget -N -#DOWNLOAD ?= curl -O -L - -# Flag to control symlinks versus copying - -SLFLAGS = --use_ln -LN = ln -s -f - -# -# Program to use to pack shars -# -SHAR = /usr/bin/shar -#SHAR = /usr/local/bin/gshar - -# -# Program to use to create archives -# -AR = /usr/bin/ar - -# -# Program to use to add an index to an archive -# -RANLIB = /usr/bin/ranlib - - -# -# Program to use to generate a signature -# -#SIGNATURE ?= /usr/bin/openssl dgst -md5 -#SIGNATURE ?= (/usr/bin/openssl dgst -md5 | sed "s/^.*= //") -SIGNATURE ?= ( cat > md5tmp; cmake -E md5sum md5tmp| sed "s/ .*//") - -# -# Pipe command to extract all but the first line of a text file -# -ALLBUTONE = tail -n +2 - - -# -# Extension for signatures of files -# -SEXT = .md5 - -# Default shell - -SHELL = bash - -# call to time a command - -#TIME = -#TIME = time - -# -# Program to display differences between files -# -DIFF = diff -u -b - - -# -# Program to generate wrapper classes for Python -# -PYSWIG = swig -python - -# -# Program to generate wrapper classes for Java -# -JSWIG = swig -java - -# -# Program to generate LaTex and HTML program documentation -# - -NUWEB = nuweb - -# -# Compiler for Java -# -JAVAC = javac - -# -# Java archiver for compiled classes -# -JAR = jar - -# -# Java SDK root directory -# -ifeq ($(JDKDIR),) - JDKDIR = /usr/lib/java -endif - -ifneq ($(CBF_DONT_USE_LONG_LONG),) -NOLLFLAG = -DCBF_DONT_USE_LONG_LONG -else -NOLLFLAG = -endif - -ifneq ($(CBF_NO_REGEX),) -CBF_REGEXFLAG = -DCBF_NO_REGEX -else -CBF_REGEXFLAG = -DCBF_REGEXLIB_REGEX -endif - -ifneq ($(CBF_USE_ULP),) -ULPFLAG = -DCBF_USE_ULP -else -ULPFLAG = -endif - -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -LZ4FLAG = -DCBF_H5Z_USE_LZ4 -else -LZ4FLAG = -endif - -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -BSHUFFLAG = -DCBF_H5Z_USE_BSHUF -else -BSHUFFLAG = -endif - - - -MISCFLAG = $(NOLLFLAG) $(ULPFLAG) - -# -# PYCBF definitions -# -PYCBFEXT = so -PYCBFBOPT = -PYCBFIOPT = -SETUP_PY = setup.py -INSTALLSETUP_PY = installsetup.py - -# -# Set the compiler and flags -# - -######################################################### -# -# Appropriate compiler definitions for Linux x86_64 -# with gcc version 4.2 -# -######################################################### -CC = gcc -m64 -C++ = g++ -m64 -CFLAGS = -g -O2 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing -LDFLAGS = -F90C = gfortran -m64 -F90FLAGS = -g -fno-range-check -F90LDFLAGS = -SOCFLAGS = -fPIC -SOLDFLAGS = -shared -Wl,-rpath,$(CBF_PREFIX)/lib -JAVAINCLUDES = -I$(JDKDIR)/include -I$(JDKDIR)/include/linux -LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; -RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/lib:$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; -EXTRALIBS = -lm -M4FLAGS = -Dfcb_bytes_in_rec=131072 -TIME = time - -ifneq ($(NOFORTRAN),) -F90C = -endif - -# -# URLs from which to retrieve the data directories -# -DATAURLBASE = http://downloads.sf.net/cbflib/ -DATAURLI = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Input.tar.gz -DATAURLO = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output.tar.gz -DATAURLS = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz - -# -# URLs from which to retrieve needed external package snapshots -# -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWURL = http://downloads.sf.net/cbflib/$(PYCIFRW).tar.gz -PLYURL = http://www.dabeaz.com/ply/$(PLY).tar.gz -endif -REGEX_URL ?= http://downloads.sf.net/cbflib/$(REGEX).tar.gz -TIFF_URL ?= http://downloads.sf.net/cbflib/$(TIFF).tar.gz -HDF5_URL ?= http://downloads.sf.net/cbflib/$(HDF5).tar.gz -ifneq ($(MSYS2),yes) -LZ4_URL = http://downloads.sf.net/cbflib/$(LZ4).tar.gz -else -LZ4_URL = http://www.github.com/yayahjb/$(LZ4).git -endif -BSHUFURL = http://downloads.sf.net/cbflib/$(BSHUF).tar.gz - - -# -# Include directories -# -INCLUDES = -I$(INCLUDE) -I$(SRC) $(HDF5include) - -# -# runtime library path export commands -# -RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export LD_LIBRARY_PATH; \ - DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export DYLD_LIBRARY_PATH; \ - LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib;export LD_RUN_PATH; - - -###################################################################### -# You should not need to make modifications below this line # -###################################################################### - -ifneq ($(CBF_USE_ULP),) -SRC_CBF_ULP_C = $(SRC)/cbf_ulp.c -INCLUDE_CBF_ULP_H = $(INCLUDE)/cbf_ulp.h -BIN_TESTULP = $(BIN)/testulp -else -SRC_CBF_ULP_C = -INCLUyDE_CBF_ULP_H = -BIN_TESTULP = -endif - -ifneq ($(MSYS2),yes) -SRC_REALPATH = -else -SRC_REALPATH = $(SRC)/realpath.c -endif - - -# -# Suffixes of files to be used or built -# -.SUFFIXES: .c .o .f90 .m4 - -.m4.f90: - m4 -P $(M4FLAGS) $< > $@ - -ifneq ($(F90C),) -.f90.o: - $(F90C) $(F90FLAGS) -c $< -o $@ -endif - - -# -# Common dependencies -# -COMMONDEP = $(M4)/Makefile.m4 - -# -# Source files -# - -SOURCE = $(SRC)/cbf.c \ - $(SRC)/cbf_airy_disk.c \ - $(SRC)/cbf_alloc.c \ - $(SRC)/cbf_ascii.c \ - $(SRC)/cbf_binary.c \ - $(SRC)/cbf_byte_offset.c \ - $(SRC)/cbf_canonical.c \ - $(SRC)/cbf_codes.c \ - $(SRC)/cbf_compress.c \ - $(SRC)/cbf_context.c \ - $(SRC)/cbf_copy.c \ - $(SRC)/cbf_file.c \ - $(SRC)/cbf_getopt.c \ - $(SRC)/cbf_hdf5.c \ - $(SRC)/cbf_hdf5_filter.c \ - $(SRC)/cbf_lex.c \ - $(SRC)/cbf_minicbf_header.c\ - $(SRC)/cbf_nibble_offset.c \ - $(SRC)/cbf_packed.c \ - $(SRC)/cbf_predictor.c \ - $(SRC)/cbf_read_binary.c \ - $(SRC)/cbf_read_mime.c \ - $(SRC)/cbf_simple.c \ - $(SRC)/cbf_string.c \ - $(SRC)/cbf_stx.c \ - $(SRC)/cbf_tree.c \ - $(SRC_CBF_ULP_C) \ - $(SRC)/cbf_uncompressed.c \ - $(SRC)/cbf_write.c \ - $(SRC)/cbf_write_binary.c \ - $(SRC)/cbf_ws.c \ - $(SRC)/cbff.c \ - $(SRC)/md5c.c \ - $(SRC)/img.c \ - $(SRC_FGETLN) $(SRC_REALPATH) - -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYSOURCE = $(SRC)/drel_lex.py \ - $(SRC)/drel_yacc.py \ - $(SRC)/drelc.py \ - $(SRC)/drel_prep.py -endif - -F90SOURCE = $(SRC)/fcb_atol_wcnt.f90 \ - $(SRC)/fcb_ci_strncmparr.f90 \ - $(SRC)/fcb_exit_binary.f90 \ - $(SRC)/fcb_nblen_array.f90 \ - $(SRC)/fcb_next_binary.f90 \ - $(SRC)/fcb_open_cifin.f90 \ - $(SRC)/fcb_packed.f90 \ - $(SRC)/fcb_read_bits.f90 \ - $(SRC)/fcb_read_byte.f90 \ - $(SRC)/fcb_read_image.f90 \ - $(SRC)/fcb_read_line.f90 \ - $(SRC)/fcb_read_xds_i2.f90 \ - $(SRC)/fcb_skip_whitespace.f90 - - -# -# Header files -# -HEADERS = $(INCLUDE)/cbf.h \ - $(INCLUDE)/cbf_airy_disk.h \ - $(INCLUDE)/cbf_alloc.h \ - $(INCLUDE)/cbf_ascii.h \ - $(INCLUDE)/cbf_binary.h \ - $(INCLUDE)/cbf_byte_offset.h \ - $(INCLUDE)/cbf_canonical.h \ - $(INCLUDE)/cbf_codes.h \ - $(INCLUDE)/cbf_compress.h \ - $(INCLUDE)/cbf_context.h \ - $(INCLUDE)/cbf_copy.h \ - $(INCLUDE)/cbf_file.h \ - $(INCLUDE)/cbf_getopt.h \ - $(INCLUDE)/cbf_hdf5.h \ - $(INCLUDE)/cbf_hdf5_filter.h \ - $(INCLUDE)/cbf_lex.h \ - $(INCLUDE)/cbf_minicbf_header.h\ - $(INCLUDE)/cbf_nibble_offset.h \ - $(INCLUDE)/cbf_packed.h \ - $(INCLUDE)/cbf_predictor.h \ - $(INCLUDE)/cbf_read_binary.h \ - $(INCLUDE)/cbf_read_mime.h \ - $(INCLUDE)/cbf_simple.h \ - $(INCLUDE)/cbf_string.h \ - $(INCLUDE)/cbf_stx.h \ - $(INCLUDE)/cbf_tree.h \ - $(INCLUDE)/cbf_uncompressed.h \ - $(INCLUDE_CBF_ULP_H) \ - $(INCLUDE)/cbf_write.h \ - $(INCLUDE)/cbf_write_binary.h \ - $(INCLUDE)/cbf_ws.h \ - $(INCLUDE)/global.h \ - $(INCLUDE)/cbff.h \ - $(INCLUDE)/md5.h \ - $(INCLUDE)/img.h - -# -# m4 macro files -# -M4FILES = $(M4)/fcblib_defines.m4 \ - $(M4)/fcb_exit_binary.m4 \ - $(M4)/fcb_next_binary.m4 \ - $(M4)/fcb_open_cifin.m4 \ - $(M4)/fcb_packed.m4 \ - $(M4)/fcb_read_bits.m4 \ - $(M4)/fcb_read_image.m4 \ - $(M4)/fcb_read_xds_i2.m4 \ - $(M4)/test_fcb_read_image.m4 \ - $(M4)/test_xds_binary.m4 - - -# -# Documentation files -# -DOCUMENTS = $(DOC)/CBFlib.html \ - $(DOC)/CBFlib.txt \ - $(DOC)/CBFlib_NOTICES.html \ - $(DOC)/CBFlib_NOTICES.txt \ - $(DOC)/ChangeLog \ - $(DOC)/ChangeLog.html \ - $(DOC)/MANIFES \ - $(DOC)/gpl.txt $(DOC)/lgpl.txt - -# -# HTML Graphics files -# -JPEGS = $(GRAPHICS)/CBFbackground.jpg \ - $(GRAPHICS)/CBFbig.jpg \ - $(GRAPHICS)/CBFbutton.jpg \ - $(GRAPHICS)/cbflibbackground.jpg\ - $(GRAPHICS)/cbflibbig.jpg \ - $(GRAPHICS)/cbflibbutton.jpg \ - $(GRAPHICS)/cifhome.jpg \ - $(GRAPHICS)/iucrhome.jpg \ - $(GRAPHICS)/noticeButton.jpg - - -# -# Default: instructions -# -default: - @echo ' ' - @echo '***************************************************************' - @echo ' ' - @echo ' PLEASE READ README and doc/CBFlib_NOTICES.txt' - @echo ' ' - @echo ' Before making the CBF library and example programs, check' - @echo ' that the C compiler name and flags are correct:' - @echo ' ' - @echo ' The current values are:' - @echo ' ' - @echo ' $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(PYCIFRWFLAG)' - @echo ' ' - @echo ' Before installing the CBF library and example programs, check' - @echo ' that the install directory is correct:' - @echo ' ' - @echo ' The current value :' - @echo ' ' - @echo ' $(CBF_PREFIX) ' - @echo ' ' - @echo ' To compile the CBF library and example programs type:' - @echo ' ' - @echo ' make clean' - @echo ' make all' - @echo ' ' - @echo ' To compile the CBF library as a shared object library, type:' - @echo ' ' - @echo ' make shared' - @echo ' ' - @echo ' To compile the Java wrapper classes for CBF library, type:' - @echo ' ' - @echo ' make javawrapper' - @echo ' ' - @echo ' To run a set of tests type:' - @echo ' ' - @echo ' make tests' - @echo ' ' - @echo ' To run some java tests type:' - @echo ' ' - @echo ' make javatests' - @echo ' ' - @echo ' The tests assume that several data files are in the directories' - @echo ' $(DATADIRI) and $(DATADIRO)' - @echo ' ' - @echo ' Alternatively tests can be run comparing MD5 signatures only by' - @echo ' ' - @echo ' make tests_sigs_only' - @echo ' ' - @echo ' These signature only tests save space and download time by' - @echo ' assuming that input data files and the output signatures' - @echo ' are in the directories' - @echo ' $(DATADIRI) and $(DATADIRS)' - @echo ' ' - @echo ' These directory can be obtained from' - @echo ' ' - @echo ' $(DATAURLI) ' - @echo ' $(DATAURLO) ' - @echo ' $(DATAURLS) ' - @echo ' ' - @echo ' To clean up the directories type:' - @echo ' ' - @echo ' make clean' - @echo ' ' - @echo ' To install the library and binaries type:' - @echo ' ' - @echo ' make install' - @echo ' ' - @echo '***************************************************************' - @echo ' ' - -# -# Compile the library and examples -# -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEPS = $(PYCIFRW) $(PLY) -else -PYCIFRWDEPS = -endif - -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -LZ4DEPS = $(LZ4) -else -LZ4DEPS = -endif - -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -BSHUFDEPS = $(BSHUF) -else -BSHUFDEPS = -endif - - -all:: $(BIN) $(SOURCE) $(F90SOURCE) $(HEADERS) \ - $(HDF5) \ - $(LZ4DEPS) \ - $(BSHUFDEPS) \ - $(PYCIFRWDEPS) \ - symlinksdone \ - $(REGEXDEP) \ - $(LIB) \ - $(LIB)/libcbf.a \ - $(LIB)/libfcb.a \ - $(LIB)/libimg.a \ - $(BIN)/adscimg2cbf \ - $(BIN)/arvai_test \ - $(BIN)/cbf2adscimg \ - $(BIN)/cbf2nexus \ - $(BIN)/cif2c \ - $(BIN)/cif2cbf \ - $(BIN)/cbf_standardize_numbers \ - $(BIN)/convert_image \ - $(BIN)/convert_minicbf\ - $(BIN)/img2cif \ - $(BIN)/makecbf \ - $(BIN)/minicbf2nexus \ - $(BIN)/nexus2cbf \ - $(BIN)/roi_peaksearch \ - $(BIN)/sequence_match \ - $(BIN)/testcell \ - $(BIN)/testalloc \ - $(BIN)/testreals \ - $(BIN)/testflat \ - $(BIN)/testflatpacked \ - $(BIN)/testhdf5 \ - $(BIN_TESTULP) \ - $(BIN)/tiff2cbf \ - $(BIN)/test_cbf_airy_disk \ - $(BIN)/cbf_testxfelread - -ifneq ($(F90C),) -all:: $(BIN)/test_xds_binary \ - $(BIN)/test_fcb_read_image -endif - -shared: $(SOLIB)/libcbf.so $(SOLIB)/libfcb.so $(SOLIB)/libimg.so - -javawrapper: shared $(JCBF) $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so - -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEF = -Dcbf_use_pycifrw=yes -else -PYCIFRWDEF = -endif - - -Makefiles: Makefile \ - Makefile_LINUX \ - Makefile_LINUX_64 \ - Makefile_LINUX_gcc42 \ - Makefile_LINUX_DMALLOC \ - Makefile_LINUX_gcc42_DMALLOC \ - Makefile_OSX \ - Makefile_OSX_gcc42 \ - Makefile_OSX_gcc42_DMALLOC \ - Makefile_AIX \ - Makefile_MINGW \ - Makefile_MSYS2 \ - Makefile_IRIX_gcc - - -Makefile_LINUX: $(M4)/Makefile.m4 - -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX $(M4)/Makefile.m4 > Makefile_LINUX.tmp - mv Makefile_LINUX.tmp Makefile_LINUX - -Makefile_LINUX_DMALLOC: $(M4)/Makefile.m4 - -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_DMALLOC.tmp - mv Makefile_LINUX_DMALLOC.tmp Makefile_LINUX_DMALLOC - -Makefile_LINUX_64: $(M4)/Makefile.m4 - -cp Makefile_LINUX_64 Makefile_LINUX_64_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_64 $(M4)/Makefile.m4 > Makefile_LINUX_64.tmp - mv Makefile_LINUX_64.tmp Makefile_LINUX_64 - -Makefile_LINUX_gcc42: $(M4)/Makefile.m4 - -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42 $(M4)/Makefile.m4 > Makefile_LINUX_gcc42.tmp - mv Makefile_LINUX_gcc42.tmp Makefile_LINUX_gcc42 - -Makefile_LINUX_gcc42_DMALLOC: $(M4)/Makefile.m4 - -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_gcc42_DMALLOC.tmp - mv Makefile_LINUX_gcc42_DMALLOC.tmp Makefile_LINUX_gcc42_DMALLOC - -Makefile_OSX: $(M4)/Makefile.m4 - -cp Makefile_OSX Makefile_OSX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX $(M4)/Makefile.m4 > Makefile_OSX.tmp - mv Makefile_OSX.tmp Makefile_OSX - -Makefile_OSX_gcc42: $(M4)/Makefile.m4 - -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42 $(M4)/Makefile.m4 > Makefile_OSX_gcc42.tmp - mv Makefile_OSX_gcc42.tmp Makefile_OSX_gcc42 - -Makefile_OSX_gcc42_DMALLOC: $(M4)/Makefile.m4 - -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_OSX_gcc42_DMALLOC.tmp - mv Makefile_OSX_gcc42_DMALLOC.tmp Makefile_OSX_gcc42_DMALLOC - -Makefile_AIX: $(M4)/Makefile.m4 - -cp Makefile_AIX Makefile_AIX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=AIX $(M4)/Makefile.m4 > Makefile_AIX.tmp - mv Makefile_AIX.tmp Makefile_AIX - -Makefile_MINGW: $(M4)/Makefile.m4 - -cp Makefile_MINGW Makefile_MINGW_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MINGW $(M4)/Makefile.m4 > Makefile_MINGW.tmp - mv Makefile_MINGW.tmp Makefile_MINGW - -Makefile_MSYS2: $(M4)/Makefile.m4 - -cp Makefile_MSYS2 Makefile_MSYS2_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MSYS2 $(M4)/Makefile.m4 > Makefile_MSYS2.tmp - mv Makefile_MSYS2.tmp Makefile_MSYS2 - -Makefile_IRIX_gcc: $(M4)/Makefile.m4 - -cp Makefile_IRIX_gcc Makefile_IRIX_gcc_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=IRIX_gcc $(M4)/Makefile.m4 > Makefile_IRIX_gcc.tmp - mv Makefile_IRIX_gcc.tmp Makefile_IRIX_gcc - - -Makefile: $(M4)/Makefile.m4 - -cp Makefile Makefile_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=default $(M4)/Makefile.m4 > Makefile.tmp - mv Makefile.tmp Makefile - -cbflib.ini: $(M4)/Makefile.m4 - echo "$(LDPREFIX)" > cbflib.ini - echo "HDF5_PLUGIN_PATH=$(SOLIB):$$HDF5_PLUGIN_PATH" >> cbflib.ini - echo "export HDF5_PLUGIN_PATH" >> cbflib.ini - -symlinksdone: - chmod a+x .symlinks - chmod a+x .undosymlinks - chmod a+x doc/.symlinks - chmod a+x doc/.undosymlinks - ./.symlinks $(SLFLAGS) - touch symlinksdone - -install: baseinstall pycbfinstall \ - $(HDF5_INSTALL) \ - $(TIFF_INSTALL) \ - $(REGEX_INSTALL) - -userinstall: baseinstall pycbfuserinstall \ - $(HDF5_INSTALL) \ - $(TIFF_INSTALL) \ - $(REGEX_INSTALL) - -baseinstall: all $(CBF_PREFIX) $(CBF_PREFIX)/lib $(CBF_PREFIX)/bin \ - $(CBF_PREFIX)/include $(CBF_PREFIX)/include/cbflib \ - $(PYSOURCE) shared $(EXAMPLES)/batch_convert_minicbf.sh \ - $(LIB)/libcbf.a $(LIB)/libimg.a $(LIB)/libfcb.a \ - $(SOLIB)/libcbf.so $(SOLIB)/libimg.so $(SOLIB)/libfcb.so - -chmod -R 755 $(CBF_PREFIX)/include/cbflib - -chmod 755 $(CBF_PREFIX)/lib/libcbf.a - -cp $(CBF_PREFIX)/lib/libcbf.a $(CBF_PREFIX)/lib/libcbf_old.a - cp $(LIB)/libcbf.a $(CBF_PREFIX)/lib/libcbf.a - -chmod 755 $(CBF_PREFIX)/lib/libimg.a - -cp $(CBF_PREFIX)/lib/libimg.a $(CBF_PREFIX)/lib/libimg_old.a - cp $(LIB)/libimg.a $(CBF_PREFIX)/lib/libimg.a - -chmod 755 $(CBF_PREFIX)/lib/libfcb.a - -cp $(CBF_PREFIX)/lib/libfcb.a $(CBF_PREFIX)/lib/libfcb_old.a - cp $(LIB)/libfcb.a $(CBF_PREFIX)/lib/libfcb.a - -chmod 755 $(CBF_PREFIX)/lib/libcbf.so - -cp $(CBF_PREFIX)/lib/libcbf.so $(CBF_PREFIX)/lib/libcbf_old.so - cp $(SOLIB)/libcbf.so $(CBF_PREFIX)/lib/libcbf.so - $(LN) $(CBF_PREFIX)/lib/libcbf.so $(CBF_PREFIX)/lib/lib_cbf.so - -chmod 755 $(CBF_PREFIX)/lib/libimg.so - -cp $(CBF_PREFIX)/lib/libimg.so $(CBF_PREFIX)/lib/libimg_old.so - cp $(SOLIB)/libimg.so $(CBF_PREFIX)/lib/libimg.so - $(LN) $(CBF_PREFIX)/lib/libimg.so $(CBF_PREFIX)/lib/lib_img.so - -chmod 755 $(CBF_PREFIX)/lib/libfcb.so - -cp $(CBF_PREFIX)/lib/libfcb.so $(CBF_PREFIX)/lib/libfcb_old.so - cp $(SOLIB)/libfcb.so $(CBF_PREFIX)/lib/libfcb.so - $(LN) $(CBF_PREFIX)/lib/libfcb.so $(CBF_PREFIX)/lib/lib_fcb.so - -cp $(CBF_PREFIX)/bin/cbflib.ini $(CBF_PREFIX)/bin/cbflib.ini_old - echo "$(RUNLDPREFIX)" > $(CBF_PREFIX)/bin/cbflib.ini - echo "HDF5_PLUGIN_PATH=$(CBF_PREFIX)/lib:$$HDF5_PLUGIN_PATH" >> $(CBF_PREFIX)/bin/cbflib.ini - echo "export HDF5_PLUGIN_PATH" >> $(CBF_PREFIX)/bin/cbflib.ini - -cp $(CBF_PREFIX)/bin/adscimg2cbf $(CBF_PREFIX)/bin/adscimg2cbf_old - cp $(BIN)/adscimg2cbf $(CBF_PREFIX)/bin/adscimg2cbf - -cp $(CBF_PREFIX)/bin/cbf2adscimg $(CBF_PREFIX)/bin/cbf2adscimg_old - cp $(BIN)/cbf2adscimg $(CBF_PREFIX)/bin/cbf2adscimg - -cp $(CBF_PREFIX)/bin/cbf_standardize_numbers \ - $(CBF_PREFIX)/bin/cbf_standardize_numbers_old - cp $(BIN)/cbf_standardize_numbers $(CBF_PREFIX)/bin/cbf_standardize_numbers - -cp $(CBF_PREFIX)/bin/convert_image $(CBF_PREFIX)/bin/convert_image_old - cp $(BIN)/convert_image $(CBF_PREFIX)/bin/convert_image - -cp $(CBF_PREFIX)/bin/convert_minicbf $(CBF_PREFIX)/bin/convert_minicbf_old - cp $(BIN)/convert_minicbf $(CBF_PREFIX)/bin/convert_minicbf - -cp $(CBF_PREFIX)/bin/makecbf $(CBF_PREFIX)/bin/makecbf_old - cp $(BIN)/makecbf $(CBF_PREFIX)/bin/makecbf - -cp $(CBF_PREFIX)/bin/img2cif $(CBF_PREFIX)/bin/img2cif_old - cp $(BIN)/img2cif $(CBF_PREFIX)/bin/img2cif - -cp $(CBF_PREFIX)/bin/cif2cbf $(CBF_PREFIX)/bin/cif2cbf_old - cp $(BIN)/cif2cbf $(CBF_PREFIX)/bin/cif2cbf - -cp $(CBF_PREFIX)/bin/minicbf2nexus $(CBF_PREFIX)/bin/minicbf2nexus_old - cp $(BIN)/minicbf2nexus $(CBF_PREFIX)/bin/minicbf2nexus - -cp $(CBF_PREFIX)/bin/cbf2nexus $(CBF_PREFIX)/bin/cbf2nexus_old - cp $(BIN)/cbf2nexus $(CBF_PREFIX)/bin/cbf2nexus - -cp $(CBF_PREFIX)/bin/nexus2cbf $(CBF_PREFIX)/bin/nexus2cbf_old - cp $(BIN)/nexus2cbf $(CBF_PREFIX)/bin/nexus2cbf - -cp $(CBF_PREFIX)/bin/roi_peaksearch $(CBF_PREFIX)/bin/roi_peaksearch_old - cp $(BIN)/roi_peaksearch $(CBF_PREFIX)/bin/roi_peaksearch - -cp $(CBF_PREFIX)/bin/sequence_match $(CBF_PREFIX)/bin/sequence_match_old - cp $(BIN)/sequence_match $(CBF_PREFIX)/bin/sequence_match - -cp $(CBF_PREFIX)/bin/testalloc $(CBF_PREFIX)/bin/testalloc_old - cp $(BIN)/testalloc $(CBF_PREFIX)/bin/testalloc - -cp $(CBF_PREFIX)/bin/arvai_test $(CBF_PREFIX)/bin/arvai_test_old - cp $(BIN)/arvai_test $(CBF_PREFIX)/bin/arvai_test - -cp $(CBF_PREFIX)/bin/cif2c $(CBF_PREFIX)/bin/cif2c_old - cp $(BIN)/cif2c $(CBF_PREFIX)/bin/cif2c - -cp $(CBF_PREFIX)/bin/testreals $(CBF_PREFIX)/bin/testreals_old - cp $(BIN)/testreals $(CBF_PREFIX)/bin/testreals - -cp $(CBF_PREFIX)/bin/testflat $(CBF_PREFIX)/bin/testflat_old - cp $(BIN)/testflat $(CBF_PREFIX)/bin/testflat - -cp $(CBF_PREFIX)/bin/testflatpacked $(CBF_PREFIX)/bin/testflatpacked_old - cp $(BIN)/testflatpacked $(CBF_PREFIX)/bin/testflatpacked - -cp $(CBF_PREFIX)/bin/tiff2cbf $(CBF_PREFIX)/bin/tiff2cbf_old - cp $(BIN)/tiff2cbf $(CBF_PREFIX)/bin/tiff2cbf - -cp $(CBF_PREFIX)/bin/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk_old - cp $(BIN)/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk - -cp $(CBF_PREFIX)/bin/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk_old - cp $(BIN)/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk - -cp $(CBF_PREFIX)/bin/testhdf5 $(CBF_PREFIX)/bin/testhdf5_old - cp $(BIN)/testhdf5 $(CBF_PREFIX)/bin/testhdf5 -ifneq ($(CBF_USE_ULP),) - -cp $(CBF_PREFIX)/bin/testulp $(CBF_PREFIX)/bin/testulp_old - cp $(BIN)/testulp $(CBF_PREFIX)/bin/testulp -endif - -cp $(CBF_PREFIX)/bin/batch_convert_minicbf.sh $(CBF_PREFIX)/bin/batch_convert_minicbf_old.sh - cp $(EXAMPLES)/batch_convert_minicbf.sh $(CBF_PREFIX)/bin/batch_convert_minicbf.sh -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) - cp $(SRC)/drel_lex.py $(CBF_PREFIX)/bin/drel_lex.py - cp $(SRC)/drel_yacc.py $(CBF_PREFIX)/bin/drel_yacc.py - cp $(SRC)/drelc.py $(CBF_PREFIX)/bin/drelc.py - cp $(SRC)/drel_prep.py $(CBF_PREFIX)/bin/drel_prep.py -endif - chmod -R 755 $(CBF_PREFIX)/include/cbflib - -rm -rf $(CBF_PREFIX)/include/cbflib_old - -cp -r $(CBF_PREFIX)/include/cbflib $(CBF_PREFIX)/include/cbflib_old - -rm -rf $(CBF_PREFIX)/include/cbflib - cp -r $(INCLUDE) $(CBF_PREFIX)/include/cbflib - chmod 644 $(CBF_PREFIX)/lib/libcbf.a - chmod 644 $(CBF_PREFIX)/lib/libimg.a - chmod 644 $(CBF_PREFIX)/lib/libfcb.a - chmod 755 $(CBF_PREFIX)/lib/libcbf.so - chmod 755 $(CBF_PREFIX)/lib/libimg.so - chmod 755 $(CBF_PREFIX)/lib/libfcb.so - chmod 755 $(CBF_PREFIX)/bin/arvai_test - chmod 755 $(CBF_PREFIX)/bin/cbf2nexus - chmod 755 $(CBF_PREFIX)/bin/cbf_standardize_numbers - chmod 755 $(CBF_PREFIX)/bin/cif2c - chmod 755 $(CBF_PREFIX)/bin/cif2cbf - chmod 755 $(CBF_PREFIX)/bin/convert_image - chmod 755 $(CBF_PREFIX)/bin/convert_minicbf - chmod 755 $(CBF_PREFIX)/bin/img2cif - chmod 755 $(CBF_PREFIX)/bin/makecbf - chmod 755 $(CBF_PREFIX)/bin/minicbf2nexus - chmod 755 $(CBF_PREFIX)/bin/nexus2cbf - chmod 755 $(CBF_PREFIX)/bin/roi_peaksearch - chmod 755 $(CBF_PREFIX)/bin/sequence_match - chmod 755 $(CBF_PREFIX)/bin/testalloc - chmod 755 $(CBF_PREFIX)/bin/testflat - chmod 755 $(CBF_PREFIX)/bin/testflatpacked - chmod 755 $(CBF_PREFIX)/bin/testhdf5 - chmod 755 $(CBF_PREFIX)/bin/testreals -ifneq ($(CBF_USE_ULP),) - chmod 755 $(CBF_PREFIX)/bin/testulp -endif - chmod 755 $(CBF_PREFIX)/bin/tiff2cbf - chmod 755 $(CBF_PREFIX)/bin/test_cbf_airy_disk - chmod 755 $(CBF_PREFIX)/bin/batch_convert_minicbf.sh - chmod 644 $(CBF_PREFIX)/include/cbflib/*.h - -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -# -# PyCifRW -# -build_pycifrw: $(M4)/Makefile.m4 - touch build_pycifrw -$(PYCIFRW): build_pycifrw - -rm -rf $(PYCIFRW) - -rm -rf $(PYCIFRW).tar.gz - $(DOWNLOAD) $(PYCIFRWURL) - tar -xvf $(PYCIFRW).tar.gz - -rm $(PYCIFRW).tar.gz - (cd $(PYCIFRW); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) - -# -# PLY -# -build_ply: $(M4)/Makefile.m4 - touch build_ply -$(PLY): build_ply - -rm -rf $(PLY) - -rm -rf $(PLY).tar.gz - $(DOWNLOAD) $(PLYURL) - tar -xvf $(PLY).tar.gz - -rm $(PLY).tar.gz - (cd $(PLY); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) -endif - -# -# REGEX -# - -build_regex: $(M4)/Makefile.m4 - touch build_regex -$(REGEX): build_regex - -rm -rf $(REGEX) - -rm -rf $(REGEX).tar.gz - $(DOWNLOAD) $(REGEX_URL) - tar -xvf $(REGEX).tar.gz - touch $(REGEX) - -rm $(REGEX).tar.gz - cp config.guess config.sub $(REGEX) - (cd $(REGEX); \ - prefix=$(REGEX_PREFIX); export prefix; \ - ./configure --prefix=$(REGEX_PREFIX); make install) - @-cp $(REGEX_PREFIX)/include/pcreposix.h $(REGEX_PREFIX)/include/regex.h -$(REGEX)_INSTALL: $(REGEX) - -rm -rf $(REGEX)_install - rsync -avz $(REGEX)/ $(REGEX)_install - (cd $(REGEX)_install; prefix=$(CBF_PREFIX); export prefix; \ - make distclean; ./configure --prefix=$(CBF_PREFIX); make install ) - @-cp $(CBF_PREFIX)/include/pcreposix.h $(CBF_PREFIX)/include/regex.h - -# -# TIFF -# -build_tiff: $(M4)/Makefile.m4 - touch build_tiff -$(TIFF): build_tiff config.guess config.sub - -rm -rf $(TIFF) - -rm -rf $(TIFF).tar.gz - $(DOWNLOAD) $(TIFF_URL) - tar -xvf $(TIFF).tar.gz - touch $(TIFF) - -rm $(TIFF).tar.gz - cp config.guess config.sub $(TIFF)/config/ - (cd $(TIFF); prefix=$(TIFF_PREFIX); export prefix; \ - ./configure --prefix=$(TIFF_PREFIX); make install) -$(TIFF)_INSTALL: $(TIFF) - -rm -rf $(TIFF)_install - rsync -avz $(TIFF)/ $(TIFF)_install - (cd $(TIFF)_install; make distclean; prefix=$(CBF_PREFIX); export prefix; \ - ./configure --prefix=$(CBF_PREFIX); make install) - - -ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes) -# -# HDF5 -# - -build_hdf5: $(M4)/Makefile.m4 - touch build_hdf5 -$(HDF5): build_hdf5 - -rm -rf $(HDF5) - -rm -rf $(HDF5).tar.gz - $(DOWNLOAD) $(HDF5_URL) - tar -xvf $(HDF5).tar.gz - cp config.guess $(HDF5)/bin/config.guess - cp config.sub $(HDF5)/bin/config.sub - touch $(HDF5) - -rm $(HDF5).tar.gz - echo "first level HDF5 install in "$(HDF5_PREFIX) - (cd $(ROOT)/$(HDF5); \ - CFLAGS="$(CFLAGS)"; export CFLAGS; \ - mkdir -p hdf5; prefix=$(ROOT)/$(HDF5)/hdf5; export prefix; \ - ./configure --prefix=$(ROOT)/$(HDF5)/hdf5 --enable-build-mode=production \ - --enable-trace --enable-fortran --enable-using-memchecker ;\ - make install; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/bin/ $(HDF5_PREFIX)/bin; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/lib/ $(HDF5_PREFIX)/lib; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/include/ $(HDF5_PREFIX)/include; \ - cd $(HDF5_PREFIX)/bin; $(ROOT)/$(HDF5)/hdf5/bin/h5redeploy -force ) -$(HDF5)_INSTALL: $(HDF5) - -rm -rf $(HDF5)_install - echo "final HDF5 install in "$(CBF_PREFIX) - rsync -avz $(ROOT)/$(HDF5)/hdf5/bin/ $(CBF_PREFIX)/bin; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/lib/ $(CBF_PREFIX)/lib; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/include/ $(CBF_PREFIX)/include; \ - cd $(CBF_PREFIX)/bin; $(ROOT)/$(HDF5)/hdf5/bin/h5redeploy -force -endif - - -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -# -# LZ4 -# -build_lz4: $(M4)/Makefile.m4 - touch build_lz4 -$(LZ4): $(HDF5) build_lz4 - mkdir -p $(SOLIB) - -rm -rf $(LZ4) -ifneq ($(MSYS2),yes) - -rm -rf $(LZ4).tar.gz - $(DOWNLOAD) $(LZ4_URL) - tar -xvf $(LZ4).tar.gz - -rm $(LZ4).tar.gz - (cp $(LZ4include)/lz4.h $(INCLUDE); \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/lz4.c -o lz4.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/h5zlz4.c -o h5zlz4.o; \ - $(CC) -shared lz4.o h5zlz4.o -o $(SOLIB)/libh5zlz4.so; \ - rm lz4.o h5zlz4.o) -else - git clone $(LZ4_URL) - (cd $(LZ4); mkdir build; cd build; cmake .. -G 'MSYS Makefiles' -DENABLE_LZ4_PLUGIN="yes"; make all; cp plugins/* $(SOLIB)) -endif - touch $(LZ4) -endif - - -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -# -# BSHUF -# -build_BSHUF: $(M4)/Makefile.m4 - touch build_BSHUF -$(BSHUF): $(HDF5) build_BSHUF $(LZ4dep) - mkdir -p $(SOLIB) - -rm -rf $(BSHUF) - -rm -rf $(BSHUF).tar.gz - -rm -rf *.o - $(DOWNLOAD) $(BSHUFURL) - tar -xvf $(BSHUF).tar.gz - -rm $(BSHUF).tar.gz - (cp $(BSHUFinclude)/bitshuffle.h \ - $(BSHUFinclude)/bitshuffle_core.h \ - $(BSHUFinclude)/bitshuffle_internals.h \ - $(BSHUFinclude)/bshuf_h5filter.h $(BSHUFinclude)/iochain.h $(INCLUDE); \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bshuf_h5plugin.c -o bshuf_h5plugin.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/iochain.c -o iochain.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o; \ - $(CC) -shared bshuf_h5filter.o bitshuffle.o bitshuffle_core.o iochain.o lz4.o $(HDF5SOLIBS_LOCAL) $(HDF5SOLIBS_SYSTEM)\ - -o $(SOLIB)/libh5zbshuf.so; \ - $(CC) -shared bshuf_h5filter.o bitshuffle.o bitshuffle_core.o lz4.o bshuf_h5plugin.o iochain.o \ - $(HDF5SOLIBS_LOCAL) \ - $(HDF5SOLIBS_SYSTEM) -o $(SOLIB)/$(BSHUFFILTER).so; \ - rm bshuf_h5filter.o bitshuffle.o lz4.o iochain.o bshuf_h5plugin.o) - touch $(BSHUF) -endif - - -# -# Directories -# -$(CBF_PREFIX): - mkdir -p $(CBF_PREFIX) - -$(CBF_PREFIX)/lib: $(CBF_PREFIX) - mkdir -p $(CBF_PREFIX)/lib - -$(CBF_PREFIX)/bin: $(CBF_PREFIX) - mkdir -p $(CBF_PREFIX)/bin - -$(CBF_PREFIX)/include: $(CBF_PREFIX) - mkdir -p $(CBF_PREFIX)/include - -$(CBF_PREFIX)/include/cbflib: $(CBF_PREFIX)/include - mkdir -p $(CBF_PREFIX)/include/cbflib - - - -$(LIB): - mkdir -p $@ - -$(BIN): - mkdir -p $@ - -$(SOLIB): - mkdir -p $@ - -$(JCBF): - mkdir -p $@ - -$(MINICBF_TESTS): - mkdir -p $@ - -# -# Parser -# -$(SRC)/cbf_stx.c: $(SRC)/cbf.stx.y - bison $(SRC)/cbf.stx.y -o $(SRC)/cbf.stx.tab.c -d - mv $(SRC)/cbf.stx.tab.c $(SRC)/cbf_stx.c - mv $(SRC)/cbf.stx.tab.h $(INCLUDE)/cbf_stx.h - -# -# CBF library -# -$(LIB)/libcbf.a: $(SOURCE) $(HEADERS) $(COMMONDEP) $(HDF5) $(LZ4DEPS) $(BSHUFDEPS) $(REGEXDEPS) - -rm -f $@ - -rm -f *.o - mkdir -p $(LIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) \ - -DCBF_FILTER_STATIC $(LZ4FLAG) $(BSHUFFLAG) $(PYCIFRWFLAG) $(INCLUDES) $(WARNINGS) -c $(SOURCE) -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -ifneq ($(MSYS2),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(LZ4src)/h5zlz4.c -o h5zlz4.o -else - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(LZ4)/LZ4/src/H5Zlz4.c -o h5zlz4.o -endif -endif -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/iochain.c -o iochain.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o -endif - $(AR) cr $@ *.o -ifneq ($(RANLIB),) - $(RANLIB) $@ -endif - -rm -f *.o - -$(SOLIB)/libcbf.so: $(SOURCE) $(HEADERS) $(COMMONDEP) $(HDF5) $(LZ4DEPS) $(BSHUFDEPS) - -rm -f $@ - -rm -f *.o - mkdir -p $(SOLIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(LZ4FLAG) $(BSHUFFLAG) $(PYCIFRWFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(SOURCE) -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -ifneq ($(MSYS2),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(LZ4src)/h5zlz4.c -o h5zlz4.o -else - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(LZ4)/LZ4/src/H5Zlz4.c -o h5zlz4.o -endif -endif -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle..o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/iochain.c -o iochain.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o -endif - - $(CC) -o $@ *.o $(SOLDFLAGS) $(EXTRALIBS) $(REGEX_LIBS) $(HDF5SOLIBS_LOCAL) $(HDF5SOLIBS_SYSTEM) - -rm -f *.o - -# -# IMG library -# -$(LIB)/libimg.a: $(SRC)/img.c $(HEADERS) $(COMMONDEP) - mkdir -p $(LIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) -c $(SRC)/img.c - $(AR) cr $@ img.o -ifneq ($(RANLIB),) - $(RANLIB) $@ -endif - rm img.o - -$(SOLIB)/libimg.so: $(SOURCE) $(HEADERS) $(COMMONDEP) - -rm -f $@ - mkdir -p $(SOLIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(SRC)/img.c - $(CC) -o $@ img.o $(SOLDFLAGS) - rm img.o - -# -# CBF and IMG libraries -# -CBF_IMG_LIBS: $(LIB)/libcbf.a $(LIB)/libimg.a - - -# -# FCB library -# -$(LIB)/libfcb.a: $(F90SOURCE) $(COMMONDEP) $(HDF5) - mkdir -p $(LIB) -ifneq ($(F90C),) - $(F90C) $(F90FLAGS) -c $(F90SOURCE) - $(AR) cr $@ *.o -ifneq ($(RANLIB),) - $(RANLIB) $@ -endif - rm *.o -else - echo "Define F90C to build $(LIB)/libfcb.a" -endif - -$(SOLIB)/libfcb.so: $(F90SOURCE) $(HEADERS) $(COMMONDEP) $(SOLIB) -ifneq ($(F90C),) - -rm -f $@ - mkdir -p $(SOLIB) - $(F90C) $(F90FLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(F90SOURCE) - $(F90C) $(F90FLAGS) -o $@ *.o $(SOLDFLAGS) - rm *.o -else - echo "Define F90C to build $(SOLIB)/libfcb.so" -endif - - -# -# Python bindings -# -$(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ - $(PYCBF)/$(SETUP_PY) \ - $(PYCBF)/pycbf.i \ - $(PYCBF)/cbfhandlewrappers.i \ - $(PYCBF)/cbfdetectorwrappers.i \ - $(PYCBF)/cbfgenericwrappers.i \ - $(PYCBF)/cbfgoniometerwrappers.i - -cp $(SOLIB)/*.so $(LIB) - (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) - -$(PYCBF)/pycbfinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --prefix=$(CBF_PREFIX)) - -$(PYCBF)/pycbfuserinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --user) - -$(PYCBF)/setup.py: $(M4)/setup_py.m4 - (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ - -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) - -$(PYCBF)/setup_MINGW.py: m4/setup_py.m4 - (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ - -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) - -$(LIB)/_pycbf.$(PYCBFEXT): $(PYCBF)/_pycbf.$(PYCBFEXT) - mkdir -p $(LIB) - cp $(PYCBF)/_pycbf.$(PYCBFEXT) $(LIB)/_pycbf.$(PYCBFEXT) - -$(PYCBF)/pycbf.pdf: $(PYCBF)/pycbf.w - (cd $(PYCBF); \ - $(NUWEB) pycbf; \ - latex pycbf; \ - $(NUWEB) pycbf; \ - latex pycbf; \ - dvipdfm pycbf ) - -$(PYCBF)/CBFlib.txt: $(DOC)/CBFlib.html - links -dump $(DOC)/CBFlib.html > $(PYCBF)/CBFlib.txt - -$(PYCBF)/cbfhandlewrappers.i \ -$(PYCBF)/cbfdetectorwrappers.i \ -$(PYCBF)/cbfgenericwrappers.i \ -$(PYCBF)/cbfgoniometerwrappers.i: $(PYCBF)/CBFlib.txt $(PYCBF)/make_pycbf.py - (cd $(PYCBF); $(PYTHON) make_pycbf.py; $(PYSWIG) pycbf.i; $(PYTHON) setup.py build) - - -# -# Java bindings -# -$(JCBF)/cbflib-$(VERSION).jar: $(JCBF) $(SRC)/jcbf.i - $(JSWIG) -I$(INCLUDE) -package org.iucr.cbflib -outdir $(JCBF) -o $(JCBF)/jcbf_wrap.c $(SRC)/jcbf.i - $(JAVAC) -d . $(JCBF)/*.java - $(JAR) cf $@ org - -$(SOLIB)/libcbf_wrap.so: $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf.so - mkdir -p $(SOLIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) $(JAVAINCLUDES) -c $(JCBF)/jcbf_wrap.c - $(CC) -o $@ jcbf_wrap.o $(SOLDFLAGS) -L$(SOLIB) -lcbf $(REGEX_LIBS) - rm jcbf_wrap.o - -# -# F90SOURCE -# -$(SRC)/fcb_exit_binary.f90: $(M4)/fcb_exit_binary.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_exit_binary.m4) > $(SRC)/fcb_exit_binary.f90 -$(SRC)/fcb_next_binary.f90: $(M4)/fcb_next_binary.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_next_binary.m4) > $(SRC)/fcb_next_binary.f90 -$(SRC)/fcb_open_cifin.f90: $(M4)/fcb_open_cifin.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_open_cifin.m4) > $(SRC)/fcb_open_cifin.f90 -$(SRC)/fcb_packed.f90: $(M4)/fcb_packed.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_packed.m4) > $(SRC)/fcb_packed.f90 -$(SRC)/fcb_read_bits.f90: $(M4)/fcb_read_bits.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_read_bits.m4) > $(SRC)/fcb_read_bits.f90 -$(SRC)/fcb_read_image.f90: $(M4)/fcb_read_image.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_read_image.m4) > $(SRC)/fcb_read_image.f90 -$(SRC)/fcb_read_xds_i2.f90: $(M4)/fcb_read_xds_i2.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_read_xds_i2.m4) > $(SRC)/fcb_read_xds_i2.f90 -$(EXAMPLES)/test_fcb_read_image.f90: $(M4)/test_fcb_read_image.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) test_fcb_read_image.m4) > $(EXAMPLES)/test_fcb_read_image.f90 -$(EXAMPLES)/test_xds_binary.f90: $(M4)/test_xds_binary.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) test_xds_binary.m4) > $(EXAMPLES)/test_xds_binary.f90 - -# -# convert_image example program -# -$(BIN)/convert_image: $(LIB)/libcbf.a $(EXAMPLES)/convert_image.c $(SRC)/img.c \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/convert_image.c $(SRC)/img.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ -# -# convert_minicbf example program -# -$(BIN)/convert_minicbf: $(LIB)/libcbf.a $(EXAMPLES)/convert_minicbf.c \ - $(GOPTLIB) $(GOPTINC) $(EXAMPLES)/batch_convert_minicbf.sh - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/convert_minicbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - chmod 755 $(EXAMPLES)/batch_convert_minicbf.sh - -# -# makecbf example program -# -$(BIN)/makecbf: $(LIB)/libcbf.a $(EXAMPLES)/makecbf.c $(LIB)/libimg.a - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/makecbf.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - - -# -# adscimg2cbf example program -# -$(BIN)/adscimg2cbf: $(LIB)/libcbf.a $(EXAMPLES)/adscimg2cbf.c $(EXAMPLES)/adscimg2cbf_sub.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/adscimg2cbf.c $(EXAMPLES)/adscimg2cbf_sub.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# cbf2adscimg example program -# -$(BIN)/cbf2adscimg: $(LIB)/libcbf.a $(EXAMPLES)/cbf2adscimg.c $(EXAMPLES)/cbf2adscimg_sub.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf2adscimg.c $(EXAMPLES)/cbf2adscimg_sub.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# cbf_standardize_numbers example program -# -$(BIN)/cbf_standardize_numbers: $(EXAMPLES)/cbf_standardize_numbers.c $(EXAMPLES)/cbf_standardize_numbers.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf_standardize_numbers.c $(SRC_FGETLN) $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@ - -# -# changtestcompression example program -# -$(BIN)/changtestcompression: $(LIB)/libcbf.a $(EXAMPLES)/changtestcompression.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/changtestcompression.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# img2cif example program -# -$(BIN)/img2cif: $(LIB)/libcbf.a $(EXAMPLES)/img2cif.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOTPINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/img2cif.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# cif2cbf example program -# -$(BIN)/cif2cbf: $(LIB)/libcbf.a $(EXAMPLES)/cif2cbf.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cif2cbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# cbf2nexus example program -# -$(BIN)/cbf2nexus: $(LIB)/libcbf.a $(EXAMPLES)/cbf2nexus.c \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf2nexus.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) \ - -lhdf5 -limg -o $@ - -# -# minicbf2nexus example program -# -$(BIN)/minicbf2nexus: $(LIB)/libcbf.a $(EXAMPLES)/minicbf2nexus.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/minicbf2nexus.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# nexus2cbf example program -# -$(BIN)/nexus2cbf: $(LIB)/libcbf.a $(EXAMPLES)/nexus2cbf.c \ - $(GOPTLIB) $(GOPTINC) $(REGEX) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/nexus2cbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# roi_peaksearch example program -# -$(BIN)/roi_peaksearch: $(LIB)/libcbf.a $(EXAMPLES)/roi_peaksearch.c \ - $(EXAMPLES)/dps_peaksearch.c $(EXAMPLES)/dps_peaksearch.h $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/roi_peaksearch.c $(EXAMPLES)/dps_peaksearch.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - - -# -# dectris cbf_template_t program -# -$(BIN)/cbf_template_t: $(DECTRIS_EXAMPLES)/cbf_template_t.c \ - $(DECTRIS_EXAMPLES)/mx_cbf_t_extras.h \ - $(DECTRIS_EXAMPLES)/mx_parms.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -I $(DECTRIS_EXAMPLES) $(WARNINGS) \ - $(DECTRIS_EXAMPLES)/cbf_template_t.c -o $@ - -# -# testcell example program -# -$(BIN)/testcell: $(LIB)/libcbf.a $(EXAMPLES)/testcell.C - mkdir -p $(BIN) - $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testcell.C -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# cif2c example program -# -$(BIN)/cif2c: $(LIB)/libcbf.a $(EXAMPLES)/cif2c.c - mkdir -p $(BIN) - $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cif2c.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# sauter_test example program -# -$(BIN)/sauter_test: $(LIB)/libcbf.a $(EXAMPLES)/sauter_test.C - mkdir -p $(BIN) - $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/sauter_test.C -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# sequence_match example program -# -$(BIN)/sequence_match: $(LIB)/libcbf.a $(EXAMPLES)/sequence_match.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/sequence_match.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# tiff2cbf example program -# -$(BIN)/tiff2cbf: $(LIB)/libcbf.a $(EXAMPLES)/tiff2cbf.c \ - $(GOPTLIB) $(GOPTINC) $(TIFF) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - -I$(TIFF)/libtiff $(EXAMPLES)/tiff2cbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf -L$(TIFF_PREFIX)/lib -ltiff $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# Andy Arvai's buffered read test program -# -$(BIN)/arvai_test: $(LIB)/libcbf.a $(EXAMPLES)/arvai_test.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/arvai_test.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# testreals example program -# -$(BIN)/testreals: $(LIB)/libcbf.a $(EXAMPLES)/testreals.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testreals.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# testflat example program -# -$(BIN)/testflat: $(LIB)/libcbf.a $(EXAMPLES)/testflat.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testflat.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ -# -# testflatpacked example program -# -$(BIN)/testflatpacked: $(LIB)/libcbf.a $(EXAMPLES)/testflatpacked.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testflatpacked.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -ifneq ($(F90C),) -# -# test_xds_binary example program -# -$(BIN)/test_xds_binary: $(LIB)/libfcb.a $(EXAMPLES)/test_xds_binary.f90 - mkdir -p $(BIN) - $(F90C) $(F90FLAGS) $(F90LDFLAGS) $(EXAMPLES)/test_xds_binary.f90 \ - -L$(LIB) -lfcb -o $@ - -# -# test_fcb_read_image example program -# -$(BIN)/test_fcb_read_image: $(LIB)/libfcb.a $(EXAMPLES)/test_fcb_read_image.f90 - mkdir -p $(BIN) - $(F90C) $(F90FLAGS) $(F90LDFLAGS) $(EXAMPLES)/test_fcb_read_image.f90 \ - -L$(LIB) -lfcb -o $@ -endif - -# -# testcbf (C) -# -$(BIN)/ctestcbf: $(EXAMPLES)/testcbf.c $(LIB)/libcbf.a - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testcbf.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# testcbf (Java) -# -$(BIN)/testcbf.class: $(EXAMPLES)/testcbf.java $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so - mkdir -p $(BIN) - $(JAVAC) -cp $(JCBF)/cbflib-$(VERSION).jar -d $(BIN) $(EXAMPLES)/testcbf.java - -ifneq ($(CBF_USE_ULP),) -# -# testulp test program -# -$(BIN)/testulp: $(LIB)/libcbf.a $(EXAMPLES)/testulp.c $(EXAMPLES)/unittest.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/testulp.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ -endif - -# -# testhdf5 test program -# -$(BIN)/testhdf5: $(LIB)/libcbf.a $(EXAMPLES)/testhdf5.c $(EXAMPLES)/unittest.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/testhdf5.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) \ - -o $@.tmp - mv $@.tmp $@ - -# -# testalloc test program -# -$(BIN)/testalloc: $(LIB)/libcbf.a $(EXAMPLES)/testalloc.c $(EXAMPLES)/unittest.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/testalloc.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ - -# -# test_cbf_airy_disk test program -# -$(BIN)/test_cbf_airy_disk: $(LIB)/libcbf.a $(EXAMPLES)/test_cbf_airy_disk.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/test_cbf_airy_disk.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ - -# -# cbf_testxfelread: test program -# -$(BIN)/cbf_testxfelread: $(LIB)/libcbf.a $(EXAMPLES)/cbf_testxfelread.c $(EXAMPLES)/cbf_testxfelread.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf_testxfelread.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ - -# -# Data files for tests -# - -$(DATADIRI): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLI)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Input.tar.gz) - touch $(DATADIRI) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Input.tar.gz) - -$(DATADIRO): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLO)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output.tar.gz) - touch $(DATADIRO) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output.tar.gz) - -$(DATADIRS): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLS)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - touch $(DATADIRS) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - - -# Input Data Files - -TESTINPUT_BASIC = example.mar2300 -DATADIRI_INPUT_BASIC = $(DATADIRI)/example.mar2300 - - -TESTINPUT_EXTRA = \ - 1191_00005.cbf \ - 9ins.cif \ - hit-20140306005258847.cbf \ - insulin_pilatus6m.cbf \ - mb_LP_1_001.img \ - testflatin.cbf \ - testflatpackedin.cbf \ - testrealin.cbf \ - thaumatin_die_M1S5_1_0005_2.cbf \ - X4_lots_M1S4_1_0001.cbf \ - X4_lots_M1S4_1_0002.cbf \ - X4_lots_M1S4_1_0003.cbf \ - X4_lots_M1S4_1_0004.cbf \ - X4_lots_M1S4_1_0005.cbf \ - XRD1621.tif - - - -DATADIRI_INPUT_EXTRA = \ - $(DATADIRI)/1191_00005.cbf \ - $(DATADIRI)/9ins.cif \ - $(DATADIRI)/hit-20140306005258847.cbf \ - $(DATADIRI)/insulin_pilatus6m.cbf \ - $(DATADIRI)/mb_LP_1_001.img \ - $(DATADIRI)/testflatin.cbf \ - $(DATADIRI)/testflatpackedin.cbf \ - $(DATADIRI)/testrealin.cbf \ - $(DATADIRI)/thaumatin_die_M1S5_1_0005_2.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0001.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0002.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0003.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0004.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0005.cbf \ - $(DATADIRI)/XRD1621.tif - - -# Output Data Files - -TESTOUTPUT = adscconverted_flat_orig.cbf \ - adscconverted_orig.cbf converted_flat_orig.cbf converted_orig.cbf \ - insulin_pilatus6mconverted_orig.cbf.h5.cbf \ - insulin_pilatus6mconverted_orig.cbf.h5 \ - insulin_pilatus6mconverted_v2_orig.cbf \ - mb_LP_1_001_orig.cbf testcell_orig.prt \ - test_xds_bin_testflatout_orig.out \ - test_xds_bin_testflatpackedout_orig.out test_fcb_read_testflatout_orig.out \ - test_fcb_read_testflatpackedout_orig.out \ - XRD1621_orig.cbf XRD1621_I4encbC100_orig.cbf \ - minicbf_orig.h5 -NEWTESTOUTPUT = adscconverted_flat.cbf \ - adscconverted.cbf converted_flat.cbf converted.cbf \ - insulin_pilatus6mconverted.cbf \ - insulin_pilatus6mconverted.cbf.h5 \ - insulin_pilatus6mconverted.cbf.h5.cbf \ - insulin_pilatus6mconverted_v2.cbf \ - mb_LP_1_001.cbf testcell.prt \ - test_xds_bin_testflatout.out \ - test_xds_bin_testflatpackedout.out test_fcb_read_testflatout.out \ - test_fcb_read_testflatpackedout.out \ - XRD1621.cbf XRD1621_I4encbC100.cbf \ - $(MINICBF_TEST)/minicbf.h5 -DATADIRO_OUTPUT = $(DATADIRO)/adscconverted_flat_orig.cbf \ - $(DATADIRO)/adscconverted_orig.cbf \ - $(DATADIRO)/converted_flat_orig.cbf \ - $(DATADIRO)/converted_orig.cbf \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5 \ - $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf \ - $(DATADIRO)/mb_LP_1_001_orig.cbf \ - $(DATADIRO)/testcell_orig.prt \ - $(DATADIRO)/test_xds_bin_testflatout_orig.out \ - $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out \ - $(DATADIRO)/test_fcb_read_testflatout_orig.out \ - $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out \ - $(DATADIRO)/XRD1621_orig.cbf \ - $(DATADIRO)/XRD1621_I4encbC100_orig.cbf \ - $(DATADIRO)/minicbf_orig.h5 -DATADIRO_OUTPUT_SIGNATURES = $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) \ - $(DATADIRO)/adscconverted_orig.cbf$(SEXT) \ - $(DATADIRO)/converted_flat_orig.cbf$(SEXT) \ - $(DATADIRO)/converted_orig.cbf$(SEXT) \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ - $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ - $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) \ - $(DATADIRO)/testcell_orig.prt$(SEXT) \ - $(DATADIRO)/test_xds_bin_testflatout_orig.out$(SEXT) \ - $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRO)/test_fcb_read_testflatout_orig.out$(SEXT) \ - $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRO)/XRD1621_orig.cbf$(SEXT) \ - $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) \ - $(DATADIRO)/minicbf_orig.h5$(SEXT) - - - -# Output Data File Signatures - -TESTOUTPUTSIGS = adscconverted_flat_orig.cbf$(SEXT) \ - adscconverted_orig.cbf$(SEXT) converted_flat_orig.cbf$(SEXT) converted_orig.cbf$(SEXT) \ - insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ - insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ - insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ - mb_LP_1_001_orig.cbf$(SEXT) testcell_orig.prt$(SEXT) \ - test_xds_bin_testflatout_orig.out$(SEXT) \ - test_xds_bin_testflatpackedout_orig.out$(SEXT) test_fcb_read_testflatout_orig.out$(SEXT) \ - test_fcb_read_testflatpackedout_orig.out$(SEXT) \ - XRD1621_orig.cbf$(SEXT) \ - XRD1621_I4encbC100_orig.cbf$(SEXT) \ - minicbf_orig.h5$(SEXT) -DATADIRS_OUTPUT_SIGNATURES = $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) \ - $(DATADIRS)/adscconverted_orig.cbf$(SEXT) \ - $(DATADIRS)/converted_flat_orig.cbf$(SEXT) \ - $(DATADIRS)/converted_orig.cbf$(SEXT) \ - $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ - $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ - $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ - $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) \ - $(DATADIRS)/testcell_orig.prt$(SEXT) \ - $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) \ - $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) \ - $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRS)/XRD1621_orig.cbf$(SEXT) \ - $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) \ - $(DATADIRS)/minicbf_orig.h5$(SEXT) - -# Fetch Input Data Files - -$(TESTINPUT_BASIC): $(DATADIRI) $(DATADIRI_INPUT_BASIC) - cp $(DATADIRI)/$@ $@ - cp $(DATADIRI)/$@$(SEXT) $@$(SEXT) - -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) - -$(TESTINPUT_EXTRA): $(DATADIRI) $(DATADIRI_INPUT_EXTRA) - cp $(DATADIRI)/$@ $@ - cp $(DATADIRI)/$@$(SEXT) $@$(SEXT) - -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) - - -# Fetch Output Data Files and Signatures - -$(TESTOUTPUT): $(DATADIRO) $(DATADIRO_OUTPUT) $(DATADIRO_OUTPUT_SIGNATURES) - cp $(DATADIRO)/$@ $@ - cp $(DATADIRO)/$@$(SEXT) $@$(SEXT) - -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) - -# Fetch Output Data File Signatures - -$(TESTOUTPUTSIGS): $(DATADIRS) $(DATADIRS_OUTPUT_SIGNATURES) - cp $(DATADIRS)/$@ $@ - - - -# -# Tests -# - - -tests: all $(LIB) $(BIN) symlinksdone basic extra dectristests pycbftests -tests_sigs_only: $(LIB) $(BIN) symlinksdone basic extra_sigs_only -restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 - $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < adscconverted.cbf > $(DATADIRO)/adscconverted_orig.cbf$(SEXT) - $(SIGNATURE) < converted_flat.cbf > $(DATADIRO)/converted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < converted.cbf > $(DATADIRO)/converted_orig.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5 > $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5.cbf > $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) - $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) - $(SIGNATURE) < testcell.prt > $(DATADIRO)/testcell_orig.prt$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRO)/test_xds_bin_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRO)/test_fcb_read_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < XRD1621.cbf > $(DATADIRO)/XRD1621_orig.cbf$(SEXT) - $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) - $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRO)/minicbf_orig.h5$(SEXT) - cp adscconverted_flat.cbf $(DATADIRO)/adscconverted_flat_orig.cbf$ - cp adscconverted.cbf $(DATADIRO)/adscconverted_orig.cbf - cp converted_flat.cbf $(DATADIRO)/converted_flat_orig.cbf - cp converted.cbf $(DATADIRO)/converted_orig.cbf - cp insulin_pilatus6mconverted.cbf.h5 $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5 - cp insulin_pilatus6mconverted.cbf.h5.cbf $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf - cp insulin_pilatus6mconverted_v2.cbf $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf - cp mb_LP_1_001.cbf$ $(DATADIRO)/mb_LP_1_001_orig.cbf - cp testcell.prt $(DATADIRO)/testcell_orig.prt - cp test_xds_bin_testflatout.out $(DATADIRO)/test_xds_bin_testflatout_orig.out - cp test_xds_bin_testflatpackedout.out $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out - cp test_fcb_read_testflatout.out $(DATADIRO)/test_fcb_read_testflatout_orig.out - cp test_fcb_read_testflatpackedout.out $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out - cp XRD1621.cbf $(DATADIRO)/XRD1621_orig.cbf - cp XRD1621_I4encbC100.cbf $(DATADIRO)/XRD1621_I4encbC100_orig.cbf - cp $(MINICBF_TEST)/minicbf.h5 $(DATADIRO)/minicbf_orig.h5 - -restore_sigs_only: $(NEWTESTOUTPUT) $(DATADIRS) - $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < adscconverted.cbf > $(DATADIRS)/adscconverted_orig.cbf$(SEXT) - $(SIGNATURE) < converted_flat.cbf > $(DATADIRS)/converted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < converted.cbf > $(DATADIRS)/converted_orig.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5 > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5.cbf > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) - $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) - $(SIGNATURE) < testcell.prt > $(DATADIRS)/testcell_orig.prt$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < XRD1621.cbf > $(DATADIRS)/XRD1621_orig.cbf$(SEXT) - $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) - $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRS)/minicbf_orig.h5$(SEXT) -restore_signatures: restore_output restore_sigs_only - -# -# Basic Tests -# - -basic: $(BIN)/makecbf $(BIN)/img2cif $(BIN)/cif2cbf $(TESTINPUT_BASIC) - $(LDPREFIX) $(BIN)/makecbf example.mar2300 makecbf.cbf - $(LDPREFIX) $(BIN)/img2cif -c flatpacked -m headers -d digest \ - -e base64 example.mar2300 img2cif_packed.cif - $(LDPREFIX) $(BIN)/img2cif -c canonical -m headers -d digest \ - -e base64 example.mar2300 img2cif_canonical.cif - $(LDPREFIX) $(BIN)/img2cif -c flatpacked -m headers -d digest \ - -e none example.mar2300 img2cif_packed.cbf - $(LDPREFIX) $(BIN)/img2cif -c canonical -m headers -d digest \ - -e none example.mar2300 img2cif_canonical.cbf - $(LDPREFIX) $(BIN)/cif2cbf -e none -c flatpacked \ - img2cif_canonical.cif cif2cbf_packed.cbf - $(LDPREFIX) $(BIN)/cif2cbf -e none -c canonical \ - img2cif_packed.cif cif2cbf_canonical.cbf - -cmp cif2cbf_packed.cbf makecbf.cbf - -cmp cif2cbf_packed.cbf img2cif_packed.cbf - -cmp cif2cbf_canonical.cbf img2cif_canonical.cbf - - -# -# Extra Tests -# -$(MINICBF_TEST)/minicbf.h5: - cd $(MINICBF_TEST); $(LDPREFIX) $(TIME) $(BIN)/minicbf2nexus -c zlib \ - -C config $(HDF5REGISTER) -o minicbf.h5 ../X4_lots_M1S4_1_*.cbf -mb_LP_1_001.cbf: - $(LDPREFIX) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - - - -ifneq ($(F90C),) -extra: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf \ - $(BIN)/minicbf2nexus $(BIN)/cbf2nexus $(BIN)/nexus2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf \ - $(BIN)/testhdf5 $(BIN)/testalloc \ - $(BIN_TESTULP) \ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUT) $(EXAMPLES)/batch_convert_minicbf.sh \ - $(TEMPLATES)/template_X4_lots_M1S4.cbf -else -extra: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf \ - $(BIN)/minicbf2nexus $(BIN)/cbf2nexus $(BIN)/nexus2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf $(BIN)/cbf2adscimg \ - $(BIN)/testhdf5 $(BIN)/testalloc \ - $(BIN_TESTULP) \ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUT) $(EXAMPLES)/batch_convert_minicbf.sh -endif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e hex -c none \ - makecbf.cbf cif2cbf_ehcn.cif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ - cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf -F example.mar2300 converted_flat.cbf - -cmp converted_flat.cbf converted_flat_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf example.mar2300 converted.cbf - -cmp converted.cbf converted_orig.cbf - -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat > testcell.prt - -cmp testcell.prt testcell_orig.prt - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -cmp adscconverted_flat.cbf adscconverted_flat_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -cmp adscconverted.cbf adscconverted_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -cmp mb_LP_1_001.cbf mb_LP_1_001_orig.cbf -ifneq ($(CLEANTESTS),) - mv mb_LP_1_001.cbf nmb_LP_1_001.cbf -else - cp mb_LP_1_001.cbf nmb_LP_1_001.cbf -endif - $(LDPREFIX) $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf - -cmp nmb_LP_1_001.img mb_LP_1_001.img - rm nmb_LP_1_001.cbf -ifneq ($(CLEANTESTS),) - rm nmb_LP_1_001.img -endif - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -cmp insulin_pilatus6mconverted.cbf insulin_pilatus6mconverted_rev_orig.cbf - -$(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -cmp insulin_pilatus6mconverted_v2.cbf insulin_pilatus6mconverted_v2_orig.cbf - (CBF_CONVERT_MINICBF_PATH=$(BIN); export CBF_CONVERT_MINICBF_PATH; \ - $(LDPREFIX) $(EXAMPLES)/batch_convert_minicbf.sh "." "minicbf_test" \ - "X4_lots_M1S4_1_*.cbf" $(TEMPLATES)/template_X4_lots_M1S4.cbf) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w -O $(HDF5REGISTER) -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encI.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encp.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cb -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encb.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cc -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encc.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cz -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encz.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cl -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encl.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -c2 -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(H5DUMP) insulin_pilatus6mconverted_orig.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted_orig.cbf.h5.dump) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(H5DUMP) insulin_pilatus6mconverted.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted.cbf.h5.dump) - -$(DIFF) insulin_pilatus6mconverted_orig.cbf.h5.dump insulin_pilatus6mconverted.cbf.h5.dump - -rm -f insulin_pilatus6mconverted_orig.cbf.h5.dump - -rm -f insulin_pilatus6mconverted.cbf.h5.dump - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_orig.cbf.h5.cbf -o insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf.h5 -o insulin_pilatus6mconverted.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted.cbf.h5.cbf -o insulin_pilatus6mconverted.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encp.cbf.h5 -o insulin_pilatus6mconverted_encp.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encp.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encb.cbf.h5 -o insulin_pilatus6mconverted_encb.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encb.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encI.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encI.cbf.h5.cbf -o insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encc.cbf.h5 -o insulin_pilatus6mconverted_encc.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encc.cbf.h5.cbf -o insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encz.cbf.h5 -o insulin_pilatus6mconverted_encz.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encz.cbf.h5.cbf -o insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encl.cbf.h5 -o insulin_pilatus6mconverted_encl.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encl.cbf.h5.cbf -o insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_enc2.cbf.h5 -o insulin_pilatus6mconverted_enc2.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_enc2.cbf.h5.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -rm -f insulin_pilatus6mconverted*.cbf.h5.eqcI.cbf - $(LDPREFIX) $(TINE) $(BIN)/test_cbf_airy_disk - $(LDPREFIX) $(TIME) $(BIN)/cbf_testxfelread - $(LDPREFIX) $(TIME) $(BIN)/testalloc - $(LDPREFIX) $(TIME) $(BIN)/testhdf5; rm -f testfile.h5 -ifneq ($(CBF_USE_ULP),) - $(LDPREFIX) $(TIME) $(BIN)/testulp -endif - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/minicbf2nexus -c zlib \ - -C config $(HDF5REGISTER) -o minicbf.h5 ../X4_lots_M1S4_1_*.cbf - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) ../minicbf_orig.h5 | $(ALLBUTONE) > minicbf_original.dump - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) minicbf.h5 | $(ALLBUTONE) > minicbf.dump - -cd $(MINICBF_TEST); $(DIFF) minicbf_original.dump minicbf.dump - $(LDPREFIX) cd $(MINICBF_TEST); rm -f minicbf_original.dump - $(LDPREFIX) cd $(MINICBF_TEST); rm -f minicbf.dump - #cd $(MINICBF_TEST); rm -f minicbf.h5 - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/cbf2nexus -c zlib \ - --list -o i19-1.h5 ../1191_00005.cbf - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/nexus2cbf \ - -o i19-1.cbf i19-1.h5 - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/cbf2nexus -c zlib \ - --list -o i19-2.h5 i19-1.cbf - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/nexus2cbf \ - -o i19-2.cbf i19-2.h5 - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) i19-1.h5 | $(ALLBUTONE) > i19-1.dump - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) i19-2.h5 | $(ALLBUTONE) > i19-2.dump - -cd $(MINICBF_TEST); $(DIFF) i19-1.dump i19-2.dump - -cd $(MINICBF_TEST); $(DIFF) i19-1.cbf i19-2.cbf - $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf -ifneq ($(F90C),) - $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatout.out) - -$(DIFF) test_xds_bin_testflatout.out test_xds_bin_testflatout_orig.out - $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatpackedout.out) - -$(DIFF) test_xds_bin_testflatpackedout.out test_xds_bin_testflatpackedout_orig.out - $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatout.out) - -$(DIFF) test_fcb_read_testflatout.out test_fcb_read_testflatout_orig.out - $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatpackedout.out) - -$(DIFF) test_fcb_read_testflatpackedout.out test_fcb_read_testflatpackedout_orig.out -endif - $(LDPREFIX) $(TIME) $(BIN)/sauter_test - $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - -$(DIFF) XRD1621.cbf XRD1621_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(DIFF) XRD1621_I4encbC100.cbf XRD1621_I4encbC100_orig.cbf - -ifneq ($(F90C),) -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf \ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -else -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf\ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -endif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e hex -c none \ - makecbf.cbf cif2cbf_ehcn.cif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ - cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F example.mar2300 converted_flat.cbf - -$(SIGNATURE) < converted_flat.cbf | $(DIFF) - converted_flat_orig.cbf$(SEXT); rm converted_flat.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image example.mar2300 converted.cbf - -$(SIGNATURE) < converted.cbf | $(DIFF) - converted_orig.cbf$(SEXT); rm converted.cbf - -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat | \ - $(SIGNATURE) | $(DIFF) - testcell_orig.prt$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -$(SIGNATURE) < adscconverted_flat.cbf | $(DIFF) - adscconverted_flat_orig.cbf$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -$(SIGNATURE) < adscconverted.cbf | $(DIFF) - adscconverted_orig.cbf$(SEXT); rm adscconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -$(SIGNATURE) < mb_LP_1_001.cbf | $(DIFF) - mb_LP_1_001_orig.cbf$(SEXT) - mv mb_LP_1_001.cbf nmb_LP_1_001.cbf - $(LDPREFIX) $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf - -cmp nmb_LP_1_001.img mb_LP_1_001.img - rm nmb_LP_1_001.cbf - rm nmb_LP_1_001.img - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted.cbf | $(DIFF) - insulin_pilatus6mconverted_rev_orig.cbf$(SEXT); rm insulin_pilatus6mconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf | $(DIFF) - insulin_pilatus6mconverted_v2_orig.cbf$(SEXT); rm insulin_pilatus6mconverted_v2.cbf - $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf -ifneq ($(F90C),) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatpackedout_orig.out$(SEXT) -endif - $(LDPREFIX) $(TIME) $(BIN)/sauter_test - $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(SIGNATURE) < XRD1621.cbf | $(DIFF) - XRD1621_orig.cbf$(SEXT); rm XRD1621.cbf - -$(SIGNATURE) < XRD1621_I4encbC100.cbf | $(DIFF) - XRD1621_I4encbC100_orig.cbf$(SEXT); rm XRD1621_I4encbC100.cbf - @-rm -f adscconverted_flat.cbf - @-rm -f $(TESTINPUT_BASIC) $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) - @-rm -f cif2cbf_packed.cbf makecbf.cbf \ - cif2cbf_packed.cbf img2cif_packed.cbf \ - cif2cbf_canonical.cbf img2cif_canonical.cbf - @-rm -f testrealout.cbf testflatout.cbf testflatpackedout.cbf \ - cif2cbf_encp.cbf img2cif_canonical.cif img2cif_packed.cif 9ins.cbf - - - -pycbftests: $(PYCBF)/_pycbf.$(PYCBFEXT) $(BIN)/cbf_standardize_numbers - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test1.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test2.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test3.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test4.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test1.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test2.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py ../hit-20140306005258847.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test1_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test1.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test2_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test2.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test3_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test3.out - - -pycbfinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfinstall - -pycbfuserinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfuserinstall - -javatests: $(BIN)/ctestcbf $(BIN)/testcbf.class $(SOLIB)/libcbf_wrap.so - $(LDPREFIX) $(BIN)/ctestcbf > testcbfc.txt - $(LDPREFIX) java -cp $(JCBF)/cbflib-$(VERSION).jar:$(BIN) testcbf > testcbfj.txt - $(DIFF) testcbfc.txt testcbfj.txt - -dectristests: $(BIN)/cbf_template_t $(TEMPLATES)/cbf_test_orig.out - $(LDPREFIX) (cd templates; ../bin/cbf_template_t; diff -a -u cbf_test_orig.out cbf_template_t.out) - -# -# Remove all non-source files -# -empty: - @-rm -rf $(LIB)/* - @-rm -rf $(INCLUDE)/bitshuf* - @-rm -rf $(INCLUDE)/bshuf* - @-rm -rf $(INCLUDE)/H5* - @-rm -rf $(BIN)/* - @-rm -f $(PYCBF)/_pycbf.$(PYCBFEXT) - @-rm -rf $(PYCBF)/build/* - @-rm -f $(PYCBF)/newtest1.cbf - @-rm -f $(PYCBF)/fel_test1.out - @-rm -f $(PYCBF)/fel_test2.out - @-rm -f $(PYCBF)/setup.py - @-rm -f $(PYCBF)/setup_MINGW.py - @-rm -f makecbf.cbf - @-rm -f img2cif_packed.cif - @-rm -f img2cif_canonical.cif - @-rm -f img2cif_packed.cbf - @-rm -f img2cif_canonical.cbf - @-rm -f img2cif_raw.cbf - @-rm -f cif2cbf_packed.cbf - @-rm -f cif2cbf_canonical.cbf - @-rm -f converted.cbf - @-rm -f adscconverted.cbf - @-rm -f converted_flat.cbf - @-rm -f adscconverted_flat.cbf - @-rm -f adscconverted_flat_rev.cbf - @-rm -f mb_LP_1_001.cbf - @-rm -f cif2cbf_ehcn.cif - @-rm -f cif2cbf_encp.cbf - @-rm -f 9ins.cbf - @-rm -f 9ins.cif - @-rm -f testcell.prt - @-rm -f example.mar2300 - @-rm -f converted_orig.cbf - @-rm -f adscconverted_orig.cbf - @-rm -f converted_flat_orig.cbf - @-rm -f adscconverted_flat_orig.cbf - @-rm -f adscconverted_flat_rev_orig.cbf - @-rm -f mb_LP_1_001_orig.cbf - @-rm -f insulin_pilatus6mconverted*.cbf - @-rm -f insulin_pilatus6mconverted*.h5 - @-rm -f insulin_pilatus6m.cbf - @-rm -f testrealin.cbf - @-rm -f testrealout.cbf - @-rm -f testflatin.cbf - @-rm -f testflatout.cbf - @-rm -f testflatpackedin.cbf - @-rm -f testflatpackedout.cbf - @-rm -f CTC.cbf - @-rm -f test_fcb_read_testflatout.out - @-rm -f test_fcb_read_testflatpackedout.out - @-rm -f test_xds_bin_testflatpackedout.out - @-rm -f test_xds_bin_testflatout.out - @-rm -f test_fcb_read_testflatout_orig.out - @-rm -f test_fcb_read_testflatpackedout_orig.out - @-rm -f test_xds_bin_testflatpackedout_orig.out - @-rm -f test_xds_bin_testflatout_orig.out - @-rm -f mb_LP_1_001.img - @-rm -f 9ins.cif - @-rm -f testcell_orig.prt - @-rm -f $(DECTRIS_EXAMPLES)/cbf_template_t.out - @-rm -f XRD1621.cbf - @-rm -f XRD1621_orig.cbf - @-rm -f XRD1621_I4encbC100_orig.cbf - @-rm -f XRD1621_I4encbC100.cbf - @-rm -f minicbf_orig.h5 - @-rm -f $(SRC)/fcb_exit_binary.f90 - @-rm -f $(SRC)/fcb_next_binary.f90 - @-rm -f $(SRC)/fcb_open_cifin.f90 - @-rm -f $(SRC)/fcb_packed.f90 - @-rm -f $(SRC)/fcb_read_bits.f90 - @-rm -f $(SRC)/fcb_read_image.f90 - @-rm -f $(SRC)/fcb_read_xds_i2.f90 - @-rm -f $(EXAMPLES)/test_fcb_read_image.f90 - @-rm -f $(EXAMPLES)/test_xds_binary.f90 - @-rm -f symlinksdone - @-rm -f $(TESTOUTPUT) *$(SEXT) - @-rm -rf $(SOLIB) - @-rm -rf org - @-rm -rf $(JCBF) - @-rm -rf $(REGEX) - @-rm -rf $(REGEX)_install - @-rm -rf $(TIFF) - @-rm -rf $(TIFF)_install - @-rm -rf $(HDF5) - @-rm -rf $(HDF5)_install - @-rm -rf $(INCLUDE)/tiff* - @-rm -rf $(INCLUDE)/H5* - @-rm -rf $(INCLUDE)/hdf5* - @-rm -rf share - @-rm -rf $(MINICBF_TEST)/i19* - @-rm -rf solib - @-rm -f thaumatin_die_M1S5_1_0005_2.cbf - @-rm -f 1191_00005.cbf - @-rm -f XRD1621.tif - @-rm -f md5tmp - @-rm -rf $(PYCBF)/build - @-rm -f *_old - @-rm -f X4_lots_M1S4_1_*.cbf - @-rm -f testfile.h5 - @-rm -f hit-20140306005258847.cbf - @-rm -f build_* - ./.undosymlinks - -# -# Remove temporary files -# -clean: - @-rm -f core - @-rm -f *.o - @-rm -f *.u -# -# Restore to distribution state -# -distclean: clean empty - -# -# Create a Tape Archive for distribution -# - -tar: $(DOCUMENTS) $(SOURCE) $(SRC)/cbf.stx $(HEADERS) $(M4FILES)\ - $(EXAMPLES) \ - README.html README Makefile \ - $(JPEGS) - -/bin/rm -f CBFlib.tar* - tar cvBf CBFlib.tar \ - $(DOCUMENTS) $(SOURCE) $(SRC)/cbf.stx $(HEADERS) $(M4FILES)\ - $(EXAMPLES) \ - README.html README Makefile \ - $(JPEGS) - gzip --best CBFlib.tar - diff --git a/Makefile_LINUX_DMALLOC b/Makefile_LINUX_DMALLOC deleted file mode 100644 index 97896edf..00000000 --- a/Makefile_LINUX_DMALLOC +++ /dev/null @@ -1,2641 +0,0 @@ - -###################################################################### -# Makefile - command file for make to create CBFlib # -# # -# Version 0.9.6 19 May 2020 # -# # -# Paul Ellis and # -# Herbert J. Bernstein (yaya@bernstein-plus-sons.com) # -# # -# (C) Copyright 2006 - 2020 Herbert J. Bernstein # -# # -###################################################################### - -###################################################################### -# # -# YOU MAY REDISTRIBUTE THE CBFLIB PACKAGE UNDER THE TERMS OF THE GPL # -# # -# ALTERNATIVELY YOU MAY REDISTRIBUTE THE CBFLIB API UNDER THE TERMS # -# OF THE LGPL # -# # -###################################################################### - -########################### GPL NOTICES ############################## -# # -# This program is free software; you can redistribute it and/or # -# modify it under the terms of the GNU General Public License as # -# published by the Free Software Foundation; either version 2 of # -# (the License, or (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program; if not, write to the Free Software # -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # -# 02111-1307 USA # -# # -###################################################################### - -######################### LGPL NOTICES ############################### -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of the GNU Lesser General Public # -# License as published by the Free Software Foundation; either # -# version 2.1 of the License, or (at your option) any later version. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # -# Lesser General Public License for more details. # -# # -# You should have received a copy of the GNU Lesser General Public # -# License along with this library; if not, write to the Free # -# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # -# MA 02110-1301 USA # -# # -###################################################################### - -###################################################################### -# # -# Stanford University Notices # -# for the CBFlib software package that incorporates SLAC software # -# on which copyright is disclaimed # -# # -# This software # -# ------------- # -# The term "this software", as used in these Notices, refers to # -# those portions of the software package CBFlib that were created by # -# employees of the Stanford Linear Accelerator Center, Stanford # -# University. # -# # -# Stanford disclaimer of copyright # -# -------------------------------- # -# Stanford University, owner of the copyright, hereby disclaims its # -# copyright and all other rights in this software. Hence, anyone # -# may freely use it for any purpose without restriction. # -# # -# Acknowledgement of sponsorship # -# ------------------------------ # -# This software was produced by the Stanford Linear Accelerator # -# Center, Stanford University, under Contract DE-AC03-76SFO0515 with # -# the Department of Energy. # -# # -# Government disclaimer of liability # -# ---------------------------------- # -# Neither the United States nor the United States Department of # -# Energy, nor any of their employees, makes any warranty, express or # -# implied, or assumes any legal liability or responsibility for the # -# accuracy, completeness, or usefulness of any data, apparatus, # -# product, or process disclosed, or represents that its use would # -# not infringe privately owned rights. # -# # -# Stanford disclaimer of liability # -# -------------------------------- # -# Stanford University makes no representations or warranties, # -# express or implied, nor assumes any liability for the use of this # -# software. # -# # -# Maintenance of notices # -# ---------------------- # -# In the interest of clarity regarding the origin and status of this # -# software, this and all the preceding Stanford University notices # -# are to remain affixed to any copy or derivative of this software # -# made or distributed by the recipient and are to be affixed to any # -# copy of software made or distributed by the recipient that # -# contains a copy or derivative of this software. # -# # -# Based on SLAC Software Notices, Set 4 # -# OTT.002a, 2004 FEB 03 # -###################################################################### - - - -###################################################################### -# NOTICE # -# Creative endeavors depend on the lively exchange of ideas. There # -# are laws and customs which establish rights and responsibilities # -# for authors and the users of what authors create. This notice # -# is not intended to prevent you from using the software and # -# documents in this package, but to ensure that there are no # -# misunderstandings about terms and conditions of such use. # -# # -# Please read the following notice carefully. If you do not # -# understand any portion of this notice, please seek appropriate # -# professional legal advice before making use of the software and # -# documents included in this software package. In addition to # -# whatever other steps you may be obliged to take to respect the # -# intellectual property rights of the various parties involved, if # -# you do make use of the software and documents in this package, # -# please give credit where credit is due by citing this package, # -# its authors and the URL or other source from which you obtained # -# it, or equivalent primary references in the literature with the # -# same authors. # -# # -# Some of the software and documents included within this software # -# package are the intellectual property of various parties, and # -# placement in this package does not in any way imply that any # -# such rights have in any way been waived or diminished. # -# # -# With respect to any software or documents for which a copyright # -# exists, ALL RIGHTS ARE RESERVED TO THE OWNERS OF SUCH COPYRIGHT. # -# # -# Even though the authors of the various documents and software # -# found here have made a good faith effort to ensure that the # -# documents are correct and that the software performs according # -# to its documentation, and we would greatly appreciate hearing of # -# any problems you may encounter, the programs and documents any # -# files created by the programs are provided **AS IS** without any * -# warranty as to correctness, merchantability or fitness for any # -# particular or general use. # -# # -# THE RESPONSIBILITY FOR ANY ADVERSE CONSEQUENCES FROM THE USE OF # -# PROGRAMS OR DOCUMENTS OR ANY FILE OR FILES CREATED BY USE OF THE # -# PROGRAMS OR DOCUMENTS LIES SOLELY WITH THE USERS OF THE PROGRAMS # -# OR DOCUMENTS OR FILE OR FILES AND NOT WITH AUTHORS OF THE # -# PROGRAMS OR DOCUMENTS. # -###################################################################### - -###################################################################### -# # -# The IUCr Policy # -# for the Protection and the Promotion of the STAR File and # -# CIF Standards for Exchanging and Archiving Electronic Data # -# # -# Overview # -# # -# The Crystallographic Information File (CIF)[1] is a standard for # -# information interchange promulgated by the International Union of # -# Crystallography (IUCr). CIF (Hall, Allen & Brown, 1991) is the # -# recommended method for submitting publications to Acta # -# Crystallographica Section C and reports of crystal structure # -# determinations to other sections of Acta Crystallographica # -# and many other journals. The syntax of a CIF is a subset of the # -# more general STAR File[2] format. The CIF and STAR File approaches # -# are used increasingly in the structural sciences for data exchange # -# and archiving, and are having a significant influence on these # -# activities in other fields. # -# # -# Statement of intent # -# # -# The IUCr's interest in the STAR File is as a general data # -# interchange standard for science, and its interest in the CIF, # -# a conformant derivative of the STAR File, is as a concise data # -# exchange and archival standard for crystallography and structural # -# science. # -# # -# Protection of the standards # -# # -# To protect the STAR File and the CIF as standards for # -# interchanging and archiving electronic data, the IUCr, on behalf # -# of the scientific community, # -# # -# # holds the copyrights on the standards themselves, * -# # -# # owns the associated trademarks and service marks, and * -# # -# # holds a patent on the STAR File. * -# # -# These intellectual property rights relate solely to the # -# interchange formats, not to the data contained therein, nor to # -# the software used in the generation, access or manipulation of # -# the data. # -# # -# Promotion of the standards # -# # -# The sole requirement that the IUCr, in its protective role, # -# imposes on software purporting to process STAR File or CIF data # -# is that the following conditions be met prior to sale or # -# distribution. # -# # -# # Software claiming to read files written to either the STAR * -# File or the CIF standard must be able to extract the pertinent # -# data from a file conformant to the STAR File syntax, or the CIF # -# syntax, respectively. # -# # -# # Software claiming to write files in either the STAR File, or * -# the CIF, standard must produce files that are conformant to the # -# STAR File syntax, or the CIF syntax, respectively. # -# # -# # Software claiming to read definitions from a specific data * -# dictionary approved by the IUCr must be able to extract any # -# pertinent definition which is conformant to the dictionary # -# definition language (DDL)[3] associated with that dictionary. # -# # -# The IUCr, through its Committee on CIF Standards, will assist # -# any developer to verify that software meets these conformance # -# conditions. # -# # -# Glossary of terms # -# # -# [1] CIF: is a data file conformant to the file syntax defined # -# at http://www.iucr.org/iucr-top/cif/spec/index.html # -# # -# [2] STAR File: is a data file conformant to the file syntax # -# defined at http://www.iucr.org/iucr-top/cif/spec/star/index.html # -# # -# [3] DDL: is a language used in a data dictionary to define data # -# items in terms of "attributes". Dictionaries currently approved # -# by the IUCr, and the DDL versions used to construct these # -# dictionaries, are listed at # -# http://www.iucr.org/iucr-top/cif/spec/ddl/index.html # -# # -# Last modified: 30 September 2000 # -# # -# IUCr Policy Copyright (C) 2000 International Union of # -# Crystallography # -###################################################################### - -.DELETE_ON_ERROR: - -# Version string -VERSION = 0.9.6 - -# -# Directories -# -ROOT = $(PWD) -LIB = $(ROOT)/lib -SOLIB = $(ROOT)/solib -JCBF = $(ROOT)/jcbf -JAVADIR = $(ROOT)/java -BIN = $(ROOT)/bin -SRC = $(ROOT)/src -INCLUDE = $(ROOT)/include -M4 = $(ROOT)/m4 -PYCBF = $(ROOT)/pycbf -EXAMPLES = $(ROOT)/examples -TEMPLATES= $(ROOT)/templates -DECTRIS_EXAMPLES = $(EXAMPLES)/dectris_cbf_template_test -DOC = $(ROOT)/doc -MINICBF_TEST = $(ROOT)/minicbf_test -GRAPHICS = $(ROOT)/html_graphics -DATADIRI = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Input -DATADIRO = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output -DATADIRS = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only -CBF_PREFIX ?= $(HOME) - -# -# Comment out the next line if scratch test files should be retained -# -CLEANTESTS = yes - - -MSYS2=no -CBFLIB_DONT_USE_LOCAL_HDF5?=no -CBFLIB_DONT_USE_LZ4?=no -CBFLIB_DONT_USE_BSHUF?=no - - -CBFLIB_DONT_HAVE_FGETLN ?= yes -ifeq ($(CBFLIB_DONT_HAVE_FGETLN),yes) -SRC_FGETLN = $(SRC)/fgetln.c -else -SRC_FGETLN = -endif - - -CBFLIB_DONT_USE_PYCIFRW ?= no -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -# -# Definitions to get versions of PyCifRW and PLY -# -PYCIFRW ?= PyCifRW-4.1 -PLY = ply-3.2 -PYCIFRWFLAG = -DCBF_USE_PYCIFRW -PYCIFRW_PREFIX ?= $(HOME)/.local -endif - -# -# Definition to get a version of tifflib to support tiff2cbf -# -TIFF ?= tiff-4.0.6_rev_3Nov16 -TIFF_PREFIX ?= $(PWD) -TIFF_INSTALL = $(TIFF)_INSTALL - - -# -# Definitions to get a version of HDF5 -# - -ifneq ($(HDF5_PREFIX),) # already installed on system -CBFLIB_DONT_USE_LOCAL_HDF5 = yes -endif - -ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes) -HDF5_PREFIX ?= $(PWD) -HDF5 ?= hdf5-1.10.6 -#HDF5 = hdf5-1.8.18 -#HDF5 = hdf5-1.10.5 -HDF5dep = $(HDF5) -HDF5_INSTALL = $(HDF5)_INSTALL -ifneq ($(MSYS2),yes) -HDF5LIBS_LOCAL = $(LIB)/libhdf5.a -HDF5LIBS_SYSTEM = -lz -ldl -HDF5SOLIBS_LOCAL = -L$(LIB) -lhdf5 -HDF5SOLIBS_SYSTEM = -lz -else -HDF5LIBS_LOCAL = -L$(LIB) -lhdf5 -lhdf5.dll -HDF5LIBS_SYSTEM = -lz -ldl -HDF5SOLIBS_LOCAL = -L$(LIB) -lhdf5 -lhdf5.dll -HDF5SOLIBS_SYSTEM = -lz -endif -else -HDF5 = -HDF5dep = -HDF5_INSTALL = -HDF5LIBS_LOCAL = -ifneq ($(HDF5_PREFIX),) -HDF5lib = -L$(HDF5_PREFIX)/lib -endif -ifneq ($(MSYS2),yes) -HDF5LIBS_SYSTEM = $(HDF5lib) -lhdf5 -lz -ldl -HDF5SOLIBS_LOCAL = -HDF5SOLIBS_SYSTEM = $(HDF5lib) -lhdf5 -lz -else -HDF5LIBS_SYSTEM = $(HDF5lib) -lhdf5 -lhdf5.dll -lz -ldl -HDF5SOLIBS_LOCAL = -HDF5SOLIBS_SYSTEM = $(HDF5lib) -lhdf5 -lhdf5.dll -lz -endif -endif - -HDF5REGISTER ?= --register manual -ifneq ($(HDF5_PREFIX),) -HDF5include = -I$(HDF5_PREFIX)/include -endif - -ifneq ($(MSYS2),yes) -H5DUMP = $(HDF5_PREFIX)/bin/h5dump -else -H5DUMP = /MINGW32/bin/h5dump -endif - - -CBFLIB_DONT_USE_LZ4 ?= no -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -# -# Definitions to get a version of HDF5Plugin for LZ4 -# -ifneq ($(MSYS2),yes) -LZ4 ?= HDF5Plugin_14Aug20 -else -LZ4 ?= HDF5-External-Filter-Plugins -endif -LZ4dep = $(LZ4) -LZ4src = $(LZ4)/src -LZ4include = $(LZ4)/include -LZ4SOLIBS = -L$(SOLIB) -lh5zlz4 -else -LZ4SOLIBS = -LZ4dep = -endif - -CBFLIB_DONT_USE_BSHUF ?= no -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -# -# Definitions to get a version of HDF5Plugin for BSHUFFLE WITH LZ4 -# -BSHUF ?= bitshuffle-0.2.2.1_15Jun16 -BSUFdep = $(BSHUF) -BSHUFsrc = $(BSHUF)/src -BSHUFinclude = $(BSHUF)/src -BSHUFSOLIBS = -L$(SOLIB) -lh5zbshuf -BSHUFFILTER = libbshuf_h5filter -else -BSHUFSOLIBS = -BSHUFdep = -endif - -CBFLIB_DONT_USE_BLOSC ?= no -ifneq ($(CBFLIB_DONT_USE_BLOSC),yes) -# -# Definitions to get a version of HDF5Plugin for BLOSC -# -BLOSC = ?c-blosc_4Sep16.tar.gz -BLOSCdep = $(BLOSC) -BLOSCFILTER = hdf5-blosc_2Sep16.tar.gz -BLOSCsrc = $(BLOSC)/src -BLOSCinclude = $(BLOSC)/src -BLOSCSOLIBS = -L$(SOLIB) -lh5zbshuf -BLOSCFILTER = libbshuf_h5filter -else -BLOSCSOLIBS = -BLOSCdep = -endif - - - -# -# Definition of python to use -# -#PYTHON = python -PYTHON ?= python2 - - -# -# Definitions to get a stable version of regex -# -REGEX_PREFIX ?= $(PWD) -ifneq ($(REGEX_PREFIX),$(PWD)) -CBFLIB_DONT_USE_LOCAL_REGEX ?= yes -endif - - -REGEX_LIBDIR ?= $(REGEX_PREFIX)/lib -ifneq ($(CBFLIB_DONT_USE_LOCAL_REGEX),yes) -REGEX ?= pcre-8.38 -REGEXDEP = $(REGEX) -REGEX_INSTALL = $(REGEX)_INSTALL -REGEX_LIB ?= pcreposix -REGEX_LIB2 ?= pcre -ifneq ($(MSYS2),yes) -REGEX_LIBS ?= -L $(REGEX_LIBDIR) -l$(REGEX_LIB) -l$(REGEX_LIB2) -REGEX_LIBS_STATIC = $(LIB)/libpcreposix.a $(LIB)/libpcre.a -else -REGEX_LIBS ?= -L $(REGEX_LIBDIR) -l$(REGEX_LIB) -l$(REGEX_LIB).dll -l$(REGEX_LIB2) -l$(REGEX_LIB2).dll -REGEX_LIBS_STATIC = $(REGEX_LIBS) -endif -REGEX_INCLUDES ?= -I $(REGEX_PREFIX) -else -REGEX = -REGEXDEP = -REGEX_INSTALL = -REGEX_LIB ?= -REGEX_LIB2 ?= -REGEX_LIBS ?= -REGEX_INCLUDES ?= -endif - - -# Program to use to retrieve a URL - -DOWNLOAD ?= wget -N -#DOWNLOAD ?= curl -O -L - -# Flag to control symlinks versus copying - -SLFLAGS = --use_ln -LN = ln -s -f - -# -# Program to use to pack shars -# -SHAR = /usr/bin/shar -#SHAR = /usr/local/bin/gshar - -# -# Program to use to create archives -# -AR = /usr/bin/ar - -# -# Program to use to add an index to an archive -# -RANLIB = /usr/bin/ranlib - - -# -# Program to use to generate a signature -# -#SIGNATURE ?= /usr/bin/openssl dgst -md5 -#SIGNATURE ?= (/usr/bin/openssl dgst -md5 | sed "s/^.*= //") -SIGNATURE ?= ( cat > md5tmp; cmake -E md5sum md5tmp| sed "s/ .*//") - -# -# Pipe command to extract all but the first line of a text file -# -ALLBUTONE = tail -n +2 - - -# -# Extension for signatures of files -# -SEXT = .md5 - -# Default shell - -SHELL = bash - -# call to time a command - -#TIME = -#TIME = time - -# -# Program to display differences between files -# -DIFF = diff -u -b - - -# -# Program to generate wrapper classes for Python -# -PYSWIG = swig -python - -# -# Program to generate wrapper classes for Java -# -JSWIG = swig -java - -# -# Program to generate LaTex and HTML program documentation -# - -NUWEB = nuweb - -# -# Compiler for Java -# -JAVAC = javac - -# -# Java archiver for compiled classes -# -JAR = jar - -# -# Java SDK root directory -# -ifeq ($(JDKDIR),) - JDKDIR = /usr/lib/java -endif - -ifneq ($(CBF_DONT_USE_LONG_LONG),) -NOLLFLAG = -DCBF_DONT_USE_LONG_LONG -else -NOLLFLAG = -endif - -ifneq ($(CBF_NO_REGEX),) -CBF_REGEXFLAG = -DCBF_NO_REGEX -else -CBF_REGEXFLAG = -DCBF_REGEXLIB_REGEX -endif - -ifneq ($(CBF_USE_ULP),) -ULPFLAG = -DCBF_USE_ULP -else -ULPFLAG = -endif - -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -LZ4FLAG = -DCBF_H5Z_USE_LZ4 -else -LZ4FLAG = -endif - -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -BSHUFFLAG = -DCBF_H5Z_USE_BSHUF -else -BSHUFFLAG = -endif - - - -MISCFLAG = $(NOLLFLAG) $(ULPFLAG) - -# -# PYCBF definitions -# -PYCBFEXT = so -PYCBFBOPT = -PYCBFIOPT = -SETUP_PY = setup.py -INSTALLSETUP_PY = installsetup.py - -# -# Set the compiler and flags -# - -######################################################### -# -# Appropriate compiler definitions for Linux and DMALLOC -# -######################################################### -CC = gcc -C++ = g++ -CFLAGS = -g -O2 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing -DDMALLOC -DDMALLOC_FUNC_CHECK -I$(HOME)/include -LDFLAGS = -F90C = gfortran -F90FLAGS = -g -F90LDFLAGS = -SOCFLAGS = -fPIC -SOLDFLAGS = -shared -Wl,-rpath,$(CBF_PREFIX)/lib -JAVAINCLUDES = -I$(JDKDIR)/include -I$(JDKDIR)/include/linux -LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; -RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/lib:$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; -EXTRALIBS = -lm -L$(HOME)/lib -ldmalloc -M4FLAGS = -Dfcb_bytes_in_rec=131072 -TIME = time - -ifneq ($(NOFORTRAN),) -F90C = -endif - -# -# URLs from which to retrieve the data directories -# -DATAURLBASE = http://downloads.sf.net/cbflib/ -DATAURLI = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Input.tar.gz -DATAURLO = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output.tar.gz -DATAURLS = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz - -# -# URLs from which to retrieve needed external package snapshots -# -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWURL = http://downloads.sf.net/cbflib/$(PYCIFRW).tar.gz -PLYURL = http://www.dabeaz.com/ply/$(PLY).tar.gz -endif -REGEX_URL ?= http://downloads.sf.net/cbflib/$(REGEX).tar.gz -TIFF_URL ?= http://downloads.sf.net/cbflib/$(TIFF).tar.gz -HDF5_URL ?= http://downloads.sf.net/cbflib/$(HDF5).tar.gz -ifneq ($(MSYS2),yes) -LZ4_URL = http://downloads.sf.net/cbflib/$(LZ4).tar.gz -else -LZ4_URL = http://www.github.com/yayahjb/$(LZ4).git -endif -BSHUFURL = http://downloads.sf.net/cbflib/$(BSHUF).tar.gz - - -# -# Include directories -# -INCLUDES = -I$(INCLUDE) -I$(SRC) $(HDF5include) - -# -# runtime library path export commands -# -RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export LD_LIBRARY_PATH; \ - DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export DYLD_LIBRARY_PATH; \ - LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib;export LD_RUN_PATH; - - -###################################################################### -# You should not need to make modifications below this line # -###################################################################### - -ifneq ($(CBF_USE_ULP),) -SRC_CBF_ULP_C = $(SRC)/cbf_ulp.c -INCLUDE_CBF_ULP_H = $(INCLUDE)/cbf_ulp.h -BIN_TESTULP = $(BIN)/testulp -else -SRC_CBF_ULP_C = -INCLUyDE_CBF_ULP_H = -BIN_TESTULP = -endif - -ifneq ($(MSYS2),yes) -SRC_REALPATH = -else -SRC_REALPATH = $(SRC)/realpath.c -endif - - -# -# Suffixes of files to be used or built -# -.SUFFIXES: .c .o .f90 .m4 - -.m4.f90: - m4 -P $(M4FLAGS) $< > $@ - -ifneq ($(F90C),) -.f90.o: - $(F90C) $(F90FLAGS) -c $< -o $@ -endif - - -# -# Common dependencies -# -COMMONDEP = $(M4)/Makefile.m4 - -# -# Source files -# - -SOURCE = $(SRC)/cbf.c \ - $(SRC)/cbf_airy_disk.c \ - $(SRC)/cbf_alloc.c \ - $(SRC)/cbf_ascii.c \ - $(SRC)/cbf_binary.c \ - $(SRC)/cbf_byte_offset.c \ - $(SRC)/cbf_canonical.c \ - $(SRC)/cbf_codes.c \ - $(SRC)/cbf_compress.c \ - $(SRC)/cbf_context.c \ - $(SRC)/cbf_copy.c \ - $(SRC)/cbf_file.c \ - $(SRC)/cbf_getopt.c \ - $(SRC)/cbf_hdf5.c \ - $(SRC)/cbf_hdf5_filter.c \ - $(SRC)/cbf_lex.c \ - $(SRC)/cbf_minicbf_header.c\ - $(SRC)/cbf_nibble_offset.c \ - $(SRC)/cbf_packed.c \ - $(SRC)/cbf_predictor.c \ - $(SRC)/cbf_read_binary.c \ - $(SRC)/cbf_read_mime.c \ - $(SRC)/cbf_simple.c \ - $(SRC)/cbf_string.c \ - $(SRC)/cbf_stx.c \ - $(SRC)/cbf_tree.c \ - $(SRC_CBF_ULP_C) \ - $(SRC)/cbf_uncompressed.c \ - $(SRC)/cbf_write.c \ - $(SRC)/cbf_write_binary.c \ - $(SRC)/cbf_ws.c \ - $(SRC)/cbff.c \ - $(SRC)/md5c.c \ - $(SRC)/img.c \ - $(SRC_FGETLN) $(SRC_REALPATH) - -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYSOURCE = $(SRC)/drel_lex.py \ - $(SRC)/drel_yacc.py \ - $(SRC)/drelc.py \ - $(SRC)/drel_prep.py -endif - -F90SOURCE = $(SRC)/fcb_atol_wcnt.f90 \ - $(SRC)/fcb_ci_strncmparr.f90 \ - $(SRC)/fcb_exit_binary.f90 \ - $(SRC)/fcb_nblen_array.f90 \ - $(SRC)/fcb_next_binary.f90 \ - $(SRC)/fcb_open_cifin.f90 \ - $(SRC)/fcb_packed.f90 \ - $(SRC)/fcb_read_bits.f90 \ - $(SRC)/fcb_read_byte.f90 \ - $(SRC)/fcb_read_image.f90 \ - $(SRC)/fcb_read_line.f90 \ - $(SRC)/fcb_read_xds_i2.f90 \ - $(SRC)/fcb_skip_whitespace.f90 - - -# -# Header files -# -HEADERS = $(INCLUDE)/cbf.h \ - $(INCLUDE)/cbf_airy_disk.h \ - $(INCLUDE)/cbf_alloc.h \ - $(INCLUDE)/cbf_ascii.h \ - $(INCLUDE)/cbf_binary.h \ - $(INCLUDE)/cbf_byte_offset.h \ - $(INCLUDE)/cbf_canonical.h \ - $(INCLUDE)/cbf_codes.h \ - $(INCLUDE)/cbf_compress.h \ - $(INCLUDE)/cbf_context.h \ - $(INCLUDE)/cbf_copy.h \ - $(INCLUDE)/cbf_file.h \ - $(INCLUDE)/cbf_getopt.h \ - $(INCLUDE)/cbf_hdf5.h \ - $(INCLUDE)/cbf_hdf5_filter.h \ - $(INCLUDE)/cbf_lex.h \ - $(INCLUDE)/cbf_minicbf_header.h\ - $(INCLUDE)/cbf_nibble_offset.h \ - $(INCLUDE)/cbf_packed.h \ - $(INCLUDE)/cbf_predictor.h \ - $(INCLUDE)/cbf_read_binary.h \ - $(INCLUDE)/cbf_read_mime.h \ - $(INCLUDE)/cbf_simple.h \ - $(INCLUDE)/cbf_string.h \ - $(INCLUDE)/cbf_stx.h \ - $(INCLUDE)/cbf_tree.h \ - $(INCLUDE)/cbf_uncompressed.h \ - $(INCLUDE_CBF_ULP_H) \ - $(INCLUDE)/cbf_write.h \ - $(INCLUDE)/cbf_write_binary.h \ - $(INCLUDE)/cbf_ws.h \ - $(INCLUDE)/global.h \ - $(INCLUDE)/cbff.h \ - $(INCLUDE)/md5.h \ - $(INCLUDE)/img.h - -# -# m4 macro files -# -M4FILES = $(M4)/fcblib_defines.m4 \ - $(M4)/fcb_exit_binary.m4 \ - $(M4)/fcb_next_binary.m4 \ - $(M4)/fcb_open_cifin.m4 \ - $(M4)/fcb_packed.m4 \ - $(M4)/fcb_read_bits.m4 \ - $(M4)/fcb_read_image.m4 \ - $(M4)/fcb_read_xds_i2.m4 \ - $(M4)/test_fcb_read_image.m4 \ - $(M4)/test_xds_binary.m4 - - -# -# Documentation files -# -DOCUMENTS = $(DOC)/CBFlib.html \ - $(DOC)/CBFlib.txt \ - $(DOC)/CBFlib_NOTICES.html \ - $(DOC)/CBFlib_NOTICES.txt \ - $(DOC)/ChangeLog \ - $(DOC)/ChangeLog.html \ - $(DOC)/MANIFES \ - $(DOC)/gpl.txt $(DOC)/lgpl.txt - -# -# HTML Graphics files -# -JPEGS = $(GRAPHICS)/CBFbackground.jpg \ - $(GRAPHICS)/CBFbig.jpg \ - $(GRAPHICS)/CBFbutton.jpg \ - $(GRAPHICS)/cbflibbackground.jpg\ - $(GRAPHICS)/cbflibbig.jpg \ - $(GRAPHICS)/cbflibbutton.jpg \ - $(GRAPHICS)/cifhome.jpg \ - $(GRAPHICS)/iucrhome.jpg \ - $(GRAPHICS)/noticeButton.jpg - - -# -# Default: instructions -# -default: - @echo ' ' - @echo '***************************************************************' - @echo ' ' - @echo ' PLEASE READ README and doc/CBFlib_NOTICES.txt' - @echo ' ' - @echo ' Before making the CBF library and example programs, check' - @echo ' that the C compiler name and flags are correct:' - @echo ' ' - @echo ' The current values are:' - @echo ' ' - @echo ' $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(PYCIFRWFLAG)' - @echo ' ' - @echo ' Before installing the CBF library and example programs, check' - @echo ' that the install directory is correct:' - @echo ' ' - @echo ' The current value :' - @echo ' ' - @echo ' $(CBF_PREFIX) ' - @echo ' ' - @echo ' To compile the CBF library and example programs type:' - @echo ' ' - @echo ' make clean' - @echo ' make all' - @echo ' ' - @echo ' To compile the CBF library as a shared object library, type:' - @echo ' ' - @echo ' make shared' - @echo ' ' - @echo ' To compile the Java wrapper classes for CBF library, type:' - @echo ' ' - @echo ' make javawrapper' - @echo ' ' - @echo ' To run a set of tests type:' - @echo ' ' - @echo ' make tests' - @echo ' ' - @echo ' To run some java tests type:' - @echo ' ' - @echo ' make javatests' - @echo ' ' - @echo ' The tests assume that several data files are in the directories' - @echo ' $(DATADIRI) and $(DATADIRO)' - @echo ' ' - @echo ' Alternatively tests can be run comparing MD5 signatures only by' - @echo ' ' - @echo ' make tests_sigs_only' - @echo ' ' - @echo ' These signature only tests save space and download time by' - @echo ' assuming that input data files and the output signatures' - @echo ' are in the directories' - @echo ' $(DATADIRI) and $(DATADIRS)' - @echo ' ' - @echo ' These directory can be obtained from' - @echo ' ' - @echo ' $(DATAURLI) ' - @echo ' $(DATAURLO) ' - @echo ' $(DATAURLS) ' - @echo ' ' - @echo ' To clean up the directories type:' - @echo ' ' - @echo ' make clean' - @echo ' ' - @echo ' To install the library and binaries type:' - @echo ' ' - @echo ' make install' - @echo ' ' - @echo '***************************************************************' - @echo ' ' - -# -# Compile the library and examples -# -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEPS = $(PYCIFRW) $(PLY) -else -PYCIFRWDEPS = -endif - -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -LZ4DEPS = $(LZ4) -else -LZ4DEPS = -endif - -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -BSHUFDEPS = $(BSHUF) -else -BSHUFDEPS = -endif - - -all:: $(BIN) $(SOURCE) $(F90SOURCE) $(HEADERS) \ - $(HDF5) \ - $(LZ4DEPS) \ - $(BSHUFDEPS) \ - $(PYCIFRWDEPS) \ - symlinksdone \ - $(REGEXDEP) \ - $(LIB) \ - $(LIB)/libcbf.a \ - $(LIB)/libfcb.a \ - $(LIB)/libimg.a \ - $(BIN)/adscimg2cbf \ - $(BIN)/arvai_test \ - $(BIN)/cbf2adscimg \ - $(BIN)/cbf2nexus \ - $(BIN)/cif2c \ - $(BIN)/cif2cbf \ - $(BIN)/cbf_standardize_numbers \ - $(BIN)/convert_image \ - $(BIN)/convert_minicbf\ - $(BIN)/img2cif \ - $(BIN)/makecbf \ - $(BIN)/minicbf2nexus \ - $(BIN)/nexus2cbf \ - $(BIN)/roi_peaksearch \ - $(BIN)/sequence_match \ - $(BIN)/testcell \ - $(BIN)/testalloc \ - $(BIN)/testreals \ - $(BIN)/testflat \ - $(BIN)/testflatpacked \ - $(BIN)/testhdf5 \ - $(BIN_TESTULP) \ - $(BIN)/tiff2cbf \ - $(BIN)/test_cbf_airy_disk \ - $(BIN)/cbf_testxfelread - -ifneq ($(F90C),) -all:: $(BIN)/test_xds_binary \ - $(BIN)/test_fcb_read_image -endif - -shared: $(SOLIB)/libcbf.so $(SOLIB)/libfcb.so $(SOLIB)/libimg.so - -javawrapper: shared $(JCBF) $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so - -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEF = -Dcbf_use_pycifrw=yes -else -PYCIFRWDEF = -endif - - -Makefiles: Makefile \ - Makefile_LINUX \ - Makefile_LINUX_64 \ - Makefile_LINUX_gcc42 \ - Makefile_LINUX_DMALLOC \ - Makefile_LINUX_gcc42_DMALLOC \ - Makefile_OSX \ - Makefile_OSX_gcc42 \ - Makefile_OSX_gcc42_DMALLOC \ - Makefile_AIX \ - Makefile_MINGW \ - Makefile_MSYS2 \ - Makefile_IRIX_gcc - - -Makefile_LINUX: $(M4)/Makefile.m4 - -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX $(M4)/Makefile.m4 > Makefile_LINUX.tmp - mv Makefile_LINUX.tmp Makefile_LINUX - -Makefile_LINUX_DMALLOC: $(M4)/Makefile.m4 - -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_DMALLOC.tmp - mv Makefile_LINUX_DMALLOC.tmp Makefile_LINUX_DMALLOC - -Makefile_LINUX_64: $(M4)/Makefile.m4 - -cp Makefile_LINUX_64 Makefile_LINUX_64_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_64 $(M4)/Makefile.m4 > Makefile_LINUX_64.tmp - mv Makefile_LINUX_64.tmp Makefile_LINUX_64 - -Makefile_LINUX_gcc42: $(M4)/Makefile.m4 - -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42 $(M4)/Makefile.m4 > Makefile_LINUX_gcc42.tmp - mv Makefile_LINUX_gcc42.tmp Makefile_LINUX_gcc42 - -Makefile_LINUX_gcc42_DMALLOC: $(M4)/Makefile.m4 - -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_gcc42_DMALLOC.tmp - mv Makefile_LINUX_gcc42_DMALLOC.tmp Makefile_LINUX_gcc42_DMALLOC - -Makefile_OSX: $(M4)/Makefile.m4 - -cp Makefile_OSX Makefile_OSX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX $(M4)/Makefile.m4 > Makefile_OSX.tmp - mv Makefile_OSX.tmp Makefile_OSX - -Makefile_OSX_gcc42: $(M4)/Makefile.m4 - -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42 $(M4)/Makefile.m4 > Makefile_OSX_gcc42.tmp - mv Makefile_OSX_gcc42.tmp Makefile_OSX_gcc42 - -Makefile_OSX_gcc42_DMALLOC: $(M4)/Makefile.m4 - -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_OSX_gcc42_DMALLOC.tmp - mv Makefile_OSX_gcc42_DMALLOC.tmp Makefile_OSX_gcc42_DMALLOC - -Makefile_AIX: $(M4)/Makefile.m4 - -cp Makefile_AIX Makefile_AIX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=AIX $(M4)/Makefile.m4 > Makefile_AIX.tmp - mv Makefile_AIX.tmp Makefile_AIX - -Makefile_MINGW: $(M4)/Makefile.m4 - -cp Makefile_MINGW Makefile_MINGW_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MINGW $(M4)/Makefile.m4 > Makefile_MINGW.tmp - mv Makefile_MINGW.tmp Makefile_MINGW - -Makefile_MSYS2: $(M4)/Makefile.m4 - -cp Makefile_MSYS2 Makefile_MSYS2_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MSYS2 $(M4)/Makefile.m4 > Makefile_MSYS2.tmp - mv Makefile_MSYS2.tmp Makefile_MSYS2 - -Makefile_IRIX_gcc: $(M4)/Makefile.m4 - -cp Makefile_IRIX_gcc Makefile_IRIX_gcc_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=IRIX_gcc $(M4)/Makefile.m4 > Makefile_IRIX_gcc.tmp - mv Makefile_IRIX_gcc.tmp Makefile_IRIX_gcc - - -Makefile: $(M4)/Makefile.m4 - -cp Makefile Makefile_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=default $(M4)/Makefile.m4 > Makefile.tmp - mv Makefile.tmp Makefile - -cbflib.ini: $(M4)/Makefile.m4 - echo "$(LDPREFIX)" > cbflib.ini - echo "HDF5_PLUGIN_PATH=$(SOLIB):$$HDF5_PLUGIN_PATH" >> cbflib.ini - echo "export HDF5_PLUGIN_PATH" >> cbflib.ini - -symlinksdone: - chmod a+x .symlinks - chmod a+x .undosymlinks - chmod a+x doc/.symlinks - chmod a+x doc/.undosymlinks - ./.symlinks $(SLFLAGS) - touch symlinksdone - -install: baseinstall pycbfinstall \ - $(HDF5_INSTALL) \ - $(TIFF_INSTALL) \ - $(REGEX_INSTALL) - -userinstall: baseinstall pycbfuserinstall \ - $(HDF5_INSTALL) \ - $(TIFF_INSTALL) \ - $(REGEX_INSTALL) - -baseinstall: all $(CBF_PREFIX) $(CBF_PREFIX)/lib $(CBF_PREFIX)/bin \ - $(CBF_PREFIX)/include $(CBF_PREFIX)/include/cbflib \ - $(PYSOURCE) shared $(EXAMPLES)/batch_convert_minicbf.sh \ - $(LIB)/libcbf.a $(LIB)/libimg.a $(LIB)/libfcb.a \ - $(SOLIB)/libcbf.so $(SOLIB)/libimg.so $(SOLIB)/libfcb.so - -chmod -R 755 $(CBF_PREFIX)/include/cbflib - -chmod 755 $(CBF_PREFIX)/lib/libcbf.a - -cp $(CBF_PREFIX)/lib/libcbf.a $(CBF_PREFIX)/lib/libcbf_old.a - cp $(LIB)/libcbf.a $(CBF_PREFIX)/lib/libcbf.a - -chmod 755 $(CBF_PREFIX)/lib/libimg.a - -cp $(CBF_PREFIX)/lib/libimg.a $(CBF_PREFIX)/lib/libimg_old.a - cp $(LIB)/libimg.a $(CBF_PREFIX)/lib/libimg.a - -chmod 755 $(CBF_PREFIX)/lib/libfcb.a - -cp $(CBF_PREFIX)/lib/libfcb.a $(CBF_PREFIX)/lib/libfcb_old.a - cp $(LIB)/libfcb.a $(CBF_PREFIX)/lib/libfcb.a - -chmod 755 $(CBF_PREFIX)/lib/libcbf.so - -cp $(CBF_PREFIX)/lib/libcbf.so $(CBF_PREFIX)/lib/libcbf_old.so - cp $(SOLIB)/libcbf.so $(CBF_PREFIX)/lib/libcbf.so - $(LN) $(CBF_PREFIX)/lib/libcbf.so $(CBF_PREFIX)/lib/lib_cbf.so - -chmod 755 $(CBF_PREFIX)/lib/libimg.so - -cp $(CBF_PREFIX)/lib/libimg.so $(CBF_PREFIX)/lib/libimg_old.so - cp $(SOLIB)/libimg.so $(CBF_PREFIX)/lib/libimg.so - $(LN) $(CBF_PREFIX)/lib/libimg.so $(CBF_PREFIX)/lib/lib_img.so - -chmod 755 $(CBF_PREFIX)/lib/libfcb.so - -cp $(CBF_PREFIX)/lib/libfcb.so $(CBF_PREFIX)/lib/libfcb_old.so - cp $(SOLIB)/libfcb.so $(CBF_PREFIX)/lib/libfcb.so - $(LN) $(CBF_PREFIX)/lib/libfcb.so $(CBF_PREFIX)/lib/lib_fcb.so - -cp $(CBF_PREFIX)/bin/cbflib.ini $(CBF_PREFIX)/bin/cbflib.ini_old - echo "$(RUNLDPREFIX)" > $(CBF_PREFIX)/bin/cbflib.ini - echo "HDF5_PLUGIN_PATH=$(CBF_PREFIX)/lib:$$HDF5_PLUGIN_PATH" >> $(CBF_PREFIX)/bin/cbflib.ini - echo "export HDF5_PLUGIN_PATH" >> $(CBF_PREFIX)/bin/cbflib.ini - -cp $(CBF_PREFIX)/bin/adscimg2cbf $(CBF_PREFIX)/bin/adscimg2cbf_old - cp $(BIN)/adscimg2cbf $(CBF_PREFIX)/bin/adscimg2cbf - -cp $(CBF_PREFIX)/bin/cbf2adscimg $(CBF_PREFIX)/bin/cbf2adscimg_old - cp $(BIN)/cbf2adscimg $(CBF_PREFIX)/bin/cbf2adscimg - -cp $(CBF_PREFIX)/bin/cbf_standardize_numbers \ - $(CBF_PREFIX)/bin/cbf_standardize_numbers_old - cp $(BIN)/cbf_standardize_numbers $(CBF_PREFIX)/bin/cbf_standardize_numbers - -cp $(CBF_PREFIX)/bin/convert_image $(CBF_PREFIX)/bin/convert_image_old - cp $(BIN)/convert_image $(CBF_PREFIX)/bin/convert_image - -cp $(CBF_PREFIX)/bin/convert_minicbf $(CBF_PREFIX)/bin/convert_minicbf_old - cp $(BIN)/convert_minicbf $(CBF_PREFIX)/bin/convert_minicbf - -cp $(CBF_PREFIX)/bin/makecbf $(CBF_PREFIX)/bin/makecbf_old - cp $(BIN)/makecbf $(CBF_PREFIX)/bin/makecbf - -cp $(CBF_PREFIX)/bin/img2cif $(CBF_PREFIX)/bin/img2cif_old - cp $(BIN)/img2cif $(CBF_PREFIX)/bin/img2cif - -cp $(CBF_PREFIX)/bin/cif2cbf $(CBF_PREFIX)/bin/cif2cbf_old - cp $(BIN)/cif2cbf $(CBF_PREFIX)/bin/cif2cbf - -cp $(CBF_PREFIX)/bin/minicbf2nexus $(CBF_PREFIX)/bin/minicbf2nexus_old - cp $(BIN)/minicbf2nexus $(CBF_PREFIX)/bin/minicbf2nexus - -cp $(CBF_PREFIX)/bin/cbf2nexus $(CBF_PREFIX)/bin/cbf2nexus_old - cp $(BIN)/cbf2nexus $(CBF_PREFIX)/bin/cbf2nexus - -cp $(CBF_PREFIX)/bin/nexus2cbf $(CBF_PREFIX)/bin/nexus2cbf_old - cp $(BIN)/nexus2cbf $(CBF_PREFIX)/bin/nexus2cbf - -cp $(CBF_PREFIX)/bin/roi_peaksearch $(CBF_PREFIX)/bin/roi_peaksearch_old - cp $(BIN)/roi_peaksearch $(CBF_PREFIX)/bin/roi_peaksearch - -cp $(CBF_PREFIX)/bin/sequence_match $(CBF_PREFIX)/bin/sequence_match_old - cp $(BIN)/sequence_match $(CBF_PREFIX)/bin/sequence_match - -cp $(CBF_PREFIX)/bin/testalloc $(CBF_PREFIX)/bin/testalloc_old - cp $(BIN)/testalloc $(CBF_PREFIX)/bin/testalloc - -cp $(CBF_PREFIX)/bin/arvai_test $(CBF_PREFIX)/bin/arvai_test_old - cp $(BIN)/arvai_test $(CBF_PREFIX)/bin/arvai_test - -cp $(CBF_PREFIX)/bin/cif2c $(CBF_PREFIX)/bin/cif2c_old - cp $(BIN)/cif2c $(CBF_PREFIX)/bin/cif2c - -cp $(CBF_PREFIX)/bin/testreals $(CBF_PREFIX)/bin/testreals_old - cp $(BIN)/testreals $(CBF_PREFIX)/bin/testreals - -cp $(CBF_PREFIX)/bin/testflat $(CBF_PREFIX)/bin/testflat_old - cp $(BIN)/testflat $(CBF_PREFIX)/bin/testflat - -cp $(CBF_PREFIX)/bin/testflatpacked $(CBF_PREFIX)/bin/testflatpacked_old - cp $(BIN)/testflatpacked $(CBF_PREFIX)/bin/testflatpacked - -cp $(CBF_PREFIX)/bin/tiff2cbf $(CBF_PREFIX)/bin/tiff2cbf_old - cp $(BIN)/tiff2cbf $(CBF_PREFIX)/bin/tiff2cbf - -cp $(CBF_PREFIX)/bin/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk_old - cp $(BIN)/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk - -cp $(CBF_PREFIX)/bin/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk_old - cp $(BIN)/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk - -cp $(CBF_PREFIX)/bin/testhdf5 $(CBF_PREFIX)/bin/testhdf5_old - cp $(BIN)/testhdf5 $(CBF_PREFIX)/bin/testhdf5 -ifneq ($(CBF_USE_ULP),) - -cp $(CBF_PREFIX)/bin/testulp $(CBF_PREFIX)/bin/testulp_old - cp $(BIN)/testulp $(CBF_PREFIX)/bin/testulp -endif - -cp $(CBF_PREFIX)/bin/batch_convert_minicbf.sh $(CBF_PREFIX)/bin/batch_convert_minicbf_old.sh - cp $(EXAMPLES)/batch_convert_minicbf.sh $(CBF_PREFIX)/bin/batch_convert_minicbf.sh -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) - cp $(SRC)/drel_lex.py $(CBF_PREFIX)/bin/drel_lex.py - cp $(SRC)/drel_yacc.py $(CBF_PREFIX)/bin/drel_yacc.py - cp $(SRC)/drelc.py $(CBF_PREFIX)/bin/drelc.py - cp $(SRC)/drel_prep.py $(CBF_PREFIX)/bin/drel_prep.py -endif - chmod -R 755 $(CBF_PREFIX)/include/cbflib - -rm -rf $(CBF_PREFIX)/include/cbflib_old - -cp -r $(CBF_PREFIX)/include/cbflib $(CBF_PREFIX)/include/cbflib_old - -rm -rf $(CBF_PREFIX)/include/cbflib - cp -r $(INCLUDE) $(CBF_PREFIX)/include/cbflib - chmod 644 $(CBF_PREFIX)/lib/libcbf.a - chmod 644 $(CBF_PREFIX)/lib/libimg.a - chmod 644 $(CBF_PREFIX)/lib/libfcb.a - chmod 755 $(CBF_PREFIX)/lib/libcbf.so - chmod 755 $(CBF_PREFIX)/lib/libimg.so - chmod 755 $(CBF_PREFIX)/lib/libfcb.so - chmod 755 $(CBF_PREFIX)/bin/arvai_test - chmod 755 $(CBF_PREFIX)/bin/cbf2nexus - chmod 755 $(CBF_PREFIX)/bin/cbf_standardize_numbers - chmod 755 $(CBF_PREFIX)/bin/cif2c - chmod 755 $(CBF_PREFIX)/bin/cif2cbf - chmod 755 $(CBF_PREFIX)/bin/convert_image - chmod 755 $(CBF_PREFIX)/bin/convert_minicbf - chmod 755 $(CBF_PREFIX)/bin/img2cif - chmod 755 $(CBF_PREFIX)/bin/makecbf - chmod 755 $(CBF_PREFIX)/bin/minicbf2nexus - chmod 755 $(CBF_PREFIX)/bin/nexus2cbf - chmod 755 $(CBF_PREFIX)/bin/roi_peaksearch - chmod 755 $(CBF_PREFIX)/bin/sequence_match - chmod 755 $(CBF_PREFIX)/bin/testalloc - chmod 755 $(CBF_PREFIX)/bin/testflat - chmod 755 $(CBF_PREFIX)/bin/testflatpacked - chmod 755 $(CBF_PREFIX)/bin/testhdf5 - chmod 755 $(CBF_PREFIX)/bin/testreals -ifneq ($(CBF_USE_ULP),) - chmod 755 $(CBF_PREFIX)/bin/testulp -endif - chmod 755 $(CBF_PREFIX)/bin/tiff2cbf - chmod 755 $(CBF_PREFIX)/bin/test_cbf_airy_disk - chmod 755 $(CBF_PREFIX)/bin/batch_convert_minicbf.sh - chmod 644 $(CBF_PREFIX)/include/cbflib/*.h - -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -# -# PyCifRW -# -build_pycifrw: $(M4)/Makefile.m4 - touch build_pycifrw -$(PYCIFRW): build_pycifrw - -rm -rf $(PYCIFRW) - -rm -rf $(PYCIFRW).tar.gz - $(DOWNLOAD) $(PYCIFRWURL) - tar -xvf $(PYCIFRW).tar.gz - -rm $(PYCIFRW).tar.gz - (cd $(PYCIFRW); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) - -# -# PLY -# -build_ply: $(M4)/Makefile.m4 - touch build_ply -$(PLY): build_ply - -rm -rf $(PLY) - -rm -rf $(PLY).tar.gz - $(DOWNLOAD) $(PLYURL) - tar -xvf $(PLY).tar.gz - -rm $(PLY).tar.gz - (cd $(PLY); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) -endif - -# -# REGEX -# - -build_regex: $(M4)/Makefile.m4 - touch build_regex -$(REGEX): build_regex - -rm -rf $(REGEX) - -rm -rf $(REGEX).tar.gz - $(DOWNLOAD) $(REGEX_URL) - tar -xvf $(REGEX).tar.gz - touch $(REGEX) - -rm $(REGEX).tar.gz - cp config.guess config.sub $(REGEX) - (cd $(REGEX); \ - prefix=$(REGEX_PREFIX); export prefix; \ - ./configure --prefix=$(REGEX_PREFIX); make install) - @-cp $(REGEX_PREFIX)/include/pcreposix.h $(REGEX_PREFIX)/include/regex.h -$(REGEX)_INSTALL: $(REGEX) - -rm -rf $(REGEX)_install - rsync -avz $(REGEX)/ $(REGEX)_install - (cd $(REGEX)_install; prefix=$(CBF_PREFIX); export prefix; \ - make distclean; ./configure --prefix=$(CBF_PREFIX); make install ) - @-cp $(CBF_PREFIX)/include/pcreposix.h $(CBF_PREFIX)/include/regex.h - -# -# TIFF -# -build_tiff: $(M4)/Makefile.m4 - touch build_tiff -$(TIFF): build_tiff config.guess config.sub - -rm -rf $(TIFF) - -rm -rf $(TIFF).tar.gz - $(DOWNLOAD) $(TIFF_URL) - tar -xvf $(TIFF).tar.gz - touch $(TIFF) - -rm $(TIFF).tar.gz - cp config.guess config.sub $(TIFF)/config/ - (cd $(TIFF); prefix=$(TIFF_PREFIX); export prefix; \ - ./configure --prefix=$(TIFF_PREFIX); make install) -$(TIFF)_INSTALL: $(TIFF) - -rm -rf $(TIFF)_install - rsync -avz $(TIFF)/ $(TIFF)_install - (cd $(TIFF)_install; make distclean; prefix=$(CBF_PREFIX); export prefix; \ - ./configure --prefix=$(CBF_PREFIX); make install) - - -ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes) -# -# HDF5 -# - -build_hdf5: $(M4)/Makefile.m4 - touch build_hdf5 -$(HDF5): build_hdf5 - -rm -rf $(HDF5) - -rm -rf $(HDF5).tar.gz - $(DOWNLOAD) $(HDF5_URL) - tar -xvf $(HDF5).tar.gz - cp config.guess $(HDF5)/bin/config.guess - cp config.sub $(HDF5)/bin/config.sub - touch $(HDF5) - -rm $(HDF5).tar.gz - echo "first level HDF5 install in "$(HDF5_PREFIX) - (cd $(ROOT)/$(HDF5); \ - CFLAGS="$(CFLAGS)"; export CFLAGS; \ - mkdir -p hdf5; prefix=$(ROOT)/$(HDF5)/hdf5; export prefix; \ - ./configure --prefix=$(ROOT)/$(HDF5)/hdf5 --enable-build-mode=production \ - --enable-trace --enable-fortran --enable-using-memchecker ;\ - make install; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/bin/ $(HDF5_PREFIX)/bin; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/lib/ $(HDF5_PREFIX)/lib; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/include/ $(HDF5_PREFIX)/include; \ - cd $(HDF5_PREFIX)/bin; $(ROOT)/$(HDF5)/hdf5/bin/h5redeploy -force ) -$(HDF5)_INSTALL: $(HDF5) - -rm -rf $(HDF5)_install - echo "final HDF5 install in "$(CBF_PREFIX) - rsync -avz $(ROOT)/$(HDF5)/hdf5/bin/ $(CBF_PREFIX)/bin; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/lib/ $(CBF_PREFIX)/lib; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/include/ $(CBF_PREFIX)/include; \ - cd $(CBF_PREFIX)/bin; $(ROOT)/$(HDF5)/hdf5/bin/h5redeploy -force -endif - - -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -# -# LZ4 -# -build_lz4: $(M4)/Makefile.m4 - touch build_lz4 -$(LZ4): $(HDF5) build_lz4 - mkdir -p $(SOLIB) - -rm -rf $(LZ4) -ifneq ($(MSYS2),yes) - -rm -rf $(LZ4).tar.gz - $(DOWNLOAD) $(LZ4_URL) - tar -xvf $(LZ4).tar.gz - -rm $(LZ4).tar.gz - (cp $(LZ4include)/lz4.h $(INCLUDE); \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/lz4.c -o lz4.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/h5zlz4.c -o h5zlz4.o; \ - $(CC) -shared lz4.o h5zlz4.o -o $(SOLIB)/libh5zlz4.so; \ - rm lz4.o h5zlz4.o) -else - git clone $(LZ4_URL) - (cd $(LZ4); mkdir build; cd build; cmake .. -G 'MSYS Makefiles' -DENABLE_LZ4_PLUGIN="yes"; make all; cp plugins/* $(SOLIB)) -endif - touch $(LZ4) -endif - - -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -# -# BSHUF -# -build_BSHUF: $(M4)/Makefile.m4 - touch build_BSHUF -$(BSHUF): $(HDF5) build_BSHUF $(LZ4dep) - mkdir -p $(SOLIB) - -rm -rf $(BSHUF) - -rm -rf $(BSHUF).tar.gz - -rm -rf *.o - $(DOWNLOAD) $(BSHUFURL) - tar -xvf $(BSHUF).tar.gz - -rm $(BSHUF).tar.gz - (cp $(BSHUFinclude)/bitshuffle.h \ - $(BSHUFinclude)/bitshuffle_core.h \ - $(BSHUFinclude)/bitshuffle_internals.h \ - $(BSHUFinclude)/bshuf_h5filter.h $(BSHUFinclude)/iochain.h $(INCLUDE); \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bshuf_h5plugin.c -o bshuf_h5plugin.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/iochain.c -o iochain.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o; \ - $(CC) -shared bshuf_h5filter.o bitshuffle.o bitshuffle_core.o iochain.o lz4.o $(HDF5SOLIBS_LOCAL) $(HDF5SOLIBS_SYSTEM)\ - -o $(SOLIB)/libh5zbshuf.so; \ - $(CC) -shared bshuf_h5filter.o bitshuffle.o bitshuffle_core.o lz4.o bshuf_h5plugin.o iochain.o \ - $(HDF5SOLIBS_LOCAL) \ - $(HDF5SOLIBS_SYSTEM) -o $(SOLIB)/$(BSHUFFILTER).so; \ - rm bshuf_h5filter.o bitshuffle.o lz4.o iochain.o bshuf_h5plugin.o) - touch $(BSHUF) -endif - - -# -# Directories -# -$(CBF_PREFIX): - mkdir -p $(CBF_PREFIX) - -$(CBF_PREFIX)/lib: $(CBF_PREFIX) - mkdir -p $(CBF_PREFIX)/lib - -$(CBF_PREFIX)/bin: $(CBF_PREFIX) - mkdir -p $(CBF_PREFIX)/bin - -$(CBF_PREFIX)/include: $(CBF_PREFIX) - mkdir -p $(CBF_PREFIX)/include - -$(CBF_PREFIX)/include/cbflib: $(CBF_PREFIX)/include - mkdir -p $(CBF_PREFIX)/include/cbflib - - - -$(LIB): - mkdir -p $@ - -$(BIN): - mkdir -p $@ - -$(SOLIB): - mkdir -p $@ - -$(JCBF): - mkdir -p $@ - -$(MINICBF_TESTS): - mkdir -p $@ - -# -# Parser -# -$(SRC)/cbf_stx.c: $(SRC)/cbf.stx.y - bison $(SRC)/cbf.stx.y -o $(SRC)/cbf.stx.tab.c -d - mv $(SRC)/cbf.stx.tab.c $(SRC)/cbf_stx.c - mv $(SRC)/cbf.stx.tab.h $(INCLUDE)/cbf_stx.h - -# -# CBF library -# -$(LIB)/libcbf.a: $(SOURCE) $(HEADERS) $(COMMONDEP) $(HDF5) $(LZ4DEPS) $(BSHUFDEPS) $(REGEXDEPS) - -rm -f $@ - -rm -f *.o - mkdir -p $(LIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) \ - -DCBF_FILTER_STATIC $(LZ4FLAG) $(BSHUFFLAG) $(PYCIFRWFLAG) $(INCLUDES) $(WARNINGS) -c $(SOURCE) -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -ifneq ($(MSYS2),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(LZ4src)/h5zlz4.c -o h5zlz4.o -else - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(LZ4)/LZ4/src/H5Zlz4.c -o h5zlz4.o -endif -endif -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/iochain.c -o iochain.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o -endif - $(AR) cr $@ *.o -ifneq ($(RANLIB),) - $(RANLIB) $@ -endif - -rm -f *.o - -$(SOLIB)/libcbf.so: $(SOURCE) $(HEADERS) $(COMMONDEP) $(HDF5) $(LZ4DEPS) $(BSHUFDEPS) - -rm -f $@ - -rm -f *.o - mkdir -p $(SOLIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(LZ4FLAG) $(BSHUFFLAG) $(PYCIFRWFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(SOURCE) -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -ifneq ($(MSYS2),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(LZ4src)/h5zlz4.c -o h5zlz4.o -else - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(LZ4)/LZ4/src/H5Zlz4.c -o h5zlz4.o -endif -endif -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle..o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/iochain.c -o iochain.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o -endif - - $(CC) -o $@ *.o $(SOLDFLAGS) $(EXTRALIBS) $(REGEX_LIBS) $(HDF5SOLIBS_LOCAL) $(HDF5SOLIBS_SYSTEM) - -rm -f *.o - -# -# IMG library -# -$(LIB)/libimg.a: $(SRC)/img.c $(HEADERS) $(COMMONDEP) - mkdir -p $(LIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) -c $(SRC)/img.c - $(AR) cr $@ img.o -ifneq ($(RANLIB),) - $(RANLIB) $@ -endif - rm img.o - -$(SOLIB)/libimg.so: $(SOURCE) $(HEADERS) $(COMMONDEP) - -rm -f $@ - mkdir -p $(SOLIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(SRC)/img.c - $(CC) -o $@ img.o $(SOLDFLAGS) - rm img.o - -# -# CBF and IMG libraries -# -CBF_IMG_LIBS: $(LIB)/libcbf.a $(LIB)/libimg.a - - -# -# FCB library -# -$(LIB)/libfcb.a: $(F90SOURCE) $(COMMONDEP) $(HDF5) - mkdir -p $(LIB) -ifneq ($(F90C),) - $(F90C) $(F90FLAGS) -c $(F90SOURCE) - $(AR) cr $@ *.o -ifneq ($(RANLIB),) - $(RANLIB) $@ -endif - rm *.o -else - echo "Define F90C to build $(LIB)/libfcb.a" -endif - -$(SOLIB)/libfcb.so: $(F90SOURCE) $(HEADERS) $(COMMONDEP) $(SOLIB) -ifneq ($(F90C),) - -rm -f $@ - mkdir -p $(SOLIB) - $(F90C) $(F90FLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(F90SOURCE) - $(F90C) $(F90FLAGS) -o $@ *.o $(SOLDFLAGS) - rm *.o -else - echo "Define F90C to build $(SOLIB)/libfcb.so" -endif - - -# -# Python bindings -# -$(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ - $(PYCBF)/$(SETUP_PY) \ - $(PYCBF)/pycbf.i \ - $(PYCBF)/cbfhandlewrappers.i \ - $(PYCBF)/cbfdetectorwrappers.i \ - $(PYCBF)/cbfgenericwrappers.i \ - $(PYCBF)/cbfgoniometerwrappers.i - -cp $(SOLIB)/*.so $(LIB) - (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) - -$(PYCBF)/pycbfinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --prefix=$(CBF_PREFIX)) - -$(PYCBF)/pycbfuserinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --user) - -$(PYCBF)/setup.py: $(M4)/setup_py.m4 - (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ - -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) - -$(PYCBF)/setup_MINGW.py: m4/setup_py.m4 - (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ - -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) - -$(LIB)/_pycbf.$(PYCBFEXT): $(PYCBF)/_pycbf.$(PYCBFEXT) - mkdir -p $(LIB) - cp $(PYCBF)/_pycbf.$(PYCBFEXT) $(LIB)/_pycbf.$(PYCBFEXT) - -$(PYCBF)/pycbf.pdf: $(PYCBF)/pycbf.w - (cd $(PYCBF); \ - $(NUWEB) pycbf; \ - latex pycbf; \ - $(NUWEB) pycbf; \ - latex pycbf; \ - dvipdfm pycbf ) - -$(PYCBF)/CBFlib.txt: $(DOC)/CBFlib.html - links -dump $(DOC)/CBFlib.html > $(PYCBF)/CBFlib.txt - -$(PYCBF)/cbfhandlewrappers.i \ -$(PYCBF)/cbfdetectorwrappers.i \ -$(PYCBF)/cbfgenericwrappers.i \ -$(PYCBF)/cbfgoniometerwrappers.i: $(PYCBF)/CBFlib.txt $(PYCBF)/make_pycbf.py - (cd $(PYCBF); $(PYTHON) make_pycbf.py; $(PYSWIG) pycbf.i; $(PYTHON) setup.py build) - - -# -# Java bindings -# -$(JCBF)/cbflib-$(VERSION).jar: $(JCBF) $(SRC)/jcbf.i - $(JSWIG) -I$(INCLUDE) -package org.iucr.cbflib -outdir $(JCBF) -o $(JCBF)/jcbf_wrap.c $(SRC)/jcbf.i - $(JAVAC) -d . $(JCBF)/*.java - $(JAR) cf $@ org - -$(SOLIB)/libcbf_wrap.so: $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf.so - mkdir -p $(SOLIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) $(JAVAINCLUDES) -c $(JCBF)/jcbf_wrap.c - $(CC) -o $@ jcbf_wrap.o $(SOLDFLAGS) -L$(SOLIB) -lcbf $(REGEX_LIBS) - rm jcbf_wrap.o - -# -# F90SOURCE -# -$(SRC)/fcb_exit_binary.f90: $(M4)/fcb_exit_binary.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_exit_binary.m4) > $(SRC)/fcb_exit_binary.f90 -$(SRC)/fcb_next_binary.f90: $(M4)/fcb_next_binary.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_next_binary.m4) > $(SRC)/fcb_next_binary.f90 -$(SRC)/fcb_open_cifin.f90: $(M4)/fcb_open_cifin.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_open_cifin.m4) > $(SRC)/fcb_open_cifin.f90 -$(SRC)/fcb_packed.f90: $(M4)/fcb_packed.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_packed.m4) > $(SRC)/fcb_packed.f90 -$(SRC)/fcb_read_bits.f90: $(M4)/fcb_read_bits.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_read_bits.m4) > $(SRC)/fcb_read_bits.f90 -$(SRC)/fcb_read_image.f90: $(M4)/fcb_read_image.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_read_image.m4) > $(SRC)/fcb_read_image.f90 -$(SRC)/fcb_read_xds_i2.f90: $(M4)/fcb_read_xds_i2.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_read_xds_i2.m4) > $(SRC)/fcb_read_xds_i2.f90 -$(EXAMPLES)/test_fcb_read_image.f90: $(M4)/test_fcb_read_image.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) test_fcb_read_image.m4) > $(EXAMPLES)/test_fcb_read_image.f90 -$(EXAMPLES)/test_xds_binary.f90: $(M4)/test_xds_binary.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) test_xds_binary.m4) > $(EXAMPLES)/test_xds_binary.f90 - -# -# convert_image example program -# -$(BIN)/convert_image: $(LIB)/libcbf.a $(EXAMPLES)/convert_image.c $(SRC)/img.c \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/convert_image.c $(SRC)/img.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ -# -# convert_minicbf example program -# -$(BIN)/convert_minicbf: $(LIB)/libcbf.a $(EXAMPLES)/convert_minicbf.c \ - $(GOPTLIB) $(GOPTINC) $(EXAMPLES)/batch_convert_minicbf.sh - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/convert_minicbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - chmod 755 $(EXAMPLES)/batch_convert_minicbf.sh - -# -# makecbf example program -# -$(BIN)/makecbf: $(LIB)/libcbf.a $(EXAMPLES)/makecbf.c $(LIB)/libimg.a - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/makecbf.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - - -# -# adscimg2cbf example program -# -$(BIN)/adscimg2cbf: $(LIB)/libcbf.a $(EXAMPLES)/adscimg2cbf.c $(EXAMPLES)/adscimg2cbf_sub.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/adscimg2cbf.c $(EXAMPLES)/adscimg2cbf_sub.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# cbf2adscimg example program -# -$(BIN)/cbf2adscimg: $(LIB)/libcbf.a $(EXAMPLES)/cbf2adscimg.c $(EXAMPLES)/cbf2adscimg_sub.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf2adscimg.c $(EXAMPLES)/cbf2adscimg_sub.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# cbf_standardize_numbers example program -# -$(BIN)/cbf_standardize_numbers: $(EXAMPLES)/cbf_standardize_numbers.c $(EXAMPLES)/cbf_standardize_numbers.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf_standardize_numbers.c $(SRC_FGETLN) $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@ - -# -# changtestcompression example program -# -$(BIN)/changtestcompression: $(LIB)/libcbf.a $(EXAMPLES)/changtestcompression.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/changtestcompression.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# img2cif example program -# -$(BIN)/img2cif: $(LIB)/libcbf.a $(EXAMPLES)/img2cif.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOTPINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/img2cif.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# cif2cbf example program -# -$(BIN)/cif2cbf: $(LIB)/libcbf.a $(EXAMPLES)/cif2cbf.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cif2cbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# cbf2nexus example program -# -$(BIN)/cbf2nexus: $(LIB)/libcbf.a $(EXAMPLES)/cbf2nexus.c \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf2nexus.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) \ - -lhdf5 -limg -o $@ - -# -# minicbf2nexus example program -# -$(BIN)/minicbf2nexus: $(LIB)/libcbf.a $(EXAMPLES)/minicbf2nexus.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/minicbf2nexus.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# nexus2cbf example program -# -$(BIN)/nexus2cbf: $(LIB)/libcbf.a $(EXAMPLES)/nexus2cbf.c \ - $(GOPTLIB) $(GOPTINC) $(REGEX) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/nexus2cbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# roi_peaksearch example program -# -$(BIN)/roi_peaksearch: $(LIB)/libcbf.a $(EXAMPLES)/roi_peaksearch.c \ - $(EXAMPLES)/dps_peaksearch.c $(EXAMPLES)/dps_peaksearch.h $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/roi_peaksearch.c $(EXAMPLES)/dps_peaksearch.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - - -# -# dectris cbf_template_t program -# -$(BIN)/cbf_template_t: $(DECTRIS_EXAMPLES)/cbf_template_t.c \ - $(DECTRIS_EXAMPLES)/mx_cbf_t_extras.h \ - $(DECTRIS_EXAMPLES)/mx_parms.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -I $(DECTRIS_EXAMPLES) $(WARNINGS) \ - $(DECTRIS_EXAMPLES)/cbf_template_t.c -o $@ - -# -# testcell example program -# -$(BIN)/testcell: $(LIB)/libcbf.a $(EXAMPLES)/testcell.C - mkdir -p $(BIN) - $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testcell.C -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# cif2c example program -# -$(BIN)/cif2c: $(LIB)/libcbf.a $(EXAMPLES)/cif2c.c - mkdir -p $(BIN) - $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cif2c.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# sauter_test example program -# -$(BIN)/sauter_test: $(LIB)/libcbf.a $(EXAMPLES)/sauter_test.C - mkdir -p $(BIN) - $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/sauter_test.C -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# sequence_match example program -# -$(BIN)/sequence_match: $(LIB)/libcbf.a $(EXAMPLES)/sequence_match.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/sequence_match.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# tiff2cbf example program -# -$(BIN)/tiff2cbf: $(LIB)/libcbf.a $(EXAMPLES)/tiff2cbf.c \ - $(GOPTLIB) $(GOPTINC) $(TIFF) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - -I$(TIFF)/libtiff $(EXAMPLES)/tiff2cbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf -L$(TIFF_PREFIX)/lib -ltiff $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# Andy Arvai's buffered read test program -# -$(BIN)/arvai_test: $(LIB)/libcbf.a $(EXAMPLES)/arvai_test.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/arvai_test.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# testreals example program -# -$(BIN)/testreals: $(LIB)/libcbf.a $(EXAMPLES)/testreals.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testreals.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# testflat example program -# -$(BIN)/testflat: $(LIB)/libcbf.a $(EXAMPLES)/testflat.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testflat.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ -# -# testflatpacked example program -# -$(BIN)/testflatpacked: $(LIB)/libcbf.a $(EXAMPLES)/testflatpacked.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testflatpacked.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -ifneq ($(F90C),) -# -# test_xds_binary example program -# -$(BIN)/test_xds_binary: $(LIB)/libfcb.a $(EXAMPLES)/test_xds_binary.f90 - mkdir -p $(BIN) - $(F90C) $(F90FLAGS) $(F90LDFLAGS) $(EXAMPLES)/test_xds_binary.f90 \ - -L$(LIB) -lfcb -o $@ - -# -# test_fcb_read_image example program -# -$(BIN)/test_fcb_read_image: $(LIB)/libfcb.a $(EXAMPLES)/test_fcb_read_image.f90 - mkdir -p $(BIN) - $(F90C) $(F90FLAGS) $(F90LDFLAGS) $(EXAMPLES)/test_fcb_read_image.f90 \ - -L$(LIB) -lfcb -o $@ -endif - -# -# testcbf (C) -# -$(BIN)/ctestcbf: $(EXAMPLES)/testcbf.c $(LIB)/libcbf.a - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testcbf.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# testcbf (Java) -# -$(BIN)/testcbf.class: $(EXAMPLES)/testcbf.java $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so - mkdir -p $(BIN) - $(JAVAC) -cp $(JCBF)/cbflib-$(VERSION).jar -d $(BIN) $(EXAMPLES)/testcbf.java - -ifneq ($(CBF_USE_ULP),) -# -# testulp test program -# -$(BIN)/testulp: $(LIB)/libcbf.a $(EXAMPLES)/testulp.c $(EXAMPLES)/unittest.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/testulp.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ -endif - -# -# testhdf5 test program -# -$(BIN)/testhdf5: $(LIB)/libcbf.a $(EXAMPLES)/testhdf5.c $(EXAMPLES)/unittest.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/testhdf5.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) \ - -o $@.tmp - mv $@.tmp $@ - -# -# testalloc test program -# -$(BIN)/testalloc: $(LIB)/libcbf.a $(EXAMPLES)/testalloc.c $(EXAMPLES)/unittest.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/testalloc.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ - -# -# test_cbf_airy_disk test program -# -$(BIN)/test_cbf_airy_disk: $(LIB)/libcbf.a $(EXAMPLES)/test_cbf_airy_disk.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/test_cbf_airy_disk.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ - -# -# cbf_testxfelread: test program -# -$(BIN)/cbf_testxfelread: $(LIB)/libcbf.a $(EXAMPLES)/cbf_testxfelread.c $(EXAMPLES)/cbf_testxfelread.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf_testxfelread.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ - -# -# Data files for tests -# - -$(DATADIRI): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLI)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Input.tar.gz) - touch $(DATADIRI) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Input.tar.gz) - -$(DATADIRO): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLO)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output.tar.gz) - touch $(DATADIRO) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output.tar.gz) - -$(DATADIRS): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLS)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - touch $(DATADIRS) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - - -# Input Data Files - -TESTINPUT_BASIC = example.mar2300 -DATADIRI_INPUT_BASIC = $(DATADIRI)/example.mar2300 - - -TESTINPUT_EXTRA = \ - 1191_00005.cbf \ - 9ins.cif \ - hit-20140306005258847.cbf \ - insulin_pilatus6m.cbf \ - mb_LP_1_001.img \ - testflatin.cbf \ - testflatpackedin.cbf \ - testrealin.cbf \ - thaumatin_die_M1S5_1_0005_2.cbf \ - X4_lots_M1S4_1_0001.cbf \ - X4_lots_M1S4_1_0002.cbf \ - X4_lots_M1S4_1_0003.cbf \ - X4_lots_M1S4_1_0004.cbf \ - X4_lots_M1S4_1_0005.cbf \ - XRD1621.tif - - - -DATADIRI_INPUT_EXTRA = \ - $(DATADIRI)/1191_00005.cbf \ - $(DATADIRI)/9ins.cif \ - $(DATADIRI)/hit-20140306005258847.cbf \ - $(DATADIRI)/insulin_pilatus6m.cbf \ - $(DATADIRI)/mb_LP_1_001.img \ - $(DATADIRI)/testflatin.cbf \ - $(DATADIRI)/testflatpackedin.cbf \ - $(DATADIRI)/testrealin.cbf \ - $(DATADIRI)/thaumatin_die_M1S5_1_0005_2.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0001.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0002.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0003.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0004.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0005.cbf \ - $(DATADIRI)/XRD1621.tif - - -# Output Data Files - -TESTOUTPUT = adscconverted_flat_orig.cbf \ - adscconverted_orig.cbf converted_flat_orig.cbf converted_orig.cbf \ - insulin_pilatus6mconverted_orig.cbf.h5.cbf \ - insulin_pilatus6mconverted_orig.cbf.h5 \ - insulin_pilatus6mconverted_v2_orig.cbf \ - mb_LP_1_001_orig.cbf testcell_orig.prt \ - test_xds_bin_testflatout_orig.out \ - test_xds_bin_testflatpackedout_orig.out test_fcb_read_testflatout_orig.out \ - test_fcb_read_testflatpackedout_orig.out \ - XRD1621_orig.cbf XRD1621_I4encbC100_orig.cbf \ - minicbf_orig.h5 -NEWTESTOUTPUT = adscconverted_flat.cbf \ - adscconverted.cbf converted_flat.cbf converted.cbf \ - insulin_pilatus6mconverted.cbf \ - insulin_pilatus6mconverted.cbf.h5 \ - insulin_pilatus6mconverted.cbf.h5.cbf \ - insulin_pilatus6mconverted_v2.cbf \ - mb_LP_1_001.cbf testcell.prt \ - test_xds_bin_testflatout.out \ - test_xds_bin_testflatpackedout.out test_fcb_read_testflatout.out \ - test_fcb_read_testflatpackedout.out \ - XRD1621.cbf XRD1621_I4encbC100.cbf \ - $(MINICBF_TEST)/minicbf.h5 -DATADIRO_OUTPUT = $(DATADIRO)/adscconverted_flat_orig.cbf \ - $(DATADIRO)/adscconverted_orig.cbf \ - $(DATADIRO)/converted_flat_orig.cbf \ - $(DATADIRO)/converted_orig.cbf \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5 \ - $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf \ - $(DATADIRO)/mb_LP_1_001_orig.cbf \ - $(DATADIRO)/testcell_orig.prt \ - $(DATADIRO)/test_xds_bin_testflatout_orig.out \ - $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out \ - $(DATADIRO)/test_fcb_read_testflatout_orig.out \ - $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out \ - $(DATADIRO)/XRD1621_orig.cbf \ - $(DATADIRO)/XRD1621_I4encbC100_orig.cbf \ - $(DATADIRO)/minicbf_orig.h5 -DATADIRO_OUTPUT_SIGNATURES = $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) \ - $(DATADIRO)/adscconverted_orig.cbf$(SEXT) \ - $(DATADIRO)/converted_flat_orig.cbf$(SEXT) \ - $(DATADIRO)/converted_orig.cbf$(SEXT) \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ - $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ - $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) \ - $(DATADIRO)/testcell_orig.prt$(SEXT) \ - $(DATADIRO)/test_xds_bin_testflatout_orig.out$(SEXT) \ - $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRO)/test_fcb_read_testflatout_orig.out$(SEXT) \ - $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRO)/XRD1621_orig.cbf$(SEXT) \ - $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) \ - $(DATADIRO)/minicbf_orig.h5$(SEXT) - - - -# Output Data File Signatures - -TESTOUTPUTSIGS = adscconverted_flat_orig.cbf$(SEXT) \ - adscconverted_orig.cbf$(SEXT) converted_flat_orig.cbf$(SEXT) converted_orig.cbf$(SEXT) \ - insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ - insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ - insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ - mb_LP_1_001_orig.cbf$(SEXT) testcell_orig.prt$(SEXT) \ - test_xds_bin_testflatout_orig.out$(SEXT) \ - test_xds_bin_testflatpackedout_orig.out$(SEXT) test_fcb_read_testflatout_orig.out$(SEXT) \ - test_fcb_read_testflatpackedout_orig.out$(SEXT) \ - XRD1621_orig.cbf$(SEXT) \ - XRD1621_I4encbC100_orig.cbf$(SEXT) \ - minicbf_orig.h5$(SEXT) -DATADIRS_OUTPUT_SIGNATURES = $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) \ - $(DATADIRS)/adscconverted_orig.cbf$(SEXT) \ - $(DATADIRS)/converted_flat_orig.cbf$(SEXT) \ - $(DATADIRS)/converted_orig.cbf$(SEXT) \ - $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ - $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ - $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ - $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) \ - $(DATADIRS)/testcell_orig.prt$(SEXT) \ - $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) \ - $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) \ - $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRS)/XRD1621_orig.cbf$(SEXT) \ - $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) \ - $(DATADIRS)/minicbf_orig.h5$(SEXT) - -# Fetch Input Data Files - -$(TESTINPUT_BASIC): $(DATADIRI) $(DATADIRI_INPUT_BASIC) - cp $(DATADIRI)/$@ $@ - cp $(DATADIRI)/$@$(SEXT) $@$(SEXT) - -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) - -$(TESTINPUT_EXTRA): $(DATADIRI) $(DATADIRI_INPUT_EXTRA) - cp $(DATADIRI)/$@ $@ - cp $(DATADIRI)/$@$(SEXT) $@$(SEXT) - -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) - - -# Fetch Output Data Files and Signatures - -$(TESTOUTPUT): $(DATADIRO) $(DATADIRO_OUTPUT) $(DATADIRO_OUTPUT_SIGNATURES) - cp $(DATADIRO)/$@ $@ - cp $(DATADIRO)/$@$(SEXT) $@$(SEXT) - -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) - -# Fetch Output Data File Signatures - -$(TESTOUTPUTSIGS): $(DATADIRS) $(DATADIRS_OUTPUT_SIGNATURES) - cp $(DATADIRS)/$@ $@ - - - -# -# Tests -# - - -tests: all $(LIB) $(BIN) symlinksdone basic extra dectristests pycbftests -tests_sigs_only: $(LIB) $(BIN) symlinksdone basic extra_sigs_only -restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 - $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < adscconverted.cbf > $(DATADIRO)/adscconverted_orig.cbf$(SEXT) - $(SIGNATURE) < converted_flat.cbf > $(DATADIRO)/converted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < converted.cbf > $(DATADIRO)/converted_orig.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5 > $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5.cbf > $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) - $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) - $(SIGNATURE) < testcell.prt > $(DATADIRO)/testcell_orig.prt$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRO)/test_xds_bin_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRO)/test_fcb_read_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < XRD1621.cbf > $(DATADIRO)/XRD1621_orig.cbf$(SEXT) - $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) - $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRO)/minicbf_orig.h5$(SEXT) - cp adscconverted_flat.cbf $(DATADIRO)/adscconverted_flat_orig.cbf$ - cp adscconverted.cbf $(DATADIRO)/adscconverted_orig.cbf - cp converted_flat.cbf $(DATADIRO)/converted_flat_orig.cbf - cp converted.cbf $(DATADIRO)/converted_orig.cbf - cp insulin_pilatus6mconverted.cbf.h5 $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5 - cp insulin_pilatus6mconverted.cbf.h5.cbf $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf - cp insulin_pilatus6mconverted_v2.cbf $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf - cp mb_LP_1_001.cbf$ $(DATADIRO)/mb_LP_1_001_orig.cbf - cp testcell.prt $(DATADIRO)/testcell_orig.prt - cp test_xds_bin_testflatout.out $(DATADIRO)/test_xds_bin_testflatout_orig.out - cp test_xds_bin_testflatpackedout.out $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out - cp test_fcb_read_testflatout.out $(DATADIRO)/test_fcb_read_testflatout_orig.out - cp test_fcb_read_testflatpackedout.out $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out - cp XRD1621.cbf $(DATADIRO)/XRD1621_orig.cbf - cp XRD1621_I4encbC100.cbf $(DATADIRO)/XRD1621_I4encbC100_orig.cbf - cp $(MINICBF_TEST)/minicbf.h5 $(DATADIRO)/minicbf_orig.h5 - -restore_sigs_only: $(NEWTESTOUTPUT) $(DATADIRS) - $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < adscconverted.cbf > $(DATADIRS)/adscconverted_orig.cbf$(SEXT) - $(SIGNATURE) < converted_flat.cbf > $(DATADIRS)/converted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < converted.cbf > $(DATADIRS)/converted_orig.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5 > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5.cbf > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) - $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) - $(SIGNATURE) < testcell.prt > $(DATADIRS)/testcell_orig.prt$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < XRD1621.cbf > $(DATADIRS)/XRD1621_orig.cbf$(SEXT) - $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) - $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRS)/minicbf_orig.h5$(SEXT) -restore_signatures: restore_output restore_sigs_only - -# -# Basic Tests -# - -basic: $(BIN)/makecbf $(BIN)/img2cif $(BIN)/cif2cbf $(TESTINPUT_BASIC) - $(LDPREFIX) $(BIN)/makecbf example.mar2300 makecbf.cbf - $(LDPREFIX) $(BIN)/img2cif -c flatpacked -m headers -d digest \ - -e base64 example.mar2300 img2cif_packed.cif - $(LDPREFIX) $(BIN)/img2cif -c canonical -m headers -d digest \ - -e base64 example.mar2300 img2cif_canonical.cif - $(LDPREFIX) $(BIN)/img2cif -c flatpacked -m headers -d digest \ - -e none example.mar2300 img2cif_packed.cbf - $(LDPREFIX) $(BIN)/img2cif -c canonical -m headers -d digest \ - -e none example.mar2300 img2cif_canonical.cbf - $(LDPREFIX) $(BIN)/cif2cbf -e none -c flatpacked \ - img2cif_canonical.cif cif2cbf_packed.cbf - $(LDPREFIX) $(BIN)/cif2cbf -e none -c canonical \ - img2cif_packed.cif cif2cbf_canonical.cbf - -cmp cif2cbf_packed.cbf makecbf.cbf - -cmp cif2cbf_packed.cbf img2cif_packed.cbf - -cmp cif2cbf_canonical.cbf img2cif_canonical.cbf - - -# -# Extra Tests -# -$(MINICBF_TEST)/minicbf.h5: - cd $(MINICBF_TEST); $(LDPREFIX) $(TIME) $(BIN)/minicbf2nexus -c zlib \ - -C config $(HDF5REGISTER) -o minicbf.h5 ../X4_lots_M1S4_1_*.cbf -mb_LP_1_001.cbf: - $(LDPREFIX) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - - - -ifneq ($(F90C),) -extra: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf \ - $(BIN)/minicbf2nexus $(BIN)/cbf2nexus $(BIN)/nexus2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf \ - $(BIN)/testhdf5 $(BIN)/testalloc \ - $(BIN_TESTULP) \ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUT) $(EXAMPLES)/batch_convert_minicbf.sh \ - $(TEMPLATES)/template_X4_lots_M1S4.cbf -else -extra: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf \ - $(BIN)/minicbf2nexus $(BIN)/cbf2nexus $(BIN)/nexus2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf $(BIN)/cbf2adscimg \ - $(BIN)/testhdf5 $(BIN)/testalloc \ - $(BIN_TESTULP) \ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUT) $(EXAMPLES)/batch_convert_minicbf.sh -endif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e hex -c none \ - makecbf.cbf cif2cbf_ehcn.cif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ - cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf -F example.mar2300 converted_flat.cbf - -cmp converted_flat.cbf converted_flat_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf example.mar2300 converted.cbf - -cmp converted.cbf converted_orig.cbf - -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat > testcell.prt - -cmp testcell.prt testcell_orig.prt - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -cmp adscconverted_flat.cbf adscconverted_flat_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -cmp adscconverted.cbf adscconverted_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -cmp mb_LP_1_001.cbf mb_LP_1_001_orig.cbf -ifneq ($(CLEANTESTS),) - mv mb_LP_1_001.cbf nmb_LP_1_001.cbf -else - cp mb_LP_1_001.cbf nmb_LP_1_001.cbf -endif - $(LDPREFIX) $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf - -cmp nmb_LP_1_001.img mb_LP_1_001.img - rm nmb_LP_1_001.cbf -ifneq ($(CLEANTESTS),) - rm nmb_LP_1_001.img -endif - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -cmp insulin_pilatus6mconverted.cbf insulin_pilatus6mconverted_rev_orig.cbf - -$(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -cmp insulin_pilatus6mconverted_v2.cbf insulin_pilatus6mconverted_v2_orig.cbf - (CBF_CONVERT_MINICBF_PATH=$(BIN); export CBF_CONVERT_MINICBF_PATH; \ - $(LDPREFIX) $(EXAMPLES)/batch_convert_minicbf.sh "." "minicbf_test" \ - "X4_lots_M1S4_1_*.cbf" $(TEMPLATES)/template_X4_lots_M1S4.cbf) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w -O $(HDF5REGISTER) -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encI.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encp.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cb -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encb.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cc -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encc.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cz -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encz.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cl -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encl.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -c2 -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(H5DUMP) insulin_pilatus6mconverted_orig.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted_orig.cbf.h5.dump) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(H5DUMP) insulin_pilatus6mconverted.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted.cbf.h5.dump) - -$(DIFF) insulin_pilatus6mconverted_orig.cbf.h5.dump insulin_pilatus6mconverted.cbf.h5.dump - -rm -f insulin_pilatus6mconverted_orig.cbf.h5.dump - -rm -f insulin_pilatus6mconverted.cbf.h5.dump - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_orig.cbf.h5.cbf -o insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf.h5 -o insulin_pilatus6mconverted.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted.cbf.h5.cbf -o insulin_pilatus6mconverted.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encp.cbf.h5 -o insulin_pilatus6mconverted_encp.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encp.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encb.cbf.h5 -o insulin_pilatus6mconverted_encb.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encb.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encI.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encI.cbf.h5.cbf -o insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encc.cbf.h5 -o insulin_pilatus6mconverted_encc.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encc.cbf.h5.cbf -o insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encz.cbf.h5 -o insulin_pilatus6mconverted_encz.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encz.cbf.h5.cbf -o insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encl.cbf.h5 -o insulin_pilatus6mconverted_encl.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encl.cbf.h5.cbf -o insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_enc2.cbf.h5 -o insulin_pilatus6mconverted_enc2.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_enc2.cbf.h5.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -rm -f insulin_pilatus6mconverted*.cbf.h5.eqcI.cbf - $(LDPREFIX) $(TINE) $(BIN)/test_cbf_airy_disk - $(LDPREFIX) $(TIME) $(BIN)/cbf_testxfelread - $(LDPREFIX) $(TIME) $(BIN)/testalloc - $(LDPREFIX) $(TIME) $(BIN)/testhdf5; rm -f testfile.h5 -ifneq ($(CBF_USE_ULP),) - $(LDPREFIX) $(TIME) $(BIN)/testulp -endif - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/minicbf2nexus -c zlib \ - -C config $(HDF5REGISTER) -o minicbf.h5 ../X4_lots_M1S4_1_*.cbf - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) ../minicbf_orig.h5 | $(ALLBUTONE) > minicbf_original.dump - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) minicbf.h5 | $(ALLBUTONE) > minicbf.dump - -cd $(MINICBF_TEST); $(DIFF) minicbf_original.dump minicbf.dump - $(LDPREFIX) cd $(MINICBF_TEST); rm -f minicbf_original.dump - $(LDPREFIX) cd $(MINICBF_TEST); rm -f minicbf.dump - #cd $(MINICBF_TEST); rm -f minicbf.h5 - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/cbf2nexus -c zlib \ - --list -o i19-1.h5 ../1191_00005.cbf - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/nexus2cbf \ - -o i19-1.cbf i19-1.h5 - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/cbf2nexus -c zlib \ - --list -o i19-2.h5 i19-1.cbf - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/nexus2cbf \ - -o i19-2.cbf i19-2.h5 - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) i19-1.h5 | $(ALLBUTONE) > i19-1.dump - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) i19-2.h5 | $(ALLBUTONE) > i19-2.dump - -cd $(MINICBF_TEST); $(DIFF) i19-1.dump i19-2.dump - -cd $(MINICBF_TEST); $(DIFF) i19-1.cbf i19-2.cbf - $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf -ifneq ($(F90C),) - $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatout.out) - -$(DIFF) test_xds_bin_testflatout.out test_xds_bin_testflatout_orig.out - $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatpackedout.out) - -$(DIFF) test_xds_bin_testflatpackedout.out test_xds_bin_testflatpackedout_orig.out - $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatout.out) - -$(DIFF) test_fcb_read_testflatout.out test_fcb_read_testflatout_orig.out - $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatpackedout.out) - -$(DIFF) test_fcb_read_testflatpackedout.out test_fcb_read_testflatpackedout_orig.out -endif - $(LDPREFIX) $(TIME) $(BIN)/sauter_test - $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - -$(DIFF) XRD1621.cbf XRD1621_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(DIFF) XRD1621_I4encbC100.cbf XRD1621_I4encbC100_orig.cbf - -ifneq ($(F90C),) -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf \ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -else -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf\ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -endif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e hex -c none \ - makecbf.cbf cif2cbf_ehcn.cif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ - cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F example.mar2300 converted_flat.cbf - -$(SIGNATURE) < converted_flat.cbf | $(DIFF) - converted_flat_orig.cbf$(SEXT); rm converted_flat.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image example.mar2300 converted.cbf - -$(SIGNATURE) < converted.cbf | $(DIFF) - converted_orig.cbf$(SEXT); rm converted.cbf - -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat | \ - $(SIGNATURE) | $(DIFF) - testcell_orig.prt$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -$(SIGNATURE) < adscconverted_flat.cbf | $(DIFF) - adscconverted_flat_orig.cbf$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -$(SIGNATURE) < adscconverted.cbf | $(DIFF) - adscconverted_orig.cbf$(SEXT); rm adscconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -$(SIGNATURE) < mb_LP_1_001.cbf | $(DIFF) - mb_LP_1_001_orig.cbf$(SEXT) - mv mb_LP_1_001.cbf nmb_LP_1_001.cbf - $(LDPREFIX) $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf - -cmp nmb_LP_1_001.img mb_LP_1_001.img - rm nmb_LP_1_001.cbf - rm nmb_LP_1_001.img - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted.cbf | $(DIFF) - insulin_pilatus6mconverted_rev_orig.cbf$(SEXT); rm insulin_pilatus6mconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf | $(DIFF) - insulin_pilatus6mconverted_v2_orig.cbf$(SEXT); rm insulin_pilatus6mconverted_v2.cbf - $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf -ifneq ($(F90C),) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatpackedout_orig.out$(SEXT) -endif - $(LDPREFIX) $(TIME) $(BIN)/sauter_test - $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(SIGNATURE) < XRD1621.cbf | $(DIFF) - XRD1621_orig.cbf$(SEXT); rm XRD1621.cbf - -$(SIGNATURE) < XRD1621_I4encbC100.cbf | $(DIFF) - XRD1621_I4encbC100_orig.cbf$(SEXT); rm XRD1621_I4encbC100.cbf - @-rm -f adscconverted_flat.cbf - @-rm -f $(TESTINPUT_BASIC) $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) - @-rm -f cif2cbf_packed.cbf makecbf.cbf \ - cif2cbf_packed.cbf img2cif_packed.cbf \ - cif2cbf_canonical.cbf img2cif_canonical.cbf - @-rm -f testrealout.cbf testflatout.cbf testflatpackedout.cbf \ - cif2cbf_encp.cbf img2cif_canonical.cif img2cif_packed.cif 9ins.cbf - - - -pycbftests: $(PYCBF)/_pycbf.$(PYCBFEXT) $(BIN)/cbf_standardize_numbers - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test1.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test2.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test3.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test4.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test1.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test2.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py ../hit-20140306005258847.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test1_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test1.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test2_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test2.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test3_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test3.out - - -pycbfinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfinstall - -pycbfuserinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfuserinstall - -javatests: $(BIN)/ctestcbf $(BIN)/testcbf.class $(SOLIB)/libcbf_wrap.so - $(LDPREFIX) $(BIN)/ctestcbf > testcbfc.txt - $(LDPREFIX) java -cp $(JCBF)/cbflib-$(VERSION).jar:$(BIN) testcbf > testcbfj.txt - $(DIFF) testcbfc.txt testcbfj.txt - -dectristests: $(BIN)/cbf_template_t $(TEMPLATES)/cbf_test_orig.out - $(LDPREFIX) (cd templates; ../bin/cbf_template_t; diff -a -u cbf_test_orig.out cbf_template_t.out) - -# -# Remove all non-source files -# -empty: - @-rm -rf $(LIB)/* - @-rm -rf $(INCLUDE)/bitshuf* - @-rm -rf $(INCLUDE)/bshuf* - @-rm -rf $(INCLUDE)/H5* - @-rm -rf $(BIN)/* - @-rm -f $(PYCBF)/_pycbf.$(PYCBFEXT) - @-rm -rf $(PYCBF)/build/* - @-rm -f $(PYCBF)/newtest1.cbf - @-rm -f $(PYCBF)/fel_test1.out - @-rm -f $(PYCBF)/fel_test2.out - @-rm -f $(PYCBF)/setup.py - @-rm -f $(PYCBF)/setup_MINGW.py - @-rm -f makecbf.cbf - @-rm -f img2cif_packed.cif - @-rm -f img2cif_canonical.cif - @-rm -f img2cif_packed.cbf - @-rm -f img2cif_canonical.cbf - @-rm -f img2cif_raw.cbf - @-rm -f cif2cbf_packed.cbf - @-rm -f cif2cbf_canonical.cbf - @-rm -f converted.cbf - @-rm -f adscconverted.cbf - @-rm -f converted_flat.cbf - @-rm -f adscconverted_flat.cbf - @-rm -f adscconverted_flat_rev.cbf - @-rm -f mb_LP_1_001.cbf - @-rm -f cif2cbf_ehcn.cif - @-rm -f cif2cbf_encp.cbf - @-rm -f 9ins.cbf - @-rm -f 9ins.cif - @-rm -f testcell.prt - @-rm -f example.mar2300 - @-rm -f converted_orig.cbf - @-rm -f adscconverted_orig.cbf - @-rm -f converted_flat_orig.cbf - @-rm -f adscconverted_flat_orig.cbf - @-rm -f adscconverted_flat_rev_orig.cbf - @-rm -f mb_LP_1_001_orig.cbf - @-rm -f insulin_pilatus6mconverted*.cbf - @-rm -f insulin_pilatus6mconverted*.h5 - @-rm -f insulin_pilatus6m.cbf - @-rm -f testrealin.cbf - @-rm -f testrealout.cbf - @-rm -f testflatin.cbf - @-rm -f testflatout.cbf - @-rm -f testflatpackedin.cbf - @-rm -f testflatpackedout.cbf - @-rm -f CTC.cbf - @-rm -f test_fcb_read_testflatout.out - @-rm -f test_fcb_read_testflatpackedout.out - @-rm -f test_xds_bin_testflatpackedout.out - @-rm -f test_xds_bin_testflatout.out - @-rm -f test_fcb_read_testflatout_orig.out - @-rm -f test_fcb_read_testflatpackedout_orig.out - @-rm -f test_xds_bin_testflatpackedout_orig.out - @-rm -f test_xds_bin_testflatout_orig.out - @-rm -f mb_LP_1_001.img - @-rm -f 9ins.cif - @-rm -f testcell_orig.prt - @-rm -f $(DECTRIS_EXAMPLES)/cbf_template_t.out - @-rm -f XRD1621.cbf - @-rm -f XRD1621_orig.cbf - @-rm -f XRD1621_I4encbC100_orig.cbf - @-rm -f XRD1621_I4encbC100.cbf - @-rm -f minicbf_orig.h5 - @-rm -f $(SRC)/fcb_exit_binary.f90 - @-rm -f $(SRC)/fcb_next_binary.f90 - @-rm -f $(SRC)/fcb_open_cifin.f90 - @-rm -f $(SRC)/fcb_packed.f90 - @-rm -f $(SRC)/fcb_read_bits.f90 - @-rm -f $(SRC)/fcb_read_image.f90 - @-rm -f $(SRC)/fcb_read_xds_i2.f90 - @-rm -f $(EXAMPLES)/test_fcb_read_image.f90 - @-rm -f $(EXAMPLES)/test_xds_binary.f90 - @-rm -f symlinksdone - @-rm -f $(TESTOUTPUT) *$(SEXT) - @-rm -rf $(SOLIB) - @-rm -rf org - @-rm -rf $(JCBF) - @-rm -rf $(REGEX) - @-rm -rf $(REGEX)_install - @-rm -rf $(TIFF) - @-rm -rf $(TIFF)_install - @-rm -rf $(HDF5) - @-rm -rf $(HDF5)_install - @-rm -rf $(INCLUDE)/tiff* - @-rm -rf $(INCLUDE)/H5* - @-rm -rf $(INCLUDE)/hdf5* - @-rm -rf share - @-rm -rf $(MINICBF_TEST)/i19* - @-rm -rf solib - @-rm -f thaumatin_die_M1S5_1_0005_2.cbf - @-rm -f 1191_00005.cbf - @-rm -f XRD1621.tif - @-rm -f md5tmp - @-rm -rf $(PYCBF)/build - @-rm -f *_old - @-rm -f X4_lots_M1S4_1_*.cbf - @-rm -f testfile.h5 - @-rm -f hit-20140306005258847.cbf - @-rm -f build_* - ./.undosymlinks - -# -# Remove temporary files -# -clean: - @-rm -f core - @-rm -f *.o - @-rm -f *.u -# -# Restore to distribution state -# -distclean: clean empty - -# -# Create a Tape Archive for distribution -# - -tar: $(DOCUMENTS) $(SOURCE) $(SRC)/cbf.stx $(HEADERS) $(M4FILES)\ - $(EXAMPLES) \ - README.html README Makefile \ - $(JPEGS) - -/bin/rm -f CBFlib.tar* - tar cvBf CBFlib.tar \ - $(DOCUMENTS) $(SOURCE) $(SRC)/cbf.stx $(HEADERS) $(M4FILES)\ - $(EXAMPLES) \ - README.html README Makefile \ - $(JPEGS) - gzip --best CBFlib.tar - diff --git a/Makefile_LINUX_gcc42_DMALLOC b/Makefile_LINUX_gcc42_DMALLOC deleted file mode 100644 index dc3642e0..00000000 --- a/Makefile_LINUX_gcc42_DMALLOC +++ /dev/null @@ -1,2642 +0,0 @@ - -###################################################################### -# Makefile - command file for make to create CBFlib # -# # -# Version 0.9.6 19 May 2020 # -# # -# Paul Ellis and # -# Herbert J. Bernstein (yaya@bernstein-plus-sons.com) # -# # -# (C) Copyright 2006 - 2020 Herbert J. Bernstein # -# # -###################################################################### - -###################################################################### -# # -# YOU MAY REDISTRIBUTE THE CBFLIB PACKAGE UNDER THE TERMS OF THE GPL # -# # -# ALTERNATIVELY YOU MAY REDISTRIBUTE THE CBFLIB API UNDER THE TERMS # -# OF THE LGPL # -# # -###################################################################### - -########################### GPL NOTICES ############################## -# # -# This program is free software; you can redistribute it and/or # -# modify it under the terms of the GNU General Public License as # -# published by the Free Software Foundation; either version 2 of # -# (the License, or (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program; if not, write to the Free Software # -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # -# 02111-1307 USA # -# # -###################################################################### - -######################### LGPL NOTICES ############################### -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of the GNU Lesser General Public # -# License as published by the Free Software Foundation; either # -# version 2.1 of the License, or (at your option) any later version. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # -# Lesser General Public License for more details. # -# # -# You should have received a copy of the GNU Lesser General Public # -# License along with this library; if not, write to the Free # -# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # -# MA 02110-1301 USA # -# # -###################################################################### - -###################################################################### -# # -# Stanford University Notices # -# for the CBFlib software package that incorporates SLAC software # -# on which copyright is disclaimed # -# # -# This software # -# ------------- # -# The term "this software", as used in these Notices, refers to # -# those portions of the software package CBFlib that were created by # -# employees of the Stanford Linear Accelerator Center, Stanford # -# University. # -# # -# Stanford disclaimer of copyright # -# -------------------------------- # -# Stanford University, owner of the copyright, hereby disclaims its # -# copyright and all other rights in this software. Hence, anyone # -# may freely use it for any purpose without restriction. # -# # -# Acknowledgement of sponsorship # -# ------------------------------ # -# This software was produced by the Stanford Linear Accelerator # -# Center, Stanford University, under Contract DE-AC03-76SFO0515 with # -# the Department of Energy. # -# # -# Government disclaimer of liability # -# ---------------------------------- # -# Neither the United States nor the United States Department of # -# Energy, nor any of their employees, makes any warranty, express or # -# implied, or assumes any legal liability or responsibility for the # -# accuracy, completeness, or usefulness of any data, apparatus, # -# product, or process disclosed, or represents that its use would # -# not infringe privately owned rights. # -# # -# Stanford disclaimer of liability # -# -------------------------------- # -# Stanford University makes no representations or warranties, # -# express or implied, nor assumes any liability for the use of this # -# software. # -# # -# Maintenance of notices # -# ---------------------- # -# In the interest of clarity regarding the origin and status of this # -# software, this and all the preceding Stanford University notices # -# are to remain affixed to any copy or derivative of this software # -# made or distributed by the recipient and are to be affixed to any # -# copy of software made or distributed by the recipient that # -# contains a copy or derivative of this software. # -# # -# Based on SLAC Software Notices, Set 4 # -# OTT.002a, 2004 FEB 03 # -###################################################################### - - - -###################################################################### -# NOTICE # -# Creative endeavors depend on the lively exchange of ideas. There # -# are laws and customs which establish rights and responsibilities # -# for authors and the users of what authors create. This notice # -# is not intended to prevent you from using the software and # -# documents in this package, but to ensure that there are no # -# misunderstandings about terms and conditions of such use. # -# # -# Please read the following notice carefully. If you do not # -# understand any portion of this notice, please seek appropriate # -# professional legal advice before making use of the software and # -# documents included in this software package. In addition to # -# whatever other steps you may be obliged to take to respect the # -# intellectual property rights of the various parties involved, if # -# you do make use of the software and documents in this package, # -# please give credit where credit is due by citing this package, # -# its authors and the URL or other source from which you obtained # -# it, or equivalent primary references in the literature with the # -# same authors. # -# # -# Some of the software and documents included within this software # -# package are the intellectual property of various parties, and # -# placement in this package does not in any way imply that any # -# such rights have in any way been waived or diminished. # -# # -# With respect to any software or documents for which a copyright # -# exists, ALL RIGHTS ARE RESERVED TO THE OWNERS OF SUCH COPYRIGHT. # -# # -# Even though the authors of the various documents and software # -# found here have made a good faith effort to ensure that the # -# documents are correct and that the software performs according # -# to its documentation, and we would greatly appreciate hearing of # -# any problems you may encounter, the programs and documents any # -# files created by the programs are provided **AS IS** without any * -# warranty as to correctness, merchantability or fitness for any # -# particular or general use. # -# # -# THE RESPONSIBILITY FOR ANY ADVERSE CONSEQUENCES FROM THE USE OF # -# PROGRAMS OR DOCUMENTS OR ANY FILE OR FILES CREATED BY USE OF THE # -# PROGRAMS OR DOCUMENTS LIES SOLELY WITH THE USERS OF THE PROGRAMS # -# OR DOCUMENTS OR FILE OR FILES AND NOT WITH AUTHORS OF THE # -# PROGRAMS OR DOCUMENTS. # -###################################################################### - -###################################################################### -# # -# The IUCr Policy # -# for the Protection and the Promotion of the STAR File and # -# CIF Standards for Exchanging and Archiving Electronic Data # -# # -# Overview # -# # -# The Crystallographic Information File (CIF)[1] is a standard for # -# information interchange promulgated by the International Union of # -# Crystallography (IUCr). CIF (Hall, Allen & Brown, 1991) is the # -# recommended method for submitting publications to Acta # -# Crystallographica Section C and reports of crystal structure # -# determinations to other sections of Acta Crystallographica # -# and many other journals. The syntax of a CIF is a subset of the # -# more general STAR File[2] format. The CIF and STAR File approaches # -# are used increasingly in the structural sciences for data exchange # -# and archiving, and are having a significant influence on these # -# activities in other fields. # -# # -# Statement of intent # -# # -# The IUCr's interest in the STAR File is as a general data # -# interchange standard for science, and its interest in the CIF, # -# a conformant derivative of the STAR File, is as a concise data # -# exchange and archival standard for crystallography and structural # -# science. # -# # -# Protection of the standards # -# # -# To protect the STAR File and the CIF as standards for # -# interchanging and archiving electronic data, the IUCr, on behalf # -# of the scientific community, # -# # -# # holds the copyrights on the standards themselves, * -# # -# # owns the associated trademarks and service marks, and * -# # -# # holds a patent on the STAR File. * -# # -# These intellectual property rights relate solely to the # -# interchange formats, not to the data contained therein, nor to # -# the software used in the generation, access or manipulation of # -# the data. # -# # -# Promotion of the standards # -# # -# The sole requirement that the IUCr, in its protective role, # -# imposes on software purporting to process STAR File or CIF data # -# is that the following conditions be met prior to sale or # -# distribution. # -# # -# # Software claiming to read files written to either the STAR * -# File or the CIF standard must be able to extract the pertinent # -# data from a file conformant to the STAR File syntax, or the CIF # -# syntax, respectively. # -# # -# # Software claiming to write files in either the STAR File, or * -# the CIF, standard must produce files that are conformant to the # -# STAR File syntax, or the CIF syntax, respectively. # -# # -# # Software claiming to read definitions from a specific data * -# dictionary approved by the IUCr must be able to extract any # -# pertinent definition which is conformant to the dictionary # -# definition language (DDL)[3] associated with that dictionary. # -# # -# The IUCr, through its Committee on CIF Standards, will assist # -# any developer to verify that software meets these conformance # -# conditions. # -# # -# Glossary of terms # -# # -# [1] CIF: is a data file conformant to the file syntax defined # -# at http://www.iucr.org/iucr-top/cif/spec/index.html # -# # -# [2] STAR File: is a data file conformant to the file syntax # -# defined at http://www.iucr.org/iucr-top/cif/spec/star/index.html # -# # -# [3] DDL: is a language used in a data dictionary to define data # -# items in terms of "attributes". Dictionaries currently approved # -# by the IUCr, and the DDL versions used to construct these # -# dictionaries, are listed at # -# http://www.iucr.org/iucr-top/cif/spec/ddl/index.html # -# # -# Last modified: 30 September 2000 # -# # -# IUCr Policy Copyright (C) 2000 International Union of # -# Crystallography # -###################################################################### - -.DELETE_ON_ERROR: - -# Version string -VERSION = 0.9.6 - -# -# Directories -# -ROOT = $(PWD) -LIB = $(ROOT)/lib -SOLIB = $(ROOT)/solib -JCBF = $(ROOT)/jcbf -JAVADIR = $(ROOT)/java -BIN = $(ROOT)/bin -SRC = $(ROOT)/src -INCLUDE = $(ROOT)/include -M4 = $(ROOT)/m4 -PYCBF = $(ROOT)/pycbf -EXAMPLES = $(ROOT)/examples -TEMPLATES= $(ROOT)/templates -DECTRIS_EXAMPLES = $(EXAMPLES)/dectris_cbf_template_test -DOC = $(ROOT)/doc -MINICBF_TEST = $(ROOT)/minicbf_test -GRAPHICS = $(ROOT)/html_graphics -DATADIRI = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Input -DATADIRO = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output -DATADIRS = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only -CBF_PREFIX ?= $(HOME) - -# -# Comment out the next line if scratch test files should be retained -# -CLEANTESTS = yes - - -MSYS2=no -CBFLIB_DONT_USE_LOCAL_HDF5?=no -CBFLIB_DONT_USE_LZ4?=no -CBFLIB_DONT_USE_BSHUF?=no - - -CBFLIB_DONT_HAVE_FGETLN ?= yes -ifeq ($(CBFLIB_DONT_HAVE_FGETLN),yes) -SRC_FGETLN = $(SRC)/fgetln.c -else -SRC_FGETLN = -endif - - -CBFLIB_DONT_USE_PYCIFRW ?= no -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -# -# Definitions to get versions of PyCifRW and PLY -# -PYCIFRW ?= PyCifRW-4.1 -PLY = ply-3.2 -PYCIFRWFLAG = -DCBF_USE_PYCIFRW -PYCIFRW_PREFIX ?= $(HOME)/.local -endif - -# -# Definition to get a version of tifflib to support tiff2cbf -# -TIFF ?= tiff-4.0.6_rev_3Nov16 -TIFF_PREFIX ?= $(PWD) -TIFF_INSTALL = $(TIFF)_INSTALL - - -# -# Definitions to get a version of HDF5 -# - -ifneq ($(HDF5_PREFIX),) # already installed on system -CBFLIB_DONT_USE_LOCAL_HDF5 = yes -endif - -ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes) -HDF5_PREFIX ?= $(PWD) -HDF5 ?= hdf5-1.10.6 -#HDF5 = hdf5-1.8.18 -#HDF5 = hdf5-1.10.5 -HDF5dep = $(HDF5) -HDF5_INSTALL = $(HDF5)_INSTALL -ifneq ($(MSYS2),yes) -HDF5LIBS_LOCAL = $(LIB)/libhdf5.a -HDF5LIBS_SYSTEM = -lz -ldl -HDF5SOLIBS_LOCAL = -L$(LIB) -lhdf5 -HDF5SOLIBS_SYSTEM = -lz -else -HDF5LIBS_LOCAL = -L$(LIB) -lhdf5 -lhdf5.dll -HDF5LIBS_SYSTEM = -lz -ldl -HDF5SOLIBS_LOCAL = -L$(LIB) -lhdf5 -lhdf5.dll -HDF5SOLIBS_SYSTEM = -lz -endif -else -HDF5 = -HDF5dep = -HDF5_INSTALL = -HDF5LIBS_LOCAL = -ifneq ($(HDF5_PREFIX),) -HDF5lib = -L$(HDF5_PREFIX)/lib -endif -ifneq ($(MSYS2),yes) -HDF5LIBS_SYSTEM = $(HDF5lib) -lhdf5 -lz -ldl -HDF5SOLIBS_LOCAL = -HDF5SOLIBS_SYSTEM = $(HDF5lib) -lhdf5 -lz -else -HDF5LIBS_SYSTEM = $(HDF5lib) -lhdf5 -lhdf5.dll -lz -ldl -HDF5SOLIBS_LOCAL = -HDF5SOLIBS_SYSTEM = $(HDF5lib) -lhdf5 -lhdf5.dll -lz -endif -endif - -HDF5REGISTER ?= --register manual -ifneq ($(HDF5_PREFIX),) -HDF5include = -I$(HDF5_PREFIX)/include -endif - -ifneq ($(MSYS2),yes) -H5DUMP = $(HDF5_PREFIX)/bin/h5dump -else -H5DUMP = /MINGW32/bin/h5dump -endif - - -CBFLIB_DONT_USE_LZ4 ?= no -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -# -# Definitions to get a version of HDF5Plugin for LZ4 -# -ifneq ($(MSYS2),yes) -LZ4 ?= HDF5Plugin_14Aug20 -else -LZ4 ?= HDF5-External-Filter-Plugins -endif -LZ4dep = $(LZ4) -LZ4src = $(LZ4)/src -LZ4include = $(LZ4)/include -LZ4SOLIBS = -L$(SOLIB) -lh5zlz4 -else -LZ4SOLIBS = -LZ4dep = -endif - -CBFLIB_DONT_USE_BSHUF ?= no -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -# -# Definitions to get a version of HDF5Plugin for BSHUFFLE WITH LZ4 -# -BSHUF ?= bitshuffle-0.2.2.1_15Jun16 -BSUFdep = $(BSHUF) -BSHUFsrc = $(BSHUF)/src -BSHUFinclude = $(BSHUF)/src -BSHUFSOLIBS = -L$(SOLIB) -lh5zbshuf -BSHUFFILTER = libbshuf_h5filter -else -BSHUFSOLIBS = -BSHUFdep = -endif - -CBFLIB_DONT_USE_BLOSC ?= no -ifneq ($(CBFLIB_DONT_USE_BLOSC),yes) -# -# Definitions to get a version of HDF5Plugin for BLOSC -# -BLOSC = ?c-blosc_4Sep16.tar.gz -BLOSCdep = $(BLOSC) -BLOSCFILTER = hdf5-blosc_2Sep16.tar.gz -BLOSCsrc = $(BLOSC)/src -BLOSCinclude = $(BLOSC)/src -BLOSCSOLIBS = -L$(SOLIB) -lh5zbshuf -BLOSCFILTER = libbshuf_h5filter -else -BLOSCSOLIBS = -BLOSCdep = -endif - - - -# -# Definition of python to use -# -#PYTHON = python -PYTHON ?= python2 - - -# -# Definitions to get a stable version of regex -# -REGEX_PREFIX ?= $(PWD) -ifneq ($(REGEX_PREFIX),$(PWD)) -CBFLIB_DONT_USE_LOCAL_REGEX ?= yes -endif - - -REGEX_LIBDIR ?= $(REGEX_PREFIX)/lib -ifneq ($(CBFLIB_DONT_USE_LOCAL_REGEX),yes) -REGEX ?= pcre-8.38 -REGEXDEP = $(REGEX) -REGEX_INSTALL = $(REGEX)_INSTALL -REGEX_LIB ?= pcreposix -REGEX_LIB2 ?= pcre -ifneq ($(MSYS2),yes) -REGEX_LIBS ?= -L $(REGEX_LIBDIR) -l$(REGEX_LIB) -l$(REGEX_LIB2) -REGEX_LIBS_STATIC = $(LIB)/libpcreposix.a $(LIB)/libpcre.a -else -REGEX_LIBS ?= -L $(REGEX_LIBDIR) -l$(REGEX_LIB) -l$(REGEX_LIB).dll -l$(REGEX_LIB2) -l$(REGEX_LIB2).dll -REGEX_LIBS_STATIC = $(REGEX_LIBS) -endif -REGEX_INCLUDES ?= -I $(REGEX_PREFIX) -else -REGEX = -REGEXDEP = -REGEX_INSTALL = -REGEX_LIB ?= -REGEX_LIB2 ?= -REGEX_LIBS ?= -REGEX_INCLUDES ?= -endif - - -# Program to use to retrieve a URL - -DOWNLOAD ?= wget -N -#DOWNLOAD ?= curl -O -L - -# Flag to control symlinks versus copying - -SLFLAGS = --use_ln -LN = ln -s -f - -# -# Program to use to pack shars -# -SHAR = /usr/bin/shar -#SHAR = /usr/local/bin/gshar - -# -# Program to use to create archives -# -AR = /usr/bin/ar - -# -# Program to use to add an index to an archive -# -RANLIB = /usr/bin/ranlib - - -# -# Program to use to generate a signature -# -#SIGNATURE ?= /usr/bin/openssl dgst -md5 -#SIGNATURE ?= (/usr/bin/openssl dgst -md5 | sed "s/^.*= //") -SIGNATURE ?= ( cat > md5tmp; cmake -E md5sum md5tmp| sed "s/ .*//") - -# -# Pipe command to extract all but the first line of a text file -# -ALLBUTONE = tail -n +2 - - -# -# Extension for signatures of files -# -SEXT = .md5 - -# Default shell - -SHELL = bash - -# call to time a command - -#TIME = -#TIME = time - -# -# Program to display differences between files -# -DIFF = diff -u -b - - -# -# Program to generate wrapper classes for Python -# -PYSWIG = swig -python - -# -# Program to generate wrapper classes for Java -# -JSWIG = swig -java - -# -# Program to generate LaTex and HTML program documentation -# - -NUWEB = nuweb - -# -# Compiler for Java -# -JAVAC = javac - -# -# Java archiver for compiled classes -# -JAR = jar - -# -# Java SDK root directory -# -ifeq ($(JDKDIR),) - JDKDIR = /usr/lib/java -endif - -ifneq ($(CBF_DONT_USE_LONG_LONG),) -NOLLFLAG = -DCBF_DONT_USE_LONG_LONG -else -NOLLFLAG = -endif - -ifneq ($(CBF_NO_REGEX),) -CBF_REGEXFLAG = -DCBF_NO_REGEX -else -CBF_REGEXFLAG = -DCBF_REGEXLIB_REGEX -endif - -ifneq ($(CBF_USE_ULP),) -ULPFLAG = -DCBF_USE_ULP -else -ULPFLAG = -endif - -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -LZ4FLAG = -DCBF_H5Z_USE_LZ4 -else -LZ4FLAG = -endif - -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -BSHUFFLAG = -DCBF_H5Z_USE_BSHUF -else -BSHUFFLAG = -endif - - - -MISCFLAG = $(NOLLFLAG) $(ULPFLAG) - -# -# PYCBF definitions -# -PYCBFEXT = so -PYCBFBOPT = -PYCBFIOPT = -SETUP_PY = setup.py -INSTALLSETUP_PY = installsetup.py - -# -# Set the compiler and flags -# - -######################################################### -# -# Appropriate compiler definitions for Linux -# with gcc version 4.2 and DMALLOC -# -######################################################### -CC = gcc -C++ = g++ -CFLAGS = -g -O2 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing -DDMALLOC -DDMALLOC_FUNC_CHECK -I$(HOME)/include -LDFLAGS = -F90C = gfortran -F90FLAGS = -g -fno-range-check -F90LDFLAGS = -SOCFLAGS = -fPIC -SOLDFLAGS = -shared -Wl,-rpath,$(CBF_PREFIX)/lib -JAVAINCLUDES = -I$(JDKDIR)/include -I$(JDKDIR)/include/linux -LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; -RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/lib:$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; -EXTRALIBS = -lm -L$(HOME)/lib -ldmalloc -M4FLAGS = -Dfcb_bytes_in_rec=131072 -TIME = time - -ifneq ($(NOFORTRAN),) -F90C = -endif - -# -# URLs from which to retrieve the data directories -# -DATAURLBASE = http://downloads.sf.net/cbflib/ -DATAURLI = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Input.tar.gz -DATAURLO = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output.tar.gz -DATAURLS = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz - -# -# URLs from which to retrieve needed external package snapshots -# -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWURL = http://downloads.sf.net/cbflib/$(PYCIFRW).tar.gz -PLYURL = http://www.dabeaz.com/ply/$(PLY).tar.gz -endif -REGEX_URL ?= http://downloads.sf.net/cbflib/$(REGEX).tar.gz -TIFF_URL ?= http://downloads.sf.net/cbflib/$(TIFF).tar.gz -HDF5_URL ?= http://downloads.sf.net/cbflib/$(HDF5).tar.gz -ifneq ($(MSYS2),yes) -LZ4_URL = http://downloads.sf.net/cbflib/$(LZ4).tar.gz -else -LZ4_URL = http://www.github.com/yayahjb/$(LZ4).git -endif -BSHUFURL = http://downloads.sf.net/cbflib/$(BSHUF).tar.gz - - -# -# Include directories -# -INCLUDES = -I$(INCLUDE) -I$(SRC) $(HDF5include) - -# -# runtime library path export commands -# -RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export LD_LIBRARY_PATH; \ - DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export DYLD_LIBRARY_PATH; \ - LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib;export LD_RUN_PATH; - - -###################################################################### -# You should not need to make modifications below this line # -###################################################################### - -ifneq ($(CBF_USE_ULP),) -SRC_CBF_ULP_C = $(SRC)/cbf_ulp.c -INCLUDE_CBF_ULP_H = $(INCLUDE)/cbf_ulp.h -BIN_TESTULP = $(BIN)/testulp -else -SRC_CBF_ULP_C = -INCLUyDE_CBF_ULP_H = -BIN_TESTULP = -endif - -ifneq ($(MSYS2),yes) -SRC_REALPATH = -else -SRC_REALPATH = $(SRC)/realpath.c -endif - - -# -# Suffixes of files to be used or built -# -.SUFFIXES: .c .o .f90 .m4 - -.m4.f90: - m4 -P $(M4FLAGS) $< > $@ - -ifneq ($(F90C),) -.f90.o: - $(F90C) $(F90FLAGS) -c $< -o $@ -endif - - -# -# Common dependencies -# -COMMONDEP = $(M4)/Makefile.m4 - -# -# Source files -# - -SOURCE = $(SRC)/cbf.c \ - $(SRC)/cbf_airy_disk.c \ - $(SRC)/cbf_alloc.c \ - $(SRC)/cbf_ascii.c \ - $(SRC)/cbf_binary.c \ - $(SRC)/cbf_byte_offset.c \ - $(SRC)/cbf_canonical.c \ - $(SRC)/cbf_codes.c \ - $(SRC)/cbf_compress.c \ - $(SRC)/cbf_context.c \ - $(SRC)/cbf_copy.c \ - $(SRC)/cbf_file.c \ - $(SRC)/cbf_getopt.c \ - $(SRC)/cbf_hdf5.c \ - $(SRC)/cbf_hdf5_filter.c \ - $(SRC)/cbf_lex.c \ - $(SRC)/cbf_minicbf_header.c\ - $(SRC)/cbf_nibble_offset.c \ - $(SRC)/cbf_packed.c \ - $(SRC)/cbf_predictor.c \ - $(SRC)/cbf_read_binary.c \ - $(SRC)/cbf_read_mime.c \ - $(SRC)/cbf_simple.c \ - $(SRC)/cbf_string.c \ - $(SRC)/cbf_stx.c \ - $(SRC)/cbf_tree.c \ - $(SRC_CBF_ULP_C) \ - $(SRC)/cbf_uncompressed.c \ - $(SRC)/cbf_write.c \ - $(SRC)/cbf_write_binary.c \ - $(SRC)/cbf_ws.c \ - $(SRC)/cbff.c \ - $(SRC)/md5c.c \ - $(SRC)/img.c \ - $(SRC_FGETLN) $(SRC_REALPATH) - -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYSOURCE = $(SRC)/drel_lex.py \ - $(SRC)/drel_yacc.py \ - $(SRC)/drelc.py \ - $(SRC)/drel_prep.py -endif - -F90SOURCE = $(SRC)/fcb_atol_wcnt.f90 \ - $(SRC)/fcb_ci_strncmparr.f90 \ - $(SRC)/fcb_exit_binary.f90 \ - $(SRC)/fcb_nblen_array.f90 \ - $(SRC)/fcb_next_binary.f90 \ - $(SRC)/fcb_open_cifin.f90 \ - $(SRC)/fcb_packed.f90 \ - $(SRC)/fcb_read_bits.f90 \ - $(SRC)/fcb_read_byte.f90 \ - $(SRC)/fcb_read_image.f90 \ - $(SRC)/fcb_read_line.f90 \ - $(SRC)/fcb_read_xds_i2.f90 \ - $(SRC)/fcb_skip_whitespace.f90 - - -# -# Header files -# -HEADERS = $(INCLUDE)/cbf.h \ - $(INCLUDE)/cbf_airy_disk.h \ - $(INCLUDE)/cbf_alloc.h \ - $(INCLUDE)/cbf_ascii.h \ - $(INCLUDE)/cbf_binary.h \ - $(INCLUDE)/cbf_byte_offset.h \ - $(INCLUDE)/cbf_canonical.h \ - $(INCLUDE)/cbf_codes.h \ - $(INCLUDE)/cbf_compress.h \ - $(INCLUDE)/cbf_context.h \ - $(INCLUDE)/cbf_copy.h \ - $(INCLUDE)/cbf_file.h \ - $(INCLUDE)/cbf_getopt.h \ - $(INCLUDE)/cbf_hdf5.h \ - $(INCLUDE)/cbf_hdf5_filter.h \ - $(INCLUDE)/cbf_lex.h \ - $(INCLUDE)/cbf_minicbf_header.h\ - $(INCLUDE)/cbf_nibble_offset.h \ - $(INCLUDE)/cbf_packed.h \ - $(INCLUDE)/cbf_predictor.h \ - $(INCLUDE)/cbf_read_binary.h \ - $(INCLUDE)/cbf_read_mime.h \ - $(INCLUDE)/cbf_simple.h \ - $(INCLUDE)/cbf_string.h \ - $(INCLUDE)/cbf_stx.h \ - $(INCLUDE)/cbf_tree.h \ - $(INCLUDE)/cbf_uncompressed.h \ - $(INCLUDE_CBF_ULP_H) \ - $(INCLUDE)/cbf_write.h \ - $(INCLUDE)/cbf_write_binary.h \ - $(INCLUDE)/cbf_ws.h \ - $(INCLUDE)/global.h \ - $(INCLUDE)/cbff.h \ - $(INCLUDE)/md5.h \ - $(INCLUDE)/img.h - -# -# m4 macro files -# -M4FILES = $(M4)/fcblib_defines.m4 \ - $(M4)/fcb_exit_binary.m4 \ - $(M4)/fcb_next_binary.m4 \ - $(M4)/fcb_open_cifin.m4 \ - $(M4)/fcb_packed.m4 \ - $(M4)/fcb_read_bits.m4 \ - $(M4)/fcb_read_image.m4 \ - $(M4)/fcb_read_xds_i2.m4 \ - $(M4)/test_fcb_read_image.m4 \ - $(M4)/test_xds_binary.m4 - - -# -# Documentation files -# -DOCUMENTS = $(DOC)/CBFlib.html \ - $(DOC)/CBFlib.txt \ - $(DOC)/CBFlib_NOTICES.html \ - $(DOC)/CBFlib_NOTICES.txt \ - $(DOC)/ChangeLog \ - $(DOC)/ChangeLog.html \ - $(DOC)/MANIFES \ - $(DOC)/gpl.txt $(DOC)/lgpl.txt - -# -# HTML Graphics files -# -JPEGS = $(GRAPHICS)/CBFbackground.jpg \ - $(GRAPHICS)/CBFbig.jpg \ - $(GRAPHICS)/CBFbutton.jpg \ - $(GRAPHICS)/cbflibbackground.jpg\ - $(GRAPHICS)/cbflibbig.jpg \ - $(GRAPHICS)/cbflibbutton.jpg \ - $(GRAPHICS)/cifhome.jpg \ - $(GRAPHICS)/iucrhome.jpg \ - $(GRAPHICS)/noticeButton.jpg - - -# -# Default: instructions -# -default: - @echo ' ' - @echo '***************************************************************' - @echo ' ' - @echo ' PLEASE READ README and doc/CBFlib_NOTICES.txt' - @echo ' ' - @echo ' Before making the CBF library and example programs, check' - @echo ' that the C compiler name and flags are correct:' - @echo ' ' - @echo ' The current values are:' - @echo ' ' - @echo ' $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(PYCIFRWFLAG)' - @echo ' ' - @echo ' Before installing the CBF library and example programs, check' - @echo ' that the install directory is correct:' - @echo ' ' - @echo ' The current value :' - @echo ' ' - @echo ' $(CBF_PREFIX) ' - @echo ' ' - @echo ' To compile the CBF library and example programs type:' - @echo ' ' - @echo ' make clean' - @echo ' make all' - @echo ' ' - @echo ' To compile the CBF library as a shared object library, type:' - @echo ' ' - @echo ' make shared' - @echo ' ' - @echo ' To compile the Java wrapper classes for CBF library, type:' - @echo ' ' - @echo ' make javawrapper' - @echo ' ' - @echo ' To run a set of tests type:' - @echo ' ' - @echo ' make tests' - @echo ' ' - @echo ' To run some java tests type:' - @echo ' ' - @echo ' make javatests' - @echo ' ' - @echo ' The tests assume that several data files are in the directories' - @echo ' $(DATADIRI) and $(DATADIRO)' - @echo ' ' - @echo ' Alternatively tests can be run comparing MD5 signatures only by' - @echo ' ' - @echo ' make tests_sigs_only' - @echo ' ' - @echo ' These signature only tests save space and download time by' - @echo ' assuming that input data files and the output signatures' - @echo ' are in the directories' - @echo ' $(DATADIRI) and $(DATADIRS)' - @echo ' ' - @echo ' These directory can be obtained from' - @echo ' ' - @echo ' $(DATAURLI) ' - @echo ' $(DATAURLO) ' - @echo ' $(DATAURLS) ' - @echo ' ' - @echo ' To clean up the directories type:' - @echo ' ' - @echo ' make clean' - @echo ' ' - @echo ' To install the library and binaries type:' - @echo ' ' - @echo ' make install' - @echo ' ' - @echo '***************************************************************' - @echo ' ' - -# -# Compile the library and examples -# -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEPS = $(PYCIFRW) $(PLY) -else -PYCIFRWDEPS = -endif - -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -LZ4DEPS = $(LZ4) -else -LZ4DEPS = -endif - -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -BSHUFDEPS = $(BSHUF) -else -BSHUFDEPS = -endif - - -all:: $(BIN) $(SOURCE) $(F90SOURCE) $(HEADERS) \ - $(HDF5) \ - $(LZ4DEPS) \ - $(BSHUFDEPS) \ - $(PYCIFRWDEPS) \ - symlinksdone \ - $(REGEXDEP) \ - $(LIB) \ - $(LIB)/libcbf.a \ - $(LIB)/libfcb.a \ - $(LIB)/libimg.a \ - $(BIN)/adscimg2cbf \ - $(BIN)/arvai_test \ - $(BIN)/cbf2adscimg \ - $(BIN)/cbf2nexus \ - $(BIN)/cif2c \ - $(BIN)/cif2cbf \ - $(BIN)/cbf_standardize_numbers \ - $(BIN)/convert_image \ - $(BIN)/convert_minicbf\ - $(BIN)/img2cif \ - $(BIN)/makecbf \ - $(BIN)/minicbf2nexus \ - $(BIN)/nexus2cbf \ - $(BIN)/roi_peaksearch \ - $(BIN)/sequence_match \ - $(BIN)/testcell \ - $(BIN)/testalloc \ - $(BIN)/testreals \ - $(BIN)/testflat \ - $(BIN)/testflatpacked \ - $(BIN)/testhdf5 \ - $(BIN_TESTULP) \ - $(BIN)/tiff2cbf \ - $(BIN)/test_cbf_airy_disk \ - $(BIN)/cbf_testxfelread - -ifneq ($(F90C),) -all:: $(BIN)/test_xds_binary \ - $(BIN)/test_fcb_read_image -endif - -shared: $(SOLIB)/libcbf.so $(SOLIB)/libfcb.so $(SOLIB)/libimg.so - -javawrapper: shared $(JCBF) $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so - -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEF = -Dcbf_use_pycifrw=yes -else -PYCIFRWDEF = -endif - - -Makefiles: Makefile \ - Makefile_LINUX \ - Makefile_LINUX_64 \ - Makefile_LINUX_gcc42 \ - Makefile_LINUX_DMALLOC \ - Makefile_LINUX_gcc42_DMALLOC \ - Makefile_OSX \ - Makefile_OSX_gcc42 \ - Makefile_OSX_gcc42_DMALLOC \ - Makefile_AIX \ - Makefile_MINGW \ - Makefile_MSYS2 \ - Makefile_IRIX_gcc - - -Makefile_LINUX: $(M4)/Makefile.m4 - -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX $(M4)/Makefile.m4 > Makefile_LINUX.tmp - mv Makefile_LINUX.tmp Makefile_LINUX - -Makefile_LINUX_DMALLOC: $(M4)/Makefile.m4 - -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_DMALLOC.tmp - mv Makefile_LINUX_DMALLOC.tmp Makefile_LINUX_DMALLOC - -Makefile_LINUX_64: $(M4)/Makefile.m4 - -cp Makefile_LINUX_64 Makefile_LINUX_64_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_64 $(M4)/Makefile.m4 > Makefile_LINUX_64.tmp - mv Makefile_LINUX_64.tmp Makefile_LINUX_64 - -Makefile_LINUX_gcc42: $(M4)/Makefile.m4 - -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42 $(M4)/Makefile.m4 > Makefile_LINUX_gcc42.tmp - mv Makefile_LINUX_gcc42.tmp Makefile_LINUX_gcc42 - -Makefile_LINUX_gcc42_DMALLOC: $(M4)/Makefile.m4 - -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_gcc42_DMALLOC.tmp - mv Makefile_LINUX_gcc42_DMALLOC.tmp Makefile_LINUX_gcc42_DMALLOC - -Makefile_OSX: $(M4)/Makefile.m4 - -cp Makefile_OSX Makefile_OSX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX $(M4)/Makefile.m4 > Makefile_OSX.tmp - mv Makefile_OSX.tmp Makefile_OSX - -Makefile_OSX_gcc42: $(M4)/Makefile.m4 - -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42 $(M4)/Makefile.m4 > Makefile_OSX_gcc42.tmp - mv Makefile_OSX_gcc42.tmp Makefile_OSX_gcc42 - -Makefile_OSX_gcc42_DMALLOC: $(M4)/Makefile.m4 - -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_OSX_gcc42_DMALLOC.tmp - mv Makefile_OSX_gcc42_DMALLOC.tmp Makefile_OSX_gcc42_DMALLOC - -Makefile_AIX: $(M4)/Makefile.m4 - -cp Makefile_AIX Makefile_AIX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=AIX $(M4)/Makefile.m4 > Makefile_AIX.tmp - mv Makefile_AIX.tmp Makefile_AIX - -Makefile_MINGW: $(M4)/Makefile.m4 - -cp Makefile_MINGW Makefile_MINGW_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MINGW $(M4)/Makefile.m4 > Makefile_MINGW.tmp - mv Makefile_MINGW.tmp Makefile_MINGW - -Makefile_MSYS2: $(M4)/Makefile.m4 - -cp Makefile_MSYS2 Makefile_MSYS2_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MSYS2 $(M4)/Makefile.m4 > Makefile_MSYS2.tmp - mv Makefile_MSYS2.tmp Makefile_MSYS2 - -Makefile_IRIX_gcc: $(M4)/Makefile.m4 - -cp Makefile_IRIX_gcc Makefile_IRIX_gcc_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=IRIX_gcc $(M4)/Makefile.m4 > Makefile_IRIX_gcc.tmp - mv Makefile_IRIX_gcc.tmp Makefile_IRIX_gcc - - -Makefile: $(M4)/Makefile.m4 - -cp Makefile Makefile_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=default $(M4)/Makefile.m4 > Makefile.tmp - mv Makefile.tmp Makefile - -cbflib.ini: $(M4)/Makefile.m4 - echo "$(LDPREFIX)" > cbflib.ini - echo "HDF5_PLUGIN_PATH=$(SOLIB):$$HDF5_PLUGIN_PATH" >> cbflib.ini - echo "export HDF5_PLUGIN_PATH" >> cbflib.ini - -symlinksdone: - chmod a+x .symlinks - chmod a+x .undosymlinks - chmod a+x doc/.symlinks - chmod a+x doc/.undosymlinks - ./.symlinks $(SLFLAGS) - touch symlinksdone - -install: baseinstall pycbfinstall \ - $(HDF5_INSTALL) \ - $(TIFF_INSTALL) \ - $(REGEX_INSTALL) - -userinstall: baseinstall pycbfuserinstall \ - $(HDF5_INSTALL) \ - $(TIFF_INSTALL) \ - $(REGEX_INSTALL) - -baseinstall: all $(CBF_PREFIX) $(CBF_PREFIX)/lib $(CBF_PREFIX)/bin \ - $(CBF_PREFIX)/include $(CBF_PREFIX)/include/cbflib \ - $(PYSOURCE) shared $(EXAMPLES)/batch_convert_minicbf.sh \ - $(LIB)/libcbf.a $(LIB)/libimg.a $(LIB)/libfcb.a \ - $(SOLIB)/libcbf.so $(SOLIB)/libimg.so $(SOLIB)/libfcb.so - -chmod -R 755 $(CBF_PREFIX)/include/cbflib - -chmod 755 $(CBF_PREFIX)/lib/libcbf.a - -cp $(CBF_PREFIX)/lib/libcbf.a $(CBF_PREFIX)/lib/libcbf_old.a - cp $(LIB)/libcbf.a $(CBF_PREFIX)/lib/libcbf.a - -chmod 755 $(CBF_PREFIX)/lib/libimg.a - -cp $(CBF_PREFIX)/lib/libimg.a $(CBF_PREFIX)/lib/libimg_old.a - cp $(LIB)/libimg.a $(CBF_PREFIX)/lib/libimg.a - -chmod 755 $(CBF_PREFIX)/lib/libfcb.a - -cp $(CBF_PREFIX)/lib/libfcb.a $(CBF_PREFIX)/lib/libfcb_old.a - cp $(LIB)/libfcb.a $(CBF_PREFIX)/lib/libfcb.a - -chmod 755 $(CBF_PREFIX)/lib/libcbf.so - -cp $(CBF_PREFIX)/lib/libcbf.so $(CBF_PREFIX)/lib/libcbf_old.so - cp $(SOLIB)/libcbf.so $(CBF_PREFIX)/lib/libcbf.so - $(LN) $(CBF_PREFIX)/lib/libcbf.so $(CBF_PREFIX)/lib/lib_cbf.so - -chmod 755 $(CBF_PREFIX)/lib/libimg.so - -cp $(CBF_PREFIX)/lib/libimg.so $(CBF_PREFIX)/lib/libimg_old.so - cp $(SOLIB)/libimg.so $(CBF_PREFIX)/lib/libimg.so - $(LN) $(CBF_PREFIX)/lib/libimg.so $(CBF_PREFIX)/lib/lib_img.so - -chmod 755 $(CBF_PREFIX)/lib/libfcb.so - -cp $(CBF_PREFIX)/lib/libfcb.so $(CBF_PREFIX)/lib/libfcb_old.so - cp $(SOLIB)/libfcb.so $(CBF_PREFIX)/lib/libfcb.so - $(LN) $(CBF_PREFIX)/lib/libfcb.so $(CBF_PREFIX)/lib/lib_fcb.so - -cp $(CBF_PREFIX)/bin/cbflib.ini $(CBF_PREFIX)/bin/cbflib.ini_old - echo "$(RUNLDPREFIX)" > $(CBF_PREFIX)/bin/cbflib.ini - echo "HDF5_PLUGIN_PATH=$(CBF_PREFIX)/lib:$$HDF5_PLUGIN_PATH" >> $(CBF_PREFIX)/bin/cbflib.ini - echo "export HDF5_PLUGIN_PATH" >> $(CBF_PREFIX)/bin/cbflib.ini - -cp $(CBF_PREFIX)/bin/adscimg2cbf $(CBF_PREFIX)/bin/adscimg2cbf_old - cp $(BIN)/adscimg2cbf $(CBF_PREFIX)/bin/adscimg2cbf - -cp $(CBF_PREFIX)/bin/cbf2adscimg $(CBF_PREFIX)/bin/cbf2adscimg_old - cp $(BIN)/cbf2adscimg $(CBF_PREFIX)/bin/cbf2adscimg - -cp $(CBF_PREFIX)/bin/cbf_standardize_numbers \ - $(CBF_PREFIX)/bin/cbf_standardize_numbers_old - cp $(BIN)/cbf_standardize_numbers $(CBF_PREFIX)/bin/cbf_standardize_numbers - -cp $(CBF_PREFIX)/bin/convert_image $(CBF_PREFIX)/bin/convert_image_old - cp $(BIN)/convert_image $(CBF_PREFIX)/bin/convert_image - -cp $(CBF_PREFIX)/bin/convert_minicbf $(CBF_PREFIX)/bin/convert_minicbf_old - cp $(BIN)/convert_minicbf $(CBF_PREFIX)/bin/convert_minicbf - -cp $(CBF_PREFIX)/bin/makecbf $(CBF_PREFIX)/bin/makecbf_old - cp $(BIN)/makecbf $(CBF_PREFIX)/bin/makecbf - -cp $(CBF_PREFIX)/bin/img2cif $(CBF_PREFIX)/bin/img2cif_old - cp $(BIN)/img2cif $(CBF_PREFIX)/bin/img2cif - -cp $(CBF_PREFIX)/bin/cif2cbf $(CBF_PREFIX)/bin/cif2cbf_old - cp $(BIN)/cif2cbf $(CBF_PREFIX)/bin/cif2cbf - -cp $(CBF_PREFIX)/bin/minicbf2nexus $(CBF_PREFIX)/bin/minicbf2nexus_old - cp $(BIN)/minicbf2nexus $(CBF_PREFIX)/bin/minicbf2nexus - -cp $(CBF_PREFIX)/bin/cbf2nexus $(CBF_PREFIX)/bin/cbf2nexus_old - cp $(BIN)/cbf2nexus $(CBF_PREFIX)/bin/cbf2nexus - -cp $(CBF_PREFIX)/bin/nexus2cbf $(CBF_PREFIX)/bin/nexus2cbf_old - cp $(BIN)/nexus2cbf $(CBF_PREFIX)/bin/nexus2cbf - -cp $(CBF_PREFIX)/bin/roi_peaksearch $(CBF_PREFIX)/bin/roi_peaksearch_old - cp $(BIN)/roi_peaksearch $(CBF_PREFIX)/bin/roi_peaksearch - -cp $(CBF_PREFIX)/bin/sequence_match $(CBF_PREFIX)/bin/sequence_match_old - cp $(BIN)/sequence_match $(CBF_PREFIX)/bin/sequence_match - -cp $(CBF_PREFIX)/bin/testalloc $(CBF_PREFIX)/bin/testalloc_old - cp $(BIN)/testalloc $(CBF_PREFIX)/bin/testalloc - -cp $(CBF_PREFIX)/bin/arvai_test $(CBF_PREFIX)/bin/arvai_test_old - cp $(BIN)/arvai_test $(CBF_PREFIX)/bin/arvai_test - -cp $(CBF_PREFIX)/bin/cif2c $(CBF_PREFIX)/bin/cif2c_old - cp $(BIN)/cif2c $(CBF_PREFIX)/bin/cif2c - -cp $(CBF_PREFIX)/bin/testreals $(CBF_PREFIX)/bin/testreals_old - cp $(BIN)/testreals $(CBF_PREFIX)/bin/testreals - -cp $(CBF_PREFIX)/bin/testflat $(CBF_PREFIX)/bin/testflat_old - cp $(BIN)/testflat $(CBF_PREFIX)/bin/testflat - -cp $(CBF_PREFIX)/bin/testflatpacked $(CBF_PREFIX)/bin/testflatpacked_old - cp $(BIN)/testflatpacked $(CBF_PREFIX)/bin/testflatpacked - -cp $(CBF_PREFIX)/bin/tiff2cbf $(CBF_PREFIX)/bin/tiff2cbf_old - cp $(BIN)/tiff2cbf $(CBF_PREFIX)/bin/tiff2cbf - -cp $(CBF_PREFIX)/bin/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk_old - cp $(BIN)/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk - -cp $(CBF_PREFIX)/bin/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk_old - cp $(BIN)/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk - -cp $(CBF_PREFIX)/bin/testhdf5 $(CBF_PREFIX)/bin/testhdf5_old - cp $(BIN)/testhdf5 $(CBF_PREFIX)/bin/testhdf5 -ifneq ($(CBF_USE_ULP),) - -cp $(CBF_PREFIX)/bin/testulp $(CBF_PREFIX)/bin/testulp_old - cp $(BIN)/testulp $(CBF_PREFIX)/bin/testulp -endif - -cp $(CBF_PREFIX)/bin/batch_convert_minicbf.sh $(CBF_PREFIX)/bin/batch_convert_minicbf_old.sh - cp $(EXAMPLES)/batch_convert_minicbf.sh $(CBF_PREFIX)/bin/batch_convert_minicbf.sh -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) - cp $(SRC)/drel_lex.py $(CBF_PREFIX)/bin/drel_lex.py - cp $(SRC)/drel_yacc.py $(CBF_PREFIX)/bin/drel_yacc.py - cp $(SRC)/drelc.py $(CBF_PREFIX)/bin/drelc.py - cp $(SRC)/drel_prep.py $(CBF_PREFIX)/bin/drel_prep.py -endif - chmod -R 755 $(CBF_PREFIX)/include/cbflib - -rm -rf $(CBF_PREFIX)/include/cbflib_old - -cp -r $(CBF_PREFIX)/include/cbflib $(CBF_PREFIX)/include/cbflib_old - -rm -rf $(CBF_PREFIX)/include/cbflib - cp -r $(INCLUDE) $(CBF_PREFIX)/include/cbflib - chmod 644 $(CBF_PREFIX)/lib/libcbf.a - chmod 644 $(CBF_PREFIX)/lib/libimg.a - chmod 644 $(CBF_PREFIX)/lib/libfcb.a - chmod 755 $(CBF_PREFIX)/lib/libcbf.so - chmod 755 $(CBF_PREFIX)/lib/libimg.so - chmod 755 $(CBF_PREFIX)/lib/libfcb.so - chmod 755 $(CBF_PREFIX)/bin/arvai_test - chmod 755 $(CBF_PREFIX)/bin/cbf2nexus - chmod 755 $(CBF_PREFIX)/bin/cbf_standardize_numbers - chmod 755 $(CBF_PREFIX)/bin/cif2c - chmod 755 $(CBF_PREFIX)/bin/cif2cbf - chmod 755 $(CBF_PREFIX)/bin/convert_image - chmod 755 $(CBF_PREFIX)/bin/convert_minicbf - chmod 755 $(CBF_PREFIX)/bin/img2cif - chmod 755 $(CBF_PREFIX)/bin/makecbf - chmod 755 $(CBF_PREFIX)/bin/minicbf2nexus - chmod 755 $(CBF_PREFIX)/bin/nexus2cbf - chmod 755 $(CBF_PREFIX)/bin/roi_peaksearch - chmod 755 $(CBF_PREFIX)/bin/sequence_match - chmod 755 $(CBF_PREFIX)/bin/testalloc - chmod 755 $(CBF_PREFIX)/bin/testflat - chmod 755 $(CBF_PREFIX)/bin/testflatpacked - chmod 755 $(CBF_PREFIX)/bin/testhdf5 - chmod 755 $(CBF_PREFIX)/bin/testreals -ifneq ($(CBF_USE_ULP),) - chmod 755 $(CBF_PREFIX)/bin/testulp -endif - chmod 755 $(CBF_PREFIX)/bin/tiff2cbf - chmod 755 $(CBF_PREFIX)/bin/test_cbf_airy_disk - chmod 755 $(CBF_PREFIX)/bin/batch_convert_minicbf.sh - chmod 644 $(CBF_PREFIX)/include/cbflib/*.h - -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -# -# PyCifRW -# -build_pycifrw: $(M4)/Makefile.m4 - touch build_pycifrw -$(PYCIFRW): build_pycifrw - -rm -rf $(PYCIFRW) - -rm -rf $(PYCIFRW).tar.gz - $(DOWNLOAD) $(PYCIFRWURL) - tar -xvf $(PYCIFRW).tar.gz - -rm $(PYCIFRW).tar.gz - (cd $(PYCIFRW); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) - -# -# PLY -# -build_ply: $(M4)/Makefile.m4 - touch build_ply -$(PLY): build_ply - -rm -rf $(PLY) - -rm -rf $(PLY).tar.gz - $(DOWNLOAD) $(PLYURL) - tar -xvf $(PLY).tar.gz - -rm $(PLY).tar.gz - (cd $(PLY); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) -endif - -# -# REGEX -# - -build_regex: $(M4)/Makefile.m4 - touch build_regex -$(REGEX): build_regex - -rm -rf $(REGEX) - -rm -rf $(REGEX).tar.gz - $(DOWNLOAD) $(REGEX_URL) - tar -xvf $(REGEX).tar.gz - touch $(REGEX) - -rm $(REGEX).tar.gz - cp config.guess config.sub $(REGEX) - (cd $(REGEX); \ - prefix=$(REGEX_PREFIX); export prefix; \ - ./configure --prefix=$(REGEX_PREFIX); make install) - @-cp $(REGEX_PREFIX)/include/pcreposix.h $(REGEX_PREFIX)/include/regex.h -$(REGEX)_INSTALL: $(REGEX) - -rm -rf $(REGEX)_install - rsync -avz $(REGEX)/ $(REGEX)_install - (cd $(REGEX)_install; prefix=$(CBF_PREFIX); export prefix; \ - make distclean; ./configure --prefix=$(CBF_PREFIX); make install ) - @-cp $(CBF_PREFIX)/include/pcreposix.h $(CBF_PREFIX)/include/regex.h - -# -# TIFF -# -build_tiff: $(M4)/Makefile.m4 - touch build_tiff -$(TIFF): build_tiff config.guess config.sub - -rm -rf $(TIFF) - -rm -rf $(TIFF).tar.gz - $(DOWNLOAD) $(TIFF_URL) - tar -xvf $(TIFF).tar.gz - touch $(TIFF) - -rm $(TIFF).tar.gz - cp config.guess config.sub $(TIFF)/config/ - (cd $(TIFF); prefix=$(TIFF_PREFIX); export prefix; \ - ./configure --prefix=$(TIFF_PREFIX); make install) -$(TIFF)_INSTALL: $(TIFF) - -rm -rf $(TIFF)_install - rsync -avz $(TIFF)/ $(TIFF)_install - (cd $(TIFF)_install; make distclean; prefix=$(CBF_PREFIX); export prefix; \ - ./configure --prefix=$(CBF_PREFIX); make install) - - -ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes) -# -# HDF5 -# - -build_hdf5: $(M4)/Makefile.m4 - touch build_hdf5 -$(HDF5): build_hdf5 - -rm -rf $(HDF5) - -rm -rf $(HDF5).tar.gz - $(DOWNLOAD) $(HDF5_URL) - tar -xvf $(HDF5).tar.gz - cp config.guess $(HDF5)/bin/config.guess - cp config.sub $(HDF5)/bin/config.sub - touch $(HDF5) - -rm $(HDF5).tar.gz - echo "first level HDF5 install in "$(HDF5_PREFIX) - (cd $(ROOT)/$(HDF5); \ - CFLAGS="$(CFLAGS)"; export CFLAGS; \ - mkdir -p hdf5; prefix=$(ROOT)/$(HDF5)/hdf5; export prefix; \ - ./configure --prefix=$(ROOT)/$(HDF5)/hdf5 --enable-build-mode=production \ - --enable-trace --enable-fortran --enable-using-memchecker ;\ - make install; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/bin/ $(HDF5_PREFIX)/bin; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/lib/ $(HDF5_PREFIX)/lib; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/include/ $(HDF5_PREFIX)/include; \ - cd $(HDF5_PREFIX)/bin; $(ROOT)/$(HDF5)/hdf5/bin/h5redeploy -force ) -$(HDF5)_INSTALL: $(HDF5) - -rm -rf $(HDF5)_install - echo "final HDF5 install in "$(CBF_PREFIX) - rsync -avz $(ROOT)/$(HDF5)/hdf5/bin/ $(CBF_PREFIX)/bin; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/lib/ $(CBF_PREFIX)/lib; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/include/ $(CBF_PREFIX)/include; \ - cd $(CBF_PREFIX)/bin; $(ROOT)/$(HDF5)/hdf5/bin/h5redeploy -force -endif - - -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -# -# LZ4 -# -build_lz4: $(M4)/Makefile.m4 - touch build_lz4 -$(LZ4): $(HDF5) build_lz4 - mkdir -p $(SOLIB) - -rm -rf $(LZ4) -ifneq ($(MSYS2),yes) - -rm -rf $(LZ4).tar.gz - $(DOWNLOAD) $(LZ4_URL) - tar -xvf $(LZ4).tar.gz - -rm $(LZ4).tar.gz - (cp $(LZ4include)/lz4.h $(INCLUDE); \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/lz4.c -o lz4.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/h5zlz4.c -o h5zlz4.o; \ - $(CC) -shared lz4.o h5zlz4.o -o $(SOLIB)/libh5zlz4.so; \ - rm lz4.o h5zlz4.o) -else - git clone $(LZ4_URL) - (cd $(LZ4); mkdir build; cd build; cmake .. -G 'MSYS Makefiles' -DENABLE_LZ4_PLUGIN="yes"; make all; cp plugins/* $(SOLIB)) -endif - touch $(LZ4) -endif - - -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -# -# BSHUF -# -build_BSHUF: $(M4)/Makefile.m4 - touch build_BSHUF -$(BSHUF): $(HDF5) build_BSHUF $(LZ4dep) - mkdir -p $(SOLIB) - -rm -rf $(BSHUF) - -rm -rf $(BSHUF).tar.gz - -rm -rf *.o - $(DOWNLOAD) $(BSHUFURL) - tar -xvf $(BSHUF).tar.gz - -rm $(BSHUF).tar.gz - (cp $(BSHUFinclude)/bitshuffle.h \ - $(BSHUFinclude)/bitshuffle_core.h \ - $(BSHUFinclude)/bitshuffle_internals.h \ - $(BSHUFinclude)/bshuf_h5filter.h $(BSHUFinclude)/iochain.h $(INCLUDE); \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bshuf_h5plugin.c -o bshuf_h5plugin.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/iochain.c -o iochain.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o; \ - $(CC) -shared bshuf_h5filter.o bitshuffle.o bitshuffle_core.o iochain.o lz4.o $(HDF5SOLIBS_LOCAL) $(HDF5SOLIBS_SYSTEM)\ - -o $(SOLIB)/libh5zbshuf.so; \ - $(CC) -shared bshuf_h5filter.o bitshuffle.o bitshuffle_core.o lz4.o bshuf_h5plugin.o iochain.o \ - $(HDF5SOLIBS_LOCAL) \ - $(HDF5SOLIBS_SYSTEM) -o $(SOLIB)/$(BSHUFFILTER).so; \ - rm bshuf_h5filter.o bitshuffle.o lz4.o iochain.o bshuf_h5plugin.o) - touch $(BSHUF) -endif - - -# -# Directories -# -$(CBF_PREFIX): - mkdir -p $(CBF_PREFIX) - -$(CBF_PREFIX)/lib: $(CBF_PREFIX) - mkdir -p $(CBF_PREFIX)/lib - -$(CBF_PREFIX)/bin: $(CBF_PREFIX) - mkdir -p $(CBF_PREFIX)/bin - -$(CBF_PREFIX)/include: $(CBF_PREFIX) - mkdir -p $(CBF_PREFIX)/include - -$(CBF_PREFIX)/include/cbflib: $(CBF_PREFIX)/include - mkdir -p $(CBF_PREFIX)/include/cbflib - - - -$(LIB): - mkdir -p $@ - -$(BIN): - mkdir -p $@ - -$(SOLIB): - mkdir -p $@ - -$(JCBF): - mkdir -p $@ - -$(MINICBF_TESTS): - mkdir -p $@ - -# -# Parser -# -$(SRC)/cbf_stx.c: $(SRC)/cbf.stx.y - bison $(SRC)/cbf.stx.y -o $(SRC)/cbf.stx.tab.c -d - mv $(SRC)/cbf.stx.tab.c $(SRC)/cbf_stx.c - mv $(SRC)/cbf.stx.tab.h $(INCLUDE)/cbf_stx.h - -# -# CBF library -# -$(LIB)/libcbf.a: $(SOURCE) $(HEADERS) $(COMMONDEP) $(HDF5) $(LZ4DEPS) $(BSHUFDEPS) $(REGEXDEPS) - -rm -f $@ - -rm -f *.o - mkdir -p $(LIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) \ - -DCBF_FILTER_STATIC $(LZ4FLAG) $(BSHUFFLAG) $(PYCIFRWFLAG) $(INCLUDES) $(WARNINGS) -c $(SOURCE) -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -ifneq ($(MSYS2),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(LZ4src)/h5zlz4.c -o h5zlz4.o -else - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(LZ4)/LZ4/src/H5Zlz4.c -o h5zlz4.o -endif -endif -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/iochain.c -o iochain.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o -endif - $(AR) cr $@ *.o -ifneq ($(RANLIB),) - $(RANLIB) $@ -endif - -rm -f *.o - -$(SOLIB)/libcbf.so: $(SOURCE) $(HEADERS) $(COMMONDEP) $(HDF5) $(LZ4DEPS) $(BSHUFDEPS) - -rm -f $@ - -rm -f *.o - mkdir -p $(SOLIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(LZ4FLAG) $(BSHUFFLAG) $(PYCIFRWFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(SOURCE) -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -ifneq ($(MSYS2),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(LZ4src)/h5zlz4.c -o h5zlz4.o -else - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(LZ4)/LZ4/src/H5Zlz4.c -o h5zlz4.o -endif -endif -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle..o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/iochain.c -o iochain.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o -endif - - $(CC) -o $@ *.o $(SOLDFLAGS) $(EXTRALIBS) $(REGEX_LIBS) $(HDF5SOLIBS_LOCAL) $(HDF5SOLIBS_SYSTEM) - -rm -f *.o - -# -# IMG library -# -$(LIB)/libimg.a: $(SRC)/img.c $(HEADERS) $(COMMONDEP) - mkdir -p $(LIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) -c $(SRC)/img.c - $(AR) cr $@ img.o -ifneq ($(RANLIB),) - $(RANLIB) $@ -endif - rm img.o - -$(SOLIB)/libimg.so: $(SOURCE) $(HEADERS) $(COMMONDEP) - -rm -f $@ - mkdir -p $(SOLIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(SRC)/img.c - $(CC) -o $@ img.o $(SOLDFLAGS) - rm img.o - -# -# CBF and IMG libraries -# -CBF_IMG_LIBS: $(LIB)/libcbf.a $(LIB)/libimg.a - - -# -# FCB library -# -$(LIB)/libfcb.a: $(F90SOURCE) $(COMMONDEP) $(HDF5) - mkdir -p $(LIB) -ifneq ($(F90C),) - $(F90C) $(F90FLAGS) -c $(F90SOURCE) - $(AR) cr $@ *.o -ifneq ($(RANLIB),) - $(RANLIB) $@ -endif - rm *.o -else - echo "Define F90C to build $(LIB)/libfcb.a" -endif - -$(SOLIB)/libfcb.so: $(F90SOURCE) $(HEADERS) $(COMMONDEP) $(SOLIB) -ifneq ($(F90C),) - -rm -f $@ - mkdir -p $(SOLIB) - $(F90C) $(F90FLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(F90SOURCE) - $(F90C) $(F90FLAGS) -o $@ *.o $(SOLDFLAGS) - rm *.o -else - echo "Define F90C to build $(SOLIB)/libfcb.so" -endif - - -# -# Python bindings -# -$(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ - $(PYCBF)/$(SETUP_PY) \ - $(PYCBF)/pycbf.i \ - $(PYCBF)/cbfhandlewrappers.i \ - $(PYCBF)/cbfdetectorwrappers.i \ - $(PYCBF)/cbfgenericwrappers.i \ - $(PYCBF)/cbfgoniometerwrappers.i - -cp $(SOLIB)/*.so $(LIB) - (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) - -$(PYCBF)/pycbfinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --prefix=$(CBF_PREFIX)) - -$(PYCBF)/pycbfuserinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --user) - -$(PYCBF)/setup.py: $(M4)/setup_py.m4 - (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ - -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) - -$(PYCBF)/setup_MINGW.py: m4/setup_py.m4 - (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ - -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) - -$(LIB)/_pycbf.$(PYCBFEXT): $(PYCBF)/_pycbf.$(PYCBFEXT) - mkdir -p $(LIB) - cp $(PYCBF)/_pycbf.$(PYCBFEXT) $(LIB)/_pycbf.$(PYCBFEXT) - -$(PYCBF)/pycbf.pdf: $(PYCBF)/pycbf.w - (cd $(PYCBF); \ - $(NUWEB) pycbf; \ - latex pycbf; \ - $(NUWEB) pycbf; \ - latex pycbf; \ - dvipdfm pycbf ) - -$(PYCBF)/CBFlib.txt: $(DOC)/CBFlib.html - links -dump $(DOC)/CBFlib.html > $(PYCBF)/CBFlib.txt - -$(PYCBF)/cbfhandlewrappers.i \ -$(PYCBF)/cbfdetectorwrappers.i \ -$(PYCBF)/cbfgenericwrappers.i \ -$(PYCBF)/cbfgoniometerwrappers.i: $(PYCBF)/CBFlib.txt $(PYCBF)/make_pycbf.py - (cd $(PYCBF); $(PYTHON) make_pycbf.py; $(PYSWIG) pycbf.i; $(PYTHON) setup.py build) - - -# -# Java bindings -# -$(JCBF)/cbflib-$(VERSION).jar: $(JCBF) $(SRC)/jcbf.i - $(JSWIG) -I$(INCLUDE) -package org.iucr.cbflib -outdir $(JCBF) -o $(JCBF)/jcbf_wrap.c $(SRC)/jcbf.i - $(JAVAC) -d . $(JCBF)/*.java - $(JAR) cf $@ org - -$(SOLIB)/libcbf_wrap.so: $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf.so - mkdir -p $(SOLIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) $(JAVAINCLUDES) -c $(JCBF)/jcbf_wrap.c - $(CC) -o $@ jcbf_wrap.o $(SOLDFLAGS) -L$(SOLIB) -lcbf $(REGEX_LIBS) - rm jcbf_wrap.o - -# -# F90SOURCE -# -$(SRC)/fcb_exit_binary.f90: $(M4)/fcb_exit_binary.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_exit_binary.m4) > $(SRC)/fcb_exit_binary.f90 -$(SRC)/fcb_next_binary.f90: $(M4)/fcb_next_binary.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_next_binary.m4) > $(SRC)/fcb_next_binary.f90 -$(SRC)/fcb_open_cifin.f90: $(M4)/fcb_open_cifin.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_open_cifin.m4) > $(SRC)/fcb_open_cifin.f90 -$(SRC)/fcb_packed.f90: $(M4)/fcb_packed.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_packed.m4) > $(SRC)/fcb_packed.f90 -$(SRC)/fcb_read_bits.f90: $(M4)/fcb_read_bits.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_read_bits.m4) > $(SRC)/fcb_read_bits.f90 -$(SRC)/fcb_read_image.f90: $(M4)/fcb_read_image.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_read_image.m4) > $(SRC)/fcb_read_image.f90 -$(SRC)/fcb_read_xds_i2.f90: $(M4)/fcb_read_xds_i2.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_read_xds_i2.m4) > $(SRC)/fcb_read_xds_i2.f90 -$(EXAMPLES)/test_fcb_read_image.f90: $(M4)/test_fcb_read_image.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) test_fcb_read_image.m4) > $(EXAMPLES)/test_fcb_read_image.f90 -$(EXAMPLES)/test_xds_binary.f90: $(M4)/test_xds_binary.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) test_xds_binary.m4) > $(EXAMPLES)/test_xds_binary.f90 - -# -# convert_image example program -# -$(BIN)/convert_image: $(LIB)/libcbf.a $(EXAMPLES)/convert_image.c $(SRC)/img.c \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/convert_image.c $(SRC)/img.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ -# -# convert_minicbf example program -# -$(BIN)/convert_minicbf: $(LIB)/libcbf.a $(EXAMPLES)/convert_minicbf.c \ - $(GOPTLIB) $(GOPTINC) $(EXAMPLES)/batch_convert_minicbf.sh - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/convert_minicbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - chmod 755 $(EXAMPLES)/batch_convert_minicbf.sh - -# -# makecbf example program -# -$(BIN)/makecbf: $(LIB)/libcbf.a $(EXAMPLES)/makecbf.c $(LIB)/libimg.a - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/makecbf.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - - -# -# adscimg2cbf example program -# -$(BIN)/adscimg2cbf: $(LIB)/libcbf.a $(EXAMPLES)/adscimg2cbf.c $(EXAMPLES)/adscimg2cbf_sub.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/adscimg2cbf.c $(EXAMPLES)/adscimg2cbf_sub.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# cbf2adscimg example program -# -$(BIN)/cbf2adscimg: $(LIB)/libcbf.a $(EXAMPLES)/cbf2adscimg.c $(EXAMPLES)/cbf2adscimg_sub.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf2adscimg.c $(EXAMPLES)/cbf2adscimg_sub.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# cbf_standardize_numbers example program -# -$(BIN)/cbf_standardize_numbers: $(EXAMPLES)/cbf_standardize_numbers.c $(EXAMPLES)/cbf_standardize_numbers.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf_standardize_numbers.c $(SRC_FGETLN) $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@ - -# -# changtestcompression example program -# -$(BIN)/changtestcompression: $(LIB)/libcbf.a $(EXAMPLES)/changtestcompression.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/changtestcompression.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# img2cif example program -# -$(BIN)/img2cif: $(LIB)/libcbf.a $(EXAMPLES)/img2cif.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOTPINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/img2cif.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# cif2cbf example program -# -$(BIN)/cif2cbf: $(LIB)/libcbf.a $(EXAMPLES)/cif2cbf.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cif2cbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# cbf2nexus example program -# -$(BIN)/cbf2nexus: $(LIB)/libcbf.a $(EXAMPLES)/cbf2nexus.c \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf2nexus.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) \ - -lhdf5 -limg -o $@ - -# -# minicbf2nexus example program -# -$(BIN)/minicbf2nexus: $(LIB)/libcbf.a $(EXAMPLES)/minicbf2nexus.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/minicbf2nexus.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# nexus2cbf example program -# -$(BIN)/nexus2cbf: $(LIB)/libcbf.a $(EXAMPLES)/nexus2cbf.c \ - $(GOPTLIB) $(GOPTINC) $(REGEX) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/nexus2cbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# roi_peaksearch example program -# -$(BIN)/roi_peaksearch: $(LIB)/libcbf.a $(EXAMPLES)/roi_peaksearch.c \ - $(EXAMPLES)/dps_peaksearch.c $(EXAMPLES)/dps_peaksearch.h $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/roi_peaksearch.c $(EXAMPLES)/dps_peaksearch.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - - -# -# dectris cbf_template_t program -# -$(BIN)/cbf_template_t: $(DECTRIS_EXAMPLES)/cbf_template_t.c \ - $(DECTRIS_EXAMPLES)/mx_cbf_t_extras.h \ - $(DECTRIS_EXAMPLES)/mx_parms.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -I $(DECTRIS_EXAMPLES) $(WARNINGS) \ - $(DECTRIS_EXAMPLES)/cbf_template_t.c -o $@ - -# -# testcell example program -# -$(BIN)/testcell: $(LIB)/libcbf.a $(EXAMPLES)/testcell.C - mkdir -p $(BIN) - $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testcell.C -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# cif2c example program -# -$(BIN)/cif2c: $(LIB)/libcbf.a $(EXAMPLES)/cif2c.c - mkdir -p $(BIN) - $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cif2c.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# sauter_test example program -# -$(BIN)/sauter_test: $(LIB)/libcbf.a $(EXAMPLES)/sauter_test.C - mkdir -p $(BIN) - $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/sauter_test.C -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# sequence_match example program -# -$(BIN)/sequence_match: $(LIB)/libcbf.a $(EXAMPLES)/sequence_match.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/sequence_match.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# tiff2cbf example program -# -$(BIN)/tiff2cbf: $(LIB)/libcbf.a $(EXAMPLES)/tiff2cbf.c \ - $(GOPTLIB) $(GOPTINC) $(TIFF) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - -I$(TIFF)/libtiff $(EXAMPLES)/tiff2cbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf -L$(TIFF_PREFIX)/lib -ltiff $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# Andy Arvai's buffered read test program -# -$(BIN)/arvai_test: $(LIB)/libcbf.a $(EXAMPLES)/arvai_test.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/arvai_test.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# testreals example program -# -$(BIN)/testreals: $(LIB)/libcbf.a $(EXAMPLES)/testreals.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testreals.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# testflat example program -# -$(BIN)/testflat: $(LIB)/libcbf.a $(EXAMPLES)/testflat.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testflat.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ -# -# testflatpacked example program -# -$(BIN)/testflatpacked: $(LIB)/libcbf.a $(EXAMPLES)/testflatpacked.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testflatpacked.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -ifneq ($(F90C),) -# -# test_xds_binary example program -# -$(BIN)/test_xds_binary: $(LIB)/libfcb.a $(EXAMPLES)/test_xds_binary.f90 - mkdir -p $(BIN) - $(F90C) $(F90FLAGS) $(F90LDFLAGS) $(EXAMPLES)/test_xds_binary.f90 \ - -L$(LIB) -lfcb -o $@ - -# -# test_fcb_read_image example program -# -$(BIN)/test_fcb_read_image: $(LIB)/libfcb.a $(EXAMPLES)/test_fcb_read_image.f90 - mkdir -p $(BIN) - $(F90C) $(F90FLAGS) $(F90LDFLAGS) $(EXAMPLES)/test_fcb_read_image.f90 \ - -L$(LIB) -lfcb -o $@ -endif - -# -# testcbf (C) -# -$(BIN)/ctestcbf: $(EXAMPLES)/testcbf.c $(LIB)/libcbf.a - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testcbf.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# testcbf (Java) -# -$(BIN)/testcbf.class: $(EXAMPLES)/testcbf.java $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so - mkdir -p $(BIN) - $(JAVAC) -cp $(JCBF)/cbflib-$(VERSION).jar -d $(BIN) $(EXAMPLES)/testcbf.java - -ifneq ($(CBF_USE_ULP),) -# -# testulp test program -# -$(BIN)/testulp: $(LIB)/libcbf.a $(EXAMPLES)/testulp.c $(EXAMPLES)/unittest.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/testulp.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ -endif - -# -# testhdf5 test program -# -$(BIN)/testhdf5: $(LIB)/libcbf.a $(EXAMPLES)/testhdf5.c $(EXAMPLES)/unittest.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/testhdf5.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) \ - -o $@.tmp - mv $@.tmp $@ - -# -# testalloc test program -# -$(BIN)/testalloc: $(LIB)/libcbf.a $(EXAMPLES)/testalloc.c $(EXAMPLES)/unittest.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/testalloc.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ - -# -# test_cbf_airy_disk test program -# -$(BIN)/test_cbf_airy_disk: $(LIB)/libcbf.a $(EXAMPLES)/test_cbf_airy_disk.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/test_cbf_airy_disk.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ - -# -# cbf_testxfelread: test program -# -$(BIN)/cbf_testxfelread: $(LIB)/libcbf.a $(EXAMPLES)/cbf_testxfelread.c $(EXAMPLES)/cbf_testxfelread.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf_testxfelread.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ - -# -# Data files for tests -# - -$(DATADIRI): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLI)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Input.tar.gz) - touch $(DATADIRI) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Input.tar.gz) - -$(DATADIRO): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLO)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output.tar.gz) - touch $(DATADIRO) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output.tar.gz) - -$(DATADIRS): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLS)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - touch $(DATADIRS) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - - -# Input Data Files - -TESTINPUT_BASIC = example.mar2300 -DATADIRI_INPUT_BASIC = $(DATADIRI)/example.mar2300 - - -TESTINPUT_EXTRA = \ - 1191_00005.cbf \ - 9ins.cif \ - hit-20140306005258847.cbf \ - insulin_pilatus6m.cbf \ - mb_LP_1_001.img \ - testflatin.cbf \ - testflatpackedin.cbf \ - testrealin.cbf \ - thaumatin_die_M1S5_1_0005_2.cbf \ - X4_lots_M1S4_1_0001.cbf \ - X4_lots_M1S4_1_0002.cbf \ - X4_lots_M1S4_1_0003.cbf \ - X4_lots_M1S4_1_0004.cbf \ - X4_lots_M1S4_1_0005.cbf \ - XRD1621.tif - - - -DATADIRI_INPUT_EXTRA = \ - $(DATADIRI)/1191_00005.cbf \ - $(DATADIRI)/9ins.cif \ - $(DATADIRI)/hit-20140306005258847.cbf \ - $(DATADIRI)/insulin_pilatus6m.cbf \ - $(DATADIRI)/mb_LP_1_001.img \ - $(DATADIRI)/testflatin.cbf \ - $(DATADIRI)/testflatpackedin.cbf \ - $(DATADIRI)/testrealin.cbf \ - $(DATADIRI)/thaumatin_die_M1S5_1_0005_2.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0001.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0002.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0003.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0004.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0005.cbf \ - $(DATADIRI)/XRD1621.tif - - -# Output Data Files - -TESTOUTPUT = adscconverted_flat_orig.cbf \ - adscconverted_orig.cbf converted_flat_orig.cbf converted_orig.cbf \ - insulin_pilatus6mconverted_orig.cbf.h5.cbf \ - insulin_pilatus6mconverted_orig.cbf.h5 \ - insulin_pilatus6mconverted_v2_orig.cbf \ - mb_LP_1_001_orig.cbf testcell_orig.prt \ - test_xds_bin_testflatout_orig.out \ - test_xds_bin_testflatpackedout_orig.out test_fcb_read_testflatout_orig.out \ - test_fcb_read_testflatpackedout_orig.out \ - XRD1621_orig.cbf XRD1621_I4encbC100_orig.cbf \ - minicbf_orig.h5 -NEWTESTOUTPUT = adscconverted_flat.cbf \ - adscconverted.cbf converted_flat.cbf converted.cbf \ - insulin_pilatus6mconverted.cbf \ - insulin_pilatus6mconverted.cbf.h5 \ - insulin_pilatus6mconverted.cbf.h5.cbf \ - insulin_pilatus6mconverted_v2.cbf \ - mb_LP_1_001.cbf testcell.prt \ - test_xds_bin_testflatout.out \ - test_xds_bin_testflatpackedout.out test_fcb_read_testflatout.out \ - test_fcb_read_testflatpackedout.out \ - XRD1621.cbf XRD1621_I4encbC100.cbf \ - $(MINICBF_TEST)/minicbf.h5 -DATADIRO_OUTPUT = $(DATADIRO)/adscconverted_flat_orig.cbf \ - $(DATADIRO)/adscconverted_orig.cbf \ - $(DATADIRO)/converted_flat_orig.cbf \ - $(DATADIRO)/converted_orig.cbf \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5 \ - $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf \ - $(DATADIRO)/mb_LP_1_001_orig.cbf \ - $(DATADIRO)/testcell_orig.prt \ - $(DATADIRO)/test_xds_bin_testflatout_orig.out \ - $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out \ - $(DATADIRO)/test_fcb_read_testflatout_orig.out \ - $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out \ - $(DATADIRO)/XRD1621_orig.cbf \ - $(DATADIRO)/XRD1621_I4encbC100_orig.cbf \ - $(DATADIRO)/minicbf_orig.h5 -DATADIRO_OUTPUT_SIGNATURES = $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) \ - $(DATADIRO)/adscconverted_orig.cbf$(SEXT) \ - $(DATADIRO)/converted_flat_orig.cbf$(SEXT) \ - $(DATADIRO)/converted_orig.cbf$(SEXT) \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ - $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ - $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) \ - $(DATADIRO)/testcell_orig.prt$(SEXT) \ - $(DATADIRO)/test_xds_bin_testflatout_orig.out$(SEXT) \ - $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRO)/test_fcb_read_testflatout_orig.out$(SEXT) \ - $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRO)/XRD1621_orig.cbf$(SEXT) \ - $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) \ - $(DATADIRO)/minicbf_orig.h5$(SEXT) - - - -# Output Data File Signatures - -TESTOUTPUTSIGS = adscconverted_flat_orig.cbf$(SEXT) \ - adscconverted_orig.cbf$(SEXT) converted_flat_orig.cbf$(SEXT) converted_orig.cbf$(SEXT) \ - insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ - insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ - insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ - mb_LP_1_001_orig.cbf$(SEXT) testcell_orig.prt$(SEXT) \ - test_xds_bin_testflatout_orig.out$(SEXT) \ - test_xds_bin_testflatpackedout_orig.out$(SEXT) test_fcb_read_testflatout_orig.out$(SEXT) \ - test_fcb_read_testflatpackedout_orig.out$(SEXT) \ - XRD1621_orig.cbf$(SEXT) \ - XRD1621_I4encbC100_orig.cbf$(SEXT) \ - minicbf_orig.h5$(SEXT) -DATADIRS_OUTPUT_SIGNATURES = $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) \ - $(DATADIRS)/adscconverted_orig.cbf$(SEXT) \ - $(DATADIRS)/converted_flat_orig.cbf$(SEXT) \ - $(DATADIRS)/converted_orig.cbf$(SEXT) \ - $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ - $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ - $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ - $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) \ - $(DATADIRS)/testcell_orig.prt$(SEXT) \ - $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) \ - $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) \ - $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRS)/XRD1621_orig.cbf$(SEXT) \ - $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) \ - $(DATADIRS)/minicbf_orig.h5$(SEXT) - -# Fetch Input Data Files - -$(TESTINPUT_BASIC): $(DATADIRI) $(DATADIRI_INPUT_BASIC) - cp $(DATADIRI)/$@ $@ - cp $(DATADIRI)/$@$(SEXT) $@$(SEXT) - -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) - -$(TESTINPUT_EXTRA): $(DATADIRI) $(DATADIRI_INPUT_EXTRA) - cp $(DATADIRI)/$@ $@ - cp $(DATADIRI)/$@$(SEXT) $@$(SEXT) - -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) - - -# Fetch Output Data Files and Signatures - -$(TESTOUTPUT): $(DATADIRO) $(DATADIRO_OUTPUT) $(DATADIRO_OUTPUT_SIGNATURES) - cp $(DATADIRO)/$@ $@ - cp $(DATADIRO)/$@$(SEXT) $@$(SEXT) - -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) - -# Fetch Output Data File Signatures - -$(TESTOUTPUTSIGS): $(DATADIRS) $(DATADIRS_OUTPUT_SIGNATURES) - cp $(DATADIRS)/$@ $@ - - - -# -# Tests -# - - -tests: all $(LIB) $(BIN) symlinksdone basic extra dectristests pycbftests -tests_sigs_only: $(LIB) $(BIN) symlinksdone basic extra_sigs_only -restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 - $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < adscconverted.cbf > $(DATADIRO)/adscconverted_orig.cbf$(SEXT) - $(SIGNATURE) < converted_flat.cbf > $(DATADIRO)/converted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < converted.cbf > $(DATADIRO)/converted_orig.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5 > $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5.cbf > $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) - $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) - $(SIGNATURE) < testcell.prt > $(DATADIRO)/testcell_orig.prt$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRO)/test_xds_bin_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRO)/test_fcb_read_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < XRD1621.cbf > $(DATADIRO)/XRD1621_orig.cbf$(SEXT) - $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) - $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRO)/minicbf_orig.h5$(SEXT) - cp adscconverted_flat.cbf $(DATADIRO)/adscconverted_flat_orig.cbf$ - cp adscconverted.cbf $(DATADIRO)/adscconverted_orig.cbf - cp converted_flat.cbf $(DATADIRO)/converted_flat_orig.cbf - cp converted.cbf $(DATADIRO)/converted_orig.cbf - cp insulin_pilatus6mconverted.cbf.h5 $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5 - cp insulin_pilatus6mconverted.cbf.h5.cbf $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf - cp insulin_pilatus6mconverted_v2.cbf $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf - cp mb_LP_1_001.cbf$ $(DATADIRO)/mb_LP_1_001_orig.cbf - cp testcell.prt $(DATADIRO)/testcell_orig.prt - cp test_xds_bin_testflatout.out $(DATADIRO)/test_xds_bin_testflatout_orig.out - cp test_xds_bin_testflatpackedout.out $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out - cp test_fcb_read_testflatout.out $(DATADIRO)/test_fcb_read_testflatout_orig.out - cp test_fcb_read_testflatpackedout.out $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out - cp XRD1621.cbf $(DATADIRO)/XRD1621_orig.cbf - cp XRD1621_I4encbC100.cbf $(DATADIRO)/XRD1621_I4encbC100_orig.cbf - cp $(MINICBF_TEST)/minicbf.h5 $(DATADIRO)/minicbf_orig.h5 - -restore_sigs_only: $(NEWTESTOUTPUT) $(DATADIRS) - $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < adscconverted.cbf > $(DATADIRS)/adscconverted_orig.cbf$(SEXT) - $(SIGNATURE) < converted_flat.cbf > $(DATADIRS)/converted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < converted.cbf > $(DATADIRS)/converted_orig.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5 > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5.cbf > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) - $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) - $(SIGNATURE) < testcell.prt > $(DATADIRS)/testcell_orig.prt$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < XRD1621.cbf > $(DATADIRS)/XRD1621_orig.cbf$(SEXT) - $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) - $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRS)/minicbf_orig.h5$(SEXT) -restore_signatures: restore_output restore_sigs_only - -# -# Basic Tests -# - -basic: $(BIN)/makecbf $(BIN)/img2cif $(BIN)/cif2cbf $(TESTINPUT_BASIC) - $(LDPREFIX) $(BIN)/makecbf example.mar2300 makecbf.cbf - $(LDPREFIX) $(BIN)/img2cif -c flatpacked -m headers -d digest \ - -e base64 example.mar2300 img2cif_packed.cif - $(LDPREFIX) $(BIN)/img2cif -c canonical -m headers -d digest \ - -e base64 example.mar2300 img2cif_canonical.cif - $(LDPREFIX) $(BIN)/img2cif -c flatpacked -m headers -d digest \ - -e none example.mar2300 img2cif_packed.cbf - $(LDPREFIX) $(BIN)/img2cif -c canonical -m headers -d digest \ - -e none example.mar2300 img2cif_canonical.cbf - $(LDPREFIX) $(BIN)/cif2cbf -e none -c flatpacked \ - img2cif_canonical.cif cif2cbf_packed.cbf - $(LDPREFIX) $(BIN)/cif2cbf -e none -c canonical \ - img2cif_packed.cif cif2cbf_canonical.cbf - -cmp cif2cbf_packed.cbf makecbf.cbf - -cmp cif2cbf_packed.cbf img2cif_packed.cbf - -cmp cif2cbf_canonical.cbf img2cif_canonical.cbf - - -# -# Extra Tests -# -$(MINICBF_TEST)/minicbf.h5: - cd $(MINICBF_TEST); $(LDPREFIX) $(TIME) $(BIN)/minicbf2nexus -c zlib \ - -C config $(HDF5REGISTER) -o minicbf.h5 ../X4_lots_M1S4_1_*.cbf -mb_LP_1_001.cbf: - $(LDPREFIX) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - - - -ifneq ($(F90C),) -extra: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf \ - $(BIN)/minicbf2nexus $(BIN)/cbf2nexus $(BIN)/nexus2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf \ - $(BIN)/testhdf5 $(BIN)/testalloc \ - $(BIN_TESTULP) \ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUT) $(EXAMPLES)/batch_convert_minicbf.sh \ - $(TEMPLATES)/template_X4_lots_M1S4.cbf -else -extra: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf \ - $(BIN)/minicbf2nexus $(BIN)/cbf2nexus $(BIN)/nexus2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf $(BIN)/cbf2adscimg \ - $(BIN)/testhdf5 $(BIN)/testalloc \ - $(BIN_TESTULP) \ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUT) $(EXAMPLES)/batch_convert_minicbf.sh -endif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e hex -c none \ - makecbf.cbf cif2cbf_ehcn.cif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ - cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf -F example.mar2300 converted_flat.cbf - -cmp converted_flat.cbf converted_flat_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf example.mar2300 converted.cbf - -cmp converted.cbf converted_orig.cbf - -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat > testcell.prt - -cmp testcell.prt testcell_orig.prt - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -cmp adscconverted_flat.cbf adscconverted_flat_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -cmp adscconverted.cbf adscconverted_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -cmp mb_LP_1_001.cbf mb_LP_1_001_orig.cbf -ifneq ($(CLEANTESTS),) - mv mb_LP_1_001.cbf nmb_LP_1_001.cbf -else - cp mb_LP_1_001.cbf nmb_LP_1_001.cbf -endif - $(LDPREFIX) $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf - -cmp nmb_LP_1_001.img mb_LP_1_001.img - rm nmb_LP_1_001.cbf -ifneq ($(CLEANTESTS),) - rm nmb_LP_1_001.img -endif - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -cmp insulin_pilatus6mconverted.cbf insulin_pilatus6mconverted_rev_orig.cbf - -$(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -cmp insulin_pilatus6mconverted_v2.cbf insulin_pilatus6mconverted_v2_orig.cbf - (CBF_CONVERT_MINICBF_PATH=$(BIN); export CBF_CONVERT_MINICBF_PATH; \ - $(LDPREFIX) $(EXAMPLES)/batch_convert_minicbf.sh "." "minicbf_test" \ - "X4_lots_M1S4_1_*.cbf" $(TEMPLATES)/template_X4_lots_M1S4.cbf) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w -O $(HDF5REGISTER) -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encI.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encp.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cb -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encb.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cc -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encc.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cz -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encz.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cl -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encl.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -c2 -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(H5DUMP) insulin_pilatus6mconverted_orig.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted_orig.cbf.h5.dump) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(H5DUMP) insulin_pilatus6mconverted.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted.cbf.h5.dump) - -$(DIFF) insulin_pilatus6mconverted_orig.cbf.h5.dump insulin_pilatus6mconverted.cbf.h5.dump - -rm -f insulin_pilatus6mconverted_orig.cbf.h5.dump - -rm -f insulin_pilatus6mconverted.cbf.h5.dump - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_orig.cbf.h5.cbf -o insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf.h5 -o insulin_pilatus6mconverted.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted.cbf.h5.cbf -o insulin_pilatus6mconverted.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encp.cbf.h5 -o insulin_pilatus6mconverted_encp.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encp.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encb.cbf.h5 -o insulin_pilatus6mconverted_encb.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encb.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encI.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encI.cbf.h5.cbf -o insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encc.cbf.h5 -o insulin_pilatus6mconverted_encc.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encc.cbf.h5.cbf -o insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encz.cbf.h5 -o insulin_pilatus6mconverted_encz.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encz.cbf.h5.cbf -o insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encl.cbf.h5 -o insulin_pilatus6mconverted_encl.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encl.cbf.h5.cbf -o insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_enc2.cbf.h5 -o insulin_pilatus6mconverted_enc2.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_enc2.cbf.h5.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -rm -f insulin_pilatus6mconverted*.cbf.h5.eqcI.cbf - $(LDPREFIX) $(TINE) $(BIN)/test_cbf_airy_disk - $(LDPREFIX) $(TIME) $(BIN)/cbf_testxfelread - $(LDPREFIX) $(TIME) $(BIN)/testalloc - $(LDPREFIX) $(TIME) $(BIN)/testhdf5; rm -f testfile.h5 -ifneq ($(CBF_USE_ULP),) - $(LDPREFIX) $(TIME) $(BIN)/testulp -endif - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/minicbf2nexus -c zlib \ - -C config $(HDF5REGISTER) -o minicbf.h5 ../X4_lots_M1S4_1_*.cbf - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) ../minicbf_orig.h5 | $(ALLBUTONE) > minicbf_original.dump - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) minicbf.h5 | $(ALLBUTONE) > minicbf.dump - -cd $(MINICBF_TEST); $(DIFF) minicbf_original.dump minicbf.dump - $(LDPREFIX) cd $(MINICBF_TEST); rm -f minicbf_original.dump - $(LDPREFIX) cd $(MINICBF_TEST); rm -f minicbf.dump - #cd $(MINICBF_TEST); rm -f minicbf.h5 - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/cbf2nexus -c zlib \ - --list -o i19-1.h5 ../1191_00005.cbf - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/nexus2cbf \ - -o i19-1.cbf i19-1.h5 - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/cbf2nexus -c zlib \ - --list -o i19-2.h5 i19-1.cbf - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/nexus2cbf \ - -o i19-2.cbf i19-2.h5 - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) i19-1.h5 | $(ALLBUTONE) > i19-1.dump - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) i19-2.h5 | $(ALLBUTONE) > i19-2.dump - -cd $(MINICBF_TEST); $(DIFF) i19-1.dump i19-2.dump - -cd $(MINICBF_TEST); $(DIFF) i19-1.cbf i19-2.cbf - $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf -ifneq ($(F90C),) - $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatout.out) - -$(DIFF) test_xds_bin_testflatout.out test_xds_bin_testflatout_orig.out - $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatpackedout.out) - -$(DIFF) test_xds_bin_testflatpackedout.out test_xds_bin_testflatpackedout_orig.out - $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatout.out) - -$(DIFF) test_fcb_read_testflatout.out test_fcb_read_testflatout_orig.out - $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatpackedout.out) - -$(DIFF) test_fcb_read_testflatpackedout.out test_fcb_read_testflatpackedout_orig.out -endif - $(LDPREFIX) $(TIME) $(BIN)/sauter_test - $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - -$(DIFF) XRD1621.cbf XRD1621_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(DIFF) XRD1621_I4encbC100.cbf XRD1621_I4encbC100_orig.cbf - -ifneq ($(F90C),) -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf \ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -else -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf\ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -endif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e hex -c none \ - makecbf.cbf cif2cbf_ehcn.cif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ - cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F example.mar2300 converted_flat.cbf - -$(SIGNATURE) < converted_flat.cbf | $(DIFF) - converted_flat_orig.cbf$(SEXT); rm converted_flat.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image example.mar2300 converted.cbf - -$(SIGNATURE) < converted.cbf | $(DIFF) - converted_orig.cbf$(SEXT); rm converted.cbf - -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat | \ - $(SIGNATURE) | $(DIFF) - testcell_orig.prt$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -$(SIGNATURE) < adscconverted_flat.cbf | $(DIFF) - adscconverted_flat_orig.cbf$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -$(SIGNATURE) < adscconverted.cbf | $(DIFF) - adscconverted_orig.cbf$(SEXT); rm adscconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -$(SIGNATURE) < mb_LP_1_001.cbf | $(DIFF) - mb_LP_1_001_orig.cbf$(SEXT) - mv mb_LP_1_001.cbf nmb_LP_1_001.cbf - $(LDPREFIX) $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf - -cmp nmb_LP_1_001.img mb_LP_1_001.img - rm nmb_LP_1_001.cbf - rm nmb_LP_1_001.img - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted.cbf | $(DIFF) - insulin_pilatus6mconverted_rev_orig.cbf$(SEXT); rm insulin_pilatus6mconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf | $(DIFF) - insulin_pilatus6mconverted_v2_orig.cbf$(SEXT); rm insulin_pilatus6mconverted_v2.cbf - $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf -ifneq ($(F90C),) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatpackedout_orig.out$(SEXT) -endif - $(LDPREFIX) $(TIME) $(BIN)/sauter_test - $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(SIGNATURE) < XRD1621.cbf | $(DIFF) - XRD1621_orig.cbf$(SEXT); rm XRD1621.cbf - -$(SIGNATURE) < XRD1621_I4encbC100.cbf | $(DIFF) - XRD1621_I4encbC100_orig.cbf$(SEXT); rm XRD1621_I4encbC100.cbf - @-rm -f adscconverted_flat.cbf - @-rm -f $(TESTINPUT_BASIC) $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) - @-rm -f cif2cbf_packed.cbf makecbf.cbf \ - cif2cbf_packed.cbf img2cif_packed.cbf \ - cif2cbf_canonical.cbf img2cif_canonical.cbf - @-rm -f testrealout.cbf testflatout.cbf testflatpackedout.cbf \ - cif2cbf_encp.cbf img2cif_canonical.cif img2cif_packed.cif 9ins.cbf - - - -pycbftests: $(PYCBF)/_pycbf.$(PYCBFEXT) $(BIN)/cbf_standardize_numbers - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test1.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test2.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test3.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test4.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test1.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test2.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py ../hit-20140306005258847.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test1_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test1.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test2_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test2.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test3_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test3.out - - -pycbfinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfinstall - -pycbfuserinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfuserinstall - -javatests: $(BIN)/ctestcbf $(BIN)/testcbf.class $(SOLIB)/libcbf_wrap.so - $(LDPREFIX) $(BIN)/ctestcbf > testcbfc.txt - $(LDPREFIX) java -cp $(JCBF)/cbflib-$(VERSION).jar:$(BIN) testcbf > testcbfj.txt - $(DIFF) testcbfc.txt testcbfj.txt - -dectristests: $(BIN)/cbf_template_t $(TEMPLATES)/cbf_test_orig.out - $(LDPREFIX) (cd templates; ../bin/cbf_template_t; diff -a -u cbf_test_orig.out cbf_template_t.out) - -# -# Remove all non-source files -# -empty: - @-rm -rf $(LIB)/* - @-rm -rf $(INCLUDE)/bitshuf* - @-rm -rf $(INCLUDE)/bshuf* - @-rm -rf $(INCLUDE)/H5* - @-rm -rf $(BIN)/* - @-rm -f $(PYCBF)/_pycbf.$(PYCBFEXT) - @-rm -rf $(PYCBF)/build/* - @-rm -f $(PYCBF)/newtest1.cbf - @-rm -f $(PYCBF)/fel_test1.out - @-rm -f $(PYCBF)/fel_test2.out - @-rm -f $(PYCBF)/setup.py - @-rm -f $(PYCBF)/setup_MINGW.py - @-rm -f makecbf.cbf - @-rm -f img2cif_packed.cif - @-rm -f img2cif_canonical.cif - @-rm -f img2cif_packed.cbf - @-rm -f img2cif_canonical.cbf - @-rm -f img2cif_raw.cbf - @-rm -f cif2cbf_packed.cbf - @-rm -f cif2cbf_canonical.cbf - @-rm -f converted.cbf - @-rm -f adscconverted.cbf - @-rm -f converted_flat.cbf - @-rm -f adscconverted_flat.cbf - @-rm -f adscconverted_flat_rev.cbf - @-rm -f mb_LP_1_001.cbf - @-rm -f cif2cbf_ehcn.cif - @-rm -f cif2cbf_encp.cbf - @-rm -f 9ins.cbf - @-rm -f 9ins.cif - @-rm -f testcell.prt - @-rm -f example.mar2300 - @-rm -f converted_orig.cbf - @-rm -f adscconverted_orig.cbf - @-rm -f converted_flat_orig.cbf - @-rm -f adscconverted_flat_orig.cbf - @-rm -f adscconverted_flat_rev_orig.cbf - @-rm -f mb_LP_1_001_orig.cbf - @-rm -f insulin_pilatus6mconverted*.cbf - @-rm -f insulin_pilatus6mconverted*.h5 - @-rm -f insulin_pilatus6m.cbf - @-rm -f testrealin.cbf - @-rm -f testrealout.cbf - @-rm -f testflatin.cbf - @-rm -f testflatout.cbf - @-rm -f testflatpackedin.cbf - @-rm -f testflatpackedout.cbf - @-rm -f CTC.cbf - @-rm -f test_fcb_read_testflatout.out - @-rm -f test_fcb_read_testflatpackedout.out - @-rm -f test_xds_bin_testflatpackedout.out - @-rm -f test_xds_bin_testflatout.out - @-rm -f test_fcb_read_testflatout_orig.out - @-rm -f test_fcb_read_testflatpackedout_orig.out - @-rm -f test_xds_bin_testflatpackedout_orig.out - @-rm -f test_xds_bin_testflatout_orig.out - @-rm -f mb_LP_1_001.img - @-rm -f 9ins.cif - @-rm -f testcell_orig.prt - @-rm -f $(DECTRIS_EXAMPLES)/cbf_template_t.out - @-rm -f XRD1621.cbf - @-rm -f XRD1621_orig.cbf - @-rm -f XRD1621_I4encbC100_orig.cbf - @-rm -f XRD1621_I4encbC100.cbf - @-rm -f minicbf_orig.h5 - @-rm -f $(SRC)/fcb_exit_binary.f90 - @-rm -f $(SRC)/fcb_next_binary.f90 - @-rm -f $(SRC)/fcb_open_cifin.f90 - @-rm -f $(SRC)/fcb_packed.f90 - @-rm -f $(SRC)/fcb_read_bits.f90 - @-rm -f $(SRC)/fcb_read_image.f90 - @-rm -f $(SRC)/fcb_read_xds_i2.f90 - @-rm -f $(EXAMPLES)/test_fcb_read_image.f90 - @-rm -f $(EXAMPLES)/test_xds_binary.f90 - @-rm -f symlinksdone - @-rm -f $(TESTOUTPUT) *$(SEXT) - @-rm -rf $(SOLIB) - @-rm -rf org - @-rm -rf $(JCBF) - @-rm -rf $(REGEX) - @-rm -rf $(REGEX)_install - @-rm -rf $(TIFF) - @-rm -rf $(TIFF)_install - @-rm -rf $(HDF5) - @-rm -rf $(HDF5)_install - @-rm -rf $(INCLUDE)/tiff* - @-rm -rf $(INCLUDE)/H5* - @-rm -rf $(INCLUDE)/hdf5* - @-rm -rf share - @-rm -rf $(MINICBF_TEST)/i19* - @-rm -rf solib - @-rm -f thaumatin_die_M1S5_1_0005_2.cbf - @-rm -f 1191_00005.cbf - @-rm -f XRD1621.tif - @-rm -f md5tmp - @-rm -rf $(PYCBF)/build - @-rm -f *_old - @-rm -f X4_lots_M1S4_1_*.cbf - @-rm -f testfile.h5 - @-rm -f hit-20140306005258847.cbf - @-rm -f build_* - ./.undosymlinks - -# -# Remove temporary files -# -clean: - @-rm -f core - @-rm -f *.o - @-rm -f *.u -# -# Restore to distribution state -# -distclean: clean empty - -# -# Create a Tape Archive for distribution -# - -tar: $(DOCUMENTS) $(SOURCE) $(SRC)/cbf.stx $(HEADERS) $(M4FILES)\ - $(EXAMPLES) \ - README.html README Makefile \ - $(JPEGS) - -/bin/rm -f CBFlib.tar* - tar cvBf CBFlib.tar \ - $(DOCUMENTS) $(SOURCE) $(SRC)/cbf.stx $(HEADERS) $(M4FILES)\ - $(EXAMPLES) \ - README.html README Makefile \ - $(JPEGS) - gzip --best CBFlib.tar - diff --git a/Makefile_MINGW b/Makefile_MINGW index 9be5f031..169f1088 100644 --- a/Makefile_MINGW +++ b/Makefile_MINGW @@ -2,12 +2,12 @@ ###################################################################### # Makefile - command file for make to create CBFlib # # # -# Version 0.9.6 19 May 2020 # +# Version 0.9.7 28 June 2021 # # # # Paul Ellis and # # Herbert J. Bernstein (yaya@bernstein-plus-sons.com) # # # -# (C) Copyright 2006 - 2020 Herbert J. Bernstein # +# (C) Copyright 2006 - 2021 Herbert J. Bernstein # # # ###################################################################### @@ -251,7 +251,7 @@ .DELETE_ON_ERROR: # Version string -VERSION = 0.9.6 +VERSION = 0.9.7 # # Directories @@ -265,7 +265,8 @@ BIN = $(ROOT)/bin SRC = $(ROOT)/src INCLUDE = $(ROOT)/include M4 = $(ROOT)/m4 -PYCBF = $(ROOT)/pycbf +PY2CBF = $(ROOT)/py2cbf +PY3CBF = $(ROOT)/pycbf EXAMPLES = $(ROOT)/examples TEMPLATES= $(ROOT)/templates DECTRIS_EXAMPLES = $(EXAMPLES)/dectris_cbf_template_test @@ -274,7 +275,6 @@ MINICBF_TEST = $(ROOT)/minicbf_test GRAPHICS = $(ROOT)/html_graphics DATADIRI = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Input DATADIRO = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output -DATADIRS = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only CBF_PREFIX ?= $(HOME) # @@ -289,6 +289,19 @@ CBFLIB_DONT_USE_LZ4?=no CBFLIB_DONT_USE_BSHUF?=no +CBFLIB_DONT_USE_LOCAL_NUWEB ?= no +ifeq ($(CBFLIB_DONT_USE_LOCAL_NUWEB),yes) +NUWEB=nuweb +NUWEB_DEP= +NUWEB_DEP2= +else +NUWEB=$(BIN)/nuweb +NUWEB_DEP=nuweb-1.60 +NUWEB_DEP2=$(BIN)/nuweb +endif + + + CBFLIB_DONT_HAVE_FGETLN ?= yes ifeq ($(CBFLIB_DONT_HAVE_FGETLN),yes) SRC_FGETLN = $(SRC)/fgetln.c @@ -297,15 +310,26 @@ SRC_FGETLN = endif -CBFLIB_DONT_USE_PYCIFRW ?= no -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) +CBFLIB_DONT_USE_PY2CIFRW ?= no +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) # -# Definitions to get versions of PyCifRW and PLY +# Definitions to get versions of python2 PyCifRW and PLY # -PYCIFRW ?= PyCifRW-4.1 -PLY = ply-3.2 -PYCIFRWFLAG = -DCBF_USE_PYCIFRW -PYCIFRW_PREFIX ?= $(HOME)/.local +PY2CIFRW ?= PyCifRW-4.1 +PY2PLY = ply-3.2 +PY2CIFRWFLAG = -DCBF_USE_PYCIFRW +PY2CIFRW_PREFIX ?= $(HOME)/.local +endif + +CBFLIB_DONT_USE_PY3CIFRW ?= no +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +# +# Definitions to get versions of python3 PyCifRW and PLY +# +PY3CIFRW ?= PyCifRW-4.3_rev_19Jun21 +PY3PLY = ply-3.11 +PY3CIFRWFLAG = -DCBF_USE_PYCIFRW +PY3CIFRW_PREFIX ?= $(HOME)/.local endif # @@ -322,13 +346,20 @@ TIFF_INSTALL = $(TIFF)_INSTALL ifneq ($(HDF5_PREFIX),) # already installed on system CBFLIB_DONT_USE_LOCAL_HDF5 = yes +HDF5CFLAGS=-DH5_USE_110_API endif ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes) HDF5_PREFIX ?= $(PWD) -HDF5 ?= hdf5-1.10.6 +HDF5 ?= hdf5-1.12.0 +#HDF5 ?= hdf5-1.10.6 #HDF5 = hdf5-1.8.18 #HDF5 = hdf5-1.10.5 +ifeq ($(HDF5),hdf5-1.12.0) +HDF5CFLAGS=-DH5_USE_110_API +else +HDF5CFLAGS= +endif HDF5dep = $(HDF5) HDF5_INSTALL = $(HDF5)_INSTALL ifneq ($(MSYS2),yes) @@ -379,7 +410,7 @@ ifneq ($(CBFLIB_DONT_USE_LZ4),yes) # Definitions to get a version of HDF5Plugin for LZ4 # ifneq ($(MSYS2),yes) -LZ4 ?= HDF5Plugin_14Aug20 +LZ4 ?= HDF5Plugin_5Jun21 else LZ4 ?= HDF5-External-Filter-Plugins endif @@ -430,9 +461,8 @@ endif # # Definition of python to use # -#PYTHON = python -PYTHON ?= python2 - +PYTHON2 ?= python2 +PYTHON3 ?= python3 # # Definitions to get a stable version of regex @@ -539,12 +569,6 @@ PYSWIG = swig -python # JSWIG = swig -java -# -# Program to generate LaTex and HTML program documentation -# - -NUWEB = nuweb - # # Compiler for Java # @@ -597,14 +621,24 @@ endif MISCFLAG = $(NOLLFLAG) $(ULPFLAG) # -# PYCBF definitions +# PY2CBF definitions # -PYCBFEXT = so -PYCBFBOPT = -PYCBFIOPT = +PY2CBFEXT = so +PY2CBFBOPT = +PY2CBFIOPT = SETUP_PY = setup.py INSTALLSETUP_PY = installsetup.py +# +# PY3CBF definitions +# +PY3CBFEXT = so +PY3CBFBOPT = +PY3CBFIOPT = +SETUP_PY = setup.py +INSTALLSETUP_PY = installsetup.py + + # # Set the compiler and flags # @@ -618,7 +652,7 @@ INSTALLSETUP_PY = installsetup.py ######################################################### CC = gcc C++ = g++ -CFLAGS = -g -O2 -Wall -I/usr/include -fno-strict-aliasing +CFLAGS = -g -O2 -Wall -I/usr/include -fno-strict-aliasing $(HDF5CFLAGS) LDFLAGS = F90C = g95 F90FLAGS = -g @@ -631,8 +665,10 @@ SOLDFLAGS = -shared -Wl,--kill-at JAVAINCLUDES = -I$(JDKDIR)/include -I$(JDKDIR)/include/win32 EXTRALIBS = -lm TIME = -PYCBFEXT = pyd -PYCBFBOPT = --compiler=mingw32 +PY2CBFEXT = pyd +PY2CBFBOPT = --compiler=mingw32 +PY3CBFEXT = pyd +PY3CBFBOPT = --compiler=mingw32 SETUP_PY = setup_MINGW.py INSTALLSETUP_PY = installsetup_MINGW.py JDKDIR = /java @@ -654,18 +690,24 @@ endif DATAURLBASE = http://downloads.sf.net/cbflib/ DATAURLI = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Input.tar.gz DATAURLO = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output.tar.gz -DATAURLS = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz # # URLs from which to retrieve needed external package snapshots # -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWURL = http://downloads.sf.net/cbflib/$(PYCIFRW).tar.gz -PLYURL = http://www.dabeaz.com/ply/$(PLY).tar.gz +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2CIFRWURL = http://downloads.sf.net/cbflib/$(PY2CIFRW).tar.gz +PY2PLYURL = http://www.dabeaz.com/ply/$(PY2PLY).tar.gz +endif +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3CIFRWURL = http://downloads.sf.net/cbflib/$(PY3CIFRW).tar.gz +PY3PLYURL = http://downloads.sf.net/cbflib/$(PY3PLY).tar.gz endif REGEX_URL ?= http://downloads.sf.net/cbflib/$(REGEX).tar.gz TIFF_URL ?= http://downloads.sf.net/cbflib/$(TIFF).tar.gz HDF5_URL ?= http://downloads.sf.net/cbflib/$(HDF5).tar.gz +ifneq ($(CBFLIB_DONT_USE_LOCAL_NUWEB),yes) +NUWEB_URL ?= http://downloads.sf.net/cbflib/$(NUWEB_DEP).tar.gz +endif ifneq ($(MSYS2),yes) LZ4_URL = http://downloads.sf.net/cbflib/$(LZ4).tar.gz else @@ -682,10 +724,11 @@ INCLUDES = -I$(INCLUDE) -I$(SRC) $(HDF5include) # # runtime library path export commands # -RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export LD_LIBRARY_PATH; \ - DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export DYLD_LIBRARY_PATH; \ - LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib;export LD_RUN_PATH; - +ifeq ($(HDF5_PREFIX),) +RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export LD_LIBRARY_PATH; DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export DYLD_LIBRARY_PATH; LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib;export LD_RUN_PATH; +else +RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib:$(HDF5_PREFIX)/lib;export LD_LIBRARY_PATH; DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib:$(HDF5_PREFIX)/lib;export DYLD_LIBRARY_PATH; LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib:$(HDF5_PREFIX)/lib;export LD_RUN_PATH; +endif ###################################################################### # You should not need to make modifications below this line # @@ -767,8 +810,15 @@ SOURCE = $(SRC)/cbf.c \ $(SRC)/img.c \ $(SRC_FGETLN) $(SRC_REALPATH) -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYSOURCE = $(SRC)/drel_lex.py \ +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2SOURCE = $(SRC)/drel_lex.py \ + $(SRC)/drel_yacc.py \ + $(SRC)/drelc.py \ + $(SRC)/drel_prep.py +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3SOURCE = $(SRC)/drel_lex.py \ $(SRC)/drel_yacc.py \ $(SRC)/drelc.py \ $(SRC)/drel_prep.py @@ -885,6 +935,26 @@ default: @echo ' ' @echo ' $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(PYCIFRWFLAG)' @echo ' ' + @echo ' If you have changed any of the nuweb .w input files, you will need' + @echo ' need nuweb installed, check that CBFLIB_DONT_USE_LOCAL_NUWEB,' + @echo ' and NUWEB are defined correctly :' + @echo ' ' + @echo ' The current values are:' + @echo ' ' + @echo ' CBFLIB_DONT_USE_LOCAL_NUWEB = $(CBFLIB_DONT_USE_LOCAL_NUWEB)' + @echo ' NUWEB = $(NUWEB)' + @echo ' NUWEB_DEP = $(NUWEB_DEP)' + @echo ' NUWEB_DEP2 = $(NUWEB_DEP2)' + @echo ' ' + @echo ' You will need either a system HDF5 1.12 or it to be installed here.' + @echo ' Check that CBFLIB_DONT_USE_LOCAL_HDF5 and HDF5 are defined correctly :' + @echo ' ' + @echo ' The current values are:' + @echo ' ' + @echo ' CBFLIB_DONT_USE_LOCAL_HDF5 = $(CBFLIB_DONT_USE_LOCAL_HDF5)' + @echo ' HDF5 = $(HDF5)' + @echo ' HDF5_PREFIX = $(HDF5_PREFIX)' + @echo ' ' @echo ' Before installing the CBF library and example programs, check' @echo ' that the install directory is correct:' @echo ' ' @@ -916,20 +986,10 @@ default: @echo ' The tests assume that several data files are in the directories' @echo ' $(DATADIRI) and $(DATADIRO)' @echo ' ' - @echo ' Alternatively tests can be run comparing MD5 signatures only by' - @echo ' ' - @echo ' make tests_sigs_only' - @echo ' ' - @echo ' These signature only tests save space and download time by' - @echo ' assuming that input data files and the output signatures' - @echo ' are in the directories' - @echo ' $(DATADIRI) and $(DATADIRS)' - @echo ' ' @echo ' These directory can be obtained from' @echo ' ' @echo ' $(DATAURLI) ' @echo ' $(DATAURLO) ' - @echo ' $(DATAURLS) ' @echo ' ' @echo ' To clean up the directories type:' @echo ' ' @@ -945,10 +1005,16 @@ default: # # Compile the library and examples # -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEPS = $(PYCIFRW) $(PLY) +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2CIFRWDEPS = $(PY2CIFRW) $(PY2PLY) +else +PY2CIFRWDEPS = +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3CIFRWDEPS = $(PY3CIFRW) $(PY3PLY) else -PYCIFRWDEPS = +PY3CIFRWDEPS = endif ifneq ($(CBFLIB_DONT_USE_LZ4),yes) @@ -968,7 +1034,8 @@ all:: $(BIN) $(SOURCE) $(F90SOURCE) $(HEADERS) \ $(HDF5) \ $(LZ4DEPS) \ $(BSHUFDEPS) \ - $(PYCIFRWDEPS) \ + $(PY2CIFRWDEPS) \ + $(PY3CIFRWDEPS) \ symlinksdone \ $(REGEXDEP) \ $(LIB) \ @@ -1010,92 +1077,101 @@ shared: $(SOLIB)/libcbf.so $(SOLIB)/libfcb.so $(SOLIB)/libimg.so javawrapper: shared $(JCBF) $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEF = -Dcbf_use_pycifrw=yes +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2CIFRWDEF = -Dcbf_use_py2cifrw=yes +else +PY2CIFRWDEF = +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3CIFRWDEF = -Dcbf_use_py3cifrw=yes else -PYCIFRWDEF = +PY3CIFRWDEF = endif -Makefiles: Makefile \ - Makefile_LINUX \ - Makefile_LINUX_64 \ +Makefiles: \ + Makefile \ + Makefile_LINUX \ + Makefile_OSX \ + Makefile_MINGW \ + Makefile_MSYS2 + +Makefiles_pre_0.9.7: \ + Makefile_LINUX_64 \ Makefile_LINUX_gcc42 \ Makefile_LINUX_DMALLOC \ Makefile_LINUX_gcc42_DMALLOC \ - Makefile_OSX \ Makefile_OSX_gcc42 \ Makefile_OSX_gcc42_DMALLOC \ - Makefile_AIX \ - Makefile_MINGW \ - Makefile_MSYS2 \ + Makefile_AIX \ Makefile_IRIX_gcc Makefile_LINUX: $(M4)/Makefile.m4 -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX $(M4)/Makefile.m4 > Makefile_LINUX.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX $(M4)/Makefile.m4 > Makefile_LINUX.tmp mv Makefile_LINUX.tmp Makefile_LINUX Makefile_LINUX_DMALLOC: $(M4)/Makefile.m4 -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_DMALLOC.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_DMALLOC.tmp mv Makefile_LINUX_DMALLOC.tmp Makefile_LINUX_DMALLOC Makefile_LINUX_64: $(M4)/Makefile.m4 -cp Makefile_LINUX_64 Makefile_LINUX_64_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_64 $(M4)/Makefile.m4 > Makefile_LINUX_64.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_64 $(M4)/Makefile.m4 > Makefile_LINUX_64.tmp mv Makefile_LINUX_64.tmp Makefile_LINUX_64 Makefile_LINUX_gcc42: $(M4)/Makefile.m4 -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42 $(M4)/Makefile.m4 > Makefile_LINUX_gcc42.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_gcc42 $(M4)/Makefile.m4 > Makefile_LINUX_gcc42.tmp mv Makefile_LINUX_gcc42.tmp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_DMALLOC: $(M4)/Makefile.m4 -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_gcc42_DMALLOC.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_gcc42_DMALLOC.tmp mv Makefile_LINUX_gcc42_DMALLOC.tmp Makefile_LINUX_gcc42_DMALLOC Makefile_OSX: $(M4)/Makefile.m4 -cp Makefile_OSX Makefile_OSX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX $(M4)/Makefile.m4 > Makefile_OSX.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=OSX $(M4)/Makefile.m4 > Makefile_OSX.tmp mv Makefile_OSX.tmp Makefile_OSX Makefile_OSX_gcc42: $(M4)/Makefile.m4 -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42 $(M4)/Makefile.m4 > Makefile_OSX_gcc42.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=OSX_gcc42 $(M4)/Makefile.m4 > Makefile_OSX_gcc42.tmp mv Makefile_OSX_gcc42.tmp Makefile_OSX_gcc42 Makefile_OSX_gcc42_DMALLOC: $(M4)/Makefile.m4 -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_OSX_gcc42_DMALLOC.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=OSX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_OSX_gcc42_DMALLOC.tmp mv Makefile_OSX_gcc42_DMALLOC.tmp Makefile_OSX_gcc42_DMALLOC Makefile_AIX: $(M4)/Makefile.m4 -cp Makefile_AIX Makefile_AIX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=AIX $(M4)/Makefile.m4 > Makefile_AIX.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=AIX $(M4)/Makefile.m4 > Makefile_AIX.tmp mv Makefile_AIX.tmp Makefile_AIX Makefile_MINGW: $(M4)/Makefile.m4 -cp Makefile_MINGW Makefile_MINGW_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MINGW $(M4)/Makefile.m4 > Makefile_MINGW.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=MINGW $(M4)/Makefile.m4 > Makefile_MINGW.tmp mv Makefile_MINGW.tmp Makefile_MINGW Makefile_MSYS2: $(M4)/Makefile.m4 -cp Makefile_MSYS2 Makefile_MSYS2_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MSYS2 $(M4)/Makefile.m4 > Makefile_MSYS2.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=MSYS2 $(M4)/Makefile.m4 > Makefile_MSYS2.tmp mv Makefile_MSYS2.tmp Makefile_MSYS2 Makefile_IRIX_gcc: $(M4)/Makefile.m4 -cp Makefile_IRIX_gcc Makefile_IRIX_gcc_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=IRIX_gcc $(M4)/Makefile.m4 > Makefile_IRIX_gcc.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=IRIX_gcc $(M4)/Makefile.m4 > Makefile_IRIX_gcc.tmp mv Makefile_IRIX_gcc.tmp Makefile_IRIX_gcc Makefile: $(M4)/Makefile.m4 -cp Makefile Makefile_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=default $(M4)/Makefile.m4 > Makefile.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=default $(M4)/Makefile.m4 > Makefile.tmp mv Makefile.tmp Makefile cbflib.ini: $(M4)/Makefile.m4 @@ -1111,12 +1187,12 @@ symlinksdone: ./.symlinks $(SLFLAGS) touch symlinksdone -install: baseinstall pycbfinstall \ +install: baseinstall py2cbfinstall py3cbfinstall \ $(HDF5_INSTALL) \ $(TIFF_INSTALL) \ $(REGEX_INSTALL) -userinstall: baseinstall pycbfuserinstall \ +userinstall: baseinstall py2cbfuserinstall py3cbfuserinstall \ $(HDF5_INSTALL) \ $(TIFF_INSTALL) \ $(REGEX_INSTALL) @@ -1248,38 +1324,96 @@ endif chmod 755 $(CBF_PREFIX)/bin/batch_convert_minicbf.sh chmod 644 $(CBF_PREFIX)/include/cbflib/*.h -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -# -# PyCifRW -# -build_pycifrw: $(M4)/Makefile.m4 - touch build_pycifrw -$(PYCIFRW): build_pycifrw - -rm -rf $(PYCIFRW) - -rm -rf $(PYCIFRW).tar.gz - $(DOWNLOAD) $(PYCIFRWURL) - tar -xvf $(PYCIFRW).tar.gz - -rm $(PYCIFRW).tar.gz - (cd $(PYCIFRW); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +# +# Py2CifRW +# +build_py2cifrw: $(M4)/Makefile.m4 + touch build_py2cifrw +$(PY2CIFRW): build_py2cifrw + -rm -rf $(PY2CIFRW) + -rm -rf $(PY2CIFRW).tar.gz + $(DOWNLOAD) $(PY2CIFRWURL) + tar -xvf $(PY2CIFRW).tar.gz + -rm $(PY2CIFRW).tar.gz + (cd $(PY2CIFRW); \ + PYTHONPATH=$(PY2CIFRW_PREFIX)/lib/python:$(PY2CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON2) setup.py install --prefix= --home=$(PY2CIFRW_PREFIX) ) + +# +# PY2PLY +# +build_py2ply: $(M4)/Makefile.m4 + touch build_py2ply +$(PY2PLY): build_py2ply + -rm -rf $(PY2PLY) + -rm -rf $(PY2PLY).tar.gz + $(DOWNLOAD) $(PY2PLYURL) + tar -xvf $(PY2PLY).tar.gz + -rm $(PY2PLY).tar.gz + (cd $(PY2PLY); \ + PYTHONPATH=$(PY2CIFRW_PREFIX)/lib/python:$(PY2CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON2) setup.py install --prefix= --home=$(PY2CIFRW_PREFIX) ) +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +# +# Py3CifRW +# +build_py3cifrw: $(M4)/Makefile.m4 + touch build_py3cifrw +$(PY3CIFRW): build_py3cifrw + -rm -rf $(PY3CIFRW) + -rm -rf $(PY3CIFRW).tar.gz + $(DOWNLOAD) $(PY3CIFRWURL) + tar -xvf $(PY3CIFRW).tar.gz + -rm $(PY3CIFRW).tar.gz + (cd $(PY3CIFRW); \ + PYTHONPATH=$(PY3CIFRW_PREFIX)/lib/python:$(PY3CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON3) setup.py install --prefix= --home=$(PY3CIFRW_PREFIX) ) + +# +# PY3PLY +# +build_py3ply: $(M4)/Makefile.m4 + touch build_py3ply +$(PY3PLY): build_py3ply + -rm -rf $(PY3PLY) + -rm -rf $(PY3PLY).tar.gz + $(DOWNLOAD) $(PY3PLYURL) + tar -xvf $(PY3PLY).tar.gz + -rm $(PY3PLY).tar.gz + (cd $(PY3PLY); \ + PYTHONPATH=$(PY3CIFRW_PREFIX)/lib/python:$(PY3CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON3) setup.py install --prefix= --home=$(PY3CIFRW_PREFIX) ) +endif + # -# PLY +# NUWEB # -build_ply: $(M4)/Makefile.m4 - touch build_ply -$(PLY): build_ply - -rm -rf $(PLY) - -rm -rf $(PLY).tar.gz - $(DOWNLOAD) $(PLYURL) - tar -xvf $(PLY).tar.gz - -rm $(PLY).tar.gz - (cd $(PLY); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) +ifneq ($(NUWEB_DEP),'') +$(NUWEB_DEP): + -rm -rf $(NUWEB_DEP) + -rm -rf $(NUWEB_DEP).tar.gz + $(DOWNLOAD) $(NUWEB_URL) + tar -xvf $(NUWEB_DEP).tar.gz + touch $(NUWEB_DEP) + rm $(NUWEB_DEP).tar.gz + +$(NUWEB_DEP2): $(NUWEB_DEP) + (cd $(NUWEB_DEP); make nuweb; cp nuweb $(NUWEB_DEP2)) endif + # # REGEX # @@ -1379,7 +1513,7 @@ ifneq ($(MSYS2),yes) tar -xvf $(LZ4).tar.gz -rm $(LZ4).tar.gz (cp $(LZ4include)/lz4.h $(INCLUDE); \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/lz4.c -o lz4.o; \ + $(CC) $(CFLAGS) $(SOWCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/lz4.c -o lz4.o; \ $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/h5zlz4.c -o h5zlz4.o; \ $(CC) -shared lz4.o h5zlz4.o -o $(SOLIB)/libh5zlz4.so; \ rm lz4.o h5zlz4.o) @@ -1576,53 +1710,147 @@ endif # # Python bindings # -$(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ - $(PYCBF)/$(SETUP_PY) \ - $(PYCBF)/pycbf.i \ - $(PYCBF)/cbfhandlewrappers.i \ - $(PYCBF)/cbfdetectorwrappers.i \ - $(PYCBF)/cbfgenericwrappers.i \ - $(PYCBF)/cbfgoniometerwrappers.i + +$(PY2CBF)/make_pycbf.py: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/make_pycbf.w + (cd $(PY2CBF); $(NUWEB) make_pycbf.w) + +$(PY2CBF)/pycbf.i: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf_i.w + (cd $(PY2CBF); $(NUWEB) pycbf_i.w) + +$(PY2CBF)/py2setup_py.m4 \ +$(PY2CBF)/win32.bat \ +$(PY2CBF)/linux.sh \ +$(PY2CBF)/makeflatascii.py \ +$(PY2CBF)/pycbf_test1.py \ +$(PY2CBF)/pycbf_test2.py \ +$(PY2CBF)/pycbf_test3.py \ +$(PY2CBF)/pycbf_test4.py \ +$(PY2CBF)/pycbf_testfelaxes.py \ +$(PY2CBF)/xmas/readmarheader.py \ +$(PY2CBF)/xmas/xmasheaders.py \ +$(PY2CBF)/xmas/xmas_cif_template.cif : $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w + (cd $(PY2CBF); $(NUWEB) pycbf.w ) + touch $(PY2CBF)/py2setup_py.m4 + +$(PY2CBF)/_py2cbf.$(PY2CBFEXT): $(PY2CBF) shared \ + $(PY2CBF)/py2setup.py \ + $(PY2CBF)/pycbf.i \ + $(PY2CBF)/cbfhandlewrappers.i \ + $(PY2CBF)/cbfdetectorwrappers.i \ + $(PY2CBF)/cbfgenericwrappers.i \ + $(PY2CBF)/cbfgoniometerwrappers.i -cp $(SOLIB)/*.so $(LIB) - (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) + (cd $(PY2CBF); $(PYTHON2) py2setup.py build $(PY2CBFBOPT); cp build/lib*/_py2cbf*.$(PY2CBFEXT) .) -$(PYCBF)/pycbfinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --prefix=$(CBF_PREFIX)) +$(PY2CBF)/py2cbfinstall: $(PY2CBF)/pycbf.py + (cd $(PY2CBF); $(PYTHON2) $(INSTALLSETUP_PY) install $(PY2CBFIOPT) --prefix=$(CBF_PREFIX)) -$(PYCBF)/pycbfuserinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --user) +$(PY2CBF)/py2cbfuserinstall: $(PY2CBF)/pycbf.py + (cd $(PY2CBF); $(PYTHON2) $(INSTALLSETUP_PY) install $(PY2CBFIOPT) --user) -$(PYCBF)/setup.py: $(M4)/setup_py.m4 +$(PY2CBF)/py2setup.py: $(PY2CBF)/py2setup_py.m4 (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) + $(PY2CBF)/py2setup_py.m4 > $@) -$(PYCBF)/setup_MINGW.py: m4/setup_py.m4 +$(PY2CBF)/py2setup_MINGW.py: $(PY2CBF)/setup_py.m4 (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) + $(PY2CBF)/py2setup_py.m4 > $@) -$(LIB)/_pycbf.$(PYCBFEXT): $(PYCBF)/_pycbf.$(PYCBFEXT) +$(LIB)/_py2cbf.$(PY2CBFEXT): $(PY2CBF)/_py2cbf.$(PY2CBFEXT) mkdir -p $(LIB) - cp $(PYCBF)/_pycbf.$(PYCBFEXT) $(LIB)/_pycbf.$(PYCBFEXT) + cp $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(LIB)/_py2cbf.$(PY2CBFEXT) -$(PYCBF)/pycbf.pdf: $(PYCBF)/pycbf.w - (cd $(PYCBF); \ +$(PY2CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w + (cd $(PY2CBF); \ $(NUWEB) pycbf; \ latex pycbf; \ $(NUWEB) pycbf; \ latex pycbf; \ dvipdfm pycbf ) -$(PYCBF)/CBFlib.txt: $(DOC)/CBFlib.html - links -dump $(DOC)/CBFlib.html > $(PYCBF)/CBFlib.txt +$(PY2CBF)/CBFlib.txt: $(DOC)/CBFlib.html + links -dump $(DOC)/CBFlib.html > $(PY2CBF)/CBFlib.txt + +$(PY2CBF)/pycbf.py: $(PY2CBF)/pycbf.pdf $(PY2CBF)/cbfdetectorwrappers.i \ + $(PY2CBF)/cbfgenericwrappers.i \ + $(PY2CBF)/cbfgoniometerwrappers.i \ + $(PY2CBF)/CBFlib.txt $(PY2CBF)/make_pycbf.py + (cd $(PY2CBF); $(PYTHON2) make_pycbf.py; $(PYSWIG) -module py2cbf pycbf.i; \ + $(PYTHON2) py2setup.py build; mv pycbf.py rawpycbf.py; \ + cat rawpycbf.py | sed "s/ _pycbf/ _py2cbf/" > pycbf.py ) + +$(PY3CBF)/make_pycbf.py: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/make_pycbf.w + (cd $(PY3CBF); $(NUWEB) make_pycbf.w) + +$(PY3CBF)/pycbf.i: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf_i.w + (cd $(PY3CBF); $(NUWEB) pycbf_i.w) + +$(PY3CBF)/py3setup_py.m4 \ +$(PY3CBF)/win32.bat \ +$(PY3CBF)/linux.sh \ +$(PY3CBF)/makeflatascii.py \ +$(PY3CBF)/pycbf_test1.py \ +$(PY3CBF)/pycbf_test2.py \ +$(PY3CBF)/pycbf_test3.py \ +$(PY3CBF)/pycbf_test4.py \ +$(PY3CBF)/pycbf_testfelaxes.py \ +$(PY3CBF)/xmas/readmarheader.py \ +$(PY3CBF)/xmas/xmasheaders.py \ +$(PY3CBF)/xmas/xmas_cif_template.cif: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w + (cd $(PY3CBF); $(NUWEB) pycbf.w ) + touch $(PY3CBF)/py3setup_py.m4 + + +$(PY3CBF)/_pycbf.$(PY3CBFEXT): $(PY3CBF) shared \ + $(PY3CBF)/py3setup.py \ + $(PY3CBF)/pycbf.i \ + $(PY3CBF)/cbfhandlewrappers.i \ + $(PY3CBF)/cbfdetectorwrappers.i \ + $(PY3CBF)/cbfgenericwrappers.i \ + $(PY3CBF)/cbfgoniometerwrappers.i + -cp $(SOLIB)/*.so $(LIB) + (cd $(PY3CBF); $(PYTHON3) py3setup.py build $(PY3CBFBOPT); cp build/lib*/_pycbf*.$(PY3CBFEXT) .) -$(PYCBF)/cbfhandlewrappers.i \ -$(PYCBF)/cbfdetectorwrappers.i \ -$(PYCBF)/cbfgenericwrappers.i \ -$(PYCBF)/cbfgoniometerwrappers.i: $(PYCBF)/CBFlib.txt $(PYCBF)/make_pycbf.py - (cd $(PYCBF); $(PYTHON) make_pycbf.py; $(PYSWIG) pycbf.i; $(PYTHON) setup.py build) +$(PY3CBF)/py3cbfinstall: $(PY3CBF)/pycbf.py + (cd $(PY3CBF); $(PYTHON3) $(INSTALLSETUP_PY) install $(PY3CBFIOPT) --prefix=$(CBF_PREFIX)) +$(PY3CBF)/py3cbfuserinstall: $(PY3CBF)/pycbf.py + (cd $(PY3CBF); $(PYTHON3) $(INSTALLSETUP_PY) install $(PY3CBFIOPT) --user) + +$(PY3CBF)/py3setup.py: $(PY3CBF)/py3setup_py.m4 + (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ + -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ + $(PY3CBF)/py3setup_py.m4 > $@) + +$(PY3CBF)/py3setup_MINGW.py: $(PY3CBF)/py3setup_py.m4 + (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ + -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ + $(PY3CBF)/py3setup_py.m4 > $@) + +$(LIB)/_pycbf.$(PY3CBFEXT): $(PY3CBF)/_pycbf.$(PY3CBFEXT) + mkdir -p $(LIB) + cp $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(LIB)/_pycbf.$(PY3CBFEXT) + +$(PY3CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w + (cd $(PY3CBF); \ + $(NUWEB) pycbf; \ + latex pycbf; \ + $(NUWEB) pycbf; \ + latex pycbf; \ + dvipdfm pycbf ) + +$(PY3CBF)/CBFlib.txt: $(DOC)/CBFlib.html + links -dump $(DOC)/CBFlib.html > $(PY3CBF)/CBFlib.txt + +$(PY3CBF)/pycbf.py: $(PY3CBF)/pycbf.pdf $(PY3CBF)/cbfdetectorwrappers.i \ + $(PY3CBF)/cbfgenericwrappers.i \ + $(PY3CBF)/cbfgoniometerwrappers.i \ + $(PY3CBF)/CBFlib.txt $(PY3CBF)/make_pycbf.py + (cd $(PY3CBF); $(PYTHON3) make_pycbf.py; $(PYSWIG) pycbf.i; \ + $(PYTHON3) py3setup.py build; mv pycbf.py rawpycbf.py; \ + echo "# coding=utf-8" | cat - rawpycbf.py > pycbf.py) # # Java bindings @@ -1837,7 +2065,7 @@ $(BIN)/sequence_match: $(LIB)/libcbf.a $(EXAMPLES)/sequence_match.c $(LIB)/libim # # tiff2cbf example program # -$(BIN)/tiff2cbf: $(LIB)/libcbf.a $(EXAMPLES)/tiff2cbf.c \ +$(BIN)/tiff2cbf: $(LIB)/libcbf.a $(EXAMPLES)/tiff2cbf.c $(EXAMPLES)/tif_sprint.c \ $(GOPTLIB) $(GOPTINC) $(TIFF) mkdir -p $(BIN) $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ @@ -1983,13 +2211,6 @@ $(DATADIRO): $(M4)/Makefile.m4 touch $(DATADIRO) -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output.tar.gz) -$(DATADIRS): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLS)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - touch $(DATADIRS) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - - # Input Data Files TESTINPUT_BASIC = example.mar2300 @@ -2039,31 +2260,48 @@ TESTOUTPUT = adscconverted_flat_orig.cbf \ adscconverted_orig.cbf converted_flat_orig.cbf converted_orig.cbf \ insulin_pilatus6mconverted_orig.cbf.h5.cbf \ insulin_pilatus6mconverted_orig.cbf.h5 \ + insulin_pilatus6mconverted_orig.cbf \ insulin_pilatus6mconverted_v2_orig.cbf \ mb_LP_1_001_orig.cbf testcell_orig.prt \ test_xds_bin_testflatout_orig.out \ test_xds_bin_testflatpackedout_orig.out test_fcb_read_testflatout_orig.out \ test_fcb_read_testflatpackedout_orig.out \ XRD1621_orig.cbf XRD1621_I4encbC100_orig.cbf \ - minicbf_orig.h5 + minicbf_orig.h5 \ + pycbf_test1_orig.out \ + pycbf_test2_orig.out \ + pycbf_test3_orig.out \ + pycbf_test4_orig.out \ + fel_test1_orig.out \ + fel_test2_orig.out \ + fel_test3_orig.out NEWTESTOUTPUT = adscconverted_flat.cbf \ adscconverted.cbf converted_flat.cbf converted.cbf \ insulin_pilatus6mconverted.cbf \ insulin_pilatus6mconverted.cbf.h5 \ insulin_pilatus6mconverted.cbf.h5.cbf \ + insulin_pilatus6mconverted_orig.cbf \ insulin_pilatus6mconverted_v2.cbf \ mb_LP_1_001.cbf testcell.prt \ test_xds_bin_testflatout.out \ test_xds_bin_testflatpackedout.out test_fcb_read_testflatout.out \ test_fcb_read_testflatpackedout.out \ XRD1621.cbf XRD1621_I4encbC100.cbf \ - $(MINICBF_TEST)/minicbf.h5 + $(MINICBF_TEST)/minicbf.h5 \ + pycbf_test1.out \ + pycbf_test2.out \ + pycbf_test3.out \ + pycbf_test4.out \ + fel_test1.out \ + fel_test2.out \ + fel_test3.out DATADIRO_OUTPUT = $(DATADIRO)/adscconverted_flat_orig.cbf \ $(DATADIRO)/adscconverted_orig.cbf \ $(DATADIRO)/converted_flat_orig.cbf \ $(DATADIRO)/converted_orig.cbf \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5 \ + $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf \ $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf \ $(DATADIRO)/mb_LP_1_001_orig.cbf \ $(DATADIRO)/testcell_orig.prt \ @@ -2080,6 +2318,7 @@ DATADIRO_OUTPUT_SIGNATURES = $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) \ $(DATADIRO)/converted_orig.cbf$(SEXT) \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ + $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf$(SEXT) \ $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) \ $(DATADIRO)/testcell_orig.prt$(SEXT) \ @@ -2099,6 +2338,7 @@ TESTOUTPUTSIGS = adscconverted_flat_orig.cbf$(SEXT) \ adscconverted_orig.cbf$(SEXT) converted_flat_orig.cbf$(SEXT) converted_orig.cbf$(SEXT) \ insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ + insulin_pilatus6mconverted_orig.cbf$(SEXT) \ insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ mb_LP_1_001_orig.cbf$(SEXT) testcell_orig.prt$(SEXT) \ test_xds_bin_testflatout_orig.out$(SEXT) \ @@ -2106,13 +2346,21 @@ TESTOUTPUTSIGS = adscconverted_flat_orig.cbf$(SEXT) \ test_fcb_read_testflatpackedout_orig.out$(SEXT) \ XRD1621_orig.cbf$(SEXT) \ XRD1621_I4encbC100_orig.cbf$(SEXT) \ - minicbf_orig.h5$(SEXT) + minicbf_orig.h5$(SEXT) \ + pycbf_test1_orig.out$(SEXT) \ + pycbf_test2_orig.out$(SEXT) \ + pycbf_test3_orig.out$(SEXT) \ + pycbf_test4_orig.out$(SEXT) \ + fel_test1_orig.out$(SEXT) \ + fel_test2_orig.out$(SEXT) \ + fel_test3_orig.out$(SEXT) DATADIRS_OUTPUT_SIGNATURES = $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) \ $(DATADIRS)/adscconverted_orig.cbf$(SEXT) \ $(DATADIRS)/converted_flat_orig.cbf$(SEXT) \ $(DATADIRS)/converted_orig.cbf$(SEXT) \ $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ + $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf$(SEXT) \ $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) \ $(DATADIRS)/testcell_orig.prt$(SEXT) \ @@ -2122,7 +2370,14 @@ DATADIRS_OUTPUT_SIGNATURES = $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) \ $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \ $(DATADIRS)/XRD1621_orig.cbf$(SEXT) \ $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) \ - $(DATADIRS)/minicbf_orig.h5$(SEXT) + $(DATADIRS)/minicbf_orig.h5$(SEXT) \ + $(DATADIRS)/pycbf_test1_orig.out$(SEXT) \ + $(DATADIRS)/pycbf_test2_orig.out$(SEXT) \ + $(DATADIRS)/pycbf_test3_orig.out$(SEXT) \ + $(DATADIRS)/pycbf_test4_orig.out$(SEXT) \ + $(DATADIRS)/fel_test1_orig.out$(SEXT) \ + $(DATADIRS)/fel_test2_orig.out$(SEXT) \ + $(DATADIRS)/fel_test3_orig.out$(SEXT) # Fetch Input Data Files @@ -2144,20 +2399,13 @@ $(TESTOUTPUT): $(DATADIRO) $(DATADIRO_OUTPUT) $(DATADIRO_OUTPUT_SIGNATURES) cp $(DATADIRO)/$@$(SEXT) $@$(SEXT) -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) -# Fetch Output Data File Signatures - -$(TESTOUTPUTSIGS): $(DATADIRS) $(DATADIRS_OUTPUT_SIGNATURES) - cp $(DATADIRS)/$@ $@ - - # # Tests # -tests: all $(LIB) $(BIN) symlinksdone basic extra dectristests pycbftests -tests_sigs_only: $(LIB) $(BIN) symlinksdone basic extra_sigs_only +tests: all $(LIB) $(BIN) symlinksdone basic extra dectristests py2cbftests py3cbftests restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) $(SIGNATURE) < adscconverted.cbf > $(DATADIRO)/adscconverted_orig.cbf$(SEXT) @@ -2175,6 +2423,13 @@ restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 $(SIGNATURE) < XRD1621.cbf > $(DATADIRO)/XRD1621_orig.cbf$(SEXT) $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRO)/minicbf_orig.h5$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test1.out > $(DATADIRO)/pycbf_test1_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test2.out > $(DATADIRO)/pycbf_test2_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test3.out > $(DATADIRO)/pycbf_test3_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test4.out > $(DATADIRO)/pycbf_test4_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/fel_test1.out > $(DATADIRO)/fel_test1_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/fel_test2.out > $(DATADIRO)/fel_test2_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/fel_test3.out > $(DATADIRO)/fel_test3_orig.out$(SEXT) cp adscconverted_flat.cbf $(DATADIRO)/adscconverted_flat_orig.cbf$ cp adscconverted.cbf $(DATADIRO)/adscconverted_orig.cbf cp converted_flat.cbf $(DATADIRO)/converted_flat_orig.cbf @@ -2191,25 +2446,15 @@ restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 cp XRD1621.cbf $(DATADIRO)/XRD1621_orig.cbf cp XRD1621_I4encbC100.cbf $(DATADIRO)/XRD1621_I4encbC100_orig.cbf cp $(MINICBF_TEST)/minicbf.h5 $(DATADIRO)/minicbf_orig.h5 - -restore_sigs_only: $(NEWTESTOUTPUT) $(DATADIRS) - $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < adscconverted.cbf > $(DATADIRS)/adscconverted_orig.cbf$(SEXT) - $(SIGNATURE) < converted_flat.cbf > $(DATADIRS)/converted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < converted.cbf > $(DATADIRS)/converted_orig.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5 > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5.cbf > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) - $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) - $(SIGNATURE) < testcell.prt > $(DATADIRS)/testcell_orig.prt$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < XRD1621.cbf > $(DATADIRS)/XRD1621_orig.cbf$(SEXT) - $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) - $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRS)/minicbf_orig.h5$(SEXT) -restore_signatures: restore_output restore_sigs_only + cp $(PY2CBF)/pycbf_test1.out $(DATADIRO)/pycbf_test1_orig.out + cp $(PY2CBF)/pycbf_test2.out $(DATADIRO)/pycbf_test2_orig.out + cp $(PY2CBF)/pycbf_test3.out $(DATADIRO)/pycbf_test3_orig.out + cp $(PY2CBF)/pycbf_test4.out $(DATADIRO)/pycbf_test4_orig.out + cp $(PY2CBF)/fel_test1.out $(DATADIRO)/fel_test1_orig.out + cp $(PY2CBF)/fel_test2.out $(DATADIRO)/fel_test2_orig.out + cp $(PY2CBF)/fel_test3.out $(DATADIRO)/fel_test3_orig.out + +restore_signatures: restore_output # # Basic Tests @@ -2229,9 +2474,12 @@ basic: $(BIN)/makecbf $(BIN)/img2cif $(BIN)/cif2cbf $(TESTINPUT_BASIC) img2cif_canonical.cif cif2cbf_packed.cbf $(LDPREFIX) $(BIN)/cif2cbf -e none -c canonical \ img2cif_packed.cif cif2cbf_canonical.cbf - -cmp cif2cbf_packed.cbf makecbf.cbf - -cmp cif2cbf_packed.cbf img2cif_packed.cbf - -cmp cif2cbf_canonical.cbf img2cif_canonical.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_packed.cbf | diff -a - makecbf.cbf + #-cmp cif2cbf_packed.cbf makecbf.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_packed.cbf | diff -a - img2cif_packed.cbf + #-cmp cif2cbf_packed.cbf img2cif_packed.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_canonical.cbf | diff -a - img2cif_canonical.cbf + #-cmp cif2cbf_canonical.cbf img2cif_canonical.cbf # @@ -2270,21 +2518,27 @@ endif makecbf.cbf cif2cbf_ehcn.cif $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_encp.cbf | diff -a - makecbf.cbf $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf + -cat 9ins.cif |sed "1,1s/10/11/" | sed "2,2s/0.9.5/0.9.7/" | diff -a - 9ins.cbf + #-cmp 9ins.cif 9ins.cbf $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf -F example.mar2300 converted_flat.cbf - -cmp converted_flat.cbf converted_flat_orig.cbf + -cat converted_flat_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - converted_flat.cbf + #-cmp converted_flat.cbf converted_flat_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf example.mar2300 converted.cbf - -cmp converted.cbf converted_orig.cbf + -cat converted_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - converted.cbf + #-cmp converted.cbf converted_orig.cbf -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat > testcell.prt -cmp testcell.prt testcell_orig.prt $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -cmp adscconverted_flat.cbf adscconverted_flat_orig.cbf + -cat adscconverted_flat_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - adscconverted_flat.cbf + #-cmp adscconverted_flat.cbf adscconverted_flat_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -cmp adscconverted.cbf adscconverted_orig.cbf + -cat adscconverted_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - adscconverted.cbf + #-cmp adscconverted.cbf adscconverted_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -cmp mb_LP_1_001.cbf mb_LP_1_001_orig.cbf + -cat mb_LP_1_001_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - mb_LP_1_001.cbf + #-cmp mb_LP_1_001.cbf mb_LP_1_001_orig.cbf ifneq ($(CLEANTESTS),) mv mb_LP_1_001.cbf nmb_LP_1_001.cbf else @@ -2297,12 +2551,17 @@ ifneq ($(CLEANTESTS),) rm nmb_LP_1_001.img endif $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -cmp insulin_pilatus6mconverted.cbf insulin_pilatus6mconverted_rev_orig.cbf + -cat insulin_pilatus6mconverted_orig.cbf | sed "1,1s/1.7.6/1.7.11/" | sed "2,2s/0.9.3/0.9.7/" | diff -a - insulin_pilatus6mconverted.cbf + #-cmp insulin_pilatus6mconverted.cbf insulin_pilatus6mconverted_orig.cbf -$(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -cmp insulin_pilatus6mconverted_v2.cbf insulin_pilatus6mconverted_v2_orig.cbf + -cat insulin_pilatus6mconverted_v2_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - insulin_pilatus6mconverted_v2.cbf + #-cmp insulin_pilatus6mconverted_v2.cbf insulin_pilatus6mconverted_v2_orig.cbf (CBF_CONVERT_MINICBF_PATH=$(BIN); export CBF_CONVERT_MINICBF_PATH; \ $(LDPREFIX) $(EXAMPLES)/batch_convert_minicbf.sh "." "minicbf_test" \ "X4_lots_M1S4_1_*.cbf" $(TEMPLATES)/template_X4_lots_M1S4.cbf) +# +# Starting with insulin_pilatus6mconverted.cbf, create hdf5 files using opaque, encI, encp, encb, encc, encz +# -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ $(TIME) $(BIN)/cif2cbf -5 w -O $(HDF5REGISTER) -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted.cbf.h5) -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ @@ -2315,10 +2574,9 @@ endif $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cc -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encc.cbf.h5) -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cz -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encz.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cl -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encl.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -c2 -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5) +# +# check the default as hdf5 dumps +# -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ $(H5DUMP) insulin_pilatus6mconverted_orig.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted_orig.cbf.h5.dump) -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ @@ -2326,41 +2584,26 @@ endif -$(DIFF) insulin_pilatus6mconverted_orig.cbf.h5.dump insulin_pilatus6mconverted.cbf.h5.dump -rm -f insulin_pilatus6mconverted_orig.cbf.h5.dump -rm -f insulin_pilatus6mconverted.cbf.h5.dump - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_orig.cbf.h5.cbf -o insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf.h5 -o insulin_pilatus6mconverted.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted.cbf.h5.cbf -o insulin_pilatus6mconverted.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encp.cbf.h5 -o insulin_pilatus6mconverted_encp.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encp.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encb.cbf.h5 -o insulin_pilatus6mconverted_encb.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encb.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encI.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encI.cbf.h5.cbf -o insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encc.cbf.h5 -o insulin_pilatus6mconverted_encc.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encc.cbf.h5.cbf -o insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encz.cbf.h5 -o insulin_pilatus6mconverted_encz.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encz.cbf.h5.cbf -o insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encl.cbf.h5 -o insulin_pilatus6mconverted_encl.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encl.cbf.h5.cbf -o insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_enc2.cbf.h5 -o insulin_pilatus6mconverted_enc2.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_enc2.cbf.h5.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -rm -f insulin_pilatus6mconverted*.cbf.h5.eqcI.cbf +# +# Convert each of the non-opaque h5 files to encI cbfs and compare them +# + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encI.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + cp insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encp.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encb.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encc.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encz.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + $(LDPREFIX) $(TINE) $(BIN)/test_cbf_airy_disk $(LDPREFIX) $(TIME) $(BIN)/cbf_testxfelread $(LDPREFIX) $(TIME) $(BIN)/testalloc @@ -2389,14 +2632,18 @@ endif -cd $(MINICBF_TEST); $(DIFF) i19-1.dump i19-2.dump -cd $(MINICBF_TEST); $(DIFF) i19-1.cbf i19-2.cbf $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf + -cat testrealin.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - testrealout.cbf + #-cmp testrealin.cbf testrealout.cbf $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf + -cat testflatin.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - testflatout.cbf + #-cmp testflatin.cbf testflatout.cbf $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf + -cat testflatpackedin.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - testflatpackedout.cbf + #-cmp testflatpackedin.cbf testflatpackedout.cbf ifneq ($(F90C),) $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatout.out) - -$(DIFF) test_xds_bin_testflatout.out test_xds_bin_testflatout_orig.out + -cat test_xds_bin_testflatout_orig.out | sed "2,2s/0.9.6/0.9.7/" | $(DIFF) -a - test_xds_bin_testflatout.out + #-$(DIFF) test_xds_bin_testflatout.out test_xds_bin_testflatout_orig.out $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatpackedout.out) -$(DIFF) test_xds_bin_testflatpackedout.out test_xds_bin_testflatpackedout_orig.out $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatout.out) @@ -2406,109 +2653,59 @@ ifneq ($(F90C),) endif $(LDPREFIX) $(TIME) $(BIN)/sauter_test $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - -$(DIFF) XRD1621.cbf XRD1621_orig.cbf + $(LDPREFIX) $(TIME) $(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf + -cat XRD1621_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - XRD1621.cbf + #-$(DIFF) XRD1621.cbf XRD1621_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(DIFF) XRD1621_I4encbC100.cbf XRD1621_I4encbC100_orig.cbf - -ifneq ($(F90C),) -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf \ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -else -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf\ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -endif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e hex -c none \ - makecbf.cbf cif2cbf_ehcn.cif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ - cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F example.mar2300 converted_flat.cbf - -$(SIGNATURE) < converted_flat.cbf | $(DIFF) - converted_flat_orig.cbf$(SEXT); rm converted_flat.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image example.mar2300 converted.cbf - -$(SIGNATURE) < converted.cbf | $(DIFF) - converted_orig.cbf$(SEXT); rm converted.cbf - -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat | \ - $(SIGNATURE) | $(DIFF) - testcell_orig.prt$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -$(SIGNATURE) < adscconverted_flat.cbf | $(DIFF) - adscconverted_flat_orig.cbf$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -$(SIGNATURE) < adscconverted.cbf | $(DIFF) - adscconverted_orig.cbf$(SEXT); rm adscconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -$(SIGNATURE) < mb_LP_1_001.cbf | $(DIFF) - mb_LP_1_001_orig.cbf$(SEXT) - mv mb_LP_1_001.cbf nmb_LP_1_001.cbf - $(LDPREFIX) $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf - -cmp nmb_LP_1_001.img mb_LP_1_001.img - rm nmb_LP_1_001.cbf - rm nmb_LP_1_001.img - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted.cbf | $(DIFF) - insulin_pilatus6mconverted_rev_orig.cbf$(SEXT); rm insulin_pilatus6mconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf | $(DIFF) - insulin_pilatus6mconverted_v2_orig.cbf$(SEXT); rm insulin_pilatus6mconverted_v2.cbf - $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf -ifneq ($(F90C),) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatpackedout_orig.out$(SEXT) -endif - $(LDPREFIX) $(TIME) $(BIN)/sauter_test - $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(SIGNATURE) < XRD1621.cbf | $(DIFF) - XRD1621_orig.cbf$(SEXT); rm XRD1621.cbf - -$(SIGNATURE) < XRD1621_I4encbC100.cbf | $(DIFF) - XRD1621_I4encbC100_orig.cbf$(SEXT); rm XRD1621_I4encbC100.cbf - @-rm -f adscconverted_flat.cbf - @-rm -f $(TESTINPUT_BASIC) $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) - @-rm -f cif2cbf_packed.cbf makecbf.cbf \ - cif2cbf_packed.cbf img2cif_packed.cbf \ - cif2cbf_canonical.cbf img2cif_canonical.cbf - @-rm -f testrealout.cbf testflatout.cbf testflatpackedout.cbf \ - cif2cbf_encp.cbf img2cif_canonical.cif img2cif_packed.cif 9ins.cbf - + -cat XRD1621_I4encbC100_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - XRD1621_I4encbC100.cbf + #-$(DIFF) XRD1621_I4encbC100.cbf XRD1621_I4encbC100_orig.cbf -pycbftests: $(PYCBF)/_pycbf.$(PYCBFEXT) $(BIN)/cbf_standardize_numbers - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test1.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test2.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test3.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test4.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test1.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test2.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py ../hit-20140306005258847.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test1_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test1.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test2_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test2.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test3_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test3.out - - -pycbfinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfinstall - -pycbfuserinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfuserinstall +py2cbftests: $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(BIN)/cbf_standardize_numbers $(TESTOUTPUT) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test1.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test1.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test1.out $(ROOT)/pycbf_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test2.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test2.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test2.out $(ROOT)/pycbf_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test3.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test3.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test3.out $(ROOT)/pycbf_test3_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test4.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test4.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test4.out $(ROOT)/pycbf_test4_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_testfelaxes.py fel_test1.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) + -(cd $(PY2CBF); $(DIFF) fel_test1.out $(ROOT)/fel_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_testfelaxes.py fel_test2.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) + -(cd $(PY2CBF); $(DIFF) fel_test2.out $(ROOT)/fel_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_testfelaxes.py ../hit-20140306005258847.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) + -(cd $(PY2CBF); $(DIFF) fel_test3.out $(ROOT)/fel_test3_orig.out) + +py2cbfinstall: $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(PY2CBF)/py2cbfinstall + +py2cbfuserinstall: $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(PY2CBF)/py2cbfuserinstall + +py3cbftests: $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(BIN)/cbf_standardize_numbers $(TESTOUTPUT) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test1.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test1.out) + -(cd $(PY3CBF); grep -v "__builtins__" $(ROOT)/pycbf_test1_orig.out | \ + grep -v "__add__" | grep -v "Foundthebinary" > pycbf_test1_orig.out; \ + grep -v "__builtins__" pycbf_test1.out | \ + grep -v "__add__" | grep -v "Foundthebinary" |$(DIFF) - pycbf_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test2.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test2.out) + -(cd $(PY3CBF); $(DIFF) pycbf_test2.out $(ROOT)/pycbf_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test3.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test3.out) + -(cd $(PY3CBF); $(DIFF) pycbf_test3.out $(ROOT)/pycbf_test3_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test4.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test4.out) + -(cd $(PY3CBF); grep -v "__builtins__" $(ROOT)/pycbf_test4_orig.out | \ + grep -v "__add__" | grep -v "Foundthebinary" > pycbf_test4_orig.out; \ + grep -v "__builtins__" pycbf_test4.out | grep -v "__add__" | \ + grep -v "Foundthebinary" | $(DIFF) - pycbf_test4_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_testfelaxes.py fel_test1.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) + -(cd $(PY3CBF); $(DIFF) fel_test1.out $(ROOT)/fel_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_testfelaxes.py fel_test2.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) + -(cd $(PY3CBF); $(DIFF) fel_test2.out $(ROOT)/fel_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_testfelaxes.py ../hit-20140306005258847.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) + -(cd $(PY3CBF); $(DIFF) fel_test3.out $(ROOT)/fel_test3_orig.out) + +py3cbfinstall: $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(PY3CBF)/py3cbfinstall + +py3cbfuserinstall: $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(PY3CBF)/py3cbfuserinstall javatests: $(BIN)/ctestcbf $(BIN)/testcbf.class $(SOLIB)/libcbf_wrap.so $(LDPREFIX) $(BIN)/ctestcbf > testcbfc.txt @@ -2527,13 +2724,13 @@ empty: @-rm -rf $(INCLUDE)/bshuf* @-rm -rf $(INCLUDE)/H5* @-rm -rf $(BIN)/* - @-rm -f $(PYCBF)/_pycbf.$(PYCBFEXT) - @-rm -rf $(PYCBF)/build/* - @-rm -f $(PYCBF)/newtest1.cbf - @-rm -f $(PYCBF)/fel_test1.out - @-rm -f $(PYCBF)/fel_test2.out - @-rm -f $(PYCBF)/setup.py - @-rm -f $(PYCBF)/setup_MINGW.py + @-rm -f $(PY2CBF)/_py2cbf.$(PY2CBFEXT) + @-rm -rf $(PY2CBF)/build/* + @-rm -f $(PY2CBF)/newtest1.cbf + @-rm -f $(PY2CBF)/fel_test1.out + @-rm -f $(PY2CBF)/fel_test2.out + @-rm -f $(PY2CBF)/setup.py + @-rm -f $(PY2CBF)/setup_MINGW.py @-rm -f makecbf.cbf @-rm -f img2cif_packed.cif @-rm -f img2cif_canonical.cif @@ -2617,12 +2814,39 @@ empty: @-rm -f 1191_00005.cbf @-rm -f XRD1621.tif @-rm -f md5tmp - @-rm -rf $(PYCBF)/build + @-rm -rf $(PY2CBF)/build @-rm -f *_old @-rm -f X4_lots_M1S4_1_*.cbf @-rm -f testfile.h5 @-rm -f hit-20140306005258847.cbf @-rm -f build_* + @-rm -rf HDF5Plugin_5Jun21/ + @-rm -rf PyCifRW-4.1/ + @-rm -rf PyCifRW-4.3/ + @-rm -rf bitshuffle-0.2.2.1_15Jun16/ + @-rm -f idx-s00-20131106040304531_flat.cbf + @-rm -f include/iochain.h + @-rm -f include/lz4.h + @-rm -f include/pcre.h + @-rm -f include/pcre_scanner.h + @-rm -f include/pcre_stringpiece.h + @-rm -f include/pcrecpp.h + @-rm -f include/pcrecpparg.h + @-rm -f include/pcreposix.h + @-rm -f include/regex.h + @-rm -f minicbf_test/X4_lots_M1S4_1_0001.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0002.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0003.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0004.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0005.cbf + @-rm -f minicbf_test/minicbf.h5 + @-rm -rf ply-3.2/dist/ + @-rm -f $(PY2CBF)/fel_test3.out + @-rm -f $(PY2CBF)/pycbf.pyc + @-rm -f $(PY2CBF)/pycbf_test1.out + @-rm -f $(PY2CBF)/pycbf_test2.out + @-rm -f $(PY2CBF)/pycbf_test3.out + @-rm -f $(PY2CBF)/pycbf_test4.out ./.undosymlinks # diff --git a/Makefile_MSYS2 b/Makefile_MSYS2 index c2b10fcb..ac200406 100644 --- a/Makefile_MSYS2 +++ b/Makefile_MSYS2 @@ -2,12 +2,12 @@ ###################################################################### # Makefile - command file for make to create CBFlib # # # -# Version 0.9.6 19 May 2020 # +# Version 0.9.7 28 June 2021 # # # # Paul Ellis and # # Herbert J. Bernstein (yaya@bernstein-plus-sons.com) # # # -# (C) Copyright 2006 - 2020 Herbert J. Bernstein # +# (C) Copyright 2006 - 2021 Herbert J. Bernstein # # # ###################################################################### @@ -251,7 +251,7 @@ .DELETE_ON_ERROR: # Version string -VERSION = 0.9.6 +VERSION = 0.9.7 # # Directories @@ -265,7 +265,8 @@ BIN = $(ROOT)/bin SRC = $(ROOT)/src INCLUDE = $(ROOT)/include M4 = $(ROOT)/m4 -PYCBF = $(ROOT)/pycbf +PY2CBF = $(ROOT)/py2cbf +PY3CBF = $(ROOT)/pycbf EXAMPLES = $(ROOT)/examples TEMPLATES= $(ROOT)/templates DECTRIS_EXAMPLES = $(EXAMPLES)/dectris_cbf_template_test @@ -274,7 +275,6 @@ MINICBF_TEST = $(ROOT)/minicbf_test GRAPHICS = $(ROOT)/html_graphics DATADIRI = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Input DATADIRO = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output -DATADIRS = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only CBF_PREFIX ?= $(HOME) # @@ -288,6 +288,19 @@ CBFLIB_DONT_USE_LOCAL_HDF5?=yes CBFLIB_DONT_USE_LZ4?=yes CBFLIB_DONT_USE_BSHUF?=yes +CBFLIB_DONT_USE_LOCAL_NUWEB ?= no +ifeq ($(CBFLIB_DONT_USE_LOCAL_NUWEB),yes) +NUWEB=nuweb +NUWEB_DEP= +NUWEB_DEP2= +else +NUWEB=$(BIN)/nuweb +NUWEB_DEP=nuweb-1.60 +NUWEB_DEP2=$(BIN)/nuweb +endif + + + CBFLIB_DONT_HAVE_FGETLN ?= yes ifeq ($(CBFLIB_DONT_HAVE_FGETLN),yes) SRC_FGETLN = $(SRC)/fgetln.c @@ -296,15 +309,26 @@ SRC_FGETLN = endif -CBFLIB_DONT_USE_PYCIFRW ?= no -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) +CBFLIB_DONT_USE_PY2CIFRW ?= no +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) # -# Definitions to get versions of PyCifRW and PLY +# Definitions to get versions of python2 PyCifRW and PLY # -PYCIFRW ?= PyCifRW-4.1 -PLY = ply-3.2 -PYCIFRWFLAG = -DCBF_USE_PYCIFRW -PYCIFRW_PREFIX ?= $(HOME)/.local +PY2CIFRW ?= PyCifRW-4.1 +PY2PLY = ply-3.2 +PY2CIFRWFLAG = -DCBF_USE_PYCIFRW +PY2CIFRW_PREFIX ?= $(HOME)/.local +endif + +CBFLIB_DONT_USE_PY3CIFRW ?= no +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +# +# Definitions to get versions of python3 PyCifRW and PLY +# +PY3CIFRW ?= PyCifRW-4.3_rev_19Jun21 +PY3PLY = ply-3.11 +PY3CIFRWFLAG = -DCBF_USE_PYCIFRW +PY3CIFRW_PREFIX ?= $(HOME)/.local endif # @@ -321,13 +345,20 @@ TIFF_INSTALL = $(TIFF)_INSTALL ifneq ($(HDF5_PREFIX),) # already installed on system CBFLIB_DONT_USE_LOCAL_HDF5 = yes +HDF5CFLAGS=-DH5_USE_110_API endif ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes) HDF5_PREFIX ?= $(PWD) -HDF5 ?= hdf5-1.10.6 +HDF5 ?= hdf5-1.12.0 +#HDF5 ?= hdf5-1.10.6 #HDF5 = hdf5-1.8.18 #HDF5 = hdf5-1.10.5 +ifeq ($(HDF5),hdf5-1.12.0) +HDF5CFLAGS=-DH5_USE_110_API +else +HDF5CFLAGS= +endif HDF5dep = $(HDF5) HDF5_INSTALL = $(HDF5)_INSTALL ifneq ($(MSYS2),yes) @@ -378,7 +409,7 @@ ifneq ($(CBFLIB_DONT_USE_LZ4),yes) # Definitions to get a version of HDF5Plugin for LZ4 # ifneq ($(MSYS2),yes) -LZ4 ?= HDF5Plugin_14Aug20 +LZ4 ?= HDF5Plugin_5Jun21 else LZ4 ?= HDF5-External-Filter-Plugins endif @@ -429,9 +460,8 @@ endif # # Definition of python to use # -#PYTHON = python -PYTHON ?= python2 - +PYTHON2 ?= python2 +PYTHON3 ?= python3 # # Definitions to get a stable version of regex @@ -538,12 +568,6 @@ PYSWIG = swig -python # JSWIG = swig -java -# -# Program to generate LaTex and HTML program documentation -# - -NUWEB = nuweb - # # Compiler for Java # @@ -596,14 +620,24 @@ endif MISCFLAG = $(NOLLFLAG) $(ULPFLAG) # -# PYCBF definitions +# PY2CBF definitions # -PYCBFEXT = so -PYCBFBOPT = -PYCBFIOPT = +PY2CBFEXT = so +PY2CBFBOPT = +PY2CBFIOPT = SETUP_PY = setup.py INSTALLSETUP_PY = installsetup.py +# +# PY3CBF definitions +# +PY3CBFEXT = so +PY3CBFBOPT = +PY3CBFIOPT = +SETUP_PY = setup.py +INSTALLSETUP_PY = installsetup.py + + # # Set the compiler and flags # @@ -617,7 +651,7 @@ INSTALLSETUP_PY = installsetup.py CC = gcc C++ = g++ CFLAGS = -g -O2 -Wall -D_USE_XOPEN_EXTENDED -DH5_HAVE_WIN32_API \ - -DH5_HAVE_MINGW -DH5_USE_110_API -fno-strict-aliasing + -DH5_HAVE_MINGW -DH5_USE_110_API -fno-strict-aliasing $(HDF5CFLAGS) LDFLAGS = F90C = gfortran F90FLAGS = -g -fno-range-check -fallow-invalid-boz @@ -630,7 +664,8 @@ RUNLDPREFIX = PATH=$(CBF_PREFIX)/lib:$$PATH;export PATH; EXTRALIBS = -L/mingw32/bin -lm -lws2_32 M4FLAGS = -Dfcb_bytes_in_rec=131072 PYTHON = python2 -PYCBFEXT = pyd +PY2CBFEXT = pyd +PY3CBFEXT = pyd TIME = time ifneq ($(NOFORTRAN),) @@ -643,18 +678,24 @@ endif DATAURLBASE = http://downloads.sf.net/cbflib/ DATAURLI = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Input.tar.gz DATAURLO = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output.tar.gz -DATAURLS = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz # # URLs from which to retrieve needed external package snapshots # -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWURL = http://downloads.sf.net/cbflib/$(PYCIFRW).tar.gz -PLYURL = http://www.dabeaz.com/ply/$(PLY).tar.gz +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2CIFRWURL = http://downloads.sf.net/cbflib/$(PY2CIFRW).tar.gz +PY2PLYURL = http://www.dabeaz.com/ply/$(PY2PLY).tar.gz +endif +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3CIFRWURL = http://downloads.sf.net/cbflib/$(PY3CIFRW).tar.gz +PY3PLYURL = http://downloads.sf.net/cbflib/$(PY3PLY).tar.gz endif REGEX_URL ?= http://downloads.sf.net/cbflib/$(REGEX).tar.gz TIFF_URL ?= http://downloads.sf.net/cbflib/$(TIFF).tar.gz HDF5_URL ?= http://downloads.sf.net/cbflib/$(HDF5).tar.gz +ifneq ($(CBFLIB_DONT_USE_LOCAL_NUWEB),yes) +NUWEB_URL ?= http://downloads.sf.net/cbflib/$(NUWEB_DEP).tar.gz +endif ifneq ($(MSYS2),yes) LZ4_URL = http://downloads.sf.net/cbflib/$(LZ4).tar.gz else @@ -671,10 +712,11 @@ INCLUDES = -I$(INCLUDE) -I$(SRC) $(HDF5include) # # runtime library path export commands # -RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export LD_LIBRARY_PATH; \ - DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export DYLD_LIBRARY_PATH; \ - LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib;export LD_RUN_PATH; - +ifeq ($(HDF5_PREFIX),) +RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export LD_LIBRARY_PATH; DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export DYLD_LIBRARY_PATH; LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib;export LD_RUN_PATH; +else +RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib:$(HDF5_PREFIX)/lib;export LD_LIBRARY_PATH; DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib:$(HDF5_PREFIX)/lib;export DYLD_LIBRARY_PATH; LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib:$(HDF5_PREFIX)/lib;export LD_RUN_PATH; +endif ###################################################################### # You should not need to make modifications below this line # @@ -756,8 +798,15 @@ SOURCE = $(SRC)/cbf.c \ $(SRC)/img.c \ $(SRC_FGETLN) $(SRC_REALPATH) -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYSOURCE = $(SRC)/drel_lex.py \ +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2SOURCE = $(SRC)/drel_lex.py \ + $(SRC)/drel_yacc.py \ + $(SRC)/drelc.py \ + $(SRC)/drel_prep.py +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3SOURCE = $(SRC)/drel_lex.py \ $(SRC)/drel_yacc.py \ $(SRC)/drelc.py \ $(SRC)/drel_prep.py @@ -874,6 +923,26 @@ default: @echo ' ' @echo ' $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(PYCIFRWFLAG)' @echo ' ' + @echo ' If you have changed any of the nuweb .w input files, you will need' + @echo ' need nuweb installed, check that CBFLIB_DONT_USE_LOCAL_NUWEB,' + @echo ' and NUWEB are defined correctly :' + @echo ' ' + @echo ' The current values are:' + @echo ' ' + @echo ' CBFLIB_DONT_USE_LOCAL_NUWEB = $(CBFLIB_DONT_USE_LOCAL_NUWEB)' + @echo ' NUWEB = $(NUWEB)' + @echo ' NUWEB_DEP = $(NUWEB_DEP)' + @echo ' NUWEB_DEP2 = $(NUWEB_DEP2)' + @echo ' ' + @echo ' You will need either a system HDF5 1.12 or it to be installed here.' + @echo ' Check that CBFLIB_DONT_USE_LOCAL_HDF5 and HDF5 are defined correctly :' + @echo ' ' + @echo ' The current values are:' + @echo ' ' + @echo ' CBFLIB_DONT_USE_LOCAL_HDF5 = $(CBFLIB_DONT_USE_LOCAL_HDF5)' + @echo ' HDF5 = $(HDF5)' + @echo ' HDF5_PREFIX = $(HDF5_PREFIX)' + @echo ' ' @echo ' Before installing the CBF library and example programs, check' @echo ' that the install directory is correct:' @echo ' ' @@ -905,20 +974,10 @@ default: @echo ' The tests assume that several data files are in the directories' @echo ' $(DATADIRI) and $(DATADIRO)' @echo ' ' - @echo ' Alternatively tests can be run comparing MD5 signatures only by' - @echo ' ' - @echo ' make tests_sigs_only' - @echo ' ' - @echo ' These signature only tests save space and download time by' - @echo ' assuming that input data files and the output signatures' - @echo ' are in the directories' - @echo ' $(DATADIRI) and $(DATADIRS)' - @echo ' ' @echo ' These directory can be obtained from' @echo ' ' @echo ' $(DATAURLI) ' @echo ' $(DATAURLO) ' - @echo ' $(DATAURLS) ' @echo ' ' @echo ' To clean up the directories type:' @echo ' ' @@ -934,10 +993,16 @@ default: # # Compile the library and examples # -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEPS = $(PYCIFRW) $(PLY) +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2CIFRWDEPS = $(PY2CIFRW) $(PY2PLY) +else +PY2CIFRWDEPS = +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3CIFRWDEPS = $(PY3CIFRW) $(PY3PLY) else -PYCIFRWDEPS = +PY3CIFRWDEPS = endif ifneq ($(CBFLIB_DONT_USE_LZ4),yes) @@ -957,7 +1022,8 @@ all:: $(BIN) $(SOURCE) $(F90SOURCE) $(HEADERS) \ $(HDF5) \ $(LZ4DEPS) \ $(BSHUFDEPS) \ - $(PYCIFRWDEPS) \ + $(PY2CIFRWDEPS) \ + $(PY3CIFRWDEPS) \ symlinksdone \ $(REGEXDEP) \ $(LIB) \ @@ -999,92 +1065,101 @@ shared: $(SOLIB)/libcbf.so $(SOLIB)/libfcb.so $(SOLIB)/libimg.so javawrapper: shared $(JCBF) $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEF = -Dcbf_use_pycifrw=yes +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2CIFRWDEF = -Dcbf_use_py2cifrw=yes +else +PY2CIFRWDEF = +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3CIFRWDEF = -Dcbf_use_py3cifrw=yes else -PYCIFRWDEF = +PY3CIFRWDEF = endif -Makefiles: Makefile \ - Makefile_LINUX \ - Makefile_LINUX_64 \ +Makefiles: \ + Makefile \ + Makefile_LINUX \ + Makefile_OSX \ + Makefile_MINGW \ + Makefile_MSYS2 + +Makefiles_pre_0.9.7: \ + Makefile_LINUX_64 \ Makefile_LINUX_gcc42 \ Makefile_LINUX_DMALLOC \ Makefile_LINUX_gcc42_DMALLOC \ - Makefile_OSX \ Makefile_OSX_gcc42 \ Makefile_OSX_gcc42_DMALLOC \ - Makefile_AIX \ - Makefile_MINGW \ - Makefile_MSYS2 \ + Makefile_AIX \ Makefile_IRIX_gcc Makefile_LINUX: $(M4)/Makefile.m4 -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX $(M4)/Makefile.m4 > Makefile_LINUX.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX $(M4)/Makefile.m4 > Makefile_LINUX.tmp mv Makefile_LINUX.tmp Makefile_LINUX Makefile_LINUX_DMALLOC: $(M4)/Makefile.m4 -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_DMALLOC.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_DMALLOC.tmp mv Makefile_LINUX_DMALLOC.tmp Makefile_LINUX_DMALLOC Makefile_LINUX_64: $(M4)/Makefile.m4 -cp Makefile_LINUX_64 Makefile_LINUX_64_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_64 $(M4)/Makefile.m4 > Makefile_LINUX_64.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_64 $(M4)/Makefile.m4 > Makefile_LINUX_64.tmp mv Makefile_LINUX_64.tmp Makefile_LINUX_64 Makefile_LINUX_gcc42: $(M4)/Makefile.m4 -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42 $(M4)/Makefile.m4 > Makefile_LINUX_gcc42.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_gcc42 $(M4)/Makefile.m4 > Makefile_LINUX_gcc42.tmp mv Makefile_LINUX_gcc42.tmp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_DMALLOC: $(M4)/Makefile.m4 -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_gcc42_DMALLOC.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_gcc42_DMALLOC.tmp mv Makefile_LINUX_gcc42_DMALLOC.tmp Makefile_LINUX_gcc42_DMALLOC Makefile_OSX: $(M4)/Makefile.m4 -cp Makefile_OSX Makefile_OSX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX $(M4)/Makefile.m4 > Makefile_OSX.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=OSX $(M4)/Makefile.m4 > Makefile_OSX.tmp mv Makefile_OSX.tmp Makefile_OSX Makefile_OSX_gcc42: $(M4)/Makefile.m4 -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42 $(M4)/Makefile.m4 > Makefile_OSX_gcc42.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=OSX_gcc42 $(M4)/Makefile.m4 > Makefile_OSX_gcc42.tmp mv Makefile_OSX_gcc42.tmp Makefile_OSX_gcc42 Makefile_OSX_gcc42_DMALLOC: $(M4)/Makefile.m4 -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_OSX_gcc42_DMALLOC.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=OSX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_OSX_gcc42_DMALLOC.tmp mv Makefile_OSX_gcc42_DMALLOC.tmp Makefile_OSX_gcc42_DMALLOC Makefile_AIX: $(M4)/Makefile.m4 -cp Makefile_AIX Makefile_AIX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=AIX $(M4)/Makefile.m4 > Makefile_AIX.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=AIX $(M4)/Makefile.m4 > Makefile_AIX.tmp mv Makefile_AIX.tmp Makefile_AIX Makefile_MINGW: $(M4)/Makefile.m4 -cp Makefile_MINGW Makefile_MINGW_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MINGW $(M4)/Makefile.m4 > Makefile_MINGW.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=MINGW $(M4)/Makefile.m4 > Makefile_MINGW.tmp mv Makefile_MINGW.tmp Makefile_MINGW Makefile_MSYS2: $(M4)/Makefile.m4 -cp Makefile_MSYS2 Makefile_MSYS2_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MSYS2 $(M4)/Makefile.m4 > Makefile_MSYS2.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=MSYS2 $(M4)/Makefile.m4 > Makefile_MSYS2.tmp mv Makefile_MSYS2.tmp Makefile_MSYS2 Makefile_IRIX_gcc: $(M4)/Makefile.m4 -cp Makefile_IRIX_gcc Makefile_IRIX_gcc_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=IRIX_gcc $(M4)/Makefile.m4 > Makefile_IRIX_gcc.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=IRIX_gcc $(M4)/Makefile.m4 > Makefile_IRIX_gcc.tmp mv Makefile_IRIX_gcc.tmp Makefile_IRIX_gcc Makefile: $(M4)/Makefile.m4 -cp Makefile Makefile_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=default $(M4)/Makefile.m4 > Makefile.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=default $(M4)/Makefile.m4 > Makefile.tmp mv Makefile.tmp Makefile cbflib.ini: $(M4)/Makefile.m4 @@ -1100,12 +1175,12 @@ symlinksdone: ./.symlinks $(SLFLAGS) touch symlinksdone -install: baseinstall pycbfinstall \ +install: baseinstall py2cbfinstall py3cbfinstall \ $(HDF5_INSTALL) \ $(TIFF_INSTALL) \ $(REGEX_INSTALL) -userinstall: baseinstall pycbfuserinstall \ +userinstall: baseinstall py2cbfuserinstall py3cbfuserinstall \ $(HDF5_INSTALL) \ $(TIFF_INSTALL) \ $(REGEX_INSTALL) @@ -1237,38 +1312,96 @@ endif chmod 755 $(CBF_PREFIX)/bin/batch_convert_minicbf.sh chmod 644 $(CBF_PREFIX)/include/cbflib/*.h -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -# -# PyCifRW -# -build_pycifrw: $(M4)/Makefile.m4 - touch build_pycifrw -$(PYCIFRW): build_pycifrw - -rm -rf $(PYCIFRW) - -rm -rf $(PYCIFRW).tar.gz - $(DOWNLOAD) $(PYCIFRWURL) - tar -xvf $(PYCIFRW).tar.gz - -rm $(PYCIFRW).tar.gz - (cd $(PYCIFRW); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +# +# Py2CifRW +# +build_py2cifrw: $(M4)/Makefile.m4 + touch build_py2cifrw +$(PY2CIFRW): build_py2cifrw + -rm -rf $(PY2CIFRW) + -rm -rf $(PY2CIFRW).tar.gz + $(DOWNLOAD) $(PY2CIFRWURL) + tar -xvf $(PY2CIFRW).tar.gz + -rm $(PY2CIFRW).tar.gz + (cd $(PY2CIFRW); \ + PYTHONPATH=$(PY2CIFRW_PREFIX)/lib/python:$(PY2CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON2) setup.py install --prefix= --home=$(PY2CIFRW_PREFIX) ) + +# +# PY2PLY +# +build_py2ply: $(M4)/Makefile.m4 + touch build_py2ply +$(PY2PLY): build_py2ply + -rm -rf $(PY2PLY) + -rm -rf $(PY2PLY).tar.gz + $(DOWNLOAD) $(PY2PLYURL) + tar -xvf $(PY2PLY).tar.gz + -rm $(PY2PLY).tar.gz + (cd $(PY2PLY); \ + PYTHONPATH=$(PY2CIFRW_PREFIX)/lib/python:$(PY2CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON2) setup.py install --prefix= --home=$(PY2CIFRW_PREFIX) ) +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +# +# Py3CifRW +# +build_py3cifrw: $(M4)/Makefile.m4 + touch build_py3cifrw +$(PY3CIFRW): build_py3cifrw + -rm -rf $(PY3CIFRW) + -rm -rf $(PY3CIFRW).tar.gz + $(DOWNLOAD) $(PY3CIFRWURL) + tar -xvf $(PY3CIFRW).tar.gz + -rm $(PY3CIFRW).tar.gz + (cd $(PY3CIFRW); \ + PYTHONPATH=$(PY3CIFRW_PREFIX)/lib/python:$(PY3CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON3) setup.py install --prefix= --home=$(PY3CIFRW_PREFIX) ) + +# +# PY3PLY +# +build_py3ply: $(M4)/Makefile.m4 + touch build_py3ply +$(PY3PLY): build_py3ply + -rm -rf $(PY3PLY) + -rm -rf $(PY3PLY).tar.gz + $(DOWNLOAD) $(PY3PLYURL) + tar -xvf $(PY3PLY).tar.gz + -rm $(PY3PLY).tar.gz + (cd $(PY3PLY); \ + PYTHONPATH=$(PY3CIFRW_PREFIX)/lib/python:$(PY3CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON3) setup.py install --prefix= --home=$(PY3CIFRW_PREFIX) ) +endif + # -# PLY +# NUWEB # -build_ply: $(M4)/Makefile.m4 - touch build_ply -$(PLY): build_ply - -rm -rf $(PLY) - -rm -rf $(PLY).tar.gz - $(DOWNLOAD) $(PLYURL) - tar -xvf $(PLY).tar.gz - -rm $(PLY).tar.gz - (cd $(PLY); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) +ifneq ($(NUWEB_DEP),'') +$(NUWEB_DEP): + -rm -rf $(NUWEB_DEP) + -rm -rf $(NUWEB_DEP).tar.gz + $(DOWNLOAD) $(NUWEB_URL) + tar -xvf $(NUWEB_DEP).tar.gz + touch $(NUWEB_DEP) + rm $(NUWEB_DEP).tar.gz + +$(NUWEB_DEP2): $(NUWEB_DEP) + (cd $(NUWEB_DEP); make nuweb; cp nuweb $(NUWEB_DEP2)) endif + # # REGEX # @@ -1368,7 +1501,7 @@ ifneq ($(MSYS2),yes) tar -xvf $(LZ4).tar.gz -rm $(LZ4).tar.gz (cp $(LZ4include)/lz4.h $(INCLUDE); \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/lz4.c -o lz4.o; \ + $(CC) $(CFLAGS) $(SOWCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/lz4.c -o lz4.o; \ $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/h5zlz4.c -o h5zlz4.o; \ $(CC) -shared lz4.o h5zlz4.o -o $(SOLIB)/libh5zlz4.so; \ rm lz4.o h5zlz4.o) @@ -1565,53 +1698,147 @@ endif # # Python bindings # -$(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ - $(PYCBF)/$(SETUP_PY) \ - $(PYCBF)/pycbf.i \ - $(PYCBF)/cbfhandlewrappers.i \ - $(PYCBF)/cbfdetectorwrappers.i \ - $(PYCBF)/cbfgenericwrappers.i \ - $(PYCBF)/cbfgoniometerwrappers.i + +$(PY2CBF)/make_pycbf.py: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/make_pycbf.w + (cd $(PY2CBF); $(NUWEB) make_pycbf.w) + +$(PY2CBF)/pycbf.i: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf_i.w + (cd $(PY2CBF); $(NUWEB) pycbf_i.w) + +$(PY2CBF)/py2setup_py.m4 \ +$(PY2CBF)/win32.bat \ +$(PY2CBF)/linux.sh \ +$(PY2CBF)/makeflatascii.py \ +$(PY2CBF)/pycbf_test1.py \ +$(PY2CBF)/pycbf_test2.py \ +$(PY2CBF)/pycbf_test3.py \ +$(PY2CBF)/pycbf_test4.py \ +$(PY2CBF)/pycbf_testfelaxes.py \ +$(PY2CBF)/xmas/readmarheader.py \ +$(PY2CBF)/xmas/xmasheaders.py \ +$(PY2CBF)/xmas/xmas_cif_template.cif : $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w + (cd $(PY2CBF); $(NUWEB) pycbf.w ) + touch $(PY2CBF)/py2setup_py.m4 + +$(PY2CBF)/_py2cbf.$(PY2CBFEXT): $(PY2CBF) shared \ + $(PY2CBF)/py2setup.py \ + $(PY2CBF)/pycbf.i \ + $(PY2CBF)/cbfhandlewrappers.i \ + $(PY2CBF)/cbfdetectorwrappers.i \ + $(PY2CBF)/cbfgenericwrappers.i \ + $(PY2CBF)/cbfgoniometerwrappers.i -cp $(SOLIB)/*.so $(LIB) - (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) + (cd $(PY2CBF); $(PYTHON2) py2setup.py build $(PY2CBFBOPT); cp build/lib*/_py2cbf*.$(PY2CBFEXT) .) -$(PYCBF)/pycbfinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --prefix=$(CBF_PREFIX)) +$(PY2CBF)/py2cbfinstall: $(PY2CBF)/pycbf.py + (cd $(PY2CBF); $(PYTHON2) $(INSTALLSETUP_PY) install $(PY2CBFIOPT) --prefix=$(CBF_PREFIX)) -$(PYCBF)/pycbfuserinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --user) +$(PY2CBF)/py2cbfuserinstall: $(PY2CBF)/pycbf.py + (cd $(PY2CBF); $(PYTHON2) $(INSTALLSETUP_PY) install $(PY2CBFIOPT) --user) -$(PYCBF)/setup.py: $(M4)/setup_py.m4 +$(PY2CBF)/py2setup.py: $(PY2CBF)/py2setup_py.m4 (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) + $(PY2CBF)/py2setup_py.m4 > $@) -$(PYCBF)/setup_MINGW.py: m4/setup_py.m4 +$(PY2CBF)/py2setup_MINGW.py: $(PY2CBF)/setup_py.m4 (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) + $(PY2CBF)/py2setup_py.m4 > $@) -$(LIB)/_pycbf.$(PYCBFEXT): $(PYCBF)/_pycbf.$(PYCBFEXT) +$(LIB)/_py2cbf.$(PY2CBFEXT): $(PY2CBF)/_py2cbf.$(PY2CBFEXT) mkdir -p $(LIB) - cp $(PYCBF)/_pycbf.$(PYCBFEXT) $(LIB)/_pycbf.$(PYCBFEXT) + cp $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(LIB)/_py2cbf.$(PY2CBFEXT) -$(PYCBF)/pycbf.pdf: $(PYCBF)/pycbf.w - (cd $(PYCBF); \ +$(PY2CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w + (cd $(PY2CBF); \ $(NUWEB) pycbf; \ latex pycbf; \ $(NUWEB) pycbf; \ latex pycbf; \ dvipdfm pycbf ) -$(PYCBF)/CBFlib.txt: $(DOC)/CBFlib.html - links -dump $(DOC)/CBFlib.html > $(PYCBF)/CBFlib.txt +$(PY2CBF)/CBFlib.txt: $(DOC)/CBFlib.html + links -dump $(DOC)/CBFlib.html > $(PY2CBF)/CBFlib.txt + +$(PY2CBF)/pycbf.py: $(PY2CBF)/pycbf.pdf $(PY2CBF)/cbfdetectorwrappers.i \ + $(PY2CBF)/cbfgenericwrappers.i \ + $(PY2CBF)/cbfgoniometerwrappers.i \ + $(PY2CBF)/CBFlib.txt $(PY2CBF)/make_pycbf.py + (cd $(PY2CBF); $(PYTHON2) make_pycbf.py; $(PYSWIG) -module py2cbf pycbf.i; \ + $(PYTHON2) py2setup.py build; mv pycbf.py rawpycbf.py; \ + cat rawpycbf.py | sed "s/ _pycbf/ _py2cbf/" > pycbf.py ) + +$(PY3CBF)/make_pycbf.py: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/make_pycbf.w + (cd $(PY3CBF); $(NUWEB) make_pycbf.w) + +$(PY3CBF)/pycbf.i: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf_i.w + (cd $(PY3CBF); $(NUWEB) pycbf_i.w) + +$(PY3CBF)/py3setup_py.m4 \ +$(PY3CBF)/win32.bat \ +$(PY3CBF)/linux.sh \ +$(PY3CBF)/makeflatascii.py \ +$(PY3CBF)/pycbf_test1.py \ +$(PY3CBF)/pycbf_test2.py \ +$(PY3CBF)/pycbf_test3.py \ +$(PY3CBF)/pycbf_test4.py \ +$(PY3CBF)/pycbf_testfelaxes.py \ +$(PY3CBF)/xmas/readmarheader.py \ +$(PY3CBF)/xmas/xmasheaders.py \ +$(PY3CBF)/xmas/xmas_cif_template.cif: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w + (cd $(PY3CBF); $(NUWEB) pycbf.w ) + touch $(PY3CBF)/py3setup_py.m4 + + +$(PY3CBF)/_pycbf.$(PY3CBFEXT): $(PY3CBF) shared \ + $(PY3CBF)/py3setup.py \ + $(PY3CBF)/pycbf.i \ + $(PY3CBF)/cbfhandlewrappers.i \ + $(PY3CBF)/cbfdetectorwrappers.i \ + $(PY3CBF)/cbfgenericwrappers.i \ + $(PY3CBF)/cbfgoniometerwrappers.i + -cp $(SOLIB)/*.so $(LIB) + (cd $(PY3CBF); $(PYTHON3) py3setup.py build $(PY3CBFBOPT); cp build/lib*/_pycbf*.$(PY3CBFEXT) .) -$(PYCBF)/cbfhandlewrappers.i \ -$(PYCBF)/cbfdetectorwrappers.i \ -$(PYCBF)/cbfgenericwrappers.i \ -$(PYCBF)/cbfgoniometerwrappers.i: $(PYCBF)/CBFlib.txt $(PYCBF)/make_pycbf.py - (cd $(PYCBF); $(PYTHON) make_pycbf.py; $(PYSWIG) pycbf.i; $(PYTHON) setup.py build) +$(PY3CBF)/py3cbfinstall: $(PY3CBF)/pycbf.py + (cd $(PY3CBF); $(PYTHON3) $(INSTALLSETUP_PY) install $(PY3CBFIOPT) --prefix=$(CBF_PREFIX)) +$(PY3CBF)/py3cbfuserinstall: $(PY3CBF)/pycbf.py + (cd $(PY3CBF); $(PYTHON3) $(INSTALLSETUP_PY) install $(PY3CBFIOPT) --user) + +$(PY3CBF)/py3setup.py: $(PY3CBF)/py3setup_py.m4 + (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ + -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ + $(PY3CBF)/py3setup_py.m4 > $@) + +$(PY3CBF)/py3setup_MINGW.py: $(PY3CBF)/py3setup_py.m4 + (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ + -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ + $(PY3CBF)/py3setup_py.m4 > $@) + +$(LIB)/_pycbf.$(PY3CBFEXT): $(PY3CBF)/_pycbf.$(PY3CBFEXT) + mkdir -p $(LIB) + cp $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(LIB)/_pycbf.$(PY3CBFEXT) + +$(PY3CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w + (cd $(PY3CBF); \ + $(NUWEB) pycbf; \ + latex pycbf; \ + $(NUWEB) pycbf; \ + latex pycbf; \ + dvipdfm pycbf ) + +$(PY3CBF)/CBFlib.txt: $(DOC)/CBFlib.html + links -dump $(DOC)/CBFlib.html > $(PY3CBF)/CBFlib.txt + +$(PY3CBF)/pycbf.py: $(PY3CBF)/pycbf.pdf $(PY3CBF)/cbfdetectorwrappers.i \ + $(PY3CBF)/cbfgenericwrappers.i \ + $(PY3CBF)/cbfgoniometerwrappers.i \ + $(PY3CBF)/CBFlib.txt $(PY3CBF)/make_pycbf.py + (cd $(PY3CBF); $(PYTHON3) make_pycbf.py; $(PYSWIG) pycbf.i; \ + $(PYTHON3) py3setup.py build; mv pycbf.py rawpycbf.py; \ + echo "# coding=utf-8" | cat - rawpycbf.py > pycbf.py) # # Java bindings @@ -1826,7 +2053,7 @@ $(BIN)/sequence_match: $(LIB)/libcbf.a $(EXAMPLES)/sequence_match.c $(LIB)/libim # # tiff2cbf example program # -$(BIN)/tiff2cbf: $(LIB)/libcbf.a $(EXAMPLES)/tiff2cbf.c \ +$(BIN)/tiff2cbf: $(LIB)/libcbf.a $(EXAMPLES)/tiff2cbf.c $(EXAMPLES)/tif_sprint.c \ $(GOPTLIB) $(GOPTINC) $(TIFF) mkdir -p $(BIN) $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ @@ -1972,13 +2199,6 @@ $(DATADIRO): $(M4)/Makefile.m4 touch $(DATADIRO) -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output.tar.gz) -$(DATADIRS): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLS)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - touch $(DATADIRS) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - - # Input Data Files TESTINPUT_BASIC = example.mar2300 @@ -2028,31 +2248,48 @@ TESTOUTPUT = adscconverted_flat_orig.cbf \ adscconverted_orig.cbf converted_flat_orig.cbf converted_orig.cbf \ insulin_pilatus6mconverted_orig.cbf.h5.cbf \ insulin_pilatus6mconverted_orig.cbf.h5 \ + insulin_pilatus6mconverted_orig.cbf \ insulin_pilatus6mconverted_v2_orig.cbf \ mb_LP_1_001_orig.cbf testcell_orig.prt \ test_xds_bin_testflatout_orig.out \ test_xds_bin_testflatpackedout_orig.out test_fcb_read_testflatout_orig.out \ test_fcb_read_testflatpackedout_orig.out \ XRD1621_orig.cbf XRD1621_I4encbC100_orig.cbf \ - minicbf_orig.h5 + minicbf_orig.h5 \ + pycbf_test1_orig.out \ + pycbf_test2_orig.out \ + pycbf_test3_orig.out \ + pycbf_test4_orig.out \ + fel_test1_orig.out \ + fel_test2_orig.out \ + fel_test3_orig.out NEWTESTOUTPUT = adscconverted_flat.cbf \ adscconverted.cbf converted_flat.cbf converted.cbf \ insulin_pilatus6mconverted.cbf \ insulin_pilatus6mconverted.cbf.h5 \ insulin_pilatus6mconverted.cbf.h5.cbf \ + insulin_pilatus6mconverted_orig.cbf \ insulin_pilatus6mconverted_v2.cbf \ mb_LP_1_001.cbf testcell.prt \ test_xds_bin_testflatout.out \ test_xds_bin_testflatpackedout.out test_fcb_read_testflatout.out \ test_fcb_read_testflatpackedout.out \ XRD1621.cbf XRD1621_I4encbC100.cbf \ - $(MINICBF_TEST)/minicbf.h5 + $(MINICBF_TEST)/minicbf.h5 \ + pycbf_test1.out \ + pycbf_test2.out \ + pycbf_test3.out \ + pycbf_test4.out \ + fel_test1.out \ + fel_test2.out \ + fel_test3.out DATADIRO_OUTPUT = $(DATADIRO)/adscconverted_flat_orig.cbf \ $(DATADIRO)/adscconverted_orig.cbf \ $(DATADIRO)/converted_flat_orig.cbf \ $(DATADIRO)/converted_orig.cbf \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5 \ + $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf \ $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf \ $(DATADIRO)/mb_LP_1_001_orig.cbf \ $(DATADIRO)/testcell_orig.prt \ @@ -2069,6 +2306,7 @@ DATADIRO_OUTPUT_SIGNATURES = $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) \ $(DATADIRO)/converted_orig.cbf$(SEXT) \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ + $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf$(SEXT) \ $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) \ $(DATADIRO)/testcell_orig.prt$(SEXT) \ @@ -2088,6 +2326,7 @@ TESTOUTPUTSIGS = adscconverted_flat_orig.cbf$(SEXT) \ adscconverted_orig.cbf$(SEXT) converted_flat_orig.cbf$(SEXT) converted_orig.cbf$(SEXT) \ insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ + insulin_pilatus6mconverted_orig.cbf$(SEXT) \ insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ mb_LP_1_001_orig.cbf$(SEXT) testcell_orig.prt$(SEXT) \ test_xds_bin_testflatout_orig.out$(SEXT) \ @@ -2095,13 +2334,21 @@ TESTOUTPUTSIGS = adscconverted_flat_orig.cbf$(SEXT) \ test_fcb_read_testflatpackedout_orig.out$(SEXT) \ XRD1621_orig.cbf$(SEXT) \ XRD1621_I4encbC100_orig.cbf$(SEXT) \ - minicbf_orig.h5$(SEXT) + minicbf_orig.h5$(SEXT) \ + pycbf_test1_orig.out$(SEXT) \ + pycbf_test2_orig.out$(SEXT) \ + pycbf_test3_orig.out$(SEXT) \ + pycbf_test4_orig.out$(SEXT) \ + fel_test1_orig.out$(SEXT) \ + fel_test2_orig.out$(SEXT) \ + fel_test3_orig.out$(SEXT) DATADIRS_OUTPUT_SIGNATURES = $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) \ $(DATADIRS)/adscconverted_orig.cbf$(SEXT) \ $(DATADIRS)/converted_flat_orig.cbf$(SEXT) \ $(DATADIRS)/converted_orig.cbf$(SEXT) \ $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ + $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf$(SEXT) \ $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) \ $(DATADIRS)/testcell_orig.prt$(SEXT) \ @@ -2111,7 +2358,14 @@ DATADIRS_OUTPUT_SIGNATURES = $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) \ $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \ $(DATADIRS)/XRD1621_orig.cbf$(SEXT) \ $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) \ - $(DATADIRS)/minicbf_orig.h5$(SEXT) + $(DATADIRS)/minicbf_orig.h5$(SEXT) \ + $(DATADIRS)/pycbf_test1_orig.out$(SEXT) \ + $(DATADIRS)/pycbf_test2_orig.out$(SEXT) \ + $(DATADIRS)/pycbf_test3_orig.out$(SEXT) \ + $(DATADIRS)/pycbf_test4_orig.out$(SEXT) \ + $(DATADIRS)/fel_test1_orig.out$(SEXT) \ + $(DATADIRS)/fel_test2_orig.out$(SEXT) \ + $(DATADIRS)/fel_test3_orig.out$(SEXT) # Fetch Input Data Files @@ -2133,20 +2387,13 @@ $(TESTOUTPUT): $(DATADIRO) $(DATADIRO_OUTPUT) $(DATADIRO_OUTPUT_SIGNATURES) cp $(DATADIRO)/$@$(SEXT) $@$(SEXT) -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) -# Fetch Output Data File Signatures - -$(TESTOUTPUTSIGS): $(DATADIRS) $(DATADIRS_OUTPUT_SIGNATURES) - cp $(DATADIRS)/$@ $@ - - # # Tests # -tests: all $(LIB) $(BIN) symlinksdone basic extra dectristests pycbftests -tests_sigs_only: $(LIB) $(BIN) symlinksdone basic extra_sigs_only +tests: all $(LIB) $(BIN) symlinksdone basic extra dectristests py2cbftests py3cbftests restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) $(SIGNATURE) < adscconverted.cbf > $(DATADIRO)/adscconverted_orig.cbf$(SEXT) @@ -2164,6 +2411,13 @@ restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 $(SIGNATURE) < XRD1621.cbf > $(DATADIRO)/XRD1621_orig.cbf$(SEXT) $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRO)/minicbf_orig.h5$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test1.out > $(DATADIRO)/pycbf_test1_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test2.out > $(DATADIRO)/pycbf_test2_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test3.out > $(DATADIRO)/pycbf_test3_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test4.out > $(DATADIRO)/pycbf_test4_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/fel_test1.out > $(DATADIRO)/fel_test1_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/fel_test2.out > $(DATADIRO)/fel_test2_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/fel_test3.out > $(DATADIRO)/fel_test3_orig.out$(SEXT) cp adscconverted_flat.cbf $(DATADIRO)/adscconverted_flat_orig.cbf$ cp adscconverted.cbf $(DATADIRO)/adscconverted_orig.cbf cp converted_flat.cbf $(DATADIRO)/converted_flat_orig.cbf @@ -2180,25 +2434,15 @@ restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 cp XRD1621.cbf $(DATADIRO)/XRD1621_orig.cbf cp XRD1621_I4encbC100.cbf $(DATADIRO)/XRD1621_I4encbC100_orig.cbf cp $(MINICBF_TEST)/minicbf.h5 $(DATADIRO)/minicbf_orig.h5 - -restore_sigs_only: $(NEWTESTOUTPUT) $(DATADIRS) - $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < adscconverted.cbf > $(DATADIRS)/adscconverted_orig.cbf$(SEXT) - $(SIGNATURE) < converted_flat.cbf > $(DATADIRS)/converted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < converted.cbf > $(DATADIRS)/converted_orig.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5 > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5.cbf > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) - $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) - $(SIGNATURE) < testcell.prt > $(DATADIRS)/testcell_orig.prt$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < XRD1621.cbf > $(DATADIRS)/XRD1621_orig.cbf$(SEXT) - $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) - $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRS)/minicbf_orig.h5$(SEXT) -restore_signatures: restore_output restore_sigs_only + cp $(PY2CBF)/pycbf_test1.out $(DATADIRO)/pycbf_test1_orig.out + cp $(PY2CBF)/pycbf_test2.out $(DATADIRO)/pycbf_test2_orig.out + cp $(PY2CBF)/pycbf_test3.out $(DATADIRO)/pycbf_test3_orig.out + cp $(PY2CBF)/pycbf_test4.out $(DATADIRO)/pycbf_test4_orig.out + cp $(PY2CBF)/fel_test1.out $(DATADIRO)/fel_test1_orig.out + cp $(PY2CBF)/fel_test2.out $(DATADIRO)/fel_test2_orig.out + cp $(PY2CBF)/fel_test3.out $(DATADIRO)/fel_test3_orig.out + +restore_signatures: restore_output # # Basic Tests @@ -2218,9 +2462,12 @@ basic: $(BIN)/makecbf $(BIN)/img2cif $(BIN)/cif2cbf $(TESTINPUT_BASIC) img2cif_canonical.cif cif2cbf_packed.cbf $(LDPREFIX) $(BIN)/cif2cbf -e none -c canonical \ img2cif_packed.cif cif2cbf_canonical.cbf - -cmp cif2cbf_packed.cbf makecbf.cbf - -cmp cif2cbf_packed.cbf img2cif_packed.cbf - -cmp cif2cbf_canonical.cbf img2cif_canonical.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_packed.cbf | diff -a - makecbf.cbf + #-cmp cif2cbf_packed.cbf makecbf.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_packed.cbf | diff -a - img2cif_packed.cbf + #-cmp cif2cbf_packed.cbf img2cif_packed.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_canonical.cbf | diff -a - img2cif_canonical.cbf + #-cmp cif2cbf_canonical.cbf img2cif_canonical.cbf # @@ -2259,21 +2506,27 @@ endif makecbf.cbf cif2cbf_ehcn.cif $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_encp.cbf | diff -a - makecbf.cbf $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf + -cat 9ins.cif |sed "1,1s/10/11/" | sed "2,2s/0.9.5/0.9.7/" | diff -a - 9ins.cbf + #-cmp 9ins.cif 9ins.cbf $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf -F example.mar2300 converted_flat.cbf - -cmp converted_flat.cbf converted_flat_orig.cbf + -cat converted_flat_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - converted_flat.cbf + #-cmp converted_flat.cbf converted_flat_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf example.mar2300 converted.cbf - -cmp converted.cbf converted_orig.cbf + -cat converted_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - converted.cbf + #-cmp converted.cbf converted_orig.cbf -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat > testcell.prt -cmp testcell.prt testcell_orig.prt $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -cmp adscconverted_flat.cbf adscconverted_flat_orig.cbf + -cat adscconverted_flat_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - adscconverted_flat.cbf + #-cmp adscconverted_flat.cbf adscconverted_flat_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -cmp adscconverted.cbf adscconverted_orig.cbf + -cat adscconverted_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - adscconverted.cbf + #-cmp adscconverted.cbf adscconverted_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -cmp mb_LP_1_001.cbf mb_LP_1_001_orig.cbf + -cat mb_LP_1_001_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - mb_LP_1_001.cbf + #-cmp mb_LP_1_001.cbf mb_LP_1_001_orig.cbf ifneq ($(CLEANTESTS),) mv mb_LP_1_001.cbf nmb_LP_1_001.cbf else @@ -2286,12 +2539,17 @@ ifneq ($(CLEANTESTS),) rm nmb_LP_1_001.img endif $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -cmp insulin_pilatus6mconverted.cbf insulin_pilatus6mconverted_rev_orig.cbf + -cat insulin_pilatus6mconverted_orig.cbf | sed "1,1s/1.7.6/1.7.11/" | sed "2,2s/0.9.3/0.9.7/" | diff -a - insulin_pilatus6mconverted.cbf + #-cmp insulin_pilatus6mconverted.cbf insulin_pilatus6mconverted_orig.cbf -$(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -cmp insulin_pilatus6mconverted_v2.cbf insulin_pilatus6mconverted_v2_orig.cbf + -cat insulin_pilatus6mconverted_v2_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - insulin_pilatus6mconverted_v2.cbf + #-cmp insulin_pilatus6mconverted_v2.cbf insulin_pilatus6mconverted_v2_orig.cbf (CBF_CONVERT_MINICBF_PATH=$(BIN); export CBF_CONVERT_MINICBF_PATH; \ $(LDPREFIX) $(EXAMPLES)/batch_convert_minicbf.sh "." "minicbf_test" \ "X4_lots_M1S4_1_*.cbf" $(TEMPLATES)/template_X4_lots_M1S4.cbf) +# +# Starting with insulin_pilatus6mconverted.cbf, create hdf5 files using opaque, encI, encp, encb, encc, encz +# -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ $(TIME) $(BIN)/cif2cbf -5 w -O $(HDF5REGISTER) -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted.cbf.h5) -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ @@ -2304,10 +2562,9 @@ endif $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cc -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encc.cbf.h5) -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cz -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encz.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cl -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encl.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -c2 -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5) +# +# check the default as hdf5 dumps +# -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ $(H5DUMP) insulin_pilatus6mconverted_orig.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted_orig.cbf.h5.dump) -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ @@ -2315,41 +2572,26 @@ endif -$(DIFF) insulin_pilatus6mconverted_orig.cbf.h5.dump insulin_pilatus6mconverted.cbf.h5.dump -rm -f insulin_pilatus6mconverted_orig.cbf.h5.dump -rm -f insulin_pilatus6mconverted.cbf.h5.dump - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_orig.cbf.h5.cbf -o insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf.h5 -o insulin_pilatus6mconverted.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted.cbf.h5.cbf -o insulin_pilatus6mconverted.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encp.cbf.h5 -o insulin_pilatus6mconverted_encp.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encp.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encb.cbf.h5 -o insulin_pilatus6mconverted_encb.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encb.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encI.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encI.cbf.h5.cbf -o insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encc.cbf.h5 -o insulin_pilatus6mconverted_encc.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encc.cbf.h5.cbf -o insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encz.cbf.h5 -o insulin_pilatus6mconverted_encz.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encz.cbf.h5.cbf -o insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encl.cbf.h5 -o insulin_pilatus6mconverted_encl.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encl.cbf.h5.cbf -o insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_enc2.cbf.h5 -o insulin_pilatus6mconverted_enc2.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_enc2.cbf.h5.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -rm -f insulin_pilatus6mconverted*.cbf.h5.eqcI.cbf +# +# Convert each of the non-opaque h5 files to encI cbfs and compare them +# + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encI.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + cp insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encp.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encb.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encc.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encz.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + $(LDPREFIX) $(TINE) $(BIN)/test_cbf_airy_disk $(LDPREFIX) $(TIME) $(BIN)/cbf_testxfelread $(LDPREFIX) $(TIME) $(BIN)/testalloc @@ -2378,14 +2620,18 @@ endif -cd $(MINICBF_TEST); $(DIFF) i19-1.dump i19-2.dump -cd $(MINICBF_TEST); $(DIFF) i19-1.cbf i19-2.cbf $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf + -cat testrealin.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - testrealout.cbf + #-cmp testrealin.cbf testrealout.cbf $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf + -cat testflatin.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - testflatout.cbf + #-cmp testflatin.cbf testflatout.cbf $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf + -cat testflatpackedin.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - testflatpackedout.cbf + #-cmp testflatpackedin.cbf testflatpackedout.cbf ifneq ($(F90C),) $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatout.out) - -$(DIFF) test_xds_bin_testflatout.out test_xds_bin_testflatout_orig.out + -cat test_xds_bin_testflatout_orig.out | sed "2,2s/0.9.6/0.9.7/" | $(DIFF) -a - test_xds_bin_testflatout.out + #-$(DIFF) test_xds_bin_testflatout.out test_xds_bin_testflatout_orig.out $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatpackedout.out) -$(DIFF) test_xds_bin_testflatpackedout.out test_xds_bin_testflatpackedout_orig.out $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatout.out) @@ -2395,109 +2641,59 @@ ifneq ($(F90C),) endif $(LDPREFIX) $(TIME) $(BIN)/sauter_test $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - -$(DIFF) XRD1621.cbf XRD1621_orig.cbf + $(LDPREFIX) $(TIME) $(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf + -cat XRD1621_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - XRD1621.cbf + #-$(DIFF) XRD1621.cbf XRD1621_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(DIFF) XRD1621_I4encbC100.cbf XRD1621_I4encbC100_orig.cbf - -ifneq ($(F90C),) -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf \ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -else -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf\ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -endif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e hex -c none \ - makecbf.cbf cif2cbf_ehcn.cif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ - cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F example.mar2300 converted_flat.cbf - -$(SIGNATURE) < converted_flat.cbf | $(DIFF) - converted_flat_orig.cbf$(SEXT); rm converted_flat.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image example.mar2300 converted.cbf - -$(SIGNATURE) < converted.cbf | $(DIFF) - converted_orig.cbf$(SEXT); rm converted.cbf - -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat | \ - $(SIGNATURE) | $(DIFF) - testcell_orig.prt$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -$(SIGNATURE) < adscconverted_flat.cbf | $(DIFF) - adscconverted_flat_orig.cbf$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -$(SIGNATURE) < adscconverted.cbf | $(DIFF) - adscconverted_orig.cbf$(SEXT); rm adscconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -$(SIGNATURE) < mb_LP_1_001.cbf | $(DIFF) - mb_LP_1_001_orig.cbf$(SEXT) - mv mb_LP_1_001.cbf nmb_LP_1_001.cbf - $(LDPREFIX) $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf - -cmp nmb_LP_1_001.img mb_LP_1_001.img - rm nmb_LP_1_001.cbf - rm nmb_LP_1_001.img - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted.cbf | $(DIFF) - insulin_pilatus6mconverted_rev_orig.cbf$(SEXT); rm insulin_pilatus6mconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf | $(DIFF) - insulin_pilatus6mconverted_v2_orig.cbf$(SEXT); rm insulin_pilatus6mconverted_v2.cbf - $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf -ifneq ($(F90C),) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatpackedout_orig.out$(SEXT) -endif - $(LDPREFIX) $(TIME) $(BIN)/sauter_test - $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(SIGNATURE) < XRD1621.cbf | $(DIFF) - XRD1621_orig.cbf$(SEXT); rm XRD1621.cbf - -$(SIGNATURE) < XRD1621_I4encbC100.cbf | $(DIFF) - XRD1621_I4encbC100_orig.cbf$(SEXT); rm XRD1621_I4encbC100.cbf - @-rm -f adscconverted_flat.cbf - @-rm -f $(TESTINPUT_BASIC) $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) - @-rm -f cif2cbf_packed.cbf makecbf.cbf \ - cif2cbf_packed.cbf img2cif_packed.cbf \ - cif2cbf_canonical.cbf img2cif_canonical.cbf - @-rm -f testrealout.cbf testflatout.cbf testflatpackedout.cbf \ - cif2cbf_encp.cbf img2cif_canonical.cif img2cif_packed.cif 9ins.cbf - + -cat XRD1621_I4encbC100_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - XRD1621_I4encbC100.cbf + #-$(DIFF) XRD1621_I4encbC100.cbf XRD1621_I4encbC100_orig.cbf -pycbftests: $(PYCBF)/_pycbf.$(PYCBFEXT) $(BIN)/cbf_standardize_numbers - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test1.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test2.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test3.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test4.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test1.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test2.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py ../hit-20140306005258847.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test1_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test1.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test2_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test2.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test3_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test3.out - - -pycbfinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfinstall - -pycbfuserinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfuserinstall +py2cbftests: $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(BIN)/cbf_standardize_numbers $(TESTOUTPUT) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test1.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test1.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test1.out $(ROOT)/pycbf_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test2.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test2.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test2.out $(ROOT)/pycbf_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test3.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test3.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test3.out $(ROOT)/pycbf_test3_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test4.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test4.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test4.out $(ROOT)/pycbf_test4_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_testfelaxes.py fel_test1.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) + -(cd $(PY2CBF); $(DIFF) fel_test1.out $(ROOT)/fel_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_testfelaxes.py fel_test2.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) + -(cd $(PY2CBF); $(DIFF) fel_test2.out $(ROOT)/fel_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_testfelaxes.py ../hit-20140306005258847.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) + -(cd $(PY2CBF); $(DIFF) fel_test3.out $(ROOT)/fel_test3_orig.out) + +py2cbfinstall: $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(PY2CBF)/py2cbfinstall + +py2cbfuserinstall: $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(PY2CBF)/py2cbfuserinstall + +py3cbftests: $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(BIN)/cbf_standardize_numbers $(TESTOUTPUT) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test1.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test1.out) + -(cd $(PY3CBF); grep -v "__builtins__" $(ROOT)/pycbf_test1_orig.out | \ + grep -v "__add__" | grep -v "Foundthebinary" > pycbf_test1_orig.out; \ + grep -v "__builtins__" pycbf_test1.out | \ + grep -v "__add__" | grep -v "Foundthebinary" |$(DIFF) - pycbf_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test2.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test2.out) + -(cd $(PY3CBF); $(DIFF) pycbf_test2.out $(ROOT)/pycbf_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test3.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test3.out) + -(cd $(PY3CBF); $(DIFF) pycbf_test3.out $(ROOT)/pycbf_test3_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test4.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test4.out) + -(cd $(PY3CBF); grep -v "__builtins__" $(ROOT)/pycbf_test4_orig.out | \ + grep -v "__add__" | grep -v "Foundthebinary" > pycbf_test4_orig.out; \ + grep -v "__builtins__" pycbf_test4.out | grep -v "__add__" | \ + grep -v "Foundthebinary" | $(DIFF) - pycbf_test4_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_testfelaxes.py fel_test1.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) + -(cd $(PY3CBF); $(DIFF) fel_test1.out $(ROOT)/fel_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_testfelaxes.py fel_test2.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) + -(cd $(PY3CBF); $(DIFF) fel_test2.out $(ROOT)/fel_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_testfelaxes.py ../hit-20140306005258847.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) + -(cd $(PY3CBF); $(DIFF) fel_test3.out $(ROOT)/fel_test3_orig.out) + +py3cbfinstall: $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(PY3CBF)/py3cbfinstall + +py3cbfuserinstall: $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(PY3CBF)/py3cbfuserinstall javatests: $(BIN)/ctestcbf $(BIN)/testcbf.class $(SOLIB)/libcbf_wrap.so $(LDPREFIX) $(BIN)/ctestcbf > testcbfc.txt @@ -2516,13 +2712,13 @@ empty: @-rm -rf $(INCLUDE)/bshuf* @-rm -rf $(INCLUDE)/H5* @-rm -rf $(BIN)/* - @-rm -f $(PYCBF)/_pycbf.$(PYCBFEXT) - @-rm -rf $(PYCBF)/build/* - @-rm -f $(PYCBF)/newtest1.cbf - @-rm -f $(PYCBF)/fel_test1.out - @-rm -f $(PYCBF)/fel_test2.out - @-rm -f $(PYCBF)/setup.py - @-rm -f $(PYCBF)/setup_MINGW.py + @-rm -f $(PY2CBF)/_py2cbf.$(PY2CBFEXT) + @-rm -rf $(PY2CBF)/build/* + @-rm -f $(PY2CBF)/newtest1.cbf + @-rm -f $(PY2CBF)/fel_test1.out + @-rm -f $(PY2CBF)/fel_test2.out + @-rm -f $(PY2CBF)/setup.py + @-rm -f $(PY2CBF)/setup_MINGW.py @-rm -f makecbf.cbf @-rm -f img2cif_packed.cif @-rm -f img2cif_canonical.cif @@ -2606,12 +2802,39 @@ empty: @-rm -f 1191_00005.cbf @-rm -f XRD1621.tif @-rm -f md5tmp - @-rm -rf $(PYCBF)/build + @-rm -rf $(PY2CBF)/build @-rm -f *_old @-rm -f X4_lots_M1S4_1_*.cbf @-rm -f testfile.h5 @-rm -f hit-20140306005258847.cbf @-rm -f build_* + @-rm -rf HDF5Plugin_5Jun21/ + @-rm -rf PyCifRW-4.1/ + @-rm -rf PyCifRW-4.3/ + @-rm -rf bitshuffle-0.2.2.1_15Jun16/ + @-rm -f idx-s00-20131106040304531_flat.cbf + @-rm -f include/iochain.h + @-rm -f include/lz4.h + @-rm -f include/pcre.h + @-rm -f include/pcre_scanner.h + @-rm -f include/pcre_stringpiece.h + @-rm -f include/pcrecpp.h + @-rm -f include/pcrecpparg.h + @-rm -f include/pcreposix.h + @-rm -f include/regex.h + @-rm -f minicbf_test/X4_lots_M1S4_1_0001.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0002.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0003.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0004.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0005.cbf + @-rm -f minicbf_test/minicbf.h5 + @-rm -rf ply-3.2/dist/ + @-rm -f $(PY2CBF)/fel_test3.out + @-rm -f $(PY2CBF)/pycbf.pyc + @-rm -f $(PY2CBF)/pycbf_test1.out + @-rm -f $(PY2CBF)/pycbf_test2.out + @-rm -f $(PY2CBF)/pycbf_test3.out + @-rm -f $(PY2CBF)/pycbf_test4.out ./.undosymlinks # diff --git a/Makefile_MSYS2_save b/Makefile_MSYS2_save deleted file mode 100644 index ec2f81ed..00000000 --- a/Makefile_MSYS2_save +++ /dev/null @@ -1,2605 +0,0 @@ - -###################################################################### -# Makefile - command file for make to create CBFlib # -# # -# Version 0.9.6 19 May 2020 # -# # -# Paul Ellis and # -# Herbert J. Bernstein (yaya@bernstein-plus-sons.com) # -# # -# (C) Copyright 2006 - 2020 Herbert J. Bernstein # -# # -###################################################################### - -###################################################################### -# # -# YOU MAY REDISTRIBUTE THE CBFLIB PACKAGE UNDER THE TERMS OF THE GPL # -# # -# ALTERNATIVELY YOU MAY REDISTRIBUTE THE CBFLIB API UNDER THE TERMS # -# OF THE LGPL # -# # -###################################################################### - -########################### GPL NOTICES ############################## -# # -# This program is free software; you can redistribute it and/or # -# modify it under the terms of the GNU General Public License as # -# published by the Free Software Foundation; either version 2 of # -# (the License, or (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program; if not, write to the Free Software # -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # -# 02111-1307 USA # -# # -###################################################################### - -######################### LGPL NOTICES ############################### -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of the GNU Lesser General Public # -# License as published by the Free Software Foundation; either # -# version 2.1 of the License, or (at your option) any later version. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # -# Lesser General Public License for more details. # -# # -# You should have received a copy of the GNU Lesser General Public # -# License along with this library; if not, write to the Free # -# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # -# MA 02110-1301 USA # -# # -###################################################################### - -###################################################################### -# # -# Stanford University Notices # -# for the CBFlib software package that incorporates SLAC software # -# on which copyright is disclaimed # -# # -# This software # -# ------------- # -# The term "this software", as used in these Notices, refers to # -# those portions of the software package CBFlib that were created by # -# employees of the Stanford Linear Accelerator Center, Stanford # -# University. # -# # -# Stanford disclaimer of copyright # -# -------------------------------- # -# Stanford University, owner of the copyright, hereby disclaims its # -# copyright and all other rights in this software. Hence, anyone # -# may freely use it for any purpose without restriction. # -# # -# Acknowledgement of sponsorship # -# ------------------------------ # -# This software was produced by the Stanford Linear Accelerator # -# Center, Stanford University, under Contract DE-AC03-76SFO0515 with # -# the Department of Energy. # -# # -# Government disclaimer of liability # -# ---------------------------------- # -# Neither the United States nor the United States Department of # -# Energy, nor any of their employees, makes any warranty, express or # -# implied, or assumes any legal liability or responsibility for the # -# accuracy, completeness, or usefulness of any data, apparatus, # -# product, or process disclosed, or represents that its use would # -# not infringe privately owned rights. # -# # -# Stanford disclaimer of liability # -# -------------------------------- # -# Stanford University makes no representations or warranties, # -# express or implied, nor assumes any liability for the use of this # -# software. # -# # -# Maintenance of notices # -# ---------------------- # -# In the interest of clarity regarding the origin and status of this # -# software, this and all the preceding Stanford University notices # -# are to remain affixed to any copy or derivative of this software # -# made or distributed by the recipient and are to be affixed to any # -# copy of software made or distributed by the recipient that # -# contains a copy or derivative of this software. # -# # -# Based on SLAC Software Notices, Set 4 # -# OTT.002a, 2004 FEB 03 # -###################################################################### - - - -###################################################################### -# NOTICE # -# Creative endeavors depend on the lively exchange of ideas. There # -# are laws and customs which establish rights and responsibilities # -# for authors and the users of what authors create. This notice # -# is not intended to prevent you from using the software and # -# documents in this package, but to ensure that there are no # -# misunderstandings about terms and conditions of such use. # -# # -# Please read the following notice carefully. If you do not # -# understand any portion of this notice, please seek appropriate # -# professional legal advice before making use of the software and # -# documents included in this software package. In addition to # -# whatever other steps you may be obliged to take to respect the # -# intellectual property rights of the various parties involved, if # -# you do make use of the software and documents in this package, # -# please give credit where credit is due by citing this package, # -# its authors and the URL or other source from which you obtained # -# it, or equivalent primary references in the literature with the # -# same authors. # -# # -# Some of the software and documents included within this software # -# package are the intellectual property of various parties, and # -# placement in this package does not in any way imply that any # -# such rights have in any way been waived or diminished. # -# # -# With respect to any software or documents for which a copyright # -# exists, ALL RIGHTS ARE RESERVED TO THE OWNERS OF SUCH COPYRIGHT. # -# # -# Even though the authors of the various documents and software # -# found here have made a good faith effort to ensure that the # -# documents are correct and that the software performs according # -# to its documentation, and we would greatly appreciate hearing of # -# any problems you may encounter, the programs and documents any # -# files created by the programs are provided **AS IS** without any * -# warranty as to correctness, merchantability or fitness for any # -# particular or general use. # -# # -# THE RESPONSIBILITY FOR ANY ADVERSE CONSEQUENCES FROM THE USE OF # -# PROGRAMS OR DOCUMENTS OR ANY FILE OR FILES CREATED BY USE OF THE # -# PROGRAMS OR DOCUMENTS LIES SOLELY WITH THE USERS OF THE PROGRAMS # -# OR DOCUMENTS OR FILE OR FILES AND NOT WITH AUTHORS OF THE # -# PROGRAMS OR DOCUMENTS. # -###################################################################### - -###################################################################### -# # -# The IUCr Policy # -# for the Protection and the Promotion of the STAR File and # -# CIF Standards for Exchanging and Archiving Electronic Data # -# # -# Overview # -# # -# The Crystallographic Information File (CIF)[1] is a standard for # -# information interchange promulgated by the International Union of # -# Crystallography (IUCr). CIF (Hall, Allen & Brown, 1991) is the # -# recommended method for submitting publications to Acta # -# Crystallographica Section C and reports of crystal structure # -# determinations to other sections of Acta Crystallographica # -# and many other journals. The syntax of a CIF is a subset of the # -# more general STAR File[2] format. The CIF and STAR File approaches # -# are used increasingly in the structural sciences for data exchange # -# and archiving, and are having a significant influence on these # -# activities in other fields. # -# # -# Statement of intent # -# # -# The IUCr's interest in the STAR File is as a general data # -# interchange standard for science, and its interest in the CIF, # -# a conformant derivative of the STAR File, is as a concise data # -# exchange and archival standard for crystallography and structural # -# science. # -# # -# Protection of the standards # -# # -# To protect the STAR File and the CIF as standards for # -# interchanging and archiving electronic data, the IUCr, on behalf # -# of the scientific community, # -# # -# # holds the copyrights on the standards themselves, * -# # -# # owns the associated trademarks and service marks, and * -# # -# # holds a patent on the STAR File. * -# # -# These intellectual property rights relate solely to the # -# interchange formats, not to the data contained therein, nor to # -# the software used in the generation, access or manipulation of # -# the data. # -# # -# Promotion of the standards # -# # -# The sole requirement that the IUCr, in its protective role, # -# imposes on software purporting to process STAR File or CIF data # -# is that the following conditions be met prior to sale or # -# distribution. # -# # -# # Software claiming to read files written to either the STAR * -# File or the CIF standard must be able to extract the pertinent # -# data from a file conformant to the STAR File syntax, or the CIF # -# syntax, respectively. # -# # -# # Software claiming to write files in either the STAR File, or * -# the CIF, standard must produce files that are conformant to the # -# STAR File syntax, or the CIF syntax, respectively. # -# # -# # Software claiming to read definitions from a specific data * -# dictionary approved by the IUCr must be able to extract any # -# pertinent definition which is conformant to the dictionary # -# definition language (DDL)[3] associated with that dictionary. # -# # -# The IUCr, through its Committee on CIF Standards, will assist # -# any developer to verify that software meets these conformance # -# conditions. # -# # -# Glossary of terms # -# # -# [1] CIF: is a data file conformant to the file syntax defined # -# at http://www.iucr.org/iucr-top/cif/spec/index.html # -# # -# [2] STAR File: is a data file conformant to the file syntax # -# defined at http://www.iucr.org/iucr-top/cif/spec/star/index.html # -# # -# [3] DDL: is a language used in a data dictionary to define data # -# items in terms of "attributes". Dictionaries currently approved # -# by the IUCr, and the DDL versions used to construct these # -# dictionaries, are listed at # -# http://www.iucr.org/iucr-top/cif/spec/ddl/index.html # -# # -# Last modified: 30 September 2000 # -# # -# IUCr Policy Copyright (C) 2000 International Union of # -# Crystallography # -###################################################################### - -.DELETE_ON_ERROR: - -# Version string -VERSION = 0.9.6 - -# -# Directories -# -ROOT = $(PWD) -LIB = $(ROOT)/lib -SOLIB = $(ROOT)/solib -JCBF = $(ROOT)/jcbf -JAVADIR = $(ROOT)/java -BIN = $(ROOT)/bin -SRC = $(ROOT)/src -INCLUDE = $(ROOT)/include -M4 = $(ROOT)/m4 -PYCBF = $(ROOT)/pycbf -EXAMPLES = $(ROOT)/examples -TEMPLATES= $(ROOT)/templates -DECTRIS_EXAMPLES = $(EXAMPLES)/dectris_cbf_template_test -DOC = $(ROOT)/doc -MINICBF_TEST = $(ROOT)/minicbf_test -GRAPHICS = $(ROOT)/html_graphics -DATADIRI = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Input -DATADIRO = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output -DATADIRS = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only -CBF_PREFIX ?= $(HOME) - -# -# Comment out the next line if scratch test files should be retained -# -CLEANTESTS = yes - - -MSYS2=yes -CBFLIB_DONT_USE_LOCAL_HDF5?=yes - -CBFLIB_DONT_HAVE_FGETLN ?= yes -ifeq ($(CBFLIB_DONT_HAVE_FGETLN),yes) -SRC_FGETLN = $(SRC)/fgetln.c -else -SRC_FGETLN = -endif - - -CBFLIB_DONT_USE_PYCIFRW ?= no -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -# -# Definitions to get versions of PyCifRW and PLY -# -PYCIFRW ?= PyCifRW-4.1 -PLY = ply-3.2 -PYCIFRWFLAG = -DCBF_USE_PYCIFRW -PYCIFRW_PREFIX ?= $(HOME)/.local -endif - -# -# Definition to get a version of tifflib to support tiff2cbf -# -TIFF ?= tiff-4.0.6_rev_3Nov16 -TIFF_PREFIX ?= $(PWD) -TIFF_INSTALL = $(TIFF)_INSTALL - - -# -# Definitions to get a version of HDF5 -# -HDF5_PREFIX ?= $(PWD) - -ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes) -HDF5 ?= hdf5-1.10.6 -#HDF5 = hdf5-1.8.18 -#HDF5 = hdf5-1.10.5 -HDF5dep = $(HDF5) -HDF5_INSTALL = $(HDF5)_INSTALL -ifneq ($(MSYS2),yes) -HDF5LIBS_LOCAL = $(LIB)/libhdf5.a -HDF5LIBS_SYSTEM = -lz -ldl -HDF5SOLIBS_LOCAL = -L$(LIB) -lhdf5 -HDF5SOLIBS_SYSTEM = -lz -else -HDF5LIBS_LOCAL = -L $(LIB) -lhdf5 -lhdf5.dll -HDF5LIBS_SYSTEM = -lz -ldl -HDF5SOLIBS_LOCAL = -L$(LIB) -lhdf5 -lhdf5.dll -HDF5SOLIBS_SYSTEM = -lz -endif -HDF5REGISTER ?= --register manual -else -HDF5 = -HDF5dep = -HDF5_INSTALL = -HDF5LIBS_LOCAL = -ifneq ($(MSYS2),yes) -HDF5LIBS_SYSTEM = -L$(HDF5_PREFIX)/lib -lhdf5 -lz -ldl -HDF5SOLIBS_LOCAL = -HDF5SOLIBS_SYSTEM = -L$(HDF5_PREFIX)/lib -lhdf5 -lz -else -HDF5LIBS_SYSTEM = -L$(HDF5_PREFIX)/lib -lhdf5 -lhdf5.dll -lz -ldl -HDF5SOLIBS_LOCAL = -HDF5SOLIBS_SYSTEM = -L$(HDF5_PREFIX)/lib -lhdf5 -lhdf5.dll -lz -endif -HDF5REGISTER ?= --register manual -endif -ifneq ($(MSYS2),yes) -H5DUMP = $(HDF5_PREFIX)/bin/h5dump -else -H5DUMP = /MINGW32/bin/h5dump -endif - -CBFLIB_DONT_USE_LZ4 ?= no -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -# -# Definitions to get a version of HDF5Plugin for LZ4 -# -LZ4 ?= HDF5-External-Filter-Plugins -LZ4dep = $(LZ4) -LZ4src = $(LZ4)/src -LZ4include = $(LZ4)/include -LZ4SOLIBS = -L$(SOLIB) -lh5zlz4 -else -LZ4SOLIBS = -LZ4dep = -endif - -CBFLIB_DONT_USE_BSHUF ?= no -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -# -# Definitions to get a version of HDF5Plugin for BSHUFFLE WITH LZ4 -# -BSHUF ?= bitshuffle-0.2.2.1_15Jun16 -BSUFdep = $(BSHUF) -BSHUFsrc = $(BSHUF)/src -BSHUFinclude = $(BSHUF)/src -BSHUFSOLIBS = -L$(SOLIB) -lh5zbshuf -BSHUFFILTER = libbshuf_h5filter -else -BSHUFSOLIBS = -BSHUFdep = -endif - -CBFLIB_DONT_USE_BLOSC ?= no -ifneq ($(CBFLIB_DONT_USE_BLOSC),yes) -# -# Definitions to get a version of HDF5Plugin for BLOSC -# -BLOSC = ?c-blosc_4Sep16.tar.gz -BLOSCdep = $(BLOSC) -BLOSCFILTER = hdf5-blosc_2Sep16.tar.gz -BLOSCsrc = $(BLOSC)/src -BLOSCinclude = $(BLOSC)/src -BLOSCSOLIBS = -L$(SOLIB) -lh5zbshuf -BLOSCFILTER = libbshuf_h5filter -else -BLOSCSOLIBS = -BLOSCdep = -endif - - - -# -# Definition of python to use -# -#PYTHON = python -PYTHON ?= python2 - - -# -# Definitions to get a stable version of regex -# -REGEX_PREFIX ?= $(PWD) -ifneq ($(REGEX_PREFIX),$(PWD)) -CBFLIB_DONT_USE_LOCAL_REGEX ?= yes -endif - - -REGEX_LIBDIR ?= $(REGEX_PREFIX)/lib -ifneq ($(CBFLIB_DONT_USE_LOCAL_REGEX),yes) -REGEX ?= pcre-8.38 -REGEXDEP = $(REGEX) -REGEX_INSTALL = $(REGEX)_INSTALL -REGEX_LIB ?= pcreposix -REGEX_LIB2 ?= pcre -ifneq ($(MSYS2),yes) -REGEX_LIBS ?= -L $(REGEX_LIBDIR) -l$(REGEX_LIB) -l$(REGEX_LIB2) -REGEX_LIBS_STATIC = $(LIB)/libpcreposix.a $(LIB)/libpcre.a -else -REGEX_LIBS ?= -L $(REGEX_LIBDIR) -l$(REGEX_LIB) -l$(REGEX_LIB).dll -l$(REGEX_LIB2) -l$(REGEX_LIB2).dll -REGEX_LIBS_STATIC = $(REGEX_LIBS) -endif -REGEX_INCLUDES ?= -I $(REGEX_PREFIX) -else -REGEX = -REGEXDEP = -REGEX_INSTALL = -REGEX_LIB ?= -REGEX_LIB2 ?= -REGEX_LIBS ?= -REGEX_INCLUDES ?= -endif - - -# Program to use to retrieve a URL - -DOWNLOAD ?= wget -N -#DOWNLOAD ?= curl -O -L - -# Flag to control symlinks versus copying - -SLFLAGS = --use_ln -LN = ln -s -f - -# -# Program to use to pack shars -# -SHAR = /usr/bin/shar -#SHAR = /usr/local/bin/gshar - -# -# Program to use to create archives -# -AR = /usr/bin/ar - -# -# Program to use to add an index to an archive -# -RANLIB = /usr/bin/ranlib - - -# -# Program to use to generate a signature -# -#SIGNATURE ?= /usr/bin/openssl dgst -md5 -#SIGNATURE ?= (/usr/bin/openssl dgst -md5 | sed "s/^.*= //") -SIGNATURE ?= ( cat > md5tmp; cmake -E md5sum md5tmp| sed "s/ .*//") - -# -# Pipe command to extract all but the first line of a text file -# -ALLBUTONE = tail -n +2 - - -# -# Extension for signatures of files -# -SEXT = .md5 - -# Default shell - -SHELL = bash - -# call to time a command - -#TIME = -#TIME = time - -# -# Program to display differences between files -# -DIFF = diff -u -b - - -# -# Program to generate wrapper classes for Python -# -PYSWIG = swig -python - -# -# Program to generate wrapper classes for Java -# -JSWIG = swig -java - -# -# Program to generate LaTex and HTML program documentation -# - -NUWEB = nuweb - -# -# Compiler for Java -# -JAVAC = javac - -# -# Java archiver for compiled classes -# -JAR = jar - -# -# Java SDK root directory -# -ifeq ($(JDKDIR),) - JDKDIR = /usr/lib/java -endif - -ifneq ($(CBF_DONT_USE_LONG_LONG),) -NOLLFLAG = -DCBF_DONT_USE_LONG_LONG -else -NOLLFLAG = -endif - -ifneq ($(CBF_NO_REGEX),) -CBF_REGEXFLAG = -DCBF_NO_REGEX -else -CBF_REGEXFLAG = -DCBF_REGEXLIB_REGEX -endif - -ifneq ($(CBF_USE_ULP),) -ULPFLAG = -DCBF_USE_ULP -else -ULPFLAG = -endif - -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -LZ4FLAG = -DCBF_H5Z_USE_LZ4 -else -LZ4FLAG = -endif - -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -BSHUFFLAG = -DCBF_H5Z_USE_BSHUF -else -BSHUFFLAG = -endif - - - -MISCFLAG = $(NOLLFLAG) $(ULPFLAG) - -# -# PYCBF definitions -# -PYCBFEXT = so -PYCBFBOPT = -PYCBFIOPT = -SETUP_PY = setup.py -INSTALLSETUP_PY = installsetup.py - -# -# Set the compiler and flags -# - -######################################################### -# -# Appropriate compiler definitions for MSYS2 -# -######################################################### - -CC = gcc -C++ = g++ -CFLAGS = -g -O2 -Wall -D_USE_XOPEN_EXTENDED -DH5_HAVE_WIN32_API \ - -DH5_HAVE_MINGW -DH5_USE_110_API -fno-strict-aliasing -LDFLAGS = -F90C = gfortran -F90FLAGS = -g -fno-range-check -fallow-invalid-boz -F90LDFLAGS = -SOCFLAGS = -fPIC -SOLDFLAGS = -shared -Wl,-rpath,$(CBF_PREFIX)/lib -JAVAINCLUDES = -I$(JDKDIR)/include -I$(JDKDIR)/include/linux -LDPREFIX = PATH=$(SOLIB):$$PATH;export PATH; -RUNLDPREFIX = PATH=$(CBF_PREFIX)/lib:$$PATH;export PATH; -EXTRALIBS = -L/mingw32/bin -lm -lws2_32 -M4FLAGS = -Dfcb_bytes_in_rec=131072 -PYTHON = python2 -PYCBFEXT = pyd -TIME = time - -ifneq ($(NOFORTRAN),) -F90C = -endif - -# -# URLs from which to retrieve the data directories -# -DATAURLBASE = http://downloads.sf.net/cbflib/ -DATAURLI = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Input.tar.gz -DATAURLO = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output.tar.gz -DATAURLS = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz - -# -# URLs from which to retrieve needed external package snapshots -# -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWURL = http://downloads.sf.net/cbflib/$(PYCIFRW).tar.gz -PLYURL = http://www.dabeaz.com/ply/$(PLY).tar.gz -endif -REGEX_URL ?= http://downloads.sf.net/cbflib/$(REGEX).tar.gz -TIFF_URL ?= http://downloads.sf.net/cbflib/$(TIFF).tar.gz -HDF5_URL ?= http://downloads.sf.net/cbflib/$(HDF5).tar.gz -LZ4_URL = http://www.github.com/yayahjb/$(LZ4).git -BSHUFURL = http://downloads.sf.net/cbflib/$(BSHUF).tar.gz - - -# -# Include directories -# -INCLUDES = -I$(INCLUDE) -I$(SRC) -I$(HDF5_PREFIX)/include -I$(HDF5)/hdf5/include - -# -# runtime library path export commands -# -RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export LD_LIBRARY_PATH; \ - DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export DYLD_LIBRARY_PATH; \ - LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib;export LD_RUN_PATH; - - -###################################################################### -# You should not need to make modifications below this line # -###################################################################### - -ifneq ($(CBF_USE_ULP),) -SRC_CBF_ULP_C = $(SRC)/cbf_ulp.c -INCLUDE_CBF_ULP_H = $(INCLUDE)/cbf_ulp.h -BIN_TESTULP = $(BIN)/testulp -else -SRC_CBF_ULP_C = -INCLUyDE_CBF_ULP_H = -BIN_TESTULP = -endif - -ifneq ($(MSYS2),yes) -SRC_REALPATH = -else -SRC_REALPATH = $(SRC)/realpath.c -endif - - -# -# Suffixes of files to be used or built -# -.SUFFIXES: .c .o .f90 .m4 - -.m4.f90: - m4 -P $(M4FLAGS) $< > $@ - -ifneq ($(F90C),) -.f90.o: - $(F90C) $(F90FLAGS) -c $< -o $@ -endif - - -# -# Common dependencies -# -COMMONDEP = $(M4)/Makefile.m4 - -# -# Source files -# - -SOURCE = $(SRC)/cbf.c \ - $(SRC)/cbf_airy_disk.c \ - $(SRC)/cbf_alloc.c \ - $(SRC)/cbf_ascii.c \ - $(SRC)/cbf_binary.c \ - $(SRC)/cbf_byte_offset.c \ - $(SRC)/cbf_canonical.c \ - $(SRC)/cbf_codes.c \ - $(SRC)/cbf_compress.c \ - $(SRC)/cbf_context.c \ - $(SRC)/cbf_copy.c \ - $(SRC)/cbf_file.c \ - $(SRC)/cbf_getopt.c \ - $(SRC)/cbf_hdf5.c \ - $(SRC)/cbf_hdf5_filter.c \ - $(SRC)/cbf_lex.c \ - $(SRC)/cbf_minicbf_header.c\ - $(SRC)/cbf_nibble_offset.c \ - $(SRC)/cbf_packed.c \ - $(SRC)/cbf_predictor.c \ - $(SRC)/cbf_read_binary.c \ - $(SRC)/cbf_read_mime.c \ - $(SRC)/cbf_simple.c \ - $(SRC)/cbf_string.c \ - $(SRC)/cbf_stx.c \ - $(SRC)/cbf_tree.c \ - $(SRC_CBF_ULP_C) \ - $(SRC)/cbf_uncompressed.c \ - $(SRC)/cbf_write.c \ - $(SRC)/cbf_write_binary.c \ - $(SRC)/cbf_ws.c \ - $(SRC)/cbff.c \ - $(SRC)/md5c.c \ - $(SRC)/img.c \ - $(SRC_FGETLN) $(SRC_REALPATH) - -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYSOURCE = $(SRC)/drel_lex.py \ - $(SRC)/drel_yacc.py \ - $(SRC)/drelc.py \ - $(SRC)/drel_prep.py -endif - -F90SOURCE = $(SRC)/fcb_atol_wcnt.f90 \ - $(SRC)/fcb_ci_strncmparr.f90 \ - $(SRC)/fcb_exit_binary.f90 \ - $(SRC)/fcb_nblen_array.f90 \ - $(SRC)/fcb_next_binary.f90 \ - $(SRC)/fcb_open_cifin.f90 \ - $(SRC)/fcb_packed.f90 \ - $(SRC)/fcb_read_bits.f90 \ - $(SRC)/fcb_read_byte.f90 \ - $(SRC)/fcb_read_image.f90 \ - $(SRC)/fcb_read_line.f90 \ - $(SRC)/fcb_read_xds_i2.f90 \ - $(SRC)/fcb_skip_whitespace.f90 - - -# -# Header files -# -HEADERS = $(INCLUDE)/cbf.h \ - $(INCLUDE)/cbf_airy_disk.h \ - $(INCLUDE)/cbf_alloc.h \ - $(INCLUDE)/cbf_ascii.h \ - $(INCLUDE)/cbf_binary.h \ - $(INCLUDE)/cbf_byte_offset.h \ - $(INCLUDE)/cbf_canonical.h \ - $(INCLUDE)/cbf_codes.h \ - $(INCLUDE)/cbf_compress.h \ - $(INCLUDE)/cbf_context.h \ - $(INCLUDE)/cbf_copy.h \ - $(INCLUDE)/cbf_file.h \ - $(INCLUDE)/cbf_getopt.h \ - $(INCLUDE)/cbf_hdf5.h \ - $(INCLUDE)/cbf_hdf5_filter.h \ - $(INCLUDE)/cbf_lex.h \ - $(INCLUDE)/cbf_minicbf_header.h\ - $(INCLUDE)/cbf_nibble_offset.h \ - $(INCLUDE)/cbf_packed.h \ - $(INCLUDE)/cbf_predictor.h \ - $(INCLUDE)/cbf_read_binary.h \ - $(INCLUDE)/cbf_read_mime.h \ - $(INCLUDE)/cbf_simple.h \ - $(INCLUDE)/cbf_string.h \ - $(INCLUDE)/cbf_stx.h \ - $(INCLUDE)/cbf_tree.h \ - $(INCLUDE)/cbf_uncompressed.h \ - $(INCLUDE_CBF_ULP_H) \ - $(INCLUDE)/cbf_write.h \ - $(INCLUDE)/cbf_write_binary.h \ - $(INCLUDE)/cbf_ws.h \ - $(INCLUDE)/global.h \ - $(INCLUDE)/cbff.h \ - $(INCLUDE)/md5.h \ - $(INCLUDE)/img.h - -# -# m4 macro files -# -M4FILES = $(M4)/fcblib_defines.m4 \ - $(M4)/fcb_exit_binary.m4 \ - $(M4)/fcb_next_binary.m4 \ - $(M4)/fcb_open_cifin.m4 \ - $(M4)/fcb_packed.m4 \ - $(M4)/fcb_read_bits.m4 \ - $(M4)/fcb_read_image.m4 \ - $(M4)/fcb_read_xds_i2.m4 \ - $(M4)/test_fcb_read_image.m4 \ - $(M4)/test_xds_binary.m4 - - -# -# Documentation files -# -DOCUMENTS = $(DOC)/CBFlib.html \ - $(DOC)/CBFlib.txt \ - $(DOC)/CBFlib_NOTICES.html \ - $(DOC)/CBFlib_NOTICES.txt \ - $(DOC)/ChangeLog \ - $(DOC)/ChangeLog.html \ - $(DOC)/MANIFES \ - $(DOC)/gpl.txt $(DOC)/lgpl.txt - -# -# HTML Graphics files -# -JPEGS = $(GRAPHICS)/CBFbackground.jpg \ - $(GRAPHICS)/CBFbig.jpg \ - $(GRAPHICS)/CBFbutton.jpg \ - $(GRAPHICS)/cbflibbackground.jpg\ - $(GRAPHICS)/cbflibbig.jpg \ - $(GRAPHICS)/cbflibbutton.jpg \ - $(GRAPHICS)/cifhome.jpg \ - $(GRAPHICS)/iucrhome.jpg \ - $(GRAPHICS)/noticeButton.jpg - - -# -# Default: instructions -# -default: - @echo ' ' - @echo '***************************************************************' - @echo ' ' - @echo ' PLEASE READ README and doc/CBFlib_NOTICES.txt' - @echo ' ' - @echo ' Before making the CBF library and example programs, check' - @echo ' that the C compiler name and flags are correct:' - @echo ' ' - @echo ' The current values are:' - @echo ' ' - @echo ' $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(PYCIFRWFLAG)' - @echo ' ' - @echo ' Before installing the CBF library and example programs, check' - @echo ' that the install directory is correct:' - @echo ' ' - @echo ' The current value :' - @echo ' ' - @echo ' $(CBF_PREFIX) ' - @echo ' ' - @echo ' To compile the CBF library and example programs type:' - @echo ' ' - @echo ' make clean' - @echo ' make all' - @echo ' ' - @echo ' To compile the CBF library as a shared object library, type:' - @echo ' ' - @echo ' make shared' - @echo ' ' - @echo ' To compile the Java wrapper classes for CBF library, type:' - @echo ' ' - @echo ' make javawrapper' - @echo ' ' - @echo ' To run a set of tests type:' - @echo ' ' - @echo ' make tests' - @echo ' ' - @echo ' To run some java tests type:' - @echo ' ' - @echo ' make javatests' - @echo ' ' - @echo ' The tests assume that several data files are in the directories' - @echo ' $(DATADIRI) and $(DATADIRO)' - @echo ' ' - @echo ' Alternatively tests can be run comparing MD5 signatures only by' - @echo ' ' - @echo ' make tests_sigs_only' - @echo ' ' - @echo ' These signature only tests save space and download time by' - @echo ' assuming that input data files and the output signatures' - @echo ' are in the directories' - @echo ' $(DATADIRI) and $(DATADIRS)' - @echo ' ' - @echo ' These directory can be obtained from' - @echo ' ' - @echo ' $(DATAURLI) ' - @echo ' $(DATAURLO) ' - @echo ' $(DATAURLS) ' - @echo ' ' - @echo ' To clean up the directories type:' - @echo ' ' - @echo ' make clean' - @echo ' ' - @echo ' To install the library and binaries type:' - @echo ' ' - @echo ' make install' - @echo ' ' - @echo '***************************************************************' - @echo ' ' - -# -# Compile the library and examples -# -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEPS = $(PYCIFRW) $(PLY) -else -PYCIFRWDEPS = -endif - -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -LZ4DEPS = $(LZ4) -else -LZ4DEPS = -endif - -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -BSHUFDEPS = $(BSHUF) -else -BSHUFDEPS = -endif - - -all:: $(BIN) $(SOURCE) $(F90SOURCE) $(HEADERS) \ - $(HDF5) \ - $(LZ4DEPS) \ - $(BSHUFDEPS) \ - $(PYCIFRWDEPS) \ - symlinksdone \ - $(REGEXDEP) \ - $(LIB) \ - $(LIB)/libcbf.a \ - $(LIB)/libfcb.a \ - $(LIB)/libimg.a \ - $(BIN)/adscimg2cbf \ - $(BIN)/arvai_test \ - $(BIN)/cbf2adscimg \ - $(BIN)/cbf2nexus \ - $(BIN)/cif2c \ - $(BIN)/cif2cbf \ - $(BIN)/cbf_standardize_numbers \ - $(BIN)/convert_image \ - $(BIN)/convert_minicbf\ - $(BIN)/img2cif \ - $(BIN)/makecbf \ - $(BIN)/minicbf2nexus \ - $(BIN)/nexus2cbf \ - $(BIN)/roi_peaksearch \ - $(BIN)/sequence_match \ - $(BIN)/testcell \ - $(BIN)/testalloc \ - $(BIN)/testreals \ - $(BIN)/testflat \ - $(BIN)/testflatpacked \ - $(BIN)/testhdf5 \ - $(BIN_TESTULP) \ - $(BIN)/tiff2cbf \ - $(BIN)/test_cbf_airy_disk \ - $(BIN)/cbf_testxfelread - -ifneq ($(F90C),) -all:: $(BIN)/test_xds_binary \ - $(BIN)/test_fcb_read_image -endif - -shared: $(SOLIB)/libcbf.so $(SOLIB)/libfcb.so $(SOLIB)/libimg.so - -javawrapper: shared $(JCBF) $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so - -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEF = -Dcbf_use_pycifrw=yes -else -PYCIFRWDEF = -endif - - -Makefiles: Makefile \ - Makefile_LINUX \ - Makefile_LINUX_64 \ - Makefile_LINUX_gcc42 \ - Makefile_LINUX_DMALLOC \ - Makefile_LINUX_gcc42_DMALLOC \ - Makefile_OSX \ - Makefile_OSX_gcc42 \ - Makefile_OSX_gcc42_DMALLOC \ - Makefile_AIX \ - Makefile_MINGW \ - Makefile_MSYS2 \ - Makefile_IRIX_gcc - - -Makefile_LINUX: $(M4)/Makefile.m4 - -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX $(M4)/Makefile.m4 > Makefile_LINUX.tmp - mv Makefile_LINUX.tmp Makefile_LINUX - -Makefile_LINUX_DMALLOC: $(M4)/Makefile.m4 - -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_DMALLOC.tmp - mv Makefile_LINUX_DMALLOC.tmp Makefile_LINUX_DMALLOC - -Makefile_LINUX_64: $(M4)/Makefile.m4 - -cp Makefile_LINUX_64 Makefile_LINUX_64_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_64 $(M4)/Makefile.m4 > Makefile_LINUX_64.tmp - mv Makefile_LINUX_64.tmp Makefile_LINUX_64 - -Makefile_LINUX_gcc42: $(M4)/Makefile.m4 - -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42 $(M4)/Makefile.m4 > Makefile_LINUX_gcc42.tmp - mv Makefile_LINUX_gcc42.tmp Makefile_LINUX_gcc42 - -Makefile_LINUX_gcc42_DMALLOC: $(M4)/Makefile.m4 - -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_gcc42_DMALLOC.tmp - mv Makefile_LINUX_gcc42_DMALLOC.tmp Makefile_LINUX_gcc42_DMALLOC - -Makefile_OSX: $(M4)/Makefile.m4 - -cp Makefile_OSX Makefile_OSX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX $(M4)/Makefile.m4 > Makefile_OSX.tmp - mv Makefile_OSX.tmp Makefile_OSX - -Makefile_OSX_gcc42: $(M4)/Makefile.m4 - -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42 $(M4)/Makefile.m4 > Makefile_OSX_gcc42.tmp - mv Makefile_OSX_gcc42.tmp Makefile_OSX_gcc42 - -Makefile_OSX_gcc42_DMALLOC: $(M4)/Makefile.m4 - -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_OSX_gcc42_DMALLOC.tmp - mv Makefile_OSX_gcc42_DMALLOC.tmp Makefile_OSX_gcc42_DMALLOC - -Makefile_AIX: $(M4)/Makefile.m4 - -cp Makefile_AIX Makefile_AIX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=AIX $(M4)/Makefile.m4 > Makefile_AIX.tmp - mv Makefile_AIX.tmp Makefile_AIX - -Makefile_MINGW: $(M4)/Makefile.m4 - -cp Makefile_MINGW Makefile_MINGW_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MINGW $(M4)/Makefile.m4 > Makefile_MINGW.tmp - mv Makefile_MINGW.tmp Makefile_MINGW - -Makefile_MSYS2: $(M4)/Makefile.m4 - -cp Makefile_MSYS2 Makefile_MSYS2_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MSYS2 $(M4)/Makefile.m4 > Makefile_MSYS2.tmp - mv Makefile_MSYS2.tmp Makefile_MSYS2 - -Makefile_IRIX_gcc: $(M4)/Makefile.m4 - -cp Makefile_IRIX_gcc Makefile_IRIX_gcc_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=IRIX_gcc $(M4)/Makefile.m4 > Makefile_IRIX_gcc.tmp - mv Makefile_IRIX_gcc.tmp Makefile_IRIX_gcc - - -Makefile: $(M4)/Makefile.m4 - -cp Makefile Makefile_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=default $(M4)/Makefile.m4 > Makefile.tmp - mv Makefile.tmp Makefile - -cbflib.ini: $(M4)/Makefile.m4 - echo "$(LDPREFIX)" > cbflib.ini - echo "HDF5_PLUGIN_PATH=$(SOLIB):$$HDF5_PLUGIN_PATH" >> cbflib.ini - echo "export HDF5_PLUGIN_PATH" >> cbflib.ini - -symlinksdone: - chmod a+x .symlinks - chmod a+x .undosymlinks - chmod a+x doc/.symlinks - chmod a+x doc/.undosymlinks - ./.symlinks $(SLFLAGS) - touch symlinksdone - -install: baseinstall pycbfinstall \ - $(HDF5_INSTALL) \ - $(TIFF_INSTALL) \ - $(REGEX_INSTALL) - -userinstall: baseinstall pycbfuserinstall \ - $(HDF5_INSTALL) \ - $(TIFF_INSTALL) \ - $(REGEX_INSTALL) - -baseinstall: all $(CBF_PREFIX) $(CBF_PREFIX)/lib $(CBF_PREFIX)/bin \ - $(CBF_PREFIX)/include $(CBF_PREFIX)/include/cbflib \ - $(PYSOURCE) shared $(EXAMPLES)/batch_convert_minicbf.sh \ - $(LIB)/libcbf.a $(LIB)/libimg.a $(LIB)/libfcb.a \ - $(SOLIB)/libcbf.so $(SOLIB)/libimg.so $(SOLIB)/libfcb.so - -chmod -R 755 $(CBF_PREFIX)/include/cbflib - -chmod 755 $(CBF_PREFIX)/lib/libcbf.a - -cp $(CBF_PREFIX)/lib/libcbf.a $(CBF_PREFIX)/lib/libcbf_old.a - cp $(LIB)/libcbf.a $(CBF_PREFIX)/lib/libcbf.a - -chmod 755 $(CBF_PREFIX)/lib/libimg.a - -cp $(CBF_PREFIX)/lib/libimg.a $(CBF_PREFIX)/lib/libimg_old.a - cp $(LIB)/libimg.a $(CBF_PREFIX)/lib/libimg.a - -chmod 755 $(CBF_PREFIX)/lib/libfcb.a - -cp $(CBF_PREFIX)/lib/libfcb.a $(CBF_PREFIX)/lib/libfcb_old.a - cp $(LIB)/libfcb.a $(CBF_PREFIX)/lib/libfcb.a - -chmod 755 $(CBF_PREFIX)/lib/libcbf.so - -cp $(CBF_PREFIX)/lib/libcbf.so $(CBF_PREFIX)/lib/libcbf_old.so - cp $(SOLIB)/libcbf.so $(CBF_PREFIX)/lib/libcbf.so - $(LN) $(CBF_PREFIX)/lib/libcbf.so $(CBF_PREFIX)/lib/lib_cbf.so - -chmod 755 $(CBF_PREFIX)/lib/libimg.so - -cp $(CBF_PREFIX)/lib/libimg.so $(CBF_PREFIX)/lib/libimg_old.so - cp $(SOLIB)/libimg.so $(CBF_PREFIX)/lib/libimg.so - $(LN) $(CBF_PREFIX)/lib/libimg.so $(CBF_PREFIX)/lib/lib_img.so - -chmod 755 $(CBF_PREFIX)/lib/libfcb.so - -cp $(CBF_PREFIX)/lib/libfcb.so $(CBF_PREFIX)/lib/libfcb_old.so - cp $(SOLIB)/libfcb.so $(CBF_PREFIX)/lib/libfcb.so - $(LN) $(CBF_PREFIX)/lib/libfcb.so $(CBF_PREFIX)/lib/lib_fcb.so - -cp $(CBF_PREFIX)/bin/cbflib.ini $(CBF_PREFIX)/bin/cbflib.ini_old - echo "$(RUNLDPREFIX)" > $(CBF_PREFIX)/bin/cbflib.ini - echo "HDF5_PLUGIN_PATH=$(CBF_PREFIX)/lib:$$HDF5_PLUGIN_PATH" >> $(CBF_PREFIX)/bin/cbflib.ini - echo "export HDF5_PLUGIN_PATH" >> $(CBF_PREFIX)/bin/cbflib.ini - -cp $(CBF_PREFIX)/bin/adscimg2cbf $(CBF_PREFIX)/bin/adscimg2cbf_old - cp $(BIN)/adscimg2cbf $(CBF_PREFIX)/bin/adscimg2cbf - -cp $(CBF_PREFIX)/bin/cbf2adscimg $(CBF_PREFIX)/bin/cbf2adscimg_old - cp $(BIN)/cbf2adscimg $(CBF_PREFIX)/bin/cbf2adscimg - -cp $(CBF_PREFIX)/bin/cbf_standardize_numbers \ - $(CBF_PREFIX)/bin/cbf_standardize_numbers_old - cp $(BIN)/cbf_standardize_numbers $(CBF_PREFIX)/bin/cbf_standardize_numbers - -cp $(CBF_PREFIX)/bin/convert_image $(CBF_PREFIX)/bin/convert_image_old - cp $(BIN)/convert_image $(CBF_PREFIX)/bin/convert_image - -cp $(CBF_PREFIX)/bin/convert_minicbf $(CBF_PREFIX)/bin/convert_minicbf_old - cp $(BIN)/convert_minicbf $(CBF_PREFIX)/bin/convert_minicbf - -cp $(CBF_PREFIX)/bin/makecbf $(CBF_PREFIX)/bin/makecbf_old - cp $(BIN)/makecbf $(CBF_PREFIX)/bin/makecbf - -cp $(CBF_PREFIX)/bin/img2cif $(CBF_PREFIX)/bin/img2cif_old - cp $(BIN)/img2cif $(CBF_PREFIX)/bin/img2cif - -cp $(CBF_PREFIX)/bin/cif2cbf $(CBF_PREFIX)/bin/cif2cbf_old - cp $(BIN)/cif2cbf $(CBF_PREFIX)/bin/cif2cbf - -cp $(CBF_PREFIX)/bin/minicbf2nexus $(CBF_PREFIX)/bin/minicbf2nexus_old - cp $(BIN)/minicbf2nexus $(CBF_PREFIX)/bin/minicbf2nexus - -cp $(CBF_PREFIX)/bin/cbf2nexus $(CBF_PREFIX)/bin/cbf2nexus_old - cp $(BIN)/cbf2nexus $(CBF_PREFIX)/bin/cbf2nexus - -cp $(CBF_PREFIX)/bin/nexus2cbf $(CBF_PREFIX)/bin/nexus2cbf_old - cp $(BIN)/nexus2cbf $(CBF_PREFIX)/bin/nexus2cbf - -cp $(CBF_PREFIX)/bin/roi_peaksearch $(CBF_PREFIX)/bin/roi_peaksearch_old - cp $(BIN)/roi_peaksearch $(CBF_PREFIX)/bin/roi_peaksearch - -cp $(CBF_PREFIX)/bin/sequence_match $(CBF_PREFIX)/bin/sequence_match_old - cp $(BIN)/sequence_match $(CBF_PREFIX)/bin/sequence_match - -cp $(CBF_PREFIX)/bin/testalloc $(CBF_PREFIX)/bin/testalloc_old - cp $(BIN)/testalloc $(CBF_PREFIX)/bin/testalloc - -cp $(CBF_PREFIX)/bin/arvai_test $(CBF_PREFIX)/bin/arvai_test_old - cp $(BIN)/arvai_test $(CBF_PREFIX)/bin/arvai_test - -cp $(CBF_PREFIX)/bin/cif2c $(CBF_PREFIX)/bin/cif2c_old - cp $(BIN)/cif2c $(CBF_PREFIX)/bin/cif2c - -cp $(CBF_PREFIX)/bin/testreals $(CBF_PREFIX)/bin/testreals_old - cp $(BIN)/testreals $(CBF_PREFIX)/bin/testreals - -cp $(CBF_PREFIX)/bin/testflat $(CBF_PREFIX)/bin/testflat_old - cp $(BIN)/testflat $(CBF_PREFIX)/bin/testflat - -cp $(CBF_PREFIX)/bin/testflatpacked $(CBF_PREFIX)/bin/testflatpacked_old - cp $(BIN)/testflatpacked $(CBF_PREFIX)/bin/testflatpacked - -cp $(CBF_PREFIX)/bin/tiff2cbf $(CBF_PREFIX)/bin/tiff2cbf_old - cp $(BIN)/tiff2cbf $(CBF_PREFIX)/bin/tiff2cbf - -cp $(CBF_PREFIX)/bin/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk_old - cp $(BIN)/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk - -cp $(CBF_PREFIX)/bin/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk_old - cp $(BIN)/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk - -cp $(CBF_PREFIX)/bin/testhdf5 $(CBF_PREFIX)/bin/testhdf5_old - cp $(BIN)/testhdf5 $(CBF_PREFIX)/bin/testhdf5 -ifneq ($(CBF_USE_ULP),) - -cp $(CBF_PREFIX)/bin/testulp $(CBF_PREFIX)/bin/testulp_old - cp $(BIN)/testulp $(CBF_PREFIX)/bin/testulp -endif - -cp $(CBF_PREFIX)/bin/batch_convert_minicbf.sh $(CBF_PREFIX)/bin/batch_convert_minicbf_old.sh - cp $(EXAMPLES)/batch_convert_minicbf.sh $(CBF_PREFIX)/bin/batch_convert_minicbf.sh -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) - cp $(SRC)/drel_lex.py $(CBF_PREFIX)/bin/drel_lex.py - cp $(SRC)/drel_yacc.py $(CBF_PREFIX)/bin/drel_yacc.py - cp $(SRC)/drelc.py $(CBF_PREFIX)/bin/drelc.py - cp $(SRC)/drel_prep.py $(CBF_PREFIX)/bin/drel_prep.py -endif - chmod -R 755 $(CBF_PREFIX)/include/cbflib - -rm -rf $(CBF_PREFIX)/include/cbflib_old - -cp -r $(CBF_PREFIX)/include/cbflib $(CBF_PREFIX)/include/cbflib_old - -rm -rf $(CBF_PREFIX)/include/cbflib - cp -r $(INCLUDE) $(CBF_PREFIX)/include/cbflib - chmod 644 $(CBF_PREFIX)/lib/libcbf.a - chmod 644 $(CBF_PREFIX)/lib/libimg.a - chmod 644 $(CBF_PREFIX)/lib/libfcb.a - chmod 755 $(CBF_PREFIX)/lib/libcbf.so - chmod 755 $(CBF_PREFIX)/lib/libimg.so - chmod 755 $(CBF_PREFIX)/lib/libfcb.so - chmod 755 $(CBF_PREFIX)/bin/arvai_test - chmod 755 $(CBF_PREFIX)/bin/cbf2nexus - chmod 755 $(CBF_PREFIX)/bin/cbf_standardize_numbers - chmod 755 $(CBF_PREFIX)/bin/cif2c - chmod 755 $(CBF_PREFIX)/bin/cif2cbf - chmod 755 $(CBF_PREFIX)/bin/convert_image - chmod 755 $(CBF_PREFIX)/bin/convert_minicbf - chmod 755 $(CBF_PREFIX)/bin/img2cif - chmod 755 $(CBF_PREFIX)/bin/makecbf - chmod 755 $(CBF_PREFIX)/bin/minicbf2nexus - chmod 755 $(CBF_PREFIX)/bin/nexus2cbf - chmod 755 $(CBF_PREFIX)/bin/roi_peaksearch - chmod 755 $(CBF_PREFIX)/bin/sequence_match - chmod 755 $(CBF_PREFIX)/bin/testalloc - chmod 755 $(CBF_PREFIX)/bin/testflat - chmod 755 $(CBF_PREFIX)/bin/testflatpacked - chmod 755 $(CBF_PREFIX)/bin/testhdf5 - chmod 755 $(CBF_PREFIX)/bin/testreals -ifneq ($(CBF_USE_ULP),) - chmod 755 $(CBF_PREFIX)/bin/testulp -endif - chmod 755 $(CBF_PREFIX)/bin/tiff2cbf - chmod 755 $(CBF_PREFIX)/bin/test_cbf_airy_disk - chmod 755 $(CBF_PREFIX)/bin/batch_convert_minicbf.sh - chmod 644 $(CBF_PREFIX)/include/cbflib/*.h - -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -# -# PyCifRW -# -build_pycifrw: $(M4)/Makefile.m4 - touch build_pycifrw -$(PYCIFRW): build_pycifrw - -rm -rf $(PYCIFRW) - -rm -rf $(PYCIFRW).tar.gz - $(DOWNLOAD) $(PYCIFRWURL) - tar -xvf $(PYCIFRW).tar.gz - -rm $(PYCIFRW).tar.gz - (cd $(PYCIFRW); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) - -# -# PLY -# -build_ply: $(M4)/Makefile.m4 - touch build_ply -$(PLY): build_ply - -rm -rf $(PLY) - -rm -rf $(PLY).tar.gz - $(DOWNLOAD) $(PLYURL) - tar -xvf $(PLY).tar.gz - -rm $(PLY).tar.gz - (cd $(PLY); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) -endif - -# -# REGEX -# - -build_regex: $(M4)/Makefile.m4 - touch build_regex -$(REGEX): build_regex - -rm -rf $(REGEX) - -rm -rf $(REGEX).tar.gz - $(DOWNLOAD) $(REGEX_URL) - tar -xvf $(REGEX).tar.gz - touch $(REGEX) - -rm $(REGEX).tar.gz - cp config.guess config.sub $(REGEX) - (cd $(REGEX); \ - prefix=$(REGEX_PREFIX); export prefix; \ - ./configure --prefix=$(REGEX_PREFIX); make install) - @-cp $(REGEX_PREFIX)/include/pcreposix.h $(REGEX_PREFIX)/include/regex.h -$(REGEX)_INSTALL: $(REGEX) - -rm -rf $(REGEX)_install - rsync -avz $(REGEX)/ $(REGEX)_install - (cd $(REGEX)_install; prefix=$(CBF_PREFIX); export prefix; \ - make distclean; ./configure --prefix=$(CBF_PREFIX); make install ) - @-cp $(CBF_PREFIX)/include/pcreposix.h $(CBF_PREFIX)/include/regex.h - -# -# TIFF -# -build_tiff: $(M4)/Makefile.m4 - touch build_tiff -$(TIFF): build_tiff config.guess config.sub - -rm -rf $(TIFF) - -rm -rf $(TIFF).tar.gz - $(DOWNLOAD) $(TIFF_URL) - tar -xvf $(TIFF).tar.gz - touch $(TIFF) - -rm $(TIFF).tar.gz - cp config.guess config.sub $(TIFF)/config/ - (cd $(TIFF); prefix=$(TIFF_PREFIX); export prefix; \ - ./configure --prefix=$(TIFF_PREFIX); make install) -$(TIFF)_INSTALL: $(TIFF) - -rm -rf $(TIFF)_install - rsync -avz $(TIFF)/ $(TIFF)_install - (cd $(TIFF)_install; make distclean; prefix=$(CBF_PREFIX); export prefix; \ - ./configure --prefix=$(CBF_PREFIX); make install) - - -ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes) -# -# HDF5 -# - -build_hdf5: $(M4)/Makefile.m4 - touch build_hdf5 -$(HDF5): build_hdf5 - -rm -rf $(HDF5) - -rm -rf $(HDF5).tar.gz - $(DOWNLOAD) $(HDF5_URL) - tar -xvf $(HDF5).tar.gz - cp config.guess $(HDF5)/bin/config.guess - cp config.sub $(HDF5)/bin/config.sub - touch $(HDF5) - -rm $(HDF5).tar.gz - echo "first level HDF5 install in "$(HDF5_PREFIX) - (cd $(ROOT)/$(HDF5); \ - CFLAGS="$(CFLAGS)"; export CFLAGS; \ - mkdir -p hdf5; prefix=$(ROOT)/$(HDF5)/hdf5; export prefix; \ - ./configure --prefix=$(ROOT)/$(HDF5)/hdf5 --enable-build-mode=debug \ - --enable-trace --enable-fortran --enable-using-memchecker ;\ - make install; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/bin/ $(HDF5_PREFIX)/bin; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/lib/ $(HDF5_PREFIX)/lib; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/include/ $(HDF5_PREFIX)/include; \ - cd $(HDF5_PREFIX)/bin; $(ROOT)/$(HDF5)/hdf5/bin/h5redeploy -force ) -$(HDF5)_INSTALL: $(HDF5) - -rm -rf $(HDF5)_install - echo "final HDF5 install in "$(CBF_PREFIX) - rsync -avz $(ROOT)/$(HDF5)/hdf5/bin/ $(CBF_PREFIX)/bin; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/lib/ $(CBF_PREFIX)/lib; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/include/ $(CBF_PREFIX)/include; \ - cd $(CBF_PREFIX)/bin; $(ROOT)/$(HDF5)/hdf5/bin/h5redeploy -force -endif - - -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -# -# LZ4 -# -build_lz4: $(M4)/Makefile.m4 - touch build_lz4 -$(LZ4): $(HDF5) build_lz4 - mkdir -p $(SOLIB) - -rm -rf $(LZ4) - -rm -rf $(LZ4).tar.gz - git clone $(LZ4_URL) - (cd $(LZ4); mkdir build; cd build; cmake .. -G 'MSYS Makefiles' -DENABLE_LZ4_PLUGIN="yes"; make all; cp plugins/* $(SOLIB)) - touch $(LZ4) -endif - - -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -# -# BSHUF -# -build_BSHUF: $(M4)/Makefile.m4 - touch build_BSHUF -$(BSHUF): $(HDF5) build_BSHUF $(LZ4dep) - mkdir -p $(SOLIB) - -rm -rf $(BSHUF) - -rm -rf $(BSHUF).tar.gz - -rm -rf *.o - $(DOWNLOAD) $(BSHUFURL) - tar -xvf $(BSHUF).tar.gz - -rm $(BSHUF).tar.gz - (cp $(BSHUFinclude)/bitshuffle.h \ - $(BSHUFinclude)/bitshuffle_core.h \ - $(BSHUFinclude)/bitshuffle_internals.h \ - $(BSHUFinclude)/bshuf_h5filter.h \ - $(BSHUFinclude)/bshuf_h5filter.h $(BSHUFinclude)/iochain.h $(INCLUDE); \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bshuf_h5plugin.c -o bshuf_h5plugin.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/iochain.c -o iochain.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o; \ - $(CC) -shared bshuf_h5filter.o bitshuffle.o bitshuffle_core.o iochain.o lz4.o $(HDF5SOLIBS_LOCAL) $(HDF5SOLIBS_SYSTEM)\ - -o $(SOLIB)/libh5zbshuf.so; \ - $(CC) -shared bshuf_h5filter.o bitshuffle.o bitshuffle_core.o lz4.o bshuf_h5plugin.o iochain.o \ - $(HDF5SOLIBS_LOCAL) \ - $(HDF5SOLIBS_SYSTEM) -o $(SOLIB)/$(BSHUFFILTER).so; \ - rm bshuf_h5filter.o bitshuffle.o lz4.o iochain.o bshuf_h5plugin.o) - touch $(BSHUF) -endif - - -# -# Directories -# -$(CBF_PREFIX): - mkdir -p $(CBF_PREFIX) - -$(CBF_PREFIX)/lib: $(CBF_PREFIX) - mkdir -p $(CBF_PREFIX)/lib - -$(CBF_PREFIX)/bin: $(CBF_PREFIX) - mkdir -p $(CBF_PREFIX)/bin - -$(CBF_PREFIX)/include: $(CBF_PREFIX) - mkdir -p $(CBF_PREFIX)/include - -$(CBF_PREFIX)/include/cbflib: $(CBF_PREFIX)/include - mkdir -p $(CBF_PREFIX)/include/cbflib - - - -$(LIB): - mkdir -p $@ - -$(BIN): - mkdir -p $@ - -$(SOLIB): - mkdir -p $@ - -$(JCBF): - mkdir -p $@ - -$(MINICBF_TESTS): - mkdir -p $@ - -# -# Parser -# -$(SRC)/cbf_stx.c: $(SRC)/cbf.stx.y - bison $(SRC)/cbf.stx.y -o $(SRC)/cbf.stx.tab.c -d - mv $(SRC)/cbf.stx.tab.c $(SRC)/cbf_stx.c - mv $(SRC)/cbf.stx.tab.h $(INCLUDE)/cbf_stx.h - -# -# CBF library -# -$(LIB)/libcbf.a: $(SOURCE) $(HEADERS) $(COMMONDEP) $(HDF5) $(LZ4DEPS) $(BSHUFDEPS) $(REGEXDEPS) - -rm -f $@ - -rm -f *.o - mkdir -p $(LIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) \ - -DCBF_FILTER_STATIC $(LZ4FLAG) $(BSHUFFLAG) $(PYCIFRWFLAG) $(INCLUDES) $(WARNINGS) -c $(SOURCE) -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(LZ4)/LZ4/src/H5Zlz4.c -o h5zlz4.o -endif -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/iochain.c -o iochain.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o -endif - $(AR) cr $@ *.o -ifneq ($(RANLIB),) - $(RANLIB) $@ -endif - -rm -f *.o - -$(SOLIB)/libcbf.so: $(SOURCE) $(HEADERS) $(COMMONDEP) $(HDF5) $(LZ4DEPS) $(BSHUFDEPS) - -rm -f $@ - -rm -f *.o - mkdir -p $(SOLIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(LZ4FLAG) $(BSHUFFLAG) $(PYCIFRWFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(SOURCE) -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(LZ4)/LZ4/src/H5Zlz4.c -o h5zlz4.o -endif -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle..o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/iochain.c -o iochain.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o -endif - - $(CC) -o $@ *.o $(SOLDFLAGS) $(EXTRALIBS) $(REGEX_LIBS) $(HDF5SOLIBS_LOCAL) $(HDF5SOLIBS_SYSTEM) - -rm -f *.o - -# -# IMG library -# -$(LIB)/libimg.a: $(SRC)/img.c $(HEADERS) $(COMMONDEP) - mkdir -p $(LIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) -c $(SRC)/img.c - $(AR) cr $@ img.o -ifneq ($(RANLIB),) - $(RANLIB) $@ -endif - rm img.o - -$(SOLIB)/libimg.so: $(SOURCE) $(HEADERS) $(COMMONDEP) - -rm -f $@ - mkdir -p $(SOLIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(SRC)/img.c - $(CC) -o $@ img.o $(SOLDFLAGS) - rm img.o - -# -# CBF and IMG libraries -# -CBF_IMG_LIBS: $(LIB)/libcbf.a $(LIB)/libimg.a - - -# -# FCB library -# -$(LIB)/libfcb.a: $(F90SOURCE) $(COMMONDEP) $(HDF5) - mkdir -p $(LIB) -ifneq ($(F90C),) - $(F90C) $(F90FLAGS) -c $(F90SOURCE) - $(AR) cr $@ *.o -ifneq ($(RANLIB),) - $(RANLIB) $@ -endif - rm *.o -else - echo "Define F90C to build $(LIB)/libfcb.a" -endif - -$(SOLIB)/libfcb.so: $(F90SOURCE) $(HEADERS) $(COMMONDEP) $(SOLIB) -ifneq ($(F90C),) - -rm -f $@ - mkdir -p $(SOLIB) - $(F90C) $(F90FLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(F90SOURCE) - $(F90C) $(F90FLAGS) -o $@ *.o $(SOLDFLAGS) - rm *.o -else - echo "Define F90C to build $(SOLIB)/libfcb.so" -endif - - -# -# Python bindings -# -$(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ - $(PYCBF)/$(SETUP_PY) \ - $(PYCBF)/pycbf.i \ - $(PYCBF)/cbfhandlewrappers.i \ - $(PYCBF)/cbfdetectorwrappers.i \ - $(PYCBF)/cbfgenericwrappers.i \ - $(PYCBF)/cbfgoniometerwrappers.i - -cp $(SOLIB)/*.so $(LIB) - (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) - -$(PYCBF)/pycbfinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --prefix=$(CBF_PREFIX)) - -$(PYCBF)/pycbfuserinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --user) - -$(PYCBF)/setup.py: $(M4)/setup_py.m4 - (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ - -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) - -$(PYCBF)/setup_MINGW.py: m4/setup_py.m4 - (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ - -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) - -$(LIB)/_pycbf.$(PYCBFEXT): $(PYCBF)/_pycbf.$(PYCBFEXT) - mkdir -p $(LIB) - cp $(PYCBF)/_pycbf.$(PYCBFEXT) $(LIB)/_pycbf.$(PYCBFEXT) - -$(PYCBF)/pycbf.pdf: $(PYCBF)/pycbf.w - (cd $(PYCBF); \ - $(NUWEB) pycbf; \ - latex pycbf; \ - $(NUWEB) pycbf; \ - latex pycbf; \ - dvipdfm pycbf ) - -$(PYCBF)/CBFlib.txt: $(DOC)/CBFlib.html - links -dump $(DOC)/CBFlib.html > $(PYCBF)/CBFlib.txt - -$(PYCBF)/cbfhandlewrappers.i \ -$(PYCBF)/cbfdetectorwrappers.i \ -$(PYCBF)/cbfgenericwrappers.i \ -$(PYCBF)/cbfgoniometerwrappers.i: $(PYCBF)/CBFlib.txt $(PYCBF)/make_pycbf.py - (cd $(PYCBF); $(PYTHON) make_pycbf.py; $(PYSWIG) pycbf.i; $(PYTHON) setup.py build) - - -# -# Java bindings -# -$(JCBF)/cbflib-$(VERSION).jar: $(JCBF) $(JCBF)/jcbf.i - $(JSWIG) -I$(INCLUDE) -package org.iucr.cbflib -outdir $(JCBF) $(JCBF)/jcbf.i - $(JAVAC) -d . $(JCBF)/*.java - $(JAR) cf $@ org - -$(SOLIB)/libcbf_wrap.so: $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf.so - mkdir -p $(SOLIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) $(JAVAINCLUDES) -c $(JCBF)/jcbf_wrap.c - $(CC) -o $@ jcbf_wrap.o $(SOLDFLAGS) -L$(SOLIB) -lcbf $(REGEX_LIBS) - rm jcbf_wrap.o - -# -# F90SOURCE -# -$(SRC)/fcb_exit_binary.f90: $(M4)/fcb_exit_binary.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_exit_binary.m4) > $(SRC)/fcb_exit_binary.f90 -$(SRC)/fcb_next_binary.f90: $(M4)/fcb_next_binary.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_next_binary.m4) > $(SRC)/fcb_next_binary.f90 -$(SRC)/fcb_open_cifin.f90: $(M4)/fcb_open_cifin.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_open_cifin.m4) > $(SRC)/fcb_open_cifin.f90 -$(SRC)/fcb_packed.f90: $(M4)/fcb_packed.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_packed.m4) > $(SRC)/fcb_packed.f90 -$(SRC)/fcb_read_bits.f90: $(M4)/fcb_read_bits.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_read_bits.m4) > $(SRC)/fcb_read_bits.f90 -$(SRC)/fcb_read_image.f90: $(M4)/fcb_read_image.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_read_image.m4) > $(SRC)/fcb_read_image.f90 -$(SRC)/fcb_read_xds_i2.f90: $(M4)/fcb_read_xds_i2.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_read_xds_i2.m4) > $(SRC)/fcb_read_xds_i2.f90 -$(EXAMPLES)/test_fcb_read_image.f90: $(M4)/test_fcb_read_image.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) test_fcb_read_image.m4) > $(EXAMPLES)/test_fcb_read_image.f90 -$(EXAMPLES)/test_xds_binary.f90: $(M4)/test_xds_binary.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) test_xds_binary.m4) > $(EXAMPLES)/test_xds_binary.f90 - -# -# convert_image example program -# -$(BIN)/convert_image: $(LIB)/libcbf.a $(EXAMPLES)/convert_image.c $(SRC)/img.c \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/convert_image.c $(SRC)/img.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ -# -# convert_minicbf example program -# -$(BIN)/convert_minicbf: $(LIB)/libcbf.a $(EXAMPLES)/convert_minicbf.c \ - $(GOPTLIB) $(GOPTINC) $(EXAMPLES)/batch_convert_minicbf.sh - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/convert_minicbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - chmod 755 $(EXAMPLES)/batch_convert_minicbf.sh - -# -# makecbf example program -# -$(BIN)/makecbf: $(LIB)/libcbf.a $(EXAMPLES)/makecbf.c $(LIB)/libimg.a - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/makecbf.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - - -# -# adscimg2cbf example program -# -$(BIN)/adscimg2cbf: $(LIB)/libcbf.a $(EXAMPLES)/adscimg2cbf.c $(EXAMPLES)/adscimg2cbf_sub.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/adscimg2cbf.c $(EXAMPLES)/adscimg2cbf_sub.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# cbf2adscimg example program -# -$(BIN)/cbf2adscimg: $(LIB)/libcbf.a $(EXAMPLES)/cbf2adscimg.c $(EXAMPLES)/cbf2adscimg_sub.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf2adscimg.c $(EXAMPLES)/cbf2adscimg_sub.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# cbf_standardize_numbers example program -# -$(BIN)/cbf_standardize_numbers: $(EXAMPLES)/cbf_standardize_numbers.c $(EXAMPLES)/cbf_standardize_numbers.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf_standardize_numbers.c $(SRC_FGETLN) $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@ - -# -# changtestcompression example program -# -$(BIN)/changtestcompression: $(LIB)/libcbf.a $(EXAMPLES)/changtestcompression.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/changtestcompression.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# img2cif example program -# -$(BIN)/img2cif: $(LIB)/libcbf.a $(EXAMPLES)/img2cif.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOTPINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/img2cif.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# cif2cbf example program -# -$(BIN)/cif2cbf: $(LIB)/libcbf.a $(EXAMPLES)/cif2cbf.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) shared - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cif2cbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# cbf2nexus example program -# -$(BIN)/cbf2nexus: $(LIB)/libcbf.a $(EXAMPLES)/cbf2nexus.c \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf2nexus.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) \ - -limg -o $@ - -# -# minicbf2nexus example program -# -$(BIN)/minicbf2nexus: $(LIB)/libcbf.a $(EXAMPLES)/minicbf2nexus.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/minicbf2nexus.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# nexus2cbf example program -# -$(BIN)/nexus2cbf: $(LIB)/libcbf.a $(EXAMPLES)/nexus2cbf.c \ - $(GOPTLIB) $(GOPTINC) $(REGEX) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/nexus2cbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# roi_peaksearch example program -# -$(BIN)/roi_peaksearch: $(LIB)/libcbf.a $(EXAMPLES)/roi_peaksearch.c \ - $(EXAMPLES)/dps_peaksearch.c $(EXAMPLES)/dps_peaksearch.h $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/roi_peaksearch.c $(EXAMPLES)/dps_peaksearch.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - - -# -# dectris cbf_template_t program -# -$(BIN)/cbf_template_t: $(DECTRIS_EXAMPLES)/cbf_template_t.c \ - $(DECTRIS_EXAMPLES)/mx_cbf_t_extras.h \ - $(DECTRIS_EXAMPLES)/mx_parms.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -I $(DECTRIS_EXAMPLES) $(WARNINGS) \ - $(DECTRIS_EXAMPLES)/cbf_template_t.c -o $@ - -# -# testcell example program -# -$(BIN)/testcell: $(LIB)/libcbf.a $(EXAMPLES)/testcell.C - mkdir -p $(BIN) - $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testcell.C -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# cif2c example program -# -$(BIN)/cif2c: $(LIB)/libcbf.a $(EXAMPLES)/cif2c.c - mkdir -p $(BIN) - $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cif2c.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# sauter_test example program -# -$(BIN)/sauter_test: $(LIB)/libcbf.a $(EXAMPLES)/sauter_test.C - mkdir -p $(BIN) - $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/sauter_test.C -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# sequence_match example program -# -$(BIN)/sequence_match: $(LIB)/libcbf.a $(EXAMPLES)/sequence_match.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/sequence_match.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# tiff2cbf example program -# -$(BIN)/tiff2cbf: $(LIB)/libcbf.a $(EXAMPLES)/tiff2cbf.c \ - $(GOPTLIB) $(GOPTINC) $(TIFF) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - -I$(TIFF)/libtiff $(EXAMPLES)/tiff2cbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf -L$(TIFF_PREFIX)/lib -ltiff $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# Andy Arvai's buffered read test program -# -$(BIN)/arvai_test: $(LIB)/libcbf.a $(EXAMPLES)/arvai_test.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/arvai_test.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# testreals example program -# -$(BIN)/testreals: $(LIB)/libcbf.a $(EXAMPLES)/testreals.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testreals.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# testflat example program -# -$(BIN)/testflat: $(LIB)/libcbf.a $(EXAMPLES)/testflat.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testflat.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ -# -# testflatpacked example program -# -$(BIN)/testflatpacked: $(LIB)/libcbf.a $(EXAMPLES)/testflatpacked.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testflatpacked.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -ifneq ($(F90C),) -# -# test_xds_binary example program -# -$(BIN)/test_xds_binary: $(LIB)/libfcb.a $(EXAMPLES)/test_xds_binary.f90 - mkdir -p $(BIN) - $(F90C) $(F90FLAGS) $(F90LDFLAGS) $(EXAMPLES)/test_xds_binary.f90 \ - -L$(LIB) -lfcb -o $@ - -# -# test_fcb_read_image example program -# -$(BIN)/test_fcb_read_image: $(LIB)/libfcb.a $(EXAMPLES)/test_fcb_read_image.f90 - mkdir -p $(BIN) - $(F90C) $(F90FLAGS) $(F90LDFLAGS) $(EXAMPLES)/test_fcb_read_image.f90 \ - -L$(LIB) -lfcb -o $@ -endif - -# -# testcbf (C) -# -$(BIN)/ctestcbf: $(EXAMPLES)/testcbf.c $(LIB)/libcbf.a - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testcbf.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# testcbf (Java) -# -$(BIN)/testcbf.class: $(EXAMPLES)/testcbf.java $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so - mkdir -p $(BIN) - $(JAVAC) -cp $(JCBF)/cbflib-$(VERSION).jar -d $(BIN) $(EXAMPLES)/testcbf.java - -ifneq ($(CBF_USE_ULP),) -# -# testulp test program -# -$(BIN)/testulp: $(LIB)/libcbf.a $(EXAMPLES)/testulp.c $(EXAMPLES)/unittest.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/testulp.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ -endif - -# -# testhdf5 test program -# -$(BIN)/testhdf5: $(LIB)/libcbf.a $(EXAMPLES)/testhdf5.c $(EXAMPLES)/unittest.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/testhdf5.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) \ - -o $@.tmp - mv $@.tmp $@ - -# -# testalloc test program -# -$(BIN)/testalloc: $(LIB)/libcbf.a $(EXAMPLES)/testalloc.c $(EXAMPLES)/unittest.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/testalloc.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ - -# -# test_cbf_airy_disk test program -# -$(BIN)/test_cbf_airy_disk: $(LIB)/libcbf.a $(EXAMPLES)/test_cbf_airy_disk.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/test_cbf_airy_disk.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ - -# -# cbf_testxfelread: test program -# -$(BIN)/cbf_testxfelread: $(LIB)/libcbf.a $(EXAMPLES)/cbf_testxfelread.c $(EXAMPLES)/cbf_testxfelread.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf_testxfelread.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ - -# -# Data files for tests -# - -$(DATADIRI): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLI)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Input.tar.gz) - touch $(DATADIRI) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Input.tar.gz) - -$(DATADIRO): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLO)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output.tar.gz) - touch $(DATADIRO) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output.tar.gz) - -$(DATADIRS): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLS)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - touch $(DATADIRS) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - - -# Input Data Files - -TESTINPUT_BASIC = example.mar2300 -DATADIRI_INPUT_BASIC = $(DATADIRI)/example.mar2300 - - -TESTINPUT_EXTRA = \ - 1191_00005.cbf \ - 9ins.cif \ - hit-20140306005258847.cbf \ - insulin_pilatus6m.cbf \ - mb_LP_1_001.img \ - testflatin.cbf \ - testflatpackedin.cbf \ - testrealin.cbf \ - thaumatin_die_M1S5_1_0005_2.cbf \ - X4_lots_M1S4_1_0001.cbf \ - X4_lots_M1S4_1_0002.cbf \ - X4_lots_M1S4_1_0003.cbf \ - X4_lots_M1S4_1_0004.cbf \ - X4_lots_M1S4_1_0005.cbf \ - XRD1621.tif - - - -DATADIRI_INPUT_EXTRA = \ - $(DATADIRI)/1191_00005.cbf \ - $(DATADIRI)/9ins.cif \ - $(DATADIRI)/hit-20140306005258847.cbf \ - $(DATADIRI)/insulin_pilatus6m.cbf \ - $(DATADIRI)/mb_LP_1_001.img \ - $(DATADIRI)/testflatin.cbf \ - $(DATADIRI)/testflatpackedin.cbf \ - $(DATADIRI)/testrealin.cbf \ - $(DATADIRI)/thaumatin_die_M1S5_1_0005_2.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0001.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0002.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0003.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0004.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0005.cbf \ - $(DATADIRI)/XRD1621.tif - - -# Output Data Files - -TESTOUTPUT = adscconverted_flat_orig.cbf \ - adscconverted_orig.cbf converted_flat_orig.cbf converted_orig.cbf \ - insulin_pilatus6mconverted_orig.cbf.h5.cbf \ - insulin_pilatus6mconverted_orig.cbf.h5 \ - insulin_pilatus6mconverted_v2_orig.cbf \ - mb_LP_1_001_orig.cbf testcell_orig.prt \ - test_xds_bin_testflatout_orig.out \ - test_xds_bin_testflatpackedout_orig.out test_fcb_read_testflatout_orig.out \ - test_fcb_read_testflatpackedout_orig.out \ - XRD1621_orig.cbf XRD1621_I4encbC100_orig.cbf \ - minicbf_orig.h5 -NEWTESTOUTPUT = adscconverted_flat.cbf \ - adscconverted.cbf converted_flat.cbf converted.cbf \ - insulin_pilatus6mconverted.cbf \ - insulin_pilatus6mconverted.cbf.h5 \ - insulin_pilatus6mconverted.cbf.h5.cbf \ - insulin_pilatus6mconverted_v2.cbf \ - mb_LP_1_001.cbf testcell.prt \ - test_xds_bin_testflatout.out \ - test_xds_bin_testflatpackedout.out test_fcb_read_testflatout.out \ - test_fcb_read_testflatpackedout.out \ - XRD1621.cbf XRD1621_I4encbC100.cbf \ - $(MINICBF_TEST)/minicbf.h5 -DATADIRO_OUTPUT = $(DATADIRO)/adscconverted_flat_orig.cbf \ - $(DATADIRO)/adscconverted_orig.cbf \ - $(DATADIRO)/converted_flat_orig.cbf \ - $(DATADIRO)/converted_orig.cbf \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5 \ - $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf \ - $(DATADIRO)/mb_LP_1_001_orig.cbf \ - $(DATADIRO)/testcell_orig.prt \ - $(DATADIRO)/test_xds_bin_testflatout_orig.out \ - $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out \ - $(DATADIRO)/test_fcb_read_testflatout_orig.out \ - $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out \ - $(DATADIRO)/XRD1621_orig.cbf \ - $(DATADIRO)/XRD1621_I4encbC100_orig.cbf \ - $(DATADIRO)/minicbf_orig.h5 -DATADIRO_OUTPUT_SIGNATURES = $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) \ - $(DATADIRO)/adscconverted_orig.cbf$(SEXT) \ - $(DATADIRO)/converted_flat_orig.cbf$(SEXT) \ - $(DATADIRO)/converted_orig.cbf$(SEXT) \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ - $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ - $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) \ - $(DATADIRO)/testcell_orig.prt$(SEXT) \ - $(DATADIRO)/test_xds_bin_testflatout_orig.out$(SEXT) \ - $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRO)/test_fcb_read_testflatout_orig.out$(SEXT) \ - $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRO)/XRD1621_orig.cbf$(SEXT) \ - $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) \ - $(DATADIRO)/minicbf_orig.h5$(SEXT) - - - -# Output Data File Signatures - -TESTOUTPUTSIGS = adscconverted_flat_orig.cbf$(SEXT) \ - adscconverted_orig.cbf$(SEXT) converted_flat_orig.cbf$(SEXT) converted_orig.cbf$(SEXT) \ - insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ - insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ - insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ - mb_LP_1_001_orig.cbf$(SEXT) testcell_orig.prt$(SEXT) \ - test_xds_bin_testflatout_orig.out$(SEXT) \ - test_xds_bin_testflatpackedout_orig.out$(SEXT) test_fcb_read_testflatout_orig.out$(SEXT) \ - test_fcb_read_testflatpackedout_orig.out$(SEXT) \ - XRD1621_orig.cbf$(SEXT) \ - XRD1621_I4encbC100_orig.cbf$(SEXT) \ - minicbf_orig.h5$(SEXT) -DATADIRS_OUTPUT_SIGNATURES = $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) \ - $(DATADIRS)/adscconverted_orig.cbf$(SEXT) \ - $(DATADIRS)/converted_flat_orig.cbf$(SEXT) \ - $(DATADIRS)/converted_orig.cbf$(SEXT) \ - $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ - $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ - $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ - $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) \ - $(DATADIRS)/testcell_orig.prt$(SEXT) \ - $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) \ - $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) \ - $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRS)/XRD1621_orig.cbf$(SEXT) \ - $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) \ - $(DATADIRS)/minicbf_orig.h5$(SEXT) - -# Fetch Input Data Files - -$(TESTINPUT_BASIC): $(DATADIRI) $(DATADIRI_INPUT_BASIC) - cp $(DATADIRI)/$@ $@ - cp $(DATADIRI)/$@$(SEXT) $@$(SEXT) - -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) - -$(TESTINPUT_EXTRA): $(DATADIRI) $(DATADIRI_INPUT_EXTRA) - cp $(DATADIRI)/$@ $@ - cp $(DATADIRI)/$@$(SEXT) $@$(SEXT) - -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) - - -# Fetch Output Data Files and Signatures - -$(TESTOUTPUT): $(DATADIRO) $(DATADIRO_OUTPUT) $(DATADIRO_OUTPUT_SIGNATURES) - cp $(DATADIRO)/$@ $@ - cp $(DATADIRO)/$@$(SEXT) $@$(SEXT) - -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) - -# Fetch Output Data File Signatures - -$(TESTOUTPUTSIGS): $(DATADIRS) $(DATADIRS_OUTPUT_SIGNATURES) - cp $(DATADIRS)/$@ $@ - - - -# -# Tests -# - - -tests: all $(LIB) $(BIN) symlinksdone basic extra dectristests pycbftests -tests_sigs_only: $(LIB) $(BIN) symlinksdone basic extra_sigs_only -restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 - $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < adscconverted.cbf > $(DATADIRO)/adscconverted_orig.cbf$(SEXT) - $(SIGNATURE) < converted_flat.cbf > $(DATADIRO)/converted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < converted.cbf > $(DATADIRO)/converted_orig.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5 > $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5.cbf > $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) - $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) - $(SIGNATURE) < testcell.prt > $(DATADIRO)/testcell_orig.prt$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRO)/test_xds_bin_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRO)/test_fcb_read_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < XRD1621.cbf > $(DATADIRO)/XRD1621_orig.cbf$(SEXT) - $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) - $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRO)/minicbf_orig.h5$(SEXT) - cp adscconverted_flat.cbf $(DATADIRO)/adscconverted_flat_orig.cbf$ - cp adscconverted.cbf $(DATADIRO)/adscconverted_orig.cbf - cp converted_flat.cbf $(DATADIRO)/converted_flat_orig.cbf - cp converted.cbf $(DATADIRO)/converted_orig.cbf - cp insulin_pilatus6mconverted.cbf.h5 $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5 - cp insulin_pilatus6mconverted.cbf.h5.cbf $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf - cp insulin_pilatus6mconverted_v2.cbf $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf - cp mb_LP_1_001.cbf$ $(DATADIRO)/mb_LP_1_001_orig.cbf - cp testcell.prt $(DATADIRO)/testcell_orig.prt - cp test_xds_bin_testflatout.out $(DATADIRO)/test_xds_bin_testflatout_orig.out - cp test_xds_bin_testflatpackedout.out $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out - cp test_fcb_read_testflatout.out $(DATADIRO)/test_fcb_read_testflatout_orig.out - cp test_fcb_read_testflatpackedout.out $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out - cp XRD1621.cbf $(DATADIRO)/XRD1621_orig.cbf - cp XRD1621_I4encbC100.cbf $(DATADIRO)/XRD1621_I4encbC100_orig.cbf - cp $(MINICBF_TEST)/minicbf.h5 $(DATADIRO)/minicbf_orig.h5 - -restore_sigs_only: $(NEWTESTOUTPUT) $(DATADIRS) - $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < adscconverted.cbf > $(DATADIRS)/adscconverted_orig.cbf$(SEXT) - $(SIGNATURE) < converted_flat.cbf > $(DATADIRS)/converted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < converted.cbf > $(DATADIRS)/converted_orig.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5 > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5.cbf > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) - $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) - $(SIGNATURE) < testcell.prt > $(DATADIRS)/testcell_orig.prt$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < XRD1621.cbf > $(DATADIRS)/XRD1621_orig.cbf$(SEXT) - $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) - $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRS)/minicbf_orig.h5$(SEXT) -restore_signatures: restore_output restore_sigs_only - -# -# Basic Tests -# - -basic: $(BIN)/makecbf $(BIN)/img2cif $(BIN)/cif2cbf $(TESTINPUT_BASIC) - $(LDPREFIX) $(BIN)/makecbf example.mar2300 makecbf.cbf - $(LDPREFIX) $(BIN)/img2cif -c flatpacked -m headers -d digest \ - -e base64 example.mar2300 img2cif_packed.cif - $(LDPREFIX) $(BIN)/img2cif -c canonical -m headers -d digest \ - -e base64 example.mar2300 img2cif_canonical.cif - $(LDPREFIX) $(BIN)/img2cif -c flatpacked -m headers -d digest \ - -e none example.mar2300 img2cif_packed.cbf - $(LDPREFIX) $(BIN)/img2cif -c canonical -m headers -d digest \ - -e none example.mar2300 img2cif_canonical.cbf - $(LDPREFIX) $(BIN)/cif2cbf -e none -c flatpacked \ - img2cif_canonical.cif cif2cbf_packed.cbf - $(LDPREFIX) $(BIN)/cif2cbf -e none -c canonical \ - img2cif_packed.cif cif2cbf_canonical.cbf - -cmp cif2cbf_packed.cbf makecbf.cbf - -cmp cif2cbf_packed.cbf img2cif_packed.cbf - -cmp cif2cbf_canonical.cbf img2cif_canonical.cbf - - -# -# Extra Tests -# -$(MINICBF_TEST)/minicbf.h5: - cd $(MINICBF_TEST); $(LDPREFIX) $(TIME) $(BIN)/minicbf2nexus -c zlib \ - -C config $(HDF5REGISTER) -o minicbf.h5 ../X4_lots_M1S4_1_*.cbf -mb_LP_1_001.cbf: - $(LDPREFIX) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - - - -ifneq ($(F90C),) -extra: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf \ - $(BIN)/minicbf2nexus $(BIN)/cbf2nexus $(BIN)/nexus2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf \ - $(BIN)/testhdf5 $(BIN)/testalloc \ - $(BIN_TESTULP) \ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUT) $(EXAMPLES)/batch_convert_minicbf.sh \ - $(TEMPLATES)/template_X4_lots_M1S4.cbf -else -extra: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf \ - $(BIN)/minicbf2nexus $(BIN)/cbf2nexus $(BIN)/nexus2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf $(BIN)/cbf2adscimg \ - $(BIN)/testhdf5 $(BIN)/testalloc \ - $(BIN_TESTULP) \ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUT) $(EXAMPLES)/batch_convert_minicbf.sh -endif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e hex -c none \ - makecbf.cbf cif2cbf_ehcn.cif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ - cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf -F example.mar2300 converted_flat.cbf - -cmp converted_flat.cbf converted_flat_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf example.mar2300 converted.cbf - -cmp converted.cbf converted_orig.cbf - -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat > testcell.prt - -cmp testcell.prt testcell_orig.prt - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -cmp adscconverted_flat.cbf adscconverted_flat_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -cmp adscconverted.cbf adscconverted_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -cmp mb_LP_1_001.cbf mb_LP_1_001_orig.cbf -ifneq ($(CLEANTESTS),) - mv mb_LP_1_001.cbf nmb_LP_1_001.cbf -else - cp mb_LP_1_001.cbf nmb_LP_1_001.cbf -endif - $(LDPREFIX) $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf - -cmp nmb_LP_1_001.img mb_LP_1_001.img - rm nmb_LP_1_001.cbf -ifneq ($(CLEANTESTS),) - rm nmb_LP_1_001.img -endif - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -cmp insulin_pilatus6mconverted.cbf insulin_pilatus6mconverted_rev_orig.cbf - -$(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -cmp insulin_pilatus6mconverted_v2.cbf insulin_pilatus6mconverted_v2_orig.cbf - (CBF_CONVERT_MINICBF_PATH=$(BIN); export CBF_CONVERT_MINICBF_PATH; \ - $(LDPREFIX) $(EXAMPLES)/batch_convert_minicbf.sh "." "minicbf_test" \ - "X4_lots_M1S4_1_*.cbf" $(TEMPLATES)/template_X4_lots_M1S4.cbf) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w -O $(HDF5REGISTER) -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encI.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encp.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cb -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encb.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cc -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encc.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cz -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encz.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cl -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encl.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -c2 -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(H5DUMP) insulin_pilatus6mconverted_orig.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted_orig.cbf.h5.dump) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(H5DUMP) insulin_pilatus6mconverted.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted.cbf.h5.dump) - -$(DIFF) insulin_pilatus6mconverted_orig.cbf.h5.dump insulin_pilatus6mconverted.cbf.h5.dump - -rm -f insulin_pilatus6mconverted_orig.cbf.h5.dump - -rm -f insulin_pilatus6mconverted.cbf.h5.dump - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_orig.cbf.h5.cbf -o insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf.h5 -o insulin_pilatus6mconverted.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted.cbf.h5.cbf -o insulin_pilatus6mconverted.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encp.cbf.h5 -o insulin_pilatus6mconverted_encp.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encp.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encb.cbf.h5 -o insulin_pilatus6mconverted_encb.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encb.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encI.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encI.cbf.h5.cbf -o insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encc.cbf.h5 -o insulin_pilatus6mconverted_encc.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encc.cbf.h5.cbf -o insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encz.cbf.h5 -o insulin_pilatus6mconverted_encz.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encz.cbf.h5.cbf -o insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encl.cbf.h5 -o insulin_pilatus6mconverted_encl.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encl.cbf.h5.cbf -o insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_enc2.cbf.h5 -o insulin_pilatus6mconverted_enc2.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_enc2.cbf.h5.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -rm -f insulin_pilatus6mconverted*.cbf.h5.eqcI.cbf - $(LDPREFIX) $(TINE) $(BIN)/test_cbf_airy_disk - $(LDPREFIX) $(TIME) $(BIN)/cbf_testxfelread - $(LDPREFIX) $(TIME) $(BIN)/testalloc - $(LDPREFIX) $(TIME) $(BIN)/testhdf5; rm -f testfile.h5 -ifneq ($(CBF_USE_ULP),) - $(LDPREFIX) $(TIME) $(BIN)/testulp -endif - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/minicbf2nexus -c zlib \ - -C config $(HDF5REGISTER) -o minicbf.h5 ../X4_lots_M1S4_1_*.cbf - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) ../minicbf_orig.h5 | $(ALLBUTONE) > minicbf_original.dump - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) minicbf.h5 | $(ALLBUTONE) > minicbf.dump - -cd $(MINICBF_TEST); $(DIFF) minicbf_original.dump minicbf.dump - $(LDPREFIX) cd $(MINICBF_TEST); rm -f minicbf_original.dump - $(LDPREFIX) cd $(MINICBF_TEST); rm -f minicbf.dump - #cd $(MINICBF_TEST); rm -f minicbf.h5 - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/cbf2nexus -c zlib \ - --list -o i19-1.h5 ../1191_00005.cbf - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/nexus2cbf \ - -o i19-1.cbf i19-1.h5 - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/cbf2nexus -c zlib \ - --list -o i19-2.h5 i19-1.cbf - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/nexus2cbf \ - -o i19-2.cbf i19-2.h5 - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) i19-1.h5 | $(ALLBUTONE) > i19-1.dump - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) i19-2.h5 | $(ALLBUTONE) > i19-2.dump - -cd $(MINICBF_TEST); $(DIFF) i19-1.dump i19-2.dump - -cd $(MINICBF_TEST); $(DIFF) i19-1.cbf i19-2.cbf - $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf -ifneq ($(F90C),) - $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatout.out) - -$(DIFF) test_xds_bin_testflatout.out test_xds_bin_testflatout_orig.out - $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatpackedout.out) - -$(DIFF) test_xds_bin_testflatpackedout.out test_xds_bin_testflatpackedout_orig.out - $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatout.out) - -$(DIFF) test_fcb_read_testflatout.out test_fcb_read_testflatout_orig.out - $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatpackedout.out) - -$(DIFF) test_fcb_read_testflatpackedout.out test_fcb_read_testflatpackedout_orig.out -endif - $(LDPREFIX) $(TIME) $(BIN)/sauter_test - $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - -$(DIFF) XRD1621.cbf XRD1621_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(DIFF) XRD1621_I4encbC100.cbf XRD1621_I4encbC100_orig.cbf - -ifneq ($(F90C),) -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf \ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -else -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf\ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -endif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e hex -c none \ - makecbf.cbf cif2cbf_ehcn.cif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ - cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F example.mar2300 converted_flat.cbf - -$(SIGNATURE) < converted_flat.cbf | $(DIFF) - converted_flat_orig.cbf$(SEXT); rm converted_flat.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image example.mar2300 converted.cbf - -$(SIGNATURE) < converted.cbf | $(DIFF) - converted_orig.cbf$(SEXT); rm converted.cbf - -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat | \ - $(SIGNATURE) | $(DIFF) - testcell_orig.prt$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -$(SIGNATURE) < adscconverted_flat.cbf | $(DIFF) - adscconverted_flat_orig.cbf$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -$(SIGNATURE) < adscconverted.cbf | $(DIFF) - adscconverted_orig.cbf$(SEXT); rm adscconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -$(SIGNATURE) < mb_LP_1_001.cbf | $(DIFF) - mb_LP_1_001_orig.cbf$(SEXT) - mv mb_LP_1_001.cbf nmb_LP_1_001.cbf - $(LDPREFIX) $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf - -cmp nmb_LP_1_001.img mb_LP_1_001.img - rm nmb_LP_1_001.cbf - rm nmb_LP_1_001.img - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted.cbf | $(DIFF) - insulin_pilatus6mconverted_rev_orig.cbf$(SEXT); rm insulin_pilatus6mconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf | $(DIFF) - insulin_pilatus6mconverted_v2_orig.cbf$(SEXT); rm insulin_pilatus6mconverted_v2.cbf - $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf -ifneq ($(F90C),) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatpackedout_orig.out$(SEXT) -endif - $(LDPREFIX) $(TIME) $(BIN)/sauter_test - $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(SIGNATURE) < XRD1621.cbf | $(DIFF) - XRD1621_orig.cbf$(SEXT); rm XRD1621.cbf - -$(SIGNATURE) < XRD1621_I4encbC100.cbf | $(DIFF) - XRD1621_I4encbC100_orig.cbf$(SEXT); rm XRD1621_I4encbC100.cbf - @-rm -f adscconverted_flat.cbf - @-rm -f $(TESTINPUT_BASIC) $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) - @-rm -f cif2cbf_packed.cbf makecbf.cbf \ - cif2cbf_packed.cbf img2cif_packed.cbf \ - cif2cbf_canonical.cbf img2cif_canonical.cbf - @-rm -f testrealout.cbf testflatout.cbf testflatpackedout.cbf \ - cif2cbf_encp.cbf img2cif_canonical.cif img2cif_packed.cif 9ins.cbf - - - -pycbftests: $(PYCBF)/_pycbf.$(PYCBFEXT) $(BIN)/cbf_standardize_numbers - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test1.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test2.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test3.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test4.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test1.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test2.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py ../hit-20140306005258847.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test1_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test1.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test2_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test2.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test3_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test3.out - - -pycbfinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfinstall - -pycbfuserinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfuserinstall - -javatests: $(BIN)/ctestcbf $(BIN)/testcbf.class $(SOLIB)/libcbf_wrap.so - $(LDPREFIX) $(BIN)/ctestcbf > testcbfc.txt - $(LDPREFIX) java -cp $(JCBF)/cbflib-$(VERSION).jar:$(BIN) testcbf > testcbfj.txt - $(DIFF) testcbfc.txt testcbfj.txt - -dectristests: $(BIN)/cbf_template_t $(TEMPLATES)/cbf_test_orig.out - $(LDPREFIX) (cd templates; ../bin/cbf_template_t; diff -a -u cbf_test_orig.out cbf_template_t.out) - -# -# Remove all non-source files -# -empty: - @-rm -rf $(LIB)/* - @-rm -rf $(INCLUDE)/bitshuf* - @-rm -rf $(INCLUDE)/bshuf* - @-rm -rf $(INCLUDE)/H5* - @-rm -rf $(BIN)/* - @-rm -f $(PYCBF)/_pycbf.$(PYCBFEXT) - @-rm -rf $(PYCBF)/build/* - @-rm -f $(PYCBF)/newtest1.cbf - @-rm -f $(PYCBF)/fel_test1.out - @-rm -f $(PYCBF)/fel_test2.out - @-rm -f $(PYCBF)/setup.py - @-rm -f $(PYCBF)/setup_MINGW.py - @-rm -f makecbf.cbf - @-rm -f img2cif_packed.cif - @-rm -f img2cif_canonical.cif - @-rm -f img2cif_packed.cbf - @-rm -f img2cif_canonical.cbf - @-rm -f img2cif_raw.cbf - @-rm -f cif2cbf_packed.cbf - @-rm -f cif2cbf_canonical.cbf - @-rm -f converted.cbf - @-rm -f adscconverted.cbf - @-rm -f converted_flat.cbf - @-rm -f adscconverted_flat.cbf - @-rm -f adscconverted_flat_rev.cbf - @-rm -f mb_LP_1_001.cbf - @-rm -f cif2cbf_ehcn.cif - @-rm -f cif2cbf_encp.cbf - @-rm -f 9ins.cbf - @-rm -f 9ins.cif - @-rm -f testcell.prt - @-rm -f example.mar2300 - @-rm -f converted_orig.cbf - @-rm -f adscconverted_orig.cbf - @-rm -f converted_flat_orig.cbf - @-rm -f adscconverted_flat_orig.cbf - @-rm -f adscconverted_flat_rev_orig.cbf - @-rm -f mb_LP_1_001_orig.cbf - @-rm -f insulin_pilatus6mconverted*.cbf - @-rm -f insulin_pilatus6mconverted*.h5 - @-rm -f insulin_pilatus6m.cbf - @-rm -f testrealin.cbf - @-rm -f testrealout.cbf - @-rm -f testflatin.cbf - @-rm -f testflatout.cbf - @-rm -f testflatpackedin.cbf - @-rm -f testflatpackedout.cbf - @-rm -f CTC.cbf - @-rm -f test_fcb_read_testflatout.out - @-rm -f test_fcb_read_testflatpackedout.out - @-rm -f test_xds_bin_testflatpackedout.out - @-rm -f test_xds_bin_testflatout.out - @-rm -f test_fcb_read_testflatout_orig.out - @-rm -f test_fcb_read_testflatpackedout_orig.out - @-rm -f test_xds_bin_testflatpackedout_orig.out - @-rm -f test_xds_bin_testflatout_orig.out - @-rm -f mb_LP_1_001.img - @-rm -f 9ins.cif - @-rm -f testcell_orig.prt - @-rm -f $(DECTRIS_EXAMPLES)/cbf_template_t.out - @-rm -f XRD1621.cbf - @-rm -f XRD1621_orig.cbf - @-rm -f XRD1621_I4encbC100_orig.cbf - @-rm -f XRD1621_I4encbC100.cbf - @-rm -f minicbf_orig.h5 - @-rm -f $(SRC)/fcb_exit_binary.f90 - @-rm -f $(SRC)/fcb_next_binary.f90 - @-rm -f $(SRC)/fcb_open_cifin.f90 - @-rm -f $(SRC)/fcb_packed.f90 - @-rm -f $(SRC)/fcb_read_bits.f90 - @-rm -f $(SRC)/fcb_read_image.f90 - @-rm -f $(SRC)/fcb_read_xds_i2.f90 - @-rm -f $(EXAMPLES)/test_fcb_read_image.f90 - @-rm -f $(EXAMPLES)/test_xds_binary.f90 - @-rm -f symlinksdone - @-rm -f $(TESTOUTPUT) *$(SEXT) - @-rm -rf $(SOLIB) - @-rm -rf $(JCBF) - @-rm -f $(SRC)/cbf_wrap.c - @-rm -rf $(REGEX) - @-rm -rf $(REGEX)_install - @-rm -rf $(TIFF) - @-rm -rf $(TIFF)_install - @-rm -rf $(HDF5) - @-rm -rf $(HDF5)_install - @-rm -rf $(INCLUDE)/tiff* - @-rm -rf $(INCLUDE)/H5* - @-rm -rf $(INCLUDE)/hdf5* - @-rm -rf share - @-rm -rf $(MINICBF_TEST)/i19* - @-rm -rf solib - @-rm -f thaumatin_die_M1S5_1_0005_2.cbf - @-rm -f 1191_00005.cbf - @-rm -f XRD1621.tif - @-rm -f md5tmp - @-rm -rf $(PYCBF)/build - @-rm -f *_old - @-rm -f X4_lots_M1S4_1_*.cbf - @-rm -f testfile.h5 - @-rm -f hit-20140306005258847.cbf - @-rm -f build_* - ./.undosymlinks - -# -# Remove temporary files -# -clean: - @-rm -f core - @-rm -f *.o - @-rm -f *.u -# -# Restore to distribution state -# -distclean: clean empty - -# -# Create a Tape Archive for distribution -# - -tar: $(DOCUMENTS) $(SOURCE) $(SRC)/cbf.stx $(HEADERS) $(M4FILES)\ - $(EXAMPLES) \ - README.html README Makefile \ - $(JPEGS) - -/bin/rm -f CBFlib.tar* - tar cvBf CBFlib.tar \ - $(DOCUMENTS) $(SOURCE) $(SRC)/cbf.stx $(HEADERS) $(M4FILES)\ - $(EXAMPLES) \ - README.html README Makefile \ - $(JPEGS) - gzip --best CBFlib.tar - diff --git a/Makefile_OSX b/Makefile_OSX index ffca2a08..e5b15084 100644 --- a/Makefile_OSX +++ b/Makefile_OSX @@ -2,12 +2,12 @@ ###################################################################### # Makefile - command file for make to create CBFlib # # # -# Version 0.9.6 19 May 2020 # +# Version 0.9.7 28 June 2021 # # # # Paul Ellis and # # Herbert J. Bernstein (yaya@bernstein-plus-sons.com) # # # -# (C) Copyright 2006 - 2020 Herbert J. Bernstein # +# (C) Copyright 2006 - 2021 Herbert J. Bernstein # # # ###################################################################### @@ -251,7 +251,7 @@ .DELETE_ON_ERROR: # Version string -VERSION = 0.9.6 +VERSION = 0.9.7 # # Directories @@ -265,7 +265,8 @@ BIN = $(ROOT)/bin SRC = $(ROOT)/src INCLUDE = $(ROOT)/include M4 = $(ROOT)/m4 -PYCBF = $(ROOT)/pycbf +PY2CBF = $(ROOT)/py2cbf +PY3CBF = $(ROOT)/pycbf EXAMPLES = $(ROOT)/examples TEMPLATES= $(ROOT)/templates DECTRIS_EXAMPLES = $(EXAMPLES)/dectris_cbf_template_test @@ -274,7 +275,6 @@ MINICBF_TEST = $(ROOT)/minicbf_test GRAPHICS = $(ROOT)/html_graphics DATADIRI = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Input DATADIRO = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output -DATADIRS = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only CBF_PREFIX ?= $(HOME) # @@ -289,6 +289,19 @@ CBFLIB_DONT_USE_LZ4?=no CBFLIB_DONT_USE_BSHUF?=no +CBFLIB_DONT_USE_LOCAL_NUWEB ?= no +ifeq ($(CBFLIB_DONT_USE_LOCAL_NUWEB),yes) +NUWEB=nuweb +NUWEB_DEP= +NUWEB_DEP2= +else +NUWEB=$(BIN)/nuweb +NUWEB_DEP=nuweb-1.60 +NUWEB_DEP2=$(BIN)/nuweb +endif + + + CBFLIB_DONT_HAVE_FGETLN ?= yes ifeq ($(CBFLIB_DONT_HAVE_FGETLN),yes) SRC_FGETLN = $(SRC)/fgetln.c @@ -297,15 +310,26 @@ SRC_FGETLN = endif -CBFLIB_DONT_USE_PYCIFRW ?= no -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) +CBFLIB_DONT_USE_PY2CIFRW ?= no +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) # -# Definitions to get versions of PyCifRW and PLY +# Definitions to get versions of python2 PyCifRW and PLY # -PYCIFRW ?= PyCifRW-4.1 -PLY = ply-3.2 -PYCIFRWFLAG = -DCBF_USE_PYCIFRW -PYCIFRW_PREFIX ?= $(HOME)/.local +PY2CIFRW ?= PyCifRW-4.1 +PY2PLY = ply-3.2 +PY2CIFRWFLAG = -DCBF_USE_PYCIFRW +PY2CIFRW_PREFIX ?= $(HOME)/.local +endif + +CBFLIB_DONT_USE_PY3CIFRW ?= no +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +# +# Definitions to get versions of python3 PyCifRW and PLY +# +PY3CIFRW ?= PyCifRW-4.3_rev_19Jun21 +PY3PLY = ply-3.11 +PY3CIFRWFLAG = -DCBF_USE_PYCIFRW +PY3CIFRW_PREFIX ?= $(HOME)/.local endif # @@ -322,13 +346,20 @@ TIFF_INSTALL = $(TIFF)_INSTALL ifneq ($(HDF5_PREFIX),) # already installed on system CBFLIB_DONT_USE_LOCAL_HDF5 = yes +HDF5CFLAGS=-DH5_USE_110_API endif ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes) HDF5_PREFIX ?= $(PWD) -HDF5 ?= hdf5-1.10.6 +HDF5 ?= hdf5-1.12.0 +#HDF5 ?= hdf5-1.10.6 #HDF5 = hdf5-1.8.18 #HDF5 = hdf5-1.10.5 +ifeq ($(HDF5),hdf5-1.12.0) +HDF5CFLAGS=-DH5_USE_110_API +else +HDF5CFLAGS= +endif HDF5dep = $(HDF5) HDF5_INSTALL = $(HDF5)_INSTALL ifneq ($(MSYS2),yes) @@ -379,7 +410,7 @@ ifneq ($(CBFLIB_DONT_USE_LZ4),yes) # Definitions to get a version of HDF5Plugin for LZ4 # ifneq ($(MSYS2),yes) -LZ4 ?= HDF5Plugin_14Aug20 +LZ4 ?= HDF5Plugin_5Jun21 else LZ4 ?= HDF5-External-Filter-Plugins endif @@ -430,9 +461,8 @@ endif # # Definition of python to use # -#PYTHON = python -PYTHON ?= python2 - +PYTHON2 ?= python2 +PYTHON3 ?= python3 # # Definitions to get a stable version of regex @@ -539,12 +569,6 @@ PYSWIG = swig -python # JSWIG = swig -java -# -# Program to generate LaTex and HTML program documentation -# - -NUWEB = nuweb - # # Compiler for Java # @@ -597,14 +621,24 @@ endif MISCFLAG = $(NOLLFLAG) $(ULPFLAG) # -# PYCBF definitions +# PY2CBF definitions # -PYCBFEXT = so -PYCBFBOPT = -PYCBFIOPT = +PY2CBFEXT = so +PY2CBFBOPT = +PY2CBFIOPT = SETUP_PY = setup.py INSTALLSETUP_PY = installsetup.py +# +# PY3CBF definitions +# +PY3CBFEXT = so +PY3CBFBOPT = +PY3CBFIOPT = +SETUP_PY = setup.py +INSTALLSETUP_PY = installsetup.py + + # # Set the compiler and flags # @@ -617,10 +651,10 @@ INSTALLSETUP_PY = installsetup.py ######################################################### CC = gcc C++ = g++ -CFLAGS = -g -O2 -Wall -ansi -pedantic +CFLAGS = -g -O2 -Wall -ansi -pedantic $(HDF5CFLAGS) LDFLAGS = F90C = gfortran -F90FLAGS = -g -fno-range-check +F90FLAGS = -g -fno-range-check -fallow-invalid-boz F90LDFLAGS = -bind_at_load SOCFLAGS = -fPIC SOLDFLAGS = -dynamiclib -Wl,-rpath,$(CBF_PREFIX)/lib @@ -642,18 +676,24 @@ endif DATAURLBASE = http://downloads.sf.net/cbflib/ DATAURLI = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Input.tar.gz DATAURLO = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output.tar.gz -DATAURLS = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz # # URLs from which to retrieve needed external package snapshots # -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWURL = http://downloads.sf.net/cbflib/$(PYCIFRW).tar.gz -PLYURL = http://www.dabeaz.com/ply/$(PLY).tar.gz +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2CIFRWURL = http://downloads.sf.net/cbflib/$(PY2CIFRW).tar.gz +PY2PLYURL = http://www.dabeaz.com/ply/$(PY2PLY).tar.gz +endif +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3CIFRWURL = http://downloads.sf.net/cbflib/$(PY3CIFRW).tar.gz +PY3PLYURL = http://downloads.sf.net/cbflib/$(PY3PLY).tar.gz endif REGEX_URL ?= http://downloads.sf.net/cbflib/$(REGEX).tar.gz TIFF_URL ?= http://downloads.sf.net/cbflib/$(TIFF).tar.gz HDF5_URL ?= http://downloads.sf.net/cbflib/$(HDF5).tar.gz +ifneq ($(CBFLIB_DONT_USE_LOCAL_NUWEB),yes) +NUWEB_URL ?= http://downloads.sf.net/cbflib/$(NUWEB_DEP).tar.gz +endif ifneq ($(MSYS2),yes) LZ4_URL = http://downloads.sf.net/cbflib/$(LZ4).tar.gz else @@ -670,10 +710,11 @@ INCLUDES = -I$(INCLUDE) -I$(SRC) $(HDF5include) # # runtime library path export commands # -RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export LD_LIBRARY_PATH; \ - DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export DYLD_LIBRARY_PATH; \ - LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib;export LD_RUN_PATH; - +ifeq ($(HDF5_PREFIX),) +RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export LD_LIBRARY_PATH; DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export DYLD_LIBRARY_PATH; LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib;export LD_RUN_PATH; +else +RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib:$(HDF5_PREFIX)/lib;export LD_LIBRARY_PATH; DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib:$(HDF5_PREFIX)/lib;export DYLD_LIBRARY_PATH; LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib:$(HDF5_PREFIX)/lib;export LD_RUN_PATH; +endif ###################################################################### # You should not need to make modifications below this line # @@ -755,8 +796,15 @@ SOURCE = $(SRC)/cbf.c \ $(SRC)/img.c \ $(SRC_FGETLN) $(SRC_REALPATH) -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYSOURCE = $(SRC)/drel_lex.py \ +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2SOURCE = $(SRC)/drel_lex.py \ + $(SRC)/drel_yacc.py \ + $(SRC)/drelc.py \ + $(SRC)/drel_prep.py +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3SOURCE = $(SRC)/drel_lex.py \ $(SRC)/drel_yacc.py \ $(SRC)/drelc.py \ $(SRC)/drel_prep.py @@ -873,6 +921,26 @@ default: @echo ' ' @echo ' $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(PYCIFRWFLAG)' @echo ' ' + @echo ' If you have changed any of the nuweb .w input files, you will need' + @echo ' need nuweb installed, check that CBFLIB_DONT_USE_LOCAL_NUWEB,' + @echo ' and NUWEB are defined correctly :' + @echo ' ' + @echo ' The current values are:' + @echo ' ' + @echo ' CBFLIB_DONT_USE_LOCAL_NUWEB = $(CBFLIB_DONT_USE_LOCAL_NUWEB)' + @echo ' NUWEB = $(NUWEB)' + @echo ' NUWEB_DEP = $(NUWEB_DEP)' + @echo ' NUWEB_DEP2 = $(NUWEB_DEP2)' + @echo ' ' + @echo ' You will need either a system HDF5 1.12 or it to be installed here.' + @echo ' Check that CBFLIB_DONT_USE_LOCAL_HDF5 and HDF5 are defined correctly :' + @echo ' ' + @echo ' The current values are:' + @echo ' ' + @echo ' CBFLIB_DONT_USE_LOCAL_HDF5 = $(CBFLIB_DONT_USE_LOCAL_HDF5)' + @echo ' HDF5 = $(HDF5)' + @echo ' HDF5_PREFIX = $(HDF5_PREFIX)' + @echo ' ' @echo ' Before installing the CBF library and example programs, check' @echo ' that the install directory is correct:' @echo ' ' @@ -904,20 +972,10 @@ default: @echo ' The tests assume that several data files are in the directories' @echo ' $(DATADIRI) and $(DATADIRO)' @echo ' ' - @echo ' Alternatively tests can be run comparing MD5 signatures only by' - @echo ' ' - @echo ' make tests_sigs_only' - @echo ' ' - @echo ' These signature only tests save space and download time by' - @echo ' assuming that input data files and the output signatures' - @echo ' are in the directories' - @echo ' $(DATADIRI) and $(DATADIRS)' - @echo ' ' @echo ' These directory can be obtained from' @echo ' ' @echo ' $(DATAURLI) ' @echo ' $(DATAURLO) ' - @echo ' $(DATAURLS) ' @echo ' ' @echo ' To clean up the directories type:' @echo ' ' @@ -933,10 +991,16 @@ default: # # Compile the library and examples # -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEPS = $(PYCIFRW) $(PLY) +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2CIFRWDEPS = $(PY2CIFRW) $(PY2PLY) +else +PY2CIFRWDEPS = +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3CIFRWDEPS = $(PY3CIFRW) $(PY3PLY) else -PYCIFRWDEPS = +PY3CIFRWDEPS = endif ifneq ($(CBFLIB_DONT_USE_LZ4),yes) @@ -956,7 +1020,8 @@ all:: $(BIN) $(SOURCE) $(F90SOURCE) $(HEADERS) \ $(HDF5) \ $(LZ4DEPS) \ $(BSHUFDEPS) \ - $(PYCIFRWDEPS) \ + $(PY2CIFRWDEPS) \ + $(PY3CIFRWDEPS) \ symlinksdone \ $(REGEXDEP) \ $(LIB) \ @@ -998,92 +1063,101 @@ shared: $(SOLIB)/libcbf.so $(SOLIB)/libfcb.so $(SOLIB)/libimg.so javawrapper: shared $(JCBF) $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEF = -Dcbf_use_pycifrw=yes +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2CIFRWDEF = -Dcbf_use_py2cifrw=yes +else +PY2CIFRWDEF = +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3CIFRWDEF = -Dcbf_use_py3cifrw=yes else -PYCIFRWDEF = +PY3CIFRWDEF = endif -Makefiles: Makefile \ - Makefile_LINUX \ - Makefile_LINUX_64 \ +Makefiles: \ + Makefile \ + Makefile_LINUX \ + Makefile_OSX \ + Makefile_MINGW \ + Makefile_MSYS2 + +Makefiles_pre_0.9.7: \ + Makefile_LINUX_64 \ Makefile_LINUX_gcc42 \ Makefile_LINUX_DMALLOC \ Makefile_LINUX_gcc42_DMALLOC \ - Makefile_OSX \ Makefile_OSX_gcc42 \ Makefile_OSX_gcc42_DMALLOC \ - Makefile_AIX \ - Makefile_MINGW \ - Makefile_MSYS2 \ + Makefile_AIX \ Makefile_IRIX_gcc Makefile_LINUX: $(M4)/Makefile.m4 -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX $(M4)/Makefile.m4 > Makefile_LINUX.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX $(M4)/Makefile.m4 > Makefile_LINUX.tmp mv Makefile_LINUX.tmp Makefile_LINUX Makefile_LINUX_DMALLOC: $(M4)/Makefile.m4 -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_DMALLOC.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_DMALLOC.tmp mv Makefile_LINUX_DMALLOC.tmp Makefile_LINUX_DMALLOC Makefile_LINUX_64: $(M4)/Makefile.m4 -cp Makefile_LINUX_64 Makefile_LINUX_64_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_64 $(M4)/Makefile.m4 > Makefile_LINUX_64.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_64 $(M4)/Makefile.m4 > Makefile_LINUX_64.tmp mv Makefile_LINUX_64.tmp Makefile_LINUX_64 Makefile_LINUX_gcc42: $(M4)/Makefile.m4 -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42 $(M4)/Makefile.m4 > Makefile_LINUX_gcc42.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_gcc42 $(M4)/Makefile.m4 > Makefile_LINUX_gcc42.tmp mv Makefile_LINUX_gcc42.tmp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_DMALLOC: $(M4)/Makefile.m4 -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_gcc42_DMALLOC.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_gcc42_DMALLOC.tmp mv Makefile_LINUX_gcc42_DMALLOC.tmp Makefile_LINUX_gcc42_DMALLOC Makefile_OSX: $(M4)/Makefile.m4 -cp Makefile_OSX Makefile_OSX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX $(M4)/Makefile.m4 > Makefile_OSX.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=OSX $(M4)/Makefile.m4 > Makefile_OSX.tmp mv Makefile_OSX.tmp Makefile_OSX Makefile_OSX_gcc42: $(M4)/Makefile.m4 -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42 $(M4)/Makefile.m4 > Makefile_OSX_gcc42.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=OSX_gcc42 $(M4)/Makefile.m4 > Makefile_OSX_gcc42.tmp mv Makefile_OSX_gcc42.tmp Makefile_OSX_gcc42 Makefile_OSX_gcc42_DMALLOC: $(M4)/Makefile.m4 -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_OSX_gcc42_DMALLOC.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=OSX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_OSX_gcc42_DMALLOC.tmp mv Makefile_OSX_gcc42_DMALLOC.tmp Makefile_OSX_gcc42_DMALLOC Makefile_AIX: $(M4)/Makefile.m4 -cp Makefile_AIX Makefile_AIX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=AIX $(M4)/Makefile.m4 > Makefile_AIX.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=AIX $(M4)/Makefile.m4 > Makefile_AIX.tmp mv Makefile_AIX.tmp Makefile_AIX Makefile_MINGW: $(M4)/Makefile.m4 -cp Makefile_MINGW Makefile_MINGW_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MINGW $(M4)/Makefile.m4 > Makefile_MINGW.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=MINGW $(M4)/Makefile.m4 > Makefile_MINGW.tmp mv Makefile_MINGW.tmp Makefile_MINGW Makefile_MSYS2: $(M4)/Makefile.m4 -cp Makefile_MSYS2 Makefile_MSYS2_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MSYS2 $(M4)/Makefile.m4 > Makefile_MSYS2.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=MSYS2 $(M4)/Makefile.m4 > Makefile_MSYS2.tmp mv Makefile_MSYS2.tmp Makefile_MSYS2 Makefile_IRIX_gcc: $(M4)/Makefile.m4 -cp Makefile_IRIX_gcc Makefile_IRIX_gcc_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=IRIX_gcc $(M4)/Makefile.m4 > Makefile_IRIX_gcc.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=IRIX_gcc $(M4)/Makefile.m4 > Makefile_IRIX_gcc.tmp mv Makefile_IRIX_gcc.tmp Makefile_IRIX_gcc Makefile: $(M4)/Makefile.m4 -cp Makefile Makefile_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=default $(M4)/Makefile.m4 > Makefile.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=default $(M4)/Makefile.m4 > Makefile.tmp mv Makefile.tmp Makefile cbflib.ini: $(M4)/Makefile.m4 @@ -1099,12 +1173,12 @@ symlinksdone: ./.symlinks $(SLFLAGS) touch symlinksdone -install: baseinstall pycbfinstall \ +install: baseinstall py2cbfinstall py3cbfinstall \ $(HDF5_INSTALL) \ $(TIFF_INSTALL) \ $(REGEX_INSTALL) -userinstall: baseinstall pycbfuserinstall \ +userinstall: baseinstall py2cbfuserinstall py3cbfuserinstall \ $(HDF5_INSTALL) \ $(TIFF_INSTALL) \ $(REGEX_INSTALL) @@ -1236,38 +1310,96 @@ endif chmod 755 $(CBF_PREFIX)/bin/batch_convert_minicbf.sh chmod 644 $(CBF_PREFIX)/include/cbflib/*.h -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -# -# PyCifRW -# -build_pycifrw: $(M4)/Makefile.m4 - touch build_pycifrw -$(PYCIFRW): build_pycifrw - -rm -rf $(PYCIFRW) - -rm -rf $(PYCIFRW).tar.gz - $(DOWNLOAD) $(PYCIFRWURL) - tar -xvf $(PYCIFRW).tar.gz - -rm $(PYCIFRW).tar.gz - (cd $(PYCIFRW); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +# +# Py2CifRW +# +build_py2cifrw: $(M4)/Makefile.m4 + touch build_py2cifrw +$(PY2CIFRW): build_py2cifrw + -rm -rf $(PY2CIFRW) + -rm -rf $(PY2CIFRW).tar.gz + $(DOWNLOAD) $(PY2CIFRWURL) + tar -xvf $(PY2CIFRW).tar.gz + -rm $(PY2CIFRW).tar.gz + (cd $(PY2CIFRW); \ + PYTHONPATH=$(PY2CIFRW_PREFIX)/lib/python:$(PY2CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON2) setup.py install --prefix= --home=$(PY2CIFRW_PREFIX) ) + +# +# PY2PLY +# +build_py2ply: $(M4)/Makefile.m4 + touch build_py2ply +$(PY2PLY): build_py2ply + -rm -rf $(PY2PLY) + -rm -rf $(PY2PLY).tar.gz + $(DOWNLOAD) $(PY2PLYURL) + tar -xvf $(PY2PLY).tar.gz + -rm $(PY2PLY).tar.gz + (cd $(PY2PLY); \ + PYTHONPATH=$(PY2CIFRW_PREFIX)/lib/python:$(PY2CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON2) setup.py install --prefix= --home=$(PY2CIFRW_PREFIX) ) +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +# +# Py3CifRW +# +build_py3cifrw: $(M4)/Makefile.m4 + touch build_py3cifrw +$(PY3CIFRW): build_py3cifrw + -rm -rf $(PY3CIFRW) + -rm -rf $(PY3CIFRW).tar.gz + $(DOWNLOAD) $(PY3CIFRWURL) + tar -xvf $(PY3CIFRW).tar.gz + -rm $(PY3CIFRW).tar.gz + (cd $(PY3CIFRW); \ + PYTHONPATH=$(PY3CIFRW_PREFIX)/lib/python:$(PY3CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON3) setup.py install --prefix= --home=$(PY3CIFRW_PREFIX) ) + +# +# PY3PLY +# +build_py3ply: $(M4)/Makefile.m4 + touch build_py3ply +$(PY3PLY): build_py3ply + -rm -rf $(PY3PLY) + -rm -rf $(PY3PLY).tar.gz + $(DOWNLOAD) $(PY3PLYURL) + tar -xvf $(PY3PLY).tar.gz + -rm $(PY3PLY).tar.gz + (cd $(PY3PLY); \ + PYTHONPATH=$(PY3CIFRW_PREFIX)/lib/python:$(PY3CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON3) setup.py install --prefix= --home=$(PY3CIFRW_PREFIX) ) +endif + # -# PLY +# NUWEB # -build_ply: $(M4)/Makefile.m4 - touch build_ply -$(PLY): build_ply - -rm -rf $(PLY) - -rm -rf $(PLY).tar.gz - $(DOWNLOAD) $(PLYURL) - tar -xvf $(PLY).tar.gz - -rm $(PLY).tar.gz - (cd $(PLY); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) +ifneq ($(NUWEB_DEP),'') +$(NUWEB_DEP): + -rm -rf $(NUWEB_DEP) + -rm -rf $(NUWEB_DEP).tar.gz + $(DOWNLOAD) $(NUWEB_URL) + tar -xvf $(NUWEB_DEP).tar.gz + touch $(NUWEB_DEP) + rm $(NUWEB_DEP).tar.gz + +$(NUWEB_DEP2): $(NUWEB_DEP) + (cd $(NUWEB_DEP); make nuweb; cp nuweb $(NUWEB_DEP2)) endif + # # REGEX # @@ -1367,7 +1499,7 @@ ifneq ($(MSYS2),yes) tar -xvf $(LZ4).tar.gz -rm $(LZ4).tar.gz (cp $(LZ4include)/lz4.h $(INCLUDE); \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/lz4.c -o lz4.o; \ + $(CC) $(CFLAGS) $(SOWCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/lz4.c -o lz4.o; \ $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/h5zlz4.c -o h5zlz4.o; \ $(CC) -shared lz4.o h5zlz4.o -o $(SOLIB)/libh5zlz4.so; \ rm lz4.o h5zlz4.o) @@ -1564,53 +1696,147 @@ endif # # Python bindings # -$(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ - $(PYCBF)/$(SETUP_PY) \ - $(PYCBF)/pycbf.i \ - $(PYCBF)/cbfhandlewrappers.i \ - $(PYCBF)/cbfdetectorwrappers.i \ - $(PYCBF)/cbfgenericwrappers.i \ - $(PYCBF)/cbfgoniometerwrappers.i + +$(PY2CBF)/make_pycbf.py: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/make_pycbf.w + (cd $(PY2CBF); $(NUWEB) make_pycbf.w) + +$(PY2CBF)/pycbf.i: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf_i.w + (cd $(PY2CBF); $(NUWEB) pycbf_i.w) + +$(PY2CBF)/py2setup_py.m4 \ +$(PY2CBF)/win32.bat \ +$(PY2CBF)/linux.sh \ +$(PY2CBF)/makeflatascii.py \ +$(PY2CBF)/pycbf_test1.py \ +$(PY2CBF)/pycbf_test2.py \ +$(PY2CBF)/pycbf_test3.py \ +$(PY2CBF)/pycbf_test4.py \ +$(PY2CBF)/pycbf_testfelaxes.py \ +$(PY2CBF)/xmas/readmarheader.py \ +$(PY2CBF)/xmas/xmasheaders.py \ +$(PY2CBF)/xmas/xmas_cif_template.cif : $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w + (cd $(PY2CBF); $(NUWEB) pycbf.w ) + touch $(PY2CBF)/py2setup_py.m4 + +$(PY2CBF)/_py2cbf.$(PY2CBFEXT): $(PY2CBF) shared \ + $(PY2CBF)/py2setup.py \ + $(PY2CBF)/pycbf.i \ + $(PY2CBF)/cbfhandlewrappers.i \ + $(PY2CBF)/cbfdetectorwrappers.i \ + $(PY2CBF)/cbfgenericwrappers.i \ + $(PY2CBF)/cbfgoniometerwrappers.i -cp $(SOLIB)/*.so $(LIB) - (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) + (cd $(PY2CBF); $(PYTHON2) py2setup.py build $(PY2CBFBOPT); cp build/lib*/_py2cbf*.$(PY2CBFEXT) .) -$(PYCBF)/pycbfinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --prefix=$(CBF_PREFIX)) +$(PY2CBF)/py2cbfinstall: $(PY2CBF)/pycbf.py + (cd $(PY2CBF); $(PYTHON2) $(INSTALLSETUP_PY) install $(PY2CBFIOPT) --prefix=$(CBF_PREFIX)) -$(PYCBF)/pycbfuserinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --user) +$(PY2CBF)/py2cbfuserinstall: $(PY2CBF)/pycbf.py + (cd $(PY2CBF); $(PYTHON2) $(INSTALLSETUP_PY) install $(PY2CBFIOPT) --user) -$(PYCBF)/setup.py: $(M4)/setup_py.m4 +$(PY2CBF)/py2setup.py: $(PY2CBF)/py2setup_py.m4 (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) + $(PY2CBF)/py2setup_py.m4 > $@) -$(PYCBF)/setup_MINGW.py: m4/setup_py.m4 +$(PY2CBF)/py2setup_MINGW.py: $(PY2CBF)/setup_py.m4 (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) + $(PY2CBF)/py2setup_py.m4 > $@) -$(LIB)/_pycbf.$(PYCBFEXT): $(PYCBF)/_pycbf.$(PYCBFEXT) +$(LIB)/_py2cbf.$(PY2CBFEXT): $(PY2CBF)/_py2cbf.$(PY2CBFEXT) mkdir -p $(LIB) - cp $(PYCBF)/_pycbf.$(PYCBFEXT) $(LIB)/_pycbf.$(PYCBFEXT) + cp $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(LIB)/_py2cbf.$(PY2CBFEXT) -$(PYCBF)/pycbf.pdf: $(PYCBF)/pycbf.w - (cd $(PYCBF); \ +$(PY2CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w + (cd $(PY2CBF); \ $(NUWEB) pycbf; \ latex pycbf; \ $(NUWEB) pycbf; \ latex pycbf; \ dvipdfm pycbf ) -$(PYCBF)/CBFlib.txt: $(DOC)/CBFlib.html - links -dump $(DOC)/CBFlib.html > $(PYCBF)/CBFlib.txt +$(PY2CBF)/CBFlib.txt: $(DOC)/CBFlib.html + links -dump $(DOC)/CBFlib.html > $(PY2CBF)/CBFlib.txt + +$(PY2CBF)/pycbf.py: $(PY2CBF)/pycbf.pdf $(PY2CBF)/cbfdetectorwrappers.i \ + $(PY2CBF)/cbfgenericwrappers.i \ + $(PY2CBF)/cbfgoniometerwrappers.i \ + $(PY2CBF)/CBFlib.txt $(PY2CBF)/make_pycbf.py + (cd $(PY2CBF); $(PYTHON2) make_pycbf.py; $(PYSWIG) -module py2cbf pycbf.i; \ + $(PYTHON2) py2setup.py build; mv pycbf.py rawpycbf.py; \ + cat rawpycbf.py | sed "s/ _pycbf/ _py2cbf/" > pycbf.py ) + +$(PY3CBF)/make_pycbf.py: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/make_pycbf.w + (cd $(PY3CBF); $(NUWEB) make_pycbf.w) + +$(PY3CBF)/pycbf.i: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf_i.w + (cd $(PY3CBF); $(NUWEB) pycbf_i.w) + +$(PY3CBF)/py3setup_py.m4 \ +$(PY3CBF)/win32.bat \ +$(PY3CBF)/linux.sh \ +$(PY3CBF)/makeflatascii.py \ +$(PY3CBF)/pycbf_test1.py \ +$(PY3CBF)/pycbf_test2.py \ +$(PY3CBF)/pycbf_test3.py \ +$(PY3CBF)/pycbf_test4.py \ +$(PY3CBF)/pycbf_testfelaxes.py \ +$(PY3CBF)/xmas/readmarheader.py \ +$(PY3CBF)/xmas/xmasheaders.py \ +$(PY3CBF)/xmas/xmas_cif_template.cif: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w + (cd $(PY3CBF); $(NUWEB) pycbf.w ) + touch $(PY3CBF)/py3setup_py.m4 + + +$(PY3CBF)/_pycbf.$(PY3CBFEXT): $(PY3CBF) shared \ + $(PY3CBF)/py3setup.py \ + $(PY3CBF)/pycbf.i \ + $(PY3CBF)/cbfhandlewrappers.i \ + $(PY3CBF)/cbfdetectorwrappers.i \ + $(PY3CBF)/cbfgenericwrappers.i \ + $(PY3CBF)/cbfgoniometerwrappers.i + -cp $(SOLIB)/*.so $(LIB) + (cd $(PY3CBF); $(PYTHON3) py3setup.py build $(PY3CBFBOPT); cp build/lib*/_pycbf*.$(PY3CBFEXT) .) -$(PYCBF)/cbfhandlewrappers.i \ -$(PYCBF)/cbfdetectorwrappers.i \ -$(PYCBF)/cbfgenericwrappers.i \ -$(PYCBF)/cbfgoniometerwrappers.i: $(PYCBF)/CBFlib.txt $(PYCBF)/make_pycbf.py - (cd $(PYCBF); $(PYTHON) make_pycbf.py; $(PYSWIG) pycbf.i; $(PYTHON) setup.py build) +$(PY3CBF)/py3cbfinstall: $(PY3CBF)/pycbf.py + (cd $(PY3CBF); $(PYTHON3) $(INSTALLSETUP_PY) install $(PY3CBFIOPT) --prefix=$(CBF_PREFIX)) +$(PY3CBF)/py3cbfuserinstall: $(PY3CBF)/pycbf.py + (cd $(PY3CBF); $(PYTHON3) $(INSTALLSETUP_PY) install $(PY3CBFIOPT) --user) + +$(PY3CBF)/py3setup.py: $(PY3CBF)/py3setup_py.m4 + (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ + -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ + $(PY3CBF)/py3setup_py.m4 > $@) + +$(PY3CBF)/py3setup_MINGW.py: $(PY3CBF)/py3setup_py.m4 + (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ + -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ + $(PY3CBF)/py3setup_py.m4 > $@) + +$(LIB)/_pycbf.$(PY3CBFEXT): $(PY3CBF)/_pycbf.$(PY3CBFEXT) + mkdir -p $(LIB) + cp $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(LIB)/_pycbf.$(PY3CBFEXT) + +$(PY3CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w + (cd $(PY3CBF); \ + $(NUWEB) pycbf; \ + latex pycbf; \ + $(NUWEB) pycbf; \ + latex pycbf; \ + dvipdfm pycbf ) + +$(PY3CBF)/CBFlib.txt: $(DOC)/CBFlib.html + links -dump $(DOC)/CBFlib.html > $(PY3CBF)/CBFlib.txt + +$(PY3CBF)/pycbf.py: $(PY3CBF)/pycbf.pdf $(PY3CBF)/cbfdetectorwrappers.i \ + $(PY3CBF)/cbfgenericwrappers.i \ + $(PY3CBF)/cbfgoniometerwrappers.i \ + $(PY3CBF)/CBFlib.txt $(PY3CBF)/make_pycbf.py + (cd $(PY3CBF); $(PYTHON3) make_pycbf.py; $(PYSWIG) pycbf.i; \ + $(PYTHON3) py3setup.py build; mv pycbf.py rawpycbf.py; \ + echo "# coding=utf-8" | cat - rawpycbf.py > pycbf.py) # # Java bindings @@ -1825,7 +2051,7 @@ $(BIN)/sequence_match: $(LIB)/libcbf.a $(EXAMPLES)/sequence_match.c $(LIB)/libim # # tiff2cbf example program # -$(BIN)/tiff2cbf: $(LIB)/libcbf.a $(EXAMPLES)/tiff2cbf.c \ +$(BIN)/tiff2cbf: $(LIB)/libcbf.a $(EXAMPLES)/tiff2cbf.c $(EXAMPLES)/tif_sprint.c \ $(GOPTLIB) $(GOPTINC) $(TIFF) mkdir -p $(BIN) $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ @@ -1971,13 +2197,6 @@ $(DATADIRO): $(M4)/Makefile.m4 touch $(DATADIRO) -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output.tar.gz) -$(DATADIRS): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLS)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - touch $(DATADIRS) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - - # Input Data Files TESTINPUT_BASIC = example.mar2300 @@ -2027,31 +2246,48 @@ TESTOUTPUT = adscconverted_flat_orig.cbf \ adscconverted_orig.cbf converted_flat_orig.cbf converted_orig.cbf \ insulin_pilatus6mconverted_orig.cbf.h5.cbf \ insulin_pilatus6mconverted_orig.cbf.h5 \ + insulin_pilatus6mconverted_orig.cbf \ insulin_pilatus6mconverted_v2_orig.cbf \ mb_LP_1_001_orig.cbf testcell_orig.prt \ test_xds_bin_testflatout_orig.out \ test_xds_bin_testflatpackedout_orig.out test_fcb_read_testflatout_orig.out \ test_fcb_read_testflatpackedout_orig.out \ XRD1621_orig.cbf XRD1621_I4encbC100_orig.cbf \ - minicbf_orig.h5 + minicbf_orig.h5 \ + pycbf_test1_orig.out \ + pycbf_test2_orig.out \ + pycbf_test3_orig.out \ + pycbf_test4_orig.out \ + fel_test1_orig.out \ + fel_test2_orig.out \ + fel_test3_orig.out NEWTESTOUTPUT = adscconverted_flat.cbf \ adscconverted.cbf converted_flat.cbf converted.cbf \ insulin_pilatus6mconverted.cbf \ insulin_pilatus6mconverted.cbf.h5 \ insulin_pilatus6mconverted.cbf.h5.cbf \ + insulin_pilatus6mconverted_orig.cbf \ insulin_pilatus6mconverted_v2.cbf \ mb_LP_1_001.cbf testcell.prt \ test_xds_bin_testflatout.out \ test_xds_bin_testflatpackedout.out test_fcb_read_testflatout.out \ test_fcb_read_testflatpackedout.out \ XRD1621.cbf XRD1621_I4encbC100.cbf \ - $(MINICBF_TEST)/minicbf.h5 + $(MINICBF_TEST)/minicbf.h5 \ + pycbf_test1.out \ + pycbf_test2.out \ + pycbf_test3.out \ + pycbf_test4.out \ + fel_test1.out \ + fel_test2.out \ + fel_test3.out DATADIRO_OUTPUT = $(DATADIRO)/adscconverted_flat_orig.cbf \ $(DATADIRO)/adscconverted_orig.cbf \ $(DATADIRO)/converted_flat_orig.cbf \ $(DATADIRO)/converted_orig.cbf \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5 \ + $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf \ $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf \ $(DATADIRO)/mb_LP_1_001_orig.cbf \ $(DATADIRO)/testcell_orig.prt \ @@ -2068,6 +2304,7 @@ DATADIRO_OUTPUT_SIGNATURES = $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) \ $(DATADIRO)/converted_orig.cbf$(SEXT) \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ + $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf$(SEXT) \ $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) \ $(DATADIRO)/testcell_orig.prt$(SEXT) \ @@ -2087,6 +2324,7 @@ TESTOUTPUTSIGS = adscconverted_flat_orig.cbf$(SEXT) \ adscconverted_orig.cbf$(SEXT) converted_flat_orig.cbf$(SEXT) converted_orig.cbf$(SEXT) \ insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ + insulin_pilatus6mconverted_orig.cbf$(SEXT) \ insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ mb_LP_1_001_orig.cbf$(SEXT) testcell_orig.prt$(SEXT) \ test_xds_bin_testflatout_orig.out$(SEXT) \ @@ -2094,13 +2332,21 @@ TESTOUTPUTSIGS = adscconverted_flat_orig.cbf$(SEXT) \ test_fcb_read_testflatpackedout_orig.out$(SEXT) \ XRD1621_orig.cbf$(SEXT) \ XRD1621_I4encbC100_orig.cbf$(SEXT) \ - minicbf_orig.h5$(SEXT) + minicbf_orig.h5$(SEXT) \ + pycbf_test1_orig.out$(SEXT) \ + pycbf_test2_orig.out$(SEXT) \ + pycbf_test3_orig.out$(SEXT) \ + pycbf_test4_orig.out$(SEXT) \ + fel_test1_orig.out$(SEXT) \ + fel_test2_orig.out$(SEXT) \ + fel_test3_orig.out$(SEXT) DATADIRS_OUTPUT_SIGNATURES = $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) \ $(DATADIRS)/adscconverted_orig.cbf$(SEXT) \ $(DATADIRS)/converted_flat_orig.cbf$(SEXT) \ $(DATADIRS)/converted_orig.cbf$(SEXT) \ $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ + $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf$(SEXT) \ $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) \ $(DATADIRS)/testcell_orig.prt$(SEXT) \ @@ -2110,7 +2356,14 @@ DATADIRS_OUTPUT_SIGNATURES = $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) \ $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \ $(DATADIRS)/XRD1621_orig.cbf$(SEXT) \ $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) \ - $(DATADIRS)/minicbf_orig.h5$(SEXT) + $(DATADIRS)/minicbf_orig.h5$(SEXT) \ + $(DATADIRS)/pycbf_test1_orig.out$(SEXT) \ + $(DATADIRS)/pycbf_test2_orig.out$(SEXT) \ + $(DATADIRS)/pycbf_test3_orig.out$(SEXT) \ + $(DATADIRS)/pycbf_test4_orig.out$(SEXT) \ + $(DATADIRS)/fel_test1_orig.out$(SEXT) \ + $(DATADIRS)/fel_test2_orig.out$(SEXT) \ + $(DATADIRS)/fel_test3_orig.out$(SEXT) # Fetch Input Data Files @@ -2132,20 +2385,13 @@ $(TESTOUTPUT): $(DATADIRO) $(DATADIRO_OUTPUT) $(DATADIRO_OUTPUT_SIGNATURES) cp $(DATADIRO)/$@$(SEXT) $@$(SEXT) -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) -# Fetch Output Data File Signatures - -$(TESTOUTPUTSIGS): $(DATADIRS) $(DATADIRS_OUTPUT_SIGNATURES) - cp $(DATADIRS)/$@ $@ - - # # Tests # -tests: all $(LIB) $(BIN) symlinksdone basic extra dectristests pycbftests -tests_sigs_only: $(LIB) $(BIN) symlinksdone basic extra_sigs_only +tests: all $(LIB) $(BIN) symlinksdone basic extra dectristests py2cbftests py3cbftests restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) $(SIGNATURE) < adscconverted.cbf > $(DATADIRO)/adscconverted_orig.cbf$(SEXT) @@ -2163,6 +2409,13 @@ restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 $(SIGNATURE) < XRD1621.cbf > $(DATADIRO)/XRD1621_orig.cbf$(SEXT) $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRO)/minicbf_orig.h5$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test1.out > $(DATADIRO)/pycbf_test1_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test2.out > $(DATADIRO)/pycbf_test2_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test3.out > $(DATADIRO)/pycbf_test3_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test4.out > $(DATADIRO)/pycbf_test4_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/fel_test1.out > $(DATADIRO)/fel_test1_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/fel_test2.out > $(DATADIRO)/fel_test2_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/fel_test3.out > $(DATADIRO)/fel_test3_orig.out$(SEXT) cp adscconverted_flat.cbf $(DATADIRO)/adscconverted_flat_orig.cbf$ cp adscconverted.cbf $(DATADIRO)/adscconverted_orig.cbf cp converted_flat.cbf $(DATADIRO)/converted_flat_orig.cbf @@ -2179,25 +2432,15 @@ restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 cp XRD1621.cbf $(DATADIRO)/XRD1621_orig.cbf cp XRD1621_I4encbC100.cbf $(DATADIRO)/XRD1621_I4encbC100_orig.cbf cp $(MINICBF_TEST)/minicbf.h5 $(DATADIRO)/minicbf_orig.h5 - -restore_sigs_only: $(NEWTESTOUTPUT) $(DATADIRS) - $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < adscconverted.cbf > $(DATADIRS)/adscconverted_orig.cbf$(SEXT) - $(SIGNATURE) < converted_flat.cbf > $(DATADIRS)/converted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < converted.cbf > $(DATADIRS)/converted_orig.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5 > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5.cbf > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) - $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) - $(SIGNATURE) < testcell.prt > $(DATADIRS)/testcell_orig.prt$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < XRD1621.cbf > $(DATADIRS)/XRD1621_orig.cbf$(SEXT) - $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) - $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRS)/minicbf_orig.h5$(SEXT) -restore_signatures: restore_output restore_sigs_only + cp $(PY2CBF)/pycbf_test1.out $(DATADIRO)/pycbf_test1_orig.out + cp $(PY2CBF)/pycbf_test2.out $(DATADIRO)/pycbf_test2_orig.out + cp $(PY2CBF)/pycbf_test3.out $(DATADIRO)/pycbf_test3_orig.out + cp $(PY2CBF)/pycbf_test4.out $(DATADIRO)/pycbf_test4_orig.out + cp $(PY2CBF)/fel_test1.out $(DATADIRO)/fel_test1_orig.out + cp $(PY2CBF)/fel_test2.out $(DATADIRO)/fel_test2_orig.out + cp $(PY2CBF)/fel_test3.out $(DATADIRO)/fel_test3_orig.out + +restore_signatures: restore_output # # Basic Tests @@ -2217,9 +2460,12 @@ basic: $(BIN)/makecbf $(BIN)/img2cif $(BIN)/cif2cbf $(TESTINPUT_BASIC) img2cif_canonical.cif cif2cbf_packed.cbf $(LDPREFIX) $(BIN)/cif2cbf -e none -c canonical \ img2cif_packed.cif cif2cbf_canonical.cbf - -cmp cif2cbf_packed.cbf makecbf.cbf - -cmp cif2cbf_packed.cbf img2cif_packed.cbf - -cmp cif2cbf_canonical.cbf img2cif_canonical.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_packed.cbf | diff -a - makecbf.cbf + #-cmp cif2cbf_packed.cbf makecbf.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_packed.cbf | diff -a - img2cif_packed.cbf + #-cmp cif2cbf_packed.cbf img2cif_packed.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_canonical.cbf | diff -a - img2cif_canonical.cbf + #-cmp cif2cbf_canonical.cbf img2cif_canonical.cbf # @@ -2258,21 +2504,27 @@ endif makecbf.cbf cif2cbf_ehcn.cif $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_encp.cbf | diff -a - makecbf.cbf $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf + -cat 9ins.cif |sed "1,1s/10/11/" | sed "2,2s/0.9.5/0.9.7/" | diff -a - 9ins.cbf + #-cmp 9ins.cif 9ins.cbf $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf -F example.mar2300 converted_flat.cbf - -cmp converted_flat.cbf converted_flat_orig.cbf + -cat converted_flat_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - converted_flat.cbf + #-cmp converted_flat.cbf converted_flat_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf example.mar2300 converted.cbf - -cmp converted.cbf converted_orig.cbf + -cat converted_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - converted.cbf + #-cmp converted.cbf converted_orig.cbf -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat > testcell.prt -cmp testcell.prt testcell_orig.prt $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -cmp adscconverted_flat.cbf adscconverted_flat_orig.cbf + -cat adscconverted_flat_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - adscconverted_flat.cbf + #-cmp adscconverted_flat.cbf adscconverted_flat_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -cmp adscconverted.cbf adscconverted_orig.cbf + -cat adscconverted_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - adscconverted.cbf + #-cmp adscconverted.cbf adscconverted_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -cmp mb_LP_1_001.cbf mb_LP_1_001_orig.cbf + -cat mb_LP_1_001_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - mb_LP_1_001.cbf + #-cmp mb_LP_1_001.cbf mb_LP_1_001_orig.cbf ifneq ($(CLEANTESTS),) mv mb_LP_1_001.cbf nmb_LP_1_001.cbf else @@ -2285,12 +2537,17 @@ ifneq ($(CLEANTESTS),) rm nmb_LP_1_001.img endif $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -cmp insulin_pilatus6mconverted.cbf insulin_pilatus6mconverted_rev_orig.cbf + -cat insulin_pilatus6mconverted_orig.cbf | sed "1,1s/1.7.6/1.7.11/" | sed "2,2s/0.9.3/0.9.7/" | diff -a - insulin_pilatus6mconverted.cbf + #-cmp insulin_pilatus6mconverted.cbf insulin_pilatus6mconverted_orig.cbf -$(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -cmp insulin_pilatus6mconverted_v2.cbf insulin_pilatus6mconverted_v2_orig.cbf + -cat insulin_pilatus6mconverted_v2_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - insulin_pilatus6mconverted_v2.cbf + #-cmp insulin_pilatus6mconverted_v2.cbf insulin_pilatus6mconverted_v2_orig.cbf (CBF_CONVERT_MINICBF_PATH=$(BIN); export CBF_CONVERT_MINICBF_PATH; \ $(LDPREFIX) $(EXAMPLES)/batch_convert_minicbf.sh "." "minicbf_test" \ "X4_lots_M1S4_1_*.cbf" $(TEMPLATES)/template_X4_lots_M1S4.cbf) +# +# Starting with insulin_pilatus6mconverted.cbf, create hdf5 files using opaque, encI, encp, encb, encc, encz +# -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ $(TIME) $(BIN)/cif2cbf -5 w -O $(HDF5REGISTER) -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted.cbf.h5) -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ @@ -2303,10 +2560,9 @@ endif $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cc -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encc.cbf.h5) -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cz -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encz.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cl -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encl.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -c2 -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5) +# +# check the default as hdf5 dumps +# -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ $(H5DUMP) insulin_pilatus6mconverted_orig.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted_orig.cbf.h5.dump) -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ @@ -2314,41 +2570,26 @@ endif -$(DIFF) insulin_pilatus6mconverted_orig.cbf.h5.dump insulin_pilatus6mconverted.cbf.h5.dump -rm -f insulin_pilatus6mconverted_orig.cbf.h5.dump -rm -f insulin_pilatus6mconverted.cbf.h5.dump - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_orig.cbf.h5.cbf -o insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf.h5 -o insulin_pilatus6mconverted.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted.cbf.h5.cbf -o insulin_pilatus6mconverted.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encp.cbf.h5 -o insulin_pilatus6mconverted_encp.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encp.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encb.cbf.h5 -o insulin_pilatus6mconverted_encb.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encb.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encI.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encI.cbf.h5.cbf -o insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encc.cbf.h5 -o insulin_pilatus6mconverted_encc.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encc.cbf.h5.cbf -o insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encz.cbf.h5 -o insulin_pilatus6mconverted_encz.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encz.cbf.h5.cbf -o insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encl.cbf.h5 -o insulin_pilatus6mconverted_encl.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encl.cbf.h5.cbf -o insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_enc2.cbf.h5 -o insulin_pilatus6mconverted_enc2.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_enc2.cbf.h5.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -rm -f insulin_pilatus6mconverted*.cbf.h5.eqcI.cbf +# +# Convert each of the non-opaque h5 files to encI cbfs and compare them +# + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encI.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + cp insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encp.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encb.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encc.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encz.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + $(LDPREFIX) $(TINE) $(BIN)/test_cbf_airy_disk $(LDPREFIX) $(TIME) $(BIN)/cbf_testxfelread $(LDPREFIX) $(TIME) $(BIN)/testalloc @@ -2377,14 +2618,18 @@ endif -cd $(MINICBF_TEST); $(DIFF) i19-1.dump i19-2.dump -cd $(MINICBF_TEST); $(DIFF) i19-1.cbf i19-2.cbf $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf + -cat testrealin.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - testrealout.cbf + #-cmp testrealin.cbf testrealout.cbf $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf + -cat testflatin.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - testflatout.cbf + #-cmp testflatin.cbf testflatout.cbf $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf + -cat testflatpackedin.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - testflatpackedout.cbf + #-cmp testflatpackedin.cbf testflatpackedout.cbf ifneq ($(F90C),) $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatout.out) - -$(DIFF) test_xds_bin_testflatout.out test_xds_bin_testflatout_orig.out + -cat test_xds_bin_testflatout_orig.out | sed "2,2s/0.9.6/0.9.7/" | $(DIFF) -a - test_xds_bin_testflatout.out + #-$(DIFF) test_xds_bin_testflatout.out test_xds_bin_testflatout_orig.out $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatpackedout.out) -$(DIFF) test_xds_bin_testflatpackedout.out test_xds_bin_testflatpackedout_orig.out $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatout.out) @@ -2394,109 +2639,59 @@ ifneq ($(F90C),) endif $(LDPREFIX) $(TIME) $(BIN)/sauter_test $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - -$(DIFF) XRD1621.cbf XRD1621_orig.cbf + $(LDPREFIX) $(TIME) $(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf + -cat XRD1621_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - XRD1621.cbf + #-$(DIFF) XRD1621.cbf XRD1621_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(DIFF) XRD1621_I4encbC100.cbf XRD1621_I4encbC100_orig.cbf - -ifneq ($(F90C),) -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf \ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -else -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf\ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -endif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e hex -c none \ - makecbf.cbf cif2cbf_ehcn.cif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ - cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F example.mar2300 converted_flat.cbf - -$(SIGNATURE) < converted_flat.cbf | $(DIFF) - converted_flat_orig.cbf$(SEXT); rm converted_flat.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image example.mar2300 converted.cbf - -$(SIGNATURE) < converted.cbf | $(DIFF) - converted_orig.cbf$(SEXT); rm converted.cbf - -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat | \ - $(SIGNATURE) | $(DIFF) - testcell_orig.prt$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -$(SIGNATURE) < adscconverted_flat.cbf | $(DIFF) - adscconverted_flat_orig.cbf$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -$(SIGNATURE) < adscconverted.cbf | $(DIFF) - adscconverted_orig.cbf$(SEXT); rm adscconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -$(SIGNATURE) < mb_LP_1_001.cbf | $(DIFF) - mb_LP_1_001_orig.cbf$(SEXT) - mv mb_LP_1_001.cbf nmb_LP_1_001.cbf - $(LDPREFIX) $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf - -cmp nmb_LP_1_001.img mb_LP_1_001.img - rm nmb_LP_1_001.cbf - rm nmb_LP_1_001.img - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted.cbf | $(DIFF) - insulin_pilatus6mconverted_rev_orig.cbf$(SEXT); rm insulin_pilatus6mconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf | $(DIFF) - insulin_pilatus6mconverted_v2_orig.cbf$(SEXT); rm insulin_pilatus6mconverted_v2.cbf - $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf -ifneq ($(F90C),) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatpackedout_orig.out$(SEXT) -endif - $(LDPREFIX) $(TIME) $(BIN)/sauter_test - $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(SIGNATURE) < XRD1621.cbf | $(DIFF) - XRD1621_orig.cbf$(SEXT); rm XRD1621.cbf - -$(SIGNATURE) < XRD1621_I4encbC100.cbf | $(DIFF) - XRD1621_I4encbC100_orig.cbf$(SEXT); rm XRD1621_I4encbC100.cbf - @-rm -f adscconverted_flat.cbf - @-rm -f $(TESTINPUT_BASIC) $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) - @-rm -f cif2cbf_packed.cbf makecbf.cbf \ - cif2cbf_packed.cbf img2cif_packed.cbf \ - cif2cbf_canonical.cbf img2cif_canonical.cbf - @-rm -f testrealout.cbf testflatout.cbf testflatpackedout.cbf \ - cif2cbf_encp.cbf img2cif_canonical.cif img2cif_packed.cif 9ins.cbf - + -cat XRD1621_I4encbC100_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - XRD1621_I4encbC100.cbf + #-$(DIFF) XRD1621_I4encbC100.cbf XRD1621_I4encbC100_orig.cbf -pycbftests: $(PYCBF)/_pycbf.$(PYCBFEXT) $(BIN)/cbf_standardize_numbers - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test1.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test2.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test3.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test4.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test1.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test2.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py ../hit-20140306005258847.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test1_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test1.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test2_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test2.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test3_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test3.out - - -pycbfinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfinstall - -pycbfuserinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfuserinstall +py2cbftests: $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(BIN)/cbf_standardize_numbers $(TESTOUTPUT) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test1.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test1.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test1.out $(ROOT)/pycbf_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test2.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test2.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test2.out $(ROOT)/pycbf_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test3.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test3.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test3.out $(ROOT)/pycbf_test3_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test4.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test4.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test4.out $(ROOT)/pycbf_test4_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_testfelaxes.py fel_test1.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) + -(cd $(PY2CBF); $(DIFF) fel_test1.out $(ROOT)/fel_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_testfelaxes.py fel_test2.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) + -(cd $(PY2CBF); $(DIFF) fel_test2.out $(ROOT)/fel_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_testfelaxes.py ../hit-20140306005258847.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) + -(cd $(PY2CBF); $(DIFF) fel_test3.out $(ROOT)/fel_test3_orig.out) + +py2cbfinstall: $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(PY2CBF)/py2cbfinstall + +py2cbfuserinstall: $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(PY2CBF)/py2cbfuserinstall + +py3cbftests: $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(BIN)/cbf_standardize_numbers $(TESTOUTPUT) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test1.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test1.out) + -(cd $(PY3CBF); grep -v "__builtins__" $(ROOT)/pycbf_test1_orig.out | \ + grep -v "__add__" | grep -v "Foundthebinary" > pycbf_test1_orig.out; \ + grep -v "__builtins__" pycbf_test1.out | \ + grep -v "__add__" | grep -v "Foundthebinary" |$(DIFF) - pycbf_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test2.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test2.out) + -(cd $(PY3CBF); $(DIFF) pycbf_test2.out $(ROOT)/pycbf_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test3.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test3.out) + -(cd $(PY3CBF); $(DIFF) pycbf_test3.out $(ROOT)/pycbf_test3_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test4.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test4.out) + -(cd $(PY3CBF); grep -v "__builtins__" $(ROOT)/pycbf_test4_orig.out | \ + grep -v "__add__" | grep -v "Foundthebinary" > pycbf_test4_orig.out; \ + grep -v "__builtins__" pycbf_test4.out | grep -v "__add__" | \ + grep -v "Foundthebinary" | $(DIFF) - pycbf_test4_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_testfelaxes.py fel_test1.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) + -(cd $(PY3CBF); $(DIFF) fel_test1.out $(ROOT)/fel_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_testfelaxes.py fel_test2.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) + -(cd $(PY3CBF); $(DIFF) fel_test2.out $(ROOT)/fel_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_testfelaxes.py ../hit-20140306005258847.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) + -(cd $(PY3CBF); $(DIFF) fel_test3.out $(ROOT)/fel_test3_orig.out) + +py3cbfinstall: $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(PY3CBF)/py3cbfinstall + +py3cbfuserinstall: $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(PY3CBF)/py3cbfuserinstall javatests: $(BIN)/ctestcbf $(BIN)/testcbf.class $(SOLIB)/libcbf_wrap.so $(LDPREFIX) $(BIN)/ctestcbf > testcbfc.txt @@ -2515,13 +2710,13 @@ empty: @-rm -rf $(INCLUDE)/bshuf* @-rm -rf $(INCLUDE)/H5* @-rm -rf $(BIN)/* - @-rm -f $(PYCBF)/_pycbf.$(PYCBFEXT) - @-rm -rf $(PYCBF)/build/* - @-rm -f $(PYCBF)/newtest1.cbf - @-rm -f $(PYCBF)/fel_test1.out - @-rm -f $(PYCBF)/fel_test2.out - @-rm -f $(PYCBF)/setup.py - @-rm -f $(PYCBF)/setup_MINGW.py + @-rm -f $(PY2CBF)/_py2cbf.$(PY2CBFEXT) + @-rm -rf $(PY2CBF)/build/* + @-rm -f $(PY2CBF)/newtest1.cbf + @-rm -f $(PY2CBF)/fel_test1.out + @-rm -f $(PY2CBF)/fel_test2.out + @-rm -f $(PY2CBF)/setup.py + @-rm -f $(PY2CBF)/setup_MINGW.py @-rm -f makecbf.cbf @-rm -f img2cif_packed.cif @-rm -f img2cif_canonical.cif @@ -2605,12 +2800,39 @@ empty: @-rm -f 1191_00005.cbf @-rm -f XRD1621.tif @-rm -f md5tmp - @-rm -rf $(PYCBF)/build + @-rm -rf $(PY2CBF)/build @-rm -f *_old @-rm -f X4_lots_M1S4_1_*.cbf @-rm -f testfile.h5 @-rm -f hit-20140306005258847.cbf @-rm -f build_* + @-rm -rf HDF5Plugin_5Jun21/ + @-rm -rf PyCifRW-4.1/ + @-rm -rf PyCifRW-4.3/ + @-rm -rf bitshuffle-0.2.2.1_15Jun16/ + @-rm -f idx-s00-20131106040304531_flat.cbf + @-rm -f include/iochain.h + @-rm -f include/lz4.h + @-rm -f include/pcre.h + @-rm -f include/pcre_scanner.h + @-rm -f include/pcre_stringpiece.h + @-rm -f include/pcrecpp.h + @-rm -f include/pcrecpparg.h + @-rm -f include/pcreposix.h + @-rm -f include/regex.h + @-rm -f minicbf_test/X4_lots_M1S4_1_0001.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0002.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0003.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0004.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0005.cbf + @-rm -f minicbf_test/minicbf.h5 + @-rm -rf ply-3.2/dist/ + @-rm -f $(PY2CBF)/fel_test3.out + @-rm -f $(PY2CBF)/pycbf.pyc + @-rm -f $(PY2CBF)/pycbf_test1.out + @-rm -f $(PY2CBF)/pycbf_test2.out + @-rm -f $(PY2CBF)/pycbf_test3.out + @-rm -f $(PY2CBF)/pycbf_test4.out ./.undosymlinks # diff --git a/Makefile_OSX_gcc42 b/Makefile_OSX_gcc42 deleted file mode 100644 index 8e6a63b3..00000000 --- a/Makefile_OSX_gcc42 +++ /dev/null @@ -1,2644 +0,0 @@ - -###################################################################### -# Makefile - command file for make to create CBFlib # -# # -# Version 0.9.6 19 May 2020 # -# # -# Paul Ellis and # -# Herbert J. Bernstein (yaya@bernstein-plus-sons.com) # -# # -# (C) Copyright 2006 - 2020 Herbert J. Bernstein # -# # -###################################################################### - -###################################################################### -# # -# YOU MAY REDISTRIBUTE THE CBFLIB PACKAGE UNDER THE TERMS OF THE GPL # -# # -# ALTERNATIVELY YOU MAY REDISTRIBUTE THE CBFLIB API UNDER THE TERMS # -# OF THE LGPL # -# # -###################################################################### - -########################### GPL NOTICES ############################## -# # -# This program is free software; you can redistribute it and/or # -# modify it under the terms of the GNU General Public License as # -# published by the Free Software Foundation; either version 2 of # -# (the License, or (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program; if not, write to the Free Software # -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # -# 02111-1307 USA # -# # -###################################################################### - -######################### LGPL NOTICES ############################### -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of the GNU Lesser General Public # -# License as published by the Free Software Foundation; either # -# version 2.1 of the License, or (at your option) any later version. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # -# Lesser General Public License for more details. # -# # -# You should have received a copy of the GNU Lesser General Public # -# License along with this library; if not, write to the Free # -# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # -# MA 02110-1301 USA # -# # -###################################################################### - -###################################################################### -# # -# Stanford University Notices # -# for the CBFlib software package that incorporates SLAC software # -# on which copyright is disclaimed # -# # -# This software # -# ------------- # -# The term "this software", as used in these Notices, refers to # -# those portions of the software package CBFlib that were created by # -# employees of the Stanford Linear Accelerator Center, Stanford # -# University. # -# # -# Stanford disclaimer of copyright # -# -------------------------------- # -# Stanford University, owner of the copyright, hereby disclaims its # -# copyright and all other rights in this software. Hence, anyone # -# may freely use it for any purpose without restriction. # -# # -# Acknowledgement of sponsorship # -# ------------------------------ # -# This software was produced by the Stanford Linear Accelerator # -# Center, Stanford University, under Contract DE-AC03-76SFO0515 with # -# the Department of Energy. # -# # -# Government disclaimer of liability # -# ---------------------------------- # -# Neither the United States nor the United States Department of # -# Energy, nor any of their employees, makes any warranty, express or # -# implied, or assumes any legal liability or responsibility for the # -# accuracy, completeness, or usefulness of any data, apparatus, # -# product, or process disclosed, or represents that its use would # -# not infringe privately owned rights. # -# # -# Stanford disclaimer of liability # -# -------------------------------- # -# Stanford University makes no representations or warranties, # -# express or implied, nor assumes any liability for the use of this # -# software. # -# # -# Maintenance of notices # -# ---------------------- # -# In the interest of clarity regarding the origin and status of this # -# software, this and all the preceding Stanford University notices # -# are to remain affixed to any copy or derivative of this software # -# made or distributed by the recipient and are to be affixed to any # -# copy of software made or distributed by the recipient that # -# contains a copy or derivative of this software. # -# # -# Based on SLAC Software Notices, Set 4 # -# OTT.002a, 2004 FEB 03 # -###################################################################### - - - -###################################################################### -# NOTICE # -# Creative endeavors depend on the lively exchange of ideas. There # -# are laws and customs which establish rights and responsibilities # -# for authors and the users of what authors create. This notice # -# is not intended to prevent you from using the software and # -# documents in this package, but to ensure that there are no # -# misunderstandings about terms and conditions of such use. # -# # -# Please read the following notice carefully. If you do not # -# understand any portion of this notice, please seek appropriate # -# professional legal advice before making use of the software and # -# documents included in this software package. In addition to # -# whatever other steps you may be obliged to take to respect the # -# intellectual property rights of the various parties involved, if # -# you do make use of the software and documents in this package, # -# please give credit where credit is due by citing this package, # -# its authors and the URL or other source from which you obtained # -# it, or equivalent primary references in the literature with the # -# same authors. # -# # -# Some of the software and documents included within this software # -# package are the intellectual property of various parties, and # -# placement in this package does not in any way imply that any # -# such rights have in any way been waived or diminished. # -# # -# With respect to any software or documents for which a copyright # -# exists, ALL RIGHTS ARE RESERVED TO THE OWNERS OF SUCH COPYRIGHT. # -# # -# Even though the authors of the various documents and software # -# found here have made a good faith effort to ensure that the # -# documents are correct and that the software performs according # -# to its documentation, and we would greatly appreciate hearing of # -# any problems you may encounter, the programs and documents any # -# files created by the programs are provided **AS IS** without any * -# warranty as to correctness, merchantability or fitness for any # -# particular or general use. # -# # -# THE RESPONSIBILITY FOR ANY ADVERSE CONSEQUENCES FROM THE USE OF # -# PROGRAMS OR DOCUMENTS OR ANY FILE OR FILES CREATED BY USE OF THE # -# PROGRAMS OR DOCUMENTS LIES SOLELY WITH THE USERS OF THE PROGRAMS # -# OR DOCUMENTS OR FILE OR FILES AND NOT WITH AUTHORS OF THE # -# PROGRAMS OR DOCUMENTS. # -###################################################################### - -###################################################################### -# # -# The IUCr Policy # -# for the Protection and the Promotion of the STAR File and # -# CIF Standards for Exchanging and Archiving Electronic Data # -# # -# Overview # -# # -# The Crystallographic Information File (CIF)[1] is a standard for # -# information interchange promulgated by the International Union of # -# Crystallography (IUCr). CIF (Hall, Allen & Brown, 1991) is the # -# recommended method for submitting publications to Acta # -# Crystallographica Section C and reports of crystal structure # -# determinations to other sections of Acta Crystallographica # -# and many other journals. The syntax of a CIF is a subset of the # -# more general STAR File[2] format. The CIF and STAR File approaches # -# are used increasingly in the structural sciences for data exchange # -# and archiving, and are having a significant influence on these # -# activities in other fields. # -# # -# Statement of intent # -# # -# The IUCr's interest in the STAR File is as a general data # -# interchange standard for science, and its interest in the CIF, # -# a conformant derivative of the STAR File, is as a concise data # -# exchange and archival standard for crystallography and structural # -# science. # -# # -# Protection of the standards # -# # -# To protect the STAR File and the CIF as standards for # -# interchanging and archiving electronic data, the IUCr, on behalf # -# of the scientific community, # -# # -# # holds the copyrights on the standards themselves, * -# # -# # owns the associated trademarks and service marks, and * -# # -# # holds a patent on the STAR File. * -# # -# These intellectual property rights relate solely to the # -# interchange formats, not to the data contained therein, nor to # -# the software used in the generation, access or manipulation of # -# the data. # -# # -# Promotion of the standards # -# # -# The sole requirement that the IUCr, in its protective role, # -# imposes on software purporting to process STAR File or CIF data # -# is that the following conditions be met prior to sale or # -# distribution. # -# # -# # Software claiming to read files written to either the STAR * -# File or the CIF standard must be able to extract the pertinent # -# data from a file conformant to the STAR File syntax, or the CIF # -# syntax, respectively. # -# # -# # Software claiming to write files in either the STAR File, or * -# the CIF, standard must produce files that are conformant to the # -# STAR File syntax, or the CIF syntax, respectively. # -# # -# # Software claiming to read definitions from a specific data * -# dictionary approved by the IUCr must be able to extract any # -# pertinent definition which is conformant to the dictionary # -# definition language (DDL)[3] associated with that dictionary. # -# # -# The IUCr, through its Committee on CIF Standards, will assist # -# any developer to verify that software meets these conformance # -# conditions. # -# # -# Glossary of terms # -# # -# [1] CIF: is a data file conformant to the file syntax defined # -# at http://www.iucr.org/iucr-top/cif/spec/index.html # -# # -# [2] STAR File: is a data file conformant to the file syntax # -# defined at http://www.iucr.org/iucr-top/cif/spec/star/index.html # -# # -# [3] DDL: is a language used in a data dictionary to define data # -# items in terms of "attributes". Dictionaries currently approved # -# by the IUCr, and the DDL versions used to construct these # -# dictionaries, are listed at # -# http://www.iucr.org/iucr-top/cif/spec/ddl/index.html # -# # -# Last modified: 30 September 2000 # -# # -# IUCr Policy Copyright (C) 2000 International Union of # -# Crystallography # -###################################################################### - -.DELETE_ON_ERROR: - -# Version string -VERSION = 0.9.6 - -# -# Directories -# -ROOT = $(PWD) -LIB = $(ROOT)/lib -SOLIB = $(ROOT)/solib -JCBF = $(ROOT)/jcbf -JAVADIR = $(ROOT)/java -BIN = $(ROOT)/bin -SRC = $(ROOT)/src -INCLUDE = $(ROOT)/include -M4 = $(ROOT)/m4 -PYCBF = $(ROOT)/pycbf -EXAMPLES = $(ROOT)/examples -TEMPLATES= $(ROOT)/templates -DECTRIS_EXAMPLES = $(EXAMPLES)/dectris_cbf_template_test -DOC = $(ROOT)/doc -MINICBF_TEST = $(ROOT)/minicbf_test -GRAPHICS = $(ROOT)/html_graphics -DATADIRI = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Input -DATADIRO = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output -DATADIRS = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only -CBF_PREFIX ?= $(HOME) - -# -# Comment out the next line if scratch test files should be retained -# -CLEANTESTS = yes - - -MSYS2=no -CBFLIB_DONT_USE_LOCAL_HDF5?=no -CBFLIB_DONT_USE_LZ4?=no -CBFLIB_DONT_USE_BSHUF?=no - - -CBFLIB_DONT_HAVE_FGETLN ?= yes -ifeq ($(CBFLIB_DONT_HAVE_FGETLN),yes) -SRC_FGETLN = $(SRC)/fgetln.c -else -SRC_FGETLN = -endif - - -CBFLIB_DONT_USE_PYCIFRW ?= no -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -# -# Definitions to get versions of PyCifRW and PLY -# -PYCIFRW ?= PyCifRW-4.1 -PLY = ply-3.2 -PYCIFRWFLAG = -DCBF_USE_PYCIFRW -PYCIFRW_PREFIX ?= $(HOME)/.local -endif - -# -# Definition to get a version of tifflib to support tiff2cbf -# -TIFF ?= tiff-4.0.6_rev_3Nov16 -TIFF_PREFIX ?= $(PWD) -TIFF_INSTALL = $(TIFF)_INSTALL - - -# -# Definitions to get a version of HDF5 -# - -ifneq ($(HDF5_PREFIX),) # already installed on system -CBFLIB_DONT_USE_LOCAL_HDF5 = yes -endif - -ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes) -HDF5_PREFIX ?= $(PWD) -HDF5 ?= hdf5-1.10.6 -#HDF5 = hdf5-1.8.18 -#HDF5 = hdf5-1.10.5 -HDF5dep = $(HDF5) -HDF5_INSTALL = $(HDF5)_INSTALL -ifneq ($(MSYS2),yes) -HDF5LIBS_LOCAL = $(LIB)/libhdf5.a -HDF5LIBS_SYSTEM = -lz -ldl -HDF5SOLIBS_LOCAL = -L$(LIB) -lhdf5 -HDF5SOLIBS_SYSTEM = -lz -else -HDF5LIBS_LOCAL = -L$(LIB) -lhdf5 -lhdf5.dll -HDF5LIBS_SYSTEM = -lz -ldl -HDF5SOLIBS_LOCAL = -L$(LIB) -lhdf5 -lhdf5.dll -HDF5SOLIBS_SYSTEM = -lz -endif -else -HDF5 = -HDF5dep = -HDF5_INSTALL = -HDF5LIBS_LOCAL = -ifneq ($(HDF5_PREFIX),) -HDF5lib = -L$(HDF5_PREFIX)/lib -endif -ifneq ($(MSYS2),yes) -HDF5LIBS_SYSTEM = $(HDF5lib) -lhdf5 -lz -ldl -HDF5SOLIBS_LOCAL = -HDF5SOLIBS_SYSTEM = $(HDF5lib) -lhdf5 -lz -else -HDF5LIBS_SYSTEM = $(HDF5lib) -lhdf5 -lhdf5.dll -lz -ldl -HDF5SOLIBS_LOCAL = -HDF5SOLIBS_SYSTEM = $(HDF5lib) -lhdf5 -lhdf5.dll -lz -endif -endif - -HDF5REGISTER ?= --register manual -ifneq ($(HDF5_PREFIX),) -HDF5include = -I$(HDF5_PREFIX)/include -endif - -ifneq ($(MSYS2),yes) -H5DUMP = $(HDF5_PREFIX)/bin/h5dump -else -H5DUMP = /MINGW32/bin/h5dump -endif - - -CBFLIB_DONT_USE_LZ4 ?= no -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -# -# Definitions to get a version of HDF5Plugin for LZ4 -# -ifneq ($(MSYS2),yes) -LZ4 ?= HDF5Plugin_14Aug20 -else -LZ4 ?= HDF5-External-Filter-Plugins -endif -LZ4dep = $(LZ4) -LZ4src = $(LZ4)/src -LZ4include = $(LZ4)/include -LZ4SOLIBS = -L$(SOLIB) -lh5zlz4 -else -LZ4SOLIBS = -LZ4dep = -endif - -CBFLIB_DONT_USE_BSHUF ?= no -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -# -# Definitions to get a version of HDF5Plugin for BSHUFFLE WITH LZ4 -# -BSHUF ?= bitshuffle-0.2.2.1_15Jun16 -BSUFdep = $(BSHUF) -BSHUFsrc = $(BSHUF)/src -BSHUFinclude = $(BSHUF)/src -BSHUFSOLIBS = -L$(SOLIB) -lh5zbshuf -BSHUFFILTER = libbshuf_h5filter -else -BSHUFSOLIBS = -BSHUFdep = -endif - -CBFLIB_DONT_USE_BLOSC ?= no -ifneq ($(CBFLIB_DONT_USE_BLOSC),yes) -# -# Definitions to get a version of HDF5Plugin for BLOSC -# -BLOSC = ?c-blosc_4Sep16.tar.gz -BLOSCdep = $(BLOSC) -BLOSCFILTER = hdf5-blosc_2Sep16.tar.gz -BLOSCsrc = $(BLOSC)/src -BLOSCinclude = $(BLOSC)/src -BLOSCSOLIBS = -L$(SOLIB) -lh5zbshuf -BLOSCFILTER = libbshuf_h5filter -else -BLOSCSOLIBS = -BLOSCdep = -endif - - - -# -# Definition of python to use -# -#PYTHON = python -PYTHON ?= python2 - - -# -# Definitions to get a stable version of regex -# -REGEX_PREFIX ?= $(PWD) -ifneq ($(REGEX_PREFIX),$(PWD)) -CBFLIB_DONT_USE_LOCAL_REGEX ?= yes -endif - - -REGEX_LIBDIR ?= $(REGEX_PREFIX)/lib -ifneq ($(CBFLIB_DONT_USE_LOCAL_REGEX),yes) -REGEX ?= pcre-8.38 -REGEXDEP = $(REGEX) -REGEX_INSTALL = $(REGEX)_INSTALL -REGEX_LIB ?= pcreposix -REGEX_LIB2 ?= pcre -ifneq ($(MSYS2),yes) -REGEX_LIBS ?= -L $(REGEX_LIBDIR) -l$(REGEX_LIB) -l$(REGEX_LIB2) -REGEX_LIBS_STATIC = $(LIB)/libpcreposix.a $(LIB)/libpcre.a -else -REGEX_LIBS ?= -L $(REGEX_LIBDIR) -l$(REGEX_LIB) -l$(REGEX_LIB).dll -l$(REGEX_LIB2) -l$(REGEX_LIB2).dll -REGEX_LIBS_STATIC = $(REGEX_LIBS) -endif -REGEX_INCLUDES ?= -I $(REGEX_PREFIX) -else -REGEX = -REGEXDEP = -REGEX_INSTALL = -REGEX_LIB ?= -REGEX_LIB2 ?= -REGEX_LIBS ?= -REGEX_INCLUDES ?= -endif - - -# Program to use to retrieve a URL - -DOWNLOAD ?= wget -N -#DOWNLOAD ?= curl -O -L - -# Flag to control symlinks versus copying - -SLFLAGS = --use_ln -LN = ln -s -f - -# -# Program to use to pack shars -# -SHAR = /usr/bin/shar -#SHAR = /usr/local/bin/gshar - -# -# Program to use to create archives -# -AR = /usr/bin/ar - -# -# Program to use to add an index to an archive -# -RANLIB = /usr/bin/ranlib - - -# -# Program to use to generate a signature -# -#SIGNATURE ?= /usr/bin/openssl dgst -md5 -#SIGNATURE ?= (/usr/bin/openssl dgst -md5 | sed "s/^.*= //") -SIGNATURE ?= ( cat > md5tmp; cmake -E md5sum md5tmp| sed "s/ .*//") - -# -# Pipe command to extract all but the first line of a text file -# -ALLBUTONE = tail -n +2 - - -# -# Extension for signatures of files -# -SEXT = .md5 - -# Default shell - -SHELL = bash - -# call to time a command - -#TIME = -#TIME = time - -# -# Program to display differences between files -# -DIFF = diff -u -b - - -# -# Program to generate wrapper classes for Python -# -PYSWIG = swig -python - -# -# Program to generate wrapper classes for Java -# -JSWIG = swig -java - -# -# Program to generate LaTex and HTML program documentation -# - -NUWEB = nuweb - -# -# Compiler for Java -# -JAVAC = javac - -# -# Java archiver for compiled classes -# -JAR = jar - -# -# Java SDK root directory -# -ifeq ($(JDKDIR),) - JDKDIR = /usr/lib/java -endif - -ifneq ($(CBF_DONT_USE_LONG_LONG),) -NOLLFLAG = -DCBF_DONT_USE_LONG_LONG -else -NOLLFLAG = -endif - -ifneq ($(CBF_NO_REGEX),) -CBF_REGEXFLAG = -DCBF_NO_REGEX -else -CBF_REGEXFLAG = -DCBF_REGEXLIB_REGEX -endif - -ifneq ($(CBF_USE_ULP),) -ULPFLAG = -DCBF_USE_ULP -else -ULPFLAG = -endif - -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -LZ4FLAG = -DCBF_H5Z_USE_LZ4 -else -LZ4FLAG = -endif - -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -BSHUFFLAG = -DCBF_H5Z_USE_BSHUF -else -BSHUFFLAG = -endif - - - -MISCFLAG = $(NOLLFLAG) $(ULPFLAG) - -# -# PYCBF definitions -# -PYCBFEXT = so -PYCBFBOPT = -PYCBFIOPT = -SETUP_PY = setup.py -INSTALLSETUP_PY = installsetup.py - -# -# Set the compiler and flags -# - -######################################################### -# -# Appropriate compiler definitions for MAC OS X -# with gcc 4.2 -# Also change defintion of DOWNLOAD -# -######################################################### -CC = gcc -C++ = g++ -CFLAGS = -g -O2 -Wall -ansi -pedantic -LDFLAGS = -F90C = gfortran -F90FLAGS = -g -fno-range-check -F90LDFLAGS = -bind_at_load -SOCFLAGS = -fPIC -SOLDFLAGS = -dynamiclib -Wl,-rpath,$(CBF_PREFIX)/lib -JAVAINCLUDES = -I$(JDKDIR)/include -I$(JDKDIR)/include/linux -LDPREFIX = DYLD_LIBRARY_PATH=$(SOLIB):$$DYLD_LIBRARY_PATH;export DYLD_LIBRARY_PATH; -RUNLDPREFIX = DYLD_LIBRARY_PATH=$(CBF_PREFIX)/lib:$$DYLD_LIBRARY_PATH;export DYLD_LIBRARY_PATH; -EXTRALIBS = -lm -M4FLAGS = -Dfcb_bytes_in_rec=131072 -TIME = time -DOWNLOAD = /sw/bin/wget -N - -ifneq ($(NOFORTRAN),) -F90C = -endif - -# -# URLs from which to retrieve the data directories -# -DATAURLBASE = http://downloads.sf.net/cbflib/ -DATAURLI = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Input.tar.gz -DATAURLO = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output.tar.gz -DATAURLS = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz - -# -# URLs from which to retrieve needed external package snapshots -# -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWURL = http://downloads.sf.net/cbflib/$(PYCIFRW).tar.gz -PLYURL = http://www.dabeaz.com/ply/$(PLY).tar.gz -endif -REGEX_URL ?= http://downloads.sf.net/cbflib/$(REGEX).tar.gz -TIFF_URL ?= http://downloads.sf.net/cbflib/$(TIFF).tar.gz -HDF5_URL ?= http://downloads.sf.net/cbflib/$(HDF5).tar.gz -ifneq ($(MSYS2),yes) -LZ4_URL = http://downloads.sf.net/cbflib/$(LZ4).tar.gz -else -LZ4_URL = http://www.github.com/yayahjb/$(LZ4).git -endif -BSHUFURL = http://downloads.sf.net/cbflib/$(BSHUF).tar.gz - - -# -# Include directories -# -INCLUDES = -I$(INCLUDE) -I$(SRC) $(HDF5include) - -# -# runtime library path export commands -# -RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export LD_LIBRARY_PATH; \ - DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export DYLD_LIBRARY_PATH; \ - LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib;export LD_RUN_PATH; - - -###################################################################### -# You should not need to make modifications below this line # -###################################################################### - -ifneq ($(CBF_USE_ULP),) -SRC_CBF_ULP_C = $(SRC)/cbf_ulp.c -INCLUDE_CBF_ULP_H = $(INCLUDE)/cbf_ulp.h -BIN_TESTULP = $(BIN)/testulp -else -SRC_CBF_ULP_C = -INCLUyDE_CBF_ULP_H = -BIN_TESTULP = -endif - -ifneq ($(MSYS2),yes) -SRC_REALPATH = -else -SRC_REALPATH = $(SRC)/realpath.c -endif - - -# -# Suffixes of files to be used or built -# -.SUFFIXES: .c .o .f90 .m4 - -.m4.f90: - m4 -P $(M4FLAGS) $< > $@ - -ifneq ($(F90C),) -.f90.o: - $(F90C) $(F90FLAGS) -c $< -o $@ -endif - - -# -# Common dependencies -# -COMMONDEP = $(M4)/Makefile.m4 - -# -# Source files -# - -SOURCE = $(SRC)/cbf.c \ - $(SRC)/cbf_airy_disk.c \ - $(SRC)/cbf_alloc.c \ - $(SRC)/cbf_ascii.c \ - $(SRC)/cbf_binary.c \ - $(SRC)/cbf_byte_offset.c \ - $(SRC)/cbf_canonical.c \ - $(SRC)/cbf_codes.c \ - $(SRC)/cbf_compress.c \ - $(SRC)/cbf_context.c \ - $(SRC)/cbf_copy.c \ - $(SRC)/cbf_file.c \ - $(SRC)/cbf_getopt.c \ - $(SRC)/cbf_hdf5.c \ - $(SRC)/cbf_hdf5_filter.c \ - $(SRC)/cbf_lex.c \ - $(SRC)/cbf_minicbf_header.c\ - $(SRC)/cbf_nibble_offset.c \ - $(SRC)/cbf_packed.c \ - $(SRC)/cbf_predictor.c \ - $(SRC)/cbf_read_binary.c \ - $(SRC)/cbf_read_mime.c \ - $(SRC)/cbf_simple.c \ - $(SRC)/cbf_string.c \ - $(SRC)/cbf_stx.c \ - $(SRC)/cbf_tree.c \ - $(SRC_CBF_ULP_C) \ - $(SRC)/cbf_uncompressed.c \ - $(SRC)/cbf_write.c \ - $(SRC)/cbf_write_binary.c \ - $(SRC)/cbf_ws.c \ - $(SRC)/cbff.c \ - $(SRC)/md5c.c \ - $(SRC)/img.c \ - $(SRC_FGETLN) $(SRC_REALPATH) - -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYSOURCE = $(SRC)/drel_lex.py \ - $(SRC)/drel_yacc.py \ - $(SRC)/drelc.py \ - $(SRC)/drel_prep.py -endif - -F90SOURCE = $(SRC)/fcb_atol_wcnt.f90 \ - $(SRC)/fcb_ci_strncmparr.f90 \ - $(SRC)/fcb_exit_binary.f90 \ - $(SRC)/fcb_nblen_array.f90 \ - $(SRC)/fcb_next_binary.f90 \ - $(SRC)/fcb_open_cifin.f90 \ - $(SRC)/fcb_packed.f90 \ - $(SRC)/fcb_read_bits.f90 \ - $(SRC)/fcb_read_byte.f90 \ - $(SRC)/fcb_read_image.f90 \ - $(SRC)/fcb_read_line.f90 \ - $(SRC)/fcb_read_xds_i2.f90 \ - $(SRC)/fcb_skip_whitespace.f90 - - -# -# Header files -# -HEADERS = $(INCLUDE)/cbf.h \ - $(INCLUDE)/cbf_airy_disk.h \ - $(INCLUDE)/cbf_alloc.h \ - $(INCLUDE)/cbf_ascii.h \ - $(INCLUDE)/cbf_binary.h \ - $(INCLUDE)/cbf_byte_offset.h \ - $(INCLUDE)/cbf_canonical.h \ - $(INCLUDE)/cbf_codes.h \ - $(INCLUDE)/cbf_compress.h \ - $(INCLUDE)/cbf_context.h \ - $(INCLUDE)/cbf_copy.h \ - $(INCLUDE)/cbf_file.h \ - $(INCLUDE)/cbf_getopt.h \ - $(INCLUDE)/cbf_hdf5.h \ - $(INCLUDE)/cbf_hdf5_filter.h \ - $(INCLUDE)/cbf_lex.h \ - $(INCLUDE)/cbf_minicbf_header.h\ - $(INCLUDE)/cbf_nibble_offset.h \ - $(INCLUDE)/cbf_packed.h \ - $(INCLUDE)/cbf_predictor.h \ - $(INCLUDE)/cbf_read_binary.h \ - $(INCLUDE)/cbf_read_mime.h \ - $(INCLUDE)/cbf_simple.h \ - $(INCLUDE)/cbf_string.h \ - $(INCLUDE)/cbf_stx.h \ - $(INCLUDE)/cbf_tree.h \ - $(INCLUDE)/cbf_uncompressed.h \ - $(INCLUDE_CBF_ULP_H) \ - $(INCLUDE)/cbf_write.h \ - $(INCLUDE)/cbf_write_binary.h \ - $(INCLUDE)/cbf_ws.h \ - $(INCLUDE)/global.h \ - $(INCLUDE)/cbff.h \ - $(INCLUDE)/md5.h \ - $(INCLUDE)/img.h - -# -# m4 macro files -# -M4FILES = $(M4)/fcblib_defines.m4 \ - $(M4)/fcb_exit_binary.m4 \ - $(M4)/fcb_next_binary.m4 \ - $(M4)/fcb_open_cifin.m4 \ - $(M4)/fcb_packed.m4 \ - $(M4)/fcb_read_bits.m4 \ - $(M4)/fcb_read_image.m4 \ - $(M4)/fcb_read_xds_i2.m4 \ - $(M4)/test_fcb_read_image.m4 \ - $(M4)/test_xds_binary.m4 - - -# -# Documentation files -# -DOCUMENTS = $(DOC)/CBFlib.html \ - $(DOC)/CBFlib.txt \ - $(DOC)/CBFlib_NOTICES.html \ - $(DOC)/CBFlib_NOTICES.txt \ - $(DOC)/ChangeLog \ - $(DOC)/ChangeLog.html \ - $(DOC)/MANIFES \ - $(DOC)/gpl.txt $(DOC)/lgpl.txt - -# -# HTML Graphics files -# -JPEGS = $(GRAPHICS)/CBFbackground.jpg \ - $(GRAPHICS)/CBFbig.jpg \ - $(GRAPHICS)/CBFbutton.jpg \ - $(GRAPHICS)/cbflibbackground.jpg\ - $(GRAPHICS)/cbflibbig.jpg \ - $(GRAPHICS)/cbflibbutton.jpg \ - $(GRAPHICS)/cifhome.jpg \ - $(GRAPHICS)/iucrhome.jpg \ - $(GRAPHICS)/noticeButton.jpg - - -# -# Default: instructions -# -default: - @echo ' ' - @echo '***************************************************************' - @echo ' ' - @echo ' PLEASE READ README and doc/CBFlib_NOTICES.txt' - @echo ' ' - @echo ' Before making the CBF library and example programs, check' - @echo ' that the C compiler name and flags are correct:' - @echo ' ' - @echo ' The current values are:' - @echo ' ' - @echo ' $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(PYCIFRWFLAG)' - @echo ' ' - @echo ' Before installing the CBF library and example programs, check' - @echo ' that the install directory is correct:' - @echo ' ' - @echo ' The current value :' - @echo ' ' - @echo ' $(CBF_PREFIX) ' - @echo ' ' - @echo ' To compile the CBF library and example programs type:' - @echo ' ' - @echo ' make clean' - @echo ' make all' - @echo ' ' - @echo ' To compile the CBF library as a shared object library, type:' - @echo ' ' - @echo ' make shared' - @echo ' ' - @echo ' To compile the Java wrapper classes for CBF library, type:' - @echo ' ' - @echo ' make javawrapper' - @echo ' ' - @echo ' To run a set of tests type:' - @echo ' ' - @echo ' make tests' - @echo ' ' - @echo ' To run some java tests type:' - @echo ' ' - @echo ' make javatests' - @echo ' ' - @echo ' The tests assume that several data files are in the directories' - @echo ' $(DATADIRI) and $(DATADIRO)' - @echo ' ' - @echo ' Alternatively tests can be run comparing MD5 signatures only by' - @echo ' ' - @echo ' make tests_sigs_only' - @echo ' ' - @echo ' These signature only tests save space and download time by' - @echo ' assuming that input data files and the output signatures' - @echo ' are in the directories' - @echo ' $(DATADIRI) and $(DATADIRS)' - @echo ' ' - @echo ' These directory can be obtained from' - @echo ' ' - @echo ' $(DATAURLI) ' - @echo ' $(DATAURLO) ' - @echo ' $(DATAURLS) ' - @echo ' ' - @echo ' To clean up the directories type:' - @echo ' ' - @echo ' make clean' - @echo ' ' - @echo ' To install the library and binaries type:' - @echo ' ' - @echo ' make install' - @echo ' ' - @echo '***************************************************************' - @echo ' ' - -# -# Compile the library and examples -# -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEPS = $(PYCIFRW) $(PLY) -else -PYCIFRWDEPS = -endif - -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -LZ4DEPS = $(LZ4) -else -LZ4DEPS = -endif - -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -BSHUFDEPS = $(BSHUF) -else -BSHUFDEPS = -endif - - -all:: $(BIN) $(SOURCE) $(F90SOURCE) $(HEADERS) \ - $(HDF5) \ - $(LZ4DEPS) \ - $(BSHUFDEPS) \ - $(PYCIFRWDEPS) \ - symlinksdone \ - $(REGEXDEP) \ - $(LIB) \ - $(LIB)/libcbf.a \ - $(LIB)/libfcb.a \ - $(LIB)/libimg.a \ - $(BIN)/adscimg2cbf \ - $(BIN)/arvai_test \ - $(BIN)/cbf2adscimg \ - $(BIN)/cbf2nexus \ - $(BIN)/cif2c \ - $(BIN)/cif2cbf \ - $(BIN)/cbf_standardize_numbers \ - $(BIN)/convert_image \ - $(BIN)/convert_minicbf\ - $(BIN)/img2cif \ - $(BIN)/makecbf \ - $(BIN)/minicbf2nexus \ - $(BIN)/nexus2cbf \ - $(BIN)/roi_peaksearch \ - $(BIN)/sequence_match \ - $(BIN)/testcell \ - $(BIN)/testalloc \ - $(BIN)/testreals \ - $(BIN)/testflat \ - $(BIN)/testflatpacked \ - $(BIN)/testhdf5 \ - $(BIN_TESTULP) \ - $(BIN)/tiff2cbf \ - $(BIN)/test_cbf_airy_disk \ - $(BIN)/cbf_testxfelread - -ifneq ($(F90C),) -all:: $(BIN)/test_xds_binary \ - $(BIN)/test_fcb_read_image -endif - -shared: $(SOLIB)/libcbf.so $(SOLIB)/libfcb.so $(SOLIB)/libimg.so - -javawrapper: shared $(JCBF) $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so - -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEF = -Dcbf_use_pycifrw=yes -else -PYCIFRWDEF = -endif - - -Makefiles: Makefile \ - Makefile_LINUX \ - Makefile_LINUX_64 \ - Makefile_LINUX_gcc42 \ - Makefile_LINUX_DMALLOC \ - Makefile_LINUX_gcc42_DMALLOC \ - Makefile_OSX \ - Makefile_OSX_gcc42 \ - Makefile_OSX_gcc42_DMALLOC \ - Makefile_AIX \ - Makefile_MINGW \ - Makefile_MSYS2 \ - Makefile_IRIX_gcc - - -Makefile_LINUX: $(M4)/Makefile.m4 - -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX $(M4)/Makefile.m4 > Makefile_LINUX.tmp - mv Makefile_LINUX.tmp Makefile_LINUX - -Makefile_LINUX_DMALLOC: $(M4)/Makefile.m4 - -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_DMALLOC.tmp - mv Makefile_LINUX_DMALLOC.tmp Makefile_LINUX_DMALLOC - -Makefile_LINUX_64: $(M4)/Makefile.m4 - -cp Makefile_LINUX_64 Makefile_LINUX_64_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_64 $(M4)/Makefile.m4 > Makefile_LINUX_64.tmp - mv Makefile_LINUX_64.tmp Makefile_LINUX_64 - -Makefile_LINUX_gcc42: $(M4)/Makefile.m4 - -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42 $(M4)/Makefile.m4 > Makefile_LINUX_gcc42.tmp - mv Makefile_LINUX_gcc42.tmp Makefile_LINUX_gcc42 - -Makefile_LINUX_gcc42_DMALLOC: $(M4)/Makefile.m4 - -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_gcc42_DMALLOC.tmp - mv Makefile_LINUX_gcc42_DMALLOC.tmp Makefile_LINUX_gcc42_DMALLOC - -Makefile_OSX: $(M4)/Makefile.m4 - -cp Makefile_OSX Makefile_OSX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX $(M4)/Makefile.m4 > Makefile_OSX.tmp - mv Makefile_OSX.tmp Makefile_OSX - -Makefile_OSX_gcc42: $(M4)/Makefile.m4 - -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42 $(M4)/Makefile.m4 > Makefile_OSX_gcc42.tmp - mv Makefile_OSX_gcc42.tmp Makefile_OSX_gcc42 - -Makefile_OSX_gcc42_DMALLOC: $(M4)/Makefile.m4 - -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_OSX_gcc42_DMALLOC.tmp - mv Makefile_OSX_gcc42_DMALLOC.tmp Makefile_OSX_gcc42_DMALLOC - -Makefile_AIX: $(M4)/Makefile.m4 - -cp Makefile_AIX Makefile_AIX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=AIX $(M4)/Makefile.m4 > Makefile_AIX.tmp - mv Makefile_AIX.tmp Makefile_AIX - -Makefile_MINGW: $(M4)/Makefile.m4 - -cp Makefile_MINGW Makefile_MINGW_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MINGW $(M4)/Makefile.m4 > Makefile_MINGW.tmp - mv Makefile_MINGW.tmp Makefile_MINGW - -Makefile_MSYS2: $(M4)/Makefile.m4 - -cp Makefile_MSYS2 Makefile_MSYS2_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MSYS2 $(M4)/Makefile.m4 > Makefile_MSYS2.tmp - mv Makefile_MSYS2.tmp Makefile_MSYS2 - -Makefile_IRIX_gcc: $(M4)/Makefile.m4 - -cp Makefile_IRIX_gcc Makefile_IRIX_gcc_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=IRIX_gcc $(M4)/Makefile.m4 > Makefile_IRIX_gcc.tmp - mv Makefile_IRIX_gcc.tmp Makefile_IRIX_gcc - - -Makefile: $(M4)/Makefile.m4 - -cp Makefile Makefile_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=default $(M4)/Makefile.m4 > Makefile.tmp - mv Makefile.tmp Makefile - -cbflib.ini: $(M4)/Makefile.m4 - echo "$(LDPREFIX)" > cbflib.ini - echo "HDF5_PLUGIN_PATH=$(SOLIB):$$HDF5_PLUGIN_PATH" >> cbflib.ini - echo "export HDF5_PLUGIN_PATH" >> cbflib.ini - -symlinksdone: - chmod a+x .symlinks - chmod a+x .undosymlinks - chmod a+x doc/.symlinks - chmod a+x doc/.undosymlinks - ./.symlinks $(SLFLAGS) - touch symlinksdone - -install: baseinstall pycbfinstall \ - $(HDF5_INSTALL) \ - $(TIFF_INSTALL) \ - $(REGEX_INSTALL) - -userinstall: baseinstall pycbfuserinstall \ - $(HDF5_INSTALL) \ - $(TIFF_INSTALL) \ - $(REGEX_INSTALL) - -baseinstall: all $(CBF_PREFIX) $(CBF_PREFIX)/lib $(CBF_PREFIX)/bin \ - $(CBF_PREFIX)/include $(CBF_PREFIX)/include/cbflib \ - $(PYSOURCE) shared $(EXAMPLES)/batch_convert_minicbf.sh \ - $(LIB)/libcbf.a $(LIB)/libimg.a $(LIB)/libfcb.a \ - $(SOLIB)/libcbf.so $(SOLIB)/libimg.so $(SOLIB)/libfcb.so - -chmod -R 755 $(CBF_PREFIX)/include/cbflib - -chmod 755 $(CBF_PREFIX)/lib/libcbf.a - -cp $(CBF_PREFIX)/lib/libcbf.a $(CBF_PREFIX)/lib/libcbf_old.a - cp $(LIB)/libcbf.a $(CBF_PREFIX)/lib/libcbf.a - -chmod 755 $(CBF_PREFIX)/lib/libimg.a - -cp $(CBF_PREFIX)/lib/libimg.a $(CBF_PREFIX)/lib/libimg_old.a - cp $(LIB)/libimg.a $(CBF_PREFIX)/lib/libimg.a - -chmod 755 $(CBF_PREFIX)/lib/libfcb.a - -cp $(CBF_PREFIX)/lib/libfcb.a $(CBF_PREFIX)/lib/libfcb_old.a - cp $(LIB)/libfcb.a $(CBF_PREFIX)/lib/libfcb.a - -chmod 755 $(CBF_PREFIX)/lib/libcbf.so - -cp $(CBF_PREFIX)/lib/libcbf.so $(CBF_PREFIX)/lib/libcbf_old.so - cp $(SOLIB)/libcbf.so $(CBF_PREFIX)/lib/libcbf.so - $(LN) $(CBF_PREFIX)/lib/libcbf.so $(CBF_PREFIX)/lib/lib_cbf.so - -chmod 755 $(CBF_PREFIX)/lib/libimg.so - -cp $(CBF_PREFIX)/lib/libimg.so $(CBF_PREFIX)/lib/libimg_old.so - cp $(SOLIB)/libimg.so $(CBF_PREFIX)/lib/libimg.so - $(LN) $(CBF_PREFIX)/lib/libimg.so $(CBF_PREFIX)/lib/lib_img.so - -chmod 755 $(CBF_PREFIX)/lib/libfcb.so - -cp $(CBF_PREFIX)/lib/libfcb.so $(CBF_PREFIX)/lib/libfcb_old.so - cp $(SOLIB)/libfcb.so $(CBF_PREFIX)/lib/libfcb.so - $(LN) $(CBF_PREFIX)/lib/libfcb.so $(CBF_PREFIX)/lib/lib_fcb.so - -cp $(CBF_PREFIX)/bin/cbflib.ini $(CBF_PREFIX)/bin/cbflib.ini_old - echo "$(RUNLDPREFIX)" > $(CBF_PREFIX)/bin/cbflib.ini - echo "HDF5_PLUGIN_PATH=$(CBF_PREFIX)/lib:$$HDF5_PLUGIN_PATH" >> $(CBF_PREFIX)/bin/cbflib.ini - echo "export HDF5_PLUGIN_PATH" >> $(CBF_PREFIX)/bin/cbflib.ini - -cp $(CBF_PREFIX)/bin/adscimg2cbf $(CBF_PREFIX)/bin/adscimg2cbf_old - cp $(BIN)/adscimg2cbf $(CBF_PREFIX)/bin/adscimg2cbf - -cp $(CBF_PREFIX)/bin/cbf2adscimg $(CBF_PREFIX)/bin/cbf2adscimg_old - cp $(BIN)/cbf2adscimg $(CBF_PREFIX)/bin/cbf2adscimg - -cp $(CBF_PREFIX)/bin/cbf_standardize_numbers \ - $(CBF_PREFIX)/bin/cbf_standardize_numbers_old - cp $(BIN)/cbf_standardize_numbers $(CBF_PREFIX)/bin/cbf_standardize_numbers - -cp $(CBF_PREFIX)/bin/convert_image $(CBF_PREFIX)/bin/convert_image_old - cp $(BIN)/convert_image $(CBF_PREFIX)/bin/convert_image - -cp $(CBF_PREFIX)/bin/convert_minicbf $(CBF_PREFIX)/bin/convert_minicbf_old - cp $(BIN)/convert_minicbf $(CBF_PREFIX)/bin/convert_minicbf - -cp $(CBF_PREFIX)/bin/makecbf $(CBF_PREFIX)/bin/makecbf_old - cp $(BIN)/makecbf $(CBF_PREFIX)/bin/makecbf - -cp $(CBF_PREFIX)/bin/img2cif $(CBF_PREFIX)/bin/img2cif_old - cp $(BIN)/img2cif $(CBF_PREFIX)/bin/img2cif - -cp $(CBF_PREFIX)/bin/cif2cbf $(CBF_PREFIX)/bin/cif2cbf_old - cp $(BIN)/cif2cbf $(CBF_PREFIX)/bin/cif2cbf - -cp $(CBF_PREFIX)/bin/minicbf2nexus $(CBF_PREFIX)/bin/minicbf2nexus_old - cp $(BIN)/minicbf2nexus $(CBF_PREFIX)/bin/minicbf2nexus - -cp $(CBF_PREFIX)/bin/cbf2nexus $(CBF_PREFIX)/bin/cbf2nexus_old - cp $(BIN)/cbf2nexus $(CBF_PREFIX)/bin/cbf2nexus - -cp $(CBF_PREFIX)/bin/nexus2cbf $(CBF_PREFIX)/bin/nexus2cbf_old - cp $(BIN)/nexus2cbf $(CBF_PREFIX)/bin/nexus2cbf - -cp $(CBF_PREFIX)/bin/roi_peaksearch $(CBF_PREFIX)/bin/roi_peaksearch_old - cp $(BIN)/roi_peaksearch $(CBF_PREFIX)/bin/roi_peaksearch - -cp $(CBF_PREFIX)/bin/sequence_match $(CBF_PREFIX)/bin/sequence_match_old - cp $(BIN)/sequence_match $(CBF_PREFIX)/bin/sequence_match - -cp $(CBF_PREFIX)/bin/testalloc $(CBF_PREFIX)/bin/testalloc_old - cp $(BIN)/testalloc $(CBF_PREFIX)/bin/testalloc - -cp $(CBF_PREFIX)/bin/arvai_test $(CBF_PREFIX)/bin/arvai_test_old - cp $(BIN)/arvai_test $(CBF_PREFIX)/bin/arvai_test - -cp $(CBF_PREFIX)/bin/cif2c $(CBF_PREFIX)/bin/cif2c_old - cp $(BIN)/cif2c $(CBF_PREFIX)/bin/cif2c - -cp $(CBF_PREFIX)/bin/testreals $(CBF_PREFIX)/bin/testreals_old - cp $(BIN)/testreals $(CBF_PREFIX)/bin/testreals - -cp $(CBF_PREFIX)/bin/testflat $(CBF_PREFIX)/bin/testflat_old - cp $(BIN)/testflat $(CBF_PREFIX)/bin/testflat - -cp $(CBF_PREFIX)/bin/testflatpacked $(CBF_PREFIX)/bin/testflatpacked_old - cp $(BIN)/testflatpacked $(CBF_PREFIX)/bin/testflatpacked - -cp $(CBF_PREFIX)/bin/tiff2cbf $(CBF_PREFIX)/bin/tiff2cbf_old - cp $(BIN)/tiff2cbf $(CBF_PREFIX)/bin/tiff2cbf - -cp $(CBF_PREFIX)/bin/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk_old - cp $(BIN)/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk - -cp $(CBF_PREFIX)/bin/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk_old - cp $(BIN)/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk - -cp $(CBF_PREFIX)/bin/testhdf5 $(CBF_PREFIX)/bin/testhdf5_old - cp $(BIN)/testhdf5 $(CBF_PREFIX)/bin/testhdf5 -ifneq ($(CBF_USE_ULP),) - -cp $(CBF_PREFIX)/bin/testulp $(CBF_PREFIX)/bin/testulp_old - cp $(BIN)/testulp $(CBF_PREFIX)/bin/testulp -endif - -cp $(CBF_PREFIX)/bin/batch_convert_minicbf.sh $(CBF_PREFIX)/bin/batch_convert_minicbf_old.sh - cp $(EXAMPLES)/batch_convert_minicbf.sh $(CBF_PREFIX)/bin/batch_convert_minicbf.sh -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) - cp $(SRC)/drel_lex.py $(CBF_PREFIX)/bin/drel_lex.py - cp $(SRC)/drel_yacc.py $(CBF_PREFIX)/bin/drel_yacc.py - cp $(SRC)/drelc.py $(CBF_PREFIX)/bin/drelc.py - cp $(SRC)/drel_prep.py $(CBF_PREFIX)/bin/drel_prep.py -endif - chmod -R 755 $(CBF_PREFIX)/include/cbflib - -rm -rf $(CBF_PREFIX)/include/cbflib_old - -cp -r $(CBF_PREFIX)/include/cbflib $(CBF_PREFIX)/include/cbflib_old - -rm -rf $(CBF_PREFIX)/include/cbflib - cp -r $(INCLUDE) $(CBF_PREFIX)/include/cbflib - chmod 644 $(CBF_PREFIX)/lib/libcbf.a - chmod 644 $(CBF_PREFIX)/lib/libimg.a - chmod 644 $(CBF_PREFIX)/lib/libfcb.a - chmod 755 $(CBF_PREFIX)/lib/libcbf.so - chmod 755 $(CBF_PREFIX)/lib/libimg.so - chmod 755 $(CBF_PREFIX)/lib/libfcb.so - chmod 755 $(CBF_PREFIX)/bin/arvai_test - chmod 755 $(CBF_PREFIX)/bin/cbf2nexus - chmod 755 $(CBF_PREFIX)/bin/cbf_standardize_numbers - chmod 755 $(CBF_PREFIX)/bin/cif2c - chmod 755 $(CBF_PREFIX)/bin/cif2cbf - chmod 755 $(CBF_PREFIX)/bin/convert_image - chmod 755 $(CBF_PREFIX)/bin/convert_minicbf - chmod 755 $(CBF_PREFIX)/bin/img2cif - chmod 755 $(CBF_PREFIX)/bin/makecbf - chmod 755 $(CBF_PREFIX)/bin/minicbf2nexus - chmod 755 $(CBF_PREFIX)/bin/nexus2cbf - chmod 755 $(CBF_PREFIX)/bin/roi_peaksearch - chmod 755 $(CBF_PREFIX)/bin/sequence_match - chmod 755 $(CBF_PREFIX)/bin/testalloc - chmod 755 $(CBF_PREFIX)/bin/testflat - chmod 755 $(CBF_PREFIX)/bin/testflatpacked - chmod 755 $(CBF_PREFIX)/bin/testhdf5 - chmod 755 $(CBF_PREFIX)/bin/testreals -ifneq ($(CBF_USE_ULP),) - chmod 755 $(CBF_PREFIX)/bin/testulp -endif - chmod 755 $(CBF_PREFIX)/bin/tiff2cbf - chmod 755 $(CBF_PREFIX)/bin/test_cbf_airy_disk - chmod 755 $(CBF_PREFIX)/bin/batch_convert_minicbf.sh - chmod 644 $(CBF_PREFIX)/include/cbflib/*.h - -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -# -# PyCifRW -# -build_pycifrw: $(M4)/Makefile.m4 - touch build_pycifrw -$(PYCIFRW): build_pycifrw - -rm -rf $(PYCIFRW) - -rm -rf $(PYCIFRW).tar.gz - $(DOWNLOAD) $(PYCIFRWURL) - tar -xvf $(PYCIFRW).tar.gz - -rm $(PYCIFRW).tar.gz - (cd $(PYCIFRW); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) - -# -# PLY -# -build_ply: $(M4)/Makefile.m4 - touch build_ply -$(PLY): build_ply - -rm -rf $(PLY) - -rm -rf $(PLY).tar.gz - $(DOWNLOAD) $(PLYURL) - tar -xvf $(PLY).tar.gz - -rm $(PLY).tar.gz - (cd $(PLY); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) -endif - -# -# REGEX -# - -build_regex: $(M4)/Makefile.m4 - touch build_regex -$(REGEX): build_regex - -rm -rf $(REGEX) - -rm -rf $(REGEX).tar.gz - $(DOWNLOAD) $(REGEX_URL) - tar -xvf $(REGEX).tar.gz - touch $(REGEX) - -rm $(REGEX).tar.gz - cp config.guess config.sub $(REGEX) - (cd $(REGEX); \ - prefix=$(REGEX_PREFIX); export prefix; \ - ./configure --prefix=$(REGEX_PREFIX); make install) - @-cp $(REGEX_PREFIX)/include/pcreposix.h $(REGEX_PREFIX)/include/regex.h -$(REGEX)_INSTALL: $(REGEX) - -rm -rf $(REGEX)_install - rsync -avz $(REGEX)/ $(REGEX)_install - (cd $(REGEX)_install; prefix=$(CBF_PREFIX); export prefix; \ - make distclean; ./configure --prefix=$(CBF_PREFIX); make install ) - @-cp $(CBF_PREFIX)/include/pcreposix.h $(CBF_PREFIX)/include/regex.h - -# -# TIFF -# -build_tiff: $(M4)/Makefile.m4 - touch build_tiff -$(TIFF): build_tiff config.guess config.sub - -rm -rf $(TIFF) - -rm -rf $(TIFF).tar.gz - $(DOWNLOAD) $(TIFF_URL) - tar -xvf $(TIFF).tar.gz - touch $(TIFF) - -rm $(TIFF).tar.gz - cp config.guess config.sub $(TIFF)/config/ - (cd $(TIFF); prefix=$(TIFF_PREFIX); export prefix; \ - ./configure --prefix=$(TIFF_PREFIX); make install) -$(TIFF)_INSTALL: $(TIFF) - -rm -rf $(TIFF)_install - rsync -avz $(TIFF)/ $(TIFF)_install - (cd $(TIFF)_install; make distclean; prefix=$(CBF_PREFIX); export prefix; \ - ./configure --prefix=$(CBF_PREFIX); make install) - - -ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes) -# -# HDF5 -# - -build_hdf5: $(M4)/Makefile.m4 - touch build_hdf5 -$(HDF5): build_hdf5 - -rm -rf $(HDF5) - -rm -rf $(HDF5).tar.gz - $(DOWNLOAD) $(HDF5_URL) - tar -xvf $(HDF5).tar.gz - cp config.guess $(HDF5)/bin/config.guess - cp config.sub $(HDF5)/bin/config.sub - touch $(HDF5) - -rm $(HDF5).tar.gz - echo "first level HDF5 install in "$(HDF5_PREFIX) - (cd $(ROOT)/$(HDF5); \ - CFLAGS="$(CFLAGS)"; export CFLAGS; \ - mkdir -p hdf5; prefix=$(ROOT)/$(HDF5)/hdf5; export prefix; \ - ./configure --prefix=$(ROOT)/$(HDF5)/hdf5 --enable-build-mode=production \ - --enable-trace --enable-fortran --enable-using-memchecker ;\ - make install; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/bin/ $(HDF5_PREFIX)/bin; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/lib/ $(HDF5_PREFIX)/lib; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/include/ $(HDF5_PREFIX)/include; \ - cd $(HDF5_PREFIX)/bin; $(ROOT)/$(HDF5)/hdf5/bin/h5redeploy -force ) -$(HDF5)_INSTALL: $(HDF5) - -rm -rf $(HDF5)_install - echo "final HDF5 install in "$(CBF_PREFIX) - rsync -avz $(ROOT)/$(HDF5)/hdf5/bin/ $(CBF_PREFIX)/bin; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/lib/ $(CBF_PREFIX)/lib; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/include/ $(CBF_PREFIX)/include; \ - cd $(CBF_PREFIX)/bin; $(ROOT)/$(HDF5)/hdf5/bin/h5redeploy -force -endif - - -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -# -# LZ4 -# -build_lz4: $(M4)/Makefile.m4 - touch build_lz4 -$(LZ4): $(HDF5) build_lz4 - mkdir -p $(SOLIB) - -rm -rf $(LZ4) -ifneq ($(MSYS2),yes) - -rm -rf $(LZ4).tar.gz - $(DOWNLOAD) $(LZ4_URL) - tar -xvf $(LZ4).tar.gz - -rm $(LZ4).tar.gz - (cp $(LZ4include)/lz4.h $(INCLUDE); \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/lz4.c -o lz4.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/h5zlz4.c -o h5zlz4.o; \ - $(CC) -shared lz4.o h5zlz4.o -o $(SOLIB)/libh5zlz4.so; \ - rm lz4.o h5zlz4.o) -else - git clone $(LZ4_URL) - (cd $(LZ4); mkdir build; cd build; cmake .. -G 'MSYS Makefiles' -DENABLE_LZ4_PLUGIN="yes"; make all; cp plugins/* $(SOLIB)) -endif - touch $(LZ4) -endif - - -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -# -# BSHUF -# -build_BSHUF: $(M4)/Makefile.m4 - touch build_BSHUF -$(BSHUF): $(HDF5) build_BSHUF $(LZ4dep) - mkdir -p $(SOLIB) - -rm -rf $(BSHUF) - -rm -rf $(BSHUF).tar.gz - -rm -rf *.o - $(DOWNLOAD) $(BSHUFURL) - tar -xvf $(BSHUF).tar.gz - -rm $(BSHUF).tar.gz - (cp $(BSHUFinclude)/bitshuffle.h \ - $(BSHUFinclude)/bitshuffle_core.h \ - $(BSHUFinclude)/bitshuffle_internals.h \ - $(BSHUFinclude)/bshuf_h5filter.h $(BSHUFinclude)/iochain.h $(INCLUDE); \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bshuf_h5plugin.c -o bshuf_h5plugin.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/iochain.c -o iochain.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o; \ - $(CC) -shared bshuf_h5filter.o bitshuffle.o bitshuffle_core.o iochain.o lz4.o $(HDF5SOLIBS_LOCAL) $(HDF5SOLIBS_SYSTEM)\ - -o $(SOLIB)/libh5zbshuf.so; \ - $(CC) -shared bshuf_h5filter.o bitshuffle.o bitshuffle_core.o lz4.o bshuf_h5plugin.o iochain.o \ - $(HDF5SOLIBS_LOCAL) \ - $(HDF5SOLIBS_SYSTEM) -o $(SOLIB)/$(BSHUFFILTER).so; \ - rm bshuf_h5filter.o bitshuffle.o lz4.o iochain.o bshuf_h5plugin.o) - touch $(BSHUF) -endif - - -# -# Directories -# -$(CBF_PREFIX): - mkdir -p $(CBF_PREFIX) - -$(CBF_PREFIX)/lib: $(CBF_PREFIX) - mkdir -p $(CBF_PREFIX)/lib - -$(CBF_PREFIX)/bin: $(CBF_PREFIX) - mkdir -p $(CBF_PREFIX)/bin - -$(CBF_PREFIX)/include: $(CBF_PREFIX) - mkdir -p $(CBF_PREFIX)/include - -$(CBF_PREFIX)/include/cbflib: $(CBF_PREFIX)/include - mkdir -p $(CBF_PREFIX)/include/cbflib - - - -$(LIB): - mkdir -p $@ - -$(BIN): - mkdir -p $@ - -$(SOLIB): - mkdir -p $@ - -$(JCBF): - mkdir -p $@ - -$(MINICBF_TESTS): - mkdir -p $@ - -# -# Parser -# -$(SRC)/cbf_stx.c: $(SRC)/cbf.stx.y - bison $(SRC)/cbf.stx.y -o $(SRC)/cbf.stx.tab.c -d - mv $(SRC)/cbf.stx.tab.c $(SRC)/cbf_stx.c - mv $(SRC)/cbf.stx.tab.h $(INCLUDE)/cbf_stx.h - -# -# CBF library -# -$(LIB)/libcbf.a: $(SOURCE) $(HEADERS) $(COMMONDEP) $(HDF5) $(LZ4DEPS) $(BSHUFDEPS) $(REGEXDEPS) - -rm -f $@ - -rm -f *.o - mkdir -p $(LIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) \ - -DCBF_FILTER_STATIC $(LZ4FLAG) $(BSHUFFLAG) $(PYCIFRWFLAG) $(INCLUDES) $(WARNINGS) -c $(SOURCE) -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -ifneq ($(MSYS2),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(LZ4src)/h5zlz4.c -o h5zlz4.o -else - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(LZ4)/LZ4/src/H5Zlz4.c -o h5zlz4.o -endif -endif -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/iochain.c -o iochain.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o -endif - $(AR) cr $@ *.o -ifneq ($(RANLIB),) - $(RANLIB) $@ -endif - -rm -f *.o - -$(SOLIB)/libcbf.so: $(SOURCE) $(HEADERS) $(COMMONDEP) $(HDF5) $(LZ4DEPS) $(BSHUFDEPS) - -rm -f $@ - -rm -f *.o - mkdir -p $(SOLIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(LZ4FLAG) $(BSHUFFLAG) $(PYCIFRWFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(SOURCE) -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -ifneq ($(MSYS2),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(LZ4src)/h5zlz4.c -o h5zlz4.o -else - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(LZ4)/LZ4/src/H5Zlz4.c -o h5zlz4.o -endif -endif -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle..o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/iochain.c -o iochain.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o -endif - - $(CC) -o $@ *.o $(SOLDFLAGS) $(EXTRALIBS) $(REGEX_LIBS) $(HDF5SOLIBS_LOCAL) $(HDF5SOLIBS_SYSTEM) - -rm -f *.o - -# -# IMG library -# -$(LIB)/libimg.a: $(SRC)/img.c $(HEADERS) $(COMMONDEP) - mkdir -p $(LIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) -c $(SRC)/img.c - $(AR) cr $@ img.o -ifneq ($(RANLIB),) - $(RANLIB) $@ -endif - rm img.o - -$(SOLIB)/libimg.so: $(SOURCE) $(HEADERS) $(COMMONDEP) - -rm -f $@ - mkdir -p $(SOLIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(SRC)/img.c - $(CC) -o $@ img.o $(SOLDFLAGS) - rm img.o - -# -# CBF and IMG libraries -# -CBF_IMG_LIBS: $(LIB)/libcbf.a $(LIB)/libimg.a - - -# -# FCB library -# -$(LIB)/libfcb.a: $(F90SOURCE) $(COMMONDEP) $(HDF5) - mkdir -p $(LIB) -ifneq ($(F90C),) - $(F90C) $(F90FLAGS) -c $(F90SOURCE) - $(AR) cr $@ *.o -ifneq ($(RANLIB),) - $(RANLIB) $@ -endif - rm *.o -else - echo "Define F90C to build $(LIB)/libfcb.a" -endif - -$(SOLIB)/libfcb.so: $(F90SOURCE) $(HEADERS) $(COMMONDEP) $(SOLIB) -ifneq ($(F90C),) - -rm -f $@ - mkdir -p $(SOLIB) - $(F90C) $(F90FLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(F90SOURCE) - $(F90C) $(F90FLAGS) -o $@ *.o $(SOLDFLAGS) - rm *.o -else - echo "Define F90C to build $(SOLIB)/libfcb.so" -endif - - -# -# Python bindings -# -$(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ - $(PYCBF)/$(SETUP_PY) \ - $(PYCBF)/pycbf.i \ - $(PYCBF)/cbfhandlewrappers.i \ - $(PYCBF)/cbfdetectorwrappers.i \ - $(PYCBF)/cbfgenericwrappers.i \ - $(PYCBF)/cbfgoniometerwrappers.i - -cp $(SOLIB)/*.so $(LIB) - (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) - -$(PYCBF)/pycbfinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --prefix=$(CBF_PREFIX)) - -$(PYCBF)/pycbfuserinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --user) - -$(PYCBF)/setup.py: $(M4)/setup_py.m4 - (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ - -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) - -$(PYCBF)/setup_MINGW.py: m4/setup_py.m4 - (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ - -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) - -$(LIB)/_pycbf.$(PYCBFEXT): $(PYCBF)/_pycbf.$(PYCBFEXT) - mkdir -p $(LIB) - cp $(PYCBF)/_pycbf.$(PYCBFEXT) $(LIB)/_pycbf.$(PYCBFEXT) - -$(PYCBF)/pycbf.pdf: $(PYCBF)/pycbf.w - (cd $(PYCBF); \ - $(NUWEB) pycbf; \ - latex pycbf; \ - $(NUWEB) pycbf; \ - latex pycbf; \ - dvipdfm pycbf ) - -$(PYCBF)/CBFlib.txt: $(DOC)/CBFlib.html - links -dump $(DOC)/CBFlib.html > $(PYCBF)/CBFlib.txt - -$(PYCBF)/cbfhandlewrappers.i \ -$(PYCBF)/cbfdetectorwrappers.i \ -$(PYCBF)/cbfgenericwrappers.i \ -$(PYCBF)/cbfgoniometerwrappers.i: $(PYCBF)/CBFlib.txt $(PYCBF)/make_pycbf.py - (cd $(PYCBF); $(PYTHON) make_pycbf.py; $(PYSWIG) pycbf.i; $(PYTHON) setup.py build) - - -# -# Java bindings -# -$(JCBF)/cbflib-$(VERSION).jar: $(JCBF) $(SRC)/jcbf.i - $(JSWIG) -I$(INCLUDE) -package org.iucr.cbflib -outdir $(JCBF) -o $(JCBF)/jcbf_wrap.c $(SRC)/jcbf.i - $(JAVAC) -d . $(JCBF)/*.java - $(JAR) cf $@ org - -$(SOLIB)/libcbf_wrap.so: $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf.so - mkdir -p $(SOLIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) $(JAVAINCLUDES) -c $(JCBF)/jcbf_wrap.c - $(CC) -o $@ jcbf_wrap.o $(SOLDFLAGS) -L$(SOLIB) -lcbf $(REGEX_LIBS) - rm jcbf_wrap.o - -# -# F90SOURCE -# -$(SRC)/fcb_exit_binary.f90: $(M4)/fcb_exit_binary.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_exit_binary.m4) > $(SRC)/fcb_exit_binary.f90 -$(SRC)/fcb_next_binary.f90: $(M4)/fcb_next_binary.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_next_binary.m4) > $(SRC)/fcb_next_binary.f90 -$(SRC)/fcb_open_cifin.f90: $(M4)/fcb_open_cifin.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_open_cifin.m4) > $(SRC)/fcb_open_cifin.f90 -$(SRC)/fcb_packed.f90: $(M4)/fcb_packed.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_packed.m4) > $(SRC)/fcb_packed.f90 -$(SRC)/fcb_read_bits.f90: $(M4)/fcb_read_bits.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_read_bits.m4) > $(SRC)/fcb_read_bits.f90 -$(SRC)/fcb_read_image.f90: $(M4)/fcb_read_image.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_read_image.m4) > $(SRC)/fcb_read_image.f90 -$(SRC)/fcb_read_xds_i2.f90: $(M4)/fcb_read_xds_i2.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_read_xds_i2.m4) > $(SRC)/fcb_read_xds_i2.f90 -$(EXAMPLES)/test_fcb_read_image.f90: $(M4)/test_fcb_read_image.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) test_fcb_read_image.m4) > $(EXAMPLES)/test_fcb_read_image.f90 -$(EXAMPLES)/test_xds_binary.f90: $(M4)/test_xds_binary.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) test_xds_binary.m4) > $(EXAMPLES)/test_xds_binary.f90 - -# -# convert_image example program -# -$(BIN)/convert_image: $(LIB)/libcbf.a $(EXAMPLES)/convert_image.c $(SRC)/img.c \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/convert_image.c $(SRC)/img.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ -# -# convert_minicbf example program -# -$(BIN)/convert_minicbf: $(LIB)/libcbf.a $(EXAMPLES)/convert_minicbf.c \ - $(GOPTLIB) $(GOPTINC) $(EXAMPLES)/batch_convert_minicbf.sh - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/convert_minicbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - chmod 755 $(EXAMPLES)/batch_convert_minicbf.sh - -# -# makecbf example program -# -$(BIN)/makecbf: $(LIB)/libcbf.a $(EXAMPLES)/makecbf.c $(LIB)/libimg.a - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/makecbf.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - - -# -# adscimg2cbf example program -# -$(BIN)/adscimg2cbf: $(LIB)/libcbf.a $(EXAMPLES)/adscimg2cbf.c $(EXAMPLES)/adscimg2cbf_sub.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/adscimg2cbf.c $(EXAMPLES)/adscimg2cbf_sub.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# cbf2adscimg example program -# -$(BIN)/cbf2adscimg: $(LIB)/libcbf.a $(EXAMPLES)/cbf2adscimg.c $(EXAMPLES)/cbf2adscimg_sub.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf2adscimg.c $(EXAMPLES)/cbf2adscimg_sub.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# cbf_standardize_numbers example program -# -$(BIN)/cbf_standardize_numbers: $(EXAMPLES)/cbf_standardize_numbers.c $(EXAMPLES)/cbf_standardize_numbers.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf_standardize_numbers.c $(SRC_FGETLN) $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@ - -# -# changtestcompression example program -# -$(BIN)/changtestcompression: $(LIB)/libcbf.a $(EXAMPLES)/changtestcompression.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/changtestcompression.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# img2cif example program -# -$(BIN)/img2cif: $(LIB)/libcbf.a $(EXAMPLES)/img2cif.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOTPINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/img2cif.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# cif2cbf example program -# -$(BIN)/cif2cbf: $(LIB)/libcbf.a $(EXAMPLES)/cif2cbf.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cif2cbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# cbf2nexus example program -# -$(BIN)/cbf2nexus: $(LIB)/libcbf.a $(EXAMPLES)/cbf2nexus.c \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf2nexus.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) \ - -lhdf5 -limg -o $@ - -# -# minicbf2nexus example program -# -$(BIN)/minicbf2nexus: $(LIB)/libcbf.a $(EXAMPLES)/minicbf2nexus.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/minicbf2nexus.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# nexus2cbf example program -# -$(BIN)/nexus2cbf: $(LIB)/libcbf.a $(EXAMPLES)/nexus2cbf.c \ - $(GOPTLIB) $(GOPTINC) $(REGEX) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/nexus2cbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# roi_peaksearch example program -# -$(BIN)/roi_peaksearch: $(LIB)/libcbf.a $(EXAMPLES)/roi_peaksearch.c \ - $(EXAMPLES)/dps_peaksearch.c $(EXAMPLES)/dps_peaksearch.h $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/roi_peaksearch.c $(EXAMPLES)/dps_peaksearch.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - - -# -# dectris cbf_template_t program -# -$(BIN)/cbf_template_t: $(DECTRIS_EXAMPLES)/cbf_template_t.c \ - $(DECTRIS_EXAMPLES)/mx_cbf_t_extras.h \ - $(DECTRIS_EXAMPLES)/mx_parms.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -I $(DECTRIS_EXAMPLES) $(WARNINGS) \ - $(DECTRIS_EXAMPLES)/cbf_template_t.c -o $@ - -# -# testcell example program -# -$(BIN)/testcell: $(LIB)/libcbf.a $(EXAMPLES)/testcell.C - mkdir -p $(BIN) - $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testcell.C -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# cif2c example program -# -$(BIN)/cif2c: $(LIB)/libcbf.a $(EXAMPLES)/cif2c.c - mkdir -p $(BIN) - $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cif2c.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# sauter_test example program -# -$(BIN)/sauter_test: $(LIB)/libcbf.a $(EXAMPLES)/sauter_test.C - mkdir -p $(BIN) - $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/sauter_test.C -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# sequence_match example program -# -$(BIN)/sequence_match: $(LIB)/libcbf.a $(EXAMPLES)/sequence_match.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/sequence_match.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# tiff2cbf example program -# -$(BIN)/tiff2cbf: $(LIB)/libcbf.a $(EXAMPLES)/tiff2cbf.c \ - $(GOPTLIB) $(GOPTINC) $(TIFF) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - -I$(TIFF)/libtiff $(EXAMPLES)/tiff2cbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf -L$(TIFF_PREFIX)/lib -ltiff $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# Andy Arvai's buffered read test program -# -$(BIN)/arvai_test: $(LIB)/libcbf.a $(EXAMPLES)/arvai_test.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/arvai_test.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# testreals example program -# -$(BIN)/testreals: $(LIB)/libcbf.a $(EXAMPLES)/testreals.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testreals.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# testflat example program -# -$(BIN)/testflat: $(LIB)/libcbf.a $(EXAMPLES)/testflat.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testflat.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ -# -# testflatpacked example program -# -$(BIN)/testflatpacked: $(LIB)/libcbf.a $(EXAMPLES)/testflatpacked.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testflatpacked.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -ifneq ($(F90C),) -# -# test_xds_binary example program -# -$(BIN)/test_xds_binary: $(LIB)/libfcb.a $(EXAMPLES)/test_xds_binary.f90 - mkdir -p $(BIN) - $(F90C) $(F90FLAGS) $(F90LDFLAGS) $(EXAMPLES)/test_xds_binary.f90 \ - -L$(LIB) -lfcb -o $@ - -# -# test_fcb_read_image example program -# -$(BIN)/test_fcb_read_image: $(LIB)/libfcb.a $(EXAMPLES)/test_fcb_read_image.f90 - mkdir -p $(BIN) - $(F90C) $(F90FLAGS) $(F90LDFLAGS) $(EXAMPLES)/test_fcb_read_image.f90 \ - -L$(LIB) -lfcb -o $@ -endif - -# -# testcbf (C) -# -$(BIN)/ctestcbf: $(EXAMPLES)/testcbf.c $(LIB)/libcbf.a - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testcbf.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# testcbf (Java) -# -$(BIN)/testcbf.class: $(EXAMPLES)/testcbf.java $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so - mkdir -p $(BIN) - $(JAVAC) -cp $(JCBF)/cbflib-$(VERSION).jar -d $(BIN) $(EXAMPLES)/testcbf.java - -ifneq ($(CBF_USE_ULP),) -# -# testulp test program -# -$(BIN)/testulp: $(LIB)/libcbf.a $(EXAMPLES)/testulp.c $(EXAMPLES)/unittest.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/testulp.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ -endif - -# -# testhdf5 test program -# -$(BIN)/testhdf5: $(LIB)/libcbf.a $(EXAMPLES)/testhdf5.c $(EXAMPLES)/unittest.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/testhdf5.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) \ - -o $@.tmp - mv $@.tmp $@ - -# -# testalloc test program -# -$(BIN)/testalloc: $(LIB)/libcbf.a $(EXAMPLES)/testalloc.c $(EXAMPLES)/unittest.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/testalloc.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ - -# -# test_cbf_airy_disk test program -# -$(BIN)/test_cbf_airy_disk: $(LIB)/libcbf.a $(EXAMPLES)/test_cbf_airy_disk.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/test_cbf_airy_disk.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ - -# -# cbf_testxfelread: test program -# -$(BIN)/cbf_testxfelread: $(LIB)/libcbf.a $(EXAMPLES)/cbf_testxfelread.c $(EXAMPLES)/cbf_testxfelread.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf_testxfelread.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ - -# -# Data files for tests -# - -$(DATADIRI): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLI)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Input.tar.gz) - touch $(DATADIRI) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Input.tar.gz) - -$(DATADIRO): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLO)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output.tar.gz) - touch $(DATADIRO) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output.tar.gz) - -$(DATADIRS): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLS)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - touch $(DATADIRS) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - - -# Input Data Files - -TESTINPUT_BASIC = example.mar2300 -DATADIRI_INPUT_BASIC = $(DATADIRI)/example.mar2300 - - -TESTINPUT_EXTRA = \ - 1191_00005.cbf \ - 9ins.cif \ - hit-20140306005258847.cbf \ - insulin_pilatus6m.cbf \ - mb_LP_1_001.img \ - testflatin.cbf \ - testflatpackedin.cbf \ - testrealin.cbf \ - thaumatin_die_M1S5_1_0005_2.cbf \ - X4_lots_M1S4_1_0001.cbf \ - X4_lots_M1S4_1_0002.cbf \ - X4_lots_M1S4_1_0003.cbf \ - X4_lots_M1S4_1_0004.cbf \ - X4_lots_M1S4_1_0005.cbf \ - XRD1621.tif - - - -DATADIRI_INPUT_EXTRA = \ - $(DATADIRI)/1191_00005.cbf \ - $(DATADIRI)/9ins.cif \ - $(DATADIRI)/hit-20140306005258847.cbf \ - $(DATADIRI)/insulin_pilatus6m.cbf \ - $(DATADIRI)/mb_LP_1_001.img \ - $(DATADIRI)/testflatin.cbf \ - $(DATADIRI)/testflatpackedin.cbf \ - $(DATADIRI)/testrealin.cbf \ - $(DATADIRI)/thaumatin_die_M1S5_1_0005_2.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0001.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0002.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0003.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0004.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0005.cbf \ - $(DATADIRI)/XRD1621.tif - - -# Output Data Files - -TESTOUTPUT = adscconverted_flat_orig.cbf \ - adscconverted_orig.cbf converted_flat_orig.cbf converted_orig.cbf \ - insulin_pilatus6mconverted_orig.cbf.h5.cbf \ - insulin_pilatus6mconverted_orig.cbf.h5 \ - insulin_pilatus6mconverted_v2_orig.cbf \ - mb_LP_1_001_orig.cbf testcell_orig.prt \ - test_xds_bin_testflatout_orig.out \ - test_xds_bin_testflatpackedout_orig.out test_fcb_read_testflatout_orig.out \ - test_fcb_read_testflatpackedout_orig.out \ - XRD1621_orig.cbf XRD1621_I4encbC100_orig.cbf \ - minicbf_orig.h5 -NEWTESTOUTPUT = adscconverted_flat.cbf \ - adscconverted.cbf converted_flat.cbf converted.cbf \ - insulin_pilatus6mconverted.cbf \ - insulin_pilatus6mconverted.cbf.h5 \ - insulin_pilatus6mconverted.cbf.h5.cbf \ - insulin_pilatus6mconverted_v2.cbf \ - mb_LP_1_001.cbf testcell.prt \ - test_xds_bin_testflatout.out \ - test_xds_bin_testflatpackedout.out test_fcb_read_testflatout.out \ - test_fcb_read_testflatpackedout.out \ - XRD1621.cbf XRD1621_I4encbC100.cbf \ - $(MINICBF_TEST)/minicbf.h5 -DATADIRO_OUTPUT = $(DATADIRO)/adscconverted_flat_orig.cbf \ - $(DATADIRO)/adscconverted_orig.cbf \ - $(DATADIRO)/converted_flat_orig.cbf \ - $(DATADIRO)/converted_orig.cbf \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5 \ - $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf \ - $(DATADIRO)/mb_LP_1_001_orig.cbf \ - $(DATADIRO)/testcell_orig.prt \ - $(DATADIRO)/test_xds_bin_testflatout_orig.out \ - $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out \ - $(DATADIRO)/test_fcb_read_testflatout_orig.out \ - $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out \ - $(DATADIRO)/XRD1621_orig.cbf \ - $(DATADIRO)/XRD1621_I4encbC100_orig.cbf \ - $(DATADIRO)/minicbf_orig.h5 -DATADIRO_OUTPUT_SIGNATURES = $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) \ - $(DATADIRO)/adscconverted_orig.cbf$(SEXT) \ - $(DATADIRO)/converted_flat_orig.cbf$(SEXT) \ - $(DATADIRO)/converted_orig.cbf$(SEXT) \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ - $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ - $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) \ - $(DATADIRO)/testcell_orig.prt$(SEXT) \ - $(DATADIRO)/test_xds_bin_testflatout_orig.out$(SEXT) \ - $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRO)/test_fcb_read_testflatout_orig.out$(SEXT) \ - $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRO)/XRD1621_orig.cbf$(SEXT) \ - $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) \ - $(DATADIRO)/minicbf_orig.h5$(SEXT) - - - -# Output Data File Signatures - -TESTOUTPUTSIGS = adscconverted_flat_orig.cbf$(SEXT) \ - adscconverted_orig.cbf$(SEXT) converted_flat_orig.cbf$(SEXT) converted_orig.cbf$(SEXT) \ - insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ - insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ - insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ - mb_LP_1_001_orig.cbf$(SEXT) testcell_orig.prt$(SEXT) \ - test_xds_bin_testflatout_orig.out$(SEXT) \ - test_xds_bin_testflatpackedout_orig.out$(SEXT) test_fcb_read_testflatout_orig.out$(SEXT) \ - test_fcb_read_testflatpackedout_orig.out$(SEXT) \ - XRD1621_orig.cbf$(SEXT) \ - XRD1621_I4encbC100_orig.cbf$(SEXT) \ - minicbf_orig.h5$(SEXT) -DATADIRS_OUTPUT_SIGNATURES = $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) \ - $(DATADIRS)/adscconverted_orig.cbf$(SEXT) \ - $(DATADIRS)/converted_flat_orig.cbf$(SEXT) \ - $(DATADIRS)/converted_orig.cbf$(SEXT) \ - $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ - $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ - $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ - $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) \ - $(DATADIRS)/testcell_orig.prt$(SEXT) \ - $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) \ - $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) \ - $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRS)/XRD1621_orig.cbf$(SEXT) \ - $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) \ - $(DATADIRS)/minicbf_orig.h5$(SEXT) - -# Fetch Input Data Files - -$(TESTINPUT_BASIC): $(DATADIRI) $(DATADIRI_INPUT_BASIC) - cp $(DATADIRI)/$@ $@ - cp $(DATADIRI)/$@$(SEXT) $@$(SEXT) - -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) - -$(TESTINPUT_EXTRA): $(DATADIRI) $(DATADIRI_INPUT_EXTRA) - cp $(DATADIRI)/$@ $@ - cp $(DATADIRI)/$@$(SEXT) $@$(SEXT) - -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) - - -# Fetch Output Data Files and Signatures - -$(TESTOUTPUT): $(DATADIRO) $(DATADIRO_OUTPUT) $(DATADIRO_OUTPUT_SIGNATURES) - cp $(DATADIRO)/$@ $@ - cp $(DATADIRO)/$@$(SEXT) $@$(SEXT) - -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) - -# Fetch Output Data File Signatures - -$(TESTOUTPUTSIGS): $(DATADIRS) $(DATADIRS_OUTPUT_SIGNATURES) - cp $(DATADIRS)/$@ $@ - - - -# -# Tests -# - - -tests: all $(LIB) $(BIN) symlinksdone basic extra dectristests pycbftests -tests_sigs_only: $(LIB) $(BIN) symlinksdone basic extra_sigs_only -restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 - $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < adscconverted.cbf > $(DATADIRO)/adscconverted_orig.cbf$(SEXT) - $(SIGNATURE) < converted_flat.cbf > $(DATADIRO)/converted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < converted.cbf > $(DATADIRO)/converted_orig.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5 > $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5.cbf > $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) - $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) - $(SIGNATURE) < testcell.prt > $(DATADIRO)/testcell_orig.prt$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRO)/test_xds_bin_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRO)/test_fcb_read_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < XRD1621.cbf > $(DATADIRO)/XRD1621_orig.cbf$(SEXT) - $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) - $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRO)/minicbf_orig.h5$(SEXT) - cp adscconverted_flat.cbf $(DATADIRO)/adscconverted_flat_orig.cbf$ - cp adscconverted.cbf $(DATADIRO)/adscconverted_orig.cbf - cp converted_flat.cbf $(DATADIRO)/converted_flat_orig.cbf - cp converted.cbf $(DATADIRO)/converted_orig.cbf - cp insulin_pilatus6mconverted.cbf.h5 $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5 - cp insulin_pilatus6mconverted.cbf.h5.cbf $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf - cp insulin_pilatus6mconverted_v2.cbf $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf - cp mb_LP_1_001.cbf$ $(DATADIRO)/mb_LP_1_001_orig.cbf - cp testcell.prt $(DATADIRO)/testcell_orig.prt - cp test_xds_bin_testflatout.out $(DATADIRO)/test_xds_bin_testflatout_orig.out - cp test_xds_bin_testflatpackedout.out $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out - cp test_fcb_read_testflatout.out $(DATADIRO)/test_fcb_read_testflatout_orig.out - cp test_fcb_read_testflatpackedout.out $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out - cp XRD1621.cbf $(DATADIRO)/XRD1621_orig.cbf - cp XRD1621_I4encbC100.cbf $(DATADIRO)/XRD1621_I4encbC100_orig.cbf - cp $(MINICBF_TEST)/minicbf.h5 $(DATADIRO)/minicbf_orig.h5 - -restore_sigs_only: $(NEWTESTOUTPUT) $(DATADIRS) - $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < adscconverted.cbf > $(DATADIRS)/adscconverted_orig.cbf$(SEXT) - $(SIGNATURE) < converted_flat.cbf > $(DATADIRS)/converted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < converted.cbf > $(DATADIRS)/converted_orig.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5 > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5.cbf > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) - $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) - $(SIGNATURE) < testcell.prt > $(DATADIRS)/testcell_orig.prt$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < XRD1621.cbf > $(DATADIRS)/XRD1621_orig.cbf$(SEXT) - $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) - $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRS)/minicbf_orig.h5$(SEXT) -restore_signatures: restore_output restore_sigs_only - -# -# Basic Tests -# - -basic: $(BIN)/makecbf $(BIN)/img2cif $(BIN)/cif2cbf $(TESTINPUT_BASIC) - $(LDPREFIX) $(BIN)/makecbf example.mar2300 makecbf.cbf - $(LDPREFIX) $(BIN)/img2cif -c flatpacked -m headers -d digest \ - -e base64 example.mar2300 img2cif_packed.cif - $(LDPREFIX) $(BIN)/img2cif -c canonical -m headers -d digest \ - -e base64 example.mar2300 img2cif_canonical.cif - $(LDPREFIX) $(BIN)/img2cif -c flatpacked -m headers -d digest \ - -e none example.mar2300 img2cif_packed.cbf - $(LDPREFIX) $(BIN)/img2cif -c canonical -m headers -d digest \ - -e none example.mar2300 img2cif_canonical.cbf - $(LDPREFIX) $(BIN)/cif2cbf -e none -c flatpacked \ - img2cif_canonical.cif cif2cbf_packed.cbf - $(LDPREFIX) $(BIN)/cif2cbf -e none -c canonical \ - img2cif_packed.cif cif2cbf_canonical.cbf - -cmp cif2cbf_packed.cbf makecbf.cbf - -cmp cif2cbf_packed.cbf img2cif_packed.cbf - -cmp cif2cbf_canonical.cbf img2cif_canonical.cbf - - -# -# Extra Tests -# -$(MINICBF_TEST)/minicbf.h5: - cd $(MINICBF_TEST); $(LDPREFIX) $(TIME) $(BIN)/minicbf2nexus -c zlib \ - -C config $(HDF5REGISTER) -o minicbf.h5 ../X4_lots_M1S4_1_*.cbf -mb_LP_1_001.cbf: - $(LDPREFIX) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - - - -ifneq ($(F90C),) -extra: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf \ - $(BIN)/minicbf2nexus $(BIN)/cbf2nexus $(BIN)/nexus2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf \ - $(BIN)/testhdf5 $(BIN)/testalloc \ - $(BIN_TESTULP) \ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUT) $(EXAMPLES)/batch_convert_minicbf.sh \ - $(TEMPLATES)/template_X4_lots_M1S4.cbf -else -extra: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf \ - $(BIN)/minicbf2nexus $(BIN)/cbf2nexus $(BIN)/nexus2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf $(BIN)/cbf2adscimg \ - $(BIN)/testhdf5 $(BIN)/testalloc \ - $(BIN_TESTULP) \ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUT) $(EXAMPLES)/batch_convert_minicbf.sh -endif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e hex -c none \ - makecbf.cbf cif2cbf_ehcn.cif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ - cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf -F example.mar2300 converted_flat.cbf - -cmp converted_flat.cbf converted_flat_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf example.mar2300 converted.cbf - -cmp converted.cbf converted_orig.cbf - -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat > testcell.prt - -cmp testcell.prt testcell_orig.prt - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -cmp adscconverted_flat.cbf adscconverted_flat_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -cmp adscconverted.cbf adscconverted_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -cmp mb_LP_1_001.cbf mb_LP_1_001_orig.cbf -ifneq ($(CLEANTESTS),) - mv mb_LP_1_001.cbf nmb_LP_1_001.cbf -else - cp mb_LP_1_001.cbf nmb_LP_1_001.cbf -endif - $(LDPREFIX) $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf - -cmp nmb_LP_1_001.img mb_LP_1_001.img - rm nmb_LP_1_001.cbf -ifneq ($(CLEANTESTS),) - rm nmb_LP_1_001.img -endif - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -cmp insulin_pilatus6mconverted.cbf insulin_pilatus6mconverted_rev_orig.cbf - -$(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -cmp insulin_pilatus6mconverted_v2.cbf insulin_pilatus6mconverted_v2_orig.cbf - (CBF_CONVERT_MINICBF_PATH=$(BIN); export CBF_CONVERT_MINICBF_PATH; \ - $(LDPREFIX) $(EXAMPLES)/batch_convert_minicbf.sh "." "minicbf_test" \ - "X4_lots_M1S4_1_*.cbf" $(TEMPLATES)/template_X4_lots_M1S4.cbf) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w -O $(HDF5REGISTER) -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encI.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encp.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cb -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encb.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cc -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encc.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cz -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encz.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cl -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encl.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -c2 -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(H5DUMP) insulin_pilatus6mconverted_orig.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted_orig.cbf.h5.dump) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(H5DUMP) insulin_pilatus6mconverted.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted.cbf.h5.dump) - -$(DIFF) insulin_pilatus6mconverted_orig.cbf.h5.dump insulin_pilatus6mconverted.cbf.h5.dump - -rm -f insulin_pilatus6mconverted_orig.cbf.h5.dump - -rm -f insulin_pilatus6mconverted.cbf.h5.dump - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_orig.cbf.h5.cbf -o insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf.h5 -o insulin_pilatus6mconverted.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted.cbf.h5.cbf -o insulin_pilatus6mconverted.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encp.cbf.h5 -o insulin_pilatus6mconverted_encp.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encp.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encb.cbf.h5 -o insulin_pilatus6mconverted_encb.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encb.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encI.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encI.cbf.h5.cbf -o insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encc.cbf.h5 -o insulin_pilatus6mconverted_encc.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encc.cbf.h5.cbf -o insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encz.cbf.h5 -o insulin_pilatus6mconverted_encz.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encz.cbf.h5.cbf -o insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encl.cbf.h5 -o insulin_pilatus6mconverted_encl.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encl.cbf.h5.cbf -o insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_enc2.cbf.h5 -o insulin_pilatus6mconverted_enc2.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_enc2.cbf.h5.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -rm -f insulin_pilatus6mconverted*.cbf.h5.eqcI.cbf - $(LDPREFIX) $(TINE) $(BIN)/test_cbf_airy_disk - $(LDPREFIX) $(TIME) $(BIN)/cbf_testxfelread - $(LDPREFIX) $(TIME) $(BIN)/testalloc - $(LDPREFIX) $(TIME) $(BIN)/testhdf5; rm -f testfile.h5 -ifneq ($(CBF_USE_ULP),) - $(LDPREFIX) $(TIME) $(BIN)/testulp -endif - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/minicbf2nexus -c zlib \ - -C config $(HDF5REGISTER) -o minicbf.h5 ../X4_lots_M1S4_1_*.cbf - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) ../minicbf_orig.h5 | $(ALLBUTONE) > minicbf_original.dump - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) minicbf.h5 | $(ALLBUTONE) > minicbf.dump - -cd $(MINICBF_TEST); $(DIFF) minicbf_original.dump minicbf.dump - $(LDPREFIX) cd $(MINICBF_TEST); rm -f minicbf_original.dump - $(LDPREFIX) cd $(MINICBF_TEST); rm -f minicbf.dump - #cd $(MINICBF_TEST); rm -f minicbf.h5 - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/cbf2nexus -c zlib \ - --list -o i19-1.h5 ../1191_00005.cbf - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/nexus2cbf \ - -o i19-1.cbf i19-1.h5 - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/cbf2nexus -c zlib \ - --list -o i19-2.h5 i19-1.cbf - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/nexus2cbf \ - -o i19-2.cbf i19-2.h5 - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) i19-1.h5 | $(ALLBUTONE) > i19-1.dump - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) i19-2.h5 | $(ALLBUTONE) > i19-2.dump - -cd $(MINICBF_TEST); $(DIFF) i19-1.dump i19-2.dump - -cd $(MINICBF_TEST); $(DIFF) i19-1.cbf i19-2.cbf - $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf -ifneq ($(F90C),) - $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatout.out) - -$(DIFF) test_xds_bin_testflatout.out test_xds_bin_testflatout_orig.out - $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatpackedout.out) - -$(DIFF) test_xds_bin_testflatpackedout.out test_xds_bin_testflatpackedout_orig.out - $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatout.out) - -$(DIFF) test_fcb_read_testflatout.out test_fcb_read_testflatout_orig.out - $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatpackedout.out) - -$(DIFF) test_fcb_read_testflatpackedout.out test_fcb_read_testflatpackedout_orig.out -endif - $(LDPREFIX) $(TIME) $(BIN)/sauter_test - $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - -$(DIFF) XRD1621.cbf XRD1621_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(DIFF) XRD1621_I4encbC100.cbf XRD1621_I4encbC100_orig.cbf - -ifneq ($(F90C),) -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf \ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -else -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf\ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -endif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e hex -c none \ - makecbf.cbf cif2cbf_ehcn.cif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ - cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F example.mar2300 converted_flat.cbf - -$(SIGNATURE) < converted_flat.cbf | $(DIFF) - converted_flat_orig.cbf$(SEXT); rm converted_flat.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image example.mar2300 converted.cbf - -$(SIGNATURE) < converted.cbf | $(DIFF) - converted_orig.cbf$(SEXT); rm converted.cbf - -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat | \ - $(SIGNATURE) | $(DIFF) - testcell_orig.prt$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -$(SIGNATURE) < adscconverted_flat.cbf | $(DIFF) - adscconverted_flat_orig.cbf$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -$(SIGNATURE) < adscconverted.cbf | $(DIFF) - adscconverted_orig.cbf$(SEXT); rm adscconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -$(SIGNATURE) < mb_LP_1_001.cbf | $(DIFF) - mb_LP_1_001_orig.cbf$(SEXT) - mv mb_LP_1_001.cbf nmb_LP_1_001.cbf - $(LDPREFIX) $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf - -cmp nmb_LP_1_001.img mb_LP_1_001.img - rm nmb_LP_1_001.cbf - rm nmb_LP_1_001.img - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted.cbf | $(DIFF) - insulin_pilatus6mconverted_rev_orig.cbf$(SEXT); rm insulin_pilatus6mconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf | $(DIFF) - insulin_pilatus6mconverted_v2_orig.cbf$(SEXT); rm insulin_pilatus6mconverted_v2.cbf - $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf -ifneq ($(F90C),) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatpackedout_orig.out$(SEXT) -endif - $(LDPREFIX) $(TIME) $(BIN)/sauter_test - $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(SIGNATURE) < XRD1621.cbf | $(DIFF) - XRD1621_orig.cbf$(SEXT); rm XRD1621.cbf - -$(SIGNATURE) < XRD1621_I4encbC100.cbf | $(DIFF) - XRD1621_I4encbC100_orig.cbf$(SEXT); rm XRD1621_I4encbC100.cbf - @-rm -f adscconverted_flat.cbf - @-rm -f $(TESTINPUT_BASIC) $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) - @-rm -f cif2cbf_packed.cbf makecbf.cbf \ - cif2cbf_packed.cbf img2cif_packed.cbf \ - cif2cbf_canonical.cbf img2cif_canonical.cbf - @-rm -f testrealout.cbf testflatout.cbf testflatpackedout.cbf \ - cif2cbf_encp.cbf img2cif_canonical.cif img2cif_packed.cif 9ins.cbf - - - -pycbftests: $(PYCBF)/_pycbf.$(PYCBFEXT) $(BIN)/cbf_standardize_numbers - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test1.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test2.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test3.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test4.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test1.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test2.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py ../hit-20140306005258847.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test1_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test1.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test2_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test2.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test3_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test3.out - - -pycbfinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfinstall - -pycbfuserinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfuserinstall - -javatests: $(BIN)/ctestcbf $(BIN)/testcbf.class $(SOLIB)/libcbf_wrap.so - $(LDPREFIX) $(BIN)/ctestcbf > testcbfc.txt - $(LDPREFIX) java -cp $(JCBF)/cbflib-$(VERSION).jar:$(BIN) testcbf > testcbfj.txt - $(DIFF) testcbfc.txt testcbfj.txt - -dectristests: $(BIN)/cbf_template_t $(TEMPLATES)/cbf_test_orig.out - $(LDPREFIX) (cd templates; ../bin/cbf_template_t; diff -a -u cbf_test_orig.out cbf_template_t.out) - -# -# Remove all non-source files -# -empty: - @-rm -rf $(LIB)/* - @-rm -rf $(INCLUDE)/bitshuf* - @-rm -rf $(INCLUDE)/bshuf* - @-rm -rf $(INCLUDE)/H5* - @-rm -rf $(BIN)/* - @-rm -f $(PYCBF)/_pycbf.$(PYCBFEXT) - @-rm -rf $(PYCBF)/build/* - @-rm -f $(PYCBF)/newtest1.cbf - @-rm -f $(PYCBF)/fel_test1.out - @-rm -f $(PYCBF)/fel_test2.out - @-rm -f $(PYCBF)/setup.py - @-rm -f $(PYCBF)/setup_MINGW.py - @-rm -f makecbf.cbf - @-rm -f img2cif_packed.cif - @-rm -f img2cif_canonical.cif - @-rm -f img2cif_packed.cbf - @-rm -f img2cif_canonical.cbf - @-rm -f img2cif_raw.cbf - @-rm -f cif2cbf_packed.cbf - @-rm -f cif2cbf_canonical.cbf - @-rm -f converted.cbf - @-rm -f adscconverted.cbf - @-rm -f converted_flat.cbf - @-rm -f adscconverted_flat.cbf - @-rm -f adscconverted_flat_rev.cbf - @-rm -f mb_LP_1_001.cbf - @-rm -f cif2cbf_ehcn.cif - @-rm -f cif2cbf_encp.cbf - @-rm -f 9ins.cbf - @-rm -f 9ins.cif - @-rm -f testcell.prt - @-rm -f example.mar2300 - @-rm -f converted_orig.cbf - @-rm -f adscconverted_orig.cbf - @-rm -f converted_flat_orig.cbf - @-rm -f adscconverted_flat_orig.cbf - @-rm -f adscconverted_flat_rev_orig.cbf - @-rm -f mb_LP_1_001_orig.cbf - @-rm -f insulin_pilatus6mconverted*.cbf - @-rm -f insulin_pilatus6mconverted*.h5 - @-rm -f insulin_pilatus6m.cbf - @-rm -f testrealin.cbf - @-rm -f testrealout.cbf - @-rm -f testflatin.cbf - @-rm -f testflatout.cbf - @-rm -f testflatpackedin.cbf - @-rm -f testflatpackedout.cbf - @-rm -f CTC.cbf - @-rm -f test_fcb_read_testflatout.out - @-rm -f test_fcb_read_testflatpackedout.out - @-rm -f test_xds_bin_testflatpackedout.out - @-rm -f test_xds_bin_testflatout.out - @-rm -f test_fcb_read_testflatout_orig.out - @-rm -f test_fcb_read_testflatpackedout_orig.out - @-rm -f test_xds_bin_testflatpackedout_orig.out - @-rm -f test_xds_bin_testflatout_orig.out - @-rm -f mb_LP_1_001.img - @-rm -f 9ins.cif - @-rm -f testcell_orig.prt - @-rm -f $(DECTRIS_EXAMPLES)/cbf_template_t.out - @-rm -f XRD1621.cbf - @-rm -f XRD1621_orig.cbf - @-rm -f XRD1621_I4encbC100_orig.cbf - @-rm -f XRD1621_I4encbC100.cbf - @-rm -f minicbf_orig.h5 - @-rm -f $(SRC)/fcb_exit_binary.f90 - @-rm -f $(SRC)/fcb_next_binary.f90 - @-rm -f $(SRC)/fcb_open_cifin.f90 - @-rm -f $(SRC)/fcb_packed.f90 - @-rm -f $(SRC)/fcb_read_bits.f90 - @-rm -f $(SRC)/fcb_read_image.f90 - @-rm -f $(SRC)/fcb_read_xds_i2.f90 - @-rm -f $(EXAMPLES)/test_fcb_read_image.f90 - @-rm -f $(EXAMPLES)/test_xds_binary.f90 - @-rm -f symlinksdone - @-rm -f $(TESTOUTPUT) *$(SEXT) - @-rm -rf $(SOLIB) - @-rm -rf org - @-rm -rf $(JCBF) - @-rm -rf $(REGEX) - @-rm -rf $(REGEX)_install - @-rm -rf $(TIFF) - @-rm -rf $(TIFF)_install - @-rm -rf $(HDF5) - @-rm -rf $(HDF5)_install - @-rm -rf $(INCLUDE)/tiff* - @-rm -rf $(INCLUDE)/H5* - @-rm -rf $(INCLUDE)/hdf5* - @-rm -rf share - @-rm -rf $(MINICBF_TEST)/i19* - @-rm -rf solib - @-rm -f thaumatin_die_M1S5_1_0005_2.cbf - @-rm -f 1191_00005.cbf - @-rm -f XRD1621.tif - @-rm -f md5tmp - @-rm -rf $(PYCBF)/build - @-rm -f *_old - @-rm -f X4_lots_M1S4_1_*.cbf - @-rm -f testfile.h5 - @-rm -f hit-20140306005258847.cbf - @-rm -f build_* - ./.undosymlinks - -# -# Remove temporary files -# -clean: - @-rm -f core - @-rm -f *.o - @-rm -f *.u -# -# Restore to distribution state -# -distclean: clean empty - -# -# Create a Tape Archive for distribution -# - -tar: $(DOCUMENTS) $(SOURCE) $(SRC)/cbf.stx $(HEADERS) $(M4FILES)\ - $(EXAMPLES) \ - README.html README Makefile \ - $(JPEGS) - -/bin/rm -f CBFlib.tar* - tar cvBf CBFlib.tar \ - $(DOCUMENTS) $(SOURCE) $(SRC)/cbf.stx $(HEADERS) $(M4FILES)\ - $(EXAMPLES) \ - README.html README Makefile \ - $(JPEGS) - gzip --best CBFlib.tar - diff --git a/Makefile_OSX_gcc42_DMALLOC b/Makefile_OSX_gcc42_DMALLOC deleted file mode 100644 index 56ba37c5..00000000 --- a/Makefile_OSX_gcc42_DMALLOC +++ /dev/null @@ -1,2646 +0,0 @@ - -###################################################################### -# Makefile - command file for make to create CBFlib # -# # -# Version 0.9.6 19 May 2020 # -# # -# Paul Ellis and # -# Herbert J. Bernstein (yaya@bernstein-plus-sons.com) # -# # -# (C) Copyright 2006 - 2020 Herbert J. Bernstein # -# # -###################################################################### - -###################################################################### -# # -# YOU MAY REDISTRIBUTE THE CBFLIB PACKAGE UNDER THE TERMS OF THE GPL # -# # -# ALTERNATIVELY YOU MAY REDISTRIBUTE THE CBFLIB API UNDER THE TERMS # -# OF THE LGPL # -# # -###################################################################### - -########################### GPL NOTICES ############################## -# # -# This program is free software; you can redistribute it and/or # -# modify it under the terms of the GNU General Public License as # -# published by the Free Software Foundation; either version 2 of # -# (the License, or (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program; if not, write to the Free Software # -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # -# 02111-1307 USA # -# # -###################################################################### - -######################### LGPL NOTICES ############################### -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of the GNU Lesser General Public # -# License as published by the Free Software Foundation; either # -# version 2.1 of the License, or (at your option) any later version. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # -# Lesser General Public License for more details. # -# # -# You should have received a copy of the GNU Lesser General Public # -# License along with this library; if not, write to the Free # -# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # -# MA 02110-1301 USA # -# # -###################################################################### - -###################################################################### -# # -# Stanford University Notices # -# for the CBFlib software package that incorporates SLAC software # -# on which copyright is disclaimed # -# # -# This software # -# ------------- # -# The term "this software", as used in these Notices, refers to # -# those portions of the software package CBFlib that were created by # -# employees of the Stanford Linear Accelerator Center, Stanford # -# University. # -# # -# Stanford disclaimer of copyright # -# -------------------------------- # -# Stanford University, owner of the copyright, hereby disclaims its # -# copyright and all other rights in this software. Hence, anyone # -# may freely use it for any purpose without restriction. # -# # -# Acknowledgement of sponsorship # -# ------------------------------ # -# This software was produced by the Stanford Linear Accelerator # -# Center, Stanford University, under Contract DE-AC03-76SFO0515 with # -# the Department of Energy. # -# # -# Government disclaimer of liability # -# ---------------------------------- # -# Neither the United States nor the United States Department of # -# Energy, nor any of their employees, makes any warranty, express or # -# implied, or assumes any legal liability or responsibility for the # -# accuracy, completeness, or usefulness of any data, apparatus, # -# product, or process disclosed, or represents that its use would # -# not infringe privately owned rights. # -# # -# Stanford disclaimer of liability # -# -------------------------------- # -# Stanford University makes no representations or warranties, # -# express or implied, nor assumes any liability for the use of this # -# software. # -# # -# Maintenance of notices # -# ---------------------- # -# In the interest of clarity regarding the origin and status of this # -# software, this and all the preceding Stanford University notices # -# are to remain affixed to any copy or derivative of this software # -# made or distributed by the recipient and are to be affixed to any # -# copy of software made or distributed by the recipient that # -# contains a copy or derivative of this software. # -# # -# Based on SLAC Software Notices, Set 4 # -# OTT.002a, 2004 FEB 03 # -###################################################################### - - - -###################################################################### -# NOTICE # -# Creative endeavors depend on the lively exchange of ideas. There # -# are laws and customs which establish rights and responsibilities # -# for authors and the users of what authors create. This notice # -# is not intended to prevent you from using the software and # -# documents in this package, but to ensure that there are no # -# misunderstandings about terms and conditions of such use. # -# # -# Please read the following notice carefully. If you do not # -# understand any portion of this notice, please seek appropriate # -# professional legal advice before making use of the software and # -# documents included in this software package. In addition to # -# whatever other steps you may be obliged to take to respect the # -# intellectual property rights of the various parties involved, if # -# you do make use of the software and documents in this package, # -# please give credit where credit is due by citing this package, # -# its authors and the URL or other source from which you obtained # -# it, or equivalent primary references in the literature with the # -# same authors. # -# # -# Some of the software and documents included within this software # -# package are the intellectual property of various parties, and # -# placement in this package does not in any way imply that any # -# such rights have in any way been waived or diminished. # -# # -# With respect to any software or documents for which a copyright # -# exists, ALL RIGHTS ARE RESERVED TO THE OWNERS OF SUCH COPYRIGHT. # -# # -# Even though the authors of the various documents and software # -# found here have made a good faith effort to ensure that the # -# documents are correct and that the software performs according # -# to its documentation, and we would greatly appreciate hearing of # -# any problems you may encounter, the programs and documents any # -# files created by the programs are provided **AS IS** without any * -# warranty as to correctness, merchantability or fitness for any # -# particular or general use. # -# # -# THE RESPONSIBILITY FOR ANY ADVERSE CONSEQUENCES FROM THE USE OF # -# PROGRAMS OR DOCUMENTS OR ANY FILE OR FILES CREATED BY USE OF THE # -# PROGRAMS OR DOCUMENTS LIES SOLELY WITH THE USERS OF THE PROGRAMS # -# OR DOCUMENTS OR FILE OR FILES AND NOT WITH AUTHORS OF THE # -# PROGRAMS OR DOCUMENTS. # -###################################################################### - -###################################################################### -# # -# The IUCr Policy # -# for the Protection and the Promotion of the STAR File and # -# CIF Standards for Exchanging and Archiving Electronic Data # -# # -# Overview # -# # -# The Crystallographic Information File (CIF)[1] is a standard for # -# information interchange promulgated by the International Union of # -# Crystallography (IUCr). CIF (Hall, Allen & Brown, 1991) is the # -# recommended method for submitting publications to Acta # -# Crystallographica Section C and reports of crystal structure # -# determinations to other sections of Acta Crystallographica # -# and many other journals. The syntax of a CIF is a subset of the # -# more general STAR File[2] format. The CIF and STAR File approaches # -# are used increasingly in the structural sciences for data exchange # -# and archiving, and are having a significant influence on these # -# activities in other fields. # -# # -# Statement of intent # -# # -# The IUCr's interest in the STAR File is as a general data # -# interchange standard for science, and its interest in the CIF, # -# a conformant derivative of the STAR File, is as a concise data # -# exchange and archival standard for crystallography and structural # -# science. # -# # -# Protection of the standards # -# # -# To protect the STAR File and the CIF as standards for # -# interchanging and archiving electronic data, the IUCr, on behalf # -# of the scientific community, # -# # -# # holds the copyrights on the standards themselves, * -# # -# # owns the associated trademarks and service marks, and * -# # -# # holds a patent on the STAR File. * -# # -# These intellectual property rights relate solely to the # -# interchange formats, not to the data contained therein, nor to # -# the software used in the generation, access or manipulation of # -# the data. # -# # -# Promotion of the standards # -# # -# The sole requirement that the IUCr, in its protective role, # -# imposes on software purporting to process STAR File or CIF data # -# is that the following conditions be met prior to sale or # -# distribution. # -# # -# # Software claiming to read files written to either the STAR * -# File or the CIF standard must be able to extract the pertinent # -# data from a file conformant to the STAR File syntax, or the CIF # -# syntax, respectively. # -# # -# # Software claiming to write files in either the STAR File, or * -# the CIF, standard must produce files that are conformant to the # -# STAR File syntax, or the CIF syntax, respectively. # -# # -# # Software claiming to read definitions from a specific data * -# dictionary approved by the IUCr must be able to extract any # -# pertinent definition which is conformant to the dictionary # -# definition language (DDL)[3] associated with that dictionary. # -# # -# The IUCr, through its Committee on CIF Standards, will assist # -# any developer to verify that software meets these conformance # -# conditions. # -# # -# Glossary of terms # -# # -# [1] CIF: is a data file conformant to the file syntax defined # -# at http://www.iucr.org/iucr-top/cif/spec/index.html # -# # -# [2] STAR File: is a data file conformant to the file syntax # -# defined at http://www.iucr.org/iucr-top/cif/spec/star/index.html # -# # -# [3] DDL: is a language used in a data dictionary to define data # -# items in terms of "attributes". Dictionaries currently approved # -# by the IUCr, and the DDL versions used to construct these # -# dictionaries, are listed at # -# http://www.iucr.org/iucr-top/cif/spec/ddl/index.html # -# # -# Last modified: 30 September 2000 # -# # -# IUCr Policy Copyright (C) 2000 International Union of # -# Crystallography # -###################################################################### - -.DELETE_ON_ERROR: - -# Version string -VERSION = 0.9.6 - -# -# Directories -# -ROOT = $(PWD) -LIB = $(ROOT)/lib -SOLIB = $(ROOT)/solib -JCBF = $(ROOT)/jcbf -JAVADIR = $(ROOT)/java -BIN = $(ROOT)/bin -SRC = $(ROOT)/src -INCLUDE = $(ROOT)/include -M4 = $(ROOT)/m4 -PYCBF = $(ROOT)/pycbf -EXAMPLES = $(ROOT)/examples -TEMPLATES= $(ROOT)/templates -DECTRIS_EXAMPLES = $(EXAMPLES)/dectris_cbf_template_test -DOC = $(ROOT)/doc -MINICBF_TEST = $(ROOT)/minicbf_test -GRAPHICS = $(ROOT)/html_graphics -DATADIRI = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Input -DATADIRO = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output -DATADIRS = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only -CBF_PREFIX ?= $(HOME) - -# -# Comment out the next line if scratch test files should be retained -# -CLEANTESTS = yes - - -MSYS2=no -CBFLIB_DONT_USE_LOCAL_HDF5?=no -CBFLIB_DONT_USE_LZ4?=no -CBFLIB_DONT_USE_BSHUF?=no - - -CBFLIB_DONT_HAVE_FGETLN ?= yes -ifeq ($(CBFLIB_DONT_HAVE_FGETLN),yes) -SRC_FGETLN = $(SRC)/fgetln.c -else -SRC_FGETLN = -endif - - -CBFLIB_DONT_USE_PYCIFRW ?= no -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -# -# Definitions to get versions of PyCifRW and PLY -# -PYCIFRW ?= PyCifRW-4.1 -PLY = ply-3.2 -PYCIFRWFLAG = -DCBF_USE_PYCIFRW -PYCIFRW_PREFIX ?= $(HOME)/.local -endif - -# -# Definition to get a version of tifflib to support tiff2cbf -# -TIFF ?= tiff-4.0.6_rev_3Nov16 -TIFF_PREFIX ?= $(PWD) -TIFF_INSTALL = $(TIFF)_INSTALL - - -# -# Definitions to get a version of HDF5 -# - -ifneq ($(HDF5_PREFIX),) # already installed on system -CBFLIB_DONT_USE_LOCAL_HDF5 = yes -endif - -ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes) -HDF5_PREFIX ?= $(PWD) -HDF5 ?= hdf5-1.10.6 -#HDF5 = hdf5-1.8.18 -#HDF5 = hdf5-1.10.5 -HDF5dep = $(HDF5) -HDF5_INSTALL = $(HDF5)_INSTALL -ifneq ($(MSYS2),yes) -HDF5LIBS_LOCAL = $(LIB)/libhdf5.a -HDF5LIBS_SYSTEM = -lz -ldl -HDF5SOLIBS_LOCAL = -L$(LIB) -lhdf5 -HDF5SOLIBS_SYSTEM = -lz -else -HDF5LIBS_LOCAL = -L$(LIB) -lhdf5 -lhdf5.dll -HDF5LIBS_SYSTEM = -lz -ldl -HDF5SOLIBS_LOCAL = -L$(LIB) -lhdf5 -lhdf5.dll -HDF5SOLIBS_SYSTEM = -lz -endif -else -HDF5 = -HDF5dep = -HDF5_INSTALL = -HDF5LIBS_LOCAL = -ifneq ($(HDF5_PREFIX),) -HDF5lib = -L$(HDF5_PREFIX)/lib -endif -ifneq ($(MSYS2),yes) -HDF5LIBS_SYSTEM = $(HDF5lib) -lhdf5 -lz -ldl -HDF5SOLIBS_LOCAL = -HDF5SOLIBS_SYSTEM = $(HDF5lib) -lhdf5 -lz -else -HDF5LIBS_SYSTEM = $(HDF5lib) -lhdf5 -lhdf5.dll -lz -ldl -HDF5SOLIBS_LOCAL = -HDF5SOLIBS_SYSTEM = $(HDF5lib) -lhdf5 -lhdf5.dll -lz -endif -endif - -HDF5REGISTER ?= --register manual -ifneq ($(HDF5_PREFIX),) -HDF5include = -I$(HDF5_PREFIX)/include -endif - -ifneq ($(MSYS2),yes) -H5DUMP = $(HDF5_PREFIX)/bin/h5dump -else -H5DUMP = /MINGW32/bin/h5dump -endif - - -CBFLIB_DONT_USE_LZ4 ?= no -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -# -# Definitions to get a version of HDF5Plugin for LZ4 -# -ifneq ($(MSYS2),yes) -LZ4 ?= HDF5Plugin_14Aug20 -else -LZ4 ?= HDF5-External-Filter-Plugins -endif -LZ4dep = $(LZ4) -LZ4src = $(LZ4)/src -LZ4include = $(LZ4)/include -LZ4SOLIBS = -L$(SOLIB) -lh5zlz4 -else -LZ4SOLIBS = -LZ4dep = -endif - -CBFLIB_DONT_USE_BSHUF ?= no -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -# -# Definitions to get a version of HDF5Plugin for BSHUFFLE WITH LZ4 -# -BSHUF ?= bitshuffle-0.2.2.1_15Jun16 -BSUFdep = $(BSHUF) -BSHUFsrc = $(BSHUF)/src -BSHUFinclude = $(BSHUF)/src -BSHUFSOLIBS = -L$(SOLIB) -lh5zbshuf -BSHUFFILTER = libbshuf_h5filter -else -BSHUFSOLIBS = -BSHUFdep = -endif - -CBFLIB_DONT_USE_BLOSC ?= no -ifneq ($(CBFLIB_DONT_USE_BLOSC),yes) -# -# Definitions to get a version of HDF5Plugin for BLOSC -# -BLOSC = ?c-blosc_4Sep16.tar.gz -BLOSCdep = $(BLOSC) -BLOSCFILTER = hdf5-blosc_2Sep16.tar.gz -BLOSCsrc = $(BLOSC)/src -BLOSCinclude = $(BLOSC)/src -BLOSCSOLIBS = -L$(SOLIB) -lh5zbshuf -BLOSCFILTER = libbshuf_h5filter -else -BLOSCSOLIBS = -BLOSCdep = -endif - - - -# -# Definition of python to use -# -#PYTHON = python -PYTHON ?= python2 - - -# -# Definitions to get a stable version of regex -# -REGEX_PREFIX ?= $(PWD) -ifneq ($(REGEX_PREFIX),$(PWD)) -CBFLIB_DONT_USE_LOCAL_REGEX ?= yes -endif - - -REGEX_LIBDIR ?= $(REGEX_PREFIX)/lib -ifneq ($(CBFLIB_DONT_USE_LOCAL_REGEX),yes) -REGEX ?= pcre-8.38 -REGEXDEP = $(REGEX) -REGEX_INSTALL = $(REGEX)_INSTALL -REGEX_LIB ?= pcreposix -REGEX_LIB2 ?= pcre -ifneq ($(MSYS2),yes) -REGEX_LIBS ?= -L $(REGEX_LIBDIR) -l$(REGEX_LIB) -l$(REGEX_LIB2) -REGEX_LIBS_STATIC = $(LIB)/libpcreposix.a $(LIB)/libpcre.a -else -REGEX_LIBS ?= -L $(REGEX_LIBDIR) -l$(REGEX_LIB) -l$(REGEX_LIB).dll -l$(REGEX_LIB2) -l$(REGEX_LIB2).dll -REGEX_LIBS_STATIC = $(REGEX_LIBS) -endif -REGEX_INCLUDES ?= -I $(REGEX_PREFIX) -else -REGEX = -REGEXDEP = -REGEX_INSTALL = -REGEX_LIB ?= -REGEX_LIB2 ?= -REGEX_LIBS ?= -REGEX_INCLUDES ?= -endif - - -# Program to use to retrieve a URL - -DOWNLOAD ?= wget -N -#DOWNLOAD ?= curl -O -L - -# Flag to control symlinks versus copying - -SLFLAGS = --use_ln -LN = ln -s -f - -# -# Program to use to pack shars -# -SHAR = /usr/bin/shar -#SHAR = /usr/local/bin/gshar - -# -# Program to use to create archives -# -AR = /usr/bin/ar - -# -# Program to use to add an index to an archive -# -RANLIB = /usr/bin/ranlib - - -# -# Program to use to generate a signature -# -#SIGNATURE ?= /usr/bin/openssl dgst -md5 -#SIGNATURE ?= (/usr/bin/openssl dgst -md5 | sed "s/^.*= //") -SIGNATURE ?= ( cat > md5tmp; cmake -E md5sum md5tmp| sed "s/ .*//") - -# -# Pipe command to extract all but the first line of a text file -# -ALLBUTONE = tail -n +2 - - -# -# Extension for signatures of files -# -SEXT = .md5 - -# Default shell - -SHELL = bash - -# call to time a command - -#TIME = -#TIME = time - -# -# Program to display differences between files -# -DIFF = diff -u -b - - -# -# Program to generate wrapper classes for Python -# -PYSWIG = swig -python - -# -# Program to generate wrapper classes for Java -# -JSWIG = swig -java - -# -# Program to generate LaTex and HTML program documentation -# - -NUWEB = nuweb - -# -# Compiler for Java -# -JAVAC = javac - -# -# Java archiver for compiled classes -# -JAR = jar - -# -# Java SDK root directory -# -ifeq ($(JDKDIR),) - JDKDIR = /usr/lib/java -endif - -ifneq ($(CBF_DONT_USE_LONG_LONG),) -NOLLFLAG = -DCBF_DONT_USE_LONG_LONG -else -NOLLFLAG = -endif - -ifneq ($(CBF_NO_REGEX),) -CBF_REGEXFLAG = -DCBF_NO_REGEX -else -CBF_REGEXFLAG = -DCBF_REGEXLIB_REGEX -endif - -ifneq ($(CBF_USE_ULP),) -ULPFLAG = -DCBF_USE_ULP -else -ULPFLAG = -endif - -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -LZ4FLAG = -DCBF_H5Z_USE_LZ4 -else -LZ4FLAG = -endif - -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -BSHUFFLAG = -DCBF_H5Z_USE_BSHUF -else -BSHUFFLAG = -endif - - - -MISCFLAG = $(NOLLFLAG) $(ULPFLAG) - -# -# PYCBF definitions -# -PYCBFEXT = so -PYCBFBOPT = -PYCBFIOPT = -SETUP_PY = setup.py -INSTALLSETUP_PY = installsetup.py - -# -# Set the compiler and flags -# - -######################################################### -# -# Appropriate compiler definitions for MAC OS X -# with gcc 4.2 and DMALLOC -# Also change defintion of DOWNLOAD -# -######################################################### -CC = gcc -C++ = g++ -CFLAGS = -g -O2 -Wall -ansi -pedantic -DDMALLOC -DDMALLOC_FUNC_CHECK -I$(HOME)/include -LDFLAGS = -F90C = gfortran -F90FLAGS = -g -fno-range-check -F90LDFLAGS = -bind_at_load -SOCFLAGS = -fPIC -SOLDFLAGS = -shared -Wl,-rpath,$(CBF_PREFIX)/lib -JAVAINCLUDES = -I$(JDKDIR)/include -I$(JDKDIR)/include/linux -LDPREFIX = DYLD_LIBRARY_PATH=$(SOLIB):$$DYLD_LIBRARY_PATH;export DYLD_LIBRARY_PATH; -RUNLDPREFIX = DYLD_LIBRARY_PATH=$(CBF_PREFIX)/lib:$$DYLD_LIBRARY_PATH;export DYLD_LIBRARY_PATH; -EXTRALIBS = -lm -L$(HOME)/lib -ldmalloc -M4FLAGS = -Dfcb_bytes_in_rec=131072 -TIME = time -# Default environment variable for dynamic library load path -DLLVAR = DYLD_LIBRARY_PATH -DOWNLOAD = /sw/bin/wget -N - -ifneq ($(NOFORTRAN),) -F90C = -endif - -# -# URLs from which to retrieve the data directories -# -DATAURLBASE = http://downloads.sf.net/cbflib/ -DATAURLI = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Input.tar.gz -DATAURLO = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output.tar.gz -DATAURLS = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz - -# -# URLs from which to retrieve needed external package snapshots -# -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWURL = http://downloads.sf.net/cbflib/$(PYCIFRW).tar.gz -PLYURL = http://www.dabeaz.com/ply/$(PLY).tar.gz -endif -REGEX_URL ?= http://downloads.sf.net/cbflib/$(REGEX).tar.gz -TIFF_URL ?= http://downloads.sf.net/cbflib/$(TIFF).tar.gz -HDF5_URL ?= http://downloads.sf.net/cbflib/$(HDF5).tar.gz -ifneq ($(MSYS2),yes) -LZ4_URL = http://downloads.sf.net/cbflib/$(LZ4).tar.gz -else -LZ4_URL = http://www.github.com/yayahjb/$(LZ4).git -endif -BSHUFURL = http://downloads.sf.net/cbflib/$(BSHUF).tar.gz - - -# -# Include directories -# -INCLUDES = -I$(INCLUDE) -I$(SRC) $(HDF5include) - -# -# runtime library path export commands -# -RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export LD_LIBRARY_PATH; \ - DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export DYLD_LIBRARY_PATH; \ - LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib;export LD_RUN_PATH; - - -###################################################################### -# You should not need to make modifications below this line # -###################################################################### - -ifneq ($(CBF_USE_ULP),) -SRC_CBF_ULP_C = $(SRC)/cbf_ulp.c -INCLUDE_CBF_ULP_H = $(INCLUDE)/cbf_ulp.h -BIN_TESTULP = $(BIN)/testulp -else -SRC_CBF_ULP_C = -INCLUyDE_CBF_ULP_H = -BIN_TESTULP = -endif - -ifneq ($(MSYS2),yes) -SRC_REALPATH = -else -SRC_REALPATH = $(SRC)/realpath.c -endif - - -# -# Suffixes of files to be used or built -# -.SUFFIXES: .c .o .f90 .m4 - -.m4.f90: - m4 -P $(M4FLAGS) $< > $@ - -ifneq ($(F90C),) -.f90.o: - $(F90C) $(F90FLAGS) -c $< -o $@ -endif - - -# -# Common dependencies -# -COMMONDEP = $(M4)/Makefile.m4 - -# -# Source files -# - -SOURCE = $(SRC)/cbf.c \ - $(SRC)/cbf_airy_disk.c \ - $(SRC)/cbf_alloc.c \ - $(SRC)/cbf_ascii.c \ - $(SRC)/cbf_binary.c \ - $(SRC)/cbf_byte_offset.c \ - $(SRC)/cbf_canonical.c \ - $(SRC)/cbf_codes.c \ - $(SRC)/cbf_compress.c \ - $(SRC)/cbf_context.c \ - $(SRC)/cbf_copy.c \ - $(SRC)/cbf_file.c \ - $(SRC)/cbf_getopt.c \ - $(SRC)/cbf_hdf5.c \ - $(SRC)/cbf_hdf5_filter.c \ - $(SRC)/cbf_lex.c \ - $(SRC)/cbf_minicbf_header.c\ - $(SRC)/cbf_nibble_offset.c \ - $(SRC)/cbf_packed.c \ - $(SRC)/cbf_predictor.c \ - $(SRC)/cbf_read_binary.c \ - $(SRC)/cbf_read_mime.c \ - $(SRC)/cbf_simple.c \ - $(SRC)/cbf_string.c \ - $(SRC)/cbf_stx.c \ - $(SRC)/cbf_tree.c \ - $(SRC_CBF_ULP_C) \ - $(SRC)/cbf_uncompressed.c \ - $(SRC)/cbf_write.c \ - $(SRC)/cbf_write_binary.c \ - $(SRC)/cbf_ws.c \ - $(SRC)/cbff.c \ - $(SRC)/md5c.c \ - $(SRC)/img.c \ - $(SRC_FGETLN) $(SRC_REALPATH) - -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYSOURCE = $(SRC)/drel_lex.py \ - $(SRC)/drel_yacc.py \ - $(SRC)/drelc.py \ - $(SRC)/drel_prep.py -endif - -F90SOURCE = $(SRC)/fcb_atol_wcnt.f90 \ - $(SRC)/fcb_ci_strncmparr.f90 \ - $(SRC)/fcb_exit_binary.f90 \ - $(SRC)/fcb_nblen_array.f90 \ - $(SRC)/fcb_next_binary.f90 \ - $(SRC)/fcb_open_cifin.f90 \ - $(SRC)/fcb_packed.f90 \ - $(SRC)/fcb_read_bits.f90 \ - $(SRC)/fcb_read_byte.f90 \ - $(SRC)/fcb_read_image.f90 \ - $(SRC)/fcb_read_line.f90 \ - $(SRC)/fcb_read_xds_i2.f90 \ - $(SRC)/fcb_skip_whitespace.f90 - - -# -# Header files -# -HEADERS = $(INCLUDE)/cbf.h \ - $(INCLUDE)/cbf_airy_disk.h \ - $(INCLUDE)/cbf_alloc.h \ - $(INCLUDE)/cbf_ascii.h \ - $(INCLUDE)/cbf_binary.h \ - $(INCLUDE)/cbf_byte_offset.h \ - $(INCLUDE)/cbf_canonical.h \ - $(INCLUDE)/cbf_codes.h \ - $(INCLUDE)/cbf_compress.h \ - $(INCLUDE)/cbf_context.h \ - $(INCLUDE)/cbf_copy.h \ - $(INCLUDE)/cbf_file.h \ - $(INCLUDE)/cbf_getopt.h \ - $(INCLUDE)/cbf_hdf5.h \ - $(INCLUDE)/cbf_hdf5_filter.h \ - $(INCLUDE)/cbf_lex.h \ - $(INCLUDE)/cbf_minicbf_header.h\ - $(INCLUDE)/cbf_nibble_offset.h \ - $(INCLUDE)/cbf_packed.h \ - $(INCLUDE)/cbf_predictor.h \ - $(INCLUDE)/cbf_read_binary.h \ - $(INCLUDE)/cbf_read_mime.h \ - $(INCLUDE)/cbf_simple.h \ - $(INCLUDE)/cbf_string.h \ - $(INCLUDE)/cbf_stx.h \ - $(INCLUDE)/cbf_tree.h \ - $(INCLUDE)/cbf_uncompressed.h \ - $(INCLUDE_CBF_ULP_H) \ - $(INCLUDE)/cbf_write.h \ - $(INCLUDE)/cbf_write_binary.h \ - $(INCLUDE)/cbf_ws.h \ - $(INCLUDE)/global.h \ - $(INCLUDE)/cbff.h \ - $(INCLUDE)/md5.h \ - $(INCLUDE)/img.h - -# -# m4 macro files -# -M4FILES = $(M4)/fcblib_defines.m4 \ - $(M4)/fcb_exit_binary.m4 \ - $(M4)/fcb_next_binary.m4 \ - $(M4)/fcb_open_cifin.m4 \ - $(M4)/fcb_packed.m4 \ - $(M4)/fcb_read_bits.m4 \ - $(M4)/fcb_read_image.m4 \ - $(M4)/fcb_read_xds_i2.m4 \ - $(M4)/test_fcb_read_image.m4 \ - $(M4)/test_xds_binary.m4 - - -# -# Documentation files -# -DOCUMENTS = $(DOC)/CBFlib.html \ - $(DOC)/CBFlib.txt \ - $(DOC)/CBFlib_NOTICES.html \ - $(DOC)/CBFlib_NOTICES.txt \ - $(DOC)/ChangeLog \ - $(DOC)/ChangeLog.html \ - $(DOC)/MANIFES \ - $(DOC)/gpl.txt $(DOC)/lgpl.txt - -# -# HTML Graphics files -# -JPEGS = $(GRAPHICS)/CBFbackground.jpg \ - $(GRAPHICS)/CBFbig.jpg \ - $(GRAPHICS)/CBFbutton.jpg \ - $(GRAPHICS)/cbflibbackground.jpg\ - $(GRAPHICS)/cbflibbig.jpg \ - $(GRAPHICS)/cbflibbutton.jpg \ - $(GRAPHICS)/cifhome.jpg \ - $(GRAPHICS)/iucrhome.jpg \ - $(GRAPHICS)/noticeButton.jpg - - -# -# Default: instructions -# -default: - @echo ' ' - @echo '***************************************************************' - @echo ' ' - @echo ' PLEASE READ README and doc/CBFlib_NOTICES.txt' - @echo ' ' - @echo ' Before making the CBF library and example programs, check' - @echo ' that the C compiler name and flags are correct:' - @echo ' ' - @echo ' The current values are:' - @echo ' ' - @echo ' $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(PYCIFRWFLAG)' - @echo ' ' - @echo ' Before installing the CBF library and example programs, check' - @echo ' that the install directory is correct:' - @echo ' ' - @echo ' The current value :' - @echo ' ' - @echo ' $(CBF_PREFIX) ' - @echo ' ' - @echo ' To compile the CBF library and example programs type:' - @echo ' ' - @echo ' make clean' - @echo ' make all' - @echo ' ' - @echo ' To compile the CBF library as a shared object library, type:' - @echo ' ' - @echo ' make shared' - @echo ' ' - @echo ' To compile the Java wrapper classes for CBF library, type:' - @echo ' ' - @echo ' make javawrapper' - @echo ' ' - @echo ' To run a set of tests type:' - @echo ' ' - @echo ' make tests' - @echo ' ' - @echo ' To run some java tests type:' - @echo ' ' - @echo ' make javatests' - @echo ' ' - @echo ' The tests assume that several data files are in the directories' - @echo ' $(DATADIRI) and $(DATADIRO)' - @echo ' ' - @echo ' Alternatively tests can be run comparing MD5 signatures only by' - @echo ' ' - @echo ' make tests_sigs_only' - @echo ' ' - @echo ' These signature only tests save space and download time by' - @echo ' assuming that input data files and the output signatures' - @echo ' are in the directories' - @echo ' $(DATADIRI) and $(DATADIRS)' - @echo ' ' - @echo ' These directory can be obtained from' - @echo ' ' - @echo ' $(DATAURLI) ' - @echo ' $(DATAURLO) ' - @echo ' $(DATAURLS) ' - @echo ' ' - @echo ' To clean up the directories type:' - @echo ' ' - @echo ' make clean' - @echo ' ' - @echo ' To install the library and binaries type:' - @echo ' ' - @echo ' make install' - @echo ' ' - @echo '***************************************************************' - @echo ' ' - -# -# Compile the library and examples -# -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEPS = $(PYCIFRW) $(PLY) -else -PYCIFRWDEPS = -endif - -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -LZ4DEPS = $(LZ4) -else -LZ4DEPS = -endif - -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -BSHUFDEPS = $(BSHUF) -else -BSHUFDEPS = -endif - - -all:: $(BIN) $(SOURCE) $(F90SOURCE) $(HEADERS) \ - $(HDF5) \ - $(LZ4DEPS) \ - $(BSHUFDEPS) \ - $(PYCIFRWDEPS) \ - symlinksdone \ - $(REGEXDEP) \ - $(LIB) \ - $(LIB)/libcbf.a \ - $(LIB)/libfcb.a \ - $(LIB)/libimg.a \ - $(BIN)/adscimg2cbf \ - $(BIN)/arvai_test \ - $(BIN)/cbf2adscimg \ - $(BIN)/cbf2nexus \ - $(BIN)/cif2c \ - $(BIN)/cif2cbf \ - $(BIN)/cbf_standardize_numbers \ - $(BIN)/convert_image \ - $(BIN)/convert_minicbf\ - $(BIN)/img2cif \ - $(BIN)/makecbf \ - $(BIN)/minicbf2nexus \ - $(BIN)/nexus2cbf \ - $(BIN)/roi_peaksearch \ - $(BIN)/sequence_match \ - $(BIN)/testcell \ - $(BIN)/testalloc \ - $(BIN)/testreals \ - $(BIN)/testflat \ - $(BIN)/testflatpacked \ - $(BIN)/testhdf5 \ - $(BIN_TESTULP) \ - $(BIN)/tiff2cbf \ - $(BIN)/test_cbf_airy_disk \ - $(BIN)/cbf_testxfelread - -ifneq ($(F90C),) -all:: $(BIN)/test_xds_binary \ - $(BIN)/test_fcb_read_image -endif - -shared: $(SOLIB)/libcbf.so $(SOLIB)/libfcb.so $(SOLIB)/libimg.so - -javawrapper: shared $(JCBF) $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so - -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEF = -Dcbf_use_pycifrw=yes -else -PYCIFRWDEF = -endif - - -Makefiles: Makefile \ - Makefile_LINUX \ - Makefile_LINUX_64 \ - Makefile_LINUX_gcc42 \ - Makefile_LINUX_DMALLOC \ - Makefile_LINUX_gcc42_DMALLOC \ - Makefile_OSX \ - Makefile_OSX_gcc42 \ - Makefile_OSX_gcc42_DMALLOC \ - Makefile_AIX \ - Makefile_MINGW \ - Makefile_MSYS2 \ - Makefile_IRIX_gcc - - -Makefile_LINUX: $(M4)/Makefile.m4 - -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX $(M4)/Makefile.m4 > Makefile_LINUX.tmp - mv Makefile_LINUX.tmp Makefile_LINUX - -Makefile_LINUX_DMALLOC: $(M4)/Makefile.m4 - -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_DMALLOC.tmp - mv Makefile_LINUX_DMALLOC.tmp Makefile_LINUX_DMALLOC - -Makefile_LINUX_64: $(M4)/Makefile.m4 - -cp Makefile_LINUX_64 Makefile_LINUX_64_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_64 $(M4)/Makefile.m4 > Makefile_LINUX_64.tmp - mv Makefile_LINUX_64.tmp Makefile_LINUX_64 - -Makefile_LINUX_gcc42: $(M4)/Makefile.m4 - -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42 $(M4)/Makefile.m4 > Makefile_LINUX_gcc42.tmp - mv Makefile_LINUX_gcc42.tmp Makefile_LINUX_gcc42 - -Makefile_LINUX_gcc42_DMALLOC: $(M4)/Makefile.m4 - -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_gcc42_DMALLOC.tmp - mv Makefile_LINUX_gcc42_DMALLOC.tmp Makefile_LINUX_gcc42_DMALLOC - -Makefile_OSX: $(M4)/Makefile.m4 - -cp Makefile_OSX Makefile_OSX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX $(M4)/Makefile.m4 > Makefile_OSX.tmp - mv Makefile_OSX.tmp Makefile_OSX - -Makefile_OSX_gcc42: $(M4)/Makefile.m4 - -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42 $(M4)/Makefile.m4 > Makefile_OSX_gcc42.tmp - mv Makefile_OSX_gcc42.tmp Makefile_OSX_gcc42 - -Makefile_OSX_gcc42_DMALLOC: $(M4)/Makefile.m4 - -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_OSX_gcc42_DMALLOC.tmp - mv Makefile_OSX_gcc42_DMALLOC.tmp Makefile_OSX_gcc42_DMALLOC - -Makefile_AIX: $(M4)/Makefile.m4 - -cp Makefile_AIX Makefile_AIX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=AIX $(M4)/Makefile.m4 > Makefile_AIX.tmp - mv Makefile_AIX.tmp Makefile_AIX - -Makefile_MINGW: $(M4)/Makefile.m4 - -cp Makefile_MINGW Makefile_MINGW_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MINGW $(M4)/Makefile.m4 > Makefile_MINGW.tmp - mv Makefile_MINGW.tmp Makefile_MINGW - -Makefile_MSYS2: $(M4)/Makefile.m4 - -cp Makefile_MSYS2 Makefile_MSYS2_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MSYS2 $(M4)/Makefile.m4 > Makefile_MSYS2.tmp - mv Makefile_MSYS2.tmp Makefile_MSYS2 - -Makefile_IRIX_gcc: $(M4)/Makefile.m4 - -cp Makefile_IRIX_gcc Makefile_IRIX_gcc_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=IRIX_gcc $(M4)/Makefile.m4 > Makefile_IRIX_gcc.tmp - mv Makefile_IRIX_gcc.tmp Makefile_IRIX_gcc - - -Makefile: $(M4)/Makefile.m4 - -cp Makefile Makefile_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=default $(M4)/Makefile.m4 > Makefile.tmp - mv Makefile.tmp Makefile - -cbflib.ini: $(M4)/Makefile.m4 - echo "$(LDPREFIX)" > cbflib.ini - echo "HDF5_PLUGIN_PATH=$(SOLIB):$$HDF5_PLUGIN_PATH" >> cbflib.ini - echo "export HDF5_PLUGIN_PATH" >> cbflib.ini - -symlinksdone: - chmod a+x .symlinks - chmod a+x .undosymlinks - chmod a+x doc/.symlinks - chmod a+x doc/.undosymlinks - ./.symlinks $(SLFLAGS) - touch symlinksdone - -install: baseinstall pycbfinstall \ - $(HDF5_INSTALL) \ - $(TIFF_INSTALL) \ - $(REGEX_INSTALL) - -userinstall: baseinstall pycbfuserinstall \ - $(HDF5_INSTALL) \ - $(TIFF_INSTALL) \ - $(REGEX_INSTALL) - -baseinstall: all $(CBF_PREFIX) $(CBF_PREFIX)/lib $(CBF_PREFIX)/bin \ - $(CBF_PREFIX)/include $(CBF_PREFIX)/include/cbflib \ - $(PYSOURCE) shared $(EXAMPLES)/batch_convert_minicbf.sh \ - $(LIB)/libcbf.a $(LIB)/libimg.a $(LIB)/libfcb.a \ - $(SOLIB)/libcbf.so $(SOLIB)/libimg.so $(SOLIB)/libfcb.so - -chmod -R 755 $(CBF_PREFIX)/include/cbflib - -chmod 755 $(CBF_PREFIX)/lib/libcbf.a - -cp $(CBF_PREFIX)/lib/libcbf.a $(CBF_PREFIX)/lib/libcbf_old.a - cp $(LIB)/libcbf.a $(CBF_PREFIX)/lib/libcbf.a - -chmod 755 $(CBF_PREFIX)/lib/libimg.a - -cp $(CBF_PREFIX)/lib/libimg.a $(CBF_PREFIX)/lib/libimg_old.a - cp $(LIB)/libimg.a $(CBF_PREFIX)/lib/libimg.a - -chmod 755 $(CBF_PREFIX)/lib/libfcb.a - -cp $(CBF_PREFIX)/lib/libfcb.a $(CBF_PREFIX)/lib/libfcb_old.a - cp $(LIB)/libfcb.a $(CBF_PREFIX)/lib/libfcb.a - -chmod 755 $(CBF_PREFIX)/lib/libcbf.so - -cp $(CBF_PREFIX)/lib/libcbf.so $(CBF_PREFIX)/lib/libcbf_old.so - cp $(SOLIB)/libcbf.so $(CBF_PREFIX)/lib/libcbf.so - $(LN) $(CBF_PREFIX)/lib/libcbf.so $(CBF_PREFIX)/lib/lib_cbf.so - -chmod 755 $(CBF_PREFIX)/lib/libimg.so - -cp $(CBF_PREFIX)/lib/libimg.so $(CBF_PREFIX)/lib/libimg_old.so - cp $(SOLIB)/libimg.so $(CBF_PREFIX)/lib/libimg.so - $(LN) $(CBF_PREFIX)/lib/libimg.so $(CBF_PREFIX)/lib/lib_img.so - -chmod 755 $(CBF_PREFIX)/lib/libfcb.so - -cp $(CBF_PREFIX)/lib/libfcb.so $(CBF_PREFIX)/lib/libfcb_old.so - cp $(SOLIB)/libfcb.so $(CBF_PREFIX)/lib/libfcb.so - $(LN) $(CBF_PREFIX)/lib/libfcb.so $(CBF_PREFIX)/lib/lib_fcb.so - -cp $(CBF_PREFIX)/bin/cbflib.ini $(CBF_PREFIX)/bin/cbflib.ini_old - echo "$(RUNLDPREFIX)" > $(CBF_PREFIX)/bin/cbflib.ini - echo "HDF5_PLUGIN_PATH=$(CBF_PREFIX)/lib:$$HDF5_PLUGIN_PATH" >> $(CBF_PREFIX)/bin/cbflib.ini - echo "export HDF5_PLUGIN_PATH" >> $(CBF_PREFIX)/bin/cbflib.ini - -cp $(CBF_PREFIX)/bin/adscimg2cbf $(CBF_PREFIX)/bin/adscimg2cbf_old - cp $(BIN)/adscimg2cbf $(CBF_PREFIX)/bin/adscimg2cbf - -cp $(CBF_PREFIX)/bin/cbf2adscimg $(CBF_PREFIX)/bin/cbf2adscimg_old - cp $(BIN)/cbf2adscimg $(CBF_PREFIX)/bin/cbf2adscimg - -cp $(CBF_PREFIX)/bin/cbf_standardize_numbers \ - $(CBF_PREFIX)/bin/cbf_standardize_numbers_old - cp $(BIN)/cbf_standardize_numbers $(CBF_PREFIX)/bin/cbf_standardize_numbers - -cp $(CBF_PREFIX)/bin/convert_image $(CBF_PREFIX)/bin/convert_image_old - cp $(BIN)/convert_image $(CBF_PREFIX)/bin/convert_image - -cp $(CBF_PREFIX)/bin/convert_minicbf $(CBF_PREFIX)/bin/convert_minicbf_old - cp $(BIN)/convert_minicbf $(CBF_PREFIX)/bin/convert_minicbf - -cp $(CBF_PREFIX)/bin/makecbf $(CBF_PREFIX)/bin/makecbf_old - cp $(BIN)/makecbf $(CBF_PREFIX)/bin/makecbf - -cp $(CBF_PREFIX)/bin/img2cif $(CBF_PREFIX)/bin/img2cif_old - cp $(BIN)/img2cif $(CBF_PREFIX)/bin/img2cif - -cp $(CBF_PREFIX)/bin/cif2cbf $(CBF_PREFIX)/bin/cif2cbf_old - cp $(BIN)/cif2cbf $(CBF_PREFIX)/bin/cif2cbf - -cp $(CBF_PREFIX)/bin/minicbf2nexus $(CBF_PREFIX)/bin/minicbf2nexus_old - cp $(BIN)/minicbf2nexus $(CBF_PREFIX)/bin/minicbf2nexus - -cp $(CBF_PREFIX)/bin/cbf2nexus $(CBF_PREFIX)/bin/cbf2nexus_old - cp $(BIN)/cbf2nexus $(CBF_PREFIX)/bin/cbf2nexus - -cp $(CBF_PREFIX)/bin/nexus2cbf $(CBF_PREFIX)/bin/nexus2cbf_old - cp $(BIN)/nexus2cbf $(CBF_PREFIX)/bin/nexus2cbf - -cp $(CBF_PREFIX)/bin/roi_peaksearch $(CBF_PREFIX)/bin/roi_peaksearch_old - cp $(BIN)/roi_peaksearch $(CBF_PREFIX)/bin/roi_peaksearch - -cp $(CBF_PREFIX)/bin/sequence_match $(CBF_PREFIX)/bin/sequence_match_old - cp $(BIN)/sequence_match $(CBF_PREFIX)/bin/sequence_match - -cp $(CBF_PREFIX)/bin/testalloc $(CBF_PREFIX)/bin/testalloc_old - cp $(BIN)/testalloc $(CBF_PREFIX)/bin/testalloc - -cp $(CBF_PREFIX)/bin/arvai_test $(CBF_PREFIX)/bin/arvai_test_old - cp $(BIN)/arvai_test $(CBF_PREFIX)/bin/arvai_test - -cp $(CBF_PREFIX)/bin/cif2c $(CBF_PREFIX)/bin/cif2c_old - cp $(BIN)/cif2c $(CBF_PREFIX)/bin/cif2c - -cp $(CBF_PREFIX)/bin/testreals $(CBF_PREFIX)/bin/testreals_old - cp $(BIN)/testreals $(CBF_PREFIX)/bin/testreals - -cp $(CBF_PREFIX)/bin/testflat $(CBF_PREFIX)/bin/testflat_old - cp $(BIN)/testflat $(CBF_PREFIX)/bin/testflat - -cp $(CBF_PREFIX)/bin/testflatpacked $(CBF_PREFIX)/bin/testflatpacked_old - cp $(BIN)/testflatpacked $(CBF_PREFIX)/bin/testflatpacked - -cp $(CBF_PREFIX)/bin/tiff2cbf $(CBF_PREFIX)/bin/tiff2cbf_old - cp $(BIN)/tiff2cbf $(CBF_PREFIX)/bin/tiff2cbf - -cp $(CBF_PREFIX)/bin/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk_old - cp $(BIN)/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk - -cp $(CBF_PREFIX)/bin/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk_old - cp $(BIN)/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk - -cp $(CBF_PREFIX)/bin/testhdf5 $(CBF_PREFIX)/bin/testhdf5_old - cp $(BIN)/testhdf5 $(CBF_PREFIX)/bin/testhdf5 -ifneq ($(CBF_USE_ULP),) - -cp $(CBF_PREFIX)/bin/testulp $(CBF_PREFIX)/bin/testulp_old - cp $(BIN)/testulp $(CBF_PREFIX)/bin/testulp -endif - -cp $(CBF_PREFIX)/bin/batch_convert_minicbf.sh $(CBF_PREFIX)/bin/batch_convert_minicbf_old.sh - cp $(EXAMPLES)/batch_convert_minicbf.sh $(CBF_PREFIX)/bin/batch_convert_minicbf.sh -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) - cp $(SRC)/drel_lex.py $(CBF_PREFIX)/bin/drel_lex.py - cp $(SRC)/drel_yacc.py $(CBF_PREFIX)/bin/drel_yacc.py - cp $(SRC)/drelc.py $(CBF_PREFIX)/bin/drelc.py - cp $(SRC)/drel_prep.py $(CBF_PREFIX)/bin/drel_prep.py -endif - chmod -R 755 $(CBF_PREFIX)/include/cbflib - -rm -rf $(CBF_PREFIX)/include/cbflib_old - -cp -r $(CBF_PREFIX)/include/cbflib $(CBF_PREFIX)/include/cbflib_old - -rm -rf $(CBF_PREFIX)/include/cbflib - cp -r $(INCLUDE) $(CBF_PREFIX)/include/cbflib - chmod 644 $(CBF_PREFIX)/lib/libcbf.a - chmod 644 $(CBF_PREFIX)/lib/libimg.a - chmod 644 $(CBF_PREFIX)/lib/libfcb.a - chmod 755 $(CBF_PREFIX)/lib/libcbf.so - chmod 755 $(CBF_PREFIX)/lib/libimg.so - chmod 755 $(CBF_PREFIX)/lib/libfcb.so - chmod 755 $(CBF_PREFIX)/bin/arvai_test - chmod 755 $(CBF_PREFIX)/bin/cbf2nexus - chmod 755 $(CBF_PREFIX)/bin/cbf_standardize_numbers - chmod 755 $(CBF_PREFIX)/bin/cif2c - chmod 755 $(CBF_PREFIX)/bin/cif2cbf - chmod 755 $(CBF_PREFIX)/bin/convert_image - chmod 755 $(CBF_PREFIX)/bin/convert_minicbf - chmod 755 $(CBF_PREFIX)/bin/img2cif - chmod 755 $(CBF_PREFIX)/bin/makecbf - chmod 755 $(CBF_PREFIX)/bin/minicbf2nexus - chmod 755 $(CBF_PREFIX)/bin/nexus2cbf - chmod 755 $(CBF_PREFIX)/bin/roi_peaksearch - chmod 755 $(CBF_PREFIX)/bin/sequence_match - chmod 755 $(CBF_PREFIX)/bin/testalloc - chmod 755 $(CBF_PREFIX)/bin/testflat - chmod 755 $(CBF_PREFIX)/bin/testflatpacked - chmod 755 $(CBF_PREFIX)/bin/testhdf5 - chmod 755 $(CBF_PREFIX)/bin/testreals -ifneq ($(CBF_USE_ULP),) - chmod 755 $(CBF_PREFIX)/bin/testulp -endif - chmod 755 $(CBF_PREFIX)/bin/tiff2cbf - chmod 755 $(CBF_PREFIX)/bin/test_cbf_airy_disk - chmod 755 $(CBF_PREFIX)/bin/batch_convert_minicbf.sh - chmod 644 $(CBF_PREFIX)/include/cbflib/*.h - -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -# -# PyCifRW -# -build_pycifrw: $(M4)/Makefile.m4 - touch build_pycifrw -$(PYCIFRW): build_pycifrw - -rm -rf $(PYCIFRW) - -rm -rf $(PYCIFRW).tar.gz - $(DOWNLOAD) $(PYCIFRWURL) - tar -xvf $(PYCIFRW).tar.gz - -rm $(PYCIFRW).tar.gz - (cd $(PYCIFRW); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) - -# -# PLY -# -build_ply: $(M4)/Makefile.m4 - touch build_ply -$(PLY): build_ply - -rm -rf $(PLY) - -rm -rf $(PLY).tar.gz - $(DOWNLOAD) $(PLYURL) - tar -xvf $(PLY).tar.gz - -rm $(PLY).tar.gz - (cd $(PLY); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) -endif - -# -# REGEX -# - -build_regex: $(M4)/Makefile.m4 - touch build_regex -$(REGEX): build_regex - -rm -rf $(REGEX) - -rm -rf $(REGEX).tar.gz - $(DOWNLOAD) $(REGEX_URL) - tar -xvf $(REGEX).tar.gz - touch $(REGEX) - -rm $(REGEX).tar.gz - cp config.guess config.sub $(REGEX) - (cd $(REGEX); \ - prefix=$(REGEX_PREFIX); export prefix; \ - ./configure --prefix=$(REGEX_PREFIX); make install) - @-cp $(REGEX_PREFIX)/include/pcreposix.h $(REGEX_PREFIX)/include/regex.h -$(REGEX)_INSTALL: $(REGEX) - -rm -rf $(REGEX)_install - rsync -avz $(REGEX)/ $(REGEX)_install - (cd $(REGEX)_install; prefix=$(CBF_PREFIX); export prefix; \ - make distclean; ./configure --prefix=$(CBF_PREFIX); make install ) - @-cp $(CBF_PREFIX)/include/pcreposix.h $(CBF_PREFIX)/include/regex.h - -# -# TIFF -# -build_tiff: $(M4)/Makefile.m4 - touch build_tiff -$(TIFF): build_tiff config.guess config.sub - -rm -rf $(TIFF) - -rm -rf $(TIFF).tar.gz - $(DOWNLOAD) $(TIFF_URL) - tar -xvf $(TIFF).tar.gz - touch $(TIFF) - -rm $(TIFF).tar.gz - cp config.guess config.sub $(TIFF)/config/ - (cd $(TIFF); prefix=$(TIFF_PREFIX); export prefix; \ - ./configure --prefix=$(TIFF_PREFIX); make install) -$(TIFF)_INSTALL: $(TIFF) - -rm -rf $(TIFF)_install - rsync -avz $(TIFF)/ $(TIFF)_install - (cd $(TIFF)_install; make distclean; prefix=$(CBF_PREFIX); export prefix; \ - ./configure --prefix=$(CBF_PREFIX); make install) - - -ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes) -# -# HDF5 -# - -build_hdf5: $(M4)/Makefile.m4 - touch build_hdf5 -$(HDF5): build_hdf5 - -rm -rf $(HDF5) - -rm -rf $(HDF5).tar.gz - $(DOWNLOAD) $(HDF5_URL) - tar -xvf $(HDF5).tar.gz - cp config.guess $(HDF5)/bin/config.guess - cp config.sub $(HDF5)/bin/config.sub - touch $(HDF5) - -rm $(HDF5).tar.gz - echo "first level HDF5 install in "$(HDF5_PREFIX) - (cd $(ROOT)/$(HDF5); \ - CFLAGS="$(CFLAGS)"; export CFLAGS; \ - mkdir -p hdf5; prefix=$(ROOT)/$(HDF5)/hdf5; export prefix; \ - ./configure --prefix=$(ROOT)/$(HDF5)/hdf5 --enable-build-mode=production \ - --enable-trace --enable-fortran --enable-using-memchecker ;\ - make install; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/bin/ $(HDF5_PREFIX)/bin; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/lib/ $(HDF5_PREFIX)/lib; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/include/ $(HDF5_PREFIX)/include; \ - cd $(HDF5_PREFIX)/bin; $(ROOT)/$(HDF5)/hdf5/bin/h5redeploy -force ) -$(HDF5)_INSTALL: $(HDF5) - -rm -rf $(HDF5)_install - echo "final HDF5 install in "$(CBF_PREFIX) - rsync -avz $(ROOT)/$(HDF5)/hdf5/bin/ $(CBF_PREFIX)/bin; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/lib/ $(CBF_PREFIX)/lib; \ - rsync -avz $(ROOT)/$(HDF5)/hdf5/include/ $(CBF_PREFIX)/include; \ - cd $(CBF_PREFIX)/bin; $(ROOT)/$(HDF5)/hdf5/bin/h5redeploy -force -endif - - -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -# -# LZ4 -# -build_lz4: $(M4)/Makefile.m4 - touch build_lz4 -$(LZ4): $(HDF5) build_lz4 - mkdir -p $(SOLIB) - -rm -rf $(LZ4) -ifneq ($(MSYS2),yes) - -rm -rf $(LZ4).tar.gz - $(DOWNLOAD) $(LZ4_URL) - tar -xvf $(LZ4).tar.gz - -rm $(LZ4).tar.gz - (cp $(LZ4include)/lz4.h $(INCLUDE); \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/lz4.c -o lz4.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/h5zlz4.c -o h5zlz4.o; \ - $(CC) -shared lz4.o h5zlz4.o -o $(SOLIB)/libh5zlz4.so; \ - rm lz4.o h5zlz4.o) -else - git clone $(LZ4_URL) - (cd $(LZ4); mkdir build; cd build; cmake .. -G 'MSYS Makefiles' -DENABLE_LZ4_PLUGIN="yes"; make all; cp plugins/* $(SOLIB)) -endif - touch $(LZ4) -endif - - -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) -# -# BSHUF -# -build_BSHUF: $(M4)/Makefile.m4 - touch build_BSHUF -$(BSHUF): $(HDF5) build_BSHUF $(LZ4dep) - mkdir -p $(SOLIB) - -rm -rf $(BSHUF) - -rm -rf $(BSHUF).tar.gz - -rm -rf *.o - $(DOWNLOAD) $(BSHUFURL) - tar -xvf $(BSHUF).tar.gz - -rm $(BSHUF).tar.gz - (cp $(BSHUFinclude)/bitshuffle.h \ - $(BSHUFinclude)/bitshuffle_core.h \ - $(BSHUFinclude)/bitshuffle_internals.h \ - $(BSHUFinclude)/bshuf_h5filter.h $(BSHUFinclude)/iochain.h $(INCLUDE); \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bshuf_h5plugin.c -o bshuf_h5plugin.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/iochain.c -o iochain.o; \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o; \ - $(CC) -shared bshuf_h5filter.o bitshuffle.o bitshuffle_core.o iochain.o lz4.o $(HDF5SOLIBS_LOCAL) $(HDF5SOLIBS_SYSTEM)\ - -o $(SOLIB)/libh5zbshuf.so; \ - $(CC) -shared bshuf_h5filter.o bitshuffle.o bitshuffle_core.o lz4.o bshuf_h5plugin.o iochain.o \ - $(HDF5SOLIBS_LOCAL) \ - $(HDF5SOLIBS_SYSTEM) -o $(SOLIB)/$(BSHUFFILTER).so; \ - rm bshuf_h5filter.o bitshuffle.o lz4.o iochain.o bshuf_h5plugin.o) - touch $(BSHUF) -endif - - -# -# Directories -# -$(CBF_PREFIX): - mkdir -p $(CBF_PREFIX) - -$(CBF_PREFIX)/lib: $(CBF_PREFIX) - mkdir -p $(CBF_PREFIX)/lib - -$(CBF_PREFIX)/bin: $(CBF_PREFIX) - mkdir -p $(CBF_PREFIX)/bin - -$(CBF_PREFIX)/include: $(CBF_PREFIX) - mkdir -p $(CBF_PREFIX)/include - -$(CBF_PREFIX)/include/cbflib: $(CBF_PREFIX)/include - mkdir -p $(CBF_PREFIX)/include/cbflib - - - -$(LIB): - mkdir -p $@ - -$(BIN): - mkdir -p $@ - -$(SOLIB): - mkdir -p $@ - -$(JCBF): - mkdir -p $@ - -$(MINICBF_TESTS): - mkdir -p $@ - -# -# Parser -# -$(SRC)/cbf_stx.c: $(SRC)/cbf.stx.y - bison $(SRC)/cbf.stx.y -o $(SRC)/cbf.stx.tab.c -d - mv $(SRC)/cbf.stx.tab.c $(SRC)/cbf_stx.c - mv $(SRC)/cbf.stx.tab.h $(INCLUDE)/cbf_stx.h - -# -# CBF library -# -$(LIB)/libcbf.a: $(SOURCE) $(HEADERS) $(COMMONDEP) $(HDF5) $(LZ4DEPS) $(BSHUFDEPS) $(REGEXDEPS) - -rm -f $@ - -rm -f *.o - mkdir -p $(LIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) \ - -DCBF_FILTER_STATIC $(LZ4FLAG) $(BSHUFFLAG) $(PYCIFRWFLAG) $(INCLUDES) $(WARNINGS) -c $(SOURCE) -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -ifneq ($(MSYS2),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(LZ4src)/h5zlz4.c -o h5zlz4.o -else - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(LZ4)/LZ4/src/H5Zlz4.c -o h5zlz4.o -endif -endif -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/iochain.c -o iochain.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o -endif - $(AR) cr $@ *.o -ifneq ($(RANLIB),) - $(RANLIB) $@ -endif - -rm -f *.o - -$(SOLIB)/libcbf.so: $(SOURCE) $(HEADERS) $(COMMONDEP) $(HDF5) $(LZ4DEPS) $(BSHUFDEPS) - -rm -f $@ - -rm -f *.o - mkdir -p $(SOLIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(LZ4FLAG) $(BSHUFFLAG) $(PYCIFRWFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(SOURCE) -ifneq ($(CBFLIB_DONT_USE_LZ4),yes) -ifneq ($(MSYS2),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(LZ4src)/h5zlz4.c -o h5zlz4.o -else - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(LZ4)/LZ4/src/H5Zlz4.c -o h5zlz4.o -endif -endif -ifneq ($(CBFLIB_DONT_USE_BSHUF),yes) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle..o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/iochain.c -o iochain.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o -endif - - $(CC) -o $@ *.o $(SOLDFLAGS) $(EXTRALIBS) $(REGEX_LIBS) $(HDF5SOLIBS_LOCAL) $(HDF5SOLIBS_SYSTEM) - -rm -f *.o - -# -# IMG library -# -$(LIB)/libimg.a: $(SRC)/img.c $(HEADERS) $(COMMONDEP) - mkdir -p $(LIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) -c $(SRC)/img.c - $(AR) cr $@ img.o -ifneq ($(RANLIB),) - $(RANLIB) $@ -endif - rm img.o - -$(SOLIB)/libimg.so: $(SOURCE) $(HEADERS) $(COMMONDEP) - -rm -f $@ - mkdir -p $(SOLIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(SRC)/img.c - $(CC) -o $@ img.o $(SOLDFLAGS) - rm img.o - -# -# CBF and IMG libraries -# -CBF_IMG_LIBS: $(LIB)/libcbf.a $(LIB)/libimg.a - - -# -# FCB library -# -$(LIB)/libfcb.a: $(F90SOURCE) $(COMMONDEP) $(HDF5) - mkdir -p $(LIB) -ifneq ($(F90C),) - $(F90C) $(F90FLAGS) -c $(F90SOURCE) - $(AR) cr $@ *.o -ifneq ($(RANLIB),) - $(RANLIB) $@ -endif - rm *.o -else - echo "Define F90C to build $(LIB)/libfcb.a" -endif - -$(SOLIB)/libfcb.so: $(F90SOURCE) $(HEADERS) $(COMMONDEP) $(SOLIB) -ifneq ($(F90C),) - -rm -f $@ - mkdir -p $(SOLIB) - $(F90C) $(F90FLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(F90SOURCE) - $(F90C) $(F90FLAGS) -o $@ *.o $(SOLDFLAGS) - rm *.o -else - echo "Define F90C to build $(SOLIB)/libfcb.so" -endif - - -# -# Python bindings -# -$(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ - $(PYCBF)/$(SETUP_PY) \ - $(PYCBF)/pycbf.i \ - $(PYCBF)/cbfhandlewrappers.i \ - $(PYCBF)/cbfdetectorwrappers.i \ - $(PYCBF)/cbfgenericwrappers.i \ - $(PYCBF)/cbfgoniometerwrappers.i - -cp $(SOLIB)/*.so $(LIB) - (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) - -$(PYCBF)/pycbfinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --prefix=$(CBF_PREFIX)) - -$(PYCBF)/pycbfuserinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --user) - -$(PYCBF)/setup.py: $(M4)/setup_py.m4 - (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ - -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) - -$(PYCBF)/setup_MINGW.py: m4/setup_py.m4 - (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ - -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) - -$(LIB)/_pycbf.$(PYCBFEXT): $(PYCBF)/_pycbf.$(PYCBFEXT) - mkdir -p $(LIB) - cp $(PYCBF)/_pycbf.$(PYCBFEXT) $(LIB)/_pycbf.$(PYCBFEXT) - -$(PYCBF)/pycbf.pdf: $(PYCBF)/pycbf.w - (cd $(PYCBF); \ - $(NUWEB) pycbf; \ - latex pycbf; \ - $(NUWEB) pycbf; \ - latex pycbf; \ - dvipdfm pycbf ) - -$(PYCBF)/CBFlib.txt: $(DOC)/CBFlib.html - links -dump $(DOC)/CBFlib.html > $(PYCBF)/CBFlib.txt - -$(PYCBF)/cbfhandlewrappers.i \ -$(PYCBF)/cbfdetectorwrappers.i \ -$(PYCBF)/cbfgenericwrappers.i \ -$(PYCBF)/cbfgoniometerwrappers.i: $(PYCBF)/CBFlib.txt $(PYCBF)/make_pycbf.py - (cd $(PYCBF); $(PYTHON) make_pycbf.py; $(PYSWIG) pycbf.i; $(PYTHON) setup.py build) - - -# -# Java bindings -# -$(JCBF)/cbflib-$(VERSION).jar: $(JCBF) $(SRC)/jcbf.i - $(JSWIG) -I$(INCLUDE) -package org.iucr.cbflib -outdir $(JCBF) -o $(JCBF)/jcbf_wrap.c $(SRC)/jcbf.i - $(JAVAC) -d . $(JCBF)/*.java - $(JAR) cf $@ org - -$(SOLIB)/libcbf_wrap.so: $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf.so - mkdir -p $(SOLIB) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) $(JAVAINCLUDES) -c $(JCBF)/jcbf_wrap.c - $(CC) -o $@ jcbf_wrap.o $(SOLDFLAGS) -L$(SOLIB) -lcbf $(REGEX_LIBS) - rm jcbf_wrap.o - -# -# F90SOURCE -# -$(SRC)/fcb_exit_binary.f90: $(M4)/fcb_exit_binary.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_exit_binary.m4) > $(SRC)/fcb_exit_binary.f90 -$(SRC)/fcb_next_binary.f90: $(M4)/fcb_next_binary.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_next_binary.m4) > $(SRC)/fcb_next_binary.f90 -$(SRC)/fcb_open_cifin.f90: $(M4)/fcb_open_cifin.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_open_cifin.m4) > $(SRC)/fcb_open_cifin.f90 -$(SRC)/fcb_packed.f90: $(M4)/fcb_packed.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_packed.m4) > $(SRC)/fcb_packed.f90 -$(SRC)/fcb_read_bits.f90: $(M4)/fcb_read_bits.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_read_bits.m4) > $(SRC)/fcb_read_bits.f90 -$(SRC)/fcb_read_image.f90: $(M4)/fcb_read_image.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_read_image.m4) > $(SRC)/fcb_read_image.f90 -$(SRC)/fcb_read_xds_i2.f90: $(M4)/fcb_read_xds_i2.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) fcb_read_xds_i2.m4) > $(SRC)/fcb_read_xds_i2.f90 -$(EXAMPLES)/test_fcb_read_image.f90: $(M4)/test_fcb_read_image.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) test_fcb_read_image.m4) > $(EXAMPLES)/test_fcb_read_image.f90 -$(EXAMPLES)/test_xds_binary.f90: $(M4)/test_xds_binary.m4 $(M4)/fcblib_defines.m4 - (cd $(M4); m4 -P $(M4FLAGS) test_xds_binary.m4) > $(EXAMPLES)/test_xds_binary.f90 - -# -# convert_image example program -# -$(BIN)/convert_image: $(LIB)/libcbf.a $(EXAMPLES)/convert_image.c $(SRC)/img.c \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/convert_image.c $(SRC)/img.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ -# -# convert_minicbf example program -# -$(BIN)/convert_minicbf: $(LIB)/libcbf.a $(EXAMPLES)/convert_minicbf.c \ - $(GOPTLIB) $(GOPTINC) $(EXAMPLES)/batch_convert_minicbf.sh - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/convert_minicbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - chmod 755 $(EXAMPLES)/batch_convert_minicbf.sh - -# -# makecbf example program -# -$(BIN)/makecbf: $(LIB)/libcbf.a $(EXAMPLES)/makecbf.c $(LIB)/libimg.a - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/makecbf.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - - -# -# adscimg2cbf example program -# -$(BIN)/adscimg2cbf: $(LIB)/libcbf.a $(EXAMPLES)/adscimg2cbf.c $(EXAMPLES)/adscimg2cbf_sub.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/adscimg2cbf.c $(EXAMPLES)/adscimg2cbf_sub.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# cbf2adscimg example program -# -$(BIN)/cbf2adscimg: $(LIB)/libcbf.a $(EXAMPLES)/cbf2adscimg.c $(EXAMPLES)/cbf2adscimg_sub.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf2adscimg.c $(EXAMPLES)/cbf2adscimg_sub.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# cbf_standardize_numbers example program -# -$(BIN)/cbf_standardize_numbers: $(EXAMPLES)/cbf_standardize_numbers.c $(EXAMPLES)/cbf_standardize_numbers.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf_standardize_numbers.c $(SRC_FGETLN) $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@ - -# -# changtestcompression example program -# -$(BIN)/changtestcompression: $(LIB)/libcbf.a $(EXAMPLES)/changtestcompression.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/changtestcompression.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# img2cif example program -# -$(BIN)/img2cif: $(LIB)/libcbf.a $(EXAMPLES)/img2cif.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOTPINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/img2cif.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# cif2cbf example program -# -$(BIN)/cif2cbf: $(LIB)/libcbf.a $(EXAMPLES)/cif2cbf.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cif2cbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# cbf2nexus example program -# -$(BIN)/cbf2nexus: $(LIB)/libcbf.a $(EXAMPLES)/cbf2nexus.c \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf2nexus.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) \ - -lhdf5 -limg -o $@ - -# -# minicbf2nexus example program -# -$(BIN)/minicbf2nexus: $(LIB)/libcbf.a $(EXAMPLES)/minicbf2nexus.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/minicbf2nexus.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# nexus2cbf example program -# -$(BIN)/nexus2cbf: $(LIB)/libcbf.a $(EXAMPLES)/nexus2cbf.c \ - $(GOPTLIB) $(GOPTINC) $(REGEX) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/nexus2cbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@ - -# -# roi_peaksearch example program -# -$(BIN)/roi_peaksearch: $(LIB)/libcbf.a $(EXAMPLES)/roi_peaksearch.c \ - $(EXAMPLES)/dps_peaksearch.c $(EXAMPLES)/dps_peaksearch.h $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/roi_peaksearch.c $(EXAMPLES)/dps_peaksearch.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - - -# -# dectris cbf_template_t program -# -$(BIN)/cbf_template_t: $(DECTRIS_EXAMPLES)/cbf_template_t.c \ - $(DECTRIS_EXAMPLES)/mx_cbf_t_extras.h \ - $(DECTRIS_EXAMPLES)/mx_parms.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -I $(DECTRIS_EXAMPLES) $(WARNINGS) \ - $(DECTRIS_EXAMPLES)/cbf_template_t.c -o $@ - -# -# testcell example program -# -$(BIN)/testcell: $(LIB)/libcbf.a $(EXAMPLES)/testcell.C - mkdir -p $(BIN) - $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testcell.C -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# cif2c example program -# -$(BIN)/cif2c: $(LIB)/libcbf.a $(EXAMPLES)/cif2c.c - mkdir -p $(BIN) - $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cif2c.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# sauter_test example program -# -$(BIN)/sauter_test: $(LIB)/libcbf.a $(EXAMPLES)/sauter_test.C - mkdir -p $(BIN) - $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/sauter_test.C -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# sequence_match example program -# -$(BIN)/sequence_match: $(LIB)/libcbf.a $(EXAMPLES)/sequence_match.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/sequence_match.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# tiff2cbf example program -# -$(BIN)/tiff2cbf: $(LIB)/libcbf.a $(EXAMPLES)/tiff2cbf.c \ - $(GOPTLIB) $(GOPTINC) $(TIFF) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - -I$(TIFF)/libtiff $(EXAMPLES)/tiff2cbf.c $(GOPTLIB) -L$(LIB) \ - -lcbf -L$(TIFF_PREFIX)/lib -ltiff $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# Andy Arvai's buffered read test program -# -$(BIN)/arvai_test: $(LIB)/libcbf.a $(EXAMPLES)/arvai_test.c $(LIB)/libimg.a \ - $(GOPTLIB) $(GOPTINC) - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/arvai_test.c $(GOPTLIB) -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@ - -# -# testreals example program -# -$(BIN)/testreals: $(LIB)/libcbf.a $(EXAMPLES)/testreals.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testreals.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# testflat example program -# -$(BIN)/testflat: $(LIB)/libcbf.a $(EXAMPLES)/testflat.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testflat.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ -# -# testflatpacked example program -# -$(BIN)/testflatpacked: $(LIB)/libcbf.a $(EXAMPLES)/testflatpacked.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testflatpacked.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -ifneq ($(F90C),) -# -# test_xds_binary example program -# -$(BIN)/test_xds_binary: $(LIB)/libfcb.a $(EXAMPLES)/test_xds_binary.f90 - mkdir -p $(BIN) - $(F90C) $(F90FLAGS) $(F90LDFLAGS) $(EXAMPLES)/test_xds_binary.f90 \ - -L$(LIB) -lfcb -o $@ - -# -# test_fcb_read_image example program -# -$(BIN)/test_fcb_read_image: $(LIB)/libfcb.a $(EXAMPLES)/test_fcb_read_image.f90 - mkdir -p $(BIN) - $(F90C) $(F90FLAGS) $(F90LDFLAGS) $(EXAMPLES)/test_fcb_read_image.f90 \ - -L$(LIB) -lfcb -o $@ -endif - -# -# testcbf (C) -# -$(BIN)/ctestcbf: $(EXAMPLES)/testcbf.c $(LIB)/libcbf.a - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/testcbf.c -L$(LIB) \ - -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@ - -# -# testcbf (Java) -# -$(BIN)/testcbf.class: $(EXAMPLES)/testcbf.java $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so - mkdir -p $(BIN) - $(JAVAC) -cp $(JCBF)/cbflib-$(VERSION).jar -d $(BIN) $(EXAMPLES)/testcbf.java - -ifneq ($(CBF_USE_ULP),) -# -# testulp test program -# -$(BIN)/testulp: $(LIB)/libcbf.a $(EXAMPLES)/testulp.c $(EXAMPLES)/unittest.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/testulp.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ -endif - -# -# testhdf5 test program -# -$(BIN)/testhdf5: $(LIB)/libcbf.a $(EXAMPLES)/testhdf5.c $(EXAMPLES)/unittest.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/testhdf5.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) \ - -o $@.tmp - mv $@.tmp $@ - -# -# testalloc test program -# -$(BIN)/testalloc: $(LIB)/libcbf.a $(EXAMPLES)/testalloc.c $(EXAMPLES)/unittest.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/testalloc.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ - -# -# test_cbf_airy_disk test program -# -$(BIN)/test_cbf_airy_disk: $(LIB)/libcbf.a $(EXAMPLES)/test_cbf_airy_disk.c - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \ - $(WARNINGS) $(EXAMPLES)/test_cbf_airy_disk.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ - -# -# cbf_testxfelread: test program -# -$(BIN)/cbf_testxfelread: $(LIB)/libcbf.a $(EXAMPLES)/cbf_testxfelread.c $(EXAMPLES)/cbf_testxfelread.h - mkdir -p $(BIN) - $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ - $(EXAMPLES)/cbf_testxfelread.c -L$(LIB) $(LIB)/libcbf.a \ - $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@.tmp - mv $@.tmp $@ - -# -# Data files for tests -# - -$(DATADIRI): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLI)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Input.tar.gz) - touch $(DATADIRI) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Input.tar.gz) - -$(DATADIRO): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLO)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output.tar.gz) - touch $(DATADIRO) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output.tar.gz) - -$(DATADIRS): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLS)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - touch $(DATADIRS) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - - -# Input Data Files - -TESTINPUT_BASIC = example.mar2300 -DATADIRI_INPUT_BASIC = $(DATADIRI)/example.mar2300 - - -TESTINPUT_EXTRA = \ - 1191_00005.cbf \ - 9ins.cif \ - hit-20140306005258847.cbf \ - insulin_pilatus6m.cbf \ - mb_LP_1_001.img \ - testflatin.cbf \ - testflatpackedin.cbf \ - testrealin.cbf \ - thaumatin_die_M1S5_1_0005_2.cbf \ - X4_lots_M1S4_1_0001.cbf \ - X4_lots_M1S4_1_0002.cbf \ - X4_lots_M1S4_1_0003.cbf \ - X4_lots_M1S4_1_0004.cbf \ - X4_lots_M1S4_1_0005.cbf \ - XRD1621.tif - - - -DATADIRI_INPUT_EXTRA = \ - $(DATADIRI)/1191_00005.cbf \ - $(DATADIRI)/9ins.cif \ - $(DATADIRI)/hit-20140306005258847.cbf \ - $(DATADIRI)/insulin_pilatus6m.cbf \ - $(DATADIRI)/mb_LP_1_001.img \ - $(DATADIRI)/testflatin.cbf \ - $(DATADIRI)/testflatpackedin.cbf \ - $(DATADIRI)/testrealin.cbf \ - $(DATADIRI)/thaumatin_die_M1S5_1_0005_2.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0001.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0002.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0003.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0004.cbf \ - $(DATADIRI)/X4_lots_M1S4_1_0005.cbf \ - $(DATADIRI)/XRD1621.tif - - -# Output Data Files - -TESTOUTPUT = adscconverted_flat_orig.cbf \ - adscconverted_orig.cbf converted_flat_orig.cbf converted_orig.cbf \ - insulin_pilatus6mconverted_orig.cbf.h5.cbf \ - insulin_pilatus6mconverted_orig.cbf.h5 \ - insulin_pilatus6mconverted_v2_orig.cbf \ - mb_LP_1_001_orig.cbf testcell_orig.prt \ - test_xds_bin_testflatout_orig.out \ - test_xds_bin_testflatpackedout_orig.out test_fcb_read_testflatout_orig.out \ - test_fcb_read_testflatpackedout_orig.out \ - XRD1621_orig.cbf XRD1621_I4encbC100_orig.cbf \ - minicbf_orig.h5 -NEWTESTOUTPUT = adscconverted_flat.cbf \ - adscconverted.cbf converted_flat.cbf converted.cbf \ - insulin_pilatus6mconverted.cbf \ - insulin_pilatus6mconverted.cbf.h5 \ - insulin_pilatus6mconverted.cbf.h5.cbf \ - insulin_pilatus6mconverted_v2.cbf \ - mb_LP_1_001.cbf testcell.prt \ - test_xds_bin_testflatout.out \ - test_xds_bin_testflatpackedout.out test_fcb_read_testflatout.out \ - test_fcb_read_testflatpackedout.out \ - XRD1621.cbf XRD1621_I4encbC100.cbf \ - $(MINICBF_TEST)/minicbf.h5 -DATADIRO_OUTPUT = $(DATADIRO)/adscconverted_flat_orig.cbf \ - $(DATADIRO)/adscconverted_orig.cbf \ - $(DATADIRO)/converted_flat_orig.cbf \ - $(DATADIRO)/converted_orig.cbf \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5 \ - $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf \ - $(DATADIRO)/mb_LP_1_001_orig.cbf \ - $(DATADIRO)/testcell_orig.prt \ - $(DATADIRO)/test_xds_bin_testflatout_orig.out \ - $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out \ - $(DATADIRO)/test_fcb_read_testflatout_orig.out \ - $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out \ - $(DATADIRO)/XRD1621_orig.cbf \ - $(DATADIRO)/XRD1621_I4encbC100_orig.cbf \ - $(DATADIRO)/minicbf_orig.h5 -DATADIRO_OUTPUT_SIGNATURES = $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) \ - $(DATADIRO)/adscconverted_orig.cbf$(SEXT) \ - $(DATADIRO)/converted_flat_orig.cbf$(SEXT) \ - $(DATADIRO)/converted_orig.cbf$(SEXT) \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ - $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ - $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ - $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) \ - $(DATADIRO)/testcell_orig.prt$(SEXT) \ - $(DATADIRO)/test_xds_bin_testflatout_orig.out$(SEXT) \ - $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRO)/test_fcb_read_testflatout_orig.out$(SEXT) \ - $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRO)/XRD1621_orig.cbf$(SEXT) \ - $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) \ - $(DATADIRO)/minicbf_orig.h5$(SEXT) - - - -# Output Data File Signatures - -TESTOUTPUTSIGS = adscconverted_flat_orig.cbf$(SEXT) \ - adscconverted_orig.cbf$(SEXT) converted_flat_orig.cbf$(SEXT) converted_orig.cbf$(SEXT) \ - insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ - insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ - insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ - mb_LP_1_001_orig.cbf$(SEXT) testcell_orig.prt$(SEXT) \ - test_xds_bin_testflatout_orig.out$(SEXT) \ - test_xds_bin_testflatpackedout_orig.out$(SEXT) test_fcb_read_testflatout_orig.out$(SEXT) \ - test_fcb_read_testflatpackedout_orig.out$(SEXT) \ - XRD1621_orig.cbf$(SEXT) \ - XRD1621_I4encbC100_orig.cbf$(SEXT) \ - minicbf_orig.h5$(SEXT) -DATADIRS_OUTPUT_SIGNATURES = $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) \ - $(DATADIRS)/adscconverted_orig.cbf$(SEXT) \ - $(DATADIRS)/converted_flat_orig.cbf$(SEXT) \ - $(DATADIRS)/converted_orig.cbf$(SEXT) \ - $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ - $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ - $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ - $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) \ - $(DATADIRS)/testcell_orig.prt$(SEXT) \ - $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) \ - $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) \ - $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \ - $(DATADIRS)/XRD1621_orig.cbf$(SEXT) \ - $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) \ - $(DATADIRS)/minicbf_orig.h5$(SEXT) - -# Fetch Input Data Files - -$(TESTINPUT_BASIC): $(DATADIRI) $(DATADIRI_INPUT_BASIC) - cp $(DATADIRI)/$@ $@ - cp $(DATADIRI)/$@$(SEXT) $@$(SEXT) - -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) - -$(TESTINPUT_EXTRA): $(DATADIRI) $(DATADIRI_INPUT_EXTRA) - cp $(DATADIRI)/$@ $@ - cp $(DATADIRI)/$@$(SEXT) $@$(SEXT) - -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) - - -# Fetch Output Data Files and Signatures - -$(TESTOUTPUT): $(DATADIRO) $(DATADIRO_OUTPUT) $(DATADIRO_OUTPUT_SIGNATURES) - cp $(DATADIRO)/$@ $@ - cp $(DATADIRO)/$@$(SEXT) $@$(SEXT) - -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) - -# Fetch Output Data File Signatures - -$(TESTOUTPUTSIGS): $(DATADIRS) $(DATADIRS_OUTPUT_SIGNATURES) - cp $(DATADIRS)/$@ $@ - - - -# -# Tests -# - - -tests: all $(LIB) $(BIN) symlinksdone basic extra dectristests pycbftests -tests_sigs_only: $(LIB) $(BIN) symlinksdone basic extra_sigs_only -restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 - $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < adscconverted.cbf > $(DATADIRO)/adscconverted_orig.cbf$(SEXT) - $(SIGNATURE) < converted_flat.cbf > $(DATADIRO)/converted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < converted.cbf > $(DATADIRO)/converted_orig.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5 > $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5.cbf > $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) - $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) - $(SIGNATURE) < testcell.prt > $(DATADIRO)/testcell_orig.prt$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRO)/test_xds_bin_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRO)/test_fcb_read_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < XRD1621.cbf > $(DATADIRO)/XRD1621_orig.cbf$(SEXT) - $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) - $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRO)/minicbf_orig.h5$(SEXT) - cp adscconverted_flat.cbf $(DATADIRO)/adscconverted_flat_orig.cbf$ - cp adscconverted.cbf $(DATADIRO)/adscconverted_orig.cbf - cp converted_flat.cbf $(DATADIRO)/converted_flat_orig.cbf - cp converted.cbf $(DATADIRO)/converted_orig.cbf - cp insulin_pilatus6mconverted.cbf.h5 $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5 - cp insulin_pilatus6mconverted.cbf.h5.cbf $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf - cp insulin_pilatus6mconverted_v2.cbf $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf - cp mb_LP_1_001.cbf$ $(DATADIRO)/mb_LP_1_001_orig.cbf - cp testcell.prt $(DATADIRO)/testcell_orig.prt - cp test_xds_bin_testflatout.out $(DATADIRO)/test_xds_bin_testflatout_orig.out - cp test_xds_bin_testflatpackedout.out $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out - cp test_fcb_read_testflatout.out $(DATADIRO)/test_fcb_read_testflatout_orig.out - cp test_fcb_read_testflatpackedout.out $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out - cp XRD1621.cbf $(DATADIRO)/XRD1621_orig.cbf - cp XRD1621_I4encbC100.cbf $(DATADIRO)/XRD1621_I4encbC100_orig.cbf - cp $(MINICBF_TEST)/minicbf.h5 $(DATADIRO)/minicbf_orig.h5 - -restore_sigs_only: $(NEWTESTOUTPUT) $(DATADIRS) - $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < adscconverted.cbf > $(DATADIRS)/adscconverted_orig.cbf$(SEXT) - $(SIGNATURE) < converted_flat.cbf > $(DATADIRS)/converted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < converted.cbf > $(DATADIRS)/converted_orig.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5 > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5.cbf > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) - $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) - $(SIGNATURE) < testcell.prt > $(DATADIRS)/testcell_orig.prt$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < XRD1621.cbf > $(DATADIRS)/XRD1621_orig.cbf$(SEXT) - $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) - $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRS)/minicbf_orig.h5$(SEXT) -restore_signatures: restore_output restore_sigs_only - -# -# Basic Tests -# - -basic: $(BIN)/makecbf $(BIN)/img2cif $(BIN)/cif2cbf $(TESTINPUT_BASIC) - $(LDPREFIX) $(BIN)/makecbf example.mar2300 makecbf.cbf - $(LDPREFIX) $(BIN)/img2cif -c flatpacked -m headers -d digest \ - -e base64 example.mar2300 img2cif_packed.cif - $(LDPREFIX) $(BIN)/img2cif -c canonical -m headers -d digest \ - -e base64 example.mar2300 img2cif_canonical.cif - $(LDPREFIX) $(BIN)/img2cif -c flatpacked -m headers -d digest \ - -e none example.mar2300 img2cif_packed.cbf - $(LDPREFIX) $(BIN)/img2cif -c canonical -m headers -d digest \ - -e none example.mar2300 img2cif_canonical.cbf - $(LDPREFIX) $(BIN)/cif2cbf -e none -c flatpacked \ - img2cif_canonical.cif cif2cbf_packed.cbf - $(LDPREFIX) $(BIN)/cif2cbf -e none -c canonical \ - img2cif_packed.cif cif2cbf_canonical.cbf - -cmp cif2cbf_packed.cbf makecbf.cbf - -cmp cif2cbf_packed.cbf img2cif_packed.cbf - -cmp cif2cbf_canonical.cbf img2cif_canonical.cbf - - -# -# Extra Tests -# -$(MINICBF_TEST)/minicbf.h5: - cd $(MINICBF_TEST); $(LDPREFIX) $(TIME) $(BIN)/minicbf2nexus -c zlib \ - -C config $(HDF5REGISTER) -o minicbf.h5 ../X4_lots_M1S4_1_*.cbf -mb_LP_1_001.cbf: - $(LDPREFIX) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - - - -ifneq ($(F90C),) -extra: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf \ - $(BIN)/minicbf2nexus $(BIN)/cbf2nexus $(BIN)/nexus2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf \ - $(BIN)/testhdf5 $(BIN)/testalloc \ - $(BIN_TESTULP) \ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUT) $(EXAMPLES)/batch_convert_minicbf.sh \ - $(TEMPLATES)/template_X4_lots_M1S4.cbf -else -extra: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf \ - $(BIN)/minicbf2nexus $(BIN)/cbf2nexus $(BIN)/nexus2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf $(BIN)/cbf2adscimg \ - $(BIN)/testhdf5 $(BIN)/testalloc \ - $(BIN_TESTULP) \ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUT) $(EXAMPLES)/batch_convert_minicbf.sh -endif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e hex -c none \ - makecbf.cbf cif2cbf_ehcn.cif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ - cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf -F example.mar2300 converted_flat.cbf - -cmp converted_flat.cbf converted_flat_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf example.mar2300 converted.cbf - -cmp converted.cbf converted_orig.cbf - -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat > testcell.prt - -cmp testcell.prt testcell_orig.prt - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -cmp adscconverted_flat.cbf adscconverted_flat_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -cmp adscconverted.cbf adscconverted_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -cmp mb_LP_1_001.cbf mb_LP_1_001_orig.cbf -ifneq ($(CLEANTESTS),) - mv mb_LP_1_001.cbf nmb_LP_1_001.cbf -else - cp mb_LP_1_001.cbf nmb_LP_1_001.cbf -endif - $(LDPREFIX) $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf - -cmp nmb_LP_1_001.img mb_LP_1_001.img - rm nmb_LP_1_001.cbf -ifneq ($(CLEANTESTS),) - rm nmb_LP_1_001.img -endif - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -cmp insulin_pilatus6mconverted.cbf insulin_pilatus6mconverted_rev_orig.cbf - -$(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -cmp insulin_pilatus6mconverted_v2.cbf insulin_pilatus6mconverted_v2_orig.cbf - (CBF_CONVERT_MINICBF_PATH=$(BIN); export CBF_CONVERT_MINICBF_PATH; \ - $(LDPREFIX) $(EXAMPLES)/batch_convert_minicbf.sh "." "minicbf_test" \ - "X4_lots_M1S4_1_*.cbf" $(TEMPLATES)/template_X4_lots_M1S4.cbf) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w -O $(HDF5REGISTER) -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encI.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encp.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cb -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encb.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cc -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encc.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cz -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encz.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cl -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encl.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -c2 -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(H5DUMP) insulin_pilatus6mconverted_orig.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted_orig.cbf.h5.dump) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(H5DUMP) insulin_pilatus6mconverted.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted.cbf.h5.dump) - -$(DIFF) insulin_pilatus6mconverted_orig.cbf.h5.dump insulin_pilatus6mconverted.cbf.h5.dump - -rm -f insulin_pilatus6mconverted_orig.cbf.h5.dump - -rm -f insulin_pilatus6mconverted.cbf.h5.dump - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_orig.cbf.h5.cbf -o insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf.h5 -o insulin_pilatus6mconverted.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted.cbf.h5.cbf -o insulin_pilatus6mconverted.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encp.cbf.h5 -o insulin_pilatus6mconverted_encp.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encp.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encb.cbf.h5 -o insulin_pilatus6mconverted_encb.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encb.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encI.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encI.cbf.h5.cbf -o insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encc.cbf.h5 -o insulin_pilatus6mconverted_encc.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encc.cbf.h5.cbf -o insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encz.cbf.h5 -o insulin_pilatus6mconverted_encz.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encz.cbf.h5.cbf -o insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encl.cbf.h5 -o insulin_pilatus6mconverted_encl.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encl.cbf.h5.cbf -o insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_enc2.cbf.h5 -o insulin_pilatus6mconverted_enc2.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_enc2.cbf.h5.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -rm -f insulin_pilatus6mconverted*.cbf.h5.eqcI.cbf - $(LDPREFIX) $(TINE) $(BIN)/test_cbf_airy_disk - $(LDPREFIX) $(TIME) $(BIN)/cbf_testxfelread - $(LDPREFIX) $(TIME) $(BIN)/testalloc - $(LDPREFIX) $(TIME) $(BIN)/testhdf5; rm -f testfile.h5 -ifneq ($(CBF_USE_ULP),) - $(LDPREFIX) $(TIME) $(BIN)/testulp -endif - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/minicbf2nexus -c zlib \ - -C config $(HDF5REGISTER) -o minicbf.h5 ../X4_lots_M1S4_1_*.cbf - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) ../minicbf_orig.h5 | $(ALLBUTONE) > minicbf_original.dump - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) minicbf.h5 | $(ALLBUTONE) > minicbf.dump - -cd $(MINICBF_TEST); $(DIFF) minicbf_original.dump minicbf.dump - $(LDPREFIX) cd $(MINICBF_TEST); rm -f minicbf_original.dump - $(LDPREFIX) cd $(MINICBF_TEST); rm -f minicbf.dump - #cd $(MINICBF_TEST); rm -f minicbf.h5 - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/cbf2nexus -c zlib \ - --list -o i19-1.h5 ../1191_00005.cbf - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/nexus2cbf \ - -o i19-1.cbf i19-1.h5 - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/cbf2nexus -c zlib \ - --list -o i19-2.h5 i19-1.cbf - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/nexus2cbf \ - -o i19-2.cbf i19-2.h5 - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) i19-1.h5 | $(ALLBUTONE) > i19-1.dump - $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) i19-2.h5 | $(ALLBUTONE) > i19-2.dump - -cd $(MINICBF_TEST); $(DIFF) i19-1.dump i19-2.dump - -cd $(MINICBF_TEST); $(DIFF) i19-1.cbf i19-2.cbf - $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf -ifneq ($(F90C),) - $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatout.out) - -$(DIFF) test_xds_bin_testflatout.out test_xds_bin_testflatout_orig.out - $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatpackedout.out) - -$(DIFF) test_xds_bin_testflatpackedout.out test_xds_bin_testflatpackedout_orig.out - $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatout.out) - -$(DIFF) test_fcb_read_testflatout.out test_fcb_read_testflatout_orig.out - $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatpackedout.out) - -$(DIFF) test_fcb_read_testflatpackedout.out test_fcb_read_testflatpackedout_orig.out -endif - $(LDPREFIX) $(TIME) $(BIN)/sauter_test - $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - -$(DIFF) XRD1621.cbf XRD1621_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(DIFF) XRD1621_I4encbC100.cbf XRD1621_I4encbC100_orig.cbf - -ifneq ($(F90C),) -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf \ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -else -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf\ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -endif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e hex -c none \ - makecbf.cbf cif2cbf_ehcn.cif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ - cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F example.mar2300 converted_flat.cbf - -$(SIGNATURE) < converted_flat.cbf | $(DIFF) - converted_flat_orig.cbf$(SEXT); rm converted_flat.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image example.mar2300 converted.cbf - -$(SIGNATURE) < converted.cbf | $(DIFF) - converted_orig.cbf$(SEXT); rm converted.cbf - -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat | \ - $(SIGNATURE) | $(DIFF) - testcell_orig.prt$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -$(SIGNATURE) < adscconverted_flat.cbf | $(DIFF) - adscconverted_flat_orig.cbf$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -$(SIGNATURE) < adscconverted.cbf | $(DIFF) - adscconverted_orig.cbf$(SEXT); rm adscconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -$(SIGNATURE) < mb_LP_1_001.cbf | $(DIFF) - mb_LP_1_001_orig.cbf$(SEXT) - mv mb_LP_1_001.cbf nmb_LP_1_001.cbf - $(LDPREFIX) $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf - -cmp nmb_LP_1_001.img mb_LP_1_001.img - rm nmb_LP_1_001.cbf - rm nmb_LP_1_001.img - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted.cbf | $(DIFF) - insulin_pilatus6mconverted_rev_orig.cbf$(SEXT); rm insulin_pilatus6mconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf | $(DIFF) - insulin_pilatus6mconverted_v2_orig.cbf$(SEXT); rm insulin_pilatus6mconverted_v2.cbf - $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf -ifneq ($(F90C),) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatpackedout_orig.out$(SEXT) -endif - $(LDPREFIX) $(TIME) $(BIN)/sauter_test - $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(SIGNATURE) < XRD1621.cbf | $(DIFF) - XRD1621_orig.cbf$(SEXT); rm XRD1621.cbf - -$(SIGNATURE) < XRD1621_I4encbC100.cbf | $(DIFF) - XRD1621_I4encbC100_orig.cbf$(SEXT); rm XRD1621_I4encbC100.cbf - @-rm -f adscconverted_flat.cbf - @-rm -f $(TESTINPUT_BASIC) $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) - @-rm -f cif2cbf_packed.cbf makecbf.cbf \ - cif2cbf_packed.cbf img2cif_packed.cbf \ - cif2cbf_canonical.cbf img2cif_canonical.cbf - @-rm -f testrealout.cbf testflatout.cbf testflatpackedout.cbf \ - cif2cbf_encp.cbf img2cif_canonical.cif img2cif_packed.cif 9ins.cbf - - - -pycbftests: $(PYCBF)/_pycbf.$(PYCBFEXT) $(BIN)/cbf_standardize_numbers - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test1.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test2.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test3.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test4.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test1.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test2.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py ../hit-20140306005258847.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test1_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test1.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test2_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test2.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test3_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test3.out - - -pycbfinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfinstall - -pycbfuserinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfuserinstall - -javatests: $(BIN)/ctestcbf $(BIN)/testcbf.class $(SOLIB)/libcbf_wrap.so - $(LDPREFIX) $(BIN)/ctestcbf > testcbfc.txt - $(LDPREFIX) java -cp $(JCBF)/cbflib-$(VERSION).jar:$(BIN) testcbf > testcbfj.txt - $(DIFF) testcbfc.txt testcbfj.txt - -dectristests: $(BIN)/cbf_template_t $(TEMPLATES)/cbf_test_orig.out - $(LDPREFIX) (cd templates; ../bin/cbf_template_t; diff -a -u cbf_test_orig.out cbf_template_t.out) - -# -# Remove all non-source files -# -empty: - @-rm -rf $(LIB)/* - @-rm -rf $(INCLUDE)/bitshuf* - @-rm -rf $(INCLUDE)/bshuf* - @-rm -rf $(INCLUDE)/H5* - @-rm -rf $(BIN)/* - @-rm -f $(PYCBF)/_pycbf.$(PYCBFEXT) - @-rm -rf $(PYCBF)/build/* - @-rm -f $(PYCBF)/newtest1.cbf - @-rm -f $(PYCBF)/fel_test1.out - @-rm -f $(PYCBF)/fel_test2.out - @-rm -f $(PYCBF)/setup.py - @-rm -f $(PYCBF)/setup_MINGW.py - @-rm -f makecbf.cbf - @-rm -f img2cif_packed.cif - @-rm -f img2cif_canonical.cif - @-rm -f img2cif_packed.cbf - @-rm -f img2cif_canonical.cbf - @-rm -f img2cif_raw.cbf - @-rm -f cif2cbf_packed.cbf - @-rm -f cif2cbf_canonical.cbf - @-rm -f converted.cbf - @-rm -f adscconverted.cbf - @-rm -f converted_flat.cbf - @-rm -f adscconverted_flat.cbf - @-rm -f adscconverted_flat_rev.cbf - @-rm -f mb_LP_1_001.cbf - @-rm -f cif2cbf_ehcn.cif - @-rm -f cif2cbf_encp.cbf - @-rm -f 9ins.cbf - @-rm -f 9ins.cif - @-rm -f testcell.prt - @-rm -f example.mar2300 - @-rm -f converted_orig.cbf - @-rm -f adscconverted_orig.cbf - @-rm -f converted_flat_orig.cbf - @-rm -f adscconverted_flat_orig.cbf - @-rm -f adscconverted_flat_rev_orig.cbf - @-rm -f mb_LP_1_001_orig.cbf - @-rm -f insulin_pilatus6mconverted*.cbf - @-rm -f insulin_pilatus6mconverted*.h5 - @-rm -f insulin_pilatus6m.cbf - @-rm -f testrealin.cbf - @-rm -f testrealout.cbf - @-rm -f testflatin.cbf - @-rm -f testflatout.cbf - @-rm -f testflatpackedin.cbf - @-rm -f testflatpackedout.cbf - @-rm -f CTC.cbf - @-rm -f test_fcb_read_testflatout.out - @-rm -f test_fcb_read_testflatpackedout.out - @-rm -f test_xds_bin_testflatpackedout.out - @-rm -f test_xds_bin_testflatout.out - @-rm -f test_fcb_read_testflatout_orig.out - @-rm -f test_fcb_read_testflatpackedout_orig.out - @-rm -f test_xds_bin_testflatpackedout_orig.out - @-rm -f test_xds_bin_testflatout_orig.out - @-rm -f mb_LP_1_001.img - @-rm -f 9ins.cif - @-rm -f testcell_orig.prt - @-rm -f $(DECTRIS_EXAMPLES)/cbf_template_t.out - @-rm -f XRD1621.cbf - @-rm -f XRD1621_orig.cbf - @-rm -f XRD1621_I4encbC100_orig.cbf - @-rm -f XRD1621_I4encbC100.cbf - @-rm -f minicbf_orig.h5 - @-rm -f $(SRC)/fcb_exit_binary.f90 - @-rm -f $(SRC)/fcb_next_binary.f90 - @-rm -f $(SRC)/fcb_open_cifin.f90 - @-rm -f $(SRC)/fcb_packed.f90 - @-rm -f $(SRC)/fcb_read_bits.f90 - @-rm -f $(SRC)/fcb_read_image.f90 - @-rm -f $(SRC)/fcb_read_xds_i2.f90 - @-rm -f $(EXAMPLES)/test_fcb_read_image.f90 - @-rm -f $(EXAMPLES)/test_xds_binary.f90 - @-rm -f symlinksdone - @-rm -f $(TESTOUTPUT) *$(SEXT) - @-rm -rf $(SOLIB) - @-rm -rf org - @-rm -rf $(JCBF) - @-rm -rf $(REGEX) - @-rm -rf $(REGEX)_install - @-rm -rf $(TIFF) - @-rm -rf $(TIFF)_install - @-rm -rf $(HDF5) - @-rm -rf $(HDF5)_install - @-rm -rf $(INCLUDE)/tiff* - @-rm -rf $(INCLUDE)/H5* - @-rm -rf $(INCLUDE)/hdf5* - @-rm -rf share - @-rm -rf $(MINICBF_TEST)/i19* - @-rm -rf solib - @-rm -f thaumatin_die_M1S5_1_0005_2.cbf - @-rm -f 1191_00005.cbf - @-rm -f XRD1621.tif - @-rm -f md5tmp - @-rm -rf $(PYCBF)/build - @-rm -f *_old - @-rm -f X4_lots_M1S4_1_*.cbf - @-rm -f testfile.h5 - @-rm -f hit-20140306005258847.cbf - @-rm -f build_* - ./.undosymlinks - -# -# Remove temporary files -# -clean: - @-rm -f core - @-rm -f *.o - @-rm -f *.u -# -# Restore to distribution state -# -distclean: clean empty - -# -# Create a Tape Archive for distribution -# - -tar: $(DOCUMENTS) $(SOURCE) $(SRC)/cbf.stx $(HEADERS) $(M4FILES)\ - $(EXAMPLES) \ - README.html README Makefile \ - $(JPEGS) - -/bin/rm -f CBFlib.tar* - tar cvBf CBFlib.tar \ - $(DOCUMENTS) $(SOURCE) $(SRC)/cbf.stx $(HEADERS) $(M4FILES)\ - $(EXAMPLES) \ - README.html README Makefile \ - $(JPEGS) - gzip --best CBFlib.tar - diff --git a/examples/adscimg2cbf.c b/examples/adscimg2cbf.c index e7fa222f..8709b824 100644 --- a/examples/adscimg2cbf.c +++ b/examples/adscimg2cbf.c @@ -28,7 +28,7 @@ static void gethd ( char* field, char* value, char* header ) l = strlen (field); newfield = (char*) malloc ( l + 3 ); *newfield = 10; - strncpy (newfield+1, field, l); + memcpy (newfield+1, field, l); *(newfield+l+1) = '='; *(newfield+l+2) = (char) 0; l += 2; @@ -158,27 +158,27 @@ int main(int argc, char *argv[]) int argtype_array[argc]; int *argtype=argtype_array; int filec; - int file_size, header_size_char, actread; - int cbf_status; - int i, j, k=0; - int size1, size2; - int file_type; - int pack_flags; - int pad_flag; - int status_pclose; - int beam_center_convention; - int add_minicbf_header=0; + int file_size, header_size_char, actread; + int cbf_status; + int i, j, k=0; + int size1, size2; + int file_type; + int pack_flags; + int pad_flag; + int status_pclose; + int beam_center_convention; + int add_minicbf_header=0; int bin=0; int transpose=0; int interleave=0; int *new_int_data, *old_int_data; size_t new_int_data_size, old_int_data_size; - double thickness=0.; + double thickness=0.; const char * argval_array[argc]; const char * * argval=argval_array; - const char * roi=NULL; - const char * thickstr=NULL; - const char * polarstr=NULL; + const char * roi=NULL; + const char * thickstr=NULL; + const char * polarstr=NULL; const char * scalestr=NULL; const char * offsetstr=NULL; const char * cliplowstr=NULL; @@ -186,15 +186,15 @@ int main(int argc, char *argv[]) const char * rad_smoothstr=NULL; const char * ifile=NULL; const char * ofile=NULL; - char * strstrhit; - static char *endings[] = { + char * strstrhit; + static char *endings[] = { ".img", ".img.gz", ".img.bz2", ".img.Z", NULL }; - static char *flags[32] = { + static char *flags[32] = { "--cbf_byte_offset", /* 0 */ "--cbf_packed_v2", /* 1 */ "--cbf_packed", /* 2 */ @@ -229,6 +229,8 @@ int main(int argc, char *argv[]) NULL }; + CBF_UNUSED( cbf_status ); + CBF_UNUSED( thickness ); if(argc < 2) { @@ -242,7 +244,7 @@ int main(int argc, char *argv[]) char modc; if ( argv[iarg][0] == '-' && argv[iarg][1] == '-' ) { for(j = 0; flags[j] != NULL; j++) { - strstrhit = cbf_cistrnstr(argv[iarg], flags[j], strlen(flags[j])); + strstrhit = (char *)cbf_cistrnstr(argv[iarg], flags[j], strlen(flags[j])); if(NULL != strstrhit && strstrhit==argv[iarg] ) break; } diff --git a/examples/adscimg2cbf_sub.c b/examples/adscimg2cbf_sub.c index 135474a3..cd083563 100644 --- a/examples/adscimg2cbf_sub.c +++ b/examples/adscimg2cbf_sub.c @@ -544,7 +544,10 @@ int adscimg2cbf_sub2(char *header, double cliplow, cliphigh; int rad_smooth; - + CBF_UNUSED( smv_bin_type); + CBF_UNUSED( kicm ); + CBF_UNUSED( kjcm ); + if(0 == pack_flags) pack_flags = CBF_BYTE_OFFSET; /* default if 0 is given for "pack_flags" */ @@ -790,7 +793,7 @@ int adscimg2cbf_sub2(char *header, smv_size2, smv_size1); return(1); } - if (convertroi(roi, smv_size1, smv_size2, + if (convertroi((char *)roi, smv_size1, smv_size2, &fastlow, &fasthigh, &slowlow, &slowhigh)) { fprintf(stderr, "adscimg2cbf_sub2: Error: Invalid region of interest '%s'\n", roi); @@ -1724,7 +1727,7 @@ int adscimg2cbf_sub2(char *header, return(1); }; if (log) fprintf(stderr,"minicbf_header messages: \n%s\n", log); - cbf_free_text(&log,NULL); + cbf_free_text((const char **)(&log),NULL); } cbf_failnez (cbf_require_category (cbf, "array_data")); @@ -1870,6 +1873,9 @@ int adscimg2cbf_sub2(char *header, int ivec2cm[2]; double dist2cm; int id,ir; + + CBF_UNUSED( valmax ); + CBF_UNUSED( valnew ); cmi = rint(cmi/cmv); cmj = rint(cmj/cmv); @@ -2072,7 +2078,7 @@ int adscimg2cbf_sub(char *header, int pad_flag){ return adscimg2cbf_sub2(header, data, - NULL,NULL,NULL,NULL, + NULL,0,NULL,NULL, cbf_filename, pack_flags, beam_center_convention, diff --git a/examples/cbf2adscimg_sub.c b/examples/cbf2adscimg_sub.c index d97c422d..4fcb3558 100755 --- a/examples/cbf2adscimg_sub.c +++ b/examples/cbf2adscimg_sub.c @@ -261,6 +261,14 @@ static int cbfhandle2img_sub(cbf_handle cbf, char **header, unsigned short **dat char *fps, *fpe, *vps, *vpe, *cp; const char *direction [2]; + + CBF_UNUSED( dirinc ); + CBF_UNUSED( dirend ); + CBF_UNUSED( dirsta ); + CBF_UNUSED( second ); + CBF_UNUSED( first ); + CBF_UNUSED( colrow ); + /* * Legal, but uninteresting case. diff --git a/examples/cbf_standardize_numbers.c b/examples/cbf_standardize_numbers.c index 7d7d9e3d..b37aca35 100644 --- a/examples/cbf_standardize_numbers.c +++ b/examples/cbf_standardize_numbers.c @@ -40,6 +40,7 @@ int main (int argc, char ** argv) { int termc; int numcomp; int spacestarted; + int baposstarted; int digits = 6; double number, anumber, ascale, fpart; CBF_UNUSED( bracket ); @@ -65,10 +66,23 @@ int main (int argc, char ** argv) { bracket = '\0'; termc = '\0'; spacestarted = 1; + baposstarted = 0; numcomp = 0; while(lineln) { c = *line; c &= 0xFF; + if ( c == 'b' && line[1] == '\'' ) { + baposstarted = 1; + lineln -= 2; + line += 2; + continue; + } + if( c == '\'' && baposstarted ) { + baposstarted = 0; + lineln--; + line++; + continue; + } if (isspace(c) || c == '[' || c == '(' || c == '{') { bracket = c; lineln--; diff --git a/examples/testhdf5.c b/examples/testhdf5.c index beb1f189..a71ea6be 100644 --- a/examples/testhdf5.c +++ b/examples/testhdf5.c @@ -1203,7 +1203,7 @@ static testResult_t testDatasets(const hid_t grp) TEST_CBF_FAIL(cbf_H5Drequire(grp,&dset,"name",2,max,0,buf,H5T_STD_I32LE)); TEST_CBF_FAIL(cbf_H5Drequire(grp,&dset,"name",2,max,cnk,buf,CBF_H5FAIL)); /* check if things work */ - TEST_CBF_PASS(cbf_H5Drequire(grp,0,"dataset_require_0",2,max,cnk,buf,H5T_STD_I32LE)); + TEST_CBF_PASS(cbf_H5Drequire(grp,&dset,"dataset_require_0",2,max,cnk,buf,H5T_STD_I32LE)); TEST_COMPONENT(test_H5Drequire(grp,"dataset_require_1",2,max,cnk,buf,H5T_STD_I32LE)); TEST_COMPONENT(test_H5Drequire(grp,"dataset_require_2",2,max,cnk,0,H5T_STD_I32LE)); TEST_COMPONENT(test_H5Drequire(grp,"dataset_require_3",0,0,cnk,buf,H5T_STD_I32LE)); diff --git a/examples/tif_sprint.c b/examples/tif_sprint.c new file mode 100644 index 00000000..12cd6add --- /dev/null +++ b/examples/tif_sprint.c @@ -0,0 +1,745 @@ +/* tif_sprint.c + + -- variant of tif_print.c for printing to strings + using snprintf + + H. J. Bernstein, 26 Dec 2010 + Revised for 4.0.6 version, 3 Nov 2016 + + */ + +/********************************************************************** + * * + * PORTIONS OF THIS CODE ARE DERIVED FROM CODE IN LIBTIFF AND ARE * + * SUBJECT TO THE FOLLOWING COPYRIGHT NOTICE * + * * + ********************************************************************** + * Copyright (c) 1988-1997 Sam Leffler * + * Copyright (c) 1991-1997 Silicon Graphics, Inc. * + * * + * Permission to use, copy, modify, distribute, and sell this software* + * and its documentation for any purpose is hereby granted without * + * fee, provided that (i) the above copyright notices and this * + * permission notice appear in all copies of the software and related * + * documentation, and (ii) the names of Sam Leffler and Silicon * + * Graphics may not be used in any advertising or publicity relating * + * to the software without the specific, prior written permission of * + * Sam Leffler and Silicon Graphics. * + * * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * + * * + * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR * + * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY * + * KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA * + * OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, * + * AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION * + * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * + **********************************************************************/ + +#include "tiffiop.h" +#include + +#include + +static size_t +_TIFFsnprintAsciiBounded(char * str, const size_t xstrlen, const char* cp, size_t max_chars); + +static const char *photoNames[] = { + "min-is-white", /* PHOTOMETRIC_MINISWHITE */ + "min-is-black", /* PHOTOMETRIC_MINISBLACK */ + "RGB color", /* PHOTOMETRIC_RGB */ + "palette color (RGB from colormap)", /* PHOTOMETRIC_PALETTE */ + "transparency mask", /* PHOTOMETRIC_MASK */ + "separated", /* PHOTOMETRIC_SEPARATED */ + "YCbCr", /* PHOTOMETRIC_YCBCR */ + "7 (0x7)", + "CIE L*a*b*", /* PHOTOMETRIC_CIELAB */ + "ICC L*a*b*", /* PHOTOMETRIC_ICCLAB */ + "ITU L*a*b*" /* PHOTOMETRIC_ITULAB */ +}; +#define NPHOTONAMES (sizeof (photoNames) / sizeof (photoNames[0])) + +static const char *orientNames[] = { + "0 (0x0)", + "row 0 top, col 0 lhs", /* ORIENTATION_TOPLEFT */ + "row 0 top, col 0 rhs", /* ORIENTATION_TOPRIGHT */ + "row 0 bottom, col 0 rhs", /* ORIENTATION_BOTRIGHT */ + "row 0 bottom, col 0 lhs", /* ORIENTATION_BOTLEFT */ + "row 0 lhs, col 0 top", /* ORIENTATION_LEFTTOP */ + "row 0 rhs, col 0 top", /* ORIENTATION_RIGHTTOP */ + "row 0 rhs, col 0 bottom", /* ORIENTATION_RIGHTBOT */ + "row 0 lhs, col 0 bottom", /* ORIENTATION_LEFTBOT */ +}; +#define NORIENTNAMES (sizeof (orientNames) / sizeof (orientNames[0])) + +static size_t +_TIFFSNPrintField(char * str, const size_t xstrlen, const TIFFField *fip, + uint32 value_count, void *raw_data) +{ + uint32 j; + + size_t chars_used = 0; + + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " %s: ", fip->field_name); + + for(j = 0; j < value_count; j++) { + if(fip->field_type == TIFF_BYTE) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%u", ((uint8 *) raw_data)[j]); + else if(fip->field_type == TIFF_UNDEFINED) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "0x%x", + (unsigned int) ((unsigned char *) raw_data)[j]); + else if(fip->field_type == TIFF_SBYTE) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%d", ((int8 *) raw_data)[j]); + else if(fip->field_type == TIFF_SHORT) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%u", ((uint16 *) raw_data)[j]); + else if(fip->field_type == TIFF_SSHORT) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%d", ((int16 *) raw_data)[j]); + else if(fip->field_type == TIFF_LONG) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%lu", + (unsigned long)((uint32 *) raw_data)[j]); + else if(fip->field_type == TIFF_SLONG) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%ld", (long)((int32 *) raw_data)[j]); + else if(fip->field_type == TIFF_IFD) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "0x%lx", + (unsigned long)((uint32 *) raw_data)[j]); + else if(fip->field_type == TIFF_RATIONAL + || fip->field_type == TIFF_SRATIONAL + || fip->field_type == TIFF_FLOAT) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%f", ((float *) raw_data)[j]); + else if(fip->field_type == TIFF_LONG8) +#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%I64u", + (unsigned __int64)((uint64 *) raw_data)[j]); +#else + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%llu", + (unsigned long long)((uint64 *) raw_data)[j]); +#endif + else if(fip->field_type == TIFF_SLONG8) +#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%I64d", (__int64)((int64 *) raw_data)[j]); +#else + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%lld", (long long)((int64 *) raw_data)[j]); +#endif + else if(fip->field_type == TIFF_IFD8) +#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "0x%I64x", + (unsigned __int64)((uint64 *) raw_data)[j]); +#else + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "0x%llx", + (unsigned long long)((uint64 *) raw_data)[j]); +#endif + else if(fip->field_type == TIFF_FLOAT) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%f", ((float *)raw_data)[j]); + else if(fip->field_type == TIFF_DOUBLE) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%f", ((double *) raw_data)[j]); + else if(fip->field_type == TIFF_ASCII) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%s", (char *) raw_data); + break; + } + else { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), ""); + break; + } + + if(j < value_count - 1) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), ","); + } + + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "\n"); + + return chars_used; +} + +static size_t +_TIFFPrettySNPrintField(TIFF* tif, char * str, const size_t xstrlen, ttag_t tag, + uint32 value_count, void *raw_data) +{ + TIFFDirectory *td = &tif->tif_dir; + + const TIFFFieldInfo *fip; + + size_t chars_used = 0; + + fip = TIFFFieldWithTag(tif, tag); + + switch (tag) + { + case TIFFTAG_INKSET: + if (value_count == 2 && fip->field_type == TIFF_SHORT) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Ink Set: "); + switch (*((uint16*)raw_data)) { + case INKSET_CMYK: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "CMYK\n"); + break; + default: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%u (0x%x)\n", + *((uint16*)raw_data), + *((uint16*)raw_data)); + break; + } + return chars_used; + } + return chars_used; + + case TIFFTAG_DOTRANGE: + if (value_count == 2 && fip->field_type == TIFF_SHORT) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Dot Range: %u-%u\n", + ((uint16*)raw_data)[0], ((uint16*)raw_data)[1]); + return chars_used; + } + return chars_used; + + case TIFFTAG_WHITEPOINT: + if (value_count == 2 && fip->field_type == TIFF_RATIONAL) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " White Point: %g-%g\n", + ((float *)raw_data)[0], ((float *)raw_data)[1]); + return chars_used; + } + return chars_used; + + case TIFFTAG_XMLPACKET: + { + uint32 i; + + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " XMLPacket (XMP Metadata):\n" ); + for(i = 0; i < value_count; i++) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0),"%c",(int)((char *)raw_data)[i]); + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "\n" ); + return chars_used; + } + case TIFFTAG_RICHTIFFIPTC: + /* + * XXX: for some weird reason RichTIFFIPTC tag + * defined as array of LONG values. + */ + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), + " RichTIFFIPTC Data: , %lu bytes\n", + (unsigned long) value_count * 4); + return chars_used; + + case TIFFTAG_PHOTOSHOP: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Photoshop Data: , %lu bytes\n", + (unsigned long) value_count); + return chars_used; + + case TIFFTAG_ICCPROFILE: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " ICC Profile: , %lu bytes\n", + (unsigned long) value_count); + return chars_used; + + case TIFFTAG_STONITS: + if (value_count == 1 && fip->field_type == TIFF_DOUBLE) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), + " Sample to Nits conversion factor: %.4e\n", + *((double*)raw_data)); + return chars_used; + } + return chars_used; + } + + return chars_used; +} + +/* + * Print the contents of the current directory + * to the specified stdio file stream. + */ +size_t +TIFFSNPrintDirectory(TIFF* tif, char * str, const size_t xstrlen, long flags) +{ + TIFFDirectory *td = &tif->tif_dir; + char *sep; + uint16 i; + long l, n; + + size_t chars_used = 0; + +#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "TIFF Directory at offset 0x%I64x (%I64u)\n", + (unsigned __int64) tif->tif_diroff, + (unsigned __int64) tif->tif_diroff); +#else + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "TIFF Directory at offset 0x%llx (%llu)\n", + (unsigned long long) tif->tif_diroff, + (unsigned long long) tif->tif_diroff); +#endif + if (TIFFFieldSet(tif,FIELD_SUBFILETYPE)) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Subfile Type:"); + sep = " "; + if (td->td_subfiletype & FILETYPE_REDUCEDIMAGE) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%sreduced-resolution image", sep); + sep = "/"; + } + if (td->td_subfiletype & FILETYPE_PAGE) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%smulti-page document", sep); + sep = "/"; + } + if (td->td_subfiletype & FILETYPE_MASK) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%stransparency mask", sep); + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " (%lu = 0x%lx)\n", + (long) td->td_subfiletype, (long) td->td_subfiletype); + } + if (TIFFFieldSet(tif,FIELD_IMAGEDIMENSIONS)) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Image Width: %lu Image Length: %lu", + (unsigned long) td->td_imagewidth, (unsigned long) td->td_imagelength); + if (TIFFFieldSet(tif,FIELD_IMAGEDEPTH)) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Image Depth: %lu", + (unsigned long) td->td_imagedepth); + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "\n"); + } + if (TIFFFieldSet(tif,FIELD_TILEDIMENSIONS)) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Tile Width: %lu Tile Length: %lu", + (unsigned long) td->td_tilewidth, (unsigned long) td->td_tilelength); + if (TIFFFieldSet(tif,FIELD_TILEDEPTH)) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Tile Depth: %lu", + (unsigned long) td->td_tiledepth); + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "\n"); + } + if (TIFFFieldSet(tif,FIELD_RESOLUTION)) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Resolution: %g, %g", + td->td_xresolution, td->td_yresolution); + if (TIFFFieldSet(tif,FIELD_RESOLUTIONUNIT)) { + switch (td->td_resolutionunit) { + case RESUNIT_NONE: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " (unitless)"); + break; + case RESUNIT_INCH: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " pixels/inch"); + break; + case RESUNIT_CENTIMETER: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " pixels/cm"); + break; + default: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " (unit %u = 0x%x)", + td->td_resolutionunit, + td->td_resolutionunit); + break; + } + } + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "\n"); + } + if (TIFFFieldSet(tif,FIELD_POSITION)) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Position: %g, %g\n", + td->td_xposition, td->td_yposition); + if (TIFFFieldSet(tif,FIELD_BITSPERSAMPLE)) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Bits/Sample: %u\n", td->td_bitspersample); + if (TIFFFieldSet(tif,FIELD_SAMPLEFORMAT)) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Sample Format: "); + switch (td->td_sampleformat) { + case SAMPLEFORMAT_VOID: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "void\n"); + break; + case SAMPLEFORMAT_INT: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "signed integer\n"); + break; + case SAMPLEFORMAT_UINT: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "unsigned integer\n"); + break; + case SAMPLEFORMAT_IEEEFP: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "IEEE floating point\n"); + break; + case SAMPLEFORMAT_COMPLEXINT: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "complex signed integer\n"); + break; + case SAMPLEFORMAT_COMPLEXIEEEFP: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "complex IEEE floating point\n"); + break; + default: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%u (0x%x)\n", + td->td_sampleformat, td->td_sampleformat); + break; + } + } + if (TIFFFieldSet(tif,FIELD_COMPRESSION)) { + const TIFFCodec* c = TIFFFindCODEC(td->td_compression); + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Compression Scheme: "); + if (c) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%s\n", c->name); + else + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%u (0x%x)\n", + td->td_compression, td->td_compression); + } + if (TIFFFieldSet(tif,FIELD_PHOTOMETRIC)) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Photometric Interpretation: "); + if (td->td_photometric < NPHOTONAMES) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%s\n", photoNames[td->td_photometric]); + else { + switch (td->td_photometric) { + case PHOTOMETRIC_LOGL: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "CIE Log2(L)\n"); + break; + case PHOTOMETRIC_LOGLUV: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "CIE Log2(L) (u',v')\n"); + break; + default: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%u (0x%x)\n", + td->td_photometric, td->td_photometric); + break; + } + } + } + if (TIFFFieldSet(tif,FIELD_EXTRASAMPLES) && td->td_extrasamples) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Extra Samples: %u<", td->td_extrasamples); + sep = ""; + for (i = 0; i < td->td_extrasamples; i++) { + switch (td->td_sampleinfo[i]) { + case EXTRASAMPLE_UNSPECIFIED: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%sunspecified", sep); + break; + case EXTRASAMPLE_ASSOCALPHA: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%sassoc-alpha", sep); + break; + case EXTRASAMPLE_UNASSALPHA: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%sunassoc-alpha", sep); + break; + default: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%s%u (0x%x)", sep, + td->td_sampleinfo[i], td->td_sampleinfo[i]); + break; + } + sep = ", "; + } + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), ">\n"); + } + if (TIFFFieldSet(tif,FIELD_INKNAMES)) { + char* cp; + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Ink Names: "); + i = td->td_samplesperpixel; + sep = ""; + for (cp = td->td_inknames; + i > 0 && cp < td->td_inknames + td->td_inknameslen; + cp = strchr(cp,'\0')+1, i--) { + size_t max_chars = + td->td_inknameslen - (cp - td->td_inknames); + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0),sep); + chars_used += _TIFFsnprintAsciiBounded(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), cp, max_chars); + sep = ", "; + } + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0),"\n"); + } + if (TIFFFieldSet(tif,FIELD_THRESHHOLDING)) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Thresholding: "); + switch (td->td_threshholding) { + case THRESHHOLD_BILEVEL: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "bilevel art scan\n"); + break; + case THRESHHOLD_HALFTONE: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "halftone or dithered scan\n"); + break; + case THRESHHOLD_ERRORDIFFUSE: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "error diffused\n"); + break; + default: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%u (0x%x)\n", + td->td_threshholding, td->td_threshholding); + break; + } + } + if (TIFFFieldSet(tif,FIELD_FILLORDER)) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " FillOrder: "); + switch (td->td_fillorder) { + case FILLORDER_MSB2LSB: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "msb-to-lsb\n"); + break; + case FILLORDER_LSB2MSB: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "lsb-to-msb\n"); + break; + default: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%u (0x%x)\n", + td->td_fillorder, td->td_fillorder); + break; + } + } + if (TIFFFieldSet(tif,FIELD_YCBCRSUBSAMPLING)) + { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " YCbCr Subsampling: %u, %u\n", + td->td_ycbcrsubsampling[0], td->td_ycbcrsubsampling[1] ); + } + if (TIFFFieldSet(tif,FIELD_YCBCRPOSITIONING)) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " YCbCr Positioning: "); + switch (td->td_ycbcrpositioning) { + case YCBCRPOSITION_CENTERED: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "centered\n"); + break; + case YCBCRPOSITION_COSITED: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "cosited\n"); + break; + default: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%u (0x%x)\n", + td->td_ycbcrpositioning, td->td_ycbcrpositioning); + break; + } + } + if (TIFFFieldSet(tif,FIELD_HALFTONEHINTS)) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Halftone Hints: light %u dark %u\n", + td->td_halftonehints[0], td->td_halftonehints[1]); + if (TIFFFieldSet(tif,FIELD_ORIENTATION)) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Orientation: "); + if (td->td_orientation < NORIENTNAMES) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%s\n", orientNames[td->td_orientation]); + else + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%u (0x%x)\n", + td->td_orientation, td->td_orientation); + } + if (TIFFFieldSet(tif,FIELD_SAMPLESPERPIXEL)) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Samples/Pixel: %u\n", td->td_samplesperpixel); + if (TIFFFieldSet(tif,FIELD_ROWSPERSTRIP)) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Rows/Strip: "); + if (td->td_rowsperstrip == (uint32) -1) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "(infinite)\n"); + else + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%lu\n", (unsigned long) td->td_rowsperstrip); + } + if (TIFFFieldSet(tif,FIELD_MINSAMPLEVALUE)) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Min Sample Value: %u\n", td->td_minsamplevalue); + if (TIFFFieldSet(tif,FIELD_MAXSAMPLEVALUE)) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Max Sample Value: %u\n", td->td_maxsamplevalue); + if (TIFFFieldSet(tif,FIELD_SMINSAMPLEVALUE)) { + int count = (tif->tif_flags & TIFF_PERSAMPLE) ? td->td_samplesperpixel : 1; + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " SMin Sample Value:"); + for (i = 0; i < count; ++i) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " %g", td->td_sminsamplevalue[i]); + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "\n"); + } + if (TIFFFieldSet(tif,FIELD_SMAXSAMPLEVALUE)) { + int count = (tif->tif_flags & TIFF_PERSAMPLE) ? td->td_samplesperpixel : 1; + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " SMax Sample Value:"); + for (i = 0; i < count; ++i) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " %g", td->td_smaxsamplevalue[i]); + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "\n"); + } + if (TIFFFieldSet(tif,FIELD_PLANARCONFIG)) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Planar Configuration: "); + switch (td->td_planarconfig) { + case PLANARCONFIG_CONTIG: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "single image plane\n"); + break; + case PLANARCONFIG_SEPARATE: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "separate image planes\n"); + break; + default: + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "%u (0x%x)\n", + td->td_planarconfig, td->td_planarconfig); + break; + } + } + if (TIFFFieldSet(tif,FIELD_PAGENUMBER)) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Page Number: %u-%u\n", + td->td_pagenumber[0], td->td_pagenumber[1]); + if (TIFFFieldSet(tif,FIELD_COLORMAP)) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Color Map: "); + if (flags & TIFFPRINT_COLORMAP) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "\n"); + n = 1L<td_bitspersample; + for (l = 0; l < n; l++) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " %5lu: %5u %5u %5u\n", + l, + td->td_colormap[0][l], + td->td_colormap[1][l], + td->td_colormap[2][l]); + } else + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "(present)\n"); + } + if (TIFFFieldSet(tif,FIELD_REFBLACKWHITE)) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Reference Black/White:\n"); + for (i = 0; i < 3; i++) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " %2d: %5g %5g\n", i, + td->td_refblackwhite[2*i+0], + td->td_refblackwhite[2*i+1]); + } + if (TIFFFieldSet(tif,FIELD_TRANSFERFUNCTION)) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " Transfer Function: "); + if (flags & TIFFPRINT_CURVES) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "\n"); + n = 1L<td_bitspersample; + for (l = 0; l < n; l++) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " %2lu: %5u", + l, td->td_transferfunction[0][l]); + for (i = 1; i < td->td_samplesperpixel; i++) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " %5u", + td->td_transferfunction[i][l]); + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0),"\n"); + + } + } else + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "(present)\n"); + } + if (TIFFFieldSet(tif, FIELD_SUBIFD) && (td->td_subifd)) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " SubIFD Offsets:"); + for (i = 0; i < td->td_nsubifd; i++) +#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " %5I64u", + (unsigned __int64) td->td_subifd[i]); +#else + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " %5llu", + (unsigned long long) td->td_subifd[i]); +#endif + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0),"\n"); + } + + /* + ** Custom tag support. + */ + { + int i; + short count; + + count = (short) TIFFGetTagListCount(tif); + for(i = 0; i < count; i++) { + uint32 tag = TIFFGetTagListEntry(tif, i); + const TIFFField *fip; + uint32 value_count; + int mem_alloc = 0; + void *raw_data; + + fip = TIFFFieldWithTag(tif, tag); + if(fip == NULL) + continue; + + if(fip->field_passcount) { + if (fip->field_readcount == TIFF_VARIABLE2 ) { + if(TIFFGetField(tif, tag, &value_count, &raw_data) != 1) + continue; + } else if (fip->field_readcount == TIFF_VARIABLE ) { + uint16 small_value_count; + if(TIFFGetField(tif, tag, &small_value_count, &raw_data) != 1) + continue; + value_count = small_value_count; + } else { + assert (fip->field_readcount == TIFF_VARIABLE + || fip->field_readcount == TIFF_VARIABLE2); + continue; + } + } else { + if (fip->field_readcount == TIFF_VARIABLE + || fip->field_readcount == TIFF_VARIABLE2) + value_count = 1; + else if (fip->field_readcount == TIFF_SPP) + value_count = td->td_samplesperpixel; + else + value_count = fip->field_readcount; + if (fip->field_tag == TIFFTAG_DOTRANGE + && strcmp(fip->field_name,"DotRange") == 0) { + /* TODO: This is an evil exception and should not have been + handled this way ... likely best if we move it into + the directory structure with an explicit field in + libtiff 4.1 and assign it a FIELD_ value */ + static uint16 dotrange[2]; + raw_data = dotrange; + TIFFGetField(tif, tag, dotrange+0, dotrange+1); + } else if (fip->field_type == TIFF_ASCII + || fip->field_readcount == TIFF_VARIABLE + || fip->field_readcount == TIFF_VARIABLE2 + || fip->field_readcount == TIFF_SPP + || value_count > 1) { + if(TIFFGetField(tif, tag, &raw_data) != 1) + continue; + } else { + raw_data = _TIFFmalloc( + _TIFFDataSize(fip->field_type) + * value_count); + mem_alloc = 1; + if(TIFFGetField(tif, tag, raw_data) != 1) { + _TIFFfree(raw_data); + continue; + } + } + } + + /* + * Catch the tags which needs to be specially handled + * and pretty print them. If tag not handled in + * _TIFFPrettyPrintField() fall down and print it as + * any other tag. + */ + { + size_t cut; + if ((cut=_TIFFPrettySNPrintField(tif, str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), tag, value_count, raw_data))) { + chars_used+=cut; + if(mem_alloc) + _TIFFfree(raw_data); + continue; + } + else + chars_used += _TIFFSNPrintField(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), fip, value_count, raw_data); + } + + if(mem_alloc) + _TIFFfree(raw_data); + } + } + + + /* _TIFFFillStriles( tif ); */ + + if ((flags & TIFFPRINT_STRIPS) && + TIFFFieldSet(tif,FIELD_STRIPOFFSETS)) { + uint32 s; + + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " %lu %s:\n", + (long) td->td_nstrips, + isTiled(tif) ? "Tiles" : "Strips"); + for (s = 0; s < td->td_nstrips; s++) +#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " %3lu: [%8I64u, %8I64u]\n", + (unsigned long) s, + (unsigned __int64) td->td_stripoffset[s], + (unsigned __int64) td->td_stripbytecount[s]); +#else + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " %3lu: [%8llu, %8llu]\n", + (unsigned long) s, + (unsigned long long) td->td_stripoffset[s], + (unsigned long long) td->td_stripbytecount[s]); +#endif + } + return chars_used; +} + +size_t +_TIFFsnprintAscii(char * str, const size_t xstrlen, const char* cp) +{ + return _TIFFsnprintAsciiBounded( str, xstrlen, cp, strlen(cp)); +} + +static size_t +_TIFFsnprintAsciiBounded(char * str, const size_t xstrlen, const char* cp, size_t max_chars) +{ + size_t chars_used=0; + for (; max_chars > 0 && *cp != '\0'; cp++, max_chars--) { + const char* tp; + + if (isprint((int)*cp)) { + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0),"%c",*cp); + continue; + } + for (tp = "\tt\bb\rr\nn\vv"; *tp; tp++) + if (*tp++ == *cp) + break; + if (*tp) + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "\\%c", *tp); + else + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "\\%03o", *cp & 0xff); + } + return chars_used; +} + +size_t +_TIFFsnprintAsciiTag(char * str, const size_t xstrlen, const char* name, const char* value) +{ + size_t chars_used=0; + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), " %s: \"", name); + chars_used += _TIFFsnprintAscii(str+chars_used, xstrlen, value); + chars_used += snprintf(str+chars_used, ((xstrlen>chars_used)?xstrlen-chars_used:0), "\"\n"); + return chars_used; +} + +/* vim: set ts=8 sts=8 sw=8 noet: */ +/* + * Local Variables: + * mode: c + * c-basic-offset: 8 + * fill-column: 78 + * End: + */ diff --git a/include/cbf.h b/include/cbf.h index 3d0eb846..eda37766 100644 --- a/include/cbf.h +++ b/include/cbf.h @@ -1,7 +1,7 @@ /********************************************************************** * cbf.h -- cbflib basic API functions * * * - * Version 0.8.0 20 July 2008 * + * Version 0.9.7 13 June 2021 * * * * Paul Ellis and * * Herbert J. Bernstein (yaya@bernstein-plus-sons.com) * @@ -362,7 +362,7 @@ _CBF_STR(CBF_VERS_RELEASE) CBF_VERS_SUBRELEASE /* API version and assumed dictionary version */ -#define CBF_API_VERSION "CBFlib v0.9.6" +#define CBF_API_VERSION "CBFlib v0.9.7" #define CBF_DIC_VERSION "CBF: VERSION 1.7.11" /* Maximum line length */ diff --git a/include/img.h b/include/img.h index afd2335e..b3fd6677 100644 --- a/include/img.h +++ b/include/img.h @@ -128,6 +128,10 @@ extern "C" { int img_get_dimension (img_handle img, int dimension); + void * img_memcpy(void * dst, + const void * src, + const size_t n); + #ifdef __cplusplus } diff --git a/m4/Makefile.m4 b/m4/Makefile.m4 index fe698409..f4d4e273 100644 --- a/m4/Makefile.m4 +++ b/m4/Makefile.m4 @@ -1,5 +1,5 @@ -m4_define(`cbf_version',`0.9.6')m4_dnl -m4_define(`cbf_date',`19 May 2020')m4_dnl +m4_define(`cbf_version',`0.9.7')m4_dnl +m4_define(`cbf_date',`28 June 2021')m4_dnl m4_ifelse(cbf_system,`',`m4_define(`cbf_system',`LINUX')') `###################################################################### # Makefile - command file for make to create CBFlib # @@ -9,7 +9,7 @@ m4_ifelse(cbf_system,`',`m4_define(`cbf_system',`LINUX')') # Paul Ellis and # # Herbert J. Bernstein (yaya@bernstein-plus-sons.com) # # # -# (C) Copyright 2006 - 2020 Herbert J. Bernstein # +# (C) Copyright 2006 - 2021 Herbert J. Bernstein # # # ###################################################################### @@ -267,7 +267,8 @@ BIN = $(ROOT)/bin SRC = $(ROOT)/src INCLUDE = $(ROOT)/include M4 = $(ROOT)/m4 -PYCBF = $(ROOT)/pycbf +PY2CBF = $(ROOT)/py2cbf +PY3CBF = $(ROOT)/pycbf EXAMPLES = $(ROOT)/examples TEMPLATES= $(ROOT)/templates DECTRIS_EXAMPLES = $(EXAMPLES)/dectris_cbf_template_test @@ -276,7 +277,6 @@ MINICBF_TEST = $(ROOT)/minicbf_test GRAPHICS = $(ROOT)/html_graphics DATADIRI = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Input DATADIRO = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output -DATADIRS = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only CBF_PREFIX ?= $(HOME) # @@ -295,6 +295,19 @@ CBFLIB_DONT_USE_LZ4?=no CBFLIB_DONT_USE_BSHUF?=no ')` +CBFLIB_DONT_USE_LOCAL_NUWEB ?= no +ifeq ($(CBFLIB_DONT_USE_LOCAL_NUWEB),yes) +NUWEB=nuweb +NUWEB_DEP= +NUWEB_DEP2= +else +NUWEB=$(BIN)/nuweb +NUWEB_DEP=nuweb-1.60 +NUWEB_DEP2=$(BIN)/nuweb +endif + + + CBFLIB_DONT_HAVE_FGETLN ?= yes ifeq ($(CBFLIB_DONT_HAVE_FGETLN),yes) SRC_FGETLN = $(SRC)/fgetln.c @@ -303,15 +316,26 @@ SRC_FGETLN = endif -CBFLIB_DONT_USE_PYCIFRW ?= no -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) +CBFLIB_DONT_USE_PY2CIFRW ?= no +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) # -# Definitions to get versions of PyCifRW and PLY +# Definitions to get versions of python2 PyCifRW and PLY # -PYCIFRW ?= PyCifRW-4.1 -PLY = ply-3.2 -PYCIFRWFLAG = -DCBF_USE_PYCIFRW -PYCIFRW_PREFIX ?= $(HOME)/.local +PY2CIFRW ?= PyCifRW-4.1 +PY2PLY = ply-3.2 +PY2CIFRWFLAG = -DCBF_USE_PYCIFRW +PY2CIFRW_PREFIX ?= $(HOME)/.local +endif + +CBFLIB_DONT_USE_PY3CIFRW ?= no +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +# +# Definitions to get versions of python3 PyCifRW and PLY +# +PY3CIFRW ?= PyCifRW-4.3_rev_19Jun21 +PY3PLY = ply-3.11 +PY3CIFRWFLAG = -DCBF_USE_PYCIFRW +PY3CIFRW_PREFIX ?= $(HOME)/.local endif # @@ -328,13 +352,20 @@ TIFF_INSTALL = $(TIFF)_INSTALL ifneq ($(HDF5_PREFIX),) # already installed on system CBFLIB_DONT_USE_LOCAL_HDF5 = yes +HDF5CFLAGS=-DH5_USE_110_API endif ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes) HDF5_PREFIX ?= $(PWD) -HDF5 ?= hdf5-1.10.6 +HDF5 ?= hdf5-1.12.0 +#HDF5 ?= hdf5-1.10.6 #HDF5 = hdf5-1.8.18 #HDF5 = hdf5-1.10.5 +ifeq ($(HDF5),hdf5-1.12.0) +HDF5CFLAGS=-DH5_USE_110_API +else +HDF5CFLAGS= +endif HDF5dep = $(HDF5) HDF5_INSTALL = $(HDF5)_INSTALL ifneq ($(MSYS2),yes) @@ -385,7 +416,7 @@ ifneq ($(CBFLIB_DONT_USE_LZ4),yes) # Definitions to get a version of HDF5Plugin for LZ4 # ifneq ($(MSYS2),yes) -LZ4 ?= HDF5Plugin_14Aug20 +LZ4 ?= HDF5Plugin_5Jun21 else LZ4 ?= HDF5-External-Filter-Plugins endif @@ -436,9 +467,8 @@ endif # # Definition of python to use # -#PYTHON = python -PYTHON ?= python2 - +PYTHON2 ?= python2 +PYTHON3 ?= python3 # # Definitions to get a stable version of regex @@ -545,12 +575,6 @@ PYSWIG = swig -python # JSWIG = swig -java -# -# Program to generate LaTex and HTML program documentation -# - -NUWEB = nuweb - # # Compiler for Java # @@ -603,14 +627,24 @@ endif MISCFLAG = $(NOLLFLAG) $(ULPFLAG) # -# PYCBF definitions +# PY2CBF definitions # -PYCBFEXT = so -PYCBFBOPT = -PYCBFIOPT = +PY2CBFEXT = so +PY2CBFBOPT = +PY2CBFIOPT = SETUP_PY = setup.py INSTALLSETUP_PY = installsetup.py +# +# PY3CBF definitions +# +PY3CBFEXT = so +PY3CBFBOPT = +PY3CBFIOPT = +SETUP_PY = setup.py +INSTALLSETUP_PY = installsetup.py + + # # Set the compiler and flags # @@ -623,10 +657,10 @@ INSTALLSETUP_PY = installsetup.py ######################################################### CC = gcc C++ = g++ -CFLAGS = -g -O2 -Wall -ansi -pedantic +CFLAGS = -g -O2 -Wall -ansi -pedantic $(HDF5CFLAGS) LDFLAGS = F90C = gfortran -F90FLAGS = -g -fno-range-check +F90FLAGS = -g -fno-range-check -fallow-invalid-boz F90LDFLAGS = -bind_at_load SOCFLAGS = -fPIC SOLDFLAGS = -dynamiclib -Wl,-rpath,$(CBF_PREFIX)/lib @@ -647,10 +681,10 @@ cbf_system,`OSX_gcc42',` ######################################################### CC = gcc C++ = g++ -CFLAGS = -g -O2 -Wall -ansi -pedantic +CFLAGS = -g -O2 -Wall -ansi -pedantic $(HDF5CFLAGS) LDFLAGS = F90C = gfortran -F90FLAGS = -g -fno-range-check +F90FLAGS = -g -fno-range-check -fallow-invalid-boz F90LDFLAGS = -bind_at_load SOCFLAGS = -fPIC SOLDFLAGS = -dynamiclib -Wl,-rpath,$(CBF_PREFIX)/lib @@ -671,10 +705,10 @@ cbf_system,`OSX_gcc42_DMALLOC',` ######################################################### CC = gcc C++ = g++ -CFLAGS = -g -O2 -Wall -ansi -pedantic -DDMALLOC -DDMALLOC_FUNC_CHECK -I$(HOME)/include +CFLAGS = -g -O2 -Wall -ansi -pedantic -DDMALLOC -DDMALLOC_FUNC_CHECK -I$(HOME)/include $(HDF5CFLAGS) LDFLAGS = F90C = gfortran -F90FLAGS = -g -fno-range-check +F90FLAGS = -g -fno-range-check -fallow-invalid-boz F90LDFLAGS = -bind_at_load SOCFLAGS = -fPIC SOLDFLAGS = -shared -Wl,-rpath,$(CBF_PREFIX)/lib @@ -696,16 +730,21 @@ cbf_system,`LINUX_64',` ######################################################### CC = gcc -m64 C++ = g++ -m64 -CFLAGS = -g -O2 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing +CFLAGS = -g -O2 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing $(HDF5CFLAGS) LDFLAGS = F90C = gfortran -m64 -F90FLAGS = -g -fno-range-check +F90FLAGS = -g -fno-range-check -fallow-invalid-boz F90LDFLAGS = SOCFLAGS = -fPIC SOLDFLAGS = -shared -Wl,-rpath,$(CBF_PREFIX)/lib JAVAINCLUDES = -I$(JDKDIR)/include -I$(JDKDIR)/include/linux -LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; -RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/lib:$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +ifeq ($(HDF5_PREFIX),) +LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +else +LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$(HDF5_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/lib:$(HDF5_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +endif EXTRALIBS = -lm M4FLAGS = -Dfcb_bytes_in_rec=131072 TIME = time', @@ -718,16 +757,21 @@ cbf_system,`LINUX_gcc42',` ######################################################### CC = gcc C++ = g++ -CFLAGS = -g -O2 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing +CFLAGS = -g -O2 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing $(HDF5CFLAGS) LDFLAGS = F90C = gfortran -F90FLAGS = -g -fno-range-check +F90FLAGS = -g -fno-range-check -fallow-invalid-boz F90LDFLAGS = SOCFLAGS = -fPIC SOLDFLAGS = -shared -Wl,-rpath,$(CBF_PREFIX)/lib JAVAINCLUDES = -I$(JDKDIR)/include -I$(JDKDIR)/include/linux -LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; -RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/lib:$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +ifeq ($(HDF5_PREFIX),) +LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +else +LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$(HDF5_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/lib:$(HDF5_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +endif EXTRALIBS = -lm M4FLAGS = -Dfcb_bytes_in_rec=131072 TIME = time', @@ -739,20 +783,25 @@ cbf_system,`LINUX',` ######################################################### CC = gcc C++ = g++ -CFLAGS = -g -O2 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing +CFLAGS = -g -O2 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing $(HDF5CFLAGS) LDFLAGS = F90C = gfortran -F90FLAGS = -g +F90FLAGS = -g -fno-range-check -fallow-invalid-boz F90LDFLAGS = SOCFLAGS = -fPIC SOLDFLAGS = -shared -Wl,-rpath,$(CBF_PREFIX)/lib JAVAINCLUDES = -I$(JDKDIR)/include -I$(JDKDIR)/include/linux -LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; -RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/lib:$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +ifeq ($(HDF5_PREFIX),) +LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +else +LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$(HDF5_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/lib:$(HDF5_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +endif EXTRALIBS = -lm M4FLAGS = -Dfcb_bytes_in_rec=131072 TIME = time', -cbf_system,`LINUX_gcc42_DMALLOC',` +cbf_system,`LINUX_gcc42_DMALLOC', ` ######################################################### # # Appropriate compiler definitions for Linux @@ -761,16 +810,22 @@ cbf_system,`LINUX_gcc42_DMALLOC',` ######################################################### CC = gcc C++ = g++ -CFLAGS = -g -O2 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing -DDMALLOC -DDMALLOC_FUNC_CHECK -I$(HOME)/include +CFLAGS = -g -O2 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing \ + -DDMALLOC -DDMALLOC_FUNC_CHECK $(HDF5CFLAGS) -I$(HOME)/include LDFLAGS = F90C = gfortran -F90FLAGS = -g -fno-range-check +F90FLAGS = -g -fno-range-check -fno-range-check F90LDFLAGS = SOCFLAGS = -fPIC SOLDFLAGS = -shared -Wl,-rpath,$(CBF_PREFIX)/lib JAVAINCLUDES = -I$(JDKDIR)/include -I$(JDKDIR)/include/linux -LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; -RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/lib:$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +ifeq ($(HDF5_PREFIX),) +LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +else +LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$(HDF5_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/lib:$(HDF5_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +endif EXTRALIBS = -lm -L$(HOME)/lib -ldmalloc M4FLAGS = -Dfcb_bytes_in_rec=131072 TIME = time', @@ -782,16 +837,22 @@ cbf_system,`LINUX_DMALLOC',` ######################################################### CC = gcc C++ = g++ -CFLAGS = -g -O2 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing -DDMALLOC -DDMALLOC_FUNC_CHECK -I$(HOME)/include +CFLAGS = -g -O2 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing \ + -DDMALLOC -DDMALLOC_FUNC_CHECK $(HDF5CFLAGS) -I$(HOME)/include LDFLAGS = F90C = gfortran -F90FLAGS = -g +F90FLAGS = -g -fno-range-check -fallow-invalid-boz F90LDFLAGS = SOCFLAGS = -fPIC SOLDFLAGS = -shared -Wl,-rpath,$(CBF_PREFIX)/lib JAVAINCLUDES = -I$(JDKDIR)/include -I$(JDKDIR)/include/linux -LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; -RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/lib:$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +ifeq ($(HDF5_PREFIX),) +LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +else +LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$(HDF5_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/lib:$(HDF5_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +endif EXTRALIBS = -lm -L$(HOME)/lib -ldmalloc M4FLAGS = -Dfcb_bytes_in_rec=131072 TIME = time', @@ -803,7 +864,7 @@ cbf_system,`AIX',` ######################################################### CC = xlc C++ = xlC -CFLAGS = -g -O2 -Wall +CFLAGS = -g -O2 -Wall $(HDF5CFLAGS) LDFLAGS = F90C = xlf90 F90FLAGS = -g -qsuffix=f=f90 @@ -823,7 +884,7 @@ cbf_system,`MINGW',` ######################################################### CC = gcc C++ = g++ -CFLAGS = -g -O2 -Wall -I/usr/include -fno-strict-aliasing +CFLAGS = -g -O2 -Wall -I/usr/include -fno-strict-aliasing $(HDF5CFLAGS) LDFLAGS = F90C = g95 F90FLAGS = -g @@ -836,8 +897,10 @@ SOLDFLAGS = -shared -Wl,--kill-at JAVAINCLUDES = -I$(JDKDIR)/include -I$(JDKDIR)/include/win32 EXTRALIBS = -lm TIME = -PYCBFEXT = pyd -PYCBFBOPT = --compiler=mingw32 +PY2CBFEXT = pyd +PY2CBFBOPT = --compiler=mingw32 +PY3CBFEXT = pyd +PY3CBFBOPT = --compiler=mingw32 SETUP_PY = setup_MINGW.py INSTALLSETUP_PY = installsetup_MINGW.py JDKDIR = /java @@ -858,7 +921,7 @@ cbf_system,`MSYS2',` CC = gcc C++ = g++ CFLAGS = -g -O2 -Wall -D_USE_XOPEN_EXTENDED -DH5_HAVE_WIN32_API \ - -DH5_HAVE_MINGW -DH5_USE_110_API -fno-strict-aliasing + -DH5_HAVE_MINGW -DH5_USE_110_API -fno-strict-aliasing $(HDF5CFLAGS) LDFLAGS = F90C = gfortran F90FLAGS = -g -fno-range-check -fallow-invalid-boz @@ -871,7 +934,8 @@ RUNLDPREFIX = PATH=$(CBF_PREFIX)/lib:$$PATH;export PATH; EXTRALIBS = -L/mingw32/bin -lm -lws2_32 M4FLAGS = -Dfcb_bytes_in_rec=131072 PYTHON = python2 -PYCBFEXT = pyd +PY2CBFEXT = pyd +PY3CBFEXT = pyd TIME = time', cbf_system,`IRIX_gcc',` @@ -884,14 +948,19 @@ cbf_system,`IRIX_gcc',` ######################################################### CC = gcc C++ = g++ -CFLAGS = -g -O2 -Wall +CFLAGS = -g -O2 -Wall $(HDF5CFLAGS) LDFLAGS = F90C = F90FLAGS = M4FLAGS = -Dfcb_bytes_in_rec=4096 JAVAINCLUDES = -I$(JDKDIR)/include -I$(JDKDIR)/include/linux -LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; -RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/LIB:$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +ifeq ($(HDF5_PREFIX),) +LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/LIB:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +else +LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$(HDF5_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/LIB:$(HDF5_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +endif EXTRALIBS = -lm TIME = SHAR = shar @@ -907,20 +976,24 @@ RANLIB = ', CC = gcc C++ = g++ ifneq ($(CBFDEBUG),) -CFLAGS = -g -O0 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing -DCBFDEBUG=1 +CFLAGS = -g -O0 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing -DCBFDEBUG=1 $(HDF5CFLAGS) else -CFLAGS = -g -O3 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing +CFLAGS = -g -O3 -Wall -D_USE_XOPEN_EXTENDED -fno-strict-aliasing $(HDF5CFLAGS) endif LDFLAGS = F90C = gfortran -F90FLAGS = -g -fno-range-check +F90FLAGS = -g -fno-range-check -fallow-invalid-boz F90LDFLAGS = SOCFLAGS = -fPIC SOLDFLAGS = -shared -Wl,-rpath,$(CBF_PREFIX)/lib JAVAINCLUDES = -I$(JDKDIR)/include -I$(JDKDIR)/include/linux +ifeq ($(HDF5_PREFIX),) LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; -#LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; -RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/LIB:$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/LIB:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +else +LDPREFIX = LD_LIBRARY_PATH=$(SOLIB):$(HDF5_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +RUNLDPREFIX = LD_LIBRARY_PATH=$(CBF_PREFIX)/LIB:$(HDF5_PREFIX)/lib:$(LIB):$$LD_LIBRARY_PATH;export LD_LIBRARY_PATH; +endif EXTRALIBS = -lm M4FLAGS = -Dfcb_bytes_in_rec=131072 TIME = time')` @@ -935,18 +1008,24 @@ endif DATAURLBASE = http://downloads.sf.net/cbflib/ DATAURLI = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Input.tar.gz DATAURLO = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output.tar.gz -DATAURLS = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz # # URLs from which to retrieve needed external package snapshots # -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWURL = http://downloads.sf.net/cbflib/$(PYCIFRW).tar.gz -PLYURL = http://www.dabeaz.com/ply/$(PLY).tar.gz +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2CIFRWURL = http://downloads.sf.net/cbflib/$(PY2CIFRW).tar.gz +PY2PLYURL = http://www.dabeaz.com/ply/$(PY2PLY).tar.gz +endif +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3CIFRWURL = http://downloads.sf.net/cbflib/$(PY3CIFRW).tar.gz +PY3PLYURL = http://downloads.sf.net/cbflib/$(PY3PLY).tar.gz endif REGEX_URL ?= http://downloads.sf.net/cbflib/$(REGEX).tar.gz TIFF_URL ?= http://downloads.sf.net/cbflib/$(TIFF).tar.gz HDF5_URL ?= http://downloads.sf.net/cbflib/$(HDF5).tar.gz +ifneq ($(CBFLIB_DONT_USE_LOCAL_NUWEB),yes) +NUWEB_URL ?= http://downloads.sf.net/cbflib/$(NUWEB_DEP).tar.gz +endif ifneq ($(MSYS2),yes) LZ4_URL = http://downloads.sf.net/cbflib/$(LZ4).tar.gz else @@ -963,10 +1042,11 @@ INCLUDES = -I$(INCLUDE) -I$(SRC) $(HDF5include) # # runtime library path export commands # -RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export LD_LIBRARY_PATH; \ - DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export DYLD_LIBRARY_PATH; \ - LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib;export LD_RUN_PATH; - +ifeq ($(HDF5_PREFIX),) +RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export LD_LIBRARY_PATH; DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export DYLD_LIBRARY_PATH; LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib;export LD_RUN_PATH; +else +RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib:$(HDF5_PREFIX)/lib;export LD_LIBRARY_PATH; DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib:$(HDF5_PREFIX)/lib;export DYLD_LIBRARY_PATH; LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib:$(HDF5_PREFIX)/lib;export LD_RUN_PATH; +endif ###################################################################### # You should not need to make modifications below this line # @@ -1048,8 +1128,15 @@ SOURCE = $(SRC)/cbf.c \ $(SRC)/img.c \ $(SRC_FGETLN) $(SRC_REALPATH) -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYSOURCE = $(SRC)/drel_lex.py \ +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2SOURCE = $(SRC)/drel_lex.py \ + $(SRC)/drel_yacc.py \ + $(SRC)/drelc.py \ + $(SRC)/drel_prep.py +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3SOURCE = $(SRC)/drel_lex.py \ $(SRC)/drel_yacc.py \ $(SRC)/drelc.py \ $(SRC)/drel_prep.py @@ -1166,6 +1253,26 @@ default: @echo ''` ''` @echo ''` $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(PYCIFRWFLAG)''` @echo ''` ''` + @echo ''` If you have changed any of the nuweb .w input files, you will need''` + @echo ''` need nuweb installed, check that CBFLIB_DONT_USE_LOCAL_NUWEB,''` + @echo ''` and NUWEB are defined correctly :''` + @echo ''` ''` + @echo ''` The current values are:''` + @echo ''` ''` + @echo ''` CBFLIB_DONT_USE_LOCAL_NUWEB = $(CBFLIB_DONT_USE_LOCAL_NUWEB)''` + @echo ''` NUWEB = $(NUWEB)''` + @echo ''` NUWEB_DEP = $(NUWEB_DEP)''` + @echo ''` NUWEB_DEP2 = $(NUWEB_DEP2)''` + @echo ''` ''` + @echo ''` You will need either a system HDF5 1.12 or it to be installed here.''` + @echo ''` Check that CBFLIB_DONT_USE_LOCAL_HDF5 and HDF5 are defined correctly :''` + @echo ''` ''` + @echo ''` The current values are:''` + @echo ''` ''` + @echo ''` CBFLIB_DONT_USE_LOCAL_HDF5 = $(CBFLIB_DONT_USE_LOCAL_HDF5)''` + @echo ''` HDF5 = $(HDF5)''` + @echo ''` HDF5_PREFIX = $(HDF5_PREFIX)''` + @echo ''` ''` @echo ''` Before installing the CBF library and example programs, check''` @echo ''` that the install directory is correct:''` @echo ''` ''` @@ -1197,20 +1304,10 @@ default: @echo ''` The tests assume that several data files are in the directories''` @echo ''` $(DATADIRI) and $(DATADIRO)''` @echo ''` ''` - @echo ''` Alternatively tests can be run comparing MD5 signatures only by''` - @echo ''` ''` - @echo ''` make tests_sigs_only''` - @echo ''` ''` - @echo ''` These signature only tests save space and download time by''` - @echo ''` assuming that input data files and the output signatures''` - @echo ''` are in the directories''` - @echo ''` $(DATADIRI) and $(DATADIRS)''` - @echo ''` ''` @echo ''` These directory can be obtained from''` @echo ''` ''` @echo ''` $(DATAURLI) ''` @echo ''` $(DATAURLO) ''` - @echo ''` $(DATAURLS) ''` @echo ''` ''` @echo ''` To clean up the directories type:''` @echo ''` ''` @@ -1226,10 +1323,16 @@ default: # # Compile the library and examples # -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEPS = $(PYCIFRW) $(PLY) +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2CIFRWDEPS = $(PY2CIFRW) $(PY2PLY) else -PYCIFRWDEPS = +PY2CIFRWDEPS = +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3CIFRWDEPS = $(PY3CIFRW) $(PY3PLY) +else +PY3CIFRWDEPS = endif ifneq ($(CBFLIB_DONT_USE_LZ4),yes) @@ -1249,7 +1352,8 @@ all:: $(BIN) $(SOURCE) $(F90SOURCE) $(HEADERS) \ $(HDF5) \ $(LZ4DEPS) \ $(BSHUFDEPS) \ - $(PYCIFRWDEPS) \ + $(PY2CIFRWDEPS) \ + $(PY3CIFRWDEPS) \ symlinksdone \ $(REGEXDEP) \ $(LIB) \ @@ -1291,92 +1395,101 @@ shared: $(SOLIB)/libcbf.so $(SOLIB)/libfcb.so $(SOLIB)/libimg.so javawrapper: shared $(JCBF) $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -PYCIFRWDEF = -Dcbf_use_pycifrw=yes +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +PY2CIFRWDEF = -Dcbf_use_py2cifrw=yes else -PYCIFRWDEF = +PY2CIFRWDEF = +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +PY3CIFRWDEF = -Dcbf_use_py3cifrw=yes +else +PY3CIFRWDEF = endif -Makefiles: Makefile \ - Makefile_LINUX \ - Makefile_LINUX_64 \ +Makefiles: \ + Makefile \ + Makefile_LINUX \ + Makefile_OSX \ + Makefile_MINGW \ + Makefile_MSYS2 + +Makefiles_pre_0.9.7: \ + Makefile_LINUX_64 \ Makefile_LINUX_gcc42 \ Makefile_LINUX_DMALLOC \ Makefile_LINUX_gcc42_DMALLOC \ - Makefile_OSX \ Makefile_OSX_gcc42 \ Makefile_OSX_gcc42_DMALLOC \ - Makefile_AIX \ - Makefile_MINGW \ - Makefile_MSYS2 \ + Makefile_AIX \ Makefile_IRIX_gcc Makefile_LINUX: $(M4)/Makefile.m4 -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX $(M4)/Makefile.m4 > Makefile_LINUX.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX $(M4)/Makefile.m4 > Makefile_LINUX.tmp mv Makefile_LINUX.tmp Makefile_LINUX Makefile_LINUX_DMALLOC: $(M4)/Makefile.m4 -cp Makefile_LINUX Makefile_LINUX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_DMALLOC.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_DMALLOC.tmp mv Makefile_LINUX_DMALLOC.tmp Makefile_LINUX_DMALLOC Makefile_LINUX_64: $(M4)/Makefile.m4 -cp Makefile_LINUX_64 Makefile_LINUX_64_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_64 $(M4)/Makefile.m4 > Makefile_LINUX_64.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_64 $(M4)/Makefile.m4 > Makefile_LINUX_64.tmp mv Makefile_LINUX_64.tmp Makefile_LINUX_64 Makefile_LINUX_gcc42: $(M4)/Makefile.m4 -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42 $(M4)/Makefile.m4 > Makefile_LINUX_gcc42.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_gcc42 $(M4)/Makefile.m4 > Makefile_LINUX_gcc42.tmp mv Makefile_LINUX_gcc42.tmp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_DMALLOC: $(M4)/Makefile.m4 -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_gcc42_DMALLOC.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_gcc42_DMALLOC.tmp mv Makefile_LINUX_gcc42_DMALLOC.tmp Makefile_LINUX_gcc42_DMALLOC Makefile_OSX: $(M4)/Makefile.m4 -cp Makefile_OSX Makefile_OSX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX $(M4)/Makefile.m4 > Makefile_OSX.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=OSX $(M4)/Makefile.m4 > Makefile_OSX.tmp mv Makefile_OSX.tmp Makefile_OSX Makefile_OSX_gcc42: $(M4)/Makefile.m4 -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42 $(M4)/Makefile.m4 > Makefile_OSX_gcc42.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=OSX_gcc42 $(M4)/Makefile.m4 > Makefile_OSX_gcc42.tmp mv Makefile_OSX_gcc42.tmp Makefile_OSX_gcc42 Makefile_OSX_gcc42_DMALLOC: $(M4)/Makefile.m4 -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_OSX_gcc42_DMALLOC.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=OSX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_OSX_gcc42_DMALLOC.tmp mv Makefile_OSX_gcc42_DMALLOC.tmp Makefile_OSX_gcc42_DMALLOC Makefile_AIX: $(M4)/Makefile.m4 -cp Makefile_AIX Makefile_AIX_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=AIX $(M4)/Makefile.m4 > Makefile_AIX.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=AIX $(M4)/Makefile.m4 > Makefile_AIX.tmp mv Makefile_AIX.tmp Makefile_AIX Makefile_MINGW: $(M4)/Makefile.m4 -cp Makefile_MINGW Makefile_MINGW_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MINGW $(M4)/Makefile.m4 > Makefile_MINGW.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=MINGW $(M4)/Makefile.m4 > Makefile_MINGW.tmp mv Makefile_MINGW.tmp Makefile_MINGW Makefile_MSYS2: $(M4)/Makefile.m4 -cp Makefile_MSYS2 Makefile_MSYS2_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=MSYS2 $(M4)/Makefile.m4 > Makefile_MSYS2.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=MSYS2 $(M4)/Makefile.m4 > Makefile_MSYS2.tmp mv Makefile_MSYS2.tmp Makefile_MSYS2 Makefile_IRIX_gcc: $(M4)/Makefile.m4 -cp Makefile_IRIX_gcc Makefile_IRIX_gcc_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=IRIX_gcc $(M4)/Makefile.m4 > Makefile_IRIX_gcc.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=IRIX_gcc $(M4)/Makefile.m4 > Makefile_IRIX_gcc.tmp mv Makefile_IRIX_gcc.tmp Makefile_IRIX_gcc Makefile: $(M4)/Makefile.m4 -cp Makefile Makefile_old - m4 -P $(PYCIFRWDEF) -Dcbf_system=default $(M4)/Makefile.m4 > Makefile.tmp + m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=default $(M4)/Makefile.m4 > Makefile.tmp mv Makefile.tmp Makefile cbflib.ini: $(M4)/Makefile.m4 @@ -1392,12 +1505,12 @@ symlinksdone: ./.symlinks $(SLFLAGS) touch symlinksdone -install: baseinstall pycbfinstall \ +install: baseinstall py2cbfinstall py3cbfinstall \ $(HDF5_INSTALL) \ $(TIFF_INSTALL) \ $(REGEX_INSTALL) -userinstall: baseinstall pycbfuserinstall \ +userinstall: baseinstall py2cbfuserinstall py3cbfuserinstall \ $(HDF5_INSTALL) \ $(TIFF_INSTALL) \ $(REGEX_INSTALL) @@ -1529,38 +1642,96 @@ endif chmod 755 $(CBF_PREFIX)/bin/batch_convert_minicbf.sh chmod 644 $(CBF_PREFIX)/include/cbflib/*.h -ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes) -# -# PyCifRW -# -build_pycifrw: $(M4)/Makefile.m4 - touch build_pycifrw -$(PYCIFRW): build_pycifrw - -rm -rf $(PYCIFRW) - -rm -rf $(PYCIFRW).tar.gz - $(DOWNLOAD) $(PYCIFRWURL) - tar -xvf $(PYCIFRW).tar.gz - -rm $(PYCIFRW).tar.gz - (cd $(PYCIFRW); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) +ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes) +# +# Py2CifRW +# +build_py2cifrw: $(M4)/Makefile.m4 + touch build_py2cifrw +$(PY2CIFRW): build_py2cifrw + -rm -rf $(PY2CIFRW) + -rm -rf $(PY2CIFRW).tar.gz + $(DOWNLOAD) $(PY2CIFRWURL) + tar -xvf $(PY2CIFRW).tar.gz + -rm $(PY2CIFRW).tar.gz + (cd $(PY2CIFRW); \ + PYTHONPATH=$(PY2CIFRW_PREFIX)/lib/python:$(PY2CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON2) setup.py install --prefix= --home=$(PY2CIFRW_PREFIX) ) + +# +# PY2PLY +# +build_py2ply: $(M4)/Makefile.m4 + touch build_py2ply +$(PY2PLY): build_py2ply + -rm -rf $(PY2PLY) + -rm -rf $(PY2PLY).tar.gz + $(DOWNLOAD) $(PY2PLYURL) + tar -xvf $(PY2PLY).tar.gz + -rm $(PY2PLY).tar.gz + (cd $(PY2PLY); \ + PYTHONPATH=$(PY2CIFRW_PREFIX)/lib/python:$(PY2CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY2CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON2) setup.py install --prefix= --home=$(PY2CIFRW_PREFIX) ) +endif + +ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes) +# +# Py3CifRW +# +build_py3cifrw: $(M4)/Makefile.m4 + touch build_py3cifrw +$(PY3CIFRW): build_py3cifrw + -rm -rf $(PY3CIFRW) + -rm -rf $(PY3CIFRW).tar.gz + $(DOWNLOAD) $(PY3CIFRWURL) + tar -xvf $(PY3CIFRW).tar.gz + -rm $(PY3CIFRW).tar.gz + (cd $(PY3CIFRW); \ + PYTHONPATH=$(PY3CIFRW_PREFIX)/lib/python:$(PY3CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON3) setup.py install --prefix= --home=$(PY3CIFRW_PREFIX) ) + +# +# PY3PLY +# +build_py3ply: $(M4)/Makefile.m4 + touch build_py3ply +$(PY3PLY): build_py3ply + -rm -rf $(PY3PLY) + -rm -rf $(PY3PLY).tar.gz + $(DOWNLOAD) $(PY3PLYURL) + tar -xvf $(PY3PLY).tar.gz + -rm $(PY3PLY).tar.gz + (cd $(PY3PLY); \ + PYTHONPATH=$(PY3CIFRW_PREFIX)/lib/python:$(PY3CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib/python/site-packages; \ + mkdir -p $(PY3CIFRW_PREFIX)/lib64/python/site-packages; \ + $(PYTHON3) setup.py install --prefix= --home=$(PY3CIFRW_PREFIX) ) +endif + # -# PLY +# NUWEB # -build_ply: $(M4)/Makefile.m4 - touch build_ply -$(PLY): build_ply - -rm -rf $(PLY) - -rm -rf $(PLY).tar.gz - $(DOWNLOAD) $(PLYURL) - tar -xvf $(PLY).tar.gz - -rm $(PLY).tar.gz - (cd $(PLY); PYTHONPATH=$(PYCIFRW_PREFIX)/lib/python; export PYTHONPATH; \ - mkdir -p $(PYCIFRW_PREFIX)/lib/python/site-packages; \ - $(PYTHON) setup.py install --home=$(PYCIFRW_PREFIX) ) +ifneq ($(NUWEB_DEP),''`''`) +$(NUWEB_DEP): + -rm -rf $(NUWEB_DEP) + -rm -rf $(NUWEB_DEP).tar.gz + $(DOWNLOAD) $(NUWEB_URL) + tar -xvf $(NUWEB_DEP).tar.gz + touch $(NUWEB_DEP) + rm $(NUWEB_DEP).tar.gz + +$(NUWEB_DEP2): $(NUWEB_DEP) + (cd $(NUWEB_DEP); make nuweb; cp nuweb $(NUWEB_DEP2)) endif + # # REGEX # @@ -1660,7 +1831,7 @@ ifneq ($(MSYS2),yes) tar -xvf $(LZ4).tar.gz -rm $(LZ4).tar.gz (cp $(LZ4include)/lz4.h $(INCLUDE); \ - $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/lz4.c -o lz4.o; \ + $(CC) $(CFLAGS) $(SOWCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/lz4.c -o lz4.o; \ $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/h5zlz4.c -o h5zlz4.o; \ $(CC) -shared lz4.o h5zlz4.o -o $(SOLIB)/libh5zlz4.so; \ rm lz4.o h5zlz4.o) @@ -1857,53 +2028,147 @@ endif # # Python bindings # -$(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \ - $(PYCBF)/$(SETUP_PY) \ - $(PYCBF)/pycbf.i \ - $(PYCBF)/cbfhandlewrappers.i \ - $(PYCBF)/cbfdetectorwrappers.i \ - $(PYCBF)/cbfgenericwrappers.i \ - $(PYCBF)/cbfgoniometerwrappers.i + +$(PY2CBF)/make_pycbf.py: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/make_pycbf.w + (cd $(PY2CBF); $(NUWEB) make_pycbf.w) + +$(PY2CBF)/pycbf.i: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf_i.w + (cd $(PY2CBF); $(NUWEB) pycbf_i.w) + +$(PY2CBF)/py2setup_py.m4 \ +$(PY2CBF)/win32.bat \ +$(PY2CBF)/linux.sh \ +$(PY2CBF)/makeflatascii.py \ +$(PY2CBF)/pycbf_test1.py \ +$(PY2CBF)/pycbf_test2.py \ +$(PY2CBF)/pycbf_test3.py \ +$(PY2CBF)/pycbf_test4.py \ +$(PY2CBF)/pycbf_testfelaxes.py \ +$(PY2CBF)/xmas/readmarheader.py \ +$(PY2CBF)/xmas/xmasheaders.py \ +$(PY2CBF)/xmas/xmas_cif_template.cif : $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w + (cd $(PY2CBF); $(NUWEB) pycbf.w ) + touch $(PY2CBF)/py2setup_py.m4 + +$(PY2CBF)/_py2cbf.$(PY2CBFEXT): $(PY2CBF) shared \ + $(PY2CBF)/py2setup.py \ + $(PY2CBF)/pycbf.i \ + $(PY2CBF)/cbfhandlewrappers.i \ + $(PY2CBF)/cbfdetectorwrappers.i \ + $(PY2CBF)/cbfgenericwrappers.i \ + $(PY2CBF)/cbfgoniometerwrappers.i -cp $(SOLIB)/*.so $(LIB) - (cd $(PYCBF); $(PYTHON) $(SETUP_PY) build $(PYCBFBOPT); cp build/lib*/_pycbf.$(PYCBFEXT) .) + (cd $(PY2CBF); $(PYTHON2) py2setup.py build $(PY2CBFBOPT); cp build/lib*/_py2cbf*.$(PY2CBFEXT) .) -$(PYCBF)/pycbfinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --prefix=$(CBF_PREFIX)) +$(PY2CBF)/py2cbfinstall: $(PY2CBF)/pycbf.py + (cd $(PY2CBF); $(PYTHON2) $(INSTALLSETUP_PY) install $(PY2CBFIOPT) --prefix=$(CBF_PREFIX)) -$(PYCBF)/pycbfuserinstall: - (cd $(PYCBF); $(PYTHON) $(INSTALLSETUP_PY) install $(PYCBFIOPT) --user) +$(PY2CBF)/py2cbfuserinstall: $(PY2CBF)/pycbf.py + (cd $(PY2CBF); $(PYTHON2) $(INSTALLSETUP_PY) install $(PY2CBFIOPT) --user) -$(PYCBF)/setup.py: $(M4)/setup_py.m4 +$(PY2CBF)/py2setup.py: $(PY2CBF)/py2setup_py.m4 (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) + $(PY2CBF)/py2setup_py.m4 > $@) -$(PYCBF)/setup_MINGW.py: m4/setup_py.m4 +$(PY2CBF)/py2setup_MINGW.py: $(PY2CBF)/setup_py.m4 (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ - $(M4)/setup_py.m4 > $@) + $(PY2CBF)/py2setup_py.m4 > $@) -$(LIB)/_pycbf.$(PYCBFEXT): $(PYCBF)/_pycbf.$(PYCBFEXT) +$(LIB)/_py2cbf.$(PY2CBFEXT): $(PY2CBF)/_py2cbf.$(PY2CBFEXT) mkdir -p $(LIB) - cp $(PYCBF)/_pycbf.$(PYCBFEXT) $(LIB)/_pycbf.$(PYCBFEXT) + cp $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(LIB)/_py2cbf.$(PY2CBFEXT) -$(PYCBF)/pycbf.pdf: $(PYCBF)/pycbf.w - (cd $(PYCBF); \ +$(PY2CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w + (cd $(PY2CBF); \ $(NUWEB) pycbf; \ latex pycbf; \ $(NUWEB) pycbf; \ latex pycbf; \ dvipdfm pycbf ) -$(PYCBF)/CBFlib.txt: $(DOC)/CBFlib.html - links -dump $(DOC)/CBFlib.html > $(PYCBF)/CBFlib.txt +$(PY2CBF)/CBFlib.txt: $(DOC)/CBFlib.html + links -dump $(DOC)/CBFlib.html > $(PY2CBF)/CBFlib.txt + +$(PY2CBF)/pycbf.py: $(PY2CBF)/pycbf.pdf $(PY2CBF)/cbfdetectorwrappers.i \ + $(PY2CBF)/cbfgenericwrappers.i \ + $(PY2CBF)/cbfgoniometerwrappers.i \ + $(PY2CBF)/CBFlib.txt $(PY2CBF)/make_pycbf.py + (cd $(PY2CBF); $(PYTHON2) make_pycbf.py; $(PYSWIG) -module py2cbf pycbf.i; \ + $(PYTHON2) py2setup.py build; mv pycbf.py rawpycbf.py; \ + cat rawpycbf.py | sed "s/ _pycbf/ _py2cbf/" > pycbf.py ) + +$(PY3CBF)/make_pycbf.py: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/make_pycbf.w + (cd $(PY3CBF); $(NUWEB) make_pycbf.w) + +$(PY3CBF)/pycbf.i: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf_i.w + (cd $(PY3CBF); $(NUWEB) pycbf_i.w) + +$(PY3CBF)/py3setup_py.m4 \ +$(PY3CBF)/win32.bat \ +$(PY3CBF)/linux.sh \ +$(PY3CBF)/makeflatascii.py \ +$(PY3CBF)/pycbf_test1.py \ +$(PY3CBF)/pycbf_test2.py \ +$(PY3CBF)/pycbf_test3.py \ +$(PY3CBF)/pycbf_test4.py \ +$(PY3CBF)/pycbf_testfelaxes.py \ +$(PY3CBF)/xmas/readmarheader.py \ +$(PY3CBF)/xmas/xmasheaders.py \ +$(PY3CBF)/xmas/xmas_cif_template.cif: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w + (cd $(PY3CBF); $(NUWEB) pycbf.w ) + touch $(PY3CBF)/py3setup_py.m4 + + +$(PY3CBF)/_pycbf.$(PY3CBFEXT): $(PY3CBF) shared \ + $(PY3CBF)/py3setup.py \ + $(PY3CBF)/pycbf.i \ + $(PY3CBF)/cbfhandlewrappers.i \ + $(PY3CBF)/cbfdetectorwrappers.i \ + $(PY3CBF)/cbfgenericwrappers.i \ + $(PY3CBF)/cbfgoniometerwrappers.i + -cp $(SOLIB)/*.so $(LIB) + (cd $(PY3CBF); $(PYTHON3) py3setup.py build $(PY3CBFBOPT); cp build/lib*/_pycbf*.$(PY3CBFEXT) .) + +$(PY3CBF)/py3cbfinstall: $(PY3CBF)/pycbf.py + (cd $(PY3CBF); $(PYTHON3) $(INSTALLSETUP_PY) install $(PY3CBFIOPT) --prefix=$(CBF_PREFIX)) -$(PYCBF)/cbfhandlewrappers.i \ -$(PYCBF)/cbfdetectorwrappers.i \ -$(PYCBF)/cbfgenericwrappers.i \ -$(PYCBF)/cbfgoniometerwrappers.i: $(PYCBF)/CBFlib.txt $(PYCBF)/make_pycbf.py - (cd $(PYCBF); $(PYTHON) make_pycbf.py; $(PYSWIG) pycbf.i; $(PYTHON) setup.py build) +$(PY3CBF)/py3cbfuserinstall: $(PY3CBF)/pycbf.py + (cd $(PY3CBF); $(PYTHON3) $(INSTALLSETUP_PY) install $(PY3CBFIOPT) --user) +$(PY3CBF)/py3setup.py: $(PY3CBF)/py3setup_py.m4 + (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ + -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ + $(PY3CBF)/py3setup_py.m4 > $@) + +$(PY3CBF)/py3setup_MINGW.py: $(PY3CBF)/py3setup_py.m4 + (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \ + -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \ + $(PY3CBF)/py3setup_py.m4 > $@) + +$(LIB)/_pycbf.$(PY3CBFEXT): $(PY3CBF)/_pycbf.$(PY3CBFEXT) + mkdir -p $(LIB) + cp $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(LIB)/_pycbf.$(PY3CBFEXT) + +$(PY3CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w + (cd $(PY3CBF); \ + $(NUWEB) pycbf; \ + latex pycbf; \ + $(NUWEB) pycbf; \ + latex pycbf; \ + dvipdfm pycbf ) + +$(PY3CBF)/CBFlib.txt: $(DOC)/CBFlib.html + links -dump $(DOC)/CBFlib.html > $(PY3CBF)/CBFlib.txt + +$(PY3CBF)/pycbf.py: $(PY3CBF)/pycbf.pdf $(PY3CBF)/cbfdetectorwrappers.i \ + $(PY3CBF)/cbfgenericwrappers.i \ + $(PY3CBF)/cbfgoniometerwrappers.i \ + $(PY3CBF)/CBFlib.txt $(PY3CBF)/make_pycbf.py + (cd $(PY3CBF); $(PYTHON3) make_pycbf.py; $(PYSWIG) pycbf.i; \ + $(PYTHON3) py3setup.py build; mv pycbf.py rawpycbf.py; \ + echo "# coding=utf-8" | cat - rawpycbf.py > pycbf.py) # # Java bindings @@ -2118,7 +2383,7 @@ $(BIN)/sequence_match: $(LIB)/libcbf.a $(EXAMPLES)/sequence_match.c $(LIB)/libim # # tiff2cbf example program # -$(BIN)/tiff2cbf: $(LIB)/libcbf.a $(EXAMPLES)/tiff2cbf.c \ +$(BIN)/tiff2cbf: $(LIB)/libcbf.a $(EXAMPLES)/tiff2cbf.c $(EXAMPLES)/tif_sprint.c \ $(GOPTLIB) $(GOPTINC) $(TIFF) mkdir -p $(BIN) $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \ @@ -2264,13 +2529,6 @@ $(DATADIRO): $(M4)/Makefile.m4 touch $(DATADIRO) -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output.tar.gz) -$(DATADIRS): $(M4)/Makefile.m4 - (cd ..; $(DOWNLOAD) $(DATAURLS)) - (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - touch $(DATADIRS) - -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz) - - # Input Data Files TESTINPUT_BASIC = example.mar2300 @@ -2320,31 +2578,48 @@ TESTOUTPUT = adscconverted_flat_orig.cbf \ adscconverted_orig.cbf converted_flat_orig.cbf converted_orig.cbf \ insulin_pilatus6mconverted_orig.cbf.h5.cbf \ insulin_pilatus6mconverted_orig.cbf.h5 \ + insulin_pilatus6mconverted_orig.cbf \ insulin_pilatus6mconverted_v2_orig.cbf \ mb_LP_1_001_orig.cbf testcell_orig.prt \ test_xds_bin_testflatout_orig.out \ test_xds_bin_testflatpackedout_orig.out test_fcb_read_testflatout_orig.out \ test_fcb_read_testflatpackedout_orig.out \ XRD1621_orig.cbf XRD1621_I4encbC100_orig.cbf \ - minicbf_orig.h5 + minicbf_orig.h5 \ + pycbf_test1_orig.out \ + pycbf_test2_orig.out \ + pycbf_test3_orig.out \ + pycbf_test4_orig.out \ + fel_test1_orig.out \ + fel_test2_orig.out \ + fel_test3_orig.out NEWTESTOUTPUT = adscconverted_flat.cbf \ adscconverted.cbf converted_flat.cbf converted.cbf \ insulin_pilatus6mconverted.cbf \ insulin_pilatus6mconverted.cbf.h5 \ insulin_pilatus6mconverted.cbf.h5.cbf \ + insulin_pilatus6mconverted_orig.cbf \ insulin_pilatus6mconverted_v2.cbf \ mb_LP_1_001.cbf testcell.prt \ test_xds_bin_testflatout.out \ test_xds_bin_testflatpackedout.out test_fcb_read_testflatout.out \ test_fcb_read_testflatpackedout.out \ XRD1621.cbf XRD1621_I4encbC100.cbf \ - $(MINICBF_TEST)/minicbf.h5 + $(MINICBF_TEST)/minicbf.h5 \ + pycbf_test1.out \ + pycbf_test2.out \ + pycbf_test3.out \ + pycbf_test4.out \ + fel_test1.out \ + fel_test2.out \ + fel_test3.out DATADIRO_OUTPUT = $(DATADIRO)/adscconverted_flat_orig.cbf \ $(DATADIRO)/adscconverted_orig.cbf \ $(DATADIRO)/converted_flat_orig.cbf \ $(DATADIRO)/converted_orig.cbf \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5 \ + $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf \ $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf \ $(DATADIRO)/mb_LP_1_001_orig.cbf \ $(DATADIRO)/testcell_orig.prt \ @@ -2361,6 +2636,7 @@ DATADIRO_OUTPUT_SIGNATURES = $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) \ $(DATADIRO)/converted_orig.cbf$(SEXT) \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ + $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf$(SEXT) \ $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) \ $(DATADIRO)/testcell_orig.prt$(SEXT) \ @@ -2380,6 +2656,7 @@ TESTOUTPUTSIGS = adscconverted_flat_orig.cbf$(SEXT) \ adscconverted_orig.cbf$(SEXT) converted_flat_orig.cbf$(SEXT) converted_orig.cbf$(SEXT) \ insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ + insulin_pilatus6mconverted_orig.cbf$(SEXT) \ insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ mb_LP_1_001_orig.cbf$(SEXT) testcell_orig.prt$(SEXT) \ test_xds_bin_testflatout_orig.out$(SEXT) \ @@ -2387,13 +2664,21 @@ TESTOUTPUTSIGS = adscconverted_flat_orig.cbf$(SEXT) \ test_fcb_read_testflatpackedout_orig.out$(SEXT) \ XRD1621_orig.cbf$(SEXT) \ XRD1621_I4encbC100_orig.cbf$(SEXT) \ - minicbf_orig.h5$(SEXT) + minicbf_orig.h5$(SEXT) \ + pycbf_test1_orig.out$(SEXT) \ + pycbf_test2_orig.out$(SEXT) \ + pycbf_test3_orig.out$(SEXT) \ + pycbf_test4_orig.out$(SEXT) \ + fel_test1_orig.out$(SEXT) \ + fel_test2_orig.out$(SEXT) \ + fel_test3_orig.out$(SEXT) DATADIRS_OUTPUT_SIGNATURES = $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) \ $(DATADIRS)/adscconverted_orig.cbf$(SEXT) \ $(DATADIRS)/converted_flat_orig.cbf$(SEXT) \ $(DATADIRS)/converted_orig.cbf$(SEXT) \ $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \ $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \ + $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf$(SEXT) \ $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \ $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) \ $(DATADIRS)/testcell_orig.prt$(SEXT) \ @@ -2403,7 +2688,14 @@ DATADIRS_OUTPUT_SIGNATURES = $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) \ $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \ $(DATADIRS)/XRD1621_orig.cbf$(SEXT) \ $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) \ - $(DATADIRS)/minicbf_orig.h5$(SEXT) + $(DATADIRS)/minicbf_orig.h5$(SEXT) \ + $(DATADIRS)/pycbf_test1_orig.out$(SEXT) \ + $(DATADIRS)/pycbf_test2_orig.out$(SEXT) \ + $(DATADIRS)/pycbf_test3_orig.out$(SEXT) \ + $(DATADIRS)/pycbf_test4_orig.out$(SEXT) \ + $(DATADIRS)/fel_test1_orig.out$(SEXT) \ + $(DATADIRS)/fel_test2_orig.out$(SEXT) \ + $(DATADIRS)/fel_test3_orig.out$(SEXT) # Fetch Input Data Files @@ -2425,20 +2717,13 @@ $(TESTOUTPUT): $(DATADIRO) $(DATADIRO_OUTPUT) $(DATADIRO_OUTPUT_SIGNATURES) cp $(DATADIRO)/$@$(SEXT) $@$(SEXT) -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT) -# Fetch Output Data File Signatures - -$(TESTOUTPUTSIGS): $(DATADIRS) $(DATADIRS_OUTPUT_SIGNATURES) - cp $(DATADIRS)/$@ $@ - - # # Tests # -tests: all $(LIB) $(BIN) symlinksdone basic extra dectristests pycbftests -tests_sigs_only: $(LIB) $(BIN) symlinksdone basic extra_sigs_only +tests: all $(LIB) $(BIN) symlinksdone basic extra dectristests py2cbftests py3cbftests restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) $(SIGNATURE) < adscconverted.cbf > $(DATADIRO)/adscconverted_orig.cbf$(SEXT) @@ -2456,6 +2741,13 @@ restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 $(SIGNATURE) < XRD1621.cbf > $(DATADIRO)/XRD1621_orig.cbf$(SEXT) $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRO)/minicbf_orig.h5$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test1.out > $(DATADIRO)/pycbf_test1_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test2.out > $(DATADIRO)/pycbf_test2_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test3.out > $(DATADIRO)/pycbf_test3_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/pycbf_test4.out > $(DATADIRO)/pycbf_test4_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/fel_test1.out > $(DATADIRO)/fel_test1_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/fel_test2.out > $(DATADIRO)/fel_test2_orig.out$(SEXT) + $(SIGNATURE) < $(PY2CBF)/fel_test3.out > $(DATADIRO)/fel_test3_orig.out$(SEXT) cp adscconverted_flat.cbf $(DATADIRO)/adscconverted_flat_orig.cbf$ cp adscconverted.cbf $(DATADIRO)/adscconverted_orig.cbf cp converted_flat.cbf $(DATADIRO)/converted_flat_orig.cbf @@ -2472,25 +2764,15 @@ restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5 cp XRD1621.cbf $(DATADIRO)/XRD1621_orig.cbf cp XRD1621_I4encbC100.cbf $(DATADIRO)/XRD1621_I4encbC100_orig.cbf cp $(MINICBF_TEST)/minicbf.h5 $(DATADIRO)/minicbf_orig.h5 - -restore_sigs_only: $(NEWTESTOUTPUT) $(DATADIRS) - $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < adscconverted.cbf > $(DATADIRS)/adscconverted_orig.cbf$(SEXT) - $(SIGNATURE) < converted_flat.cbf > $(DATADIRS)/converted_flat_orig.cbf$(SEXT) - $(SIGNATURE) < converted.cbf > $(DATADIRS)/converted_orig.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5 > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5.cbf > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) - $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) - $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) - $(SIGNATURE) < testcell.prt > $(DATADIRS)/testcell_orig.prt$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) - $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) - $(SIGNATURE) < XRD1621.cbf > $(DATADIRS)/XRD1621_orig.cbf$(SEXT) - $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) - $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRS)/minicbf_orig.h5$(SEXT) -restore_signatures: restore_output restore_sigs_only + cp $(PY2CBF)/pycbf_test1.out $(DATADIRO)/pycbf_test1_orig.out + cp $(PY2CBF)/pycbf_test2.out $(DATADIRO)/pycbf_test2_orig.out + cp $(PY2CBF)/pycbf_test3.out $(DATADIRO)/pycbf_test3_orig.out + cp $(PY2CBF)/pycbf_test4.out $(DATADIRO)/pycbf_test4_orig.out + cp $(PY2CBF)/fel_test1.out $(DATADIRO)/fel_test1_orig.out + cp $(PY2CBF)/fel_test2.out $(DATADIRO)/fel_test2_orig.out + cp $(PY2CBF)/fel_test3.out $(DATADIRO)/fel_test3_orig.out + +restore_signatures: restore_output # # Basic Tests @@ -2510,9 +2792,12 @@ basic: $(BIN)/makecbf $(BIN)/img2cif $(BIN)/cif2cbf $(TESTINPUT_BASIC) img2cif_canonical.cif cif2cbf_packed.cbf $(LDPREFIX) $(BIN)/cif2cbf -e none -c canonical \ img2cif_packed.cif cif2cbf_canonical.cbf - -cmp cif2cbf_packed.cbf makecbf.cbf - -cmp cif2cbf_packed.cbf img2cif_packed.cbf - -cmp cif2cbf_canonical.cbf img2cif_canonical.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_packed.cbf | diff -a - makecbf.cbf + #-cmp cif2cbf_packed.cbf makecbf.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_packed.cbf | diff -a - img2cif_packed.cbf + #-cmp cif2cbf_packed.cbf img2cif_packed.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_canonical.cbf | diff -a - img2cif_canonical.cbf + #-cmp cif2cbf_canonical.cbf img2cif_canonical.cbf # @@ -2551,21 +2836,27 @@ endif makecbf.cbf cif2cbf_ehcn.cif $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf + -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_encp.cbf | diff -a - makecbf.cbf $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf + -cat 9ins.cif |sed "1,1s/10/11/" | sed "2,2s/0.9.5/0.9.7/" | diff -a - 9ins.cbf + #-cmp 9ins.cif 9ins.cbf $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf -F example.mar2300 converted_flat.cbf - -cmp converted_flat.cbf converted_flat_orig.cbf + -cat converted_flat_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - converted_flat.cbf + #-cmp converted_flat.cbf converted_flat_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf example.mar2300 converted.cbf - -cmp converted.cbf converted_orig.cbf + -cat converted_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - converted.cbf + #-cmp converted.cbf converted_orig.cbf -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat > testcell.prt -cmp testcell.prt testcell_orig.prt $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -cmp adscconverted_flat.cbf adscconverted_flat_orig.cbf + -cat adscconverted_flat_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - adscconverted_flat.cbf + #-cmp adscconverted_flat.cbf adscconverted_flat_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -cmp adscconverted.cbf adscconverted_orig.cbf + -cat adscconverted_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - adscconverted.cbf + #-cmp adscconverted.cbf adscconverted_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -cmp mb_LP_1_001.cbf mb_LP_1_001_orig.cbf + -cat mb_LP_1_001_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - mb_LP_1_001.cbf + #-cmp mb_LP_1_001.cbf mb_LP_1_001_orig.cbf ifneq ($(CLEANTESTS),) mv mb_LP_1_001.cbf nmb_LP_1_001.cbf else @@ -2578,12 +2869,17 @@ ifneq ($(CLEANTESTS),) rm nmb_LP_1_001.img endif $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -cmp insulin_pilatus6mconverted.cbf insulin_pilatus6mconverted_rev_orig.cbf + -cat insulin_pilatus6mconverted_orig.cbf | sed "1,1s/1.7.6/1.7.11/" | sed "2,2s/0.9.3/0.9.7/" | diff -a - insulin_pilatus6mconverted.cbf + #-cmp insulin_pilatus6mconverted.cbf insulin_pilatus6mconverted_orig.cbf -$(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -cmp insulin_pilatus6mconverted_v2.cbf insulin_pilatus6mconverted_v2_orig.cbf + -cat insulin_pilatus6mconverted_v2_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - insulin_pilatus6mconverted_v2.cbf + #-cmp insulin_pilatus6mconverted_v2.cbf insulin_pilatus6mconverted_v2_orig.cbf (CBF_CONVERT_MINICBF_PATH=$(BIN); export CBF_CONVERT_MINICBF_PATH; \ $(LDPREFIX) $(EXAMPLES)/batch_convert_minicbf.sh "." "minicbf_test" \ "X4_lots_M1S4_1_*.cbf" $(TEMPLATES)/template_X4_lots_M1S4.cbf) +# +# Starting with insulin_pilatus6mconverted.cbf, create hdf5 files using opaque, encI, encp, encb, encc, encz +# -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ $(TIME) $(BIN)/cif2cbf -5 w -O $(HDF5REGISTER) -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted.cbf.h5) -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ @@ -2596,10 +2892,9 @@ endif $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cc -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encc.cbf.h5) -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cz -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encz.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cl -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encl.cbf.h5) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -c2 -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5) +# +# check the default as hdf5 dumps +# -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ $(H5DUMP) insulin_pilatus6mconverted_orig.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted_orig.cbf.h5.dump) -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ @@ -2607,41 +2902,26 @@ endif -$(DIFF) insulin_pilatus6mconverted_orig.cbf.h5.dump insulin_pilatus6mconverted.cbf.h5.dump -rm -f insulin_pilatus6mconverted_orig.cbf.h5.dump -rm -f insulin_pilatus6mconverted.cbf.h5.dump - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_orig.cbf.h5.cbf -o insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf) - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf.h5 -o insulin_pilatus6mconverted.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted.cbf.h5.cbf -o insulin_pilatus6mconverted.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encp.cbf.h5 -o insulin_pilatus6mconverted_encp.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encp.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encb.cbf.h5 -o insulin_pilatus6mconverted_encb.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encb.cbf.h5.cbf -o insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encp.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encI.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encI.cbf.h5.cbf -o insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encI.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encc.cbf.h5 -o insulin_pilatus6mconverted_encc.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encc.cbf.h5.cbf -o insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encc.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encz.cbf.h5 -o insulin_pilatus6mconverted_encz.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encz.cbf.h5.cbf -o insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encz.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encl.cbf.h5 -o insulin_pilatus6mconverted_encl.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_encl.cbf.h5.cbf -o insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_encl.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \ - $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_enc2.cbf.h5 -o insulin_pilatus6mconverted_enc2.cbf.h5.cbf; \ - $(BIN)/cif2cbf -eq -cI -i insulin_pilatus6mconverted_enc2.cbf.h5.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf) - -cmp insulin_pilatus6mconverted_enc2.cbf.h5.eqcI.cbf insulin_pilatus6mconverted_orig.cbf.h5.eqcI.cbf - -rm -f insulin_pilatus6mconverted*.cbf.h5.eqcI.cbf +# +# Convert each of the non-opaque h5 files to encI cbfs and compare them +# + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encI.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + cp insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encp.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encb.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encc.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \ + $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encz.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;) + -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf; + $(LDPREFIX) $(TINE) $(BIN)/test_cbf_airy_disk $(LDPREFIX) $(TIME) $(BIN)/cbf_testxfelread $(LDPREFIX) $(TIME) $(BIN)/testalloc @@ -2670,14 +2950,18 @@ endif -cd $(MINICBF_TEST); $(DIFF) i19-1.dump i19-2.dump -cd $(MINICBF_TEST); $(DIFF) i19-1.cbf i19-2.cbf $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf + -cat testrealin.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - testrealout.cbf + #-cmp testrealin.cbf testrealout.cbf $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf + -cat testflatin.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - testflatout.cbf + #-cmp testflatin.cbf testflatout.cbf $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf + -cat testflatpackedin.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - testflatpackedout.cbf + #-cmp testflatpackedin.cbf testflatpackedout.cbf ifneq ($(F90C),) $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatout.out) - -$(DIFF) test_xds_bin_testflatout.out test_xds_bin_testflatout_orig.out + -cat test_xds_bin_testflatout_orig.out | sed "2,2s/0.9.6/0.9.7/" | $(DIFF) -a - test_xds_bin_testflatout.out + #-$(DIFF) test_xds_bin_testflatout.out test_xds_bin_testflatout_orig.out $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatpackedout.out) -$(DIFF) test_xds_bin_testflatpackedout.out test_xds_bin_testflatpackedout_orig.out $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatout.out) @@ -2687,109 +2971,59 @@ ifneq ($(F90C),) endif $(LDPREFIX) $(TIME) $(BIN)/sauter_test $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) - -$(DIFF) XRD1621.cbf XRD1621_orig.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(DIFF) XRD1621_I4encbC100.cbf XRD1621_I4encbC100_orig.cbf - -ifneq ($(F90C),) -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf \ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -else -extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \ - $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \ - $(BIN)/convert_minicbf \ - $(BIN)/sauter_test $(BIN)/adscimg2cbf\ - $(BIN)/cbf2adscimg \ - $(BIN)/changtestcompression $(BIN)/tiff2cbf\ - basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) -endif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e hex -c none \ - makecbf.cbf cif2cbf_ehcn.cif - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \ - cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif - -cmp makecbf.cbf cif2cbf_encp.cbf - $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf - -cmp 9ins.cif 9ins.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F example.mar2300 converted_flat.cbf - -$(SIGNATURE) < converted_flat.cbf | $(DIFF) - converted_flat_orig.cbf$(SEXT); rm converted_flat.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_image example.mar2300 converted.cbf - -$(SIGNATURE) < converted.cbf | $(DIFF) - converted_orig.cbf$(SEXT); rm converted.cbf - -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat | \ - $(SIGNATURE) | $(DIFF) - testcell_orig.prt$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf - -$(SIGNATURE) < adscconverted_flat.cbf | $(DIFF) - adscconverted_flat_orig.cbf$(SEXT) - $(LDPREFIX) $(TIME) $(BIN)/convert_image -d adscquantum315 mb_LP_1_001.img adscconverted.cbf - -$(SIGNATURE) < adscconverted.cbf | $(DIFF) - adscconverted_orig.cbf$(SEXT); rm adscconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img - -$(SIGNATURE) < mb_LP_1_001.cbf | $(DIFF) - mb_LP_1_001_orig.cbf$(SEXT) - mv mb_LP_1_001.cbf nmb_LP_1_001.cbf - $(LDPREFIX) $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf - -cmp nmb_LP_1_001.img mb_LP_1_001.img - rm nmb_LP_1_001.cbf - rm nmb_LP_1_001.img - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted.cbf | $(DIFF) - insulin_pilatus6mconverted_rev_orig.cbf$(SEXT); rm insulin_pilatus6mconverted.cbf - $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf - -$(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf | $(DIFF) - insulin_pilatus6mconverted_v2_orig.cbf$(SEXT); rm insulin_pilatus6mconverted_v2.cbf - $(LDPREFIX) $(TIME) $(BIN)/testreals - -cmp testrealin.cbf testrealout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflat - -cmp testflatin.cbf testflatout.cbf - $(LDPREFIX) $(TIME) $(BIN)/testflatpacked - -cmp testflatpackedin.cbf testflatpackedout.cbf -ifneq ($(F90C),) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_xds_binary | \ - $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatpackedout_orig.out$(SEXT) - $(LDPREFIX) echo testflatout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatout_orig.out$(SEXT) - $(LDPREFIX) echo testflatpackedout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \ - $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatpackedout_orig.out$(SEXT) -endif - $(LDPREFIX) $(TIME) $(BIN)/sauter_test - $(LDPREFIX) $(TIME) $(BIN)/changtestcompression - $(LDPREFIX) $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf) + $(LDPREFIX) $(TIME) $(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf + -cat XRD1621_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - XRD1621.cbf + #-$(DIFF) XRD1621.cbf XRD1621_orig.cbf $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf - -$(SIGNATURE) < XRD1621.cbf | $(DIFF) - XRD1621_orig.cbf$(SEXT); rm XRD1621.cbf - -$(SIGNATURE) < XRD1621_I4encbC100.cbf | $(DIFF) - XRD1621_I4encbC100_orig.cbf$(SEXT); rm XRD1621_I4encbC100.cbf - @-rm -f adscconverted_flat.cbf - @-rm -f $(TESTINPUT_BASIC) $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS) - @-rm -f cif2cbf_packed.cbf makecbf.cbf \ - cif2cbf_packed.cbf img2cif_packed.cbf \ - cif2cbf_canonical.cbf img2cif_canonical.cbf - @-rm -f testrealout.cbf testflatout.cbf testflatpackedout.cbf \ - cif2cbf_encp.cbf img2cif_canonical.cif img2cif_packed.cif 9ins.cbf - + -cat XRD1621_I4encbC100_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - XRD1621_I4encbC100.cbf + #-$(DIFF) XRD1621_I4encbC100.cbf XRD1621_I4encbC100_orig.cbf -pycbftests: $(PYCBF)/_pycbf.$(PYCBFEXT) $(BIN)/cbf_standardize_numbers - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test1.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test2.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test3.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_test4.py) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test1.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py fel_test2.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) - ($(RTLPEXPORTS) cd $(PYCBF); $(PYTHON) pycbf_testfelaxes.py ../hit-20140306005258847.cbf |\ - $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test1_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test1.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test2_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test2.out - - -$(BIN)/cbf_standardize_numbers $(PYCBF)/fel_test3_orig.out 4 | \ - $(DIFF) $(PYCBF)/fel_test3.out - - -pycbfinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfinstall - -pycbfuserinstall: $(PYCBF)/_pycbf.$(PYCBFEXT) $(PYCBF)/pycbfuserinstall +py2cbftests: $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(BIN)/cbf_standardize_numbers $(TESTOUTPUT) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test1.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test1.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test1.out $(ROOT)/pycbf_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test2.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test2.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test2.out $(ROOT)/pycbf_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test3.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test3.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test3.out $(ROOT)/pycbf_test3_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test4.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test4.out) + -(cd $(PY2CBF); $(DIFF) pycbf_test4.out $(ROOT)/pycbf_test4_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_testfelaxes.py fel_test1.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) + -(cd $(PY2CBF); $(DIFF) fel_test1.out $(ROOT)/fel_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_testfelaxes.py fel_test2.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) + -(cd $(PY2CBF); $(DIFF) fel_test2.out $(ROOT)/fel_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_testfelaxes.py ../hit-20140306005258847.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) + -(cd $(PY2CBF); $(DIFF) fel_test3.out $(ROOT)/fel_test3_orig.out) + +py2cbfinstall: $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(PY2CBF)/py2cbfinstall + +py2cbfuserinstall: $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(PY2CBF)/py2cbfuserinstall + +py3cbftests: $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(BIN)/cbf_standardize_numbers $(TESTOUTPUT) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test1.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test1.out) + -(cd $(PY3CBF); grep -v "__builtins__" $(ROOT)/pycbf_test1_orig.out | \ + grep -v "__add__" | grep -v "Foundthebinary" > pycbf_test1_orig.out; \ + grep -v "__builtins__" pycbf_test1.out | \ + grep -v "__add__" | grep -v "Foundthebinary" |$(DIFF) - pycbf_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test2.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test2.out) + -(cd $(PY3CBF); $(DIFF) pycbf_test2.out $(ROOT)/pycbf_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test3.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test3.out) + -(cd $(PY3CBF); $(DIFF) pycbf_test3.out $(ROOT)/pycbf_test3_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test4.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test4.out) + -(cd $(PY3CBF); grep -v "__builtins__" $(ROOT)/pycbf_test4_orig.out | \ + grep -v "__add__" | grep -v "Foundthebinary" > pycbf_test4_orig.out; \ + grep -v "__builtins__" pycbf_test4.out | grep -v "__add__" | \ + grep -v "Foundthebinary" | $(DIFF) - pycbf_test4_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_testfelaxes.py fel_test1.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out) + -(cd $(PY3CBF); $(DIFF) fel_test1.out $(ROOT)/fel_test1_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_testfelaxes.py fel_test2.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out) + -(cd $(PY3CBF); $(DIFF) fel_test2.out $(ROOT)/fel_test2_orig.out) + ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_testfelaxes.py ../hit-20140306005258847.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out) + -(cd $(PY3CBF); $(DIFF) fel_test3.out $(ROOT)/fel_test3_orig.out) + +py3cbfinstall: $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(PY3CBF)/py3cbfinstall + +py3cbfuserinstall: $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(PY3CBF)/py3cbfuserinstall javatests: $(BIN)/ctestcbf $(BIN)/testcbf.class $(SOLIB)/libcbf_wrap.so $(LDPREFIX) $(BIN)/ctestcbf > testcbfc.txt @@ -2808,13 +3042,13 @@ empty: @-rm -rf $(INCLUDE)/bshuf* @-rm -rf $(INCLUDE)/H5* @-rm -rf $(BIN)/* - @-rm -f $(PYCBF)/_pycbf.$(PYCBFEXT) - @-rm -rf $(PYCBF)/build/* - @-rm -f $(PYCBF)/newtest1.cbf - @-rm -f $(PYCBF)/fel_test1.out - @-rm -f $(PYCBF)/fel_test2.out - @-rm -f $(PYCBF)/setup.py - @-rm -f $(PYCBF)/setup_MINGW.py + @-rm -f $(PY2CBF)/_py2cbf.$(PY2CBFEXT) + @-rm -rf $(PY2CBF)/build/* + @-rm -f $(PY2CBF)/newtest1.cbf + @-rm -f $(PY2CBF)/fel_test1.out + @-rm -f $(PY2CBF)/fel_test2.out + @-rm -f $(PY2CBF)/setup.py + @-rm -f $(PY2CBF)/setup_MINGW.py @-rm -f makecbf.cbf @-rm -f img2cif_packed.cif @-rm -f img2cif_canonical.cif @@ -2898,12 +3132,39 @@ empty: @-rm -f 1191_00005.cbf @-rm -f XRD1621.tif @-rm -f md5tmp - @-rm -rf $(PYCBF)/build + @-rm -rf $(PY2CBF)/build @-rm -f *_old @-rm -f X4_lots_M1S4_1_*.cbf @-rm -f testfile.h5 @-rm -f hit-20140306005258847.cbf @-rm -f build_* + @-rm -rf HDF5Plugin_5Jun21/ + @-rm -rf PyCifRW-4.1/ + @-rm -rf PyCifRW-4.3/ + @-rm -rf bitshuffle-0.2.2.1_15Jun16/ + @-rm -f idx-s00-20131106040304531_flat.cbf + @-rm -f include/iochain.h + @-rm -f include/lz4.h + @-rm -f include/pcre.h + @-rm -f include/pcre_scanner.h + @-rm -f include/pcre_stringpiece.h + @-rm -f include/pcrecpp.h + @-rm -f include/pcrecpparg.h + @-rm -f include/pcreposix.h + @-rm -f include/regex.h + @-rm -f minicbf_test/X4_lots_M1S4_1_0001.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0002.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0003.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0004.cbf + @-rm -f minicbf_test/X4_lots_M1S4_1_0005.cbf + @-rm -f minicbf_test/minicbf.h5 + @-rm -rf ply-3.2/dist/ + @-rm -f $(PY2CBF)/fel_test3.out + @-rm -f $(PY2CBF)/pycbf.pyc + @-rm -f $(PY2CBF)/pycbf_test1.out + @-rm -f $(PY2CBF)/pycbf_test2.out + @-rm -f $(PY2CBF)/pycbf_test3.out + @-rm -f $(PY2CBF)/pycbf_test4.out ./.undosymlinks # diff --git a/m4/fcb_next_binary.m4 b/m4/fcb_next_binary.m4 index 49d92c6c..63a519d1 100644 --- a/m4/fcb_next_binary.m4 +++ b/m4/fcb_next_binary.m4 @@ -137,7 +137,7 @@ m4_include(`fcblib_defines.m4')m4_dnl ENDIF IF (LINELEN.GT.0 .AND. LINE(1).EQ.IACHAR(''`;''`) .AND. & (LINELEN.EQ.1 .OR. LINE(2).EQ.IACHAR(''` ''`) .OR. & - LINE(2).EQ.Z''`09''`) ) GO TO 100 + LINE(2).EQ.int(Z''`09''`)) ) GO TO 100 IF (FCB_CI_STRNCMPARR(BOUNDARY,LINE,LINELEN,29).EQ.0) & GO TO 100 END IF @@ -146,7 +146,7 @@ m4_include(`fcblib_defines.m4')m4_dnl LINE_COUNT = LINE_COUNT+1 CONTINUATION = 0 IF (LINELEN.GT.0.AND. & - (LINE(1).EQ.IACHAR(''` ''`).OR.LINE(1).EQ.Z''`09''`))CONTINUATION=1 + (LINE(1).EQ.IACHAR(''` ''`).OR.LINE(1).EQ.int(Z''`09''`)))CONTINUATION=1 ITEM = 0 IF (CONTINUATION .EQ. 0 ) THEN DO IC = 1, LINELEN @@ -197,15 +197,15 @@ m4_include(`fcblib_defines.m4')m4_dnl ! Skip to the end of the section (a semicolon) DO IF (IC.GT.LINELEN)EXIT - IF (LINE(IC).EQ.Z''`22''`) THEN ! double quote + IF (LINE(IC).EQ.int(Z''`22''`)) THEN ! double quote IC = IC+1 DO IF (IC.GT.LINELEN)EXIT - IF (LINE(IC).EQ.Z''`22''`) THEN !double quote + IF (LINE(IC).EQ.int(Z''`22''`)) THEN !double quote IC = IC+1 EXIT ELSE - IF (LINE(IC).EQ.Z''`5C''`) THEN !backslash + IF (LINE(IC).EQ.int(Z''`5C''`)) THEN !backslash IC = IC+1 END IF IF (IC .LE. LINELEN) IC = IC+1 @@ -246,7 +246,7 @@ m4_include(`fcblib_defines.m4')m4_dnl LINE,LINESIZE,LINELEN,IC,FRESH_LINE) IF (FCB_NEXT_BINARY.NE.0) RETURN QUOTE = 0 - IF (LINE(IC).EQ.Z''`22''`) QUOTE=1 ! double quote + IF (LINE(IC).EQ.int(Z''`22''`)) QUOTE=1 ! double quote COMPRESSION = CBF_NONE IF (FCB_CI_STRNCMPARR("x-CBF_PACKED", & LINE(IC+QUOTE:LINELEN),LINELEN-IC-QUOTE+1,12).EQ.0) & @@ -270,15 +270,15 @@ m4_include(`fcblib_defines.m4')m4_dnl ! Skip to the end of the section (a semicolon) DO IF (IC.GT.LINELEN)EXIT - IF (LINE(IC).EQ.Z''`22''`) THEN ! double quote + IF (LINE(IC).EQ.int(Z''`22''`)) THEN ! double quote IC = IC+1 DO IF (IC.GT.LINELEN)EXIT - IF (LINE(IC).EQ.Z''`22''`) THEN !double quote + IF (LINE(IC).EQ.int(Z''`22''`)) THEN !double quote IC = IC+1 EXIT ELSE - IF (LINE(IC).EQ.Z''`5C''`) THEN !backslash + IF (LINE(IC).EQ.int(Z''`5C''`)) THEN !backslash IC = IC+1 END IF IF (IC .LE. LINELEN) IC = IC+1 @@ -306,7 +306,7 @@ m4_include(`fcblib_defines.m4')m4_dnl FRESH_LINE) IF (FCB_NEXT_BINARY.NE.0) RETURN QUOTE = 0 - IF (LINE(IC).EQ.Z''`22''`) QUOTE=1 ! double quote + IF (LINE(IC).EQ.int(Z''`22''`)) QUOTE=1 ! double quote IF (FCB_CI_STRNCMPARR("uncorrelated_sections", & LINE(IC+QUOTE:LINELEN),LINELEN-IC-QUOTE+1,21).EQ.0) & COMPRESSION = IOR(COMPRESSION,CBF_UNCORRELATED_SECTIONS) @@ -325,13 +325,13 @@ m4_include(`fcblib_defines.m4')m4_dnl CASE (1) ! Binary encoding FAILURE = 1 QUOTE = 0; - IF (LINE(IC) .EQ. Z''`22''`) QUOTE = 1 !double quote + IF (LINE(IC) .EQ. int(Z''`22''`)) QUOTE = 1 !double quote IF (FCB_CI_STRNCMPARR("Quoted-Printable", & LINE(IC+QUOTE:LINELEN), LINELEN-IC-QUOTE+1, 16) .EQ. 0)THEN IF (IC+16.EQ.LINELEN+1 .OR. & FCB_NBLEN_ARRAY(LINE(IC+16),1).EQ.0 .OR. & LINE(IC+16).EQ.IACHAR(''`(''`).OR. & - (QUOTE.EQ.1.AND.LINE(IC+16).EQ.Z''`22''`)) THEN !double quote + (QUOTE.EQ.1.AND.LINE(IC+16).EQ.int(Z''`22''`))) THEN !double quote FAILURE = 0 ENCODING = ENC_QP END IF @@ -341,7 +341,7 @@ m4_include(`fcblib_defines.m4')m4_dnl IF (IC+6.EQ.LINELEN+1 .OR. & FCB_NBLEN_ARRAY(LINE(IC+6),1).EQ.0 .OR. & LINE(IC+6).EQ.IACHAR(''`(''`).OR. & - (QUOTE.EQ.1.AND.LINE(IC+6).EQ.Z''`22''`)) THEN ! double quote + (QUOTE.EQ.1.AND.LINE(IC+6).EQ.int(Z''`22''`))) THEN ! double quote FAILURE = 0 ENCODING = ENC_BASE64 END IF @@ -351,7 +351,7 @@ m4_include(`fcblib_defines.m4')m4_dnl IF (IC+9.EQ.LINELEN+1 .OR. & FCB_NBLEN_ARRAY(LINE(IC+9),1).EQ.0 .OR. & LINE(IC+9).EQ.IACHAR(''`(''`).OR. & - (QUOTE.EQ.1.AND.LINE(IC+9).EQ.Z''`22''`)) THEN ! double quote + (QUOTE.EQ.1.AND.LINE(IC+9).EQ.int(Z''`22''`))) THEN ! double quote FAILURE = 0 ENCODING = ENC_BASE32K END IF @@ -361,7 +361,7 @@ m4_include(`fcblib_defines.m4')m4_dnl IF (IC+7.EQ.LINELEN+1 .OR. & FCB_NBLEN_ARRAY(LINE(IC+7),1).EQ.0 .OR. & LINE(IC+7).EQ.IACHAR(''`(''`).OR. & - (QUOTE.EQ.1.AND.LINE(IC+7).EQ.Z''`22''`)) THEN ! double quote + (QUOTE.EQ.1.AND.LINE(IC+7).EQ.int(Z''`22''`))) THEN ! double quote FAILURE = 0 ENCODING = ENC_BASE8 END IF @@ -371,7 +371,7 @@ m4_include(`fcblib_defines.m4')m4_dnl IF (IC+8.EQ.LINELEN+1 .OR. & FCB_NBLEN_ARRAY(LINE(IC+8),1).EQ.0 .OR. & LINE(IC+8).EQ.IACHAR(''`(''`).OR. & - (QUOTE.EQ.1.AND.LINE(IC+8).EQ.Z''`22''`)) THEN ! double quote + (QUOTE.EQ.1.AND.LINE(IC+8).EQ.int(Z''`22''`))) THEN ! double quote FAILURE = 0 ENCODING = ENC_BASE10 END IF @@ -381,7 +381,7 @@ m4_include(`fcblib_defines.m4')m4_dnl IF (IC+8.EQ.LINELEN+1 .OR. & FCB_NBLEN_ARRAY(LINE(IC+8),1).EQ.0 .OR. & LINE(IC+8).EQ.IACHAR(''`(''`).OR. & - (QUOTE.EQ.1.AND.LINE(IC+8).EQ.Z''`22''`)) THEN !double quote + (QUOTE.EQ.1.AND.LINE(IC+8).EQ.int(Z''`22''`))) THEN !double quote FAILURE = 0 ENCODING = ENC_BASE16 END IF @@ -393,7 +393,7 @@ m4_include(`fcblib_defines.m4')m4_dnl IF (IC+4.EQ.LINELEN+1 .OR. & FCB_NBLEN_ARRAY(LINE(IC+4),1).EQ.0 .OR. & LINE(IC+4).EQ.IACHAR(''`(''`).OR. & - (QUOTE.EQ.1.AND.LINE(IC+4).EQ.Z''`22''`)) THEN !double quote + (QUOTE.EQ.1.AND.LINE(IC+4).EQ.int(Z''`22''`))) THEN !double quote FAILURE = 0 ENCODING = ENC_NONE END IF @@ -403,7 +403,7 @@ m4_include(`fcblib_defines.m4')m4_dnl IF (IC+6.EQ.LINELEN+1 .OR. & FCB_NBLEN_ARRAY(LINE(IC+6),1).EQ.0 .OR. & LINE(IC+6).EQ.IACHAR(''`(''`).OR. & - (QUOTE.EQ.1.AND.LINE(IC+6).EQ.Z''`22''`)) THEN ! double quote + (QUOTE.EQ.1.AND.LINE(IC+6).EQ.int(Z''`22''`))) THEN ! double quote FAILURE = 0 ENCODING = ENC_NONE END IF @@ -443,7 +443,7 @@ m4_include(`fcblib_defines.m4')m4_dnl FCB_BYTES_IN_REC,BYTE_IN_FILE,REC_IN_FILE,BUFFER, & LINE,LINESIZE,LINELEN,IC,FRESH_LINE) IF (FCB_NEXT_BINARY.NE.0) RETURN - IF (LINE(IC) .EQ. Z''`22''`) THEN ! double quote + IF (LINE(IC) .EQ. int(Z''`22''`)) THEN ! double quote IF (QUOTE.NE.0) EXIT IC = IC+1 QUOTE = QUOTE+1 diff --git a/m4/fcb_packed.m4 b/m4/fcb_packed.m4 index 6a9149d5..f12596c9 100644 --- a/m4/fcb_packed.m4 +++ b/m4/fcb_packed.m4 @@ -155,8 +155,8 @@ m4_ifelse($1,`I4',`m4_define(`fcb_i2_flag',`I4')', INTEGER I, J, K, IFAST, m4_ifelse(fcb_3d_flag,`3D',`IMID, ')ISLOW INTEGER LOGTWO(4) m4_ifelse(fcb_i2_flag,`I2', -` INTEGER(4), PARAMETER:: SIGNMASK=Z'''``00008000'''`` - INTEGER(4), PARAMETER:: LIMMASK=Z'''``0000FFFF'''``') +` INTEGER(4), PARAMETER:: SIGNMASK=int(Z'''``00008000'''``) + INTEGER(4), PARAMETER:: LIMMASK=int(Z'''``0000FFFF'''``)') fcb_param_CBF_LIST_ALL @@ -392,11 +392,11 @@ m4_ifelse(fcb_i2_flag,`I2', TRAIL_INDEX_ARRAY(I) = 0 END DO - VORZEICHEN = m4_ifelse($1,`I2',Z''`00008000''`,$1,`3D_I2',Z''`00008000''`,Z''`80000000''`) + VORZEICHEN = m4_ifelse($1,`I2',int(Z''`00008000''`),$1,`3D_I2',int(Z''`00008000''`),int(Z''`80000000''`)) UNSIGN = 0 IF (ELSIGN.NE.0) UNSIGN=VORZEICHEN - LIMIT = m4_ifelse($1,`I2',Z''`0000FFFF''`,$1,`3D_I2',Z''`0000FFFF''`,Z''`FFFFFFFF''`) + LIMIT = m4_ifelse($1,`I2',int(Z''`0000FFFF''`),$1,`3D_I2',int(Z''`0000FFFF''`),int(Z''`FFFFFFFF''`)) ! Initialise the first element diff --git a/m4/fcb_read_bits.m4 b/m4/fcb_read_bits.m4 index 92c070e0..15e40552 100644 --- a/m4/fcb_read_bits.m4 +++ b/m4/fcb_read_bits.m4 @@ -26,7 +26,7 @@ m4_include(`fcblib_defines.m4')m4_dnl ` MAXBITS = 32 NUMINTS = (BITCOUNT+MAXBITS-1)/MAXBITS - MASK8 = Z''`000000FF''` + MASK8 = int(Z''`000000FF''`) DO KINTS = 1,NUMINTS LBITCOUNT = MAXBITS @@ -164,9 +164,9 @@ m4_include(`fcblib_defines.m4')m4_dnl IINT(1) = -1 IF (VALSIGN.NE.0) THEN IF (XSIGN(1).GE. 0) THEN - IINT(1) = Z''`7FFFFFFF''` + IINT(1) = int(Z''`7FFFFFFF''`) ELSE - IINT(1) = Z''`80000000''` + IINT(1) = int(Z''`80000000''`) END IF END IF RETURN diff --git a/m4/fcb_read_image.m4 b/m4/fcb_read_image.m4 index 5eaa4adc..0681edf8 100644 --- a/m4/fcb_read_image.m4 +++ b/m4/fcb_read_image.m4 @@ -155,12 +155,12 @@ m4_ifelse(`fcb_3d_flag',`3D', !----------------------------------------------------------------------- PIXVALUE=TRANSFER(ENDIANORDER,PIXVALUE) STEP=0 - IF (PIXVALUE .EQ. Z''`78563412''`) THEN !Little Endian machine + IF (PIXVALUE .EQ. int(Z''`78563412''`)) THEN !Little Endian machine STEP=1 FIRST2=1;LAST2=2 FIRST4=1;LAST4=4 ENDIF - IF (PIXVALUE .EQ. Z''`12345678''`) THEN ! Big Endian machine + IF (PIXVALUE .EQ. int(Z''`12345678''`)) THEN ! Big Endian machine STEP=-1 FIRST2=2;LAST2=1 FIRST4=4;LAST4=1 diff --git a/m4/fcb_read_xds_i2.m4 b/m4/fcb_read_xds_i2.m4 index a975a64b..1dd16a9a 100644 --- a/m4/fcb_read_xds_i2.m4 +++ b/m4/fcb_read_xds_i2.m4 @@ -89,12 +89,12 @@ m4_include(`fcblib_defines.m4') !----------------------------------------------------------------------- PIXVALUE=TRANSFER(ENDIANORDER,PIXVALUE) STEP=0 - IF (PIXVALUE .EQ. Z''`78563412''`) THEN !Little Endian machine + IF (PIXVALUE .EQ. int(Z''`78563412''`)) THEN !Little Endian machine STEP=1 FIRST2=1;LAST2=2 FIRST4=1;LAST4=4 ENDIF - IF (PIXVALUE .EQ. Z''`12345678''`) THEN ! Big Endian machine + IF (PIXVALUE .EQ. int(Z''`12345678''`)) THEN ! Big Endian machine STEP=-1 FIRST2=2;LAST2=1 FIRST4=4;LAST4=1 diff --git a/m4/fcblib_defines.m4 b/m4/fcblib_defines.m4 index b5bdd063..cc4159a4 100644 --- a/m4/fcblib_defines.m4 +++ b/m4/fcblib_defines.m4 @@ -3,58 +3,58 @@ m4_define(`fcb_is_last',`is_last')m4_dnl m4_dnl Error codes: m4_define(`fcb_errcode_CBF_FORMAT', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_FORMAT = Z''`00000001''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 1')m4_dnl + '',``'')CBF_FORMAT = int(Z''`00000001''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 1')m4_dnl m4_define(`fcb_errcode_CBF_ALLOC', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_ALLOC = Z''`00000002''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 2')m4_dnl + '',``'')CBF_ALLOC = int(Z''`00000002''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 2')m4_dnl m4_define(`fcb_errcode_CBF_ARGUMENT', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_ARGUMENT = Z''`00000004''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 4')m4_dnl + '',``'')CBF_ARGUMENT = int(Z''`00000004''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 4')m4_dnl m4_define(`fcb_errcode_CBF_ASCII', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_ASCII = Z''`00000008''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 8')m4_dnl + '',``'')CBF_ASCII = int(Z''`00000008''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 8')m4_dnl m4_define(`fcb_errcode_CBF_BINARY', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_BINARY = Z''`00000010''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 16')m4_dnl + '',``'')CBF_BINARY = int(Z''`00000010''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 16')m4_dnl m4_define(`fcb_errcode_CBF_BITCOUNT', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_BITCOUNT = Z''`00000020''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 32')m4_dnl + '',``'')CBF_BITCOUNT = int(Z''`00000020''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 32')m4_dnl m4_define(`fcb_errcode_CBF_ENDOFDATA', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_ENDOFDATA = Z''`00000040''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 64')m4_dnl + '',``'')CBF_ENDOFDATA = int(Z''`00000040''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 64')m4_dnl m4_define(`fcb_errcode_CBF_FILECLOSE', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_FILECLOSE = Z''`00000080''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 128')m4_dnl + '',``'')CBF_FILECLOSE = int(Z''`00000080''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 128')m4_dnl m4_define(`fcb_errcode_CBF_FILEOPEN', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_FILEOPEN = Z''`00000100''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 256')m4_dnl + '',``'')CBF_FILEOPEN = int(Z''`00000100''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 256')m4_dnl m4_define(`fcb_errcode_CBF_FILEREAD', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_FILEREAD = Z''`00000200''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 512')m4_dnl + '',``'')CBF_FILEREAD = int(Z''`00000200''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 512')m4_dnl m4_define(`fcb_errcode_CBF_FILESEEK', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_FILESEEK = Z''`00000400''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 1024')m4_dnl + '',``'')CBF_FILESEEK = int(Z''`00000400''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 1024')m4_dnl m4_define(`fcb_errcode_CBF_FILETELL', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_FILETELL = Z''`00000800''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 2048')m4_dnl + '',``'')CBF_FILETELL = int(Z''`00000800''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 2048')m4_dnl m4_define(`fcb_errcode_CBF_FILEWRITE', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_FILEWRITE = Z''`00001000''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 4096')m4_dnl + '',``'')CBF_FILEWRITE = int(Z''`00001000''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 4096')m4_dnl m4_define(`fcb_errcode_CBF_IDENTICAL', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_IDENTICAL = Z''`00002000''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 8192')m4_dnl + '',``'')CBF_IDENTICAL = int(Z''`00002000''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 8192')m4_dnl m4_define(`fcb_errcode_CBF_NOTFOUND', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_NOTFOUND = Z''`00004000''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 16384')m4_dnl + '',``'')CBF_NOTFOUND = int(Z''`00004000''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 16384')m4_dnl m4_define(`fcb_errcode_CBF_OVERFLOW', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_OVERFLOW = Z''`00008000''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 32768')m4_dnl + '',``'')CBF_OVERFLOW = int(Z''`00008000''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 32768')m4_dnl m4_define(`fcb_errcode_CBF_UNDEFINED', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_UNDEFINED = Z''`00010000''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 65536')m4_dnl + '',``'')CBF_UNDEFINED = int(Z''`00010000''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 65536')m4_dnl m4_define(`fcb_errcode_CBF_NOTIMPLEMENTED', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_NOTIMPLEMENTED = Z''`00020000''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 131072')m4_dnl + '',``'')CBF_NOTIMPLEMENTED = int(Z''`00020000''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` ! 131072')m4_dnl m4_define(`fcb_errcode_LIST_ALL', m4_define(`fcb_is_last',`')m4_dnl ! @@ -86,25 +86,25 @@ m4_dnl m4_dnl Possible parameter values for ENCODING are: m4_define(`fcb_param_ENC_NONE', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')ENC_NONE = Z''`0001''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Use BINARY encoding')m4_dnl + '',``'')ENC_NONE = int(Z''`0001''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Use BINARY encoding')m4_dnl m4_define(`fcb_param_ENC_BASE64', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')ENC_BASE64 = Z''`0002''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Use BASE64 encoding')m4_dnl + '',``'')ENC_BASE64 = int(Z''`0002''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Use BASE64 encoding')m4_dnl m4_define(`fcb_param_ENC_BASE32k', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')ENC_BASE32K = Z''`0004''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Use X-BASE32K encoding')m4_dnl + '',``'')ENC_BASE32K = int(Z''`0004''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Use X-BASE32K encoding')m4_dnl m4_define(`fcb_param_ENC_QP', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')ENC_QP = Z''`0008''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Use QUOTED-PRINTABLE encoding')m4_dnl + '',``'')ENC_QP = int(Z''`0008''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Use QUOTED-PRINTABLE encoding')m4_dnl m4_define(`fcb_param_ENC_BASE10', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')ENC_BASE10 = Z''`0010''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Use BASE10 encoding')m4_dnl + '',``'')ENC_BASE10 = int(Z''`0010''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Use BASE10 encoding')m4_dnl m4_define(`fcb_param_ENC_BASE16', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')ENC_BASE16 = Z''`0020''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Use BASE16 encoding')m4_dnl + '',``'')ENC_BASE16 = int(Z''`0020''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Use BASE16 encoding')m4_dnl m4_define(`fcb_param_ENC_BASE8', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')ENC_BASE8 = Z''`0040''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Use BASE8 encoding')m4_dnl + '',``'')ENC_BASE8 = int(Z''`0040''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Use BASE8 encoding')m4_dnl m4_define(`fcb_param_ENC_LIST_ALL', m4_define(`fcb_is_last',`')m4_dnl ! @@ -126,42 +126,42 @@ m4_dnl Possible parameter values for COMPRESSION are: m4_dnl m4_define(`fcb_param_CBF_INTEGER', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_INTEGER = Z''`0010''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Uncompressed integer')m4_dnl + '',``'')CBF_INTEGER = int(Z''`0010''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Uncompressed integer')m4_dnl m4_define(`fcb_param_CBF_FLOAT', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_FLOAT = Z''`0020''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Uncompressed IEEE floating point')m4_dnl + '',``'')CBF_FLOAT = int(Z''`0020''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Uncompressed IEEE floating point')m4_dnl m4_define(`fcb_param_CBF_CANONICAL', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_CANONICAL = Z''`0050''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Canonical compression')m4_dnl + '',``'')CBF_CANONICAL = int(Z''`0050''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Canonical compression')m4_dnl m4_define(`fcb_param_CBF_PACKED', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_PACKED = Z''`0060''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Packed compression')m4_dnl + '',``'')CBF_PACKED = int(Z''`0060''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Packed compression')m4_dnl m4_define(`fcb_param_CBF_PACKED_V2', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_PACKED_V2 = Z''`0090''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Packed compression')m4_dnl + '',``'')CBF_PACKED_V2 = int(Z''`0090''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Packed compression')m4_dnl m4_define(`fcb_param_CBF_BYTE_OFFSET', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_BYTE_OFFSET = Z''`0070''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Byte Offset Compression')m4_dnl + '',``'')CBF_BYTE_OFFSET = int(Z''`0070''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Byte Offset Compression')m4_dnl m4_define(`fcb_param_CBF_PREDICTOR', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_PREDICTOR = Z''`0080''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Predictor_Huffman Compression')m4_dnl + '',``'')CBF_PREDICTOR = int(Z''`0080''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Predictor_Huffman Compression')m4_dnl m4_define(`fcb_param_CBF_NONE', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_NONE = Z''`0040''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !No compression flag')m4_dnl + '',``'')CBF_NONE = int(Z''`0040''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !No compression flag')m4_dnl m4_define(`fcb_param_CBF_COMPRESSION_MASK', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & '',``'')CBF_COMPRESSION_MASK = & - Z''`00FF''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Mask to sep compressiontype from flags')m4_dnl + int(Z''`00FF''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Mask to sep compressiontype from flags')m4_dnl m4_define(`fcb_param_CBF_FLAG_MASK', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_FLAG_MASK = Z''`0F00''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Mask to sep flags from compression type')m4_dnl + '',``'')CBF_FLAG_MASK = int(Z''`0F00''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Mask to sep flags from compression type')m4_dnl m4_define(`fcb_param_CBF_UNCORRELATED_SECTIONS', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & '',``'')CBF_UNCORRELATED_SECTIONS =& - Z''`0100''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Flag for uncorrelated sections')m4_dnl + int(Z''`0100''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Flag for uncorrelated sections')m4_dnl m4_define(`fcb_param_CBF_FLAT_IMAGE', `m4_ifelse(fcb_not_first,`',``INTEGER,PARAMETER:: & - '',``'')CBF_FLAT_IMAGE = Z''`0200''`m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Flag for flat (linear) images')m4_dnl + '',``'')CBF_FLAT_IMAGE = int(Z''`0200''`)m4_ifelse(fcb_is_last,`is_last',` ',``, &'')'` !Flag for flat (linear) images')m4_dnl m4_define(`fcb_param_CBF_LIST_ALL', m4_define(`fcb_is_last',`')m4_dnl ! @@ -893,4 +893,4 @@ m4_define(`fcb_interface_LIST_ALL',` fcb_interface_FCB_UPDATE_JPA_POINTERS_I4 fcb_interface_FCB_UPDATE_JPA_POINTERS_3D_I2 fcb_interface_FCB_UPDATE_JPA_POINTERS_3D_I4 -') \ No newline at end of file +') diff --git a/py2cbf/CBFlib.txt b/py2cbf/CBFlib.txt new file mode 100644 index 00000000..33863350 --- /dev/null +++ b/py2cbf/CBFlib.txt @@ -0,0 +1,12209 @@ + [IUCr Home Page] [CIF Home Page] [CBF/imgCIF] + + ---------------------------------------------------------------------- + + | IUCr Home Page | CIF Home Page | CBF/imgCIF | CBFlib | + | NOTICE | GPL | LGPL | imgCIF dictionary | + | Click Here to Make a Donation | + + CBFlib + + An API for CBF/imgCIF + Crystallographic Binary Files with ASCII Support + Version 0.9.5 + 27 April 2014 + rev 22 February 2015 + + by + Paul J. Ellis + Stanford Synchrotron Radiation Laboratory + + and + Herbert J. Bernstein + Bernstein + Sons + yaya at bernstein-plus-sons dot com + + © Copyright 2006, 2007, 2008, 2011, 2013, 2014 Herbert J. Bernstein + + ---------------------------------------------------------------------- + + YOU MAY REDISTRIBUTE THE CBFLIB PACKAGE UNDER THE TERMS OF THE GPL. + + ALTERNATIVELY YOU MAY REDISTRIBUTE THE CBFLIB API UNDER THE TERMS OF THE + LGPL. + + ---------------------------------------------------------------------- + + Before using this software, please read the + NOTICE +for important disclaimers and the IUCr Policy on the Use of the Crystallographic + Information File (CIF) and for other important information. + + Work on imgCIF and CBFlib supported in part by the U. S. Department of + Energy (DOE) under grants ER63601-1021466-0009501 and + ER64212-1027708-0011962, by the U. S. National Science Foundation (NSF) + under grants DBI-0610407, DBI-0315281 and EF-0312612, the U. S. National + Institutes of Health (NIH) under grants 1R15GM078077 from NIGMS and + 1R13RR023192 from NCRR and funding from the International Union for + Crystallographyn (IUCr). The content is solely the responsibility of the + authors and does not necessarily represent the official views of DOE, NSF, + NIH, NIGMS, NCRR or IUCr. Recent work on integration among CBF, HDF5 and + NeXus supported in part by Pandata ODI (EU 7th Framework Programme) + + ---------------------------------------------------------------------- + + Version History + + Version Date By Description + 0.1 Apr. 1998 PJE This was the first CBFlib release. + It supported binary CBF files using + binary strings. + 0.2 Aug. 1998 HJB This release added ascii imgCIF + support using MIME-encoded binary + sections, added the option of MIME + headers for the binary strings was + well. MIME code adapted from mpack + 1.5. Added hooks needed for DDL1-style + names without categories. + 0.3 Sep. 1998 PJE This release cleaned up the changes + made for version 0.2, allowing + multi-threaded use of the code, and + removing dependence on the mpack + package. + 0.4 Nov. 1998 HJB This release merged much of the + message digest code into the general + file reading and writing to reduce the + number of passes. More consistency + checking between the MIME header and + the binary header was introduced. The + size in the MIME header was adjusted + to agree with the version 0.2 + documentation. + 0.5 Dec. 1998 PJE This release greatly increased the + speed of processing by allowing for + deferred digest evaluation. + 0.6 Jan. 1999 HJB This release removed the redundant + information (binary id, size, + compression id) from a binary header + when there is a MIME header, removed + the unused repeat argument, and made + the memory allocation for buffering + and tables with many rows sensitive to + the current memory allocation already + used. + 0.6.1 Feb. 2001 HP (per This release fixed a memory leak due + HJB) to misallocation by size of cbf_handle + instead of cbf_handle_struct + 0.7 Mar. 2001 PJE This release added high-level + instructions based on the imgCIF + dictionary version 1.1. + 0.7.1 Mar. 2001 PJE The high-level functions were + revised to permit future expansion to + files with multiple images. + 0.7.2 Apr. 2001 HJB This release adjusted cbf_cimple.c + to conform to cif_img.dic version + 1.1.3 + 0.7.2.1 May 2001 PJE This release corrected an if nesting + error in the prior mod to + cbf_cimple.c. + 0.7.3 Oct. 2002 PJE This release modified cbf_simple.c + to reorder image data on read so that + the indices are always increasing in + memory (this behavior was undefined + previously). + 0.7.4 Jan 2004 HJB This release fixes a parse error for + quoted strings, adds code to get and + set character string types, and + removes compiler warnings + 0.7.5 Apr 2006 HJB This release cleans up some compiler + warnings, corrects a parse error on + quoted strings with a leading blank as + adds the new routines for support of + aliases, dictionaries and real arrays, + higher level routines to get and set + pixel sizes, do cell computations, and + to set beam centers, improves support + for conversion of images, picking up + more data from headers. + 0.7.6 Jul 2006 HJB This release reorganizes the kit + into two pieces: + CBFlib_0.7.6_Data_Files and + CBFlib_0.7.6. An optional local copy + of getopt is added. The 1.4 draft + dictionary has been added. cif2cbf + updated to support vcif2 validation. + convert_image and cif2cbf updated to + report text of error messages. + convert_image updated to support tag + and category aliases, default to adxv + images. convert_image and img updated + to support row-major images. Support + added for binning. API Support added + for validation, wide files and line + folding. Logic changed for beam center + reporting. Added new routines: + cbf_validate, cbf_get_bin_sizes, + cbf_set_bin_sizes, + cbf_find_last_typed_child, + cbf_compose_itemname, + cbf_set_cbf_logfile, + cbf_make_widefile, cbf_read_anyfile, + cbf_read_widefile, + cbf_write_local_file, + cbf_write_widefile, cbf_column_number, + cbf_blockitem_number, cbf_log, + cbf_check_category_tags, + cbf_set_beam_center + 0.7.7 February 2007 HJB This release reflects changes for + base 32K support developed by G. + Darakev, and changes for support of + reals, 3d arrays, byte_offset + compression and J. P. Abrahams packed + compression made in consultation with + (in alphabetic order) E. Eikenberry, + A. Hammerley, W. Kabsch, M. Kobas, J. + Wright and others at PSI and ESRF in + January 2007, as well accumulated + changes fixing problems in release + 0.7.6. + 0.7.7.1 February 2007 HJB This release is a patch to 0.7.7 to + change the treatment of the byteorder + parameter from strcpy semantics to + return of a pointer to a string + constant. Our thanks to E. Eikenberry + for pointing out the problem. + 0.7.7.2 February 2007 HJB This release is a patch to 0.7.7.1 + to add testing for JPA packed + compression and to respect signs + declared in the MIME header. + 0.7.7.3 April 2007 HJB This release is a patch to 0.7.7.3 + to add f90 support for reading of CBF + byte-offset and packed compression, to + fix problems with gcc 4.4.1 and to + correct errors in multidimensional + packed compression. + 0.7.7.4 May 2007 HJB Corrects in handling SLS detector + mincbfs and reorder dimensions versus + arrays for some f90 compilers as per + H. Powell. + 0.7.7.5 May 2007 HJB Fix to cbf_get_image for bug + reported by F. Remacle, fixes for + windows builds as per J. Wright and F. + Remacle. + 0.7.7.6 Jun 2007 HJB Fix to CBF byte-offset compression + writes, fix to Makefiles and m4 for + f90 test programs to allow adjustable + record length. + 0.7.8 Jul 2007 HJB Release for full support of SLS data + files with updated convert_minicbf, + and support for gfortran from gcc 4.2. + 0.7.8.1 Jul 2007 HJB Update to 0.7.8 release to fix + memory leaks reported by N. Sauter and + to update validation checks for recent + changes. + 0.7.8.2 Dec 2007 CN, HJB Update to 0.7.8.1 to add ADSC jiffie + by Chris Nielsen, and to add ..._fs + and ..._sf macros. + 0.7.9 Dec 2007 CN, HJB Identical to 0.7.8.2 except for a + cleanup of deprecated examples, e.g. + diffrn_frame_data + 0.7.9.1 Jan 2008 CN, HJB Update to 0.7.8.2 to add inverse + ADSC jiffie by Chris Nielsen, to clean + up problems in handling maps for + RasMol. + 0.8.0 Jul 2008 GT, HJB Cleanup of 0.7.9.1 to start 0.8 + series. + 0.8.1 Jul 2009 EZ, CN, Release with EZ's 2008 DDLm support + PC, GW, using JH's PyCifRW, also cbff f95 + JH, HJB wrapper code, PC's java bindings. + 0.9.1 Aug 2010 PC, EE, Release with EE's Dectris template + JLM, NS, software, also with vcif3, new + EZ, HJB arvai_test, sequence_match. + 0.9.2 Feb 2011 PC, EE, New default release with updated + JLM, NS, pycbf, tiff support, removal of + EZ, HJB default use of PyCifRW to avoid Fedora + license issue. + 0.9.3 Oct 2013 JS, HJB Added low-level 'cbf_H5*' functions + for interacting with HDF5, higher + level functions for converting CBF or + miniCBF files to NeXus format, two + utility programs to convert CBF or + miniCBF files to NeXus format and some + unit tests for the low-level 'cbf_H5*' + functions. Add initial FEL detector + support. + 0.9.4 March 2014 JS, HJB Refactored implementation of the + NXMX application defintion functional + mapping with improvements to cmake + support and a preliminary effort at + handling Stokes polarization mapping. + This release had serious issues in the + functional mapping axis mapping and + should not be used for production + involving NeXus files. + 0.9.5 April 2014 HJB This is a production release for + single detector module single crystal + MX NeXus support. + + ---------------------------------------------------------------------- + + Known Problems + + The example program tiff2cbf needs the enviroment variable LD_LIBRARY_PATH + set to the location of the lib directory in CBFlib_0.9.2.11, unless a + system install of tiff-3.9.4-rev-6Feb11 has been done. + + Due to license issues, PyCifRW is not included with default releases of + CBFlib. Users can download PyCifRW separately. + + There are some issues with Peter Chang's lastest java wrapper under the + CBFlib 0.9.2.11 release. Until they are resolved, the CBFlib 0.8.1 release + should be used for Java applications. + + This version does not have support for predictor compression. + + Code is needed to support array sub-sections. + + Foreword + + In order to work with CBFlib, you need: + + * the source code, in the form of a "gzipped" tar, CBFlib_0.9.5.tar.gz; + and + * the test data: + * CBFlib_0.9.5_Data_Files_Input.tar.gz (17 MB) a "gzipped" tar of + the input data files needed to test the API; + * CBFlib_0.9.5_Data_Files_Output.tar.gz (36 MB) a "gzipped" tar of + the output data files needed to test the API, or, if space is at + a premium; + * CBFlib_0.9.5_Data_Files_Output_Sigs_Only.tar.gz (1 KB) is a + "gzipped" tar of only the MD5 signatures of the output data files + needed to test the API. + + If your system has the program wget, you only need the source code. The + download of the other tar balls will be handled automatically. + + Be careful about space. A full build and test can use 450 MB or more. If + space is tight, be sure to read the instructions below on using only the + signatures of the test files. + + Uncompress and unpack : + + * gunzip < CBFlib_0.9.5.tar.gz | tar xvf - + + To run the test programs, you will also need Paul Ellis's sample MAR345 + image, example.mar2300, Chris Nielsen's sample ADSC Quantum 315 image, + mb_LP_1_001.img, and Eric Eikenberry's SLS sample Pilatus 6m image, + insulin_pilatus6m, as sample data. In addition there are is a PDB mmCIF + file, 9ins.cif, and 3 special test files testflatin.cbf, + testflatpackedin.cbf and testrealin.cbf. All these files will be dowloaded + and extracted by the Makefile from CBFlib_0.9.2.11_Data_Files_Input. Do + not download copies into the top level directory. + + In addition, the kit will need tiff and hdf5 libraries. + + Thare are various sample Makefiles for common configurations. The + Makefile_OSX samples is for systems with gfortran from prior to the + release of gcc 4.2. For the most recent gfortran, use Makefile_OSX_gcc42. + All the Makefiles are generated from m4/Makefile.m4. For newer OS X + systems, the default Makefile should work. + + The Makefiles use GNU make constructs, such as ifeq and ifneq. If you need + to use a different version of make, you will need to edit out the + conditionals + + The operation of the Makefiles is sensitive to the following environment + variables: + + * CBFLIB_USE_PYCIFRW If you define this environment variable, you may + rebuild the Makefiles to include James Hester's PyCifRW. The process + under bash is: + + export CBFLIB_USE_PYCIFRW=yes + cd CBFlib_0.9.5 + touch m4/Makefile.m4 + make Makefiles + + * CBF_DONT_USE_LONG_LONG If you define this environment variable, use of + the long long data type in CBFlib is replaced by use of a struct. The + Makefiles do not need to be rebuilt. Makefile_MINGW does not use the + long long data type even without defining this variable. + * NOFORTRAN If you define this environment variable, use of the fortran + compiler is suppressed. + + If necessary, adjust the definition of CC and C++ and other defintions in + Makefile to point to your compilers. Set the definition of CFLAGS to an + appropriate value for your C and C++ compilers, the definition of F90C to + point to your Fortan-90/95 compiler, and the definitions of F90FLAGS and + F90LDFLAGS to approriate values for your Fortan-90/95 compilers, and then + + make all + make tests + + or, if space is at a premium: + + make all + make tests_sigs_only + + If you do not have a fortran compiler, you will need edit the Makefile or + to define the variable NOFORTRAN, either in the Makefile or in the + environment + + We have included examples of CBF/imgCIF files produced by CBFlib in the + test data CBFlib_0.9.5_Data_Files_Output.tar.gz, the current best draft of + the CBF Extensions Dictionary, and of Andy Hammersley's CBF definition, + updated to become a DRAFT CBF/ImgCIF DEFINITION. + + CBFlib 0.9.5 includes a program, tiff2cbf, to convert from tiff files to + CBF files, that requires an augmented version of tiff-3.9.4 called + tiff-3.9.4-rev-6Feb11, that installs into the CBFlib_0.9.2.11 directory. + If a system copy is desired, download and install + http://downloads.sf.net/cbflib/tiff-3.9.4-rev-6Feb11.tar.gz + + ---------------------------------------------------------------------- + + Contents + + * 1. Introduction + * 2. Function descriptions + * 2.1 General description + * 2.1.1 CBF handles + * 2.1.2 CBF goniometer handles + * 2.1.3 CBF detector handles + * 2.1.4 CBF positioner handles + * 2.1.5 Return values + * 2.2 Reading and writing files containing binary sections + * 2.2.1 Reading binary sections + * 2.2.2 Writing binary sections + * 2.2.3 Summary of reading and writing files containing binary + sections + * 2.2.4 Ordering of array indices + * 2.3 Low-level function prototypes + * 2.3.1 cbf_make_handle + * 2.3.2 cbf_free_handle + * 2.3.3 cbf_read_file, cbf_read_widefile + * 2.3.4 cbf_write_file, cbf_write_widefile + * 2.3.5 cbf_new_datablock, cbf_new_saveframe + * 2.3.6 cbf_force_new_datablock, cbf_force_new_saveframe + * 2.3.7 cbf_new_category + * 2.3.8 cbf_force_new_category + * 2.3.9 cbf_new_column + * 2.3.10 cbf_new_row + * 2.3.11 cbf_insert_row + * 2.3.12 cbf_delete_row + * 2.3.13 cbf_set_datablockname, cbf_set_saveframename + * 2.3.14 cbf_reset_datablocks + * 2.3.15 cbf_reset_datablock, cbf_reset_saveframe + * 2.3.16 cbf_reset_category + * 2.3.17 cbf_remove_datablock, cbf_remove_saveframe + * 2.3.18 cbf_remove_category + * 2.3.19 cbf_remove_column + * 2.3.20 cbf_remove_row + * 2.3.21 cbf_rewind_datablock + * 2.3.22 cbf_rewind_category, cbf_rewind_saveframe, + cbf_rewind_blockitem + * 2.3.23 cbf_rewind_column + * 2.3.24 cbf_rewind_row + * 2.3.25 cbf_next_datablock + * 2.3.26 cbf_next_category, cbf_next_saveframe, + cbf_next_blockitem + * 2.3.27 cbf_next_column + * 2.3.28 cbf_next_row + * 2.3.29 cbf_find_datablock + * 2.3.30 cbf_find_category, cbf_find_saveframe, + cbf_find_blockitem + * 2.3.31 cbf_find_column + * 2.3.32 cbf_find_row + * 2.3.33 cbf_find_nextrow + * 2.3.34 cbf_count_datablocks + * 2.3.35 cbf_count_categories, cbf_count_saveframes, + cbf_count_blockitems + * 2.3.36 cbf_count_columns + * 2.3.37 cbf_count_rows + * 2.3.38 cbf_select_datablock + * 2.3.39 cbf_select_category, cbf_select_saveframe, + cbf_select_blockitem + * 2.3.40 cbf_select_column + * 2.3.41 cbf_select_row + * 2.3.42 cbf_datablock_name + * 2.3.43 cbf_category_name + * 2.3.44 cbf_column_name, cbf_set_column_name + * 2.3.45 cbf_row_number + * 2.3.46 cbf_get_value, cbf_require_value + * 2.3.47 cbf_set_value + * 2.3.48 cbf_get_typeofvalue + * 2.3.49 cbf_set_typeofvalue + * 2.3.50 cbf_get_integervalue, cbf_require_integervalue + * 2.3.51 cbf_set_integervalue + * 2.3.52 cbf_get_doublevalue, cbf_require_doublevalue + * 2.3.53 cbf_set_doublevalue + * 2.3.54 cbf_get_integerarrayparameters, + cbf_get_integerarrayparameters_wdims, + cbf_get_integerarrayparameters_wdims_fs, + cbf_get_integerarrayparameters_wdims_sf + cbf_get_realarrayparameters, + cbf_get_realarrayparameters_wdims, + cbf_get_realarrayparameters_wdims_fs, + cbf_get_realarrayparameters_wdims_sf + * 2.3.55 cbf_get_integerarray, cbf_get_realarray + * 2.3.56 cbf_set_integerarray, + cbf_set_integerarray_wdims, + cbf_set_integerarray_wdims_fs, + cbf_set_integerarray_wdims_sf, + cbf_set_realarray, + cbf_set_realarray_wdims, cbf_set_realarray_wdims_fs, + cbf_set_realarray_wdims_sf + * 2.3.57 cbf_failnez + * 2.3.58 cbf_onfailnez + * 2.3.59 cbf_require_datablock + * 2.3.60 cbf_require_category + * 2.3.61 cbf_require_column + * 2.3.62 cbf_require_column_value + * 2.3.63 cbf_require_column_integervalue + * 2.3.64 cbf_require_column_doublevalue + * 2.3.65 cbf_get_local_integer_byte_order, + cbf_get_local_real_byte_order, cbf_get_local_real_format + * 2.3.66 cbf_get_dictionary, cbf_set_dictionary, + cbf_require_dictionary + * 2.3.67 cbf_convert_dictionary + * 2.3.68 cbf_find_tag, cbf_find_local_tag + * 2.3.69 cbf_find_category_root, cbf_set_category_root, + cbf_require_category_root + * 2.3.70 cbf_find_tag_root, cbf_set_tag_root, + cbf_require_tag_root + * 2.3.71 cbf_find_tag_category, cbf_set_tag_category + * 2.4 High-level function prototypes (new for version 0.7) + * 2.4.1 cbf_read_template + * 2.4.2 cbf_get_diffrn_id, cbf_require_diffrn_id + * 2.4.3 cbf_set_diffrn_id + * 2.4.4 cbf_get_crystal_id + * 2.4.5 cbf_set_crystal_id + * 2.4.6 cbf_get_wavelength + * 2.4.7 cbf_set_wavelength + * 2.4.8 cbf_get_polarization + * 2.4.9 cbf_set_polarization + * 2.4.10 cbf_get_divergence + * 2.4.11 cbf_set_divergence + * 2.4.12 cbf_count_elements + * 2.4.13 cbf_get_element_number, cbf_get_element_id + * 2.4.14 cbf_get_gain + * 2.4.15 cbf_set_gain + * 2.4.16 cbf_get_overload + * 2.4.17 cbf_set_overload + * 2.4.18 cbf_get_integration_time + * 2.4.19 cbf_set_integration_time + * 2.4.20 cbf_get_time + * 2.4.21 cbf_set_time + * 2.4.22 cbf_get_date + * 2.4.23 cbf_set_date + * 2.4.24 cbf_set_current_time + * 2.4.25 cbf_get_image_size, cbf_get_image_size_fs, + cbf_get_image_size_fs, + cbf_get_3d_image_size, cbf_get_3d_image_size_fs, + cbf_get_3d_image_size_sf + * 2.4.26 cbf_get_image, cbf_get_image_fs, cbf_get_image_sf, + cbf_get_real_image, cbf_get_real_image_fs, + cbf_get_real_image_sf, + cbf_get_3d_image, cbf_get_3d_image_fs, + cbf_get_3d_image_sf, + cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf + * 2.4.27 cbf_set_image, cbf_set_image_fs, cbf_set_image_sf, + cbf_set_real_image, cbf_set_real_image_fs, + cbf_set_real_image_sf, + cbf_set_3d_image, cbf_set_3d_image, cbf_set_3d_image, + cbf_set_real_3d_image, cbf_set_real_3d_image_fs, + cbf_set_real_3d_image_sf + * 2.4.28 cbf_get_axis_ancestor, cbf_get_axis_depends_on, + cbf_get_axis_equipment, cbf_get_axis_equipment_component, + cbf_get_axis_offset, cbf_get_axis_rotation, + cbf_get_axis_rotation_axis, cbf_get_axis_setting, + cbf_get_axis_type, cbf_get_axis_vector + * 2.4.29 cbf_set_axis_setting + * 2.4.30 cbf_construct_goniometer + * 2.4.31 cbf_free_goniometer + * 2.4.32 cbf_get_rotation_axis + * 2.4.33 cbf_get_rotation_range + * 2.4.34 cbf_rotate_vector + * 2.4.35 cbf_get_reciprocal + * 2.4.36 cbf_construct_detector, + cbf_construct_reference_detector, + cbf_require_reference_detector + * 2.4.37 cbf_free_detector + * 2.4.38 cbf_construct_positioner, + cbf_construct_reference_positioner + * 2.4.39 cbf_free_positioner + * 2.4.40 cbf_get_beam_center, cbf_get_beam_center_fs, + cbf_get_beam_center_sf, + cbf_set_beam_center, cbf_set_beam_center_fs, + cbf_set_beam_center_sf, + cbf_set_reference_beam_center, + cbf_set_reference_beam_center_fs, + cbf_set_reference_beam_center_sf + * 2.4.41 cbf_get_detector_distance + * 2.4.42 cbf_get_detector_normal + * 2.4.43 cbf_get_detector_axis_slow, + cbf_get_detector_axis_fast, cbf_get_detector_axes, + cbf_get_detector_axes_fs, cbf_get_detector_axes_sf, + cbf_get_detector_surface_axes + * 2.4.44 cbf_get_pixel_coordinates, + cbf_get_pixel_coordinates_fs, cbf_get_pixel_coordinates_sf + * 2.4.45 cbf_get_pixel_normal, cbf_get_pixel_normal_fs, + cbf_get_pixel_normal_sf + * 2.4.46 cbf_get_pixel_area, cbf_get_pixel_area_fs, + cbf_get_pixel_area_sf + * 2.4.47 cbf_get_pixel_size, cbf_get_pixel_size_fs, + cbf_get_pixel_size_sf + * 2.4.48 cbf_set_pixel_size, cbf_set_pixel_size_fs, + cbf_set_pixel_size_sf + * 2.4.49 cbf_get_inferred_pixel_size, + cbf_get_inferred_pixel_size_fs, + cbf_get_inferred_pixel_size_sf + * 2.4.50 cbf_get_unit_cell + * 2.4.51 cbf_set_unit_cell + * 2.4.52 cbf_get_reciprocal_cell + * 2.4.53 cbf_set_reciprocal_cell + * 2.4.54 cbf_compute_cell_volume + * 2.4.55 cbf_compute_reciprocal_cell + * 2.4.56 cbf_get_orientation_matrix, + cbf_set_orientation_matrix + * 2.4.57 cbf_get_bin_sizes, cbf_set_bin_sizes + * 2.4.58 cbf_get_axis_poise, cbf_get_goniometer_poise, + cbf_get_axis_reference_poise + * 2.4.59 cbf_airy_disk, cbf_airy_disk_volume + * 2.5 F90 function interfaces + * 2.5.1 FCB_ATOL_WCNT + * 2.5.2 FCB_CI_STRNCMPARR + * 2.5.3 FCB_EXIT_BINARY + * 2.5.4 FCB_NBLEN_ARRAY + * 2.5.5 FCB_NEXT_BINARY + * 2.5.6 FCB_OPEN_CIFIN + * 2.5.7 FCB_PACKED: FCB_DECOMPRESS_PACKED_I2, + FCB_DECOMPRESS_PACKED_I4, FCB_DECOMPRESS_PACKED_3D_I2, + FCB_DECOMPRESS_PACKED_3D_I4 + * 2.5.8 FCB_READ_BITS + * 2.5.9 FCB_READ_BYTE + * 2.5.10 FCB_READ_IMAGE_I2, FCB_READ_IMAGE_I4, + FCB_READ_IMAGE_3D_I2, FCB_READ_IMAGE_3D_I4 + * 2.5.11 FCB_READ_LINE + * 2.5.12 FCB_READ_XDS_I2 + * 2.5.13 FCB_SKIP_WHITESPACE + * 2.6 HDF5 abstraction layer and convenience functions + * 2.6.1 cbf_H5Acreate + * 2.6.2 cbf_H5Afind + * 2.6.3 cbf_H5Aread + * 2.6.4 cbf_H5Aread_string + * 2.6.5 cbf_H5Awrite + * 2.6.6 cbf_H5Arequire_cmp2 + * 2.6.7 cbf_H5Arequire_cmp2_ULP + * 2.6.8 cbf_H5Arequire_string + * 2.6.9 cbf_H5Afree + * 2.6.10 cbf_H5Dcreate + * 2.6.11 cbf_H5Dfind2 + * 2.6.12 cbf_H5Drequire + * 2.6.13 cbf_H5Dinsert + * 2.6.14 cbf_H5Dset_extent + * 2.6.15 cbf_H5Dwrite2 + * 2.6.16 cbf_H5Dread2 + * 2.6.17 cbf_H5Drequire_scalar_F64LE2 + * 2.6.18 cbf_H5Drequire_scalar_F64LE2_ULP + * 2.6.19 cbf_H5Drequire_flstring + * 2.6.20 cbf_H5Dfree + * 2.6.21 cbf_H5Fopen + * 2.6.22 cbf_H5Fclose + * 2.6.23 cbf_H5Gcreate + * 2.6.24 cbf_H5Gfind + * 2.6.25 cbf_H5Grequire + * 2.6.26 cbf_H5Gfree + * 2.6.27 cbf_H5Ivalid + * 2.6.28 cbf_H5Ocmp + * 2.6.29 cbf_H5Ofree + * 2.6.30 cbf_H5Screate + * 2.6.31 cbf_H5Sfree + * 2.6.32 cbf_H5Tcreate_string + * 2.6.33 cbf_H5Tfree + * 2.7 High-level NeXus-related functions + * 2.7.1 cbf_h5handle_get_file + * 2.7.2 cbf_h5handle_set_file + * 2.7.3 cbf_h5handle_get_entry + * 2.7.4 cbf_h5handle_set_entry + * 2.7.5 cbf_h5handle_require_entry + * 2.7.6 cbf_h5handle_require_entry_definition + * 2.7.7 cbf_h5handle_get_sample + * 2.7.8 cbf_h5handle_set_sample + * 2.7.9 cbf_h5handle_require_sample + * 2.7.10 cbf_h5handle_get_beam + * 2.7.11 cbf_h5handle_set_beam + * 2.7.12 cbf_h5handle_require_beam + * 2.7.13 cbf_h5handle_get_instrument + * 2.7.14 cbf_h5handle_set_instrument + * 2.7.15 cbf_h5handle_find_instrument + * 2.7.16 cbf_h5handle_require_instrument + * 2.7.17 cbf_h5handle_get_detector + * 2.7.18 cbf_h5handle_set_detector + * 2.7.19 cbf_h5handle_find_detector + * 2.7.20 cbf_h5handle_require_detector + * 2.7.21 cbf_h5handle_get_goniometer + * 2.7.22 cbf_h5handle_set_goniometer + * 2.7.23 cbf_h5handle_require_goniometer + * 2.7.24 cbf_h5handle_get_monochromator + * 2.7.25 cbf_h5handle_set_monochromator + * 2.7.26 cbf_h5handle_require_monochromator + * 2.7.27 cbf_h5handle_get_source + * 2.7.28 cbf_h5handle_set_source + * 2.7.29 cbf_h5handle_require_source + * 2.7.30 cbf_free_h5handle + * 2.7.31 cbf_create_h5handle3 + * 2.7.32 cbf_write_cbf_h5file + * 2.7.33 cbf_write_cbf2nx + * 2.7.34 cbf_write_minicbf_h5file + * 2.7.35 cbf_write_nx2cbf + * 2.7.36 cbf_config_create + * 2.7.37 cbf_config_parse + * 2.7.38 cbf_config_free + * 2.7.39 cbf_config_strerror + * 3. File format + * 3.1 General description + * 3.2 Format of the binary sections + * 3.2.1 Format of imgCIF binary sections + * 3.2.2 Format of CBF binary sections + * 3.3 Compression schemes + * 3.3.1 Canonical-code compression + * 3.3.2 CCP4-style compression + * 3.3.3 Byte_offset compression + * 3.3.4 Nibble_offset compression + * 3.4 Access to CBFlib compressions from HDF5 + * 4. Installation + * 5. Example programs + + 1. Introduction + + CBFlib (Crystallographic Binary File library) is a library of ANSI-C + functions providing a simple mechanism for accessing Crystallographic + Binary Files (CBF files) and Image-supporting CIF (imgCIF) files. The + CBFlib API is loosely based on the CIFPARSE API for mmCIF files. Like + CIFPARSE, CBFlib does not perform any semantic integrity checks; rather it + simply provides functions to create, read, modify and write CBF binary + data files and imgCIF ASCII data files. + + Starting with version 0.7.7, an envolving FCBlib (Fortran Crystallographic + Binary library) has been added. As of this release it includes code for + reading byte-offset and packed compression image files created by CBFlib. + + 2. Function descriptions + + 2.1 General description + + Almost all of the CBFlib functions receive a value of type cbf_handle (a + CBF handle) as the first argument. Several of the high-level CBFlib + functions dealing with geometry receive a value of type cbf_goniometer (a + handle for a CBF goniometer object) or cbf_detector (a handle for a CBF + detector object). + + All functions return an integer equal to 0 for success or an error code + for failure. + + 2.1.1 CBF handles + + CBFlib permits a program to use multiple CBF objects simultaneously. To + identify the CBF object on which a function will operate, CBFlib uses a + value of type cbf_handle. + + All functions in the library except cbf_make_handle expect a value of type + cbf_handle as the first argument. + + The function cbf_make_handle creates and initializes a new CBF handle. + + The function cbf_free_handle destroys a handle and frees all memory + associated with the corresponding CBF object. + + 2.1.2 CBF goniometer handles + + To represent the goniometer used to orient a sample, CBFlib uses a value + of type cbf_goniometer. + + A goniometer object is created and initialized from a CBF object using the + function cbf_construct_goniometer. + + The function cbf_free_goniometer destroys a goniometer handle and frees + all memory associated with the corresponding object. + + 2.1.3 CBF detector handles + + To represent a detector surface mounted on a positioning system, CBFlib + uses a value of type cbf_detector. + + A goniometer object is created and initialized from a CBF object using one + of the functions cbf_construct_detector, cbf_construct_reference_detector + or cbf_require_reference_detector. + + The function cbf_free_detector destroys a detector handle and frees all + memory associated with the corresponding object. + + 2.1.4 CBF positioner handles + + To represent an arbitrary positioning system designated by the terminal + axis, CBFlib uses a value of type cbf_positioner. + + A positioner object is created and initialized from a CBF object using one + of the functions cbf_construct_positioner, + cbf_construct_reference_positioner or cbf_require_reference_positioner. + + The function cbf_free_positioner destroys a positioner handle and frees + all memory associated with the corresponding object. + + 2.1.5 Return values + + All of the CBFlib functions return 0 on success and an error code on + failure. The error codes are: + + CBF_FORMAT The file format is invalid + CBF_ALLOC Memory allocation failed + CBF_ARGUMENT Invalid function argument + CBF_ASCII The value is ASCII (not binary) + CBF_BINARY The value is binary (not ASCII) + CBF_BITCOUNT The expected number of bits does + not match the actual number written + CBF_ENDOFDATA The end of the data was reached + before the end of the array + CBF_FILECLOSE File close error + CBF_FILEOPEN File open error + CBF_FILEREAD File read error + CBF_FILESEEK File seek error + CBF_FILETELL File tell error + CBF_FILEWRITE File write error + CBF_IDENTICAL A data block with the new name + already exists + CBF_NOTFOUND The data block, category, column or + row does not exist + CBF_OVERFLOW The number read cannot fit into the + destination argument. The destination has + been set to the nearest value. + CBF_UNDEFINED The requested number is not defined (e.g. 0/0; new for + version 0.7). + CBF_NOTIMPLEMENTED The requested functionality is not yet implemented (New + for version 0.7). + + If more than one error has occurred, the error code is the logical OR of + the individual error codes. + + 2.2 Reading and writing files containing binary sections + + 2.2.1 Reading binary sections + + The current version of CBFlib only decompresses a binary section from disk + when requested by the program. + + When a file containing one or more binary sections is read, CBFlib saves + the file pointer and the position of the binary section within the file + and then jumps past the binary section. When the program attempts to + access the binary data, CBFlib sets the file position back to the start of + the binary section and then reads the data. + + For this scheme to work: + + 1. The file must be a random-access file opened in binary mode (fopen ( ," + rb")). + 2. The program must not close the file. CBFlib will close the file using + fclose ( ) when it is no longer needed. + + At present, this also means that a program cant read a file and then write + back to the same file. This restriction will be eliminated in a future + version. + + When reading an imgCIF vs a CBF, the difference is detected automatically. + + 2.2.2 Writing binary sections + + When a program passes CBFlib a binary value, the data is compressed to a + temporary file. If the CBF object is subsequently written to a file, the + data is simply copied from the temporary file to the output file. + + The output file can be of any type. If the program indicates to CBFlib + that the file is a random-access and readable, CBFlib will conserve disk + space by closing the temporary file and using the output file as the + location at which the binary value is stored. + + For this option to work: + + 1. The file must be a random-access file opened in binary update mode + (fopen ( , "w+b")). + 2. The program must not close the file. CBFlib will close the file using + fclose ( ) when it is no longer needed. + + If this option is not used: + + 1. CBFlib will continue using the temporary file. + 2. CBFlib will not close the file. This is the responsibility of the main + program. + + 2.2.3 Summary of reading and writing files containing binary sections + + 1. Open disk files to read using the mode "rb". + 2. If possible, open disk files to write using the mode "w+b" and tell + CBFlib that it can use the file as a buffer. + 3. Do not close any files read by CBFlib or written by CBFlib with + buffering turned on. + 4. Do not attempt to read from a file, then write to the same file. + + 2.2.4 Ordering of array indices + + There are two major conventions in the ordering of array indices: + * fs: Fast to slow. The first array index (the one numbered "1") is the + one for which the values of that index change "fastest". That is, as + we move forward in memory, the value of this index changes more + rapidly than any other. + * sf: Slow to fast. The first array index (the one numbered "1") is the + one for which the values of that index change "slowest". That is as we + move forward in memory, the value of this index changes more slowly + than any other. + + During the development of CBFlib, both conventions have been used. In + order to avoid confusion, the functions for which array indices are used + are available in three forms: a default version which may used either one + convention or the other, a form in which the name of the function has an + "_fs" suffix for the fast to slow convention and a form in which the name + of the function has a "_sf" suffix for the slow to fast convention. + Designers of applications are advised to use one of the two suffix + conventions. There is no burden on performance for using one convention or + the other. The differences are resolved at compile time by use of + preprocessor macros. + + ---------------------------------------------------------------------- + + ---------------------------------------------------------------------- + + 2.3 Low-level function prototypes + + 2.3.1 cbf_make_handle + + PROTOTYPE + + #include "cbf.h" + + int cbf_make_handle (cbf_handle *handle); + + DESCRIPTION + + cbf_make_handle creates and initializes a new internal CBF object. All + other CBFlib functions operating on this object receive the CBF handle as + the first argument. + + ARGUMENTS + + handle Pointer to a CBF handle. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.2 cbf_free_handle + + ---------------------------------------------------------------------- + + 2.3.2 cbf_free_handle + + PROTOTYPE + + #include "cbf.h" + + int cbf_free_handle (cbf_handle handle); + + DESCRIPTION + + cbf_free_handle destroys the CBF object specified by the handle and frees + all associated memory. + + ARGUMENTS + + handle CBF handle to free. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.1 cbf_make_handle + + ---------------------------------------------------------------------- + + 2.3.3 cbf_read_file, cbf_read_widefile + + PROTOTYPE + + #include "cbf.h" + + int cbf_read_file (cbf_handle handle, FILE *file, int flags); + int cbf_read_widefile (cbf_handle handle, FILE *file, int flags); + + DESCRIPTION + + cbf_read_file reads the CBF or CIF file file into the CBF object specified + by handle, using the CIF 1.0 convention of 80 character lines. + cbf_read_widefile reads the CBF or CIF file file into the CBF object + specified by handle, using the CIF 1.1 convention of 2048 character lines. + A warning is issued to stderr for ascii lines over the limit. No test is + performed on binary sections. + + Validation is performed in three ways levels: during the lexical scan, + during the parse, and, if a dictionary was converted, against the value + types, value enumerations, categories and parent-child relationships + specified in the dictionary. + + flags controls the interpretation of binary section headers, the parsing + of brackets constructs and the parsing of treble-quoted strings. + + MSG_DIGEST: Instructs CBFlib to check that the digest of + the binary section matches any header digest + value. If the digests do not match, the call + will return CBF_FORMAT. This evaluation and + comparison is delayed (a "lazy" evaluation) to + ensure maximal processing efficiency. If an + immediately evaluation is required, see + MSG_DIGESTNOW, below. + MSG_DIGESTNOW: Instructs CBFlib to check that the digest of + the binary section matches any header digeste + value. If the digests do not match, the call + will return CBF_FORMAT. This evaluation and + comparison is performed during initial parsing + of the section to ensure timely error reporting + at the expense of processing efficiency. If a + more efficient delayed ("lazy") evaluation is + required, see MSG_DIGEST, above. + MSG_DIGESTWARN: Instructs CBFlib to check that the digest of + the binary section matches any header digeste + value. If the digests do not match, a warning + message will be sent to stderr, but processing + will attempt to continue. This evaluation and + comparison is first performed during initial + parsing of the section to ensure timely error + reporting at the expense of processing + efficiency. An mismatch of the message digest + usually indicates a serious error, but it is + sometimes worth continuing processing to try to + isolate the cause of the error. Use this option + with caution. + MSG_NODIGEST: Do not check the digest (default). + PARSE_BRACKETS: Accept DDLm bracket-delimited + [item,item,...item] or {item,item,...item} or + (item,item,...item) constructs as valid, + stripping non-quoted embedded whitespace and + comments. These constructs may span multiple + lines. + PARSE_LIBERAL_BRACKETS: Accept DDLm bracket-delimited + [item,item,...item] or {item,item,...item} or + (item,item,...item) constructs as valid, + stripping embedded non-quoted, non-separating + whitespace and comments. These constructs may + span multiple lines. In this case, whitespace + may be used as an alternative to the comma. + PARSE_TRIPLE_QUOTES: Accept DDLm triple-quoted + """item,item,...item""" or + '''item,item,...item''' constructs as valid, + stripping embedded whitespace and comments. + These constructs may span multiple lines. If + this flag is set, then ''' will not be + interpreted as a quoted apoptrophe and """ will + not be interpreted as a quoted double quote mark + and + PARSE_NOBRACKETS: Do not accept DDLm bracket-delimited + [item,item,...item] or {item,item,...item} or + (item,item,...item) constructs as valid, + stripping non-quoted embedded whitespace and + comments. These constructs may span multiple + lines. + PARSE_NOTRIPLE_QUOTES: No not accept DDLm triple-quoted + """item,item,...item""" or + '''item,item,...item''' constructs as valid, + stripping embedded whitespace and comments. + These constructs may span multiple lines. If + this flag is set, then ''' will be interpreted + as a quoted apostrophe and """ will be + interpreted as a quoted double quote mark. + + CBFlib defers reading binary sections as long as possible. In the current + version of CBFlib, this means that: + + 1. The file must be a random-access file opened in binary mode (fopen ( , + "rb")). + 2. The program must not close the file. CBFlib will close the file using + fclose ( ) when it is no longer needed. + + These restrictions may change in a future release. + + ARGUMENTS + + handle CBF handle. + file Pointer to a file descriptor. + flags Controls interpretation of binary section headers. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.4 cbf_write_file + + ---------------------------------------------------------------------- + + 2.3.4 cbf_write_file, cbf_write_widefile + + PROTOTYPE + + #include "cbf.h" + + int cbf_write_file (cbf_handle handle, FILE *file, int readable, int + ciforcbf, int flags, int encoding); + int cbf_write_widefile (cbf_handle handle, FILE *file, int readable, int + ciforcbf, int flags, int encoding); + + DESCRIPTION + + cbf_write_file writes the CBF object specified by handle into the file + file, following CIF 1.0 conventions of 80 character lines. + cbf_write_widefile writes the CBF object specified by handle into the file + file, following CIF 1.1 conventions of 2048 character lines. A warning is + issued to stderr for ascii lines over the limit, and an attempt is made to + fold lines to fit. No test is performed on binary sections. + + If a dictionary has been provided, aliases will be applied on output. + + Unlike cbf_read_file, the file does not have to be random-access. + + If the file is random-access and readable, readable can be set to non-0 to + indicate to CBFlib that the file can be used as a buffer to conserve disk + space. If the file is not random-access or not readable, readable must be + 0. + + If readable is non-0, CBFlib will close the file when it is no longer + required, otherwise this is the responsibility of the program. + + ciforcbf selects the format in which the binary sections are written: + + CIF Write an imgCIF file. + CBF Write a CBF file (default). + + flags selects the type of header used in CBF binary sections, selects + whether message digests are generated, and controls the style of output. + The value of flags can be a logical OR of any of: + + MIME_HEADERS Use MIME-type headers (default). + MIME_NOHEADERS Use a simple ASCII headers. + MSG_DIGEST Generate message digests for binary data + validation. + MSG_NODIGEST Do not generate message digests (default). + PARSE_BRACKETS Do not convert bracketed strings to text fields + (default). + PARSE_LIBERAL_BRACKETS Do not convert bracketed strings to text fields + (default). + PARSE_NOBRACKETS Convert bracketed strings to text fields + (default). + PARSE_TRIPLE_QUOTES Do not convert triple-quoted strings to text + fields (default). + PARSE_NOTRIPLE_QUOTES Convert triple-quoted strings to text fields + (default). + PAD_1K Pad binary sections with 1023 nulls. + PAD_2K Pad binary sections with 2047 nulls. + PAD_4K Pad binary sections with 4095 nulls. + + Note that on output, the types "prns&, "brcs" and "bkts" will be converted + to "text" fields if PARSE_NOBRACKETS has been set flags, and that the + types "tsqs" and "tdqs" will be converted to "text" fields if the flag + PARSE_NOTRIPLE_QUOTES has been set in the flags. It is an error to set + PARSE_NOBRACKETS and to set either PARSE_BRACKETS or + PARSE_LIBERAL_BRACKETS. It is an error to set both PARSE_NOTRIPLE_QUOTES + and PARSE_TRIPLE_QUOTES. + + encoding selects the type of encoding used for binary sections and the + type of line-termination in imgCIF files. The value can be a logical OR of + any of: + + ENC_BASE64 Use BASE64 encoding (default). + ENC_QP Use QUOTED-PRINTABLE encoding. + ENC_BASE8 Use BASE8 (octal) encoding. + ENC_BASE10 Use BASE10 (decimal) encoding. + ENC_BASE16 Use BASE16 (hexadecimal) encoding. + ENC_FORWARD For BASE8, BASE10 or BASE16 encoding, map bytes to words + forward (1234) (default on little-endian machines). + ENC_BACKWARD Map bytes to words backward (4321) (default on big-endian + machines). + ENC_CRTERM Terminate lines with CR. + ENC_LFTERM Terminate lines with LF (default). + + ARGUMENTS + + handle CBF handle. + file Pointer to a file descriptor. + readable If non-0: this file is random-access and readable and can be + used as a buffer. + ciforcbf Selects the format in which the binary sections are written + (CIF/CBF). + flags Selects the type of header in CBF binary sections and message + digest generation. + encoding Selects the type of encoding used for binary sections and the + type of line-termination in imgCIF files. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.3 cbf_read_file + + ---------------------------------------------------------------------- + + 2.3.5 cbf_new_datablock, cbf_new_saveframe + + PROTOTYPE + + #include "cbf.h" + + int cbf_new_datablock (cbf_handle handle, const char *datablockname); + int cbf_new_saveframe (cbf_handle handle, const char *saveframename); + + DESCRIPTION + + cbf_new_datablock creates a new data block with name datablockname and + makes it the current data block. cbf_new_saveframe creates a new save + frame with name saveframename within the current data block and makes the + new save frame the current save frame. + + If a data block or save frame with this name already exists, the existing + data block or save frame becomes the current data block or save frame. + + ARGUMENTS + + handle CBF handle. + datablockname The name of the new data block. + saveframename The name of the new save frame. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.6 cbf_force_new_datablock, cbf_force_new_saveframe + 2.3.7 cbf_new_category + 2.3.8 cbf_force_new_category + 2.3.9 cbf_new_column + 2.3.10 cbf_new_row + 2.3.11 cbf_insert_row + 2.3.12 cbf_set_datablockname, cbf_set_saveframename + 2.3.17 cbf_remove_datablock, cbf_remove_saveframe + 2.3.59 cbf_require_datablock + 2.3.60 cbf_require_category + 2.3.61 cbf_require_column + + ---------------------------------------------------------------------- + + 2.3.6 cbf_force_new_datablock, cbf_force_new_saveframe + + PROTOTYPE + + #include "cbf.h" + + int cbf_force_new_datablock (cbf_handle handle, const char + *datablockname); + int cbf_force_new_saveframe (cbf_handle handle, const char + *saveframename); + + DESCRIPTION + + cbf_force_new_datablock creates a new data block with name datablockname + and makes it the current data block. Duplicate data block names are + allowed. cbf_force_new_saveframe creates a new savew frame with name + saveframename and makes it the current save frame. Duplicate save frame + names are allowed. + + Even if a save frame with this name already exists, a new save frame is + created and becomes the current save frame. + + ARGUMENTS + + handle CBF handle. + datablockname The name of the new data block. + saveframename The name of the new save frame. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.5 cbf_new_datablock, cbf_new_saveframe + 2.3.7 cbf_new_category + 2.3.8 cbf_force_new_category + 2.3.9 cbf_new_column + 2.3.10 cbf_new_row + 2.3.11 cbf_insert_row + 2.3.12 cbf_set_datablockname, cbf_set_saveframename + 2.3.17 cbf_remove_datablock, cbf_remove_saveframe + 2.3.59 cbf_require_datablock + 2.3.60 cbf_require_category + 2.3.61 cbf_require_column + + ---------------------------------------------------------------------- + + 2.3.7 cbf_new_category + + PROTOTYPE + + #include "cbf.h" + + int cbf_new_category (cbf_handle handle, const char *categoryname); + + DESCRIPTION + + cbf_new_category creates a new category in the current data block with + name categoryname and makes it the current category. + + If a category with this name already exists, the existing category becomes + the current category. + + ARGUMENTS + + handle CBF handle. + categoryname The name of the new category. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.5 cbf_new_datablock, cbf_new_saveframe + 2.3.6 cbf_force_new_datablock, cbf_force_new_saveframe + 2.3.8 cbf_force_new_category + 2.3.9 cbf_new_column + 2.3.10 cbf_new_row + 2.3.11 cbf_insert_row + 2.3.18 cbf_remove_category + 2.3.59 cbf_require_datablock + 2.3.60 cbf_require_category + 2.3.61 cbf_require_column + + ---------------------------------------------------------------------- + + 2.3.8 cbf_force_new_category + + PROTOTYPE + + #include "cbf.h" + + int cbf_force_new_category (cbf_handle handle, const char *categoryname); + + DESCRIPTION + + cbf_force_new_category creates a new category in the current data block + with name categoryname and makes it the current category. Duplicate + category names are allowed. + + Even if a category with this name already exists, a new category of the + same name is created and becomes the current category. The allows for the + creation of unlooped tag/value lists drawn from the same category. + + ARGUMENTS + + handle CBF handle. + categoryname The name of the new category. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.5 cbf_new_datablock, cbf_new_saveframe + 2.3.6 cbf_force_new_datablock, cbf_force_new_saveframe + 2.3.7 cbf_new_category + 2.3.9 cbf_new_column + 2.3.10 cbf_new_row + 2.3.11 cbf_insert_row + 2.3.18 cbf_remove_category + 2.3.59 cbf_require_datablock + 2.3.60 cbf_require_category + 2.3.61 cbf_require_column + + ---------------------------------------------------------------------- + + 2.3.9 cbf_new_column + + PROTOTYPE + + #include "cbf.h" + + int cbf_new_column (cbf_handle handle, const char *columnname); + + DESCRIPTION + + cbf_new_column creates a new column in the current category with name + columnname and makes it the current column. + + If a column with this name already exists, the existing column becomes the + current category. + + ARGUMENTS + + handle CBF handle. + columnname The name of the new column. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.5 cbf_new_datablock, cbf_new_saveframe + 2.3.6 cbf_force_new_datablock, cbf_force_new_saveframe + 2.3.7 cbf_new_category + 2.3.8 cbf_force_new_category + 2.3.10 cbf_new_row + 2.3.11 cbf_insert_row + 2.3.19 cbf_remove_column + 2.3.59 cbf_require_datablock + 2.3.60 cbf_require_category + 2.3.61 cbf_require_column + + ---------------------------------------------------------------------- + + 2.3.10 cbf_new_row + + PROTOTYPE + + #include "cbf.h" + + int cbf_new_row (cbf_handle handle); + + DESCRIPTION + + cbf_new_row adds a new row to the current category and makes it the + current row. + + ARGUMENTS + + handle CBF handle. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.5 cbf_new_datablock, cbf_new_saveframe + 2.3.6 cbf_force_new_datablock, cbf_force_new_saveframe + 2.3.7 cbf_new_category + 2.3.8 cbf_force_new_category + 2.3.9 cbf_new_column + 2.3.11 cbf_insert_row + 2.3.12 cbf_delete_row + 2.3.20 cbf_remove_row + 2.3.59 cbf_require_datablock + 2.3.60 cbf_require_category + 2.3.61 cbf_require_column + + ---------------------------------------------------------------------- + + 2.3.11 cbf_insert_row + + PROTOTYPE + + #include "cbf.h" + + int cbf_insert_row (cbf_handle handle, unsigned int rownumber); + + DESCRIPTION + + cbf_insert_row adds a new row to the current category. The new row is + inserted as row rownumber and existing rows starting from rownumber are + moved up by 1. The new row becomes the current row. + + If the category has fewer than rownumber rows, the function returns + CBF_NOTFOUND. + + The row numbers start from 0. + + ARGUMENTS + + handle CBF handle. + rownumber The row number of the new row. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.5 cbf_new_datablock, cbf_new_saveframe + 2.3.6 cbf_force_new_datablock, cbf_force_new_saveframe + 2.3.7 cbf_new_category + 2.3.8 cbf_force_new_category + 2.3.9 cbf_new_column + 2.3.10 cbf_new_row + 2.3.12 cbf_delete_row + 2.3.20 cbf_remove_row + 2.3.59 cbf_require_datablock + 2.3.60 cbf_require_category + 2.3.61 cbf_require_column + + ---------------------------------------------------------------------- + + 2.3.12 cbf_delete_row + + PROTOTYPE + + #include "cbf.h" + + int cbf_delete_row (cbf_handle handle, unsigned int rownumber); + + DESCRIPTION + + cbf_delete_row deletes a row from the current category. Rows starting from + rownumber +1 are moved down by 1. If the current row was higher than + rownumber, or if the current row is the last row, it will also move down + by 1. + + The row numbers start from 0. + + ARGUMENTS + + handle CBF handle. + rownumber The number of the row to delete. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.10 cbf_new_row + 2.3.11 cbf_insert_row + 2.3.17 cbf_remove_datablock, cbf_remove_saveframe + 2.3.18 cbf_remove_category + 2.3.19 cbf_remove_column + 2.3.20 cbf_remove_row + 2.3.59 cbf_require_datablock + 2.3.60 cbf_require_category + 2.3.61 cbf_require_column + + ---------------------------------------------------------------------- + + 2.3.13 cbf_set_datablockname, cbf_set_saveframename + + PROTOTYPE + + #include "cbf.h" + + int cbf_set_datablockname (cbf_handle handle, const char *datablockname); + int cbf_set_saveframename (cbf_handle handle, const char *saveframename); + + DESCRIPTION + + cbf_set_datablockname changes the name of the current data block to + datablockname. cbf_set_saveframename changes the name of the current save + frame to saveframename. + + If a data block or save frame with this name already exists (comparison is + case-insensitive), the function returns CBF_IDENTICAL. + + ARGUMENTS + + handle CBF handle. + datablockname The new data block name. + saveframename The new save frame name. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.5 cbf_new_datablock, cbf_new_saveframe + 2.3.14 cbf_reset_datablocks + 2.3.15 cbf_reset_datablock, cbf_reset_saveframe + 2.3.17 cbf_remove_datablock, cbf_remove_saveframe + 2.3.42 cbf_datablock_name + + ---------------------------------------------------------------------- + + 2.3.14 cbf_reset_datablocks + + PROTOTYPE + + #include "cbf.h" + + int cbf_reset_datablocks (cbf_handle handle); + + DESCRIPTION + + cbf_reset_datablocks deletes all categories from all data blocks. + + The current data block does not change. + + ARGUMENTS + + handle CBF handle. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.15 cbf_reset_datablock, cbf_reset_saveframe + 2.3.18 cbf_remove_category + + ---------------------------------------------------------------------- + + 2.3.15 cbf_reset_datablock, cbf_reset_saveframe + + PROTOTYPE + + #include "cbf.h" + + int cbf_reset_datablock (cbf_handle handle); + int cbf_reset_saveframe (cbf_handle handle); + + DESCRIPTION + + cbf_reset_datablock deletes all categories from the current data block. + cbf_reset_saveframe deletes all categories from the current save frame. + + ARGUMENTS + + handle CBF handle. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.14 cbf_reset_datablocks + 2.3.18 cbf_remove_category + + ---------------------------------------------------------------------- + + 2.3.16 cbf_reset_category + + PROTOTYPE + + #include "cbf.h" + + int cbf_reset_category (cbf_handle handle); + + DESCRIPTION + + cbf_reset_category deletes all columns and rows from current category. + + ARGUMENTS + + handle CBF handle. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.16 cbf_reset_category + 2.3.19 cbf_remove_column + 2.3.20 cbf_remove_row + + ---------------------------------------------------------------------- + + 2.3.17 cbf_remove_datablock, cbf_remove_saveframe + + PROTOTYPE + + #include "cbf.h" + + int cbf_remove_datablock (cbf_handle handle); + int cbf_remove_saveframe (cbf_handle handle); + + DESCRIPTION + + cbf_remove_datablock deletes the current data block. cbf_remove_saveframe + deletes the current save frame. + + The current data block becomes undefined. + + ARGUMENTS + + handle CBF handle. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.5 cbf_new_datablock, cbf_new_saveframe + 2.3.6 cbf_force_new_datablock, cbf_force_new_saveframe + 2.3.18 cbf_remove_category + 2.3.19 cbf_remove_column + 2.3.20 cbf_remove_row + 2.3.59 cbf_require_datablock + 2.3.60 cbf_require_category + 2.3.61 cbf_require_column + + ---------------------------------------------------------------------- + + 2.3.18 cbf_remove_category + + PROTOTYPE + + #include "cbf.h" + + int cbf_remove_category (cbf_handle handle); + + DESCRIPTION + + cbf_remove_category deletes the current category. + + The current category becomes undefined. + + ARGUMENTS + + handle CBF handle. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.7 cbf_new_category + 2.3.8 cbf_force_new_category + 2.3.17 cbf_remove_datablock, cbf_remove_saveframe + 2.3.19 cbf_remove_column + 2.3.20 cbf_remove_row + 2.3.59 cbf_require_datablock + 2.3.60 cbf_require_category + 2.3.61 cbf_require_column + + ---------------------------------------------------------------------- + + 2.3.19 cbf_remove_column + + PROTOTYPE + + #include "cbf.h" + + int cbf_remove_column (cbf_handle handle); + + DESCRIPTION + + cbf_remove_column deletes the current column. + + The current column becomes undefined. + + ARGUMENTS + + handle CBF handle. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.9 cbf_new_column + 2.3.17 cbf_remove_datablock, cbf_remove_saveframe + 2.3.18 cbf_remove_category + 2.3.20 cbf_remove_row + 2.3.59 cbf_require_datablock + 2.3.60 cbf_require_category + 2.3.61 cbf_require_column + + ---------------------------------------------------------------------- + + 2.3.20 cbf_remove_row + + PROTOTYPE + + #include "cbf.h" + + int cbf_remove_row (cbf_handle handle); + + DESCRIPTION + + cbf_remove_row deletes the current row in the current category. + + If the current row was the last row, it will move down by 1, otherwise, it + will remain the same. + + ARGUMENTS + + handle CBF handle. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.10 cbf_new_row + 2.3.11 cbf_insert_row + 2.3.17 cbf_remove_datablock, cbf_remove_saveframe + 2.3.18 cbf_remove_category + 2.3.19 cbf_remove_column + 2.3.12 cbf_delete_row + 2.3.59 cbf_require_datablock + 2.3.60 cbf_require_category + 2.3.61 cbf_require_column + + ---------------------------------------------------------------------- + + 2.3.21 cbf_rewind_datablock + + PROTOTYPE + + #include "cbf.h" + + int cbf_rewind_datablock (cbf_handle handle); + + DESCRIPTION + + cbf_rewind_datablock makes the first data block the current data block. + + If there are no data blocks, the function returns CBF_NOTFOUND. + + The current category becomes undefined. + + ARGUMENTS + + handle CBF handle. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.22 cbf_rewind_category, cbf_rewind_saveframe, cbf_rewind_blockitem + 2.3.19 cbf_rewind_column + 2.3.24 cbf_rewind_row + 2.3.25 cbf_next_datablock + + ---------------------------------------------------------------------- + + 2.3.22 cbf_rewind_category, cbf_rewind_saveframe, cbf_rewind_blockitem + + PROTOTYPE + + #include "cbf.h" + + int cbf_rewind_category (cbf_handle handle); + int cbf_rewind_saveframe (cbf_handle handle); + int cbf_rewind_blockitem (cbf_handle handle, CBF_NODETYPE * type); + + DESCRIPTION + + cbf_rewind_category makes the first category in the current data block the + current category. cbf_rewind_saveframe makes the first saveframe in the + current data block the current saveframe. cbf_rewind_blockitem makes the + first blockitem (category or saveframe) in the current data block the + current blockitem. The type of the blockitem (CBF_CATEGORY or + CBF_SAVEFRAME) is returned in type. + + If there are no categories, saveframes or blockitems the function returns + CBF_NOTFOUND. + + The current column and row become undefined. + + ARGUMENTS + + handle CBF handle. + type CBF handle. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.21 cbf_rewind_datablock + 2.3.19 cbf_rewind_column + 2.3.24 cbf_rewind_row + 2.3.26 cbf_next_category, cbf_next_saveframe, cbf_next_blockitem + + ---------------------------------------------------------------------- + + 2.3.23 cbf_rewind_column + + PROTOTYPE + + #include "cbf.h" + + int cbf_rewind_column (cbf_handle handle); + + DESCRIPTION + + cbf_rewind_column makes the first column in the current category the + current column. + + If there are no columns, the function returns CBF_NOTFOUND. + + The current row is not affected. + + ARGUMENTS + + handle CBF handle. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.21 cbf_rewind_datablock + 2.3.22 cbf_rewind_category, cbf_rewind_saveframe, cbf_rewind_blockitem + 2.3.24 cbf_rewind_row + 2.3.27 cbf_next_column + + ---------------------------------------------------------------------- + + 2.3.24 cbf_rewind_row + + PROTOTYPE + + #include "cbf.h" + + int cbf_rewind_row (cbf_handle handle); + + DESCRIPTION + + cbf_rewind_row makes the first row in the current category the current + row. + + If there are no rows, the function returns CBF_NOTFOUND. + + The current column is not affected. + + ARGUMENTS + + handle CBF handle. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.21 cbf_rewind_datablock + 2.3.22 cbf_rewind_category, cbf_rewind_saveframe, cbf_rewind_blockitem + 2.3.19 cbf_rewind_column + 2.3.28 cbf_next_row + + ---------------------------------------------------------------------- + + 2.3.25 cbf_next_datablock + + PROTOTYPE + + #include "cbf.h" + + int cbf_next_datablock (cbf_handle handle); + + DESCRIPTION + + cbf_next_datablock makes the data block following the current data block + the current data block. + + If there are no more data blocks, the function returns CBF_NOTFOUND. + + The current category becomes undefined. + + ARGUMENTS + + handle CBF handle. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.21 cbf_rewind_datablock + 2.3.26 cbf_next_category, cbf_next_saveframe, cbf_next_blockitem + 2.3.27 cbf_next_column + 2.3.28 cbf_next_row + + ---------------------------------------------------------------------- + + 2.3.26 cbf_next_category + + PROTOTYPE + + #include "cbf.h" + + int cbf_next_category (cbf_handle handle); + + DESCRIPTION + + cbf_next_category makes the category following the current category in the + current data block the current category. + + If there are no more categories, the function returns CBF_NOTFOUND. + + The current column and row become undefined. + + ARGUMENTS + + handle CBF handle. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.22 cbf_rewind_category, cbf_rewind_saveframe, cbf_rewind_blockitem + 2.3.25 cbf_next_datablock + 2.3.27 cbf_next_column + 2.3.27 cbf_next_row + + ---------------------------------------------------------------------- + + 2.3.27 cbf_next_column + + PROTOTYPE + + #include "cbf.h" + + int cbf_next_column (cbf_handle handle); + + DESCRIPTION + + cbf_next_column makes the column following the current column in the + current category the current column. + + If there are no more columns, the function returns CBF_NOTFOUND. + + The current row is not affected. + + ARGUMENTS + + handle CBF handle. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.19 cbf_rewind_column + 2.3.25 cbf_next_datablock + 2.3.26 cbf_next_category, cbf_next_saveframe, cbf_next_blockitem + 2.3.28 cbf_next_row + + ---------------------------------------------------------------------- + + 2.3.28 cbf_next_row + + PROTOTYPE + + #include "cbf.h" + + int cbf_next_row (cbf_handle handle); + + DESCRIPTION + + cbf_next_row makes the row following the current row in the current + category the current row. + + If there are no more rows, the function returns CBF_NOTFOUND. + + The current column is not affected. + + ARGUMENTS + + handle CBF handle. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.24 cbf_rewind_row + 2.3.25 cbf_next_datablock + 2.3.26 cbf_next_category, cbf_next_saveframe, cbf_next_blockitem + 2.3.27 cbf_next_column + + ---------------------------------------------------------------------- + + 2.3.29 cbf_find_datablock + + PROTOTYPE + + #include "cbf.h" + + int cbf_find_datablock (cbf_handle handle, const char *datablockname); + + DESCRIPTION + + cbf_find_datablock makes the data block with name datablockname the + current data block. + + The comparison is case-insensitive. + + If the data block does not exist, the function returns CBF_NOTFOUND. + + The current category becomes undefined. + + ARGUMENTS + + handle CBF handle. + datablockname The name of the data block to find. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.21 cbf_rewind_datablock + 2.3.25 cbf_next_datablock + 2.3.30 cbf_find_category, cbf_find_saveframe, cbf_find_blockitem + 2.3.31 cbf_find_column + 2.3.32 cbf_find_row + 2.3.42 cbf_datablock_name + 2.3.59 cbf_require_datablock + 2.3.60 cbf_require_category + 2.3.61 cbf_require_column + + ---------------------------------------------------------------------- + + 2.3.30 cbf_find_category + + PROTOTYPE + + #include "cbf.h" + + int cbf_find_category (cbf_handle handle, const char *categoryname); + + DESCRIPTION + + cbf_find_category makes the category in the current data block with name + categoryname the current category. + + The comparison is case-insensitive. + + If the category does not exist, the function returns CBF_NOTFOUND. + + The current column and row become undefined. + + ARGUMENTS + + handle CBF handle. + categoryname The name of the category to find. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.22 cbf_rewind_category, cbf_rewind_saveframe, cbf_rewind_blockitem + 2.3.26 cbf_next_category, cbf_next_saveframe, cbf_next_blockitem + 2.3.29 cbf_find_datablock + 2.3.31 cbf_find_column + 2.3.32 cbf_find_row + 2.3.43 cbf_category_name + 2.3.59 cbf_require_datablock + 2.3.60 cbf_require_category + 2.3.61 cbf_require_column + + ---------------------------------------------------------------------- + + 2.3.31 cbf_find_column + + PROTOTYPE + + #include "cbf.h" + + int cbf_find_column (cbf_handle handle, const char *columnname); + + DESCRIPTION + + cbf_find_column makes the columns in the current category with name + columnname the current column. + + The comparison is case-insensitive. + + If the column does not exist, the function returns CBF_NOTFOUND. + + The current row is not affected. + + ARGUMENTS + + handle CBF handle. + columnname The name of column to find. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.19 cbf_rewind_column + 2.3.27 cbf_next_column + 2.3.29 cbf_find_datablock + 2.3.30 cbf_find_category, cbf_find_saveframe, cbf_find_blockitem + 2.3.32 cbf_find_row + 2.3.44 cbf_column_name + 2.3.59 cbf_require_datablock + 2.3.60 cbf_require_category + 2.3.61 cbf_require_column + + ---------------------------------------------------------------------- + + 2.3.32 cbf_find_row + + PROTOTYPE + + #include "cbf.h" + + int cbf_find_row (cbf_handle handle, const char *value); + + DESCRIPTION + + cbf_find_row makes the first row in the current column with value value + the current row. + + The comparison is case-sensitive. + + If a matching row does not exist, the function returns CBF_NOTFOUND. + + The current column is not affected. + + ARGUMENTS + + handle CBF handle. + value The value of the row to find. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.24 cbf_rewind_row + 2.3.28 cbf_next_row + 2.3.29 cbf_find_datablock + 2.3.30 cbf_find_category, cbf_find_saveframe, cbf_find_blockitem + 2.3.31 cbf_find_column + 2.3.33 cbf_find_nextrow + 2.3.46 cbf_get_value, cbf_require_value + 2.3.48 cbf_get_typeofvalue + + 2.3.33 cbf_find_nextrow + + PROTOTYPE + + #include "cbf.h" + + int cbf_find_nextrow (cbf_handle handle, const char *value); + + DESCRIPTION + + cbf_find_nextrow makes the makes the next row in the current column with + value value the current row. The search starts from the row following the + last row found with cbf_find_row or cbf_find_nextrow, or from the current + row if the current row was defined using any other function. + + The comparison is case-sensitive. + + If no more matching rows exist, the function returns CBF_NOTFOUND. + + The current column is not affected. + + ARGUMENTS + + handle CBF handle. + value the value to search for. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.24 cbf_rewind_row + 2.3.28 cbf_next_row + 2.3.29 cbf_find_datablock + 2.3.30 cbf_find_category, cbf_find_saveframe, cbf_find_blockitem + 2.3.31 cbf_find_column + 2.3.32 cbf_find_row + 2.3.46 cbf_get_value, cbf_require_value + 2.3.48 cbf_get_typeofvalue + + ---------------------------------------------------------------------- + + 2.3.34 cbf_count_datablocks + + PROTOTYPE + + #include "cbf.h" + + int cbf_count_datablocks (cbf_handle handle, unsigned int *datablocks); + + DESCRIPTION + + cbf_count_datablocks puts the number of data blocks in *datablocks . + + ARGUMENTS + + handle CBF handle. + datablocks Pointer to the destination data block count. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.35 cbf_count_categories, cbf_count_saveframes, cbf_count_blockitems + 2.3.36 cbf_count_columns + 2.3.37 cbf_count_rows + 2.3.38 cbf_select_datablock + + ---------------------------------------------------------------------- + + 2.3.35 cbf_count_categories + + PROTOTYPE + + #include "cbf.h" + + int cbf_count_categories (cbf_handle handle, unsigned int *categories); + + DESCRIPTION + + cbf_count_categories puts the number of categories in the current data + block in *categories. + + ARGUMENTS + + handle CBF handle. + categories Pointer to the destination category count. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.34 cbf_count_datablocks + 2.3.36 cbf_count_columns + 2.3.37 cbf_count_rows + 2.3.39 cbf_select_category, cbf_select_saveframe, cbf_select_blockitem + + ---------------------------------------------------------------------- + + 2.3.36 cbf_count_columns + + PROTOTYPE + + #include "cbf.h" + + int cbf_count_columns (cbf_handle handle, unsigned int *columns); + + DESCRIPTION + + cbf_count_columns puts the number of columns in the current category in + *columns. + + ARGUMENTS + + handle CBF handle. + columns Pointer to the destination column count. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.34 cbf_count_datablocks + 2.3.35 cbf_count_categories, cbf_count_saveframes, cbf_count_blockitems + 2.3.37 cbf_count_rows + 2.3.40 cbf_select_column + + ---------------------------------------------------------------------- + + 2.3.37 cbf_count_rows + + PROTOTYPE + + #include "cbf.h" + + int cbf_count_rows (cbf_handle handle, unsigned int *rows); + + DESCRIPTION + + cbf_count_rows puts the number of rows in the current category in *rows . + + ARGUMENTS + + handle CBF handle. + rows Pointer to the destination row count. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.34 cbf_count_datablocks + 2.3.35 cbf_count_categories, cbf_count_saveframes, cbf_count_blockitems + 2.3.36 cbf_count_columns + 2.3.41 cbf_select_row + + ---------------------------------------------------------------------- + + 2.3.38 cbf_select_datablock + + PROTOTYPE + + #include "cbf.h" + + int cbf_select_datablock (cbf_handle handle, unsigned int datablock); + + DESCRIPTION + + cbf_select_datablock selects data block number datablock as the current + data block. + + The first data block is number 0. + + If the data block does not exist, the function returns CBF_NOTFOUND. + + ARGUMENTS + + handle CBF handle. + datablock Number of the data block to select. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.34 cbf_count_datablocks + 2.3.39 cbf_select_category, cbf_select_saveframe, cbf_select_blockitem + 2.3.40 cbf_select_column + 2.3.41 cbf_select_row + + ---------------------------------------------------------------------- + + 2.3.39 cbf_select_category + + PROTOTYPE + + #include "cbf.h" + + int cbf_select_category (cbf_handle handle, unsigned int category); + + DESCRIPTION + + cbf_select_category selects category number category in the current data + block as the current category. + + The first category is number 0. + + The current column and row become undefined. + + If the category does not exist, the function returns CBF_NOTFOUND. + + ARGUMENTS + + handle CBF handle. + category Number of the category to select. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.35 cbf_count_categories, cbf_count_saveframes, cbf_count_blockitems + 2.3.38 cbf_select_datablock + 2.3.40 cbf_select_column + 2.3.41 cbf_select_row + + ---------------------------------------------------------------------- + + 2.3.40 cbf_select_column + + PROTOTYPE + + #include "cbf.h" + + int cbf_select_column (cbf_handle handle, unsigned int column); + + DESCRIPTION + + cbf_select_column selects column number column in the current category as + the current column. + + The first column is number 0. + + The current row is not affected + + If the column does not exist, the function returns CBF_NOTFOUND. + + ARGUMENTS + + handle CBF handle. + column Number of the column to select. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.36 cbf_count_columns + 2.3.38 cbf_select_datablock + 2.3.39 cbf_select_category, cbf_select_saveframe, cbf_select_blockitem + 2.3.41 cbf_select_row + + ---------------------------------------------------------------------- + + 2.3.41 cbf_select_row + + PROTOTYPE + + #include "cbf.h" + + int cbf_select_row (cbf_handle handle, unsigned int row); + + DESCRIPTION + + cbf_select_row selects row number row in the current category as the + current row. + + The first row is number 0. + + The current column is not affected + + If the row does not exist, the function returns CBF_NOTFOUND. + + ARGUMENTS + + handle CBF handle. + row Number of the row to select. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.37 cbf_count_rows + 2.3.38 cbf_select_datablock + 2.3.39 cbf_select_category, cbf_select_saveframe, cbf_select_blockitem + 2.3.40 cbf_select_column + + ---------------------------------------------------------------------- + + 2.3.42 cbf_datablock_name + + PROTOTYPE + + #include "cbf.h" + + int cbf_datablock_name (cbf_handle handle, const char **datablockname); + + DESCRIPTION + + cbf_datablock_name sets *datablockname to point to the name of the current + data block. + + The data block name will be valid as long as the data block exists and has + not been renamed. + + The name must not be modified by the program in any way. + + ARGUMENTS + + handle CBF handle. + datablockname Pointer to the destination data block name pointer. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.29 cbf_find_datablock + + ---------------------------------------------------------------------- + + 2.3.43 cbf_category_name + + PROTOTYPE + + #include "cbf.h" + + int cbf_category_name (cbf_handle handle, const char **categoryname); + + DESCRIPTION + + cbf_category_name sets *categoryname to point to the name of the current + category of the current data block. + + The category name will be valid as long as the category exists. + + The name must not be modified by the program in any way. + + ARGUMENTS + + handle CBF handle. + categoryname Pointer to the destination category name pointer. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.30 cbf_find_category, cbf_find_saveframe, cbf_find_blockitem + + ---------------------------------------------------------------------- + + 2.3.44 cbf_column_name, cbf_set_column_name + + PROTOTYPE + + #include "cbf.h" + + int cbf_column_name (cbf_handle handle, const char **columnname); + int cbf_set_column_name (cbf_handle handle, const char *newcolumnname) + + DESCRIPTION + + cbf_column_name sets *columnname to point to the name of the current + column of the current category. + + The column name will be valid as long as the column exists. + + The name must not be modified by the program in any way. + + cbf_set_column_name sets the name of the current column to newcolumnname + + ARGUMENTS + + handle CBF handle. + columnname Pointer to the destination column name pointer. + newcolumnname New column name pointer. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.31 cbf_find_column + + ---------------------------------------------------------------------- + + 2.3.45 cbf_row_number + + PROTOTYPE + + #include "cbf.h" + + int cbf_row_number (cbf_handle handle, unsigned int *row); + + DESCRIPTION + + cbf_row_number sets *row to the number of the current row of the current + category. + + ARGUMENTS + + handle CBF handle. + row Pointer to the destination row number. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.41 cbf_select_row + + ---------------------------------------------------------------------- + + 2.3.46 cbf_get_value, cbf_require_value + + PROTOTYPE + + #include "cbf.h" + + int cbf_get_value (cbf_handle handle, const char **value); + int cbf_require_value (cbf_handle handle, const char **value, const char + *defaultvalue ); + + DESCRIPTION + + cbf_get_value sets *value to point to the ASCII value of the item at the + current column and row. cbf_require_value sets *value to point to the + ASCII value of the item at the current column and row, creating the data + item if necessary and initializing it to a copy of defaultvalue. + + If the value is not ASCII, the function returns CBF_BINARY. + + The value will be valid as long as the item exists and has not been set to + a new value. + + The value must not be modified by the program in any way. + + ARGUMENTS + + handle CBF handle. + value Pointer to the destination value pointer. + defaultvalue Default value character string. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.47 cbf_set_value + 2.3.48 cbf_get_typeofvalue + 2.3.49 cbf_set_typeofvalue + 2.3.50 cbf_get_integervalue, cbf_require_integervalue + 2.3.52 cbf_get_doublevalue, cbf_require_doublevalue + 2.3.54 cbf_get_integerarrayparameters, + cbf_get_integerarrayparameters_wdims, cbf_get_realarrayparameters, + cbf_get_realarrayparameters_wdims + 2.3.55 cbf_get_integerarray, cbf_get_realarray + 2.3.62 cbf_require_column_value + 2.3.63 cbf_require_column_integervalue + 2.3.64 cbf_require_column_doublevalue + + ---------------------------------------------------------------------- + + 2.3.47 cbf_set_value + + PROTOTYPE + + #include "cbf.h" + + int cbf_set_value (cbf_handle handle, const char *value); + + DESCRIPTION + + cbf_set_value sets the item at the current column and row to the ASCII + value value. + + ARGUMENTS + + handle CBF handle. + value ASCII value. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.46 cbf_get_value, cbf_require_value + 2.3.48 cbf_get_typeofvalue + 2.3.49 cbf_set_typeofvalue + 2.3.51 cbf_set_integervalue + 2.3.53 cbf_set_doublevalue + 2.3.56 cbf_set_integerarray, cbf_set_integerarray_wdims, + cbf_set_realarray, cbf_set_realarray_wdims + 2.3.62 cbf_require_column_value + 2.3.63 cbf_require_column_integervalue + 2.3.64 cbf_require_column_doublevalue + + ---------------------------------------------------------------------- + + 2.3.48 cbf_get_typeofvalue + + PROTOTYPE + + #include "cbf.h" + + int cbf_get_typeofvalue (cbf_handle handle, const char **typeofvalue); + + DESCRIPTION + + cbf_get_value sets *typeofvalue to point an ASCII descriptor of the value + of the item at the current column and row. The strings that may be + returned are: + +"null" for a null value indicated by a "." or a "?" +"bnry" for a binary value +"word" for an unquoted string +"dblq" for a double-quoted string +"sglq" for a single-quoted string +"text" for a semicolon-quoted string (multiline text field) +"prns" for a parenthesis-bracketed string (multiline text field) +"brcs" for a brace-bracketed string (multiline text field) +"bkts" for a square-bracket-bracketed string (multiline text field) +"tsqs" for a treble-single-quote quoted string (multiline text field) +"tdqs" for a treble-double-quote quoted string (multiline text field) + + Not all types are valid for all type of CIF files. In partcular the types + "prns", "brcs", "bkts" were introduced with DDLm and are not valid in DDL1 + or DDL2 CIFS. The types "tsqs" and "tdqs" are not formally part of the CIF + syntax. A field for which no value has been set sets *typeofvalue to NULL + rather than to the string "null". + + The typeofvalue must not be modified by the program in any way. + + ARGUMENTS + + handle CBF handle. + typeofvalue Pointer to the destination type-of-value string pointer. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.46 cbf_get_value, cbf_require_value + 2.3.47 cbf_set_value + 2.3.49 cbf_set_typeofvalue + 2.3.50 cbf_get_integervalue, cbf_require_integervalue + 2.3.52 cbf_get_doublevalue, cbf_require_doublevalue + 2.3.54 cbf_get_integerarrayparameters, + cbf_get_integerarrayparameters_wdims, cbf_get_realarrayparameters, + cbf_get_realarrayparameters_wdims + 2.3.55 cbf_get_integerarray, cbf_get_realarray + 2.3.62 cbf_require_column_value + 2.3.63 cbf_require_column_integervalue + 2.3.64 cbf_require_column_doublevalue + + ---------------------------------------------------------------------- + + 2.3.49 cbf_set_typeofvalue + + PROTOTYPE + + #include "cbf.h" + + int cbf_set_typeofvalue (cbf_handle handle, const char *typeofvalue); + + DESCRIPTION + + cbf_set_typeofvalue sets the type of the item at the current column and + row to the type specified by the ASCII character string given by + typeofvalue. The strings that may be used are: + +"null" for a null value indicated by a "." or a "?" +"bnry" for a binary value +"word" for an unquoted string +"dblq" for a double-quoted string +"sglq" for a single-quoted string +"text" for a semicolon-quoted string (multiline text field) +"prns" for a parenthesis-bracketed string (multiline text field) +"brcs" for a brace-bracketed string (multiline text field) +"bkts" for a square-bracket-bracketed string (multiline text field) +"tsqs" for a treble-single-quote quoted string (multiline text field) +"tdqs" for a treble-double-quote quoted string (multiline text field) + + Not all types may be used for all values. Not all types are valid for all + type of CIF files. In partcular the types "prns", "brcs", "bkts" were + introduced with DDLm and are not valid in DDL1 or DDL2 CIFS. The types + "tsqs" and "tdqs" are not formally part of the CIF syntax. No changes may + be made to the type of binary values. You may not set the type of a string + that contains a single quote followed by a blank or a tab or which + contains multiple lines to "sglq". You may not set the type of a string + that contains a double quote followed by a blank or a tab or which + contains multiple lines to "dblq". + + ARGUMENTS + + handle CBF handle. + typeofvalue ASCII string for desired type of value. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.46 cbf_get_value, cbf_require_value + 2.3.47 cbf_set_value + 2.3.48 cbf_get_typeofvalue + 2.3.51 cbf_set_integervalue + 2.3.53 cbf_set_doublevalue + 2.3.56 cbf_set_integerarray, cbf_set_integerarray_wdims, + cbf_set_realarray, cbf_set_realarray_wdims + 2.3.62 cbf_require_column_value + 2.3.63 cbf_require_column_integervalue + 2.3.64 cbf_require_column_doublevalue + + ---------------------------------------------------------------------- + + 2.3.50 cbf_get_integervalue, cbf_require_integervalue + + PROTOTYPE + + #include "cbf.h" + + int cbf_get_integervalue (cbf_handle handle, int *number); + int cbf_require_integervalue (cbf_handle handle, int *number, int + defaultvalue); + + DESCRIPTION + + cbf_get_integervalue sets *number to the value of the ASCII item at the + current column and row interpreted as a decimal integer. + cbf_require_integervalue sets *number to the value of the ASCII item at + the current column and row interpreted as a decimal integer, setting it to + defaultvalue if necessary. + + If the value is not ASCII, the function returns CBF_BINARY. + + ARGUMENTS + + handle CBF handle. + number pointer to the number. + defaultvalue default number value. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.46 cbf_get_value, cbf_require_value + 2.3.48 cbf_get_typeofvalue + 2.3.51 cbf_set_integervalue + 2.3.52 cbf_get_doublevalue, cbf_require_doublevalue + 2.3.54 cbf_get_integerarrayparameters, + cbf_get_integerarrayparameters_wdims, cbf_get_realarrayparameters, + cbf_get_realarrayparameters_wdims + 2.3.55 cbf_get_integerarray, cbf_get_realarray + 2.3.62 cbf_require_column_value + 2.3.63 cbf_require_column_integervalue + 2.3.64 cbf_require_column_doublevalue + + ---------------------------------------------------------------------- + + 2.3.51 cbf_set_integervalue + + PROTOTYPE + + #include "cbf.h" + + int cbf_set_integervalue (cbf_handle handle, int number); + + DESCRIPTION + + cbf_set_integervalue sets the item at the current column and row to the + integer value number written as a decimal ASCII string. + + ARGUMENTS + + handle CBF handle. + number Integer value. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.46 cbf_get_value, cbf_require_value + 2.3.47 cbf_set_value + 2.3.48 cbf_get_typeofvalue + 2.3.49 cbf_set_typeofvalue + 2.3.50 cbf_get_integervalue, cbf_require_integervalue + 2.3.51 cbf_set_integervalue + 2.3.53 cbf_set_doublevalue + 2.3.56 cbf_set_integerarray, cbf_set_integerarray_wdims, + cbf_set_realarray, cbf_set_realarray_wdims + 2.3.62 cbf_require_column_value + 2.3.63 cbf_require_column_integervalue + 2.3.64 cbf_require_column_doublevalue + + ---------------------------------------------------------------------- + + 2.3.52 cbf_get_doublevalue, cbf_require_doublevalue + + PROTOTYPE + + #include "cbf.h" + + int cbf_get_doublevalue (cbf_handle handle, double *number); + int cbf_require_doublevalue (cbf_handle handle, double *number, double + defaultvalue); + + DESCRIPTION + + cbf_get_doublevalue sets *number to the value of the ASCII item at the + current column and row interpreted as a decimal floating-point number. + cbf_require_doublevalue sets *number to the value of the ASCII item at the + current column and row interpreted as a decimal floating-point number, + setting it to defaultvalue if necessary. + + If the value is not ASCII, the function returns CBF_BINARY. + + ARGUMENTS + + handle CBF handle. + number Pointer to the destination number. + defaultvalue default number value. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.46 cbf_get_value, cbf_require_value + 2.3.48 cbf_get_typeofvalue + 2.3.49 cbf_set_typeofvalue + 2.3.50 cbf_get_integervalue, cbf_require_integervalue + 2.3.53 cbf_set_doublevalue + 2.3.54 cbf_get_integerarrayparameters, + cbf_get_integerarrayparameters_wdims, cbf_get_realarrayparameters, + cbf_get_realarrayparameters_wdims + 2.3.55 cbf_get_integerarray, cbf_get_realarray + 2.3.62 cbf_require_column_value + 2.3.63 cbf_require_column_integervalue + 2.3.64 cbf_require_column_doublevalue + + ---------------------------------------------------------------------- + + 2.3.53 cbf_set_doublevalue + + PROTOTYPE + + #include "cbf.h" + + int cbf_set_doublevalue (cbf_handle handle, const char *format, double + number); + + DESCRIPTION + + cbf_set_doublevalue sets the item at the current column and row to the + floating-point value number written as an ASCII string with the format + specified by format as appropriate for the printf function. + + ARGUMENTS + + handle CBF handle. + format Format for the number. + number Floating-point value. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.46 cbf_get_value, cbf_require_value + 2.3.47 cbf_set_value + 2.3.48 cbf_get_typeofvalue + 2.3.49 cbf_set_typeofvalue + 2.3.51 cbf_set_integervalue + 2.3.52 cbf_get_doublevalue, cbf_require_doublevalue + 2.3.56 cbf_set_integerarray, cbf_set_integerarray_wdims, + cbf_set_realarray, cbf_set_realarray_wdims + 2.3.62 cbf_require_column_value + 2.3.63 cbf_require_column_integervalue + 2.3.64 cbf_require_column_doublevalue + + ---------------------------------------------------------------------- + + 2.3.54 cbf_get_integerarrayparameters, + cbf_get_integerarrayparameters_wdims, + cbf_get_integerarrayparameters_wdims_fs, + cbf_get_integerarrayparameters_wdims_sf, cbf_get_realarrayparameters, + cbf_get_realarrayparameters_wdims, + cbf_get_realarrayparameters_wdims_fs, cbf_get_realarrayparameters_wdims_sf + + PROTOTYPE + + #include "cbf.h" + + int cbf_get_integerarrayparameters (cbf_handle handle, unsigned int + *compression, int *binary_id, size_t *elsize, int *elsigned, int + *elunsigned, size_t *elements, int *minelement, int *maxelement); + + int cbf_get_integerarrayparameters_wdims (cbf_handle handle, unsigned int + *compression, int *binary_id, size_t *elsize, int *elsigned, int + *elunsigned, size_t *elements, int *minelement, int *maxelement, const + char **byteorder, size_t *dimfast, size_t *dimmid, size_t *dimslow, size_t + *padding); + int cbf_get_integerarrayparameters_wdims_fs (cbf_handle handle, unsigned + int *compression, int *binary_id, size_t *elsize, int *elsigned, int + *elunsigned, size_t *elements, int *minelement, int *maxelement, const + char **byteorder, size_t *dimfast, size_t *dimmid, size_t *dimslow, size_t + *padding); + int cbf_get_integerarrayparameters_wdims_sf (cbf_handle handle, unsigned + int *compression, int *binary_id, size_t *elsize, int *elsigned, int + *elunsigned, size_t *elements, int *minelement, int *maxelement, const + char **byteorder, size_t *dimslow, size_t *dimmid, size_t *dimfast, size_t + *padding); + + int cbf_get_realarrayparameters (cbf_handle handle, unsigned int + *compression, int *binary_id, size_t *elsize, size_t *elements); + + int cbf_get_realarrayparameters_wdims (cbf_handle handle, unsigned int + *compression, int *binary_id, size_t *elsize, size_t *elements, const char + **byteorder, size_t *dimfast, size_t *dimmid, size_t *dimslow, size_t + *padding); + int cbf_get_realarrayparameters_wdims_fs (cbf_handle handle, unsigned int + *compression, int *binary_id, size_t *elsize, size_t *elements, const char + **byteorder, size_t *dimfast, size_t *dimmid, size_t *dimslow, size_t + *padding); + int cbf_get_realarrayparameters_wdims_sf (cbf_handle handle, unsigned int + *compression, int *binary_id, size_t *elsize, size_t *elements, const char + **byteorder, size_t *dimslow, size_t *dimmid, size_t *dimfast, size_t + *padding); + + DESCRIPTION + + cbf_get_integerarrayparameters sets *compression, *binary_id, *elsize, + *elsigned, *elunsigned, *elements, *minelement and *maxelement to values + read from the binary value of the item at the current column and row. This + provides all the arguments needed for a subsequent call to + cbf_set_integerarray, if a copy of the array is to be made into another + CIF or CBF. cbf_get_realarrayparameters sets *compression, *binary_id, + *elsize, *elements to values read from the binary value of the item at the + current column and row. This provides all the arguments needed for a + subsequent call to cbf_set_realarray, if a copy of the arry is to be made + into another CIF or CBF. + + The variants cbf_get_integerarrayparameters_wdims, + cbf_get_integerarrayparameters_wdims_fs, + cbf_get_integerarrayparameters_wdims_sf, + cbf_get_realarrayparameters_wdims, cbf_get_realarrayparameters_wdims_fs, + cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, *dimmid, + *dimslow, and *padding as well, providing the additional parameters needed + for a subsequent call to cbf_set_integerarray_wdims or + cbf_set_realarray_wdims. + + The value returned in *byteorder is a pointer either to the string + "little_endian" or to the string "big_endian". This should be the byte + order of the data, not necessarily of the host machine. No attempt should + be made to modify this string. At this time only "little_endian" will be + returned. + + The values returned in *dimfast, *dimmid and *dimslow are the sizes of the + fastest changing, second fastest changing and third fastest changing + dimensions of the array, if specified, or zero, if not specified. + + The value returned in *padding is the size of the post-data padding, if + any and if specified in the data header. The value is given as a count of + octets. + + If the value is not binary, the function returns CBF_ASCII. + + ARGUMENTS + + handle CBF handle. + compression Compression method used. + elsize Size in bytes of each array element. + binary_id Pointer to the destination integer binary identifier. + elsigned Pointer to an integer. Set to 1 if the elements can be + read as signed integers. + elunsigned Pointer to an integer. Set to 1 if the elements can be + read as unsigned integers. + elements Pointer to the destination number of elements. + minelement Pointer to the destination smallest element. + maxelement Pointer to the destination largest element. + byteorder Pointer to the destination byte order. + dimfast Pointer to the destination fastest dimension. + dimmid Pointer to the destination second fastest dimension. + dimslow Pointer to the destination third fastest dimension. + padding Pointer to the destination padding size. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.46 cbf_get_value, cbf_require_value + 2.3.48 cbf_get_typeofvalue + 2.3.49 cbf_set_typeofvalue + 2.3.50 cbf_get_integervalue, cbf_require_integervalue + 2.3.52 cbf_get_doublevalue, cbf_require_doublevalue + 2.3.55 cbf_get_integerarray, cbf_get_realarray + 2.3.56 cbf_set_integerarray, cbf_set_integerarray_wdims, + cbf_set_realarray, cbf_set_realarray_wdims + 2.3.62 cbf_require_column_value + 2.3.63 cbf_require_column_integervalue + 2.3.64 cbf_require_column_doublevalue + + ---------------------------------------------------------------------- + + 2.3.55 cbf_get_integerarray, cbf_get_realarray + + PROTOTYPE + + #include "cbf.h" + + int cbf_get_integerarray (cbf_handle handle, int *binary_id, void *array, + size_t elsize, int elsigned, size_t elements, size_t *elements_read); + int cbf_get_realarray (cbf_handle handle, int *binary_id, void *array, + size_t elsize, size_t elements, size_t *elements_read); + + DESCRIPTION + + cbf_get_integerarray reads the binary value of the item at the current + column and row into an integer array. The array consists of elements + elements of elsize bytes each, starting at array. The elements are signed + if elsigned is non-0 and unsigned otherwise. *binary_id is set to the + binary section identifier and *elements_read to the number of elements + actually read. cbf_get_realarray reads the binary value of the item at the + current column and row into a real array. The array consists of elements + elements of elsize bytes each, starting at array. *binary_id is set to the + binary section identifier and *elements_read to the number of elements + actually read. + + If any element in the integer binary data cant fit into the destination + element, the destination is set the nearest possible value. + + If the value is not binary, the function returns CBF_ASCII. + + If the requested number of elements cant be read, the function will read + as many as it can and then return CBF_ENDOFDATA. + + Currently, the destination array must consist of chars, shorts or ints + (signed or unsigned). If elsize is not equal to sizeof (char), sizeof + (short) or sizeof (int), for cbf_get_integerarray, or sizeof(double) or + sizeof(float), for cbf_get_realarray the function returns CBF_ARGUMENT. + + An additional restriction in the current version of CBFlib is that values + too large to fit in an int are not correctly decompressed. As an example, + if the machine with 32-bit ints is reading an array containing a value + outside the range 0 .. 2^^32-1 (unsigned) or -2^^31 .. 2^^31-1 (signed), + the array will not be correctly decompressed. This restriction will be + removed in a future release. For cbf_get_realarray, only IEEE format is + supported. No conversion to other floating point formats is done at this + time. + + ARGUMENTS + + handle CBF handle. + binary_id Pointer to the destination integer binary identifier. + array Pointer to the destination array. + elsize Size in bytes of each destination array element. + elsigned Set to non-0 if the destination array elements are + signed. + elements The number of elements to read. + elements_read Pointer to the destination number of elements actually + read. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + SEE ALSO + + 2.3.46 cbf_get_value, cbf_require_value + 2.3.48 cbf_get_typeofvalue + 2.3.49 cbf_set_typeofvalue + 2.3.50 cbf_get_integervalue, cbf_require_integervalue + 2.3.52 cbf_get_doublevalue, cbf_require_doublevalue + 2.3.54 cbf_get_integerarrayparameters, + cbf_get_integerarrayparameters_wdims, cbf_get_realarrayparameters, + cbf_get_realarrayparameters_wdims + 2.3.56 cbf_set_integerarray, cbf_set_integerarray_wdims, + cbf_set_realarray, cbf_set_realarray_wdims + 2.3.62 cbf_require_column_value + 2.3.63 cbf_require_column_integervalue + 2.3.64 cbf_require_column_doublevalue + + ---------------------------------------------------------------------- + + 2.3.56 cbf_set_integerarray, + cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, + cbf_set_integerarray_wdims_sf, + cbf_set_realarray, + cbf_set_realarray_wdims, cbf_set_realarray_wdims_fs, + cbf_set_realarray_wdims_sf + + PROTOTYPE + + #include "cbf.h" + + int cbf_set_integerarray (cbf_handle handle, unsigned int compression, int + binary_id, void *array, size_t elsize, int elsigned, size_t elements); + + int cbf_set_integerarray_wdims (cbf_handle handle, unsigned int + compression, int binary_id, void *array, size_t elsize, int elsigned, + size_t elements, const char *byteorder, size_t dimfast, size_t dimmid, + size_t dimslow, size_t padding); + int cbf_set_integerarray_wdims_fs (cbf_handle handle, unsigned int + compression, int binary_id, void *array, size_t elsize, int elsigned, + size_t elements, const char *byteorder, size_t dimfast, size_t dimmid, + size_t dimslow, size_t padding); + int cbf_set_integerarray_wdims_sf (cbf_handle handle, unsigned int + compression, int binary_id, void *array, size_t elsize, int elsigned, + size_t elements, const char *byteorder, size_t dimslow, size_t dimmid, + size_t dimfast, size_t padding); + + int cbf_set_realarray (cbf_handle handle, unsigned int compression, int + binary_id, void *array, size_t elsize, size_t elements); + + int cbf_set_realarray_wdims (cbf_handle handle, unsigned int compression, + int binary_id, void *array, size_t elsize, size_t elements, const char + *byteorder, size_t dimfast, size_t dimmid, size_t dimslow, size_t + padding); + int cbf_set_realarray_wdims_fs (cbf_handle handle, unsigned int + compression, int binary_id, void *array, size_t elsize, size_t elements, + const char *byteorder, size_t dimfast, size_t dimmid, size_t dimslow, + size_t padding); + int cbf_set_realarray_wdims_sf (cbf_handle handle, unsigned int + compression, int binary_id, void *array, size_t elsize, size_t elements, + const char *byteorder, size_t dimslow, size_t dimmid, size_t dimfast, + size_t padding); + + DESCRIPTION + + cbf_set_integerarray sets the binary value of the item at the current + column and row to an integer array. The array consists of elements + elements of elsize bytes each, starting at array. The elements are signed + if elsigned is non-0 and unsigned otherwise. binary_id is the binary + section identifier. cbf_set_realarray sets the binary value of the item at + the current column and row to an integer array. The array consists of + elements elements of elsize bytes each, starting at array. binary_id is + the binary section identifier. + + The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, + cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, + cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants allow + the data header values of byteorder, dimfast, dimmid, dimslow and padding + to be set to the data byte order, the fastest, second fastest and third + fastest array dimensions and the size in byte of the post data padding to + be used. + + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) + CBF_PACKED_V2 CCP4-style packing, version 2 (section 3.3.2) + CBF_BYTE_OFFSET Simple "byte_offset" compression. + CBF_NIBBLE_OFFSET Simple "nibble_offset" compression. + CBF_NONE No compression. NOTE: This scheme is by far the + slowest of the four and uses much more disk space. It + is intended for routine use with small arrays only. + With large arrays (like images) it should be used only + for debugging. + + The values compressed are limited to 64 bits. If any element in the array + is larger than 64 bits, the value compressed is the nearest 64-bit value. + + Currently, the source array must consist of chars, shorts or ints (signed + or unsigned), for cbf_set_integerarray, or IEEE doubles or floats for + cbf_set_realarray. If elsize is not equal to sizeof (char), sizeof (short) + or sizeof (int), the function returns CBF_ARGUMENT. + + ARGUMENTS + + handle CBF handle. + compression Compression method to use. + binary_id Integer binary identifier. + array Pointer to the source array. + elsize Size in bytes of each source array element. + elsigned Set to non-0 if the source array elements are signed. + elements The number of elements in the array + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.47 cbf_set_value + 2.3.48 cbf_get_typeofvalue + 2.3.49 cbf_set_typeofvalue + 2.3.51 cbf_set_integervalue + 2.3.53 cbf_set_doublevalue + 2.3.54 cbf_get_integerarrayparameters, + cbf_get_integerarrayparameters_wdims, cbf_get_realarrayparameters, + cbf_get_realarrayparameters_wdims + 2.3.55 cbf_get_integerarray, cbf_get_realarray + 2.3.62 cbf_require_column_value + 2.3.63 cbf_require_column_integervalue + 2.3.64 cbf_require_column_doublevalue + + ---------------------------------------------------------------------- + + 2.3.57 cbf_failnez + + DEFINITION + + #include "cbf.h" + + #define cbf_failnez(f) {int err; err = (f); if (err) return err; } + + DESCRIPTION + + cbf_failnez is a macro used for error propagation throughout CBFlib. + cbf_failnez executes the function f and saves the returned error value. If + the error value is non-0, cbf_failnez executes a return with the error + value as argument. If CBFDEBUG is defined, then a report of the error is + also printed to the standard error stream, stderr, in the form + + CBFlib error f in "symbol" + + where f is the decimal value of the error and symbol is the symbolic form. + + ARGUMENTS + + f Integer error value. + + SEE ALSO + + 2.3.58 cbf_onfailnez + + ---------------------------------------------------------------------- + + 2.3.58 cbf_onfailnez + + DEFINITION + + #include "cbf.h" + + #define cbf_onfailnez(f,c) {int err; err = (f); if (err) {{c; }return err; + }} + + DESCRIPTION + + cbf_onfailnez is a macro used for error propagation throughout CBFlib. + cbf_onfailnez executes the function f and saves the returned error value. + If the error value is non-0, cbf_failnez executes first the statement c + and then a return with the error value as argument. If CBFDEBUG is + defined, then a report of the error is also printed to the standard error + stream, stderr, in the form + + CBFlib error f in "symbol" + + where f is the decimal value of the error and symbol is the symbolic form. + + ARGUMENTS + + f integer function to execute. + c statement to execute on failure. + + SEE ALSO + * 2.3.57 cbf_failnez + + ---------------------------------------------------------------------- + + 2.3.59 cbf_require_datablock + + PROTOTYPE + + #include "cbf.h" + + int cbf_require_datablock (cbf_handle handle, const char + *datablockname); + + DESCRIPTION + + cbf_require_datablock makes the data block with name datablockname the + current data block, if it exists, or creates it if it does not. + + The comparison is case-insensitive. + + The current category becomes undefined. + + ARGUMENTS + + handle CBF handle. + datablockname The name of the data block to find or create. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.21 cbf_rewind_datablock + 2.3.25 cbf_next_datablock + 2.3.29 cbf_find_datablock + 2.3.30 cbf_find_category, cbf_find_saveframe, cbf_find_blockitem + 2.3.31 cbf_find_column + 2.3.32 cbf_find_row + 2.3.42 cbf_datablock_name + 2.3.60 cbf_require_category + 2.3.61 cbf_require_column + + ---------------------------------------------------------------------- + + 2.3.60 cbf_require_category + + PROTOTYPE + + #include "cbf.h" + + int cbf_require_category (cbf_handle handle, const char *categoryname); + + DESCRIPTION + + cbf_rewuire_category makes the category in the current data block with + name categoryname the current category, if it exists, or creates the + catagory if it does not exist. + + The comparison is case-insensitive. + + The current column and row become undefined. + + ARGUMENTS + + handle CBF handle. + categoryname The name of the category to find. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.22 cbf_rewind_category, cbf_rewind_saveframe, cbf_rewind_blockitem + 2.3.26 cbf_next_category, cbf_next_saveframe, cbf_next_blockitem + 2.3.29 cbf_find_datablock + 2.3.31 cbf_find_column + 2.3.32 cbf_find_row + 2.3.43 cbf_category_name + 2.3.59 cbf_require_datablock + 2.3.61 cbf_require_column + + ---------------------------------------------------------------------- + + 2.3.61 cbf_require_column + + PROTOTYPE + + #include "cbf.h" + + int cbf_require_column (cbf_handle handle, const char *columnname); + + DESCRIPTION + + cbf_require_column makes the columns in the current category with name + columnname the current column, if it exists, or creates it if it does + not. + + The comparison is case-insensitive. + + The current row is not affected. + + ARGUMENTS + + handle CBF handle. + columnname The name of column to find. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.19 cbf_rewind_column + 2.3.27 cbf_next_column + 2.3.29 cbf_find_datablock + 2.3.30 cbf_find_category, cbf_find_saveframe, cbf_find_blockitem + 2.3.32 cbf_find_row + 2.3.44 cbf_column_name, cbf_set_column_name + 2.3.59 cbf_require_datablock + 2.3.60 cbf_require_category + + ---------------------------------------------------------------------- + + 2.3.62 cbf_require_column_value + + PROTOTYPE + + #include "cbf.h" + + int cbf_require_column_value (cbf_handle handle, const char *columnname, + const char **value, const char *defaultvalue); + + DESCRIPTION + + cbf_require_column_doublevalue sets *value to the ASCII item at the + current row for the column given with the name given by *columnname, or + to the string given by defaultvalue if the item cannot be found. + + ARGUMENTS + + handle CBF handle. + columnname Name of the column containing the number. + value pointer to the location to receive the value. + defaultvalue Value to use if the requested column and value cannot + be found. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.46 cbf_get_value, cbf_require_value + 2.3.47 cbf_set_value + 2.3.48 cbf_get_typeofvalue + 2.3.49 cbf_set_typeofvalue + 2.3.51 cbf_set_integervalue + 2.3.52 cbf_get_doublevalue, cbf_require_doublevalue + 2.3.56 cbf_set_integerarray, cbf_set_integerarray_wdims, + cbf_set_realarray, cbf_set_realarray_wdims + 2.3.63 cbf_require_column_integervalue + 2.3.64 cbf_require_column_doublevalue + + ---------------------------------------------------------------------- + + 2.3.63 cbf_require_column_integervalue + + PROTOTYPE + + #include "cbf.h" + + int cbf_require_column_integervalue (cbf_handle handle, const char + *columnname, int *number, const int defaultvalue); + + DESCRIPTION + + cbf_require_column_doublevalue sets *number to the value of the ASCII + item at the current row for the column given with the name given by + *columnname, with the value interpreted as an integer number, or to the + number given by defaultvalue if the item cannot be found. + + ARGUMENTS + + handle CBF handle. + columnname Name of the column containing the number. + number pointer to the location to receive the integer value. + defaultvalue Value to use if the requested column and value cannot + be found. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.46 cbf_get_value, cbf_require_value + 2.3.47 cbf_set_value + 2.3.48 cbf_get_typeofvalue + 2.3.49 cbf_set_typeofvalue + 2.3.51 cbf_set_integervalue + 2.3.52 cbf_get_doublevalue, cbf_require_doublevalue + 2.3.56 cbf_set_integerarray, cbf_set_integerarray_wdims, + cbf_set_realarray, cbf_set_realarray_wdims + 2.3.62 cbf_require_column_value + 2.3.64 cbf_require_column_doublevalue + + ---------------------------------------------------------------------- + + 2.3.64 cbf_require_column_doublevalue + + PROTOTYPE + + #include "cbf.h" + + int cbf_require_column_doublevalue (cbf_handle handle, const char + *columnname, double *number, const double defaultvalue); + + DESCRIPTION + + cbf_require_column_doublevalue sets *number to the value of the ASCII + item at the current row for the column given with the name given by + *columnname, with the value interpreted as a decimal floating-point + number, or to the number given by defaultvalue if the item cannot be + found. + + ARGUMENTS + + handle CBF handle. + columnname Name of the column containing the number. + number pointer to the location to receive the floating-point + value. + defaultvalue Value to use if the requested column and value cannot + be found. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.3.46 cbf_get_value, cbf_require_value + 2.3.47 cbf_set_value + 2.3.48 cbf_get_typeofvalue + 2.3.49 cbf_set_typeofvalue + 2.3.51 cbf_set_integervalue + 2.3.52 cbf_get_doublevalue, cbf_require_doublevalue + 2.3.56 cbf_set_integerarray, cbf_set_integerarray_wdims, + cbf_set_realarray, cbf_set_realarray_wdims + 2.3.62 cbf_require_column_value + 2.3.63 cbf_require_column_integervalue + + ---------------------------------------------------------------------- + + 2.3.65 cbf_get_local_integer_byte_order, cbf_get_local_real_byte_order, + cbf_get_local_real_format + + PROTOTYPE + + #include "cbf.h" + + int cbf_get_local_integer_byte_order (char ** byte_order); + int cbf_get_local_real_byte_order (char ** byte_order); + int cbf_get_local_real_format (char ** real_format ); + + DESCRIPTION + + cbf_get_local_integer_byte_order returns the byte order of integers on + the machine on which the API is being run in the form of a character + string returned as the value pointed to by byte_order. + cbf_get_local_real_byte_order returns the byte order of reals on the + machine on which the API is being run in the form of a character string + returned as the value pointed to by byte_order. + cbf_get_local_real_format returns the format of floats on the machine on + which the API is being run in the form of a character string returned as + the value pointed to by real_format. The strings returned must not be + modified in any way. + + The values returned in byte_order may be the strings "little_endian" or + "big-endian". The values returned in real_format may be the strings + "ieee 754-1985" or "other". Additional values may be returned by future + versions of the API. + + ARGUMENTS + + byte_order pointer to the returned string + real_format pointer to the returned string + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.3.66 cbf_get_dictionary, cbf_set_dictionary, cbf_require_dictionary + + PROTOTYPE + + #include "cbf.h" + + int cbf_get_dictionary (cbf_handle handle, cbf_handle * dictionary); + int cbf_set_dictionary (cbf_handle handle, cbf_handle dictionary_in); + int cbf_require_dictionary (cbf_handle handle, cbf_handle * dictionary) + + DESCRIPTION + + cbf_get_dictionary sets *dictionary to the handle of a CBF which has + been associated with the CBF handle by cbf_set_dictionary. + cbf_set_dictionary associates the CBF handle dictionary_in with handle + as its dictionary. cbf_require_dictionary sets *dictionary to the handle + of a CBF which has been associated with the CBF handle by + cbf_set_dictionary or creates a new empty CBF and associates it with + handle, returning the new handle in *dictionary. + + ARGUMENTS + + handle CBF handle. + dictionary Pointer to CBF handle of dictionary. + dictionary_in CBF handle of dcitionary. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.3.67 cbf_convert_dictionary + + PROTOTYPE + + #include "cbf.h" + + int cbf_convert_dictionary (cbf_handle handle, cbf_handle dictionary ) + + DESCRIPTION + + cbf_convert_dictionary converts dictionary as a DDL1 or DDL2 dictionary + to a CBF dictionary of category and item properties for handle, creating + a new dictionary if none exists or layering the definitions in + dictionary onto the existing dictionary of handle if one exists. + + If a CBF is read into handle after calling cbf_convert_dictionary, then + the dictionary will be used for validation of the CBF as it is read. + + ARGUMENTS + + handle CBF handle. + dictionary CBF handle of dictionary. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.3.68 cbf_find_tag, cbf_find_local_tag + + PROTOTYPE + + #include "cbf.h" + + int cbf_find_tag (cbf_handle handle, const char *tag) + int cbf_find_local_tag (cbf_handle handle, const char *tag) + + DESCRIPTION + + cbf_find_tag searches all of the CBF handle for the CIF tag given by the + string tag and makes it the current tag. The search does not include the + dictionary, but does include save frames as well as categories. + + The string tag is the complete tag in either DDL1 or DDL2 format, + starting with the leading underscore, not just a category or column. + + ARGUMENTS + + handle CBF handle. + tag CIF tag. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.3.69 cbf_find_category_root, cbf_set_category_root, + cbf_require_category_root + + PROTOTYPE + + #include "cbf.h" + + int cbf_find_category_root (cbf_handle handle, const char* categoryname, + const char** categoryroot); + int cbf_set_category_root (cbf_handle handle, const char* + categoryname_in, const char*categoryroot); + int cbf_require_category_root (cbf_handle handle, const char* + categoryname, const char** categoryroot); + + DESCRIPTION + + cbf_find_category_root sets *categoryroot to the root category of which + categoryname is an alias. cbf_set_category_root sets categoryname_in as + an alias of categoryroot in the dictionary associated with handle, + creating the dictionary if necessary. cbf_require_category_root sets + *categoryroot to the root category of which categoryname is an alias, if + there is one, or to the value of categoryname, if categoryname is not an + alias. + + A returned categoryroot string must not be modified in any way. + + ARGUMENTS + + handle CBF handle. + categoryname category name which may be an alias. + categoryroot pointer to a returned category root name. + categoryroot_in input category root name. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.3.70 cbf_find_tag_root, cbf_set_tag_root, cbf_require_tag_root + + PROTOTYPE + + #include "cbf.h" + + int cbf_find_tag_root (cbf_handle handle, const char* tagname, const + char** tagroot); + int cbf_set_tag_root (cbf_handle handle, const char* tagname, const + char*tagroot_in); + int cbf_require_tag_root (cbf_handle handle, const char* tagname, const + char** tagroot); + + DESCRIPTION + + cbf_find_tag_root sets *tagroot to the root tag of which tagname is an + alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in the + dictionary associated with handle, creating the dictionary if necessary. + cbf_require_tag_root sets *tagroot to the root tag of which tagname is + an alias, if there is one, or to the value of tagname, if tagname is not + an alias. + + A returned tagroot string must not be modified in any way. + + ARGUMENTS + + handle CBF handle. + tagname tag name which may be an alias. + tagroot pointer to a returned tag root name. + tagroot_in input tag root name. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.3.71 cbf_find_tag_category, cbf_set_tag_category + + PROTOTYPE + + #include "cbf.h" + + int cbf_find_tag_category (cbf_handle handle, const char* tagname, const + char** categoryname); + int cbf_set_tag_category (cbf_handle handle, const char* tagname, const + char* categoryname_in); + + DESCRIPTION + + cbf_find_tag_category sets categoryname to the category associated with + tagname in the dictionary associated with handle. cbf_set_tag_category + upddates the dictionary associated with handle to indicated that tagname + is in category categoryname_in. + + ARGUMENTS + + handle CBF handle. + tagname tag name. + categoryname pointer to a returned category name. + categoryname_in input category name. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + ---------------------------------------------------------------------- + + 2.4 High-level function prototypes + + 2.4.1 cbf_read_template + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_read_template (cbf_handle handle, FILE *file); + + DESCRIPTION + + cbf_read_template reads the CBF or CIF file file into the CBF object + specified by handle and selects the first datablock as the current + datablock. + + ARGUMENTS + + handle Pointer to a CBF handle. + file Pointer to a file descriptor. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.2 cbf_get_diffrn_id, cbf_require_diffrn_id + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_diffrn_id (cbf_handle handle, const char **diffrn_id); + int cbf_require_diffrn_id (cbf_handle handle, const char **diffrn_id, + const char *default_id) + + DESCRIPTION + + cbf_get_diffrn_id sets *diffrn_id to point to the ASCII value of the + "diffrn.id" entry. cbf_require_diffrn_id also sets *diffrn_id to point + to the ASCII value of the "diffrn.id" entry, but, if the "diffrn.id" + entry does not exist, it sets the value in the CBF and in*diffrn_id to + the character string given by default_id, creating the category and + column is necessary. + + The diffrn_id will be valid as long as the item exists and has not been + set to a new value. + + The diffrn_id must not be modified by the program in any way. + + ARGUMENTS + + handle CBF handle. + diffrn_id Pointer to the destination value pointer. + default_id Character string default value. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.3 cbf_set_diffrn_id + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_set_diffrn_id (cbf_handle handle, const char *diffrn_id); + + DESCRIPTION + + cbf_set_diffrn_id sets the "diffrn.id" entry of the current datablock to + the ASCII value diffrn_id. + + This function also changes corresponding "diffrn_id" entries in the + "diffrn_source", "diffrn_radiation", "diffrn_detector" and + "diffrn_measurement" categories. + + ARGUMENTS + + handle CBF handle. + diffrn_id ASCII value. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.4 cbf_get_crystal_id + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_crystal_id (cbf_handle handle, const char **crystal_id); + + DESCRIPTION + + cbf_get_crystal_id sets *crystal_id to point to the ASCII value of the + "diffrn.crystal_id" entry. + + If the value is not ASCII, the function returns CBF_BINARY. + + The value will be valid as long as the item exists and has not been set + to a new value. + + The value must not be modified by the program in any way. + + ARGUMENTS + + handle CBF handle. + crystal_id Pointer to the destination value pointer. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.5 cbf_set_crystal_id + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_set_crystal_id (cbf_handle handle, const char *crystal_id); + + DESCRIPTION + + cbf_set_crystal_id sets the "diffrn.crystal_id" entry to the ASCII value + crystal_id. + + ARGUMENTS + + handle CBF handle. + crystal_id ASCII value. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.6 cbf_get_wavelength + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_wavelength (cbf_handle handle, double *wavelength); + + DESCRIPTION + + cbf_get_wavelength sets *wavelength to the current wavelength in Å. + + ARGUMENTS + + handle CBF handle. + wavelength Pointer to the destination. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.7 cbf_set_wavelength + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_set_wavelength (cbf_handle handle, double wavelength); + + DESCRIPTION + + cbf_set_wavelength sets the current wavelength in Å to wavelength. + + ARGUMENTS + + handle CBF handle. + wavelength Wavelength in Å. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.8 cbf_get_polarization + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_polarization (cbf_handle handle, double + *polarizn_source_ratio, double *polarizn_source_norm); + + DESCRIPTION + + cbf_get_polarization sets *polarizn_source_ratio and + *polarizn_source_norm to the corresponding source polarization + parameters. + + Either destination pointer may be NULL. + + ARGUMENTS + + handle CBF handle. + polarizn_source_ratio Pointer to the destination + polarizn_source_ratio. + polarizn_source_norm Pointer to the destination + polarizn_source_norm. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.9 cbf_set_polarization + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_set_polarization (cbf_handle handle, double + polarizn_source_ratio, double polarizn_source_norm); + + DESCRIPTION + + cbf_set_polarization sets the source polarization to the values + specified by polarizn_source_ratio and polarizn_source_norm. + + ARGUMENTS + + handle CBF handle. + polarizn_source_ratio New value of polarizn_source_ratio. + polarizn_source_norm New value of polarizn_source_norm. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.10 cbf_get_divergence + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_divergence (cbf_handle handle, double *div_x_source, double + *div_y_source, double *div_x_y_source); + + DESCRIPTION + + cbf_get_divergence sets *div_x_source, *div_y_source and *div_x_y_source + to the corresponding source divergence parameters. + + Any of the destination pointers may be NULL. + + ARGUMENTS + + handle CBF handle. + div_x_source Pointer to the destination div_x_source. + div_y_source Pointer to the destination div_y_source. + div_x_y_source Pointer to the destination div_x_y_source. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.11 cbf_set_divergence + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_set_divergence (cbf_handle handle, double div_x_source, double + div_y_source, double div_x_y_source); + + DESCRIPTION + + cbf_set_divergence sets the source divergence parameters to the values + specified by div_x_source, div_y_source and div_x_y_source. + + ARGUMENTS + + handle CBF handle. + div_x_source New value of div_x_source. + div_y_source New value of div_y_source. + div_x_y_source New value of div_x_y_source. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.12 cbf_count_elements + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_count_elements (cbf_handle handle, unsigned int *elements); + + DESCRIPTION + + cbf_count_elements sets *elements to the number of detector elements. + + ARGUMENTS + + handle CBF handle. + elements Pointer to the destination count. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.13 cbf_get_element_number, cbf_get_element_id + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_element_number(cbf_handle handle, const char *element_id, + const char *array_id, const char *array_section_id, unsigned int + *element_number); + int cbf_get_element_id (cbf_handle handle, unsigned int element_number, + const char **element_id); + + DESCRIPTION + + cbf_get_element_number sets element_number to a number that can be used + in other cbf_simple calls to identify the detector element element_id + and optionally the specific array_id> and array_section_id. + cbf_get_element_id sets *element_id to point to the ASCII value of the + element_number'th "diffrn_data_frame.detector_element_id" entry, + counting from 0. The element_number is the ordinal of the detector + element in the DIFFRN_DETECTOR_ELEMENT category. If an array_section_id + is specified (i.e. is not NULL), the element_number is the sum of the + ordinal of the detector element plus the number of detector elements + multiplied by the ordinal of array_section_id for the specified + array_id> in the ARRAY_STRUCTURE_LIST_SECTION category. + + If the detector element does not exist, the function returns + CBF_NOTFOUND. + + The element_id will be valid as long as the item exists and has not been + set to a new value. + + The element_id must not be modified by the program in any way. + + ARGUMENTS + + handle CBF handle. + element_number The number of the detector element counting from 0 + by order of appearance in the "diffrn_data_frame" + category. + element_id Pointer to the destination string for + cbf_get_element_id, but the string itself for + cbf_get_element_number. + array_id The optional array id or NULL. + array_section_id The optional array_section_id or NULL. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.14 cbf_get_gain + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_gain (cbf_handle handle, unsigned int element_number, double + *gain, double *gain_esd); + + DESCRIPTION + + cbf_get_gain sets *gain and *gain_esd to the corresponding gain + parameters for element number element_number. + + Either of the destination pointers may be NULL. + + ARGUMENTS + + handle CBF handle. + element_number The number of the detector element counting from 0 by + order of appearance in the "diffrn_data_frame" + category. + gain Pointer to the destination gain. + gain_esd Pointer to the destination gain_esd. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.15 cbf_set_gain + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_set_gain (cbf_handle handle, unsigned int element_number, double + gain, double gain_esd); + + DESCRIPTION + + cbf_set_gain sets the gain of element number element_number to the + values specified by gain and gain_esd. + + ARGUMENTS + + handle CBF handle. + element_number The number of the detector element counting from 0 by + order of appearance in the "diffrn_data_frame" + category. + gain New gain value. + gain_esd New gain_esd value. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.16 cbf_get_overload + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_overload (cbf_handle handle, unsigned int element_number, + double *overload); + + DESCRIPTION + + cbf_get_overload sets *overload to the overload value for element number + element_number. + + ARGUMENTS + + handle CBF handle. + element_number The number of the detector element counting from 0 by + order of appearance in the "diffrn_data_frame" + category. + overload Pointer to the destination overload. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.17 cbf_set_overload + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_set_overload (cbf_handle handle, unsigned int element_number, + double overload); + + DESCRIPTION + + cbf_set_overload sets the overload value of element number + element_number to overload. + + ARGUMENTS + + handle CBF handle. + element_number The number of the detector element counting from 0 by + order of appearance in the "diffrn_data_frame" + category. + overload New overload value. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.18 cbf_get_integration_time + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_integration_time (cbf_handle handle, unsigned int reserved, + double *time); + + DESCRIPTION + + cbf_get_integration_time sets *time to the integration time in seconds. + The parameter reserved is presently unused and should be set to 0. + + ARGUMENTS + + handle CBF handle. + reserved Unused. Any value other than 0 is invalid. + time Pointer to the destination time. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.19 cbf_set_integration_time + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_set_integration_time (cbf_handle handle, unsigned int reserved, + double time); + + DESCRIPTION + + cbf_set_integration_time sets the integration time in seconds to the + value specified by time. The parameter reserved is presently unused and + should be set to 0. + + ARGUMENTS + + handle CBF handle. + reserved Unused. Any value other than 0 is invalid. + time Integration time in seconds. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.20 cbf_get_timestamp + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_timestamp (cbf_handle handle, unsigned int reserved, double + *time, int *timezone); + + DESCRIPTION + + cbf_get_timestamp sets *time to the collection timestamp in seconds + since January 1 1970. *timezone is set to timezone difference from UTC + in minutes. The parameter reserved is presently unused and should be set + to 0. + + Either of the destination pointers may be NULL. + + ARGUMENTS + + handle CBF handle. + reserved Unused. Any value other than 0 is invalid. + time Pointer to the destination collection timestamp. + timezone Pointer to the destination timezone difference. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.21 cbf_set_timestamp + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_set_timestamp (cbf_handle handle, unsigned int reserved, double + time, int timezone, double precision); + + DESCRIPTION + + cbf_set_timestamp sets the collection timestamp in seconds since January + 1 1970 to the value specified by time. The timezone difference from UTC + in minutes is set to timezone. If no timezone is desired, timezone + should be CBF_NOTIM EZONE. The parameter reserved is presently unused + and should be set to 0. + + The precision of the new timestamp is specified by the value precision + in seconds. If precision is 0, the saved timestamp is assumed accurate + to 1 second. + + ARGUMENTS + + handle CBF handle. + reserved Unused. Any value other than 0 is invalid. + time Timestamp in seconds since January 1 1970. + timezone Timezone difference from UTC in minutes or CBF_NOTIMEZONE. + precision Timestamp precision in seconds. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.22 cbf_get_datestamp + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_datestamp (cbf_handle handle, unsigned int reserved, int + *year, int *month, int *day, int *hour, int *minute, double *second, int + *timezone); + + DESCRIPTION + + cbf_get_datestamp sets *year, *month, *day, *hour, *minute and *second + to the corresponding values of the collection timestamp. *timezone is + set to timezone difference from UTC in minutes. The parameter < + i>reserved is presently unused and should be set to 0. + + Any of the destination pointers may be NULL. + + ARGUMENTS + + handle CBF handle. + reserved Unused. Any value other than 0 is invalid. + year Pointer to the destination timestamp year. + month Pointer to the destination timestamp month (1-12). + day Pointer to the destination timestamp day (1-31). + hour Pointer to the destination timestamp hour (0-23). + minute Pointer to the destination timestamp minute (0-59). + second Pointer to the destination timestamp second (0-60.0). + timezone Pointer to the destination timezone difference from UTC in + minutes. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.23 cbf_set_datestamp + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_set_datestamp (cbf_handle handle, unsigned int reserved, int + year, int month, int day, int hour, int minute, double second, int + timezone, double precision); + + DESCRIPTION + + cbf_set_datestamp sets the collection timestamp in seconds since January + 1 1970 to the value specified by time. The timezone difference from UTC + in minutes is set to timezone. If no timezone is desired, timezone + should be CBF_NOTIM EZONE. The parameter reserved is presently unused + and should be set to 0. + + The precision of the new timestamp is specified by the value precision + in seconds. If precision is 0, the saved timestamp is assumed accurate + to 1 second. + + ARGUMENTS + + handle CBF handle. + reserved Unused. Any value other than 0 is invalid. + time Timestamp in seconds since January 1 1970. + timezone Timezone difference from UTC in minutes or CBF_NOTIMEZONE. + precision Timestamp precision in seconds. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.24 cbf_set_current_timestamp + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_set_current_timestamp (cbf_handle handle, unsigned int reserved, + int timezone); + + DESCRIPTION + + cbf_set_current_timestamp sets the collection timestamp to the current + time. The timezone difference from UTC in minutes is set to timezone. If + no timezone is desired, timezone should be CBF_NOTIMEZONE. If no + timezone is used, the timest amp will be UTC. The parameter reserved is + presently unused and should be set to 0. + + The new timestamp will have a precision of 1 second. + + ARGUMENTS + + handle CBF handle. + reserved Unused. Any value other than 0 is invalid. + timezone Timezone difference from UTC in minutes or CBF_NOTIMEZONE. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.25 cbf_get_image_size, cbf_get_image_size_fs, cbf_get_image_size_sf, + cbf_get_3d_image_size, cbf_get_3d_image_size_fs, + cbf_get_3d_image_size_sf + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_image_size (cbf_handle handle, unsigned int reserved, + unsigned int element_number, size_t *ndimslow, size_t *ndimfast); + int cbf_get_image_size_fs (cbf_handle handle, unsigned int reserved, + unsigned int element_number, size_t *ndimfast, size_t *ndimslow); + int cbf_get_image_size_sf (cbf_handle handle, unsigned int reserved, + unsigned int element_number, size_t *ndimslow, size_t *ndimfast); + + int cbf_get_3d_image_size (cbf_handle handle, unsigned int reserved, + unsigned int element_number, size_t *ndimslow, size_t *ndimmid, size_t + *ndimfast); + int cbf_get_3d_image_size_fs (cbf_handle handle, unsigned int reserved, + unsigned int element_number, size_t *ndimfast, size_t *ndimmid, size_t + *ndimslow); + int cbf_get_3d_image_size_sf (cbf_handle handle, unsigned int reserved, + unsigned int element_number, size_t *ndimslow, size_t *ndimmid, size_t + *ndimfast); + + DESCRIPTION + + cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf set + *ndimslow and *ndimfast to the slow and fast dimensions of the image + array for element number element_number. If the array is 1-dimensional, + *ndimslow will be set to the array size and *ndimfast will be set to 1. + If the array is 3-dimensional an error code will be returned. + cbf_get_3d_image_size, cbf_get_3d_image_size_fs and + cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the + slowest, next fastest and fastest dimensions, respectively, of the 3D + image array for element number element_number. If the array is + 1-dimensional, *ndimslow will be set to the array size and *ndimmid and + *ndimfast will be set to 1. If the array is 2-dimensional *ndimslow and + *ndimmid will be set as for a call to cbf_get_image_size and *ndimfast + will be set to 1. + + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + + Note that the ordering of dimensions is specified by values of the tag + _array_structure_list.precedence with a precedence of 1 for the fastest + dimension, 2 for the next slower, etc., which is opposite to the + ordering of the dimension arguments for these functions, except for the + ones with the _fs suffix.. + + Any of the destination pointers may be NULL. + + The parameter reserved is presently unused and should be set to 0. + + ARGUMENTS + + handle CBF handle. + reserved Unused. Any value other than 0 is invalid. + element_number The number of the detector element counting from 0 by + order of appearance in the "diffrn_data_frame" + category. + ndimslow Pointer to the destination slowest dimension. + ndimmid Pointer to the destination next faster dimension. + ndimfast Pointer to the destination fastest dimension. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.26 cbf_get_image, cbf_get_image_fs, cbf_get_image_sf, + cbf_get_real_image, cbf_get_real_image_fs, cbf_get_real_image_sf, + cbf_get_3d_image, cbf_get_3d_image_fs, cbf_get_3d_image_sf, + cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_image (cbf_handle handle, unsigned int reserved, unsigned + int element_number, void *array, size_t elsize, int elsign, size_t + ndimslow, size_t ndimfast); + int cbf_get_image_fs (cbf_handle handle, unsigned int reserved, unsigned + int element_number, void *array, size_t elsize, int elsign, size_t + ndimfast, size_t ndimslow); + int cbf_get_image_sf (cbf_handle handle, unsigned int reserved, unsigned + int element_number, void *array, size_t elsize, int elsign, size_t + ndimslow, size_t ndimfast); + + int cbf_get_real_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, size_t + ndimslow, size_t ndimfast); + int cbf_get_real_image_fs (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, size_t + ndimfast, size_t ndimslow); + int cbf_get_real_image_sf (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, size_t + ndimslow, size_t ndimfast); + + int cbf_get_3d_image (cbf_handle handle, unsigned int reserved, unsigned + int element_number, void *array, size_t elsize, int elsign, size_t + ndimslow, size_t ndimmid, size_t ndimfast); + int cbf_get_3d_image_fs (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, int elsign, + size_t ndimfast, size_t ndimmid, size_t ndimslow); + int cbf_get_3d_image_sf (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, int elsign, + size_t ndimslow, size_t ndimmid, size_t ndimfast); + + int cbf_get_real_3d_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, size_t + ndimslow, size_t ndimmid, size_t ndimfast); + int cbf_get_real_3d_image_fs (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, size_t + ndimfast, size_t ndimmid, size_t ndimslow); + int cbf_get_real_3d_image_sf (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, size_t + ndimslow, size_t ndimmid, size_t ndimfast); + + DESCRIPTION + + cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image + array for element number element_number into an array. The array + consists of ndimslow×ndimfast elements of elsize bytes each, starting at + array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_get_real_image, cbf_get_real_image_fs and + cbf_get_real_image_sf read the image array of IEEE doubles or floats for + element number element_number into an array. A real array is always + signed. cbf_get_3d_image, cbf_get_3d_image_fs and cbf_get_3d_image_sf + read the 3D image array for element number element_number into an array. + The array consists of ndimslow×ndimmid×ndimfast elements of elsize bytes + each, starting at array. The elements are signed if elsign is non-0 and + unsigned otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or + floats for element number element_number into an array. A real array is + always signed. + + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + + The structure of the array as a 1-, 2- or 3-dimensional array should + agree with the structure of the array given in the ARRAY_STRUCTURE_LIST + category. If the array is 1-dimensional, ndimslow should be the array + size and ndimfast and, for the 3D calls, ndimmid, should be set to 1 + both in the call and in the imgCIF data being processed. If the array is + 2-dimensional and a 3D call is used, ndimslow and ndimmid should be the + array dimensions and ndimfast should be set to 1 both in the call and in + the imgCIF data being processed. + + If any element in the binary data can't fit into the destination + element, the destination is set the nearest possible value. + + If the value is not binary, the function returns CBF_ASCII. + + If the requested number of elements can't be read, the function will + read as many as it can and then return CBF_ENDOFDATA. + + Currently, the destination array must consist of chars, shorts or ints + (signed or unsigned) for cbf_get_image, or IEEE doubles or floats for + cbf_get_real_image. If elsize is not equal to sizeof (char), sizeof + (short), sizeof (int), sizeof(double) or sizeof(float), the function + returns CBF_ARGUMENT. + + The parameter reserved is presently unused and should be set to 0. + + ARGUMENTS + + handle CBF handle. + reserved Unused. Any value other than 0 is invalid. + element_number The number of the detector element counting from 0 by + order of appearance in the "diffrn_data_frame" + category. + array Pointer to the destination array. + elsize Size in bytes of each destination array element. + elsigned Set to non-0 if the destination array elements are + signed. + ndimslow Slowest array dimension. + ndimmid Next faster array dimension. + ndimfast Fastest array dimension. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.27 cbf_set_image, cbf_set_image_fs, cbf_set_image_sf, + cbf_set_real_image, cbf_set_real_image_fs, cbf_set_real_image_sf, + cbf_set_3d_image, cbf_set_3d_image_fs, cbf_set_3d_image_sf, + cbf_set_real_3d_image, cbf_set_real_3d_image_fs, + cbf_set_real_3d_image_sf + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_set_image (cbf_handle handle, unsigned int reserved, unsigned + int element_number, unsigned int compression, void *array, size_t + elsize, int elsign, size_t ndimslow, size_t ndimfast); + int cbf_set_image_fs(cbf_handle handle, unsigned int reserved, unsigned + int element_number, unsigned int compression, void *array, size_t + elsize, int elsign, size_t ndimfast, size_t ndimslow); + int cbf_set_image_sf(cbf_handle handle, unsigned int reserved, unsigned + int element_number, unsigned int compression, void *array, size_t + elsize, int elsign, size_t ndimslow, size_t ndimfast); + + int cbf_set_real_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, void + *array,size_t elsize, size_t ndimslow, size_t ndimfast); + int cbf_set_real_image_fs(cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, void + *array,size_t elsize, size_t ndimfast, size_t ndimslow); + int cbf_set_real_image_sf(cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, void + *array,size_t elsize, size_t ndimslow, size_t ndimfast); + + int cbf_set_3d_image (cbf_handle handle, unsigned int reserved, unsigned + int element_number, unsigned int compression, void *array, size_t + elsize, int elsign, size_t ndimslow, size_t ndimmid, size_t ndimfast); + int cbf_set_3d_image_fs(cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, void *array, + size_t elsize, int elsign, size_t ndimfast, size_t ndimmid, size_t + ndimslow); + int cbf_set_3d_image_sf(cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, void *array, + size_t elsize, int elsign, size_t ndimslow, size_t ndimmid, size_t + ndimfast); + + int cbf_set_real_3d_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, void + *array,size_t elsize, size_t ndimslow, size_t ndimmid, size_t ndimfast); + int cbf_set_real_3d_image_fs(cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, void + *array,size_t elsize, size_t ndimfast, size_t ndimmid, size_t ndimslow); + int cbf_set_real_3d_image_sf(cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, void + *array,size_t elsize, size_t ndimslow, size_t ndimmid, size_t ndimfast); + + DESCRIPTION + + cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image + array for element number element_number. The array consists of + ndimfast×ndimslow elements of elsize bytes each, starting at array. The + elements are signed if elsign is non-zero and unsigned otherwise. + cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf + write the image array for element number element_number. The array + consists of ndimfast×ndimslow IEEE double or float elements of elsize + bytes each, starting at array. cbf_set_3d_image, cbf_set_3d_image_fs and + cbf_set_3d_image_sf write the 3D image array for element number + element_number. The array consists of ndimfast×ndimmid×ndimslow elements + of elsize bytes each, starting at array. The elements are signed if + elsign is non-0 and unsigned otherwise. cbf_set_real_3d_image, + cbf_set_real_3d_image_fs and cbf_set_real_3d_image_sf writes the 3D + image array for element number element_number. The array consists of + ndimfast×ndimmid×ndimslow IEEE double or float elements of elsize bytes + each, starting at array. + + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + + If the array is 1-dimensional, ndimslow should be the array size and + ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the + array is 2-dimensional and the 3D calls are used, ndimslow and ndimmid + should be used for the array dimensions and ndimfast should be set to 1. + + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) + CBF_PACKED_V2 CCP4-style packing, version 2 (section 3.3.2) + CBF_BYTE_OFFSET Simple "byte_offset" compression. + CBF_NIBBLE_OFFSET Simple "nibble_offset" compression. + CBF_NONE No compression. + + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest 64-bit + value. + + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for + cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof + (int), sizeof(double) or sizeof(float), the function returns + CBF_ARGUMENT. + + The parameter reserved is presently unused and should be set to 0. + + ARGUMENTS + + handle CBF handle. + reserved Unused. Any value other than 0 is invalid. + element_number The number of the detector element counting from 0 by + order of appearance in the "diffrn_data_frame" + category. + compression Compression type. + array Pointer to the image array. + elsize Size in bytes of each image array element. + elsigned Set to non-0 if the image array elements are signed. + ndimslow Slowest array dimension. + ndimmid Second slowest array dimension. + ndimfast Fastest array dimension. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.28 cbf_count_axis_ancestors, cbf_get_axis_ancestor, + cbf_get_axis_depends_on, + cbf_get_axis_equipment, cbf_get_axis_equipment_component, + cbf_get_axis_offset, + cbf_get_axis_rotation, cbf_get_axis_rotation_axis, + cbf_get_axis_setting, + cbf_get_axis_type, + cbf_get_axis_vector + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_count_axis_ancestors (cbf_handle handle, const char *axis_id, + unsigned int *ancestors); + + int cbf_get_axis_ancestor (cbf_handle handle, const char *axis_id, const + unsigned int ancestor_index, const char * *ancestor); + + int cbf_get_axis_depends_on (cbf_handle handle, const char *axis_id, + const char * *depends_on); + + int cbf_get_axis_equipment (cbf_handle handle, const char *axis_id, + const char * *equipment); + + int cbf_get_axis_equipment_component (cbf_handle handle, const char + *axis_id, const char * *equipment_component); + + int cbf_get_axis_offset (cbf_handle handle, const char *axis_id, double + *offset1, double *offset2, double *offset3); + + int cbf_get_axis_rotation (cbf_handle handle, const char *axis_id, + double *rotation); + + int cbf_get_axis_rotation_axis (cbf_handle handle, const char *axis_id, + const char * *rotation_axis); + + int cbf_get_axis_setting (cbf_handle handle, unsigned int reserved, + const char *axis_id, double *start, double *increment); + + int cbf_get_axis_type (cbf_handle handle, const char *axis_id, + cbf_axis_type *axis_type); + + int cbf_get_axis_vector (cbf_handle handle, const char *axis_id, double + *vector1, double *vector2, double *vector3); + + DESCRIPTION + + cbf_count_axis_ancestors sets ancestors to the number of ancestors of + axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor axis + of index ancestor_index of axis axis_id, starting with axis_id for + ancestor_index 0. + + cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of + axis_id or to "." if there is no such ancestor. cbf_get_axis_equipment + sets *equipment to the equipment of axis_id or to "." if there is no + such equipment. cbf_get_axis_equipment_component sets + *equipment_component to the equipment_component of axis_id or to "." if + there is no such equipment_component. + + cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the + components of the ofset of axis_id. + + cbf_get_axis_rotation sets rotation to the rotation of axis_id or to 0 + if there is no such rotation. cbf_get_axis_rotation_axis sets + *rotation_axis to the rotation_axis of axis_id or to "." if there is no + such rotation_axis. + + cbf_get_axis_setting sets *start and *increment to the corresponding + values of the axis axis_id. Any of the destination pointers may be NULL. + + cbf_get_axis_type sets axis_type to the type of axis_id. + + cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the + components of the vector of axis_id. + + The parameter reserved is presently unused and should be set to 0. + + ARGUMENTS + + handle CBF handle. + reserved Unused. Any value other than 0 is invalid. + axis_id Axis id. + ancestor_index Integer index of the desired ancestor, starting + with 0 for the current axis_id. + ancestor Pointer to destination ancestor name pointer. + depends_on Pointer to destination depends_on name pointer. + equipment Pointer to destination equipment name pointer. + equipment_component Pointer to destination equipment_component name + pointer. + offset1 Pointer to destination first offset component + value. + offset2 Pointer to destination second offset component + value. + offset3 Pointer to destination third offset component + value. + rotation Pointer to destination rotation value. + rotation_axis Pointer to destination rotation_axisn name + pointer. + start Pointer to the destination start value. + increment Pointer to the destination increment value. + type Pointer to destination axis type of type . + vector1 Pointer to destination first vector component + value. + vector2 Pointer to destination second vector component + value. + vector3 Pointer to destination third vector component + value. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.29 cbf_set_axis_setting + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_set_axis_setting (cbf_handle handle, unsigned int reserved, + const char *axis_id, double start, double increment); + + DESCRIPTION + + cbf_set_axis_setting sets the starting and increment values of the axis + axis_id to start and increment. + + The parameter reserved is presently unused and should be set to 0. + + ARGUMENTS + + handle CBF handle. + reserved Unused. Any value other than 0 is invalid. + axis_id Axis id. + start Start value. + increment Increment value. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.30 cbf_construct_goniometer + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_construct_goniometer (cbf_handle handle, cbf_goniometer + *goniometer); + + DESCRIPTION + + cbf_construct_goniometer constructs a goniometer object using the + description in the CBF object handle and initialises the goniometer + handle *goniometer. + + ARGUMENTS + + handle CBF handle. + goniometer Pointer to the destination goniometer handle. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.31 cbf_free_goniometer + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_free_goniometer (cbf_goniometer goniometer); + + DESCRIPTION + + cbf_free_goniometer destroys the goniometer object specified by + goniometer and frees all associated memory. + + ARGUMENTS + + goniometer Goniometer handle to free. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.32 cbf_get_rotation_axis + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_rotation_axis (cbf_goniometer goniometer, unsigned int + reserved, double *vector1, double *vector2, double *vector3); + + DESCRIPTION + + cbf_get_rotation_axis sets *vector1, *vector2, and *vector3 to the 3 + components of the goniometer rotation axis used for the exposure. + + Any of the destination pointers may be NULL. + + The parameter reserved is presently unused and should be set to 0. + + ARGUMENTS + + goniometer Goniometer handle. + reserved Unused. Any value other than 0 is invalid. + vector1 Pointer to the destination x component of the rotation + axis. + vector2 Pointer to the destination y component of the rotation + axis. + vector3 Pointer to the destination z component of the rotation + axis. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.33 cbf_get_rotation_range + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_rotation_range (cbf_goniometer goniometer, unsigned int + reserved, double *start, double *increment); + + DESCRIPTION + + cbf_get_rotation_range sets *start and *increment to the corresponding + values of the goniometer rotation axis used for the exposure. + + Either of the destination pointers may be NULL. + + The parameter reserved is presently unused and should be set to 0. + + ARGUMENTS + + goniometer Goniometer handle. + reserved Unused. Any value other than 0 is invalid. + start Pointer to the destination start value. + increment Pointer to the destination increment value. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.34 cbf_rotate_vector + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_rotate_vector (cbf_goniometer goniometer, unsigned int reserved, + double ratio, double initial1, double initial2, double initial3, double + *final1, double *final2, double *final3); + + DESCRIPTION + + cbf_rotate_vector sets *final1, *final2, and *final3 to the 3 components + of the of the vector (initial1, initial2, initial3) after reorientation + by applying the goniometer rotations. The value ratio specif ies the + goniometer setting and varies from 0.0 at the beginning of the exposure + to 1.0 at the end, irrespective of the actual rotation range. + + Any of the destination pointers may be NULL. + + The parameter reserved is presently unused and should be set to 0. + + ARGUMENTS + + goniometer Goniometer handle. + reserved Unused. Any value other than 0 is invalid. + ratio Goniometer setting. 0 = beginning of exposure, 1 = end. + initial1 x component of the initial vector. + initial2 y component of the initial vector. + initial3 z component of the initial vector. + final1 Pointer to the destination x component of the final + vector. + final2 Pointer to the destination y component of the final + vector. + final3 Pointer to the destination z component of the final + vector. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.35 cbf_get_reciprocal + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_reciprocal (cbf_goniometer goniometer, unsigned int + reserved, double ratio, double wavelength, double real1, double real2, + double real3, double *reciprocal1, double *reciprocal2, double + *reciprocal3); + + DESCRIPTION + + cbf_get_reciprocal sets *reciprocal1, * reciprocal2, and * reciprocal3 + to the 3 components of the of the reciprocal-space vector corresponding + to the real-space vector (real1, real2, real3). The reciprocal-space + vector is oriented to correspond to the goniometer setting with all axes + at 0. The value wavelength is the wavlength in Å and the value ratio + specifies the current goniometer setting and varies from 0.0 at the + beginning of the exposur e to 1.0 at the end, irrespective of the actual + rotation range. + + Any of the destination pointers may be NULL. + + The parameter reserved is presently unused and should be set to 0. + + ARGUMENTS + + goniometer Goniometer handle. + reserved Unused. Any value other than 0 is invalid. + ratio Goniometer setting. 0 = beginning of exposure, 1 = end. + wavelength Wavelength in Å. + real1 x component of the real-space vector. + real2 y component of the real-space vector. + real3 z component of the real-space vector. + reciprocal1 Pointer to the destination x component of the + reciprocal-space vector. + reciprocal2 Pointer to the destination y component of the + reciprocal-space vector. + reciprocal3 Pointer to the destination z component of the + reciprocal-space vector. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.36 cbf_construct_detector, cbf_construct_reference_detector, + cbf_require_reference_detector + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_construct_detector (cbf_handle handle, cbf_detector *detector, + unsigned int element_number); + + int cbf_construct_reference_detector (cbf_handle handle, cbf_detector + *detector, unsigned int element_number); + + int cbf_require_reference_detector (cbf_handle handle, cbf_detector + *detector, unsigned int element_number); + + DESCRIPTION + + cbf_construct_detector constructs a detector object for detector element + number element_number using the description in the CBF object handle and + initialises the detector handle *detector. + + cbf_construct_reference_detector constructs a detector object for + detector element number element_number using the description in the CBF + object handle and initialises the detector handle *detector using the + reference settings of the axes. cbf_require_reference_detector is + similar, but try to force the creations of missing intermediate + categories needed to construct a detector object. + + ARGUMENTS + + handle CBF handle. + detector Pointer to the destination detector handle. + element_number The number of the detector element counting from 0 by + order of appearance in the "diffrn_data_frame" + category. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.37 cbf_free_detector + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_free_detector (cbf_detector detector); + + DESCRIPTION + + cbf_free_detector destroys the detector object specified by detector and + frees all associated memory. + + ARGUMENTS + + detector Detector handle to free. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.38 cbf_construct_positioner, cbf_construct_reference_positioner, + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_construct_positioner (cbf_handle handle, cbf_positioner + *positioner, const char *axis_id); + + int cbf_construct_reference_positioner (cbf_handle handle, + cbf_positioner *positioner, const char *axis_id); + + DESCRIPTION + + cbf_construct_positioner constructs a positioner object for the axis + given by axis_id using the description in the CBF object handle and + initialises the positioner handle *positioner. + + cbf_construct_reference positioner constructs a positioner object for + the axis given by axis_id using the description in the CBF object handle + and initialises the detector handle *detector using the reference + settings of the axes. + + ARGUMENTS + + handle CBF handle. + positioner Pointer to the destination positioner handle. + axis_id The identifier of the axis in the "axis" category. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.39 cbf_free_positioner + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_free_positioner (cbf_positioner positioner); + + DESCRIPTION + + cbf_free_positioner destroys the positioner object specified by + positioner and frees all associated memory. + + ARGUMENTS + + positioner Positioner handle to free. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.40 cbf_get_beam_center, cbf_get_beam_center_fs, cbf_get_beam_center_sf, + cbf_set_beam_center, cbf_set_beam_center_fs, cbf_set_beam_center_sf, + cbf_set_reference_beam_center, cbf_set_reference_beam_center_fs, + cbf_set_reference_beam_center_sf + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_beam_center (cbf_detector detector, double *indexslow, + double *indexfast, double *centerslow, double *centerfast); + int cbf_get_beam_center_fs (cbf_detector detector, double *indexfast, + double *indexslow, double *centerfast, double *centerslow); + int cbf_get_beam_center_sf (cbf_detector detector, double *indexslow, + double *indexfast, double *centerslow, double *centerfast); + + int cbf_set_beam_center (cbf_detector detector, double *indexslow, + double *indexfast, double *centerslow, double *centerfast); + int cbf_set_beam_center_fs (cbf_detector detector, double *indexfast, + double *indexslow, double *centerfast, double *centerslow); + int cbf_set_beam_center_sf (cbf_detector detector, double *indexslow, + double *indexfast, double *centerslow, double *centerfast); + + int cbf_set_reference_beam_center (cbf_detector detector, double + *indexslow, double *indexfast, double *centerslow, double *centerfast); + int cbf_set_reference_beam_center_fs (cbf_detector detector, double + *indexfast, double *indexslow, double *centerfast, double *centerslow); + int cbf_set_reference_beam_center_sf (cbf_detector detector, double + *indexslow, double *indexfast, double *centerslow, double *centerfast); + + DESCRIPTION + + cbf_get_beam_center sets *centerfast and *centerslow to the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector and *indexfast and + *indexslow to the corresponding indices. cbf_set_beam_center sets the + offsets in the axis category for the detector element axis with + precedence 1 to place the beam center at the position given in mm by + *centerfast and *centerslow as the displacements in mm along the + detector axes from pixel (0, 0) to the point at which the beam + intersects the detector at the indices given *indexfast and *indexslow. + cbf_set_reference_beam_center sets the displacments in the + array_structure_list_axis category to place the beam center at the + position given in mm by *centerfast and *centerslow as the displacements + in mm along the detector axes from pixel (0, 0) to the point at which + the beam intersects the detector at the indices given by *indexfast and + *indexslow. In order to achieve consistent results, a reference detector + should be used for detector to have all axes at their reference + settings. + + Note that the precedence 1 axis is the fastest axis, so that *centerfast + and *indexfast are the fast axis components of the center and + *centerslow and *indexslow are the slow axis components of the center. + + The _fs calls give the displacments in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the displacements in + slow-to-fast order + + Any of the destination pointers may be NULL for getting the beam center. + For setting the beam axis, either the indices of the center must not be + NULL. + + The indices are non-negative for beam centers within the detector + surface, but the center for an axis with a negative increment will be + negative for a beam center within the detector surface. + + For cbf_set_beam_center if the diffrn_data_frame category exists with a + row for the corresponding element id, the values will be set for + _diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in + millimetres and the value of _diffrn_data_frame.center_units will be set + to 'mm'. + + For cbf_set_reference_beam_center if the diffrn_detector_element + category exists with a row for the corresponding element id, the values + will be set for _diffrn_detector_element.reference_center_fast and + _diffrn_detector_element.reference_center_slow in millimetres and the + value of _diffrn_detector_element.reference_units will be set to 'mm'. + + ARGUMENTS + + detector Detector handle. + indexfast Pointer to the destination fast index. + indexslow Pointer to the destination slow index. + centerfast Pointer to the destination displacement along the fast + axis. + centerslow Pointer to the destination displacement along the slow + axis. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.41 cbf_get_detector_distance + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_detector_distance (cbf_detector detector, double *distance); + + DESCRIPTION + + cbf_get_detector_distance sets *distance to the nearest distance from + the sample position to the detector plane. + + ARGUMENTS + + detector Detector handle. + distance Pointer to the destination distance. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.42 cbf_get_detector_normal + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_detector_normal (cbf_detector detector, double *normal1, + double *normal2, double *normal3); + + DESCRIPTION + + cbf_get_detector_normal sets *normal1, *normal2, and *normal3 to the 3 + components of the of the normal vector to the detector plane. The vector + is normalized. + + Any of the destination pointers may be NULL. + + ARGUMENTS + + detector Detector handle. + normal1 Pointer to the destination x component of the normal + vector. + normal2 Pointer to the destination y component of the normal + vector. + normal3 Pointer to the destination z component of the normal + vector. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.43 cbf_get_detector_axis_slow, cbf_get_detector_axis_fast, + cbf_get_detector_axes, cbf_get_detector_axes_fs, cbf_get_detector_axes_sf, + cbf_get_detector_surface_axes + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_detector_axis_slow (cbf_detector detector, double + *slowaxis1, double *slowaxis2, double *slowaxis3); + int cbf_get_detector_axis_fast (cbf_detector detector, double + *fastaxis1, double *fastaxis2, double *fastaxis3); + int cbf_get_detector_axes (cbf_detector detector, double *slowaxis1, + double *slowaxis2, double *slowaxis3, double *fastaxis1, double + *fastaxis2, double *fastaxis3); + int cbf_get_detector_axes_fs (cbf_detector detector, double *fastaxis1, + double *fastaxis2, double *fastaxis3, double *slowaxis1, double + *slowaxis2, double *slowaxis3); + int cbf_get_detector_axes_sf (cbf_detector detector, double *slowaxis1, + double *slowaxis2, double *slowaxis3, double *fastaxis1, double + *fastaxis2, double *fastaxis3); + int cbf_get_detector_surface_axes(cbf_detector detector, const char * * + axis_id1, const char * * axis_id2); + + DESCRIPTION + + cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and *slowaxis3 + to the 3 components of the slow axis of the specified detector at the + current settings of all axes. cbf_get_detector_axis_slow sets + *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 components of the fast + axis of the specified detector at the current settings of all axes. + cbf_get_detector_axes, cbf_get_detector_axes_fs and int + cbf_get_detector_axes_sf set *slowaxis1, *slowaxis2, and *slowaxis3 to + the 3 components of the slow axis and *fastaxis1, *fastaxis2, and + *fastaxis3 to the 3 components of the fast axis of the specified + detector at the current settings of all axes. + cbf_get_detector_surface_axes sets *axis_id1 and *axis_id2 to the names + of the two surface axes of the detector or ".", + + Any of the destination pointers may be NULL. + + ARGUMENTS + + detector Detector handle. + slowaxis1 Pointer to the destination x component of the slow axis + vector. + slowaxis2 Pointer to the destination y component of the slow axis + vector. + slowaxis3 Pointer to the destination z component of the slow axis + vector. + fastaxis1 Pointer to the destination x component of the fast axis + vector. + fastaxis2 Pointer to the destination y component of the fast axis + vector. + fastaxis3 Pointer to the destination z component of the fast axis + vector. + axis_id1 Pointer to the destination first surface axis name. + axis_id2 Pointer to the destination second surface axis name. + axis_id3 Pointer to the destination third surface axis name. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.44 cbf_get_pixel_coordinates, cbf_get_pixel_coordinates_fs, + cbf_get_pixel_coordinates_sf + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_pixel_coordinates (cbf_detector detector, double indexslow, + double indexfast, double *coordinate1, double *coordinate2, double + *coordinate3); + int cbf_get_pixel_coordinates_fs (cbf_detector detector, double + indexfast, double indexslow, double *coordinate1, double *coordinate2, + double *coordinate3); + int cbf_get_pixel_coordinates_sf (cbf_detector detector, double + indexslow, double indexfast, double *coordinate1, double *coordinate2, + double *coordinate3); + + DESCRIPTION + + cbf_get_pixel_coordinates, cbf_get_pixel_coordinates_fs and + cbf_get_pixel_coordinates_sf ses *coordinate1, *coordinate2, and + *coordinate3 to the vector position of pixel (indexfast, indexslow) on + the detector surface. If indexslow and indexfast are integers then the + coordinates correspond to the center of a pixel. + + Any of the destination pointers may be NULL. + + ARGUMENTS + + detector Detector handle. + indexslow Slow index. + indexfast Fast index. + coordinate1 Pointer to the destination x component. + coordinate2 Pointer to the destination y component. + coordinate3 Pointer to the destination z component. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.45 cbf_get_pixel_normal, cbf_get_pixel_normal_fs, + cbf_get_pixel_normal_sf + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_pixel_normal (cbf_detector detector, double indexslow, + double indexfast, double *normal1, double *normal2, double *normal3); + int cbf_get_pixel_normal_fs (cbf_detector detector, double indexfast, + double indexslow, double *normal1, double *normal2, double *normal3); + int cbf_get_pixel_normal (cbf_detector detector, double indexslow, + double indexfast, double *normal1, double *normal2, double *normal3); + + DESCRIPTION + + cbf_get_detector_normal, cbf_get_pixel_normal_fs and + cbf_get_pixel_normal_sf set *normal1, *normal2, and *normal3 to the 3 + components of the of the normal vector to the pixel at (indexfast, + indexslow). The vector is normalized. + + Any of the destination pointers may be NULL. + + ARGUMENTS + + detector Detector handle. + indexslow Slow index. + indexfast Fast index. + normal1 Pointer to the destination x component of the normal + vector. + normal2 Pointer to the destination y component of the normal + vector. + normal3 Pointer to the destination z component of the normal + vector. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.46 cbf_get_pixel_area, cbf_get_pixel_area_fs, cbf_get_pixel_area_sf + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_pixel_area (cbf_detector detector, double indexslow, double + indexfast, double *area, double *projected_area); + int cbf_get_pixel_area_fs(cbf_detector detector, double indexfast, + double indexslow, double *area, double *projected_area); + int cbf_get_pixel_area_sf(cbf_detector detector, double indexslow, + double indexfast, double *area, double *projected_area); + + DESCRIPTION + + cbf_get_pixel_area, cbf_get_pixel_area_fs and cbf_get_pixel_area_sf set + *area to the area of the pixel at (indexfast, indexslow) on the detector + surface and *projected_area to the apparent area of the pixel as viewed + from the sample position, with indexslow being the slow axis and + indexfast being the fast axis. + + Either of the destination pointers may be NULL. + + ARGUMENTS + + detector Detector handle. + indexfast Fast index. + indexslow Slow index. + area Pointer to the destination area in mm2. + projected_area Pointer to the destination apparent area in mm2. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.47 cbf_get_pixel_size, cbf_get_pixel_size_fs, cbf_get_pixel_size_sf + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_pixel_size (cbf_handle handle, unsigned int element_number, + int axis_number, double *psize); + int cbf_get_pixel_size_fs(cbf_handle handle, unsigned int + element_number, int axis_number, double *psize); + int cbf_get_pixel_size_sf(cbf_handle handle, unsigned int + element_number, int axis_number, double *psize); + + DESCRIPTION + + cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to the + double value in millimeters of the axis axis_number of the detector + element element_number. The axis_number is numbered from 1, starting + with the slowest axis. cbf_get_pixel_size_fs sets *psize to point to the + double value in millimeters of the axis axis_number of the detector + element element_number. The axis_number is numbered from 1, starting + with the fastest axis. + + If a negative axis number is given, the order of axes is reversed, so + that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the + fastest axis for cbf_get_pixel_size_sf. + + If the pixel size is not given explcitly in the "array_element_size" + category, the function returns CBF_NOTFOUND. + + ARGUMENTS + + handle CBF handle. + element_number The number of the detector element counting from 0 by + order of appearance in the "diffrn_data_frame" + category. + axis_number The number of the axis, starting from 1 for the + fastest for cbf_get_pixel_size and + cbf_get_pixel_size_fs and the slowest for + cbf_get_pixel_size_sf. + psize Pointer to the destination pixel size. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.48 cbf_set_pixel_size, cbf_set_pixel_size_fs, cbf_set_pixel_size_sf + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_set_pixel_size (cbf_handle handle, unsigned int element_number, + int axis_number, double psize); + int cbf_set_pixel_size_fs(cbf_handle handle, unsigned int + element_number, int axis_number, double psize); + int cbf_set_pixel_size_sf(cbf_handle handle, unsigned int + element_number, int axis_number, double psize); + + DESCRIPTION + + cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the "size" + column of the "array_structure_list" category at the row which matches + axis axis_number of the detector element element_number converting the + double pixel size psize from meters to millimeters in storing it in the + "size" column for the axis axis_number of the detector element + element_number. The axis_number is numbered from 1, starting with the + slowest axis. cbf_set_pixel_size_fs sets the item in the "size" column + of the "array_structure_list" category at the row which matches axis + axis_number of the detector element element_number converting the double + pixel size psize from meters to millimeters in storing it in the "size" + column for the axis axis_number of the detector element element_number. + The axis_number is numbered from 1, starting with the fastest axis. + + If a negative axis number is given, the order of axes is reversed, so + that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the + fastest axis for cbf_get_pixel_size_sf. + + If the "array_structure_list" category does not already exist, it is + created. + + If the appropriate row in the "array_structure_list" catgeory does not + already exist, it is created. + + If the pixel size is not given explcitly in the "array_element_size + category", the function returns CBF_NOTFOUND. + + ARGUMENTS + + handle CBF handle. + element_number The number of the detector element counting from 0 by + order of appearance in the "diffrn_data_frame" + category. + axis_number The number of the axis, fastest first, starting from + 1. + psize The pixel size in millimeters. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.49 cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_fs, + cbf_get_inferred_pixel_size_sf + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_inferred_pixel_size (cbf_detector detector, int axis_number, + double *psize); + int cbf_get_inferred_pixel_size_fs(cbf_detector detector, int + axis_number, double *psize); + int cbf_get_inferred_pixel_size_sf(cbf_detector detector, int + axis_number, double *psize); + + DESCRIPTION + + cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_sf set *psize + to point to the double value in millimeters of the pixel size for the + axis axis_number value. The slow index is treated as axis 1 and the next + faster index is treated as axis 2. cbf_get_inferred_pixel_size_fs sets + *psize to point to the double value in millimeters of the pixel size for + the axis axis_number value. The fast index is treated as axis 1 and the + next slower index is treated as axis 2. + + If the axis number is negative, the axes are used in the reverse order + so that an axis_number of -1 indicates the fast axes in a call to + cbf_get_inferred_pixel_size or cbf_get_inferred_pixel_size_sf and + indicates the fast axis in a call to cbf_get_inferred_pixel_size_fs. + + ARGUMENTS + + detector Detector handle. + axis_number The number of the axis. + psize Pointer to the destination pizel size in mm. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.50 cbf_get_unit_cell + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_unit_cell (cbf_handle handle, double cell[6], double + cell_esd[6] ); + + DESCRIPTION + + cbf_get_unit_cell sets cell[0:2] to the double values of the cell edge + lengths a, b and c in Ångstroms, cell[3:5] to the double values of the + cell angles α, β and γ in degrees, cell_esd[0:2] to the double values of + the estimated strandard deviations of the cell edge lengths a, b and c + in Ångstroms, cell_esd[3:5] to the double values of the estimated + standard deviations of the the cell angles α, β and γ in degrees. + + The values returned are retrieved from the first row of the "cell" + category. The value of "_cell.entry_id" is ignored. + + cell or cell_esd may be NULL. + + If cell is NULL, the cell parameters are not retrieved. + + If cell_esd is NULL, the cell parameter esds are not retrieved. + + If the "cell" category is present, but some of the values are missing, + zeros are returned for the missing values. + + ARGUMENTS + + handle CBF handle. + cell Pointer to the destination array of 6 doubles for the cell + parameters. + cell_esd Pointer to the destination array of 6 doubles for the cell + parameter esds. + + RETURN VALUE + + Returns an error code on failure or 0 for success. No errors is returned + for missing values if the "cell" category exists. + + SEE ALSO + + 2.4.51 cbf_set_unit_cell + 2.4.52 cbf_get_reciprocal_cell + 2.4.53 cbf_set_reciprocal_cell + 2.4.54 cbf_compute_cell_volume + 2.4.55 cbf_compute_reciprocal_cell + + ---------------------------------------------------------------------- + + 2.4.51 cbf_set_unit_cell + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_set_unit_cell (cbf_handle handle, double cell[6], double + cell_esd[6] ); + + DESCRIPTION + + cbf_set_unit_cell sets the cell parameters to the double values given in + cell[0:2] for the cell edge lengths a, b and c in Ångstroms, the double + values given in cell[3:5] for the cell angles α, β and γ in degrees, the + double values given in cell_esd[0:2] for the estimated strandard + deviations of the cell edge lengths a, b and c in Ångstroms, and the + double values given in cell_esd[3:5] for the estimated standard + deviations of the the cell angles α, β and γ in degrees. + + The values are placed in the first row of the "cell" category. If no + value has been given for "_cell.entry_id", it is set to the value of the + "diffrn.id" entry of the current data block. + + cell or cell_esd may be NULL. + + If cell is NULL, the cell parameters are not set. + + If cell_esd is NULL, the cell parameter esds are not set. + + If the "cell" category is not present, it is created. If any of the + necessary columns are not present, they are created. + + ARGUMENTS + + handle CBF handle. + cell Pointer to the array of 6 doubles for the cell parameters. + cell_esd Pointer to the array of 6 doubles for the cell parameter + esds. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.4.50 cbf_get_unit_cell + 2.4.52 cbf_get_reciprocal_cell + 2.4.53 cbf_set_reciprocal_cell + 2.4.54 cbf_compute_cell_volume + 2.4.55 cbf_compute_reciprocal_cell + + ---------------------------------------------------------------------- + + SEE ALSO + + 2.4.52 cbf_get_reciprocal_cell + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_reciprocal_cell (cbf_handle handle, double cell[6], double + cell_esd[6] ); + + DESCRIPTION + + cbf_get_reciprocal_cell sets cell[0:2] to the double values of the + reciprocal cell edge lengths a^*, b^* and c^* in Ångstroms^-1, cell[3:5] + to the double values of the reciprocal cell angles α^*, β^* and γ^* in + degrees, cell_esd[0:2] to the double values of the estimated strandard + deviations of the reciprocal cell edge lengths a^*, b^* and c^* in + Ångstroms^-1, cell_esd[3:5] to the double values of the estimated + standard deviations of the the reciprocal cell angles α^*, β^* and γ^* + in degrees. + + The values returned are retrieved from the first row of the "cell" + category. The value of "_cell.entry_id" is ignored. + + cell or cell_esd may be NULL. + + If cell is NULL, the reciprocal cell parameters are not retrieved. + + If cell_esd is NULL, the reciprocal cell parameter esds are not + retrieved. + + If the "cell" category is present, but some of the values are missing, + zeros are returned for the missing values. + + ARGUMENTS + + handle CBF handle. + cell Pointer to the destination array of 6 doubles for the + reciprocal cell parameters. + cell_esd Pointer to the destination array of 6 doubles for the + reciprocal cell parameter esds. + + RETURN VALUE + + Returns an error code on failure or 0 for success. No errors is returned + for missing values if the "cell" category exists. + + SEE ALSO + + 2.4.50 cbf_get_unit_cell + 2.4.51 cbf_set_unit_cell + 2.4.53 cbf_set_reciprocal_cell + 2.4.54 cbf_compute_cell_volume + 2.4.55 cbf_compute_reciprocal_cell + + ---------------------------------------------------------------------- + + 2.4.53 cbf_set_reciprocal_cell + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_set_reciprocal_cell (cbf_handle handle, double cell[6], double + cell_esd[6] ); + + DESCRIPTION + + cbf_set_reciprocal_cell sets the reciprocal cell parameters to the + double values given in cell[0:2] for the reciprocal cell edge lengths + a^*, b^* and c^* in Ångstroms^-1, the double values given in cell[3:5] + for the reciprocal cell angles α^*, β^* and γ^* in degrees, the double + values given in cell_esd[0:2] for the estimated strandard deviations of + the reciprocal cell edge lengths a^*, b^* and c^* in Ångstroms, and the + double values given in cell_esd[3:5] for the estimated standard + deviations of the reciprocal cell angles α^*, β^* and γ^* in degrees. + + The values are placed in the first row of the "cell" category. If no + value has been given for "_cell.entry_id", it is set to the value of the + "diffrn.id" entry of the current data block. + + cell or cell_esd may be NULL. + + If cell is NULL, the reciprocal cell parameters are not set. + + If cell_esd is NULL, the reciprocal cell parameter esds are not set. + + If the "cell" category is not present, it is created. If any of the + necessary columns are not present, they are created. + + ARGUMENTS + + handle CBF handle. + cell Pointer to the array of 6 doubles for the reciprocal cell + parameters. + cell_esd Pointer to the array of 6 doubles for the reciprocal cell + parameter esds. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.4.50 cbf_get_unit_cell + 2.4.51 cbf_set_unit_cell + 2.4.52 cbf_get_reciprocal_cell + 2.4.54 cbf_compute_cell_volume + 2.4.55 cbf_compute_reciprocal_cell + + ---------------------------------------------------------------------- + + 2.4.54 cbf_compute_cell_volume + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_compute_cell_volume ( double cell[6], double *volume ); + + DESCRIPTION + + cbf_compute_cell_volume sets *volume to point to the volume of the unit + cell computed from the double values in cell[0:2] for the cell edge + lengths a, b and c in Ångstroms and the double values given in cell[3:5] + for the cell angles α, β and γ in degrees. + + ARGUMENTS + + cell Pointer to the array of 6 doubles giving the cell parameters. + volume Pointer to the doubles for cell volume. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.4.50 cbf_get_unit_cell + 2.4.51 cbf_set_unit_cell + 2.4.52 cbf_get_reciprocal_cell + 2.4.53 cbf_set_reciprocal_cell + 2.4.55 cbf_compute_reciprocal_cell + + ---------------------------------------------------------------------- + + 2.4.55 cbf_compute_reciprocal_cell + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_compute_reciprocal_cell ( double cell[6], double rcell[6] ); + + DESCRIPTION + + cbf_compute_reciprocal_cell sets rcell to point to the array of + reciprocal cell parameters computed from the double values cell[0:2] + giving the cell edge lengths a, b and c in Ångstroms, and the double + values cell[3:5] giving the cell angles α, β and γ in degrees. The + double values rcell[0:2] will be set to the reciprocal cell lengths a^*, + b^* and c^* in Ångstroms^-1 and the double values rcell[3:5] will be set + to the reciprocal cell angles α^*, β^* and γ^* in degrees. + + ARGUMENTS + + cell Pointer to the array of 6 doubles giving the cell parameters. + rcell Pointer to the destination array of 6 doubles giving the + reciprocal cell parameters. + volume Pointer to the doubles for cell volume. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + SEE ALSO + + 2.4.50 cbf_get_unit_cell + 2.4.51 cbf_set_unit_cell + 2.4.52 cbf_get_reciprocal_cell + 2.4.53 cbf_set_reciprocal_cell + 2.4.54 cbf_compute_cell_volume + + ---------------------------------------------------------------------- + + 2.4.56 cbf_get_orientation_matrix, cbf_set_orientation_matrix + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_orientation_matrix (cbf_handle handle, double ub_matrix[9]); + int cbf_set_orientation_matrix (cbf_handle handle, double ub_matrix[9]); + + DESCRIPTION + + cbf_get_orientation_matrix sets ub_matrix to point to the array of + orientation matrix entries in the "diffrn" category in the order of + columns: + + "UB[1][1]" "UB[1][2]" "UB[1][3]" + "UB[2][1]" "UB[2][2]" "UB[2][3]" + "UB[3][1]" "UB[3][2]" "UB[3][3]" + + cbf_set_orientation_matrix sets the values in the "diffrn" category to + the values pointed to by ub_matrix. + + ARGUMENTS + + handle CBF handle. + ub_matrix Source or destination array of 9 doubles giving the + orientation matrix parameters. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.57 cbf_get_bin_sizes, cbf_set_bin_sizes + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_bin_sizes(cbf_handle handle, unsigned int element_number, + double * slowbinsize, double * fastbinsize); + int cbf_set_bin_sizes(cbf_handle handle, unsigned int element_number, + double slowbinsize_in,double fastbinsize_in); + + DESCRIPTION + + cbf_get_bin_sizes sets slowbinsize to point to the value of the number + of pixels composing one array element in the dimension that changes at + the second-fastest rate and fastbinsize to point to the value of the + number of pixels composing one array element in the dimension that + changes at the fastest rate for the dectector element with the ordinal + element_number. cbf_set_bin_sizes sets the the pixel bin sizes in the + "array_intensities" category to the values of slowbinsize_in for the + number of pixels composing one array element in the dimension that + changes at the second-fastest rate and fastbinsize_in for the number of + pixels composing one array element in the dimension that changes at the + fastest rate for the dectector element with the ordinal element_number. + + In order to allow for software binning involving fractions of pixels, + the bin sizes are doubles rather than ints. + + ARGUMENTS + + handle CBF handle. + element_number The number of the detector element counting from 0 by + order of appearance in the "diffrn_data_frame" + category. + slowbinsize Pointer to the returned number of pixels composing + one array element in the dimension that changes at the + second-fastest rate. + fastbinsize Pointer to the returned number of pixels composing + one array element in the dimension that changes at the + fastest rate. + slowbinsize_in The number of pixels composing one array element in + the dimension that changes at the second-fastest rate. + fastbinsize_in The number of pixels composing one array element in + the dimension that changes at the fastest rate. + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.58 cbf_get_axis_poise, cbf_get_goniometer_poise, + cbf_get_axis_reference_poise + + PROTOTYPE + + #include "cbf_simple.h" + + int cbf_get_axis_poise(cbf_handle handle, double ratio, double * + vector1, double * vector2, double * vector3, double * offset1, double * + offset2, double * offset3, double * angle, const char * axis_id, const + char * frame_id); + int cbf_get_goniometer_poise(cbf_goniometer goniometer, double ratio, + double * vector1, double * vector2, double * vector3, double * offset1, + double * offset2, double * offset3, double * angle); + int cbf_get_axis_reference_poise(cbf_handle handle, double * vector1, + double * vector2, double * vector3, double * offset1, double * offset2, + double * offset3, const char * axis_id); + + DESCRIPTION + + cbf_get_axis_poise sets vector1, vector2, vector3 to point to the + components of the axis vector for axis axis_id, offset1, offset2, + offset3 to point to the components of the axis base offset vector for + axis axis_id, and angle to point to the angle of rotation of axis + axis_id after application of the axis settings for frame frame_id, using + ratio, a value between 0 and 1, indicating how far into the internal + motion in the frame to go. If frame_id is the string ".", the first + frame found is used. If there is more than one frame, which frame will + be found is indeterminate. If frame_id is NULL, the overall setting for + the scan are used, rather than those for any particular frame. The + vector and offset reported are the reference vector and offset of the + axis axis_id transformed by application of all motions of the axes on + which axis_id depends. + + cbf_get_goniometer_poise vector1, vector2, vector3 to point to the + components of the axis vector for the goniometer axis, offset1, offset2, + offset3 to point to the components of the axis base offset vector for + the goniometer axis, and angle to point to the angle of rotation of the + goniometer axis after application of all axis settings in the goniometer + deriving the vector, offset and angle from the resulting matrix. + Calculation of the vector is indeterminate if the angle is zero. + + cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point to + the components of the axis vector for axis axis_id, offset1, offset2, + offset3 to point to the components of the axis base offset vector for + axis axis_id unmodified by axis rotations. Any of the pointers may be + specified as NULL. + + ARGUMENTS + + handle CBF handle. + ratio A number between 0 and 1 indication how far into the + frame to go + vector1 Pointer to the first component of the axis vector + vector2 Pointer to the second component of the axis vector + vector3 Pointer to the third component of the axis vector + offset1 Pointer to the first component of the axis offset + offset2 Pointer to the second component of the axis offset + offset3 Pointer to the third component of the axis offset + angle Pointer to the rotation angle + axis_id The specified axis + frame_id The specified frame + positioner CBF goniometer + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.4.59 cbf_airy_disk, cbf_airy_disk_volume + + PROTOTYPE + + #include "cbf_airy_disk.h" + + int cbf_airy_disk(double x, double y, double cenx, double ceny, double + volume, double fwhm, double * value); + int cbf_airy_disk_volume(double xlo, double ylo, double xhi, double yhi, + double cenx, double ceny, double volume, double fwhm, double * + volumeout); + + DESCRIPTION + + cbf_airy_disk sets value to point to the value taken at (x,y) of an + truncated Airy function approximation to a point-spread function of + total included volume volume and full width at half max fwhm centered on + (cenx, ceny). + + cbf_airy_disk_volume sets to point to the integral in the box with + diagonal corners (xlo, ylo) and of (xhi, yhi) of a truncated Airy + function approximation to a point-spread function of total included + volume volume and full width at half max fwhm centered on (cenx, ceny). + + The Airy function used is an 8-digit approximation up to the first + minimum, after which it is forced to zero, so it cannot be used to + simulate diffraction rings. + + ARGUMENTS + + x the x-coordinate of a point in the real plane + y the y-coordinate of a point in the real plane + xlo the x-coordinate of a point in the real plane marking the + left bound of integration + ylo the y-coordinate of a point in the real plane marking the + bottom bound of integration + xhi the x-coordinate of a point in the real plane marking the + right bound of integration + yhi the y-coordinate of a point in the real plane marking the + top bound of integration + cenx the x-coordinate of a point in the real plane marking the + PSF center + ceny the y-coordinate of a point in the real plane marking the + PSF center + volume the total volume of the PSF + fwhm the full-width at half max of the PSF + value Pointer to the value of the Airy function + volumeout Pointer to the value of the integral/TR> + + RETURN VALUE + + Returns an error code on failure or 0 for success. + + ---------------------------------------------------------------------- + + 2.5 F90 function interfaces + + At the suggestion of W. Kabsch, Fortran 90/95 routines have been added + to CBFlib. As of this writing code has been written to allow the reading + of CBF_BYTE_OFFSET, CBF_PACKED and CBF_PACKED_V2 binary images. This + code has been gather into FCBlib (Fortran Crystallographic Binary + library) as lib/libfcb. + + In general, most of the FCBlib functions return 0 for normal completion + and a non-zero value in case of an error. In a few cases, such as + FCB_ATOL_WCNT and FCB_NBLEN_ARRAY in order to conform to the conventions + for commonly used C-equivalent functions, the function return is the + value being computed. + + For each function, an interface is given to be included in the + declarations of your Fortran 90/95 code. Some functions in FCBlIB are + not intended for external use and are subject to change: + FCB_UPDATE_JPA_POINTERS_I2, FCB_UPDATE_JPA_POINTERS_I4, + FCB_UPDATE_JPA_POINTERS_3D_I2, FCB_UPDATE_JPA_POINTERS_3D_I4 and + CNT2PIX. These names should not be used for user routines. + + The functions involving reading of a CBF have been done strictly in + Fortran without the use of C code. This has required some compromises + and the use of direct access I/O. Rather than putting the buffer and its + control variables into COMMON these are passed as local arguments to + make the routines inherently 'threadsafe' in a parallel programming + environment. Note also, that a reading error could occur for the last + record if it does not fill a full block. The code is written to recover + from end-of-record and end-of-file errors, if possible. On many modern + system, no special action is required, but on some systems it may be + necessary to make use of the padding between the end of binary data and + the terminal MIME boundary marker in binary sections. To ensure maximum + portability of CBF files, a padding of 4095 bytes is recommended. + Existing files without padding can be converted to files with padding by + use of the new -p4 option for cif2cbf. + + 2.5.1 FCB_ATOL_WCNT + + INTERFACE + INTEGER(8) FUNCTION FCB_ATOL_WCNT(ARRAY, N, CNT) + INTEGER(1),INTENT(IN):: ARRAY(N) + INTEGER, INTENT(IN):: N + INTEGER, INTENT(OUT):: CNT + END FUNCTION + END INTERFACE + + FCB_ATOL_WCNT converts INTEGER(1) bytes in ARRAY of N bytes to an + INTEGER(8) value returned as the function value. The number of bytes of + ARRAY actually used before encountering a character not used to form the + number is returned in CNT. + + The scan stops at the first byte in ARRAY that cannot be properly parsed + as part of the integer result. + + ARGUMENTS + + ARRAY The array of INTEGER(1) bytes to be scanned + N The INTEGER size of ARRAY + CNT The INTEGER size of the portion of ARRAY scanned. + + RETURN VALUE + + Returns the INTEGER(8) value derived from the characters ARRAY(1:CNT) + scanned. + + ---------------------------------------------------------------------- + + 2.5.2 FCB_CI_STRNCMPARR + + INTERFACE + INTEGER FUNCTION FCB_CI_STRNCMPARR(STRING>, ARRAY, N, LIMIT) + CHARACTER(LEN=*),INTENT(IN):: STRING> + INTEGER, INTENT(IN):: N, LIMIT + INTEGER(1), INTENT(IN):: ARRAY(N) + END FUNCTION + END INTERFACE + + The function FCB_CI_STRNCMPARR compares up to LIMIT characters of + character string STRING and INTEGER(1) byte array ARRAY of dimension N + in a case-insensitive manner, returning 0 for a match. + + ARGUMENTS + + STRING A character string + ARRAY The array of INTEGER(1) bytes to be scanned + N The INTEGER size of ARRAY + N The INTEGER limit on the number of characters to consider in + the comparison + + RETURN VALUE + + Returns 0 if the string and array match, a non-zero value otherwise. + + ---------------------------------------------------------------------- + + 2.5.3 FCB_EXIT_BINARY + + INTERFACE + INTEGER FUNCTION FCB_EXIT_BINARY(TAPIN,LAST_CHAR,FCB_BYTES_IN_REC,& + BYTE_IN_FILE,REC_IN_FILE,BUFFER, & + PADDING ) + INTEGER, INTENT(IN) :: TAPIN,FCB_BYTES_IN_REC + INTEGER, INTENT(INOUT):: BYTE_IN_FILE,REC_IN_FILE + INTEGER(1),INTENT(INOUT):: LAST_CHAR,BUFFER(FCB_BYTES_IN_REC) + INTEGER(8),INTENT(IN) :: PADDING + END FUNCTION + END INTERFACE + + The function FCB_EXIT_BINARY is used to skip from the end of a binary + section past any padding to the end of the text section that encloses + the binary section. The values of the arguments must be consistent with + those in the last call to FCB_NEXT_BINARY + + ARGUMENTS + + TAPIN The INTEGER Fortran device unit number assigned to + image file. + LAST_CHAR The last character (as an INTEGER(1) byte) read. + FCB_BYTES_IN_REC The INTEGER number of bytes in a record. + BYTE_IN_FILE The INTEGER byte (counting from 1) of the byte to + read. + REC_IN_FILE The INTEGER record number (counting from 1) of next + record to read. + BUFFER The INTEGER(1) array of length FCB_BYTES_IN_REC to + hold the appropriate record from TAPIN + PADDING The INTEGER(8) number of bytes of padding after the + binary data and before the closing MIME boundary. + + RETURN VALUE + + Returns 0 if the function is successful. Returns whatever non-zero error + value is reported by FCB_READ_LINE if a necessary next line cannot be + read. + + SEE ALSO + + 2.5.5 FCB_NEXT_BINARY + 2.5.6 FCB_OPEN_CIFIN + 2.5.9 FCB_READ_BYTE + 2.5.11 FCB_READ_LINE + + ---------------------------------------------------------------------- + + 2.5.4 FCB_NBLEN_ARRAY + + INTERFACE + INTEGER FUNCTION FCB_NBLEN_ARRAY(ARRAY, ARRAYLEN) + INTEGER, INTENT(IN):: ARRAYLEN + INTEGER(1), INTENT(IN):: ARRAY(ARRAYLEN) + END FUNCTION + END INTERFACE + + The function FCB_NBLEN_ARRAY returns the trimmed length of the + INTEGER(1) byte array ARRAY of dimension ARRAYLEN after removal of + trailing ASCII blanks, horizontal tabs (Z'09'), newlines (Z'0A') and + carriage returns (Z'0D'). The resulting length may be zero. + + The INTEGER trimmed length is returned as the function value. + + ARGUMENTS + + ARRAY The array of bytes for which the trimmed length is + required. + ARRAYLEN The dimension of the array of bytes to be scanned. + + RETURN VALUE + + Returns the trimmed length of the array ARRAY. + + ---------------------------------------------------------------------- + + 2.5.5 FCB_NEXT_BINARY + + INTERFACE + INTEGER FUNCTION FCB_NEXT_BINARY(TAPIN,LAST_CHAR,FCB_BYTES_IN_REC,& + BYTE_IN_FILE,REC_IN_FILE,BUFFER, & + ENCODING,SIZE,ID,DIGEST, & + COMPRESSION,BITS,VORZEICHEN,REELL,& + BYTEORDER,DIMOVER,DIM1,DIM2,DIM3, & + PADDING ) + INTEGER, INTENT(IN) :: TAPIN,FCB_BYTES_IN_REC + INTEGER, INTENT(INOUT):: BYTE_IN_FILE,REC_IN_FILE + INTEGER(1),INTENT(INOUT):: LAST_CHAR,BUFFER(FCB_BYTES_IN_REC) + INTEGER, INTENT(OUT) :: ENCODING + INTEGER, INTENT(OUT) :: SIZE !Binary size + INTEGER, INTENT(OUT) :: ID !Binary ID + CHARACTER(len=*),INTENT(OUT):: DIGEST !Message digest + INTEGER, INTENT(OUT):: COMPRESSION + INTEGER, INTENT(OUT):: BITS,VORZEICHEN,REELL + CHARACTER(len=*),INTENT(OUT):: BYTEORDER + INTEGER(8), INTENT(OUT):: DIMOVER + INTEGER(8), INTENT(OUT):: DIM1 + INTEGER(8), INTENT(OUT):: DIM2 + INTEGER(8), INTENT(OUT):: DIM3 + INTEGER(8), INTENT(OUT):: PADDING + END FUNCTION + END INTERFACE + + The function FCB_NEXT_BINARY skips to the start of the next binary + section in the image file on unit TAPIN leaving the file positioned for + a subsequent read of the image data. The skip may prior to the text + field that contains the binary section. When the text filed is reached, + it will be scanned for a MIME boundary marker, and, if it is found the + subsequence MIME headers will be used to populate the arguments + ENCODING, SIZE, ID, DIGEST, COMPRESSION, BITS, VORZEICHEN,REELL, + BYTEORDER, DIMOVER, DIM1, DIM2,DIM3, PADDING. + + The value returned in ENCODING is taken from the MIME header + Content-Transfer-Encoding as an INTEGER. It is returned as 0 if not + specified. The reported value is one of the integer values ENC_NONE + (Z'0001') for BINARY encoding, ENC_BASE64 (Z'0002') for BASE64 encoding, + ENC_BASE32K (Z'0004') for X-BASE32K encoding, ENC_QP (Z'0008') for + QUOTED-PRINTABLE encoding, ENC_BASE10 (Z'0010') for BASE10 encoding, + ENC_BASE16 (Z'0020') for BASE16 encoding or ENC_BASE8 (Z'0040') for + BASE8 encoding. At this time FCBlib only supports ENC_NONE BINARY + encoding. + + The value returned in SIZE is taken from the MIME header X-Binary-Size + as an INTEGER. It is returned as 0 if not specified. + + The value returned in ID is taken from the MIME header X-Binary-ID as an + INTEGER. It is returned as 0 if not specified. + + The value returned in DIGEST is taken from the MIME header Content-MD5. + It is returned as a character string. If no digest is given, an empty + string is returned. + + The value returned in COMPRESSION is taken from the MIME header + Content-Type in the conversions parameter. The reported value is one of + the INTEGER values CBF_CANONICAL (Z'0050'), CBF_PACKED (Z'0060'), + CBF_PACKED_V2 (Z'0090'), CBF_BYTE_OFFSET (Z'0070'), CBF_PREDICTOR + (Z'0080'), CBF_NONE (Z'0040'). Two flags may be combined with CBF_PACKED + or CBF_PACKED_V2: CBF_UNCORRELATED_SECTIONS (Z'0100') or CBF_FLAT_IMAGE + (Z'0200'). At this time FCBlib does not support CBF_PREDICTOR or + CBF_NONE compression. + + The values returned in BITS, VORZEICHEN and REELL are the parameters of + the data types of the elements. These values are taken from the MIME + header X-Binary-Element-Type, which has values of the form "signed + BITS-bit integer", "unsigned BITS-bit integer", "signed BITS-bit real + IEEE" or "signed BITS-bit complex IEEE". If no value is given, REELL is + reported as -1. If the value in one of the integer types, REELL is + reported as 0. If the value is one of the real or complex types, REELL + is reported as 1. In the current release of FCBlib only the integer + types for BITS equal to 16 or 32 are supported. + + The value returned in BYTEORDER is the byte order of the data in the + image file as reported in the MIME header. The value, if specified, will + be either the character string "LITTLE_ENDIAN" or the character string + "BIG_ENDIAN". If no byte order is specified, "LITTLE_ENDIAN" is + reported. This value is taken from the MIME header + X-Binary-Element-Byte-Order. As of this writing, CBFlib will not + generate "BIG_ENDIAN" byte-order files. However, both CBFlib and FCBlib + read "LITTLE_ENDIAN" byte-order files, even on big-endian machines. + + The value returned in DIMOVER is the overall number of elements in the + image array, if specified, or zero, if not specified. This value is + taken from the MIME header X-Binary-Number-of-Elements. The values + returned in DIM1, DIM2 and DIM3 are the sizes of the fastest changing, + second fastest changing and third fastest changing dimensions of the + array, if specified, or zero, if not specified. These values are taken + from the MIME header X-Binary-Size-Fastest-Dimension, + X-Binary-Size-Second-Dimension and X-Binary-Size-Third-Dimension + respectively. + + The value returned in PADDING is the size of the post-data padding, if + any, if specified or zero, if not specified. The value is given as a + count of octets. This value is taken from the MIME header + X-Binary-Size-Padding. + + ARGUMENTS + + TAPIN The INTEGER Fortran device unit number assigned to + image file. + LAST_CHAR The last character (as an INTEGER(1) byte) read. + FCB_BYTES_IN_REC The INTEGER number of bytes in a record. + BYTE_IN_FILE The INTEGER byte (counting from 1) of the byte to + read. + REC_IN_FILE The INTEGER record number (counting from 1) of next + record to read. + BUFFER The INTEGER(1) array of length FCB_BYTES_IN_REC to + hold the appropriate record from TAPIN + ENCODING INTEGER type of encoding for the binary section as + reported in the MIME header. + ID INTEGER binary identifier as reported in the MIME + header. + SIZE INTEGER size of compressed binary section as + reported in the MIME header. + DIGEST The MD5 message digest as reported in the MIME + header. + COMPRESSION INTEGER compression method as reported in the MIME + header. + BITS INTEGER number of bits in each element as reported + in the MIME header. + VORZEICHEN INTEGER flag for signed or unsigned elements as + reported in the MIME header. Set to 1 if the elements + can be read as signed values, 0 otherwise. + REELL INTEGER flag for real elements as reported in the + MIME header. Set to 1 if the elements can be read as + REAL + BYTEORDER The byte order as reported in the MIME header. + DIM1 Pointer to the destination fastest dimension. + DIM2 Pointer to the destination second fastest + dimension. + DIM3 Pointer to the destination third fastest dimension. + PADDING Pointer to the destination padding size. + + RETURN VALUE + + Returns 0 if the function is successful. SEE ALSO + + 2.5.3 FCB_EXIT_BINARY + 2.5.6 FCB_OPEN_CIFIN + 2.5.9 FCB_READ_BYTE + 2.5.11 FCB_READ_LINE + + ---------------------------------------------------------------------- + + 2.5.6 FCB_OPEN_CIFIN + + INTERFACE + INTEGER FUNCTION FCB_OPEN_CIFIN(FILNAM,TAPIN,LAST_CHAR, & + FCB_BYTES_IN_REC,BYTE_IN_FILE,REC_IN_FILE,BUFFER) + CHARACTER(len=*),INTENT(IN) :: FILNAM + INTEGER, INTENT(IN) :: TAPIN,FCB_BYTES_IN_REC + INTEGER(1), INTENT(OUT):: LAST_CHAR + INTEGER, INTENT(OUT):: BYTE_IN_FILE,REC_IN_FILE + INTEGER(1), INTENT(INOUT):: BUFFER(FCB_BYTES_IN_REC) + INTEGER FCB_RECORD_SIZE + END FUNCTION + END INTERFACE + + The function FCB_OPEN_CIFIN opens the CBF image file given by the file + name in the character string FILNAM on the logical unit TAPIN. The + calling routine must provide an INTEGER(1) byte buffer BUFFER of some + appropriate INTEGER size FCB_BYTES_IN_REC. The size must be chosen to + suit the machine, but in most cases, 4096 will work. The values returned + in LAST_CHAR, BYTE_IN_FILE, and REC_IN_FILE are for use in subsequent + FCBlib I/O routines. + + The image file will be checked for the initial characters "###CBF: ". If + there is no match the error value CBF_FILEREAD is returned. + + ARGUMENTS + + FILNAM The character string name of the image file to be + opened. + TAPIN The INTEGER Fortran device unit number assigned to + image file. + LAST_CHAR The last character (as an INTEGER(1) byte) read. + FCB_BYTES_IN_REC The INTEGER number of bytes in a record. + BYTE_IN_FILE The INTEGER byte (counting from 1) of the byte to + read. + REC_IN_FILE The INTEGER record number (counting from 1) of next + record to read. + BUFFER The INTEGER(1) array of length FCB_BYTES_IN_REC to + hold the appropriate record from TAPIN + + RETURN VALUE + + Returns 0 if the function is successful. SEE ALSO + + 2.5.3 FCB_EXIT_BINARY + 2.5.5 FCB_NEXT_BINARY + 2.5.9 FCB_READ_BYTE + 2.5.11 FCB_READ_LINE + + ---------------------------------------------------------------------- + + 2.5.7 FCB_PACKED: FCB_DECOMPRESS_PACKED_I2, FCB_DECOMPRESS_PACKED_I4, + FCB_DECOMPRESS_PACKED_3D_I2, FCB_DECOMPRESS_PACKED_3D_I4 + + INTERFACE + INTEGER FUNCTION FCB_DECOMPRESS_PACKED_I2 (ARRAY,NELEM,NELEM_READ, & + ELSIGN, COMPRESSION, DIM1, DIM2, & + TAPIN,FCB_BYTES_IN_REC,BYTE_IN_FILE, & + REC_IN_FILE,BUFFER) + INTEGER(2), INTENT(OUT):: ARRAY(DIM1,DIM2) + INTEGER(8), INTENT(OUT):: NELEM_READ + INTEGER(8), INTENT(IN):: NELEM + INTEGER, INTENT(IN):: ELSIGN, COMPRESSION + INTEGER(8), INTENT(IN):: DIM1,DIM2 + INTEGER, INTENT(IN):: TAPIN,FCB_BYTES_IN_REC + INTEGER, INTENT(INOUT):: REC_IN_FILE,BYTE_IN_FILE + INTEGER(1),INTENT(INOUT):: BUFFER(FCB_BYTES_IN_REC) + END FUNCTION + END INTERFACE + + INTERFACE + INTEGER FUNCTION FCB_DECOMPRESS_PACKED_I4 (ARRAY,NELEM,NELEM_READ, & + ELSIGN, COMPRESSION, DIM1, DIM2, & + TAPIN,FCB_BYTES_IN_REC,BYTE_IN_FILE, & + REC_IN_FILE,BUFFER) + + INTEGER(4), INTENT(OUT):: ARRAY(DIM1,DIM2) + INTEGER(8), INTENT(OUT):: NELEM_READ + INTEGER(8), INTENT(IN):: NELEM + INTEGER, INTENT(IN):: ELSIGN, COMPRESSION + INTEGER(8), INTENT(IN):: DIM1,DIM2 + INTEGER, INTENT(IN):: TAPIN,FCB_BYTES_IN_REC + INTEGER, INTENT(INOUT):: REC_IN_FILE,BYTE_IN_FILE + INTEGER(1),INTENT(INOUT):: BUFFER(FCB_BYTES_IN_REC) + END FUNCTION + END INTERFACE + + INTERFACE + INTEGER FUNCTION FCB_DECOMPRESS_PACKED_3D_I2 (ARRAY,NELEM,NELEM_READ, & + ELSIGN, COMPRESSION, DIM1, DIM2, DIM3, & + TAPIN,FCB_BYTES_IN_REC,BYTE_IN_FILE, & + REC_IN_FILE,BUFFER) + INTEGER(2), INTENT(OUT):: ARRAY(DIM1,DIM2,DIM3) + INTEGER(8), INTENT(OUT):: NELEM_READ + INTEGER(8), INTENT(IN):: NELEM + INTEGER, INTENT(IN):: ELSIGN, COMPRESSION + INTEGER(8), INTENT(IN):: DIM1,DIM2,DIM3 + INTEGER, INTENT(IN):: TAPIN,FCB_BYTES_IN_REC + INTEGER, INTENT(INOUT):: REC_IN_FILE,BYTE_IN_FILE + INTEGER(1),INTENT(INOUT):: BUFFER(FCB_BYTES_IN_REC) + END FUNCTION + END INTERFACE + + INTERFACE + INTEGER FUNCTION FCB_DECOMPRESS_PACKED_3D_I4 (ARRAY,NELEM,NELEM_READ, & + ELSIGN, COMPRESSION, DIM1, DIM2, DIM3, & + TAPIN,FCB_BYTES_IN_REC,BYTE_IN_FILE, & + REC_IN_FILE,BUFFER) + INTEGER(4), INTENT(OUT):: ARRAY(DIM1,DIM2,DIM3) + INTEGER(8), INTENT(OUT):: NELEM_READ + INTEGER(8), INTENT(IN):: NELEM + INTEGER, INTENT(IN):: ELSIGN, COMPRESSION + INTEGER(8), INTENT(IN):: DIM1,DIM2,DIM3 + INTEGER, INTENT(IN):: TAPIN,FCB_BYTES_IN_REC + INTEGER, INTENT(INOUT):: REC_IN_FILE,BYTE_IN_FILE + INTEGER(1),INTENT(INOUT):: BUFFER(FCB_BYTES_IN_REC) + END FUNCTION + END INTERFACE + + The functions FCB_DECOMPRESS_PACKED_I2, FCB_DECOMPRESS_PACKED_I4, + FCB_DECOMPRESS_PACKED_3D_I2 and FCB_DECOMPRESS_PACKED_3D_I4, decompress + images compress according the the CBF_PACKED or CBF_PACKED_V2 + compression described in section 3.3.2 on J. P. Abrahams CCP4 packed + compression. + + The relevant function should be called immediately after a call to + FCB_NEXT_BINARY, using the values returned by FCB_NEXT_BINARY to select + the appropriate version of the function. + + ARGUMENTS + + ARRAY The array to receive the image + NELEM The INTEGER(8) number of elements to be read + NELEM_READ The INTEGER(8) returned value of the number of + elements actually read + ELSIGN The INTEGER value of the flag for signed (1) OR + unsigned (0) data + COMPRESSION The compression of the image + DIM1 The INTEGER(8) value of the fastest dimension of + ARRAY + DIM2 The INTEGER(8) value of the second fastest + dimension + DIM3 The INTEGER(8) value of the third fastest dimension + TAPIN The INTEGER Fortran device unit number assigned to + image file. + FCB_BYTES_IN_REC The INTEGER number of bytes in a record. + BYTE_IN_FILE The INTEGER byte (counting from 1) of the byte to + read. + REC_IN_FILE The INTEGER record number (counting from 1) of next + record to read. + BUFFER The INTEGER(1) array of length FCB_BYTES_IN_REC to + hold the appropriate record from TAPIN + + RETURN VALUE + + Returns 0 if the function is successful. + + SEE ALSO + + 2.5.3 FCB_EXIT_BINARY + 2.5.5 FCB_NEXT_BINARY + 2.5.6 FCB_OPEN_CIFIN + 2.5.9 FCB_READ_BYTE + 2.5.11 FCB_READ_LINE + + ---------------------------------------------------------------------- + + 2.5.8 FCB_READ_BITS + + INTERFACE + INTEGER FUNCTION FCB_READ_BITS(TAPIN,FCB_BYTES_IN_REC,BUFFER, & + REC_IN_FILE,BYTE_IN_FILE,BCOUNT,BBYTE, & + BITCOUNT,IINT,LINT) + INTEGER, INTENT(IN):: TAPIN,FCB_BYTES_IN_REC + INTEGER, INTENT(INOUT):: REC_IN_FILE,BYTE_IN_FILE + INTEGER(1),INTENT(INOUT):: BUFFER(FCB_BYTES_IN_REC) + INTEGER, INTENT(INOUT):: BCOUNT + INTEGER(1),INTENT(INOUT):: BBYTE + INTEGER, INTENT(IN):: BITCOUNT + INTEGER, INTENT(IN):: LINT + INTEGER(4), INTENT(OUT):: IINT(LINT) + END FUNCTION + END INTERFACE + + The function FCB_READ_BITS gets the integer value starting at + BYTE_IN_FILE from file TAPIN continuing through BITCOUNT bits, with sign + extension. BYTE_IN_FILE is left at the entry value and not incremented. + The resulting, sign-extended integer value is stored in the INTEGER(4) + array IINT of dimension LINT with the least significant portion in + IINT(1). + + ARGUMENTS + + TAPIN The INTEGER Fortran device unit number assigned to + image file. + FCB_BYTES_IN_REC The INTEGER number of bytes in a record. + BUFFER The INTEGER(1) array of length FCB_BYTES_IN_REC to + hold the appropriate record from TAPIN + REC_IN_FILE The INTEGER record number (counting from 1) of next + record to read. + BYTE_IN_FILE The INTEGER byte (counting from 1) of the byte to + read. + BCOUNT The INTEGER count of bits remaining unused from the + last call to FCB_READ_BITS. + BBYTE The INTEGER(1) byte containing the unused bits from + the last call to FCB_READ_BITS. + BITCOUNT The INTEGER count of the number of bits to be + extracted from the image file. + IINT The INTEGER(4) array into which to store the value + extracted from the image file. + LINT The INTEGER length of the array IINT. + + RETURN VALUE + + Returns 0 if the function is successful. Because of the use of direct + access I/O in blocks of size FCB_BYTES_IN_REC the precise location of + the end of file may not be detected. + + SEE ALSO + + 2.5.3 FCB_EXIT_BINARY + 2.5.5 FCB_NEXT_BINARY + 2.5.6 FCB_OPEN_CIFIN + 2.5.9 FCB_READ_BYTE + 2.5.11 FCB_READ_LINE + + ---------------------------------------------------------------------- + + 2.5.9 FCB_READ_BYTE + + INTERFACE + INTEGER FUNCTION FCB_READ_BYTE(TAPIN,FCB_BYTES_IN_REC,BUFFER, & + REC_IN_FILE,BYTE_IN_FILE,IBYTE) + INTEGER, INTENT(IN):: TAPIN,FCB_BYTES_IN_REC + INTEGER, INTENT(INOUT):: REC_IN_FILE,BYTE_IN_FILE + INTEGER(1),INTENT(INOUT):: BUFFER(FCB_BYTES_IN_REC) + INTEGER(1), INTENT(OUT):: IBYTE + END FUNCTION + END INTERFACE + + The function FCB_READ_BYTE reads the byte at the position BYTE_IN_FILE + in the image file TAPIN. The first byte in the file is at BYTE_IN_FILE = + 1. BYTE_IN_FILE should be set to the desired value before the call to + the function and is not incremented within the function. + + The function attempts to suppress the error caused by a read of a short + last record, and in most systems cannot determine the exact location of + the end of the image file, returning zero bytes until the equivalent of + a full final record has been read. + + ARGUMENTS + + TAPIN The INTEGER Fortran device unit number assigned to + image file. + FCB_BYTES_IN_REC The INTEGER number of bytes in a record. + BUFFER The INTEGER(1) array of length FCB_BYTES_IN_REC to + hold the appropriate record from TAPIN + REC_IN_FILE The INTEGER record number (counting from 1) of next + record to read. + BYTE_IN_FILE The INTEGER byte (counting from 1) of the byte to + read. + IBYTE The INTEGER(1) byte found in the image file at the + byte position BYTE_IN_FILE. + + RETURN VALUE + + Returns 0 if the function is successful. Because of the use of direct + access I/O in blocks of size FCB_BYTES_IN_REC the precise location of + the end of file may not be detected. + + SEE ALSO + + 2.5.3 FCB_EXIT_BINARY + 2.5.5 FCB_NEXT_BINARY + 2.5.6 FCB_OPEN_CIFIN + 2.5.9 FCB_READ_BITS + 2.5.11 FCB_READ_LINE + + ---------------------------------------------------------------------- + + 2.5.10 FCB_READ_IMAGE_I2, FCB_READ_IMAGE_I4, FCB_READ_IMAGE_3D_I2, + FCB_READ_IMAGE_3D_I4 + + INTERFACE + INTEGER FUNCTION FCB_READ_IMAGE_I2(ARRAY,NELEM,NELEM_READ, & + ELSIGN, COMPRESSION, DIM1, DIM2, & + PADDING,TAPIN,FCB_BYTES_IN_REC,BYTE_IN_FILE, & + REC_IN_FILE,BUFFER) + + INTEGER(2), INTENT(OUT):: ARRAY(DIM1,DIM2) + INTEGER(8), INTENT(OUT):: NELEM_READ + INTEGER(8), INTENT(IN):: NELEM + INTEGER, INTENT(IN):: ELSIGN + INTEGER, INTENT(OUT):: COMPRESSION + INTEGER(8), INTENT(IN):: DIM1,DIM2 + INTEGER(8), INTENT(OUT):: PADDING + INTEGER, INTENT(IN):: TAPIN,FCB_BYTES_IN_REC + INTEGER, INTENT(INOUT):: REC_IN_FILE,BYTE_IN_FILE + INTEGER(1),INTENT(INOUT):: BUFFER(FCB_BYTES_IN_REC) + END FUNCTION + END INTERFACE + + INTERFACE + INTEGER FUNCTION FCB_READ_IMAGE_I4(ARRAY,NELEM,NELEM_READ, & + ELSIGN, COMPRESSION, DIM1, DIM2, & + PADDING,TAPIN,FCB_BYTES_IN_REC,BYTE_IN_FILE, & + REC_IN_FILE,BUFFER) + INTEGER(4), INTENT(OUT):: ARRAY(DIM1,DIM2) + INTEGER(8), INTENT(OUT):: NELEM_READ + INTEGER(8), INTENT(IN):: NELEM + INTEGER, INTENT(IN):: ELSIGN + INTEGER, INTENT(OUT):: COMPRESSION + INTEGER(8), INTENT(IN):: DIM1,DIM2 + INTEGER(8), INTENT(OUT):: PADDING + INTEGER, INTENT(IN):: TAPIN,FCB_BYTES_IN_REC + INTEGER, INTENT(INOUT):: REC_IN_FILE,BYTE_IN_FILE + INTEGER(1),INTENT(INOUT):: BUFFER(FCB_BYTES_IN_REC) + END FUNCTION + END INTERFACE + + INTERFACE + INTEGER FUNCTION FCB_READ_IMAGE_3D_I2(ARRAY,NELEM,NELEM_READ, & + ELSIGN, COMPRESSION, DIM1, DIM2, DIM3, & + PADDING,TAPIN,FCB_BYTES_IN_REC,BYTE_IN_FILE, & + REC_IN_FILE,BUFFER) + INTEGER(2), INTENT(OUT):: ARRAY(DIM1,DIM2,DIM3) + INTEGER(8), INTENT(OUT):: NELEM_READ + INTEGER(8), INTENT(IN):: NELEM + INTEGER, INTENT(IN):: ELSIGN + INTEGER, INTENT(OUT):: COMPRESSION + INTEGER(8), INTENT(IN):: DIM1,DIM2,DIM3 + INTEGER(8), INTENT(OUT):: PADDING + INTEGER, INTENT(IN):: TAPIN,FCB_BYTES_IN_REC + INTEGER, INTENT(INOUT):: REC_IN_FILE,BYTE_IN_FILE + INTEGER(1),INTENT(INOUT):: BUFFER(FCB_BYTES_IN_REC) + END FUNCTION + END INTERFACE + + INTERFACE + INTEGER FUNCTION FCB_READ_IMAGE_3D_I4(ARRAY,NELEM,NELEM_READ, & + ELSIGN, COMPRESSION, DIM1, DIM2, DIM3, & + PADDING,TAPIN,FCB_BYTES_IN_REC,BYTE_IN_FILE, & + REC_IN_FILE,BUFFER) + INTEGER(4), INTENT(OUT):: ARRAY(DIM1,DIM2,DIM3) + INTEGER(8), INTENT(OUT):: NELEM_READ + INTEGER(8), INTENT(IN):: NELEM + INTEGER, INTENT(IN):: ELSIGN + INTEGER, INTENT(OUT):: COMPRESSION + INTEGER(8), INTENT(IN):: DIM1,DIM2,DIM3 + INTEGER(8), INTENT(OUT):: PADDING + INTEGER, INTENT(IN):: TAPIN,FCB_BYTES_IN_REC + INTEGER, INTENT(INOUT):: REC_IN_FILE,BYTE_IN_FILE + INTEGER(1),INTENT(INOUT):: BUFFER(FCB_BYTES_IN_REC) + END FUNCTION + END INTERFACE + + The function FCB_READ_IMAGE_I2 reads a 16-bit twos complement INTEGER(2) + 2D image. The function FCB_READ_IMAGE_I4 read a 32-bit twos complement + INTEGER(4) 2D image. The function FCB_READ_IMAGE_3D_I2 reads a 16-bit + twos complement INTEGER(2) 3D image. The function FCB_READ_IMAGE_3D_I4 + reads a 32-bit twos complement INTEGER(4) 3D image. In each case the + image is compressed either by a BYTE_OFFSET algorithm by W. Kabsch based + on a proposal by A. Hammersley or by a PACKED algorithm by J. P. + Abrahams as used in CCP4, with modifications by P. Ellis and H. J. + Bernstein. + + The relevant function automatically first calls FCB_NEXT_BINARY to skip + to the next binary section and then starts to read. An error return will + result if the parameters of this call are inconsistent with the values + in MIME header. + + ARGUMENTS + + ARRAY The array to receive the image + NELEM The INTEGER(8) number of elements to be read + NELEM_READ The INTEGER(8) returned value of the number of + elements actually read + ELSIGN The INTEGER value of the flag for signed (1) OR + unsigned (0) data + COMPRESSION The actual compression of the image + DIM1 The INTEGER(8) value of the fastest dimension of + ARRAY + DIM2 The INTEGER(8) value of the second fastest + dimension + DIM3 The INTEGER(8) value of the third fastest dimension + TAPIN The INTEGER Fortran device unit number assigned to + image file. + FCB_BYTES_IN_REC The INTEGER number of bytes in a record. + BYTE_IN_FILE The INTEGER byte (counting from 1) of the byte to + read. + REC_IN_FILE The INTEGER record number (counting from 1) of next + record to read. + BUFFER The INTEGER(1) array of length FCB_BYTES_IN_REC to + hold the appropriate record from TAPIN + + RETURN VALUE + + Returns 0 if the function is successful. + + SEE ALSO + + 2.5.3 FCB_EXIT_BINARY + 2.5.5 FCB_NEXT_BINARY + 2.5.6 FCB_OPEN_CIFIN + 2.5.7 FCB_DECOMPRESS: FCB_DECOMPRESS_PACKED_I2, + FCB_DECOMPRESS_PACKED_I4, FCB_DECOMPRESS_PACKED_3D_I2, + FCB_DECOMPRESS_PACKED_3D_I4 + 2.5.9 FCB_READ_BYTE + 2.5.11 FCB_READ_LINE + + ---------------------------------------------------------------------- + + 2.5.11 FCB_READ_LINE + + INTERFACE + INTEGER FUNCTION FCB_READ_LINE(TAPIN,LAST_CHAR,FCB_BYTES_IN_REC, & + BYTE_IN_FILE,REC_IN_FILE,BUFFER,LINE,N,LINELEN) + INTEGER, INTENT(IN):: TAPIN,FCB_BYTES_IN_REC,N + INTEGER, INTENT(INOUT):: BYTE_IN_FILE,REC_IN_FILE + INTEGER, INTENT(OUT):: LINELEN + INTEGER(1),INTENT(INOUT):: LAST_CHAR,BUFFER,(FCB_BYTES_IN_REC) + INTEGER(1), INTENT(OUT):: LINE(N) + END FUNCTION + END INTERFACE + + The function FCB_READ_LINE reads successive bytes into the INTEGER(1) + byte array LINE of dimension N), stopping at N bytes or the first error + or the first CR (Z'0D') or LF (Z'0A'), whichever comes first. It + discards an LF after a CR. The variable LAST_CHAR is checked for the + last character from the previous line to make this determination. + + The actual number of bytes read into the line, not including any + terminal CR or LF is stored in LINELEN. + + ARGUMENTS + + TAPIN The INTEGER Fortran device unit number assigned to + image file. + LAST_CHAR The INTEGER(1) byte holding the ASCII value of the + last character read for each line read. + FCB_BYTES_IN_REC The INTEGER number of bytes in a record. + BYTE_IN_FILE The INTEGER byte (counting from 1) of the byte to + read. + REC_IN_FILE The INTEGER record number (counting from 1) of next + record to read. + BUFFER The INTEGER(1) array of length FCB_BYTES_IN_REC to + hold the appropriate record from TAPIN. + LINE The INTEGER(1) array of length N to hold the line + to be read from TAPIN. + N The INTEGER dimension of LINE. + LINELEN The INTEGER number of characters read into LINE. + + RETURN VALUE + + Returns 0 if the function is successful. + + SEE ALSO + + 2.5.3 FCB_EXIT_BINARY + 2.5.5 FCB_NEXT_BINARY + 2.5.6 FCB_OPEN_CIFIN + 2.5.7 FCB_DECOMPRESS: FCB_DECOMPRESS_PACKED_I2, + FCB_DECOMPRESS_PACKED_I4, FCB_DECOMPRESS_PACKED_3D_I2, + FCB_DECOMPRESS_PACKED_3D_I4 + 2.5.9 FCB_READ_BYTE + + 2.5.12 FCB_READ_XDS_I2 + + INTERFACE + INTEGER FUNCTION FCB_READ_XDS_I2(FILNAM,TAPIN,NX,NY,IFRAME,JFRAME) + CHARACTER(len=*),INTENT(IN) :: FILNAM + INTEGER, INTENT(IN) :: TAPIN,NX,NY + INTEGER(2), INTENT(OUT):: IFRAME(NX*NY) + INTEGER(4), INTENT(OUT):: JFRAME(NX,NY) + END FUNCTION + END INTERFACE + + The function FCB_READ_XDS_I2 read a 32-bit integer twos complement image + into a 16-bit INTEGER(2) XDS image using the CBF_BYTE_OFFSET, CBF_PACKED + or CBF_PACKED_V2 compressions for the 32-bit data. The BYTE_OFFSET + algorithm is a variant of the September 2006 version by W. Kabsch which + was based on a suggestion by A. Hammersley and which was further + modified by H. Bernstein. + + The file named FILNAM is opened on the logical unit TAPIN and + FCB_NEXT_BINARY is used to skip to the next binary image. The binary + image is then decompressed to produce an XDS 16-bit integer image array + IFRAME which is NX by NY. The dimensions must agree with the dimensions + specified in MIME header. + + The conversion from a 32-bit integer I32 to 16-bit XDS pixel I16 is done + as per W. Kabsch as follows: The value I32 is limited to the range -1023 + ≤ I32 ≤ 1048576. If I32 is outside that range it is truncated to the + closer boundary. The generate I16, the 16-bit result, if I32 > 32767, it + is divided by 32 (producing a number between 1024 and 32768), and then + negated (producing a number between -1024 and -32768). + + For CBF_BYTE_OFFSET this conversion can be done on the fly directly into + the target array IFRAME, but for the CBF_PACKED or CBF_PACKED_V2, the + full 32 bit precision is needed during the decompression, forcing the + use of an intermediate INTEGER(4) array JFRAME to hold the 32-bit image + in that case. + + The image file is closed after reading one image. + + ARGUMENTS + + FILNAM The character string name of the image file to be opened. + TAPIN The INTEGER Fortran device unit number assigned to image + file. + NX The INTEGER fast dimension of the image array. + NY The INTEGER slow dimension of the image array. + IFRAME The INTEGER(2) XDS image array. + JFRAME The INTEGER(4) 32-bit image scratch array needed for + CBF_PACKED or CBF_PACKED_V2 images. + + RETURN VALUE + + Returns 0 if the function is successful, CBF_FORMAT (=1) if it cannot + handle this CBF format (not implemented), -1 if it cannot determine + endian architecture of this machine, -2: if it cannot open the image + file, -3: if it finds the wrong image format and -4 if it cannot read + the image. + + ---------------------------------------------------------------------- + + 2.5.13 FCB_SKIP_WHITESPACE + + INTERFACE + INTEGER FUNCTION FCB_SKIP_WHITESPACE(TAPIN,LAST_CHAR, & + FCB_BYTES_IN_REC,BYTE_IN_FILE,REC_IN_FILE,BUFFER,& + LINE,N,LINELEN,ICUR,FRESH_LINE) + INTEGER, INTENT(IN):: TAPIN,FCB_BYTES_IN_REC,N + INTEGER, INTENT(INOUT):: BYTE_IN_FILE,REC_IN_FILE,LINELEN,ICUR, & + FRESH_LINE + INTEGER(1),INTENT(INOUT):: BUFFER(FCB_BYTES_IN_REC),LINE(N), & + LAST_CHAR + END INTERFACE + + The function FCB_SKIP_WHITESPACE skips forward on the current INTEGER(1) + byte array LINE of size N with valid data in LINE(1:LINELEN) from the + current position ICUR moving over MIME header whitespace and comments, + reading new lines into LINE if needed. The flag FRESH_LINE indicates + that a fresh line should be read on entry. + + ARGUMENTS + + TAPIN The INTEGER Fortran device unit number assigned to + image file. + LAST_CHAR The INTEGER(1) byte holding the ASCII value of the + last character read for each line read. + FCB_BYTES_IN_REC The INTEGER number of bytes in a record. + BYTE_IN_FILE The INTEGER byte (counting from 1) of the byte to + read. + REC_IN_FILE The INTEGER record number (counting from 1) of next + record to read. + BUFFER The INTEGER(1) array of length FCB_BYTES_IN_REC to + hold the appropriate record from TAPIN. + LINE The INTEGER(1) array of length N to hold the line + to be read from TAPIN. + N The INTEGER dimension of LINE. + LINELEN The INTEGER number of characters read into LINE. + ICUR The INTEGER position within the line. + FRESH_LINE The INTEGER flag that a fresh line is needed. + + RETURN VALUE + + Returns 0 if the function is successful. + + SEE ALSO + + 2.5.3 FCB_EXIT_BINARY + 2.5.5 FCB_NEXT_BINARY + 2.5.6 FCB_OPEN_CIFIN + 2.5.7 FCB_DECOMPRESS: FCB_DECOMPRESS_PACKED_I2, + FCB_DECOMPRESS_PACKED_I4, FCB_DECOMPRESS_PACKED_3D_I2, + FCB_DECOMPRESS_PACKED_3D_I4 + 2.5.9 FCB_READ_BYTE + + ---------------------------------------------------------------------- + +2.6 HDF5 abstraction layer and convenience functions + + The HDF5 abstraction layer mostly follows the HDF5 naming convention of + H5Xfunction_name, where X is usually a single letter identifying the + section of the API that the function resides in. A cbf_ prefix is used + on all functions to avoid naming conflicts and make it clear that all + these functions use the CBFlib error handling method whenever an error + may occur. + + The main purpose of this API is to not to reimplement the HDF5 API, but + to make common HDF5-related tasks easier when working with HDF5 files + within CBFlib. The API therefore doesn't attempt to cover every possible + use of HDF5, but to simplify common tasks. Use of the HDF5 API is not + unexpected in library or user code, but functions in this section should + be preferred in order to reduce development time and the amount of + debugging required. A relatively comprehensive test program is provided, + this should be used to verify that the functions in this section of the + API are performing as expected and can be used as a source of example + code. + + This section describes functions available for working with: + + * Attributes: + * 2.6.1 cbf_H5Acreate + * 2.6.2 cbf_H5Afind + * 2.6.3 cbf_H5Aread + * 2.6.4 cbf_H5Aread_string + * 2.6.5 cbf_H5Awrite + * 2.6.6 cbf_H5Arequire_cmp2 + * 2.6.7 cbf_H5Arequire_cmp2_ULP + * 2.6.8 cbf_H5Arequire_string + * 2.6.9 cbf_H5Afree + * Datasets: + * 2.6.10 cbf_H5Dcreate + * 2.6.11 cbf_H5Dfind2 + * 2.6.12 cbf_H5Drequire + * 2.6.13 cbf_H5Dinsert + * 2.6.14 cbf_H5Dset_extent + * 2.6.15 cbf_H5Dwrite2 + * 2.6.16 cbf_H5Dread2 + * 2.6.17 cbf_H5Drequire_scalar_F64LE2 + * 2.6.18 cbf_H5Drequire_scalar_F64LE2_ULP + * 2.6.19 cbf_H5Drequire_flstring + * 2.6.20 cbf_H5Dfree + * Files: + * 2.6.21 cbf_H5Fopen + * 2.6.22 cbf_H5Fclose + * Groups: + * 2.6.23 cbf_H5Gcreate + * 2.6.24 cbf_H5Gfind + * 2.6.25 cbf_H5Grequire + * 2.6.26 cbf_H5Gfree + * Identifiers: + * 2.6.27 cbf_H5Ivalid + * Objects: + * 2.6.28 cbf_H5Ocmp + * 2.6.29 cbf_H5Ofree + * Dataspaces: + * 2.6.30 cbf_H5Screate + * 2.6.31 cbf_H5Sfree + * Datatypes: + * 2.6.32 cbf_H5Tcreate_string + * 2.6.33 cbf_H5Tfree + + Rank of a dataset + + Where a rank is required it must be equal to the length of the dim, max + & chunk parameters, if they are given, and should be: + + * 0, for scalar data + * 1, for vector data + * 2, for matrix data + * 3, for volume data + * etc... + + The maximum rank is defined by the HDF5 library, a negative rank makes + no sense and will often be treated as an error. + + HDF5-specific datatypes + + Any type parameters defining types for data stored in a file should + usually be a value returned by cbf_H5Tcreate_string or one of the + standard or IEEE types: + + H5T_STD_I8LE H5T_STD_I16LE H5T_STD_I32LE H5T_STD_I64LE + H5T_STD_U8LE H5T_STD_U16LE H5T_STD_U32LE H5T_STD_U64LE + H5T_STD_I8BE H5T_STD_I16BE H5T_STD_I32BE H5T_STD_I64BE + H5T_STD_U8BE H5T_STD_U16BE H5T_STD_U32BE H5T_STD_U64BE + H5T_IEEE_F32LE H5T_IEEE_F64LE H5T_IEEE_F32BE H5T_IEEE_F64BE + + Any type parameters defining types for data stored in memory should + usually be a value returned by cbf_H5Tcreate_string or one of the native + types: + +H5T_NATIVE_SCHAR H5T_NATIVE_SHORT H5T_NATIVE_INT H5T_NATIVE_LONG H5T_NATIVE_LLONG +H5T_NATIVE_UCHAR H5T_NATIVE_USHORT H5T_NATIVE_UINT H5T_NATIVE_ULONG H5T_NATIVE_ULLONG +H5T_NATIVE_FLOAT H5T_NATIVE_DOUBLE H5T_NATIVE_LDOUBLE + + Functions are rarely (if ever) limited to the above values, and can take + any valid HDF5 datatype. The above is not a complete list of all + available types, check the HDF5 documentation for such a list if you + need one. + + Comparing data + + Some of the functions in this section will require a comparison function + and some comparison parameters to be provided. The function should + return zero if the data in the two arrays are considered equal and + non-zero otherwise, note that this is the same as C's strcmp(). The + signature of the comparison functions used here is: + + int compare (const void * expected, const void * existing, size_t + length, const void * params) + + This will be called with: + + Type Name Description + const void * expected A pointer to the array of requested values that + was passed to the function. + const void * existing An array of existing values read from the object. + size_t length The length of the expected and existing arrays. + const void * params A pointer to the comparison parameters which were + passed to the calling function. + + The comparison parameters allow more complex comparisons to be + performed, such as a check that the numbers are 'close enough' as + determined by some variable measure of closeness. It is the caller's + responsibility to ensure that the comparison function is appropriate for + the type of data expected and that params is of the appropriate type for + the comparison function. The parameters expected and existing should + normally be cast to the appropriate type before being used. + + An example function for comparing ints, taken from the implementation of + CBFlib: + + /* + Compare two arrays of ints. + Most parameters are defined as being 'const' even though + the expected signature allows them to be mutable. + */ + int cmp_int + (const void * const expected, + const void * const existing, + size_t length, + const void * const params) + { + /* + Cast the array pointers to the appropriate type, preserving the const-ness of the data. + I won't be using any parameters for this comparison, so just ignore that argument. + */ + const int * A = expected; + const int * B = existing; + + /* + Iterate through the arrays comparing each element and decrementing a counter. + If any are not equal the loop will exit early with length being non-zero. + */ + while (length && *A++ == *B++) --length; + + /* + Return a value indicating whether the arrays are equal. + */ + return length; + } + + Some older functions use a simpler 3-argument comparison function, which + doesn't have a parameter that can be used to pass some extra information + to or retrieve information from the function. + + ---------------------------------------------------------------------- + + 2.6.1 cbf_H5Acreate + + Create a new attribute. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Acreate (const hid_t location, hid_t *const attr, const char + *const name, const hid_t type, const hid_t space) + + DESCRIPTION + + Creates a new attribute of the object location with name given by name, + optionally returning it in the attr variable. An error will occur if a + similarly named attribute already exists. + + ARGUMENTS + + location The hdf5 group/file in which to put the attribute. + A pointer to a HDF5 object identifier that is set to the + attr location of a valid object if the function succeeds, otherwise + is left untouched. + name The name of the existing/new dataset. + type The type of data to be stored in the attribute. + space The dataspace of the attribute. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.2 cbf_H5Afind + * 2.6.3 cbf_H5Aread + * 2.6.4 cbf_H5Aread_string + * 2.6.5 cbf_H5Awrite + * 2.6.6 cbf_H5Arequire_cmp2 + * 2.6.7 cbf_H5Arequire_cmp2_ULP + * 2.6.8 cbf_H5Arequire_string + * 2.6.9 cbf_H5Afree + + ---------------------------------------------------------------------- + + 2.6.2 cbf_H5Afind + + Try to locate an existing attribute. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Afind (const hid_t location, hid_t *const attr, const char + *const name, const hid_t type, const hid_t space) + + DESCRIPTION + + Checks for the existance of an attribute with the given name at location + with a datatype of type and dataspace of space. Will return CBF_NOTFOUND + if it cannot be found, or open it if it already exists. + + If type is not a datatype then no check of the attribute datatype will + be done. If space is not a dataspace then no checks of the attribute + dataspace wil be done. + + ARGUMENTS + + location The hdf5 group/file in which to put the attribute. + A pointer to a HDF5 object identifier that is set to the + attr location of a valid object if the function succeeds, otherwise + is left untouched. + name The name of the existing/new attribute. + type The type of data stored in the attribute, or an invalid + identifier if it should not be checked. + space The dataspace of the attribute, or an invalid identifier if it + should not be checked. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.1 cbf_H5Acreate + * 2.6.3 cbf_H5Aread + * 2.6.4 cbf_H5Aread_string + * 2.6.5 cbf_H5Awrite + * 2.6.6 cbf_H5Arequire_cmp2 + * 2.6.7 cbf_H5Arequire_cmp2_ULP + * 2.6.8 cbf_H5Arequire_string + * 2.6.9 cbf_H5Afree + + ---------------------------------------------------------------------- + + 2.6.3 cbf_H5Aread + + Read an entire attribute from a file. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Aread (const hid_t attr, const hid_t type, void *const buf) + + DESCRIPTION + + Reads all of the data from attr into buf, which should have been + allocated as the native type indicated by mem_type. + + ARGUMENTS + + attr A valid hdf5 handle for an attribute. + type The type of data in memory. + buf The location where the data is to be stored. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.1 cbf_H5Acreate + * 2.6.2 cbf_H5Afind + * 2.6.4 cbf_H5Aread_string + * 2.6.5 cbf_H5Awrite + * 2.6.6 cbf_H5Arequire_cmp2 + * 2.6.7 cbf_H5Arequire_cmp2_ULP + * 2.6.8 cbf_H5Arequire_string + * 2.6.9 cbf_H5Afree + + ---------------------------------------------------------------------- + + 2.6.4 cbf_H5Aread_string + + Read an entire string attribute from a file. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Aread_string (const hid_t attr, const char **const val) + + DESCRIPTION + + Read a string attribute into memory, returning a pointer that must be + free'd by the caller in val. + + ARGUMENTS + + attr The attribute to read from. + val A pointer to a place the string may be stored. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.1 cbf_H5Acreate + * 2.6.2 cbf_H5Afind + * 2.6.3 cbf_H5Aread + * 2.6.5 cbf_H5Awrite + * 2.6.6 cbf_H5Arequire_cmp2 + * 2.6.7 cbf_H5Arequire_cmp2_ULP + * 2.6.8 cbf_H5Arequire_string + * 2.6.9 cbf_H5Afree + + ---------------------------------------------------------------------- + + 2.6.5 cbf_H5Awrite + + Write an entire attribute to a file. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Awrite (const hid_t attr, const hid_t type, void *const buf) + + DESCRIPTION + + Writes all of the data from buf, which should contain data if the type + indicated by mem_type, into attr. + + ARGUMENTS + + attr A valid hdf5 handle for an attribute. + type The type of data in memory. + buf The address of the data to be written. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.1 cbf_H5Acreate + * 2.6.2 cbf_H5Afind + * 2.6.3 cbf_H5Aread + * 2.6.4 cbf_H5Aread_string + * 2.6.6 cbf_H5Arequire_cmp2 + * 2.6.7 cbf_H5Arequire_cmp2_ULP + * 2.6.8 cbf_H5Arequire_string + * 2.6.9 cbf_H5Afree + + ---------------------------------------------------------------------- + + 2.6.6 cbf_H5Arequire_cmp2 + + Check for an attribute with the given space/type/value, or set one if it + doesn't exist. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Arequire_cmp2 (const hid_t ID, const char *const name, const + int rank, const hsize_t *const dim, const hid_t fileType, const hid_t + memType, const void *const value, void *const buf, int(*cmp)(const void + *, const void *, size_t)) + + DESCRIPTION + + Checks the existance of an attribute of the given name, size, type and + value. Equal value is determined by a custom comparison function which + may use some extra data for more sophisticated tests. A new attribute + with the given properties will be created if none currently exist, the + function will fail if an incompatible attribute exists. + + ARGUMENTS + + ID The HDF5 object that the attribute will be applied to. + name The name of the attribute. + rank The number of dimensions of the attribute data, 0 for scalar + data. + dim The length of each dimension, not used for scalar data. + fileType The HDF5 type of the attribute data in the file. + memType The HDF5 type of the attribute data in memory. + value The data to be written to the attribute. + buf A buffer to be used when reading an existing attribute of the + same size. + cmp A comparison function to test if a previously set value is + equal to the value I asked for. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.1 cbf_H5Acreate + * 2.6.2 cbf_H5Afind + * 2.6.3 cbf_H5Aread + * 2.6.4 cbf_H5Aread_string + * 2.6.5 cbf_H5Awrite + * 2.6.7 cbf_H5Arequire_cmp2_ULP + * 2.6.8 cbf_H5Arequire_string + * 2.6.9 cbf_H5Afree + + ---------------------------------------------------------------------- + + 2.6.7 cbf_H5Arequire_cmp2_ULP + + Check for an attribute with the given space/type/value, or set one if it + doesn't exist. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Arequire_cmp2_ULP (const hid_t ID, const char *const name, + const int rank, const hsize_t *const dim, const hid_t fileType, const + hid_t memType, const void *const value, void *const buf, int(*cmp)(const + void *, const void *, size_t, const void *), const void *const + cmp_params) + + DESCRIPTION + + Checks the existance of an attribute of the given name, size, type and + value. Equal value is determined by a custom comparison function which + may use some extra data for more sophisticated tests. A new attribute + with the given properties will be created if none currently exist, the + function will fail if an incompatible attribute exists. + + ARGUMENTS + + ID The HDF5 object that the attribute will be applied to. + name The name of the attribute. + rank The number of dimensions of the attribute data, 0 for scalar + data. + dim The length of each dimension, not used for scalar data. + fileType The HDF5 type of the attribute data in the file. + memType The HDF5 type of the attribute data in memory. + value The data to be written to the attribute. + buf A buffer to be used when reading an existing attribute of the + same size. + cmp A comparison function to test if a previously set value is + equal to the value I asked for. + cmp_params A pointer to a data structure which may be used by the + comparison function. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.1 cbf_H5Acreate + * 2.6.2 cbf_H5Afind + * 2.6.3 cbf_H5Aread + * 2.6.4 cbf_H5Aread_string + * 2.6.5 cbf_H5Awrite + * 2.6.6 cbf_H5Arequire_cmp2 + * 2.6.8 cbf_H5Arequire_string + * 2.6.9 cbf_H5Afree + + ---------------------------------------------------------------------- + + 2.6.8 cbf_H5Arequire_string + + Check for a scalar string attribute with a given value, or set one if it + doesn't exist. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Arequire_string (const hid_t location, const char *const name, + const char *const value) + + DESCRIPTION + + Forwarding function that calls cbf_H5Arequire_cmp2_ULP with the + appropriate arguments to compare two strings. The strcmp function is + used for string comparison, with a small wrapper to verify array length: + + /** a possible implementation of a function to compare two strings for equality */ + static int cmp_string + (const void * const a, + const void * const b, + const size_t N, + const void * const params) + { + /* first ensure the arrays have one element each */ + if (1 != N) return 1; + /* then forward to 'strcmp' for the actual comparison */ + else return strcmp(a,b); + } + + ARGUMENTS + + location HDF5 object to which the string attribute should/will belong. + name The name of the attribute. + value The value which the attribute should/will have. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.1 cbf_H5Acreate + * 2.6.2 cbf_H5Afind + * 2.6.3 cbf_H5Aread + * 2.6.4 cbf_H5Aread_string + * 2.6.5 cbf_H5Awrite + * 2.6.6 cbf_H5Arequire_cmp2 + * 2.6.7 cbf_H5Arequire_cmp2_ULP + * 2.6.9 cbf_H5Afree + + ---------------------------------------------------------------------- + + 2.6.9 cbf_H5Afree + + Close a HDF5 attribute. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Afree (const hid_t ID) + + DESCRIPTION + + Attempt to close an attribute, but don't modify the identifier that + described it. + + ARGUMENTS + + ID The HDF5 attribute to be closed. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.1 cbf_H5Acreate + * 2.6.2 cbf_H5Afind + * 2.6.3 cbf_H5Aread + * 2.6.4 cbf_H5Aread_string + * 2.6.5 cbf_H5Awrite + * 2.6.6 cbf_H5Arequire_cmp2 + * 2.6.7 cbf_H5Arequire_cmp2_ULP + * 2.6.8 cbf_H5Arequire_string + + ---------------------------------------------------------------------- + + 2.6.10 cbf_H5Dcreate + + Creates a new dataset in the given location. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Dcreate (const hid_t location, hid_t *const dataset, const + char *const name, const int rank, const hsize_t *const dim, const + hsize_t *const max, const hsize_t *const chunk, const hid_t type) + + DESCRIPTION + + The dataset parameter gives a location to store the dataset for use by + the caller, for example to add an attribute to it. If non-zero the + returned handle MUST be free'd by the caller with cbf_H5Dfree. + + The dimensions of the dataset to create are given in dim. The maximum + extents of the dataset are given in max, which uses the values in dim as + defaults if set to a null pointer. Each element of max must be at least + as large as the corresponding element of dim. The dataset created will + be a fixed-size dataset unless one of the elements of max is set to + H5S_UNLIMITED. + + A chunk size must be given in the chunk argument if any element of max + is set to H5S_UNLIMITED or is greater than the corresponding element of + dim. If the dataset should not be chunked then a null pointer should be + given. + + The dim, max and chunk arrays - if given - must each contain rank + elements. + + This function will fail if a link with the same name already exists in + location. + + ARGUMENTS + + location The hdf5 group/file in which to put the dataset. + dataset An optional pointer to a location where the dataset handle + should be stored. + name The name of the new dataset. + rank The rank of the data. + dim The dimensions of the dataset to create. Unused if rank == 0. + max The maximum size of each dimension. Unused if rank == 0. + chunk The chunk size for the dataset. + type The type of each data element in the file. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.11 cbf_H5Dfind2 + * 2.6.12 cbf_H5Drequire + * 2.6.13 cbf_H5Dinsert + * 2.6.14 cbf_H5Dset_extent + * 2.6.15 cbf_H5Dwrite2 + * 2.6.16 cbf_H5Dread2 + * 2.6.17 cbf_H5Drequire_scalar_F64LE2 + * 2.6.18 cbf_H5Drequire_scalar_F64LE2_ULP + * 2.6.19 cbf_H5Drequire_flstring + * 2.6.20 cbf_H5Dfree + + ---------------------------------------------------------------------- + + 2.6.11 cbf_H5Dfind2 + + Look for a dataset with the given properties. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Dfind2 (const hid_t location, hid_t *const dataset, const char + *const name, const int rank, const hsize_t *const max, hsize_t *const + buf, const hid_t type) + + DESCRIPTION + + Returns CBF_NOTFOUND without modifying dataset if no dataset exists and + fails without modifying dataset if one with different properties exists. + A dataset will be 'found' if it has the same name and a maximum size + which is at least as big as the size requested in max. + + A buffer of rank elements pointed to by buf may be used to store the + array of maximum extents for a potentially matching dataset, in order to + avoid the use of malloc & free for very small amounts of memory. + + Use as: + + /* Get the return code from the function call, */ + const int found = cbf_H5Dfind(location, &dataset, ...); + /* and check what it was: */ + if (CBF_SUCCESS==found) { + /* A dataset already existed and I have a handle for it: */ + use_existing_dataset(dataset); + } else if (CBF_NOTFOUND==found) { + /* No matching dataset existed, so I can create one: */ + cbf_H5Dcreate(location, &dataset, ...); + use_new_datset(dataset); + } else { + /* + The function call failed, do something with the error. + In this case, store it for later use and print a message. + */ + error |= found; + cbf_debug_print(cbf_strerror(error)); + } + /* clean up: */ + cbf_H5Dfree(dataset); + + ARGUMENTS + + location The hdf5 group/file in which to put the dataset. + A pointer to a HDF5 object identifier that is set to the + dataset location of a valid object if the function succeeds, otherwise + is left in an undefined state. + name The name of the existing/new dataset. + rank The rank of the data, must be equal to the length of the max + and buf arrays, if they are given. + The (optional) maximum size of each dimension, pointer or an + max array of length rank where 0 <= max[i] <= H5S_UNLIMITED for i = + [0, rank), unused if rank == 0. + An optional buffer with rank elements which may be used to + buf store the current maximum dimensions of a potential match to + avoid a malloc/free call. + type The type of each data element in the file. If an invalid type + is given a dataset of any type may be returned. + + RETURN VALUE + + CBF_SUCCESS if a matching dataset was found, CBF_NOTFOUND if nothing + with the same name was found, some other error code otherwise. + + SEE ALSO + + * 2.6.10 cbf_H5Dcreate + * 2.6.12 cbf_H5Drequire + * 2.6.13 cbf_H5Dinsert + * 2.6.14 cbf_H5Dset_extent + * 2.6.15 cbf_H5Dwrite2 + * 2.6.16 cbf_H5Dread2 + * 2.6.17 cbf_H5Drequire_scalar_F64LE2 + * 2.6.18 cbf_H5Drequire_scalar_F64LE2_ULP + * 2.6.19 cbf_H5Drequire_flstring + * 2.6.20 cbf_H5Dfree + + ---------------------------------------------------------------------- + + 2.6.12 cbf_H5Drequire + + Ensure that a dataset exists, returning a handle to an existing dataset + or creating a new dataset if needed. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Drequire (const hid_t location, hid_t *const dataset, const + char *const name, const int rank, const hsize_t *const max, const + hsize_t *const chunk, hsize_t *const buf, const hid_t type) + + DESCRIPTION + + Ensure a dataset of the given rank exists and can hold at least as many + elements as specified in max. If no dataset exists then one will be + created with dimensions of [0, 0, ... 0]. cbf_H5Dfind and cbf_H5Dcreate + are used in the implementation of this function. + + An existing dataset may be found using cbf_H5Dfind2(location, dataset, + name, rank, max, buf, type). If no dataset can be found then a dataset + will be created by setting each element of a buffer of length rank to + zero and using cbf_H5Dcreate(location, dataset, name, rank, buffer, max, + chunk, type). A buffer of rank elements may be provided to avoid using + malloc to allocate memory for a small array whose size may already be + known. + + The value pointed to by dataset should be a valid object identifier if + the function exits successfully, and will be left in an undefined state + otherwise. + + This is roughly equivalent to: + + const int error = cbf_H5Dfind2(location, dataset, name, rank, max, buf, type); + if (CBF_NOTFOUND==error) { + int i; + for (i = 0; i != rank; ++i) buf[i] = 0; + return cbf_H5Dcreate(location, dataset, name, rank, buf, max, chunk, type); + } else { + /* 'error' may be 'CBF_SUCCESS' or could indicate an error: */ + return error; + } + + but contains more sophisticated error handling code and allows for some + parameters to be omitted. + + ARGUMENTS + + location The hdf5 group/file in which to put the dataset. + dataset A pointer to a location to store the dataset. + name The name of the existing/new dataset. + rank The rank of the data. + max The (optional) maximum size of each dimension. + chunk The chunk size used if creating a new dataset. + buf An optional buffer with rank elements. + type The type of each data element in the file. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.10 cbf_H5Dcreate + * 2.6.11 cbf_H5Dfind2 + * 2.6.13 cbf_H5Dinsert + * 2.6.14 cbf_H5Dset_extent + * 2.6.15 cbf_H5Dwrite2 + * 2.6.16 cbf_H5Dread2 + * 2.6.17 cbf_H5Drequire_scalar_F64LE2 + * 2.6.18 cbf_H5Drequire_scalar_F64LE2_ULP + * 2.6.19 cbf_H5Drequire_flstring + * 2.6.20 cbf_H5Dfree + + ---------------------------------------------------------------------- + + 2.6.13 cbf_H5Dinsert + + Add some data to a datset, expanding the dataset to the appropriate size + if needed. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Dinsert (const hid_t dataset, const hsize_t *const offset, + const hsize_t *const stride, const hsize_t *const count, hsize_t *const + buf, const void *const value, const hid_t type) + + DESCRIPTION + + Insert a slice of data into dataset with the appropriate offset & + stride, ensuring that no existing data is lost due to resizing the + dataset but not checking that previous data isn't being overwritten. + + The offset, stride, count and buf arrays must each have rank elements. + If stride is set to the null pointer then a default of [1, 1, 1, ..., 1] + will be used. An optional buffer may be provided in buf to avoid using + malloc to allocate a small amount of memory whose size may actually be + known at compile time. + + The value array should contain count[0] * count[1] * ... * count[rank-1] + === product(count) elements of data. + + ARGUMENTS + + dataset The dataset to write the data to. + offset Where to start writing the data. + stride The number of elements in the dataset to step for each element + to be written. + count The number of elements in each dimension to be written. + buf An optional buffer to avoid using the heap for small amounts of + memory. + value The address of the data to be written. + type The type of data in memory. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.10 cbf_H5Dcreate + * 2.6.11 cbf_H5Dfind2 + * 2.6.12 cbf_H5Drequire + * 2.6.14 cbf_H5Dset_extent + * 2.6.15 cbf_H5Dwrite2 + * 2.6.16 cbf_H5Dread2 + * 2.6.17 cbf_H5Drequire_scalar_F64LE2 + * 2.6.18 cbf_H5Drequire_scalar_F64LE2_ULP + * 2.6.19 cbf_H5Drequire_flstring + * 2.6.20 cbf_H5Dfree + + ---------------------------------------------------------------------- + + 2.6.14 cbf_H5Dset_extent + + Change the extent of a chunked dataset to the values in dim. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Dset_extent (const hid_t dataset, const hsize_t *const dim) + + DESCRIPTION + + Forwards to a HDF5 function to change the extent of dataset. The dim + array must have the same number of elements as the rank of the dataset, + but this can't be checked within this function. + + ARGUMENTS + + dataset A handle for the dataset whose extent is to be changed. + dim The new extent of the dataset, if the function succeeds. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.10 cbf_H5Dcreate + * 2.6.11 cbf_H5Dfind2 + * 2.6.12 cbf_H5Drequire + * 2.6.13 cbf_H5Dinsert + * 2.6.15 cbf_H5Dwrite2 + * 2.6.16 cbf_H5Dread2 + * 2.6.17 cbf_H5Drequire_scalar_F64LE2 + * 2.6.18 cbf_H5Drequire_scalar_F64LE2_ULP + * 2.6.19 cbf_H5Drequire_flstring + * 2.6.20 cbf_H5Dfree + + ---------------------------------------------------------------------- + + 2.6.15 cbf_H5Dwrite2 + + Add some data to the specified position in the dataset, without checking + what (if anything) was there before. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Dwrite2 (const hid_t dataset, const hsize_t *const offset, + const hsize_t *const stride, const hsize_t *const count, const void + *const value, const hid_t type) + + DESCRIPTION + + Assumes the dataset has the appropriate size to contain all the data and + overwrites any existing data that may be there. The rank of the dataset + is assumed to be known, and the size of the array parameters is not + tested. When rank is zero - in the case of scalar datasets - the offset, + stride and count parameters are meaningless and should be omitted by + setting them to zero. + + ARGUMENTS + + dataset The dataset to write the data to. + offset Where to start writing the data, as an array of rank numbers. + The number of elements in the dataset to step for each element + stride to be written, where null is equivalent to a stride of [1, 1, 1, + ..., 1], as an array of rank numbers. + count The number of elements in each dimension to be written, as an + array of rank numbers. + value The address of the data to be written. + type The type of data in memory. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.10 cbf_H5Dcreate + * 2.6.11 cbf_H5Dfind2 + * 2.6.12 cbf_H5Drequire + * 2.6.13 cbf_H5Dinsert + * 2.6.14 cbf_H5Dset_extent + * 2.6.16 cbf_H5Dread2 + * 2.6.17 cbf_H5Drequire_scalar_F64LE2 + * 2.6.18 cbf_H5Drequire_scalar_F64LE2_ULP + * 2.6.19 cbf_H5Drequire_flstring + * 2.6.20 cbf_H5Dfree + + ---------------------------------------------------------------------- + + 2.6.16 cbf_H5Dread2 + + Extract some existing data from a dataset at a known position with + memtype. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Dread2 (const hid_t dataset, const hsize_t *const offset, + const hsize_t *const stride, const hsize_t *const count, void *const + value, const hid_t type) + + DESCRIPTION + + Read some data from a given location in the dataset to an existing + location in memory. Does not check the length of the array parameters, + which should all have rank elements or (in some cases) be null. When + rank is zero - in the case of scalar datasets - the offset, stride and + count parameters are meaningless and should be omitted by setting them + to zero. + + ARGUMENTS + + dataset The dataset to read the data from. + offset Where to start writing the data, as an array of rank numbers. + The number of elements in the dataset to step for each element + stride to be written, where null is equivalent to a stride of [1, 1, 1, + ..., 1], as an array of rank numbers. + count The number of elements in each dimension to be written, as an + array of rank numbers. + value The location where the data is to be stored. + type The type of data in memory. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.10 cbf_H5Dcreate + * 2.6.11 cbf_H5Dfind2 + * 2.6.12 cbf_H5Drequire + * 2.6.13 cbf_H5Dinsert + * 2.6.14 cbf_H5Dset_extent + * 2.6.15 cbf_H5Dwrite2 + * 2.6.17 cbf_H5Drequire_scalar_F64LE2 + * 2.6.18 cbf_H5Drequire_scalar_F64LE2_ULP + * 2.6.19 cbf_H5Drequire_flstring + * 2.6.20 cbf_H5Dfree + + ---------------------------------------------------------------------- + + 2.6.17 cbf_H5Drequire_scalar_F64LE2 + + Write a scalar 64-bit floating point number as a dataset with + comparison. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Drequire_scalar_F64LE2 (const hid_t location, hid_t *const + dataset, const char *const name, const double value, int(*cmp)(const + void *, const void *, size_t)) + + DESCRIPTION + + Convenience function using the HDF5 abstraction layer to avoid the need + to consider array-related parameters for a scalar dataset.It ensures + that a scalar 64-bit IEEE floating point dataset exists with the + appropriate name and (for an existing dataset) the correct value as + determined by the comparison function cmp. + + ARGUMENTS + + location The group containing the new dataset. + dataset An optional pointer to a place to store the new dataset. + name The name of the new dataset. + value The value of the new dataset. + cmp A comparison function to test if a previously set value is + equal to the value I asked for. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.10 cbf_H5Dcreate + * 2.6.11 cbf_H5Dfind2 + * 2.6.12 cbf_H5Drequire + * 2.6.13 cbf_H5Dinsert + * 2.6.14 cbf_H5Dset_extent + * 2.6.15 cbf_H5Dwrite2 + * 2.6.16 cbf_H5Dread2 + * 2.6.18 cbf_H5Drequire_scalar_F64LE2_ULP + * 2.6.19 cbf_H5Drequire_flstring + * 2.6.20 cbf_H5Dfree + + ---------------------------------------------------------------------- + + 2.6.18 cbf_H5Drequire_scalar_F64LE2_ULP + + Write a scalar 64-bit floating point number as a dataset with a + user-defined comparison. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Drequire_scalar_F64LE2_ULP (const hid_t location, hid_t *const + dataset, const char *const name, const double value, int(*cmp)(const + void *, const void *, size_t, const void *), const void *const + cmp_params) + + DESCRIPTION + + Convenience function using the HDF5 abstraction layer to avoid the need + to consider array-related parameters for a scalar dataset. It ensures + that a scalar 64-bit IEEE floating point dataset exists with the + appropriate name and (for an existing dataset) the correct value as + determined by the user-supplied comparison function cmp. + + It is implemented using some of the other dataset functions: + + * cbf_H5Dfind2 + * cbf_H5Dcreate + * cbf_H5Dread2 + * cbf_H5Dwrite2 + + ARGUMENTS + + location The group containing the new dataset. + dataset An optional pointer to a place to store the new dataset. + name The name of the new dataset. + value The value of the new dataset. + cmp A comparison function to test if a previously set value is + equal to the value I asked for. + cmp_params Some extra data which may be required by the comparison + function. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.10 cbf_H5Dcreate + * 2.6.11 cbf_H5Dfind2 + * 2.6.12 cbf_H5Drequire + * 2.6.13 cbf_H5Dinsert + * 2.6.14 cbf_H5Dset_extent + * 2.6.15 cbf_H5Dwrite2 + * 2.6.16 cbf_H5Dread2 + * 2.6.17 cbf_H5Drequire_scalar_F64LE2 + * 2.6.19 cbf_H5Drequire_flstring + * 2.6.20 cbf_H5Dfree + + ---------------------------------------------------------------------- + + 2.6.19 cbf_H5Drequire_flstring + + Write a single fixed-length string as a dataset. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Drequire_flstring (const hid_t location, hid_t *const dataset, + const char *const name, const char *const value) + + DESCRIPTION + + Convenience function using the HDF5 abstraction layer to avoid the need + to consider array-related parameters for a scalar dataset and to + automatically set the string type to the correct size. + + ARGUMENTS + + location The group containing the new dataset. + dataset An optional pointer to a place to store the new dataset. + name The name of the new dataset. + value The value of the new dataset. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.10 cbf_H5Dcreate + * 2.6.11 cbf_H5Dfind2 + * 2.6.12 cbf_H5Drequire + * 2.6.13 cbf_H5Dinsert + * 2.6.14 cbf_H5Dset_extent + * 2.6.15 cbf_H5Dwrite2 + * 2.6.16 cbf_H5Dread2 + * 2.6.17 cbf_H5Drequire_scalar_F64LE2 + * 2.6.18 cbf_H5Drequire_scalar_F64LE2_ULP + * 2.6.20 cbf_H5Dfree + + ---------------------------------------------------------------------- + + 2.6.20 cbf_H5Dfree + + Close a HDF5 dataset. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Dfree (const hid_t ID) + + DESCRIPTION + + Attempt to close a dataset, but don't modify the identifier that + described it. + + ARGUMENTS + + ID The HDF5 dataset to be closed. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.10 cbf_H5Dcreate + * 2.6.11 cbf_H5Dfind2 + * 2.6.12 cbf_H5Drequire + * 2.6.13 cbf_H5Dinsert + * 2.6.14 cbf_H5Dset_extent + * 2.6.15 cbf_H5Dwrite2 + * 2.6.16 cbf_H5Dread2 + * 2.6.17 cbf_H5Drequire_scalar_F64LE2 + * 2.6.18 cbf_H5Drequire_scalar_F64LE2_ULP + * 2.6.19 cbf_H5Drequire_flstring + + ---------------------------------------------------------------------- + + 2.6.21 cbf_H5Fopen + + Attempt to open an HDF5 file by file name. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Fopen (hid_t *const file, const char *const name) + + DESCRIPTION + + Will try to open a file of the given name with suitable values for some + of it's properties to make memory leaks less likely. + + Warning: this function will destroy any existing data in the file, do + not pass the name of any file containing data you want to keep. + + ARGUMENTS + + file A pointer to an HDF5 ID where the newly opened file should be + stored. + name The name of the file to attempt to open. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.22 cbf_H5Fclose + + ---------------------------------------------------------------------- + + 2.6.22 cbf_H5Fclose + + Close a HDF5 file. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Fclose (const hid_t ID) + + DESCRIPTION + + Attempt to close a file, but don't modify the identifier that described + it. + + ARGUMENTS + + ID The HDF5 file to be closed. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.21 cbf_H5Fopen + + ---------------------------------------------------------------------- + + 2.6.23 cbf_H5Gcreate + + Attempt to create a group. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Gcreate (const hid_t location, hid_t *const group, const char + *const name) + + DESCRIPTION + + Helper function to attempt to create a HDF5 group identified by name and + return an error code, to make error handling more consistant. This will + fail if a link with the same name already exists in parent. + + ARGUMENTS + + location The group that will contain the newly created group. + group A pointer to a HDF5 ID type where the group will be stored. + name The name that the group will be given. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.24 cbf_H5Gfind + * 2.6.25 cbf_H5Grequire + * 2.6.26 cbf_H5Gfree + + ---------------------------------------------------------------------- + + 2.6.24 cbf_H5Gfind + + Check if a group exists. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Gfind (const hid_t location, hid_t *const group, const char + *const name) + + DESCRIPTION + + Checks for the existance of a group with the given name and parent. Will + return CBF_NOTFOUND if it cannot be found, or open it if it already + exists. An error code will be returned if something other than a group + exists at the specified location. + + ARGUMENTS + + location The group to be searched. + group A pointer to a HDF5 ID type where the group will be stored. + name The path (ie, name) of the group to be found. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.23 cbf_H5Gcreate + * 2.6.25 cbf_H5Grequire + * 2.6.26 cbf_H5Gfree + + ---------------------------------------------------------------------- + + 2.6.25 cbf_H5Grequire + + Ensure a group exists. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Grequire (const hid_t location, hid_t *const group, const char + *const name) + + DESCRIPTION + + Checks for the existance of a group with the given name and parent. Will + create the group if it cannot be found, or open it if it already exists. + It is an error if a matching group cannot be found or created. This uses + cbf_H5Gcreate to create any new groups. + + ARGUMENTS + + location The group that will contain the newly created group. + group A pointer to a HDF5 ID type where the group will be stored. + name The name that the group will be given. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.23 cbf_H5Gcreate + * 2.6.24 cbf_H5Gfind + * 2.6.26 cbf_H5Gfree + + ---------------------------------------------------------------------- + + 2.6.26 cbf_H5Gfree + + Close a HDF5 group. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Gfree (const hid_t ID) + + DESCRIPTION + + Attempt to close a group, but don't modify the identifier that described + it. + + ARGUMENTS + + ID The HDF5 group to be closed. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.23 cbf_H5Gcreate + * 2.6.24 cbf_H5Gfind + * 2.6.25 cbf_H5Grequire + + ---------------------------------------------------------------------- + + 2.6.27 cbf_H5Ivalid + + Check the validity of an object identifier. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Ivalid (const hid_t ID) + + DESCRIPTION + + Function to check validity of a HDF5 identifier. HDF5's predefined types + are never counted as valid by this function, so it can't be used to test + the validity of a type constant. Types obtained by using H5Tcopy are + safe to test. + + ARGUMENTS + + ID An HDF5 object identifier. + + RETURN VALUE + + Non-zero if the type is valid, zero otherwise. + + SEE ALSO + + * 2.6.28 cbf_H5Ocmp + + ---------------------------------------------------------------------- + + 2.6.28 cbf_H5Ocmp + + A missing HDF5 function. + + PROTOTYPE + + #include "cbf_hdf5.h" + htri_t cbf_H5Ocmp (const hid_t id0, const hid_t id1) + + DESCRIPTION + + Compare two HDF5 object ID's for equality. This follows the standard + practice of returning zero if objects should be considered equal, and + the HDF5 practice of returning a negative number if there is an error. + + ARGUMENTS + + id0 An HDF5 identifier. + id1 An HDF5 identifier. + + RETURN VALUE + + 0 if equal, a positive value if not equal, or a negative value if there + is an error. + + SEE ALSO + + * 2.6.27 cbf_H5Ivalid + + ---------------------------------------------------------------------- + + 2.6.29 cbf_H5Ofree + + Close a HDF5 object identifier. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Ofree (const hid_t ID) + + DESCRIPTION + + Attempt to close an object identifier of unknown type, but don't modify + the identifier that described it. + + ARGUMENTS + + ID The HDF5 object to be closed. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.28 cbf_H5Ocmp + * 2.6.27 cbf_H5Ivalid + + ---------------------------------------------------------------------- + + 2.6.30 cbf_H5Screate + + Create a dataspace with some given values. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Screate (hid_t *const ID, const int rank, const hsize_t *const + dim, const hsize_t *const max) + + DESCRIPTION + + Helper function which creates a HDF5 dataspace. + + Maximum dimensions can be set to infinity by passing H5S_UNLIMITED in + the appropriate slot of the max parameter. If rank is zero then neither + dim nor max are used and a scalar dataspace is created. If rank is + non-zero and dim is a null pointer then ID will not be modified and the + function will fail. If rank is non-zero and max is a null pointer the + maximum length is set to the current length as given by dim. + + ARGUMENTS + + ID A pointer to a HDF5 identifier that will contain the new dataspace. + rank The number of dimensions of the new dataspace. + dim The current size of each dimension of the dataspace, should be an + array of length rank . + max The maximum size of each dimension, should be an array of length + rank . + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.31 cbf_H5Sfree + + ---------------------------------------------------------------------- + + 2.6.31 cbf_H5Sfree + + Close a HDF5 dataspace identifier. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Sfree (const hid_t ID) + + DESCRIPTION + + Attempt to close a dataspace identifier, but don't modify the identifier + that described it. + + ARGUMENTS + + ID The HDF5 dataspace to be closed. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.30 cbf_H5Screate + + ---------------------------------------------------------------------- + + 2.6.32 cbf_H5Tcreate_string + + Get a HDF5 string datatype to describe a sting of the specified length. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Tcreate_string (hid_t *const type, const size_t len) + + DESCRIPTION + + Convenience function to create a string datatype suitable for use when + storing a string of length len, returning it in the identifier pointed + to by type. + + ARGUMENTS + + type A pointer to a the HDF5 handle of the new datatype, which should be + free'd with cbf_H5Tfree + len The length of the string datatype - should be strlen() or + H5T_VARIABLE + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.33 cbf_H5Tfree + + ---------------------------------------------------------------------- + + 2.6.33 cbf_H5Tfree + + Close a HDF5 datatype identifier. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_H5Tfree (const hid_t ID) + + DESCRIPTION + + Attempt to close a datatype identifier, but don't modify the identifier + that described it. + + ARGUMENTS + + ID The HDF5 datatype to be closed. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.6.32 cbf_H5Tcreate_string + + ---------------------------------------------------------------------- + +2.7 High-level NeXus-related functions + + These functions primarily allow interaction with a cbf_h5handle without + being exposed to its structure or the complexities of using it + correctly. Wherever possible these functions should be used instead of + directly accessing a cbf_h5handle or cbf_config_t in order make code + easier to read, to maintain the integrity of the data structures and to + ensure all resources allocated to these object are correctly cleaned up. + + This section describes functions available for working with: + + * CBF's HDF5 handles: + * 2.7.1 cbf_h5handle_get_file + * 2.7.2 cbf_h5handle_set_file + * 2.7.3 cbf_h5handle_get_entry + * 2.7.4 cbf_h5handle_set_entry + * 2.7.5 cbf_h5handle_require_entry + * 2.7.6 cbf_h5handle_require_entry_definition + * 2.7.7 cbf_h5handle_get_sample + * 2.7.8 cbf_h5handle_set_sample + * 2.7.9 cbf_h5handle_require_sample + * 2.7.10 cbf_h5handle_get_beam + * 2.7.11 cbf_h5handle_set_beam + * 2.7.12 cbf_h5handle_require_beam + * 2.7.13 cbf_h5handle_get_instrument + * 2.7.14 cbf_h5handle_set_instrument + * 2.7.15 cbf_h5handle_find_instrument + * 2.7.16 cbf_h5handle_require_instrument + * 2.7.17 cbf_h5handle_get_detector + * 2.7.18 cbf_h5handle_set_detector + * 2.7.19 cbf_h5handle_find_detector + * 2.7.20 cbf_h5handle_require_detector + * 2.7.21 cbf_h5handle_get_goniometer + * 2.7.22 cbf_h5handle_set_goniometer + * 2.7.23 cbf_h5handle_require_goniometer + * 2.7.24 cbf_h5handle_get_monochromator + * 2.7.25 cbf_h5handle_set_monochromator + * 2.7.26 cbf_h5handle_require_monochromator + * 2.7.27 cbf_h5handle_get_source + * 2.7.28 cbf_h5handle_set_source + * 2.7.29 cbf_h5handle_require_source + * 2.7.30 cbf_free_h5handle + * 2.7.31 cbf_create_h5handle3 + * 2.7.32 cbf_write_cbf_h5file + * 2.7.33 cbf_write_cbf2nx + * 2.7.34 cbf_write_minicbf_h5file + * 2.7.35 cbf_write_nx2cbf + * miniCBF configuration settings: + * 2.7.36 cbf_config_create + * 2.7.37 cbf_config_parse + * 2.7.38 cbf_config_free + * 2.7.39 cbf_config_strerror + + Reading miniCBF configuration settings + + This example demonstrates how a miniCBF configuration file should be + parsed, what should be checked before the extracted settings are used + and what should be cleaned up by the caller afterwards: + + /* Declare some important variables */ + int configError = cbf_configError_success; + FILE * configFile = fopen("config.txt","r"); + cbf_config_t * const configSettings = cbf_config_create(); + + /* + Read and check the configuration settings, + writing any error messages to stderr. + */ + configError = cbf_config_parse(configFile,stderr,configSettings); + /* I no longer need to keep the file open */ + fclose(configFile); + + /* Check if I could read the file successfully */ + if (cbf_configError_success != configError) { + fprintf(stderr,"Error parsing configuration file 'config.txt': %s\n", + cbf_config_strerror(configError)); + } else { + /* Use the configuration settings here... */ + } + + /* Clean up the settings to avoid memory leaks */ + cbf_config_free(configSettings); + + ---------------------------------------------------------------------- + + 2.7.1 cbf_h5handle_get_file + + Get the current id of the file within the given handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_get_file (const cbf_h5handle nx, hid_t *const file) + + DESCRIPTION + + Check the handle for the presence of a file, optionally returning it. + + ARGUMENTS + + nx A handle to query for the presence of the requested information. + file A place to store the file (if found), or null if the file isn't + wanted. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.2 cbf_h5handle_set_file + + ---------------------------------------------------------------------- + + 2.7.2 cbf_h5handle_set_file + + Set the id of the file within the given handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_set_file (const cbf_h5handle nx, const hid_t file) + + DESCRIPTION + + Sets the file id within the handle to the given value. Doesn't check or + modify any attributes in any way. + + ARGUMENTS + + nx The handle to add information to. + file The file to be set as the current file id. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.1 cbf_h5handle_get_file + + ---------------------------------------------------------------------- + + 2.7.3 cbf_h5handle_get_entry + + Get the current id and name of the entry group within the given handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_get_entry (const cbf_h5handle nx, hid_t *const group, + const char **const name) + + DESCRIPTION + + Check the handle for the presence of an entry group and its name, + optionally returning any combination of them. The error code + 'CBF_NOTFOUND' will be returned if any of the requested items of data + cannot be found. + + The handle retains ownership of the returned object and/or string, + neither of them should be free'd by the caller. + + ARGUMENTS + + nx A handle to query for the presence of the requested information. + group A place to store the group (if found), or null if the group isn't + wanted. + name A place to store the name of the group (if found), or null if the + name isn't wanted. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.4 cbf_h5handle_set_entry + * 2.7.5 cbf_h5handle_require_entry + + ---------------------------------------------------------------------- + + 2.7.4 cbf_h5handle_set_entry + + Set the id and name of the entry group within the given handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_set_entry (const cbf_h5handle nx, const hid_t group, + const char *const name) + + DESCRIPTION + + Sets the entry group and name within the handle to the given values. + Doesn't check or modify the NX_class attribute in any way. The handle + will take ownership of the group id iff this function succeeds. + + ARGUMENTS + + nx The handle to add information to. + group The group to be set as the current entry group + name The name which the group should be given. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.3 cbf_h5handle_get_entry + * 2.7.5 cbf_h5handle_require_entry + + ---------------------------------------------------------------------- + + 2.7.5 cbf_h5handle_require_entry + + Ensure I have an entry in the hdf5 handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_require_entry (const cbf_h5handle nx, hid_t *const + group, const char *name) + + DESCRIPTION + + This will check if the entry group within the handle matches any + existing group of the same name within the current file. If they don't + match a new group is opened or created and added to the handle. The + NX_class attributes are not checked. + + ARGUMENTS + + nx The HDF5 handle to use. + group An optional pointer to a place where the group should be stored. + name The group name, or null to use the default name of "entry". + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.3 cbf_h5handle_get_entry + * 2.7.4 cbf_h5handle_set_entry + + ---------------------------------------------------------------------- + + 2.7.6 cbf_h5handle_require_entry_definition + + Ensure I have an entry in the hdf5 handle with definition. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_require_entry_definition (const cbf_h5handle nx, hid_t + *const group, const char *name, const char *definition, const char + *version, const char *URL) + + DESCRIPTION + + This will check if the entry group and definition within the handle + matches any existing group of the same name within the current file and + has a definition designation that agrees. If the group name doesn't + match a new group is opened or created and added to the handle. If the + definition does not match, it is replaced with the new one. If the + version attribute does not match it is replaced with the new one. If the + URL> attribute does not match it is replace with the new one. The + NX_class attributes are not checked, but if a new entry is created it + will be created with NX_class NXentry. + + ARGUMENTS + + nx The HDF5 handle to use. + group An optional pointer to a place where the group ID should be + stored. + name The group name, or null to use the default name of "entry". + definition The definition name, or null to not specify a definition + name. + version The version string, or null to not specify a version string. + URL The URL at which the definition is stored, or null to not + specify a URL + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.3 cbf_h5handle_get_entry + * 2.7.4 cbf_h5handle_set_entry + * 2.7.5 cbf_h5handle_require_entry + + ---------------------------------------------------------------------- + + 2.7.7 cbf_h5handle_get_sample + + Get the current id and name of the sample group within the given handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_get_sample (const cbf_h5handle nx, hid_t *const group, + const char **const name) + + DESCRIPTION + + Check the handle for the presence of an sample group and its name, + optionally returning any combination of them. + + ARGUMENTS + + nx A handle to query for the presence of the requested information. + group A place to store the group (if found), or null if the group isn't + wanted. + name A place to store the name of the group (if found), or null if the + name isn't wanted. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.8 cbf_h5handle_set_sample + * 2.7.9 cbf_h5handle_require_sample + + ---------------------------------------------------------------------- + + 2.7.8 cbf_h5handle_set_sample + + Set the id and name of the sample group within the given handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_set_sample (const cbf_h5handle nx, const hid_t group, + const char *const name) + + DESCRIPTION + + Sets the sample group and name within the handle to the given values. + Doesn't check or modify the NX_class attribute in any way. The handle + will take ownership of the group id iff this function succeeds. + + ARGUMENTS + + nx The handle to add information to. + group The group to be set as the current sample group + name The name which the group should be given. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.7 cbf_h5handle_get_sample + * 2.7.9 cbf_h5handle_require_sample + + ---------------------------------------------------------------------- + + 2.7.9 cbf_h5handle_require_sample + + Ensure I have a sample in the hdf5 handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_require_sample (const cbf_h5handle nx, hid_t *const + group, const char *name) + + DESCRIPTION + + This will check if the sample group within the handle matches any + existing group of the same name within the current file. If they don't + match a new group is opened or created and added to the handle. The + NX_class attributes are not checked. + + ARGUMENTS + + nx The HDF5 handle to use. + group An optional pointer to a place where the group should be stored. + name The group name, or null to use the default name of "sample". + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.7 cbf_h5handle_get_sample + * 2.7.8 cbf_h5handle_set_sample + + ---------------------------------------------------------------------- + + 2.7.10 cbf_h5handle_get_beam + + Get the current id and name of the beam group within the given handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_get_beam (const cbf_h5handle nx, hid_t *const group, + const char **const name) + + DESCRIPTION + + Check the handle for the presence of a beam group and its name, + optionally returning any combination of them. The error code + 'CBF_NOTFOUND' will be returned if any of the requested items of data + cannot be found. + + The handle retains ownership of the returned object and/or string, + neither of them should be free'd by the caller. + + ARGUMENTS + + nx A handle to query for the presence of the requested information. + group A place to store the group (if found), or null if the group isn't + wanted. + name A place to store the name of the group (if found), or null if the + name isn't wanted. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.11 cbf_h5handle_set_beam + * 2.7.12 cbf_h5handle_require_beam + + ---------------------------------------------------------------------- + + 2.7.11 cbf_h5handle_set_beam + + Set the id and name of the beam group within the given handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_set_beam (const cbf_h5handle nx, const hid_t group, + const char *const name) + + DESCRIPTION + + Sets the beam group and name within the handle to the given values. + Doesn't check or modify the NX_class attribute in any way. The handle + will take ownership of the group id iff this function succeeds. + + ARGUMENTS + + nx The handle to add information to. + group The group to be set as the current beam group + name The name which the group should be given. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.10 cbf_h5handle_get_beam + * 2.7.12 cbf_h5handle_require_beam + + ---------------------------------------------------------------------- + + 2.7.12 cbf_h5handle_require_beam + + Ensure I have a beam in the hdf5 handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_require_beam (const cbf_h5handle nx, hid_t *const + group, const char *name) + + DESCRIPTION + + This will check if the beam group within the handle matches any existing + group of the same name within the current file. If they don't match a + new group is opened or created and added to the handle. The NX_class + attributes are not checked. + + ARGUMENTS + + nx The HDF5 handle to use. + group An optional pointer to a place where the group should be stored. + name The group name, or null to use the default name of "beam". + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.10 cbf_h5handle_get_beam + * 2.7.11 cbf_h5handle_set_beam + + ---------------------------------------------------------------------- + + 2.7.13 cbf_h5handle_get_instrument + + Get the current id and name of the instrument group within the given + handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_get_instrument (const cbf_h5handle nx, hid_t *const + group, const char **const name) + + DESCRIPTION + + Check the handle for the presence of an instrument group and its name, + optionally returning any combination of them. The error code + 'CBF_NOTFOUND' will be returned if any of the requested items of data + cannot be found. + + The handle retains ownership of the returned object and/or string, + neither of them should be free'd by the caller. + + ARGUMENTS + + nx A handle to query for the presence of the requested information. + group A place to store the group (if found), or null if the group isn't + wanted. + name A place to store the name of the group (if found), or null if the + name isn't wanted. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.14 cbf_h5handle_set_instrument + * 2.7.15 cbf_h5handle_find_instrument + * 2.7.16 cbf_h5handle_require_instrument + + ---------------------------------------------------------------------- + + 2.7.14 cbf_h5handle_set_instrument + + Set the id and name of the instrument group within the given handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_set_instrument (const cbf_h5handle nx, const hid_t + group, const char *const name) + + DESCRIPTION + + Sets the instrument group and name within the handle to the given + values. Doesn't check or modify the NX_class attribute in any way. The + handle will take ownership of the group id iff this function succeeds. + + ARGUMENTS + + nx The handle to add information to. + group The group to be set as the current instrument group + name The name which the group should be given. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.13 cbf_h5handle_get_instrument + * 2.7.15 cbf_h5handle_find_instrument + * 2.7.16 cbf_h5handle_require_instrument + + ---------------------------------------------------------------------- + + 2.7.15 cbf_h5handle_find_instrument + + Find an existing instrument group within the given handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_find_instrument (const cbf_h5handle nx, hid_t *const + group, const char **const name) + + ARGUMENTS + + nx + group + name + + ---------------------------------------------------------------------- + + 2.7.16 cbf_h5handle_require_instrument + + Ensure I have an instrument in the hdf5 handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_require_instrument (const cbf_h5handle nx, hid_t *const + group, const char *name) + + DESCRIPTION + + This will check if the instrument group within the handle matches any + existing group of the same name within the current file. If they don't + match a new group is opened or created and added to the handle. The + NX_class attributes are not checked. + + ARGUMENTS + + nx The HDF5 handle to use. + group An optional pointer to a place where the group should be stored. + name The group name, or null to use the default name of "instrument". + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.13 cbf_h5handle_get_instrument + * 2.7.14 cbf_h5handle_set_instrument + * 2.7.15 cbf_h5handle_find_instrument + + ---------------------------------------------------------------------- + + 2.7.17 cbf_h5handle_get_detector + + Get the current id and name of the detector group within the given + handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_get_detector (const cbf_h5handle nx, hid_t *const + group, const char **const name) + + DESCRIPTION + + Check the handle for the presence of an detector group and its name, + optionally returning any combination of them. The error code + 'CBF_NOTFOUND' will be returned if any of the requested items of data + cannot be found. + + The handle retains ownership of the returned object and/or string, + neither of them should be free'd by the caller. + + ARGUMENTS + + nx A handle to query for the presence of the requested information. + group A place to store the group (if found), or null if the group isn't + wanted. + name A place to store the name of the group (if found), or null if the + name isn't wanted. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.18 cbf_h5handle_set_detector + * 2.7.19 cbf_h5handle_find_detector + * 2.7.20 cbf_h5handle_require_detector + + ---------------------------------------------------------------------- + + 2.7.18 cbf_h5handle_set_detector + + Set the id and name of the detector group within the given handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_set_detector (const cbf_h5handle nx, const hid_t group, + const char *const name) + + DESCRIPTION + + Sets the detector group and name within the handle to the given values. + Doesn't check or modify the NX_class attribute in any way. The handle + will take ownership of the group id iff this function succeeds. + + ARGUMENTS + + nx The handle to add information to. + group The group to be set as the current detector group + name The name which the group should be given. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.17 cbf_h5handle_get_detector + * 2.7.19 cbf_h5handle_find_detector + * 2.7.20 cbf_h5handle_require_detector + + ---------------------------------------------------------------------- + + 2.7.19 cbf_h5handle_find_detector + + Find an existing detector group within the given handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_find_detector (const cbf_h5handle nx, hid_t *const + group, const char **const name) + + ARGUMENTS + + nx + group + name + + ---------------------------------------------------------------------- + + 2.7.20 cbf_h5handle_require_detector + + Ensure I have a detector in the hdf5 handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_require_detector (const cbf_h5handle nx, hid_t *const + group, const char *name) + + DESCRIPTION + + This will check if the detector group within the handle matches any + existing group of the same name within the current file. If they don't + match a new group is opened or created and added to the handle. The + NX_class attributes are not checked. + + ARGUMENTS + + nx The HDF5 handle to use. + group An optional pointer to a place where the group should be stored. + name The group name, or null to use the default name of "detector". + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.17 cbf_h5handle_get_detector + * 2.7.18 cbf_h5handle_set_detector + * 2.7.19 cbf_h5handle_find_detector + + ---------------------------------------------------------------------- + + 2.7.21 cbf_h5handle_get_goniometer + + Get the current id and name of the goniometer group within the given + handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_get_goniometer (const cbf_h5handle nx, hid_t *const + group, const char **const name) + + DESCRIPTION + + Check the handle for the presence of an goniometer group and its name, + optionally returning any combination of them. The error code + 'CBF_NOTFOUND' will be returned if any of the requested items of data + cannot be found. + + The handle retains ownership of the returned object and/or string, + neither of them should be free'd by the caller. + + ARGUMENTS + + nx A handle to query for the presence of the requested information. + group A place to store the group (if found), or null if the group isn't + wanted. + name A place to store the name of the group (if found), or null if the + name isn't wanted. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.22 cbf_h5handle_set_goniometer + * 2.7.23 cbf_h5handle_require_goniometer + + ---------------------------------------------------------------------- + + 2.7.22 cbf_h5handle_set_goniometer + + Set the id and name of the goniometer group within the given handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_set_goniometer (const cbf_h5handle nx, const hid_t + group, const char *const name) + + DESCRIPTION + + Sets the goniometer group and name within the handle to the given + values. Doesn't check or modify the NX_class attribute in any way. The + handle will take ownership of the group id iff this function succeeds. + + ARGUMENTS + + nx The handle to add information to. + group The group to be set as the current goniometer group + name The name which the group should be given. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.21 cbf_h5handle_get_goniometer + * 2.7.23 cbf_h5handle_require_goniometer + + ---------------------------------------------------------------------- + + 2.7.23 cbf_h5handle_require_goniometer + + Ensure I have a goniometer in the hdf5 handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_require_goniometer (const cbf_h5handle nx, hid_t *const + group, const char *name) + + DESCRIPTION + + This will check if the goniometer group within the handle matches any + existing group of the same name within the current file. If they don't + match a new group is opened or created and added to the handle. The + NX_class attributes are not checked. + + ARGUMENTS + + nx The HDF5 handle to use. + group An optional pointer to a place where the group should be stored. + name The group name, or null to use the default name of "goniometer". + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.21 cbf_h5handle_get_goniometer + * 2.7.22 cbf_h5handle_set_goniometer + + ---------------------------------------------------------------------- + + 2.7.24 cbf_h5handle_get_monochromator + + Get the current id and name of the monochromator group within the given + handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_get_monochromator (const cbf_h5handle nx, hid_t *const + group, const char **const name) + + DESCRIPTION + + Check the handle for the presence of an monochromator group and its + name, optionally returning any combination of them. The error code + 'CBF_NOTFOUND' will be returned if any of the requested items of data + cannot be found. + + The handle retains ownership of the returned object and/or string, + neither of them should be free'd by the caller. + + ARGUMENTS + + nx A handle to query for the presence of the requested information. + group A place to store the group (if found), or null if the group isn't + wanted. + name A place to store the name of the group (if found), or null if the + name isn't wanted. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.25 cbf_h5handle_set_monochromator + * 2.7.26 cbf_h5handle_require_monochromator + + ---------------------------------------------------------------------- + + 2.7.25 cbf_h5handle_set_monochromator + + Set the id and name of the monochromator group within the given handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_set_monochromator (const cbf_h5handle nx, const hid_t + group, const char *const name) + + DESCRIPTION + + Sets the monochromator group and name within the handle to the given + values. Doesn't check or modify the NX_class attribute in any way. The + handle will take ownership of the group id iff this function succeeds. + + ARGUMENTS + + nx The handle to add information to. + group The group to be set as the current monochromator group + name The name which the group should be given. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.24 cbf_h5handle_get_monochromator + * 2.7.26 cbf_h5handle_require_monochromator + + ---------------------------------------------------------------------- + + 2.7.26 cbf_h5handle_require_monochromator + + Ensure I have a monochromator in the hdf5 handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_require_monochromator (const cbf_h5handle nx, hid_t + *const group, const char *name) + + DESCRIPTION + + This will check if the monochromator group within the handle matches any + existing group of the same name within the current file. If they don't + match a new group is opened or created and added to the handle. The + NX_class attributes are not checked. + + ARGUMENTS + + nx The HDF5 handle to use. + group An optional pointer to a place where the group should be stored. + name The group name, or null to use the default name of + "monochromator". + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.24 cbf_h5handle_get_monochromator + * 2.7.25 cbf_h5handle_set_monochromator + + ---------------------------------------------------------------------- + + 2.7.27 cbf_h5handle_get_source + + Get the current id and name of the source group within the given handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_get_source (const cbf_h5handle nx, hid_t *const group, + const char **const name) + + DESCRIPTION + + Check the handle for the presence of an source group and its name, + optionally returning any combination of them. The error code + 'CBF_NOTFOUND' will be returned if any of the requested items of data + cannot be found. + + The handle retains ownership of the returned object and/or string, + neither of them should be free'd by the caller. + + ARGUMENTS + + nx A handle to query for the presence of the requested information. + group A place to store the group (if found), or null if the group isn't + wanted. + name A place to store the name of the group (if found), or null if the + name isn't wanted. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.28 cbf_h5handle_set_source + * 2.7.29 cbf_h5handle_require_source + + ---------------------------------------------------------------------- + + 2.7.28 cbf_h5handle_set_source + + Set the id and name of the source group within the given handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_set_source (const cbf_h5handle nx, const hid_t group, + const char *const name) + + DESCRIPTION + + Sets the source group and name within the handle to the given values. + Doesn't check or modify the NX_class attribute in any way. The handle + will take ownership of the group id iff this function succeeds. + + ARGUMENTS + + nx The handle to add information to. + group The group to be set as the current source group + name The name which the group should be given. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.27 cbf_h5handle_get_source + * 2.7.29 cbf_h5handle_require_source + + ---------------------------------------------------------------------- + + 2.7.29 cbf_h5handle_require_source + + Ensure I have a source in the hdf5 handle. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_h5handle_require_source (const cbf_h5handle nx, hid_t *const + group, const char *name) + + DESCRIPTION + + This will check if the source group within the handle matches any + existing group of the same name within the current file. If they don't + match a new group is opened or created and added to the handle. The + NX_class attributes are not checked. + + ARGUMENTS + + nx The HDF5 handle to use. + group An optional pointer to a place where the group should be stored. + name The group name, or null to use the default name of "source". + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.27 cbf_h5handle_get_source + * 2.7.28 cbf_h5handle_set_source + + ---------------------------------------------------------------------- + + 2.7.30 cbf_free_h5handle + + Free a handle for an HDF5 file. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_free_h5handle (cbf_h5handle h5handle) + + DESCRIPTION + + Checks if the handle appears to be valid, the free's the handle and any + data that the handle owns. + + ARGUMENTS + + h5handle The handle to be free'd. + + RETURN VALUE + + An error code + + SEE ALSO + + * 2.7.31 cbf_create_h5handle3 + + ---------------------------------------------------------------------- + + 2.7.31 cbf_create_h5handle3 + + Allocates space for a HDF5 file handle and associates it with the given + file. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_create_h5handle3 (cbf_h5handle *handle, hid_t file) + + DESCRIPTION + + This function expects the user to create or open a hdf5 file with the + appropriate parameters for what they are trying to do, replacing older + functions which would create a file with the H5F_ACC_TRUNC flag and + H5F_CLOSE_STRONG property. + + ARGUMENTS + + handle A pointer to a handle which is to be allocated. + file A HDF5 file to store within the newly created handle. + + RETURN VALUE + + An error code + + SEE ALSO + + * 2.7.30 cbf_free_h5handle + + ---------------------------------------------------------------------- + + 2.7.32 cbf_write_cbf_h5file + + Extract the data from a CBF file & put it into a NeXus file. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_write_cbf_h5file (cbf_handle handle, cbf_h5handle h5handle) + + DESCRIPTION + + Equivalent to cbf_write_cbf2nx(handle,h5handle,0,0,0). + + ARGUMENTS + + handle The CBF file to extract data from. + h5handle The NeXuS file to write data to. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.34 cbf_write_minicbf_h5file + * 2.7.33 cbf_write_cbf2nx + * 2.7.35 cbf_write_nx2cbf + + ---------------------------------------------------------------------- + + 2.7.33 cbf_write_cbf2nx + + Extract the data from a CBF file & put it into a NeXus file. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_write_cbf2nx (cbf_handle handle, cbf_h5handle h5handle, const + char *const datablock, const char *const scan, const int list) + + DESCRIPTION + + Extracts data from handle and generates a NeXus file in h5handle. This + will attempt to extract metadata and image data from each scan (or the + named scan) within each datablock (or the the named datablock) and + insert it into a given index into the NXentry group specified in + h5handle. + + Each scan in the CBF file corresponds to one NXentry in NeXus, so a CBF + datablock with multiple scans must be converted by calling this function + with the appropriate value of scan once for each scan in the datablock. + + The flags (within h5handle) determine: + + * Compression algorithm: zlib/CBF/none + * Plugin registration method: automatic/manual + + The strings given by h5handle->scan_id and h5handle->sample_id define: + + * The presence and value of an identifier for the scan, stored in + /*:NXentry/entry_identifier. + * The presence and value of an identifier for the sample, stored in + /*:NXentry/*:NXsample/sample_identifier. + + ARGUMENTS + + handle The CBF file to extract data from. + h5handle The NeXuS file to write data to. + datablock The name of the datablock to convert, or NULL to convert all + datablocks. + scan The name of the scan to convert, or NULL if there is only one + scan in the datablock. + list Boolean flag to determine if a list of processed items is + printed. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.32 cbf_write_cbf_h5file + * 2.7.34 cbf_write_minicbf_h5file + * 2.7.35 cbf_write_nx2cbf + + ---------------------------------------------------------------------- + + 2.7.34 cbf_write_minicbf_h5file + + Extract the data from a miniCBF file & put it into a NeXus file. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_write_minicbf_h5file (cbf_handle handle, cbf_h5handle h5handle, + const cbf_config_t *const axisConfig) + + DESCRIPTION + + Extracts the miniCBF data directly - by parsing the header - and uses + that plus the configuration options from axisConfig to generate a NeXus + file in h5handle. This can extract metadata and image data from miniCBF + files containing multiple datablocks which each contain a single image + and insert it into a given index into the NXentry group specified in + h5handle. + + Currently, only Pilatus 1.2 format headers are supported. + + The flags determine: + + * Compression algorithm: zlib/CBF/none + * Plugin registration method: automatic/manual + + ARGUMENTS + + handle The miniCBF file to extract data from. + h5handle The NeXus file to write data to. + axisConfig The configuration settings desribing the axes and their + relation to the sample and to each other. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.32 cbf_write_cbf_h5file + * 2.7.35 cbf_write_nx2cbf + + ---------------------------------------------------------------------- + + 2.7.35 cbf_write_nx2cbf + + Extract data from a nexus file and store it in a CBF file. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_write_nx2cbf (cbf_h5handle nx, cbf_handle cbf) + + DESCRIPTION + + Reads NeXus-format data from the entry group defined in the nx handle, + extracting data related to the frame with index nx->slice and in + CBF-format within the the cbf handle. + + ARGUMENTS + + nx The handle defining the NeXus data to be converted. + cbf The handle in which to store the resulting CBF data. + + RETURN VALUE + + An error code. + + SEE ALSO + + * 2.7.32 cbf_write_cbf_h5file + * 2.7.34 cbf_write_minicbf_h5file + + ---------------------------------------------------------------------- + + 2.7.36 cbf_config_create + + Obtain a new handle for some configuration settings. + + PROTOTYPE + + #include "cbf_hdf5.h" + cbf_config_t* cbf_config_create () + + DESCRIPTION + + Allocates a new collection of configuration settings on the heap, and + initialises it. The returned pointer should be destroyed by the caller. + + ARGUMENTS + + This function takes no arguments. + + RETURN VALUE + + A newly allocated object for miniCBF configuration settings, or NULL. + + ---------------------------------------------------------------------- + + 2.7.37 cbf_config_parse + + Read a minicbf configuration file into the given handle, writing errors + to logfile. + + PROTOTYPE + + #include "cbf_hdf5.h" + int cbf_config_parse (FILE *const configFile, FILE *const logFile, + cbf_config_t *const vec) + + DESCRIPTION + + Parses a configuration file to extract a collection of configuration + settings for a miniCBF file, storing them in the given configuration + settings object. The pointer should have been obtained by a call to + cbf_config_create. The configuration file format is described in the + minicbf2nexus documentation. + + ARGUMENTS + + configFile The file from which the config settings should be read. + logFile A stream to be used for logging error messages. + vec An object describing the configuration settings. + + RETURN VALUE + + A parser error code. + + ---------------------------------------------------------------------- + + 2.7.38 cbf_config_free + + Free any heap memory associated with the given + cbf_hdf5_configItemVectorhandle object. + + PROTOTYPE + + #include "cbf_hdf5.h" + void cbf_config_free (const cbf_config_t *const vector) + + DESCRIPTION + + Destroys an existing collection of configuration settings. The settings + should have been obtained by a call to cbf_config_create. + + ARGUMENTS + + vector The configuration data to be free'd. + + RETURN VALUE + + Nothing. + + ---------------------------------------------------------------------- + + 2.7.39 cbf_config_strerror + + Convert a parse error to a descriptive string. + + PROTOTYPE + + #include "cbf_hdf5.h" + const char* cbf_config_strerror (const int error) + + DESCRIPTION + + The returned string is "none" for success, "unknown error" if the given + error code is not recognised and a non-empty string briefly describing + the error otherwise. + + The returned string must not be free'd. + + ARGUMENTS + + error An error returned by a cbf_config_* function. + + RETURN VALUE + + A string describing the error. + + ---------------------------------------------------------------------- + + 3. File format + + 3.1 General description + + With the exception of the binary sections, a CBF file is an mmCIF-format + ASCII file, so a CBF file with no binary sections is a CIF file. An + imgCIF file has any binary sections encoded as CIF-format ASCII strings + and is a CIF file whether or not it contains binary sections. In most + cases, CBFlib can also be used to access normal CIF files as well as CBF + and imgCIF files. + + 3.2 Format of the binary sections + + Before getting to the binary data itself, there are some preliminaries + to allow a smooth transition from the conventions of CIF to those of raw + or encoded streams of "octets" (8-bit bytes). The binary data is given + as the essential part of a specially formatted semicolon-delimited CIF + multi-line text string. This text string is the value associated with + the tag "_array_data.data". + + The specific format of the binary sections differs between an imgCIF and + a CBF file. + + 3.2.1 Format of imgCIF binary sections + + Each binary section is encoded as a semicolon-delimited string. Within + the text string, the conventions developed for transmitting email + messages including binary attachments are followed. There is secondary + ASCII header information, formatted as Multipurpose Internet Mail + Extensions (MIME) headers (see RFCs 2045-49 by Freed, et al.). The + boundary marker for the beginning of all this is the special string + + --CIF-BINARY-FORMAT-SECTION-- + + at the beginning of a line. The initial "--" says that this is a MIME + boundary. We cannot put "###" in front of it and conform to MIME + conventions. Immediately after the boundary marker are MIME headers, + describing some useful information we will need to process the binary + section. MIME headers can appear in different orders, and can be very + confusing (look at the raw contents of a email message with + attachments), but there is only one header which is has to be understood + to process an imgCIF: "Content-Transfer-Encoding". If the value given on + this header is "BINARY", this is a CBF and the data will be presented as + raw binary, containing a count (in the header described in 3.2.2 Format + of CBF binary sections) so that we'll know when to start looking for + more information. + + If the value given for "Content-Transfer-Encoding" is one of the real + encodings: "BASE64", "QUOTED-PRINTABLE", "X-BASE8", "X-BASE10" or + "X-BASE16", the file is an imgCIF, and we'll need some other headers to + process the encoded binary data properly. It is a good practice to give + headers in all cases. The meanings of various encodings is given in the + CBF extensions dictionary, cif_img_1.5.4.dic, as one html file, or as + separate pages for each defintion. + + For certain compressions (e.g. CBF_PACKED) MIME headers are essential to + determine the parameters of the compression. The full list of MIME + headers recognized by and generated by CBFlib is: + + * Content-Type: + * Content-Transfer-Encoding: + * Content-MD5: + * X-Binary-Size: + * X-Binary-ID: + * X-Binary-Element-Type: + * X-Binary-Element-Byte-Order: + * X-Binary-Number-of-Elements: + * X-Binary-Size-Fastest-Dimension: + * X-Binary-Size-Second-Dimension: + * X-Binary-Size-Third-Dimension: + * X-Binary-Size-Padding: + + * Content-Type: + + The "Content-Type" header tells us what sort of data we + have (currently always "application/octet-stream" for a + miscellaneous stream of binary data) and, optionally, the + conversions that were applied to the original data. The default is + to compress the data with the "CBF-PACKED" algorithm. The + Content-Type may be any of the discrete types permitted in RFC 2045; + 'application/octet-stream' is recommended. If an octet stream was + compressed, the compression should be specified by the parameter + 'conversions="X-CBF_PACKED"' or the parameter + 'conversions="X-CBF_PACKED_V2"' or the parameter + 'conversions="X-CBF_CANONICAL"' or the parameter + 'conversions="X-CBF_BYTE_OFFSET"' or the parameter + 'conversions="X-CBF_NIBBLE_OFFSET"' + + If the parameter 'conversions="X-CBF_PACKED"' or + 'conversions="X-CBF_PACKED_V2"' is given it may be further modified + with the parameters '"uncorrelated_sections"' or '"flat"' + + If the '"uncorrelated_sections"' parameter is given, each section + will be compressed without using the prior section for averaging. If + the '"flat"' parameter is given, each the image will be treated as + one long row. + + * Content-Transfer-Encoding: + + The "Content-Transfer-Encoding" may be 'BASE64', 'Quoted-Printable', + 'X-BASE8', 'X-BASE10', 'X-BASE16' or 'X-BASE32K', for an imgCIF or + 'BINARY' for a CBF. The octal, decimal and hexadecimal transfer + encodings are provided for convenience in debugging and are not + recommended for archiving and data interchange. + + In a CIF, one of the parameters 'charset=us-ascii', 'charset=utf-8' + or 'charset=utf-16' may be used on the Content-Transfer-Encoding to + specify the character set used for the external presentation of the + encoded data. If no charset parameter is given, the character set of + the enclosing CIF is assumed. In any case, if a BOM flag is detected + (FE FF for big-endian UTF-16, FF FE for little-endian UTF-16 or EF + BB BF for UTF-8) is detected, the indicated charset will be assumed + until the end of the encoded data or the detection of a different + BOM. The charset of the Content-Transfer-Encoding is not the + character set of the encoded data, only the character set of the + presentation of the encoded data and should be respecified for each + distinct STAR string. + + In an imgCIF file, the encoded binary data begins after the empty + line terminating the header. In an imgCIF file, the encoded binary + data ends with the terminating boundary delimiter + '\n--CIF-BINARY-FORMAT-SECTION----' in the currently effective + charset or with the '\n; ' that terminates the STAR string. + + In a CBF, the raw binary data begins after an empty line terminating + the header and after the sequence: + + Octet Hex Decimal Purpose + 0 0C 12 (ctrl-L) Page break + 1 1A 26 (ctrl-Z) Stop listings in MS-DOS + 2 04 04 (Ctrl-D) Stop listings in UNIX + 3 D5 213 Binary section begins + + None of these octets are included in the calculation of the message + size or in the calculation of the message digest. + + * Content-MD5: + + An MD5 message digest may, optionally, be used. The 'RSA Data + Security, Inc. MD5 Message-Digest Algorithm' should be used. No + portion of the header is included in the calculation of the message + digest. The optional "Content-MD5" header provides a much more + sophisticated check on the integrity of the binary data than size + checks alone can provide. + + * X-Binary-Size: + + The "X-Binary-Size" header specifies the size of the equivalent + binary data in octets. This is the size after any compressions, but + before any ascii encodings. This is useful in making a simple check + for a missing portion of this file. The 8 bytes for the Compression + type (see below) are not counted in this field, so the value of + "X-Binary-Size" is 8 less than the quantity in bytes 12-19 of the + raw binary data ( 3.2.2 Format of CBF binary sections). + + * X-Binary-ID: + + The "X-Binary-ID" header should contain the same value as was given + for "_array_data.binary_id". + + * X-Binary-Element-Type: + + The "X-Binary-Element-Type" header specifies the type of binary data + in the octets, using the same descriptive phrases as in + _array_structure.encoding_type. The default value is 'unsigned + 32-bit integer'. + + * X-Binary-Element-Byte-Order: + + The "X-Binary-Element-Byte-Order" can specify either '"BIG_ENDIAN"' + or '"LITTLE_ENDIAN"' byte order of the image data. CBFlib only + writes '"LITTLE_ENDIAN"', and in general can only process + LITTLE_ENDIAN even on machines that are BIG_ENDIAN. + + * X-Binary-Number-of-Elements: + + The "X-Binary-Number-of-Elements" specifies the number of elements + (not the number of octets) in the decompressed, decoded image. + + * X-Binary-Size-Fastest-Dimension: + + The optional "X-Binary-Size-Fastest-Dimension" specifies the number + of elements (not the number of octets) in one row of the fastest + changing dimension of the binary data array. This information must + be in the MIME header for proper operation of some of the + decompression algorithms. + + * X-Binary-Size-Second-Dimension: + + The optional "X-Binary-Size-Second-Dimension" specifies the number + of elements (not the number of octets) in one column of the + second-fastest changing dimension of the binary data array. This + information must be in the MIME header for proper operation of some + of the decompression algorithms. + + * X-Binary-Size-Third-Dimension: + + The optional "X-Binary-Size-Third-Dimension" specifies the number of + sections for the third-fastest changing dimension of the binary data + array. + + * X-Binary-Size-Padding: + + The optional "X-Binary-Size-Padding" specifies the size in octets of + an optional padding after the binary array data and before the + closing flags for a binary section. CBFlib always writes this + padding as zeros, but this information should be in the MIME header + for a binary section that uses padding, especially if non-zero + padding is used. + + A blank line separator immediately precedes the start of the encoded + binary data. Blank spaces may be added prior to the preceding "line + separator" if desired (e.g. to force word or block alignment). + + Because CBFLIB may jump forward in the file from the MIME header, the + length of encoded data cannot be greater than the value defined by + "X-Binary-Size" (except when "X-Binary-Size" is zero, which means that + the size is unknown), unless "X-Binary-Size-Padding" is specified to + allow for the padding. At exactly the byte following the full binary + section as defined by the length and padding values is the end of binary + section identifier. This consists of the line-termination sequence + followed by: + + --CIF-BINARY-FORMAT-SECTION---- + ; + + with each of these lines followed by a line-termination sequence. This + brings us back into a normal CIF environment. This identifier is, in a + sense, redundant because the binary data length value tells the a + program how many bytes to jump over to the end of the binary data. This + redundancy has been deliberately added for error checking, and for + possible file recovery in the case of a corrupted file and this + identifier must be present at the end of every block of binary data. + + 3.2.2 Format of CBF binary sections + + In a CBF file, each binary section is encoded as a ;-delimited string, + starting with an arbitrary number of pure-ASCII characters. + + Note: For historical reasons, CIFlib has the option of writing simple + header and footer sections: "START OF BINARY SECTION" at the start of a + binary section and "END OF BINARY SECTION" at the end of a binary + section, or writing MIME-type header and footer sections (3.2.1 Format + of imgCIF binary sections). If the simple header is used, the actual + ASCII text is ignored when the binary section is read. Use of the simple + binary header is deprecated. + + The MIME header is recommended. + + Between the ASCII header and the actual CBF binary data is a series of + bytes ("octets") to try to stop the listing of the header, bytes which + define the binary identifier which should match the "binary_id" defined + in the header, and bytes which define the length of the binary section. + + Octet Hex Decimal Purpose + 1 0C 12 (ctrl-L) End of Page + 2 1A 26 (ctrl-Z) Stop listings in MS-DOS + 3 04 04 (Ctrl-D) Stop listings in UNIX + 4 D5 213 Binary section begins + 5..5+n-1 Binary data (n octets) + + NOTE: When a MIME header is used, only bytes 5 through 5+n-1 are + considered in computing the size and the message digest, and only these + bytes are encoded for the equivalent imgCIF file using the indicated + Content-Transfer-Encoding. + + If no MIME header has been requested (a deprecated use), then bytes 5 + through 28 are used for three 8-byte words to hold the binary_id, the + size and the compression type: + + 5..12 Binary Section Identifier + (See _array_data.binary_id) + 64-bit, little endian + 13..20 The size (n) of the + binary section in octets + (i.e. the offset from octet + 29 to the first byte following + the data) + 21..28 Compression type: + + CBF_NONE 0x0040 (64) + CBF_CANONICAL 0x0050 (80) + CBF_PACKED 0x0060 (96) + CBF_PACKED_V2 0x0090 (144) + CBF_BYTE_OFFSET 0x0070 (112) + CBF_NIBBLE_OFFSET 0x00A0 (160) + CBF_PREDICTOR 0x0080 (128) + ... + + The binary data then follows in bytes 29 through 29+n-1. + + The binary characters serve specific purposes: + + o The Control-L (from-feed) will terminate printing of the current + page on most operating systems. + + o The Control-Z will stop the listing of the file on MS-DOS type + operating systems. + + o The Control-D will stop the listing of the file on Unix type + operating systems. + + o The unsigned byte value 213 (decimal) is binary 11010101. (Octal + 325, and hexadecimal D5). This has the eighth bit set so can be used + for error checking on 7-bit transmission. It is also asymmetric, but + with the first bit also set in the case that the bit order could be + reversed (which is not a known concern). + + o (The carriage return, line-feed pair before the START_OF_BIN and + other lines can also be used to check that the file has not been + corrupted e.g. by being sent by ftp in ASCII mode.) + + At present four compression schemes are implemented are defined: + CBF_NONE (for no compression), CBF_CANONICAL (for and entropy-coding + scheme based on the canonical-code algorithm described by Moffat, et + al. (International Journal of High Speed Electronics and Systems, + Vol 8, No 1 (1997) 179-231)), CBF_PACKED or CBF_PACKED_V2 for J. P. + Abrahams CCP4-style packing schemes and CBF_BYTE_OFFSET for a simple + byte_offset compression scheme.. Other compression schemes will be + added to this list in the future. + + For historical reasons, CBFlib can read or write a binary string without + a MIME header. The structure of a binary string with simple headers is: + + Byte ASCII Decimal Description + symbol value + 1 ; 59 Initial ; delimiter + 2 carriage-return 13 + 3 line-feed 10 The CBF new-line code is + carriage-return, line-feed + 4 S 83 + 5 T 84 + 6 A 65 + 7 R 83 + 8 T 84 + 9 32 + 10 O 79 + 11 F 70 + 12 32 + 13 B 66 + 14 I 73 + 15 N 78 + 16 A 65 + 17 R 83 + 18 Y 89 + 19 32 + 20 S 83 + 21 E 69 + 22 C 67 + 23 T 84 + 24 I 73 + 25 O 79 + 26 N 78 + 27 carriage-return 13 + 28 line-feed 10 + 29 form-feed 12 + 30 substitute 26 Stop the listing of the file + in MS-DOS + 31 end-of-transmission 4 Stop the listing of the file + in unix + 32 213 First non-ASCII value + 33 .. 40 Binary section identifier + (64-bit little-endien) + 41 .. 48 Offset from byte 57 to the + first ASCII character + following the binary data + 49 .. 56 Compression type + 57 .. 57 + n-1 Binary data (nbytes) + 57 + n carriage-return 13 + 58 + n line-feed 10 + 59 + n E 69 + 60 + n N 78 + 61 + n D 68 + 62 + n 32 + 63 + n O 79 + 64 + n F 70 + 65 + n 32 + 66 + n B 66 + 67 + n I 73 + 68 + n N 78 + 69 + n A 65 + 70 + n R 83 + 71 + n Y 89 + 72 + n 32 + 73 + n S 83 + 74 + n E 69 + 75 + n C 67 + 76 + n T 84 + 77 + n I 73 + 78 + n O 79 + 79 + n N 78 + 80 + n carriage-return 13 + 81 + n line-feed 10 + 82 + n ; 59 Final ; delimiter + + 3.3 Compression schemes + + Two schemes for lossless compression of integer arrays (such as images) + have been implemented in this version of CBFlib: + + 1. An entropy-encoding scheme using canonical coding + 2. A CCP4-style packing scheme. 3. A simple and efficient byte-offset + compression. 4. A slightly more complex nibble-offset compression. + + All encode the difference (or error) between the current element in the + array and the prior element or neighboring elements. + + 3.3.1 Canonical-code compression + + The canonical-code compression scheme encodes errors in two ways: + directly or indirectly. Errors are coded directly using a symbol + corresponding to the error value. Errors are coded indirectly using a + symbol for the number of bits in the (signed) error, followed by the + error iteslf. + + At the start of the compression, CBFlib constructs a table containing a + set of symbols, one for each of the 2^^n direct codes from -2^^(n-1) .. + 2^^(n-1)-1, one for a stop code, and one for each of the maxbits -n + indirect codes, where n is chosen at compress time and maxbits is the + maximum number of bits in an error. CBFlib then assigns to each symbol a + bit-code, using a shorter bit code for the more common symbols and a + longer bit code for the less common symbols. The bit-code lengths are + calculated using a Huffman-type algorithm, and the actual bit-codes are + constructed using the canonical-code algorithm described by Moffat, et + al. (International Journal of High Speed Electronics and Systems, Vol 8, + No 1 (1997) 179-231). + + The structure of the compressed data is: + + Byte Value + 1 .. 8 Number of elements (64-bit + little-endian number) + 9 .. 16 Minimum element + 17 .. 24 Maximum element + 25 .. 32 (reserved for future use) + 33 Number of bits directly coded, n + 34 Maximum number of bits encoded, + maxbits + 35 .. 35+2^^n-1 Number of bits in each direct code + 35+2^^n Number of bits in the stop code + 35+2^^n+1 .. 35+2^^n+maxbits-n Number of bits in each indirect code + 35+2^^n+maxbits-n+1 .. Coded data + + 3.3.2 CCP4-style compression + + Starting with CBFlib 0.7.7, CBFlib supports three variations on + CCP4-style compression: the "flat" version supported in versions of + CBFlib prior to release 0.7.7, as well as both version 1 and version 2 + of J. P. Abrahams "pack_c" compression. + + The CBF_PACKED and CBF_PACKED_V2 compression and decompression code + incorporated in CBFlib is derived in large part from the J. P. Abrahams + pack_c.c compression code in CCP4. This code is incorporated in CBFlib + under the GPL and the LGPL with both the permission Jan Pieter Abrahams, + the original author of pack_c.c (email from Jan Pieter Abrahams of 15 + January 2007) and of the CCP4 project (email from Martyn Winn on 12 + January 2007). The cooperation of J. P. Abrahams and of the CCP4 project + is gratefully acknowledged. + + The basis for all three versions is a scheme to pack offsets + (differences from a base value) into a small-endian bit stream. The + stream is organized into blocks. Each block begins with a header of 6 + bits in the flat packed version and version 1 of J. P. Abrahams + compression, and 7 bits in version 2 of J. P. Abrahams compression. The + header gives the number of offsets that follow and the number of bits in + each offset. Each offset is a signed, 2's complement integer. + + The first 3 bits in the header gives the logarithm base 2 of the numer + of offsets that follow the header. For example, if a header has a zero + in bits, only one offset follows the header. If those same bits contain + the number n, the number of offsets in the block is 2^n. + + The following 3 bits (flat and version 1) or 4 bits (version 2) contains + a number giving an index into a table of bit-lengths for the offsets. + All offsets in a given block are of the same length. + + Bits 3 .. 5 (flat and version 1) or bits 3 .. 6 (version 2) encode the + number of bits in each offset as follows: + + Value in Number of bits Number of bits + bits 3 .. 5 in each V1 offset in each V2 offset + 0 0 0 + 1 4 3 + 2 5 4 + 3 6 5 + 4 7 6 + 5 8 7 + 6 16 8 + 7 max 9 + 8 10 + 9 11 + 10 12 + 11 13 + 12 14 + 13 15 + 14 16 + 15 max + + The value "max" is determined by the compression version and the element + size. If the compression used is "flat", then "max" is 65. If the + compression is version 1 or version 2 of the JPA compression, then "max" + is the number of bits in each element, i.e. 8, 16, 32 or 64 bits. + + The major difference between the three variants of packed compression is + the choice of the base value from which the offset is measured. In all + cases the first offset is measured from zero, i.e. the first offset is + the value of the first pixel of the image. If "flat" is chosen or if the + dimensions of the data array are not given, then the remaining offset + are measure against the prior value, making it similar in approach to + the "byte offset" compression described in section 3.3.3 Byte offset + compression, but with a more efficient representation of the offsets. + + In version 1 and version 2 of the J. P. Abrahams compression, the + offsets are measured against an average of earlier pixels. If there is + only one row only the prior pxiel is used, starting with the same + offsets for that row as for "flat". After the first row, three pixels + from the prior row are used in addition to using the immediately prior + pixel. If there are multiple sections, and the sections are marked as + correlated, after the first section, 4 pixels from the prior section are + included in the average. The CBFlib code differs from the pack_c code in + the handling of the beginnings and ends of rows and sections. The pack_c + code will use pixels from the other side of the image in doing the + averaging. The CBFlib code drops pixels from the other side of the image + from the pool. The details follow. + + After dealing with the special case of the first pixel, The algorithm + uses an array of pointers, trail_char_data. The assignment of pixels to + the pool to be averaged begins with trail_char_data[0] points to the + pixel immediately prior to the next pixel to be processed, either in the + same row (fastest index) or, at the end of the prior row if the next + data element to be processed is at the end of a row. The location of the + pixel pointed to by trail_char_data[0] is used to compute the locations + of the other pixels in the pool. It will be dropped from the pool before + averaging if it is on the opposite side of the image. The pool will + consist of 1, 2, 4 or 8 pixels. + + Assume ndim1, ndim2, ndim3 are the indices of the same pixel as + trail_char_data[0] points to. These indices are incremented to be the + indices of the next pixel to be processed before populating + trail_char_data. + + On exit, trail_char_data[0 .. 7] will have been populated with pointers + to the pixels to be used in forming the average. Pixels that will not be + used will be set to NULL. Note that trail_char_data[0] may be set to + NULL. + + If we mark the next element to be processed with a "*" and the entries + in trail_char_data with their array indices 0 .. 7, the possible + patterns of settings in the general case are: + + current section: + + + - - - - 0 * - - - - + - - - - 3 2 1 - - - + - - - - - - - - - - + + prior section: + + + - - - - - 4 - - - - + - - - - 7 6 5 - - - + - - - - - - - - - - + + If there is no prior section (i.e. ndim3 is 0, or the + CBF_UNCORRELATED_SECTIONS flag is set to indicate discontinuous + sections), the values for trail_char_data[4 .. 7] will all be NULL. When + there is a prior section, trail_char_data[5..7] are pointers to the + pixels immediately below the elements pointed to by + trail_char_data[1..3], except trail_char_data[4] is one element further + along its row to be directly below the next element to be processed. + + The first element of the first row of the first section is a special + case, with no averaging. + + In the first row of the first section (ndim2 == 0, and ndim3 == 0), + after the first element (ndim1 > 0), only trail_char_data[0] is used + + current section: + + + - - - - 0 * - - - - + + For subsequent rows of the first section (ndim2 > 0, and ndim3 == 0), + for the first element (ndim1 == 0), two elements from the prior row are + used: + + current section: + + + * - - - - - - - - - + 2 1 - - - - - - - - + - - - - - - - - - - + + while for element after the first element, but before the last element + of the row, a full set of 4 elements is used: + + current section: + + + - - - - 0 * - - - - + - - - - 3 2 1 - - - + - - - - - - - - - - + + For the last element of a row (ndim1 == dim1-1), two elements are used + + current section: + + + - - - - - - - - 0 * + - - - - - - - - - 2 + - - - - - - - - - - + + For sections after the first section, provided the + CBF_UNCORRELATED_SECTIONS flag is not set in the compression, for each + non-NULL entry in trail_char_data [0..3] an entry is made in + trail_char_data [4..7], except for the first element of the first row of + a section. In that case an entry is made in trail_char_data[4]. + + The structure of the compressed data is: + + Byte Value + 1 .. 8 Number of elements (64-bit little-endian number) + 9 .. 16 Minumum element (currently unused) + 17 .. 24 Maximum element (currently unused) + 25 .. 32 (reserved for future use) + 33 .. Coded data + + 3.3.3 Byte_offset compression + + Starting with CBFlib 0.7.7, CBFlib supports a simple and efficient + "byte_offset" algorithm originally proposed by Andy Hammerley and + modified by Wolgang Kabsch and Herbert Bernstein. The original proposal + was called "byte_offsets". We distinguish this variant by calling it + "byte_offset". The major differences are that the "byte_offsets" + algorithm started with explicit storage of the first element of the + array as a 4-byte signed two's integer, and checked for image edges to + changes the selection of prior pixel. The CBFlib "byte_offset" + alogorithm starts with an assumed zero before the first pixel and + represents the value of the first pixel as an offset of whatever number + of size is needed to hold the value, and for speed, treats the entire + image as a simple linear array, allowing use of the last pixel of one + row as the base against which to compute the offset for the first + element of the next row. + + The algorithm is simple and easily implemented. This algorithm can never + achieve better than a factor of two compression relative to 16-bit raw + data or 4 relative to 32-bit raw data, but for most diffraction data the + compression will indeed be very close to these ideal values. It also has + the advantage that integer values up to 32 bits (or 31 bits and sign) + may be stored efficiently without the need for special over-load tables. + It is a fixed algorithm which does not need to calculate any image + statistics, so is fast. + + The algorithm works because of the following property of almost all + diffraction data and much other image data: The value of one element + tends to be close to the value of the adjacent elements, and the vast + majority of the differences use little of the full dynamic range. + However, noise in experimental data means that run-length encoding is + not useful (unless the image is separated into different bit-planes). If + a variable length code is used to store the differences, with the number + of bits used being inversely proportional to the probability of + occurrence, then compression ratios of 2.5 to 3.0 may be achieved. + However, the optimum encoding becomes dependent of the exact properties + of the image, and in particular on the noise. Here a lower compression + ratio is achieved, but the resulting algorithm is much simpler and more + robust. + + The "byte_offset" compression algorithm is the following: + + 1. Start with a base pixel value of 0. + 2. Compute the difference delta between the next pixel value and the + base pixel value. + 3. If -127 ≤ delta ≤ 127, output delta as one byte, make the current + pixel value the base pixel value and return to step 2. + 4. Otherwise output -128 (80 hex). + 5. We still have to output delta. If -32767 ≤ delta ≤ 32767, output + delta as a little_endian 16-bit quantity, make the current pixel + value the base pixel value and return to step 2. + 6. Otherwise output -32768 (8000 hex, little_endian, i.e. 00 then 80) + 7. We still have to output delta. If -2147483647 ≤ delta ≤ 2147483647, + output delta as a little_endian 32 bit quantity, make the current + pixel value the base pixel value and return to step 2. + 8. Otherwise output -2147483648 (80000000 hex, little_endian, i.e. 00, + then 00, then 00, then 80) and then output the pixel value as a + little-endian 64 bit quantity, make the current pixel value the base + pixel value and return to step 2. + + The "byte_offset" decompression algorithm is the following: + + 1. Start with a base pixel value of 0. + 2. Read the next byte as delta + 3. If -127 ≤ delta ≤ 127, add delta to the base pixel value, make that + the new base pixel value, place it on the output array and return to + step 2. + 4. If delta is 80 hex, read the next two bytes as a little_endian + 16-bit number and make that delta. + 5. If -32767 ≤ delta ≤ 32767, add delta to the base pixel value, make + that the new base pixel value, place it on the output array and + return to step 2. + 6. If delta is 8000 hex, read the next 4 bytes as a little_endian + 32-bit number and make that delta + 7. If -2147483647 ≤ delta ≤ 2147483647, add delta to the base pixel + value, make that the new base pixel value, place it on the output + array and return to step 2. + 8. If delta is 80000000 hex, read the next 8 bytes as a little_endian + 64-bit number and make that delta, add delta to the base pixel + value, make that the new base pixel value, place it on the output + array and return to step 2. + + Let us look at an example, of two 1000 x 1000 flat field images + presented as a mimimal imgCIF file. The first image uses 32-bit unsigned + integers and the second image uses 16-bit unsigned integers. + + The imgCIF file begins with some identifying comments (magic numbers) to + track the version of the dictionary and library: + + ###CBF: VERSION 1.5 + # CBF file written by CBFlib v0.7.7 + + This is followed by the necessary syntax to start a CIF data block and + by whatever tags and values are appropriate to describe the experiment. + The minimum is something like + + data_testflat + + eventually we come to the actual binary data, which begins the loop + header for the array_data category + + loop_ + _array_data.data + + with any additional tags needed, and then the data itself, which starts + with the mini-header: + + ; + --CIF-BINARY-FORMAT-SECTION-- + Content-Type: application/octet-stream; + conversions="x-CBF_BYTE_OFFSET" + Content-Transfer-Encoding: BINARY + X-Binary-Size: 1000002 + X-Binary-ID: 1 + X-Binary-Element-Type: "unsigned 32-bit integer" + X-Binary-Element-Byte-Order: LITTLE_ENDIAN + Content-MD5: +FqUJGxXhvCijXMFHC0kaA== + X-Binary-Number-of-Elements: 1000000 + X-Binary-Size-Fastest-Dimension: 1000 + X-Binary-Size-Second-Dimension: 1000 + X-Binary-Size-Padding: 4095 + + followed by an empty line and then the sequence of characters: + + ^L^Z^D + + followed immediately by the compressed data. + + The binary data begins with the hex byte 80 to flag the need for a value + that will not fit in one byte. That is followed by the small_endian hex + value 3E8 saying that the first delta is 1000. Then 999,999 bytes of + zero follow, since this is a flat field, with all values equal to zero. + That gives us our entire 1000x1000 compressed flat field. However, + because we asked for 4095 bytes of padding, there is an additional 4095 + bytes of zero that are not part of the compressed field. They are just + pad and can be ignored. Finally, after the pad, the CIF text field that + began with + + ; + --CIF-BINARY-FORMAT-SECTION-- + + is completed with + + --CIF-BINARY-FORMAT-SECTION---- + ; + + notice the extra -- + + The second flat field then follows, with a very similar mini-header: + + ; + --CIF-BINARY-FORMAT-SECTION-- + Content-Type: application/octet-stream; + conversions="x-CBF_BYTE_OFFSET" + Content-Transfer-Encoding: BINARY + X-Binary-Size: 1000002 + X-Binary-ID: 2 + X-Binary-Element-Type: "unsigned 16-bit integer" + X-Binary-Element-Byte-Order: LITTLE_ENDIAN + Content-MD5: +FqUJGxXhvCijXMFHC0kaA== + X-Binary-Number-of-Elements: 1000000 + X-Binary-Size-Fastest-Dimension: 1000 + X-Binary-Size-Second-Dimension: 1000 + X-Binary-Size-Padding: 4095 + + ^L^Z^D + + The only difference is that we have declared this array to be 16-bit and + have chosen a different binary id (2 instead of 1). Even the checksum is + the same. + + 3.3.4 Nibble_offset compression + + The nibble offset algorithm is a variant on A. P. Hammersley's byte + offset algorithm. The major differences are that the compression modes + are "sticky", the compression can be reset at any point to allow for + block parallelism, and the basic unit of compression is the nibble, but + for very clean data, the dibit is also supported. + + The data stream starts with and in general uses a mode-setting octet + presented in one if three forms, a single dibit a0, two dibits a0, a1, + or two dibits and a nibble a0, a1, b: + ++-----------------------------------------------+ +| a0 a1 b | octet | meaning | +|------------+-------+--------------------------| +| 00 00 0000 | 0x00 | reset to zero | +|------------+-------+--------------------------| +| 01 | 0x01 | up 1 mode | +|------------+-------+--------------------------| +| 10 | 0x02 | dibit mode | +|------------+-------+--------------------------| +| 11 | 0x03 | up n modes | +|------------+-------+--------------------------| +| 00 01 | 0x04 | nibble mode | +|------------+-------+--------------------------| +| 00 11 | 0x0C | 6-bit mode | +|------------+-------+--------------------------| +| 00 10 | 0x08 | byte mode | +|------------+-------+--------------------------| +| 00 00 0011 | 0x30 | 12-bit word mode | +|------------+-------+--------------------------| +| 00 00 0001 | 0x10 | 16-bit word mode | +|------------+-------+--------------------------| +| 00 00 0010 | 0x20 | 32-bit word mode | +|------------+-------+--------------------------| +| 00 00 0100 | 0x40 | 64-bit word mode | +|------------+-------+--------------------------| +| 00 00 1100 | 0xC0 | specify starting address | ++-----------------------------------------------+ + + The reset to zero is followed by a new mode octet A reset to zero resets + the prior value for delta to zero + + The up n modes code is followed immediately by a dibit specifying 2 less + than the number of modes by which to change, and then by a delta in the + mode. + + Note that up n modes has no effect until an actual mode has been set and + can be used immediately after a reset to pad to nibble, octet or + double-word boundaries. + + Once a mode is established, it is followed by a stream of deltas of that + size (for modes 2 or 4-64) or by one delta of that size and then a + stream of deltas of the size that was in effect before an up or down + giving little-endian offsets from the currently accumulated value. If + the offset is one of the following in the indicated mode + ++------------------------------------------+ +| dibit mode | 0x2 | +|------------------+-----------------------| +| nibble mode | 0x8 | +|------------------+-----------------------| +| 6-bit mode | 0x20 | +|------------------+-----------------------| +| byte mode | 0x80 | +|------------------+-----------------------| +| 12-bit word mode | 0x800 | +|------------------+-----------------------| +| 16-bit word mode | 0x8000 | +|------------------+-----------------------| +| 32-bit word mode | 0x8000 0000 | +|------------------+-----------------------| +| 64-bit word mode | 0x8000 0000 0000 0000 | ++------------------------------------------+ + + it is followed by the new mode as 1 or 2 dibits or 2 dibits and a nibble + a1 a1 b. If a1 is 1 or 2 or 3, that is the new mode. If a1 is zero and + a2 is 1 or 2 the new mode is a2*4. If a2 is 3 the new mode is a2*2. If + both a1 and a2 are zero, the new mode is b*16 unless b is 3. If b is 3 + the new mode is b*4 + + The 0xC0 flag is followed by a second mode giving the number of bytes of + image starting offset address followed by the image offset address + followed by the mode of that data. 0xC0 also acts as a reset. Use of the + 0xC0 flag is not required. Addresses default to sequential starting from + 0, but is provided to faciliate parallel compression. + + 3.4 Access to CBFlib compressions from HDF5 + + Starting with CBFlib release 0.9.2.11, a plugin module in provided to + allow access to CBFlib compressions from HDF5 1.8.11 and later. For + general documentation on HDF5 dynamically loaded filters, see + http://www.hdfgroup.org/HDF5/doc/Advanced/DynamicallyLoadedFilters/HDF5DynamicallyLoadedFilters.pdf + The discussion here will be confined to use of the CBFlib compressions + plugin. + + The filter has been registered with the HDF5 group as 32006, and cbf.h + includes the symbolic name for the filter CBF_H5Z_FILTER_CBF. + + The source and header of the CBFlib filter plugin are cbf_hdf5_filter.c + and cbf_hdf5_filter.h. To use the filter in C applications, you will + need to include cbf_hdf5_filter.h in the application and have the + cbflib.so library in the search path used by HDF5 1.8.11. The HDF group + says + + The default directory for an HDF5 filter plugin library is defined on + UNIX- like systems as quot;/usr/local/hdf5/lib/plugin" + and on Windows systems as "%ALLUSERSPROFILE%/hdf5/lib/plugin". The + default path can be overwritten by a user with the HDF5_PLUGIN_PATH + environment variable. Several directories can be specified for the + search path using ":" as a path separator for UNIX-like systems and + ";" for Windows. + + In the Makefile, tests are done by defining HDF5_PLUGIN_PATH to point to + the build kit shared library directory: + + HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; + + In most cases that should be sufficient to allow code to read HDF5 files + with datasets compressed with this filter. + + In order to write files that use this filter, several relevant values + must first be stored into an unsigned int array, cd_values. The header, + cbf_hdf5_filter.h, defines the follwing symbolic values for the indices + of this array: + ++------------------------------------------------------------------------------+ +| symbol | value | meaning | +|--------------------------------+-------+-------------------------------------| +| CBF_H5Z_FILTER_CBF_NELMTS | 11 | size of cd_values | +|--------------------------------+-------+-------------------------------------| +| CBF_H5Z_FILTER_CBF_COMPRESSION | 0 | one of the compressions (see 3.2.2) | +|--------------------------------+-------+-------------------------------------| +| CBF_H5Z_FILTER_CBF_RESERVED | 1 | reserved for future use, should be | +| | | set to zero | +|--------------------------------+-------+-------------------------------------| +| CBF_H5Z_FILTER_CBF_BINARY_ID | 2 | binary ID of the array (default 1) | +|--------------------------------+-------+-------------------------------------| +| CBF_H5Z_FILTER_CBF_ELSIZE | 3 | element size in octets | +|--------------------------------+-------+-------------------------------------| +| CBF_H5Z_FILTER_CBF_ELSIGN | 4 | 1 if signed, 0 if unsigned | +|--------------------------------+-------+-------------------------------------| +| CBF_H5Z_FILTER_CBF_REAL | 5 | 1 if a real array, 0 if an integer | +| | | array | +|--------------------------------+-------+-------------------------------------| +| CBF_H5Z_FILTER_CBF_DIMOVER | 6 | the total number of elements in the | +| | | array | +|--------------------------------+-------+-------------------------------------| +| CBF_H5Z_FILTER_CBF_DIMFAST | 7 | the fast dimension | +|--------------------------------+-------+-------------------------------------| +| CBF_H5Z_FILTER_CBF_DIMMID | 8 | the middle dimension | +|--------------------------------+-------+-------------------------------------| +| CBF_H5Z_FILTER_CBF_DIMSLOW | 9 | the slow domension | +|--------------------------------+-------+-------------------------------------| +| CBF_H5Z_FILTER_CBF_PADDING | 10 | the padding | ++------------------------------------------------------------------------------+ + + Only chunked data may be written using this filter. The recommended + chunk size is a single image. The filter writes the chunks using the + imgCIF binary section format described in section 3.2.1 including the + MIME header. If each chunk is the size of an image, programs such as XDS + can use the patterns of the MIME header to skip directly to a frame even + in a complex HDF5 file. Typical code to write such chunks would first + define the cd_values array and an array of chunk dimensions and create + the properties to be used in creating a dataset, as in + + unsigned int cd_values[CBF_H5Z_FILTER_CBF_NELMTS]; + hsize_t chunk[3]; + hid_t valspace; + chunk[0] = 1; + chunk[1] = dimmid; + chunk[2] = dimfast; + cd_values[CBF_H5Z_FILTER_CBF_COMPRESSION] = compression; + cd_values[CBF_H5Z_FILTER_CBF_RESERVED] = 0; + cd_values[CBF_H5Z_FILTER_CBF_BINARY_ID] = id; + cd_values[CBF_H5Z_FILTER_CBF_PADDING] = padding; + cd_values[CBF_H5Z_FILTER_CBF_ELSIZE] = (bits+7)/8; + cd_values[CBF_H5Z_FILTER_CBF_ELSIGN] = sign; + cd_values[CBF_H5Z_FILTER_CBF_REAL] = realarray; + cd_values[CBF_H5Z_FILTER_CBF_DIMFAST] = dimfast; + cd_values[CBF_H5Z_FILTER_CBF_DIMMID] = dimmid; + cd_values[CBF_H5Z_FILTER_CBF_DIMSLOW] = dimslow; + valprop = H5Pcreate(H5P_DATASET_CREATE); + H5Pset_chunk(valprop,3,chunk); + H5Pset_filter(valprop,CBF_H5Z_FILTER_CBF,H5Z_FLAG_OPTIONAL,CBF_H5Z_FILTER_CBF_NELMTS,cd_values); + + 4. Installation + + CBFlib should be built on a disk with at least 400 megabytes of free + space. CBFlib-0.9.2.11.tar.gz is a "gzipped" tar of the code as it now + stands. Place the gzipped tar in the directory that is intended to + contain a new directory, named CBFlib_0.9.2.11 (the "top-level" + directory) and uncompress it with gunzip and unpack it with tar: + + gunzip CBFlib.tar.gz + tar xvf CBFLIB.tar + + As with prior releases, to run the test programs, you will also need + Paul Ellis's sample MAR345 image, example.mar2300, and Chris Nielsen's + sample ADSC Quantum 315 image, mb_LP_1_001.img as sample data. Both + these files will be extracted by the Makefile from + CBFlib_0.7.7_Data_Files. Do not download copies into the top level + directory. + + After unpacking the archive, the top-level directory should contain a + makefile: + + Makefile Makefile for unix + + and the subdirectories: + + src/ CBFLIB source files + include/ CBFLIB header files + m4/ CBFLIB m4 macro files (used to build .f90 files) + examples/ Example program source files + doc/ Documentation + lib/ Compiled CBFLIB library + bin/ Executable example programs + html_images/ JPEG images used in rendering the HTML files + + For instructions on compiling and testing the library, go to the + top-level directory and type: + + make + + The CBFLIB source and header files are in the "src" and "include" + subdirectories. The FCBLIB source and m4 files are in the "src" and "m4" + subdirectories. The files are: + +src/ include/ m4/ Description + cbf.c cbf.h CBFLIB API + functions + cbf_alloc.c cbf_alloc.h Memory allocation + functions + cbf_ascii.c cbf_ascii.h Function for + writing ASCII + values + cbf_binary.c cbf_binary.h Functions for + binary values + cbf_byte_offset.c cbf_byte_offset.h Byte-offset + compression + cbf_canonical.c cbf_canonical.h Canonical-code + compression + cbf_codes.c cbf_codes.h Encoding and + message digest + functions + cbf_compress.c cbf_compress.h General + compression + routines + cbf_context.c cbf_context.h Control of + temporary files + cbf_file.c cbf_file.h File in/out + functions + cbf_lex.c cbf_lex.h Lexical analyser + cbf_packed.c cbf_packed.h CCP4-style + packing compression + cbf_predictor.c cbf_predictor.h Predictor-Huffman + compression (not + implemented) + cbf_read_binary.c cbf_read_binary.h Read binary + headers + cbf_read_mime.c cbf_read_mime.h Read MIME-encoded + binary sections + cbf_simple.c cbf_simple.h Higher-level + CBFlib functions + cbf_string.c cbf_string.h Case-insensitive + string comparisons + cbf_stx.c cbf_stx.h Parser (generated + from cbf.stx.y) + cbf_tree.c cbf_tree.h CBF + tree-structure + functions + cbf_uncompressed.c cbf_uncompressed.h Uncompressed + binary sections + cbf_write.c cbf_write.h Functions for + writing + cbf_write_binary.c cbf_write_binary.h Write binary + sections + cbf.stx.y bison grammar to + define cbf_stx.c + (see WARNING) + md5c.c md5.h RSA message + digest software + from mpack + global.h + fcb_atol_wcnt.f90 Function to + convert a string to + an integer + fcb_ci_strncmparr.f90 Function to do a + case-insensitive + comparison of a + string to a byte + array + fcb_nblen_array.f90 Function to + determine the + non-blank length of + a byte array + fcb_read_byte.f90 Function to read + a single byte + fcb_read_line.f90 Function to read + a line into a byte + array + fcb_skip_whitespace.f90 Function to skip + whitespace and + comments in a MIME + header + fcb_exit_binary.m4 Function to skip + past the end of the + current binary text + field + fcb_next_binary.m4 Function to skip + to the next binary + fcb_open_cifin.m4 Function to open + a CBF file for + reading + fcb_packed.m4 Functions to read + a JPA CCP4 + compressed image + fcb_read_bits.m4 Functions to read + nay number of bits + as an integer + fcb_read_image.m4 Functions to read + the next image in + I2, I4, 3D_I2 and + 3D_I4 format + fcb_read_xds_i2.m4 Function to read + a single xds image. + fcblib_defines.m4 General m4 macro + file for FCBLIB + routines. + + In the "examples" subdirectory, there are 2 additional files used by the + example programs (section 5) for reading MAR300, MAR345 or ADSC CCD + images: + + img.c img.h Simple image library + + and the example programs themselves: + + makecbf.c Make a CBF file from an image + img2cif.c Make an imgCIF or CBF from an image + cif2cbf.c Copy a CIF/CBF to a CIF/CBF + convert_image.c Convert an image file to a cbf using a template file + cif2c.c Convert a template cbf file into a function to + produce the same template in an internal cbf data + structure + testcell.C Exercise the cell functions + + as well as three template files: template_adscquantum4_2304x2304.cbf, + template_mar345_2300x2300.cbf, and + template_adscquantum315_3072x3072.cbf. + + Two additional examples (test_fcb_read_image.f90 and + test_xds_binary.f90) are created from two files (test_fcb_read_image.m4 + and test_xds_binary.m4) in the m4 directory. + + The documentation files are in the "doc" subdirectory: + + CBFlib.html This document (HTML) + CBFlib.txt This document (ASCII) + CBFlib_NOTICES.html Important NOTICES -- PLEASE READ + CBFlib_NOTICES.txt Important NOTICES -- PLEASE READ + gpl.txt GPL -- PLEASE READ + lgpl.txt LGPL -- PLEASE READ + cbf_definition_rev.txt Draft CBF/ImgCIF definition (ASCII) + cbf_definition_rev.html Draft CBF/ImgCIF definition (HTML) + cif_img.html CBF/ImgCIF extensions dictionary (HTML) + cif_img.dic CBF/ImgCIF extensions dictionary (ASCII) + ChangeLog,html Summary of change history (HTML) + ChangeLog Summary of change history (ASCII) + + 5. Example programs + + The example programs makecbf.c, img2cif.c and convert_image.c read an + image file from a MAR300, MAR345 or ADSC CCD detector and then uses + CBFlib to convert it to CBF format (makecbf) or either imgCIF or CBF + format (img2cif). makecbf writes the CBF-format image to disk, reads it + in again, and then compares it to the original. img2cif just writes the + desired file. makecbf works only from stated files on disk, so that + random I/O can be used. img2cif includes code to process files from + stdin and to stdout. convert_image reads a template as well as the image + file and produces a complete CBF. The program convert_minicbf reads a + minimal CBF file with just and image and some lines of text specifying + the parameters of the data collection as done at SLS and combines the + result with a template to produce a full CBF. The program cif2cbf can be + used to convert among carious compression and encoding schemes. The + program sauter_test.C is a C++ test program contributed by Nick Sauter + to help in resolving a memory leak he found. The programs adscimg2cbf + and cbf2adscimg are a "jiffies" contributed by Chris Nielsen of ADSC to + convert ADSC images to imgCIF/CBF format and vice versa. + + makecbf.c is a good example of how many of the CBFlib functions can be + used. To compile makecbf and the other example programs use the Makefile + in the top-level directory: + + make all + + This will place the programs in the bin directory. + + makecbf + + To run makecbf with the example image, type: + + ./bin/makecbf example.mar2300 test.cbf + + The program img2cif has the following command line interface: + + img2cif [-i input_image] \ + [-o output_cif] \ + [-c {p[acked]|c[annonical]|[n[one]}] \ + [-m {h[eaders]|n[oheaders]}] \ + [-d {d[igest]|n[odigest]}] \ + [-e {b[ase64]|q[uoted-printable]| \ + d[ecimal]|h[exadecimal]|o[ctal]|n[one]}] \ + [-b {f[orward]|b[ackwards]}] \ + [input_image] [output_cif] + + the options are: + + -i input_image (default: stdin) + the input_image file in MAR300, MAR345 or ADSC CCD detector + format is given. If no input_image file is specified or is + given as "-", an image is copied from stdin to a temporary file. + + -o output_cif (default: stdout) + the output cif (if base64 or quoted-printable encoding is used) + or cbf (if no encoding is used). if no output_cif is specified + or is given as "-", the output is written to stdout + + -c compression_scheme (packed, canonical or none, default packed) + + -m [no]headers (default headers for cifs, noheaders for cbfs) + selects MIME (N. Freed, N. Borenstein, RFC 2045, November 1996) + headers within binary data value text fields. + + -d [no]digest (default md5 digest [R. Rivest, RFC 1321, April + 1992 using"RSA Data Security, Inc. MD5 Message-Digest + Algorithm"] when MIME headers are selected) + + -e encoding (base64, quoted-printable, decimal, hexadecimal, + octal or none, default: base64) specifies one of the standard + MIME encodings (base64 or quoted-printable) or a non-standard + decimal, hexamdecimal or octal encoding for an ascii cif + or "none" for a binary cbf + + -b direction (forward or backwards, default: backwards) + specifies the direction of mapping of bytes into words + for decimal, hexadecimal or octal output, marked by '>' for + forward or '<' for backwards as the second character of each + line of output, and in '#' comment lines. + + + cif2cbf + + The test program cif2cbf uses many of the same command line options as + img2cif, but accepts either a CIF or a CBF as input instead of an image + file: + + cif2cbf [-i input_cif] [-o output_cbf] \ + [-u update_cif] \ + [-c {p[acked]|c[annonical]|{b[yte_offset]}|\ + {v[2packed]}|{f[latpacked]}|{I|nIbble_offset}|n[one]}] \ + [-C highclipvalue] \ + [-D ] \ + [-I {0|2|4|8}] \ + [-R {0|4|8}] \ + [-L {0|4|8}] \ + [-m {h[eaders]|noh[eaders]}] \ + [-m {d[imensions]|nod[imensions}] \ + [-d {d[igest]|n[odigest]|w[arndigest]}] \ + [-B {read|liberal|noread}] [-B {write|nowrite}] \ + [-S {read|noread}] [-S {write|nowrite}] \ + [-T {read|noread}] [-T {write|nowrite}] \ + [-e {b[ase64]|q[uoted-printable]|\ + d[ecimal]|h[examdecimal|o[ctal]|n[one]}] \ + [-b {f[orward]|b[ackwards]}\ + [-p {1|2|4}\ + [-v dictionary]* [-w] [-W]\ + [-5 {r|w|rw|rn|wn|rwn|n[oH5]}\ + [-O] \ + [input_cif] [output_cbf] + + the options are: + + the options are: + + -i input_cif (default: stdin) + the input file in CIF or CBF format. If input_cif is not + specified or is given as "-", it is copied from stdin to a + temporary file. + + -o output_cbf (default: stdout) + the output cif (if base64 or quoted-printable encoding is used) + or cbf (if no encoding is used). if no output_cif is specified + or is given as "-", the output is written to stdout + if the output_cbf is /dev/null, no output is written. + + -u update_cif (no default) + and optional second input file in CIF or CBF format containing + data blocks to be merged with data blocks from the primary + input CIF or CBF + + The remaining options specify the characteristics of the + output cbf. Most of the characteristics of the input cif are + derived from context, except when modified by the -B, -S, -T, -v + and -w flags. + + -b byte_order (forward or backwards, default forward (1234) on + little-endian machines, backwards (4321) on big-endian machines + + -B [no]read or liberal (default noread) + read to enable reading of DDLm style brackets + liberal to accept whitespace for commas + + -B [no]write (default write) + write to enable writing of DDLm style brackets + + -c compression_scheme (Packed, Canonical, Byte_offset, + V2packed, Flatpacked, nIbble or None, + default packed) + + -C highclipvalue + specifies a double precision value to which to clip the data + + -d [no]digest or warndigest (default md5 digest [R. Rivest, + RFC 1321, April 1992 using"RSA Data Security, Inc. MD5 + Message-Digest Algorithm"] when MIME headers are selected) + + -D test cbf_construct_detector + + -e encoding (base64, k, quoted-printable or none, default base64) + specifies one of the standard MIME encodings for an ascii cif + or "none" for a binary cbf + + -I 0 or integer element size + specifies integer conversion of the data, 0 to use the input + number of bytes, 2, 4 or 8 for short, long or long long + output integers + + -L lowclipvalue + specifies a double precision value to cut off the data from + below + + -m [no]headers (default headers) + selects MIME (N. Freed, N. Borenstein, RFC 2045, November 1996) + headers within binary data value text fields. + + -m [nod]imensions (default dimensions) + selects detailed recovery of dimensions from the input CIF + for use in the MIME header of the output CIF + + -p K_of_padding (0, 1, 2, 4) for no padding after binary data + 1023, 2047 or 4095 bytes of padding after binary data + + -R 0 or integer element size + specifies real conversion of the data, 0 to use the input + number of bytes, 4 or 8 for float or double output reals + + -S [no]read or (default noread) + read to enable reading of whitespace and comments + + -S [no]write (default write) + write to enable writing of whitespace and comments + + -T [no]read or (default noread) + read to enable reading of DDLm style triple quotes + + -T [no]write (default write) + write to enable writing of DDLm style triple quotes + + -v dictionary specifies a dictionary to be used to validate + the input cif and to apply aliases to the output cif. + This option may be specified multiple times, with dictionaries + layered in the order given. + + -w process wide (2048 character) lines + + -W write wide (2048 character) lines + + -5 hdf5mode specifies whether to read and/or write in hdf5 mode + the n parameter will cause the CIF H5 datablock to be deleted + on both read and write, for both CIF, CBF and HDF5 files + + -O when in -5 w (hdf5 write) mode, -O forces the use of opaque + objects for CBF binaries + + + + + convert_image + + The program convert_image requires two arguments: imagefile and cbffile. + Those are the primary input and output. The detector type is extracted + from the image file or from the command line, converted to lower case + and used to construct the name of a template cbf file to use for the + copy. The template file name is of the form template_name_columnsxrows. + The full set of options is: + + + convert_image [-i input_img] [-o output_cbf] [-p template_cbf]\ + [-d detector name] -m [x|y|x=y] [-z distance] \ + [-c category_alias=category_root]* \ + [-t tag_alias=tag_root]* [-F] [-R] \ + [input_img] [output_cbf] + + the options are: + + -i input_img (default: stdin) + the input file as an image in smv, mar300, or mar345 format. + If input_img is not specified or is given as "-", it is copied + from stdin to a temporary file. + + -p template_cbf + the template for the final cbf to be produced. If template_cbf + is not specified the name is constructed from the first token + of the detector name and the image size as + template__x.cbf + + -o output_cbf (default: stdout ) + the output cbf combining the image and the template. If the + output_cbf is not specified or is given as "-", it is written + to stdout. + + -d detectorname + a detector name to be used if none is provided in the image + header. + + -F + when writing packed compression, treat the entire image as + one line with no averaging + + -m [x|y|x=y] (default x=y, square arrays only) + mirror the array in the x-axis (y -> -y) + in the y-axis (x -> -x) + or in x=y ( x -> y, y-> x) + + -r n + rotate the array n times 90 degrees counter clockwise + x -> y, y -> -x for each rotation, n = 1, 2 or 3 + + -R + if setting a beam center, set reference values of + axis settings as well as standard settings + + -z distance + detector distance along Z-axis + + -c category_alias=category_root + -t tag_alias=tagroot + map the given alias to the given root, so that instead + of outputting the alias, the root will be presented in the + output cbf instead. These options may be repeated as many + times as needed. + + convert_minicbf + + The program convert_minicbf requires two arguments: minicbf and cbffile. + Those are the primary input and output. The detector type is extracted + from the image file or from the command line, converted to lower case + and used to construct the name of a template cbf file to use for the + copy. The template file name is of the form template_name_columnsxrows. + The full set of options is: + + + convert_minicbf [-i input_cbf] [-o output_cbf] [-p template_cbf]\ + [-q] [-C convention] \ + [-d detector name] -m [x|y|x=y] [-z distance] \ + [-c category_alias=category_root]* \ + [-t tag_alias=tag_root]* [-F] [-R] \ + [input_cbf] [output_cbf] + + the options are: + + -i input_cbf (default: stdin) + the input file as a CBF with at least an image. + + -p template_cbf + the template for the final cbf to be produced. If template_cbf + is not specified the name is constructed from the first token + of the detector name and the image size as + template__x.cbf + + -o output_cbf (default: stdout ) + the output cbf combining the image and the template. If the + output_cbf is not specified or is given as "-", it is written + to stdout. + + -q + exit quickly with just the miniheader expanded + after the data. No template is used. + + -Q + exit quickly with just the miniheader unexpanded + before the data. No template is used. + + -C convention + convert the comment form of miniheader into the + _array_data.header_convention convention + _array_data.header_contents + overriding any existing values + + -d detectorname + a detector name to be used if none is provided in the image + header. + + -F + when writing packed compression, treat the entire image as + one line with no averaging + + -m [x|y|x=y] (default x=y, square arrays only) + mirror the array in the x-axis (y -> -y) + in the y-axis (x -> -x) + or in x=y ( x -> y, y-> x) + + -r n + rotate the array n times 90 degrees counter clockwise + x -> y, y -> -x for each rotation, n = 1, 2 or 3 + + -R + if setting a beam center, set reference values of + axis settings as well as standard settings + + -z distance + detector distance along Z-axis + + -c category_alias=category_root + -t tag_alias=tagroot + map the given alias to the given root, so that instead + of outputting the alias, the root will be presented in the + output cbf instead. These options may be repeated as many + times as needed. + + + testreals, testflat and testflatpacked + + The example programs testreals, testflat and testflatpacked exercise the + handling of reals, byte_offset compression and packed compression. Each + is run without any arguments. testreals will read real images from the + data file testrealin.cbf and write a file with real images in + testrealout.cbf, which should be identical to testrealin.cbf. testflat + and testflatpacked read 4 1000x1000 2D images and one 50x60x70 3D image + and produce an output file that should be identical to the input. + testflat reads testflatin.cbf and produces testflatout.cbf using + CBF_BYTE_OFFSET compression. testflatpacked reads testflatpackedin.cbf + and produces testflatpackedout.cbf. The images are: + * A 1000 x 1000 array of 32-bit integers forming a flat field with all + pixels set to 1000. + * A 1000 x 1000 array of 16-bit integers forming a flat field with all + pixels set to 1000. + * A 1000 x 1000 array of 32-bit integers forming a flat field with all + pixels set to 1000, except for -3 along the main diagonal and its + transpose. + * A 1000 x 1000 array of 16-bit integers forming a flat field with all + pixels set to 1000, except for -3 along the main diagonal and its + transpose. + * A 50 x 60 x 70 array of 32-bit integers in a flat field of 1000, + except for -3 along the main diagonal and the values i+j+k (counting + from zero) every 1000th pixel + + test_fcb_read_image, test_xds_binary + + The example programs test_fcb_read_image and test_xds_binary are + designed read the output of testflat and testflatpacked using the FCBlib + routines in lib/libfcb. test_xds_binary reads only the first image and + closes the file immediately. test_fcb_read_image reads all 5 images from + the input file. The name of the input file should be provided on stdin, + as in: + + * echo testflatout.cbf | bin/test_xds_binary + * echo testflatpackedout.cbf | bin/test_xds_binary + * echo testflatout.cbf | bin/test_fcb_read_image + * echo testflatpackedout.cbf | bin/test_fcb_read_image + + In order to compile these programs correctly for the G95 compiler it is + important to set the record size for reading to be no larger than the + padding after binary images. This in controlled in Makefile by the line + M4FLAGS = -Dfcb_bytes_in_rec=131072 which provides good performance for + gfortran. For g95, this line must be changed to M4FLAGS = + -Dfcb_bytes_in_rec=4096 + + sauter_test + + The program sauter_test.C is a C++ test program contributed by Nick + Sauter to help in resolving a memory leak he found. The program is run + as bin/sauter_test and should run long enough to allow a check with top + to ensure that it has constant memory demands. In addition, starting + with release 0.7.8.1, the addition of -DCBFLIB_MEM_DEBUG to the compiler + flags will cause detailed reports on memory use to stderr to be + reported. + + adscimg2cbf + + The example program adscimg2cbf accepts any number of raw or compressed + ADSC images with .img, .img.gz, .img.bz2 or .img.Z extensions and + converts each of them to an imgCIF/CBF file with a .cbf extension. + + + adscimg2cbf [--flag[,modifier]] file1.img ... filen.img (creates file1.cbf ... filen.cbf) + Image files may also be compressed (.gz, .bz2, .Z) + + Flags: + --cbf_byte_offset Use BYTE_OFFSET compression (DEFAULT) + --cbf_packed Use CCP4 packing (JPA) compression. + --cbf_packed_v2 Use CCP4 packing version 2 (JPA) compression. + --no_compression No compression. + + The following two modifiers can be appended to the flags (syntax: --flag,modifier): + flat Flat (linear) images. + uncorrelated Uncorrelated sections. + + adscimg2cbf + + The example program cbf2adscimg accepts any number of cbfs of ADSC + images created by adscimg1cbf or convert_image and produces raw or + compressed adsc image files with .img, .img.gz or .img.bz2 extensions. + + + cbf2adscimg [--flag] file1.cbf ... filen.cbf (creates file1.img ... filen.img) + Image files may be compressed on output: (.gz, .bz2) by using the flags below.\n"); + + Flags: + --gz Output a .gz file (e.g., filen.img.gz). + --bz2 Output a .bz2 file (e.g., filen.img.bz2). + + tiff2cbf + + The test program tiff2cbf converts a tiff data file to a cbf data file. + The program converts the tiff data samples directly into a minicbf with + the tiff header stored at the value of _array_data.header_contents. This + conversion is supported for the sample formats SAMPLEFORMAT_UINT + (unsigned integer data), SAMPLEFORMAT_INT (unsigned integer data), + SAMPLEFORMAT_INT (signed integer data), SAMPLEFORMAT_IEEEFP (IEEE + floating point data), SAMPLEFORMAT_COMPLEXINT (complex signed int) and + SAMPLEFORMAT_COMPLEXIEEEFP (complex ieee floating). Conversions from + these formats to other CBF formats can be handled by cif2cbf. If you + wish to convert and xxx.tif written with IEEE floating point samples + into a CBF with integer values compressed by byte-offset compression for + use by XDS, creating an xxx_view.cbf with values clipped between 0 and + 100, and an xxx_xds.cbf with unclipped values for processing: + + + tiff2cbf xxx.tif xxx.cbf + cif2cbf -I 4 -C 100. -L 0. -e n -c b -i xxx.cbf -o xxx_view.cbf + cif2cbf -I 4 -e n -c b -i xxx.cbf -o xxx_xds.cbf + + + minicbf2nexus + + This program takes some minicbf files describing a single scan and axis + configuration settings for them and creates a nexus file containing the + same data. As this is an early version of the program it lacks a lot of + useful functionality and should not be assumed to be stable. + + It currently takes several command line arguments: + + * -c + --compression + These are optional and take a single case-insensitive argument which + describes the compression used for the dataset. + + Currently implemented values are: + + * cbf + Use the same CBFlib compression method as the miniCBF data uses + * none + Don't compress the data + * zlib + Use zlib compression + + More compression options will be added in later versions, including + options for CBFlib compression schemes. + + * -C + --config + This takes a single argument giving the file name of a configuration + file which describes how the axes of the minicbf file relate to each + other. + + * -g + --group + This takes a string defining the name of the group where the data + should be inserted. Currently, the file will begin in an empty state + and this will cause a group of the given name to be created, but + this will eventually allow data to be inserted into an existing + user-defined group. + + * -o + --output + This takes a single argument which is used as the filename for the + new nexus file. Any existing files of the same name are overwritten + without warning, so be careful that the name of any existing files + that you wish to keep are not passed as an argument here. + + * -Z + --register + Takes a single case-insensitive argument of 'manual' or 'plugin' + defining the method of plugin registration used. May be specified + multiple times to define a system default (via an alias) and + optionally over-ride it later. + + * Other arguments are interpreted as file names identifying the + miniCBF files to be packed into the new NeXus file. These must + currently be pilatus v1.2 miniCBF files, but this restriction will + be relaxed in later versions. + + An example, from the test scripts, is: + + minicbf2nexus -c zlib -C config X4_test_1.cbf X4_test_2&3.cbf + X4_test_4.cbf X4_test_5.cbf -o minicbf.h5 + + Where test files 1, 4 & 5 are each single-image miniCBF files and test + file 2 & 3 is created by 'cat'ing together two single-image miniCBF + files + + The config file used for this example is: + + # some sample config settings for a miniCBF file + + map Start_angle to CBF_axis_omega + map Phi to CBF_axis_phi + map Kappa to CBF_axis_kappa + + Sample depends-on CBF_axis_phi + + CBF_axis_phi vector [1 0 0] depends-on CBF_axis_kappa + CBF_axis_kappa vector [0 1 0] depends-on . + CBF_axis_omega vector [0 0 0] + + Text from any # character to the end of the line is ignored as a + comment. + + Axes are declared by the map keyword as the name of the axis in the + minicbf file, which must match exactly, followed by the keyword to and + then the name that will be given to the axis in the resulting nexus + file. Each axis is treated as a rotation axis and should have a vector + which defines the axis of rotation in the 3D coordinate frame used by + nexus, this should be 3 numbers within square brackets separated by + spaces and does not need to be normalised. Each axis may also depend on + a nother axis by using the keyword depends-on folowed by the name of the + nexus axis it depends on, or . if it does not depend on another axis, + omitting a dependency as shown on the final line of the example above is + not recommended as it will eventually be a fatal error. The vector and + depends-on declarations do not need to be on the same line. + + The Sample keyword is used to define a dependency for the sample being + scanned and should be followed by a depends-on declaration which defines + the name of the nexus axis that the sample depends on. + + The final line of the config file should be blank to allow for some + simple integrity tests. + + A continuous chain of dependencies should be formed from the sample to + the nexus coordinate system, otherwise there is insufficient information + available to properly describe the orientation of the sample. This will + be enforced in later versions, with a fatal error if insufficient + information is provided. + + cbf2nexus + + This program takes some CBF files describing a single scan and converts + them to a single NeXus file containing the same data. It can also be + used to merge a CBF file into an existing NeXus file. + + It currently takes several command line arguments: + + * -c + --compression + These are optional and take a single case-insensitive argument which + describes the compression used for the dataset. + + Currently implemented values are: + + * cbf + Use the same CBFlib compression method as the miniCBF data uses + * none + Don't compress the data + * zlib + Use zlib compression + + More compression options will be added in later versions, including + options for CBFlib compression schemes. + + * -g + --group + This takes a string defining the name of the group where the data + should be inserted. Currently, the file will begin in an empty state + and this will cause a group of the given name to be created, but + this will eventually allow data to be inserted into an existing + user-defined group. + + * -o + --output + This takes a single argument which is used as the filename for the + new nexus file. Any existing files of the same name are overwritten + without warning, so be careful that the name of any existing files + that you wish to keep are not passed as an argument here. + + * -u + --update + This take a single argument which is used as the filename for an + existing nexus file, to which the nexus translation of the input + file will be added. This is a direct change in the specified file. + It is not making a copy first. + * -Z + --register + Takes a single case-insensitive argument of 'manual' or 'plugin' + defining the method of plugin registration used. May be specified + multiple times to define a system default (via an alias) and + optionally over-ride it later. This is only relevant if the NeXus + file is written with CBF compression algorithms, it doesn't have any + effect for uncompressed data or data compressed uning HDF5's + built-in compression algorithms. + + * --datablock + Gives the name of a datblock to attempt to extract data from, or may + be omitted to extract data from all datablocks. + + * --scan + Gives the name of a scan to attempt to extract data from, or may be + omitted if there is only one scan in the datablock(s). + + * --experiment_id + Should be a unique identifier for the scan, which will be stored in + /*:NXentry/entry_identifier. + + * --sample_id + Should be a unique identifier for the sample, which will be stored + in /*:NXentry/*:NXsample/sample_identifier. + + * --list & --no-list + Determines whether the list of recognised data items is printed or + not. These may be used multiple times, the last specified value is + the one that is actually used. + + * Other arguments are interpreted as file names identifying the CBF + files to be packed into the new NeXus file. + + An example, from the test scripts, is: + + cbf2nexus -c zlib adscconverted.cbf adscconverted.cbf -o cbf.zlib.h5 + + This creates a single NeXus file containing two copies of the + 'adscconverted' CBF file. + + nexus2cbf + + This program converts a single frame of data from a nexus file to a cbf + file with a given name. The primary purpose of this program is to help + verify that data can be recovered after being converted to NeXus format, + to check that it hasn't been lost or mangled. + + It currently takes several command line arguments: + + * -f + --frame + This should be an integer, in the range [0, frameCount), defining + the index of the frame that is to be extracted, and defaults to 0. + + * -g + --group + This takes a string defining the name of the group where the data + should be inserted. Currently, the file will begin in an empty state + and this will cause a group of the given name to be created, but + this will eventually allow data to be inserted into an existing + user-defined group. + + * -o + --output + This takes a single argument which is used as the filename for the + new NeXus file. Any existing files of the same name are overwritten + without warning, so be careful that the name of any existing files + that you wish to keep are not passed as an argument here. + + * -Z + --register + Takes a single case-insensitive argument of 'manual' or 'plugin' + defining the method of plugin registration used. May be specified + multiple times to define a system default (via an alias) and + optionally over-ride it later. This is only relevant if the NeXus + file was written with CBF compression algorithms, it doesn't have + any effect for uncompressed data or data compressed uning HDF5's + built-in compression algorithms. + + * The remaining argument(s) should be the file name of the NeXus file + that is to be converted. + + testhdf5 + + This program runs a set of unit tests on the HDF5 abstraction layer. + These are designed to ensure everything is working correctly, to help + locate bugs and prevent regressions. A short summary will be printed + detailing the number of tests passed, the number of tests failed and the + number of components skipped. If any tests fail or are skipped then some + additional output should be produced to help identify the cause of the + error so that it is easier to fix. + + The program does not take any command-line arguments, and creates a file + called testfile.h5 in its working directory for use in the tests. + + testulp + + This program runs a set of unit tests on the ULP comparison functions. + These are designed to ensure everything is working correctly, to help + locate bugs and prevent regressions. A short summary will be printed + detailing the number of tests passed, the number of tests failed and the + number of components skipped. If any tests fail or are skipped then some + additional output should be produced to help identify the cause of the + error so that it is easier to fix. + + The program does not take any command-line arguments. + + ---------------------------------------------------------------------- + + ---------------------------------------------------------------------- + + ---------------------------------------------------------------------- + + Updated 22 February 2015. Contact: yaya at bernstein-plus-sons dot com diff --git a/py2cbf/TODO.txt b/py2cbf/TODO.txt new file mode 100644 index 00000000..ede6b764 --- /dev/null +++ b/py2cbf/TODO.txt @@ -0,0 +1,4 @@ +\begin{verbatim} +This output comes from make_pycbf.py which generates the wrappers +End of output from make_pycbf.py +\end{verbatim} diff --git a/py2cbf/_pycbf.pyd b/py2cbf/_pycbf.pyd new file mode 100644 index 00000000..a8580cd2 Binary files /dev/null and b/py2cbf/_pycbf.pyd differ diff --git a/py2cbf/cbf_autoscrolled_window.py b/py2cbf/cbf_autoscrolled_window.py new file mode 100644 index 00000000..0d7e5743 --- /dev/null +++ b/py2cbf/cbf_autoscrolled_window.py @@ -0,0 +1,174 @@ +# cbf_autoscrolled_window.py +# utilities to create windows with a both a vertical +# scroll bar and a horizontal scroll bar with each scroll bar +# disappearing when the window is large enough +# +# copyright (c) 2011 Herbert J. Bernstein +# portions from +# http://effbot.org/zone/tkinter-autoscrollbar.htm +# Autohiding Scrollbars +# August 08, 1998 | Fredrik Lundh +# +# +# for incorporation into the CBFlib package API +# +###################################################################### +# # +# YOU MAY REDISTRIBUTE THE CBFLIB PACKAGE UNDER THE TERMS OF THE GPL # +# # +# ALTERNATIVELY YOU MAY REDISTRIBUTE THE CBFLIB API UNDER THE TERMS # +# OF THE LGPL # +# # +###################################################################### + +########################### GPL NOTICES ############################## +# # +# This program is free software; you can redistribute it and/or # +# modify it under the terms of the GNU General Public License as # +# published by the Free Software Foundation; either version 2 of # +# (the License, or (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # +# 02111-1307 USA # +# # +###################################################################### + +######################### LGPL NOTICES ############################### +# # +# This library is free software; you can redistribute it and/or # +# modify it under the terms of the GNU Lesser General Public # +# License as published by the Free Software Foundation; either # +# version 2.1 of the License, or (at your option) any later version. # +# # +# This library is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # +# Lesser General Public License for more details. # +# # +# You should have received a copy of the GNU Lesser General Public # +# License along with this library; if not, write to the Free # +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # +# MA 02110-1301 USA # +# # +###################################################################### + + + +import sys +try: + import Tkinter as TKINTER + import tkFileDialog as TKFILEDIALOG +except ImportError: + try: + import tkinter as TKINTER + import tkinter.filedialog as TKFILEDIALOG + except ImportError: + print "CBF: cbf_autoscrolled_window requires Tkinter" + sys.exit(1) + + + + + +################################################################# +# The following autoscrollbar logic from +# http://effbot.org/zone/tkinter-autoscrollbar.htm +# Autohiding Scrollbars +# August 08, 1998 | Fredrik Lundh +# +class AutoScrollbar(TKINTER.Scrollbar): + # a scrollbar that hides itself if it's not needed. only + # works if you use the grid geometry manager. + + __disabled = False + + def set(self, lo, hi): + if self.__disabled or (float(lo) <= 0.0 and float(hi) >= 1.0): + # grid_remove is currently missing from Tkinter! + self.tk.call("grid", "remove", self) + else: + self.grid() + TKINTER.Scrollbar.set(self, lo, hi) + def pack(self, **kw): + raise TclError, "cannot use pack with this widget" + def place(self, **kw): + raise TclError, "cannot use place with this widget" +################################################################# + def disable(self): + self.__disabled = True + self.tk.call("grid", "remove", self) + def enable(self): + self.__disabled = False + self.grid() + +class cbf_autoscrolled_window(TKINTER.Frame): + """ Class cbf_autoscrolled window returns an object + giving a frame and a canvas that are have visible + scroll bars when needed. + + Use: + window=cbf_autoscrolled_window(rootwin) + ... build scene in window.frame + window.frame.update_idletasks() + window.canvas.config(scrollregion=window.canvas.bbox(TKINTER.ALL)) + + rootwin.mainloop() + + The frame is accessible as window.frame + The canvas is accessible as window.canvas + """ + + + + def __cbf_create_autoscrolled_window(self,rootwin): + rootwin.grid_columnconfigure(0,weight=1) + rootwin.grid_columnconfigure(1,weight=0,minsize=8,pad=0) + rootwin.grid_rowconfigure(0,weight=1) + rootwin.grid_rowconfigure(1,weight=0,minsize=8,pad=0) + self.__hsb = AutoScrollbar(rootwin,orient=TKINTER.HORIZONTAL) + self.__hsb.grid(row=1,column=0, sticky="news") + self.__vsb = AutoScrollbar(rootwin) + self.__vsb.grid(row=0,column=1, sticky="news") + self.canvas = TKINTER.Canvas(rootwin, xscrollcommand=self.__hsb.set, \ + yscrollcommand=self.__vsb.set) + self.__vsb.config(command=self.canvas.yview) + self.__hsb.config(command=self.canvas.xview) + self.canvas.grid(row=0,column=0,sticky="news") + self.frame = TKINTER.Frame(self.canvas) + self.canvas.create_window(0, 0, anchor=TKINTER.NW, window=self.frame) + self.frame.update_idletasks() + self.canvas.config(scrollregion=self.canvas.bbox(TKINTER.ALL)) + self.frame.rowconfigure(1, weight=0, pad=0, minsize=10) + self.frame.rowconfigure(0, weight=1, pad=0, minsize=8) + self.frame.columnconfigure(1, weight=0, pad=0, minsize=10) + self.frame.columnconfigure(0, weight=1, pad=0, minsize=8) + + + def __init__(self,rootwin): + self.root=rootwin + self.canvas=None + self.__hsb=None + self.__vsb=None + self.frame=None + self.__cbf_create_autoscrolled_window(rootwin) + + def horizontal_scroll_disable(self): + self.__hsb.disable() + + def horizontal_scroll_enable(self): + self.__hsb.enable() + + def vertical_scroll_disable(self): + self.__vsb.disable() + + def vertical_scroll_enable(self): + self.__vsb.disable() + + diff --git a/py2cbf/cbf_axis_text.py b/py2cbf/cbf_axis_text.py new file mode 100644 index 00000000..1a0dc04c --- /dev/null +++ b/py2cbf/cbf_axis_text.py @@ -0,0 +1,148 @@ +# cbf_axis_test.py +# simple program to open a CBF and examine +# the AXIS category information + +import sys +import pycbf + + +def get_axis_chain(axis_table,axisname): + """ get_axis_chain + axis_table is a dictionary indexed by axis names + each row of axis_table is a dictionary with the + following keys: + "id": the axis name + "type": the axis type: + "general" + "rotation" + "translation" + "equipment": the particular equipment supported + "depends_on": the axis on which this one depends + "vector": the vector in the form [x,y,z] + "offset": the offset in the form [x,y,z] + For both the vector and offset, if the values + are not "." they are converted to numbers + + axisname is the axis for which the chain is needed + + the return is a dictionary indexed by the position + in the chain working from the axisname argument + down. The final "." is not included + + """ + axis_chain = {} + chainlength = 0 + nextaxis = axisname; + while nextaxis != "." and nextaxis in axis_table: + axis_row = axis_table[nextaxis] + axis_chain[chainlength] = nextaxis + nextaxis = axis_row["depends_on"] + chainlength = chainlength+1 + return axis_chain + + + +def get_table_entry(xcbf,xcol): + """ get_table_entry + xcbf is a cbf_handle_struct (a CBF) + xcol is the column for which a value is desired + """ + try: + xcbf.find_column(xcol) + xtemp = xcbf.get_value() + return xtemp + except: + return "." + +object = pycbf.cbf_handle_struct() +try: + cbf = sys.argv[1] + object.read_file(cbf,pycbf.MSG_DIGEST) + foundfile = 1 +except: + foundfile = 0 +# +# Minimal file open logic depending on the user +# to know the exact path +# +# Exit on an empty string +# +while foundfile == 0: + cbf = raw_input("path to cbf: ") + if cbf == "": + foundfile = -1 + else: + try: + object.read_file(cbf,pycbf.MSG_DIGEST) + foundfile = 1 + except: + print "Unable to open ",cbf + +if foundfile == -1: + sys.exit(0) +object.rewind_datablock() +try: + object.find_category("axis") +except: + print "No axis category found" + sys.exit() +axis_table = {} +axis_objects = {} +base_axis_table = {} +dependent_table = {} +equipment_table = {} + +axis_rows = object.count_rows() +print axis_rows, "rows in axis table" +if axis_rows < 1: + print "Axis category has no rows" + sys.exit() +for jrow in range(axis_rows): + object.rewind_column() + # print "jrow: ", jrow + object.select_row(jrow) + temp_dictionary = {} + id = get_table_entry(object,"id") + temp_dictionary["id"] = id + temp_dictionary["type"] = get_table_entry(object,"type") + equipment = get_table_entry(object,"equipment") + if equipment in equipment_table: + equipment_table[equipment].append(id) + else: + equipment_table[equipment] = [id] + temp_dictionary["equipment"] = equipment + depends_on = get_table_entry(object,"depends_on") + temp_dictionary["depends_on"] = depends_on + if depends_on in dependent_table: + dependent_table[depends_on].append(id) + else: + dependent_table[depends_on] = [id] + vector_1 = get_table_entry(object,"vector[1]") + vector_2 = get_table_entry(object,"vector[2]") + vector_3 = get_table_entry(object,"vector[3]") + offset_1 = get_table_entry(object,"offset[1]") + offset_2 = get_table_entry(object,"offset[2]") + offset_3 = get_table_entry(object,"offset[3]") + if offset_1 != ".": + offset_1 = float(offset_1) + if offset_2 != ".": + offset_2 = float(offset_2) + if offset_3 != ".": + offset_3 = float(offset_3) + if vector_1 != ".": + vector_1 = float(vector_1) + if vector_2 != ".": + vector_2 = float(vector_2) + if vector_3 != ".": + vector_3 = float(vector_3) + + temp_dictionary["vector"] = [vector_1,vector_2,vector_3] + temp_dictionary["offset"] = [offset_1,offset_2,offset_3] + axis_table[temp_dictionary["id"]] = temp_dictionary + base_axis_table[temp_dictionary["id"]] = temp_dictionary["depends_on"] + + +#print "axis table: " +for key in axis_table.keys(): + print key+": vector: ", axis_table[key]["vector"],", offset: ", axis_table[key]["offset"] + print "axis chain:", get_axis_chain(axis_table,key) diff --git a/py2cbf/cbf_tkfiledialog.py b/py2cbf/cbf_tkfiledialog.py new file mode 100644 index 00000000..95d5b95a --- /dev/null +++ b/py2cbf/cbf_tkfiledialog.py @@ -0,0 +1,279 @@ +# cbf_tkfiledialog.py +# +# wrapper for tkfiledialog.py modified to +# read or write a cbf +# +# copyright (c) 2011 Herbert J. Bernstein +# +# for incorporation into the CBFlib package API +# +###################################################################### +# # +# YOU MAY REDISTRIBUTE THE CBFLIB PACKAGE UNDER THE TERMS OF THE GPL # +# # +# ALTERNATIVELY YOU MAY REDISTRIBUTE THE CBFLIB API UNDER THE TERMS # +# OF THE LGPL # +# # +###################################################################### + +########################### GPL NOTICES ############################## +# # +# This program is free software; you can redistribute it and/or # +# modify it under the terms of the GNU General Public License as # +# published by the Free Software Foundation; either version 2 of # +# (the License, or (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # +# 02111-1307 USA # +# # +###################################################################### + +######################### LGPL NOTICES ############################### +# # +# This library is free software; you can redistribute it and/or # +# modify it under the terms of the GNU Lesser General Public # +# License as published by the Free Software Foundation; either # +# version 2.1 of the License, or (at your option) any later version. # +# # +# This library is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # +# Lesser General Public License for more details. # +# # +# You should have received a copy of the GNU Lesser General Public # +# License along with this library; if not, write to the Free # +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # +# MA 02110-1301 USA # +# # +###################################################################### + + + +import pycbf +try: + import Tkinter as TKINTER + import tkFileDialog as TKFILEDIALOG +except ImportError: + import tkinter as TKINTER + import tkinter.filedialog as TKFILEDIALOG +import thread +import time + +parent = None + +def dummyparent(x,y): + global parent + parent = TKINTER.Tk() + width = parent.winfo_screenwidth() + height = parent.winfo_screenheight() + parent.geometry("%dx%d+%d+%d" % (width,height,x,y)) + parent.withdraw() + parent.mainloop() + +def save_cbf(cbf = None, file_extensions=None, x=100, y=100, title="Save CBF", maxfiles=20, \ + mode="wide", flags=pycbf.MSG_DIGEST, encoding=0, root=None): + """ + cbf_tkfiledialog.save_cbf + + Use an askopenfilename dialog box to write an existing + cbf into the specified file. An exception is raised + if the cbf is None and None is returned. If the write + is successful, the cbf is returned. + + file_extensions is either None, to use the default list + of extensions ["*.cbf", "*.cif", "*.dic", "*.txt", "*.*"], + or a specific list of extensions to use. The actual + extension chosen determines whether a CBF or CIF is written. + + (x,y) are for compatibility with the vpython version of + this call. In this TK version, they are only used + as top left corner offsets for a dummy root window if + none is specified. + + title is the dialog box title. + + maxfiles is for compatibility with the vpython version of + this call and is not used in this TK version. + + mode is either "wide" or "narrow" to specify writing 2048 + character line length files or 80 character line length + files + + flags is the bit-wise or of any flags needed for the + read. The default is pycbf.MSG_DIGEST + + encoding is the bit-wise or of any encoding flags to + be used for writing binary sections. + + root is the parent window for the dialog window. If None + then an invisible root window is created and destroyed. + + + """ + ## print "DEBUG: call to save_cbf cbf=", cbf, "file_extensions=", file_extensions + if cbf == None: + raise ValueError("To save a cbf, the cbf must be created first.") + if maxfiles < 5: maxfiles = 5 + if mode != "wide" and mode != "narrow" : + raise ValueError("To save a file, mode must be wide or narrow.") + defaultextension = ".cbf" + if file_extensions is not None: + if not isinstance(file_extensions, (list,tuple)): + file_extensions = [file_extensions] + defaultextension = file_extensions + filetypes = [] + for filetype in file_extensions: + if filetype[0] != "*" and filetype[0] != ".": filetype="."+filetype + if filetype[0] != "*": filetype = "*"+filetype + description = "" + if filetype.lower() == "*.cbf": description = "Crystallographic Binary Files" + if filetype.lower() == "*.cif": description = "Crystallographic Information Files" + if filetype.lower() == "*.dic": description = "Crystallographic Information File Dictionaries" + if filetype.lower() == "*.txt": description = "Text Files" + if filetype.lower() == "*.*": description = "All Files" + filetypes.append((description,filetype)) + else: + filetypes = [("Crystallographic Binary Files","*.cbf"),\ + ("Crystallographic Information Files","*.cif"),\ + ("Crystallographic Information File Dictionaries","*.dic"),\ + ("Text files","*.txt"), \ + ("All files","*.*")] + if cbf == None: return None + parent = root + if root == None: + thread.start_new_thread(dummyparent,(x,y)) + while parent==None: time.sleep(1) + filename = TKFILEDIALOG.asksaveasfilename(defaultextension=defaultextension, \ + title=title, \ + filetypes = [("Crystallographic Binary Files","*.cbf"),\ + ("Crystallographic Information Files","*.cif"),\ + ("Crystallographic Information File Dictionaries","*.dic"),\ + ("Text files","*.txt"), \ + ("All files","*.*")], \ + parent = parent) + if root == None: + parent.destroy() + if filename == '': + return None + if filename[-1] == '|' or filename[-1] == ' ': + filename = filename[:-1] + if filename == '': + return None + t = filename.split(".") + ext = '' + if len(t) > 0: + ext = '.'+t[-1] + elif t[0] == '': + return None + if file_extensions is not None: + if ext.lower() != (file_extensions[0]).lower: + filename += file_extensions[0] + ext = file_extensions[0]; + ciforcbf = pycbf.CBF + if ext.lower() == ".cif" or ext.lower() == ".dic" or ext.lower() == ".txt": + ciforcbf = pycbf.CIF + try: + if mode.lower() == "wide": + cbf.write_widefile(filename,ciforcbf,flags,encoding) + else: + cbf.write_file(filename,ciforcbf,flags,encoding) + menus.visible = 0 + del menus + currentdisplay.select() + return cbf + except: + return None + + +def get_cbf(cbf = None, file_extensions=None, x=100, y=100, title="Open CBF", maxfiles=20, \ + mode='wide', flags=pycbf.MSG_DIGEST, root = None): + """ + cbf_tkfiledialog.get_cbf + + Use an askopenfilename dialog box to read the selected + file into a new cbf (if cbf==None), or into an existing + cbf. In either case the cbf object into which the read + was done is returned. It there is an error None is + returned. + + file_extensions is either None, to use the default list + of extensions ["*.cbf", "*.cif", "*.dic", "*.txt", "*.*"], + or a specific list of extensions to use. + + (x,y) are for compatibility with the vpython version of + this call. In this TK version, they are only used + as top left corner offsets for a dummy root window if + none is specified. + + title is the dialog box title. + + maxfiles is for compatibility with the vpython version of + this call and is not used in this TK version. + + mode is either "wide" or "narrow" to specify reading 2048 + character line length files or 80 character line length + files + + flags is the bit-wise or of any flags needed for the + read. The default is pycbf.MSG_DIGEST + + root is the parent window for the dialog window. If None + then an invisible root window is created and destroyed. + + + """ + global parent + if maxfiles < 5: maxfiles = 5 + if mode != "wide" and mode != "narrow" : + raise ValueError("To read a file, mode must be wide or narrow.") + if file_extensions is not None: + if not isinstance(file_extensions, (list,tuple)): + file_extensions = [file_extensions] + filetypes = [] + for filetype in file_extensions: + if filetype[0] != "*" and filetype[0] != ".": filetype="."+filetype + if filetype[0] != "*": filetype = "*"+filetype + description = "" + if filetype.lower() == "*.cbf": description = "Crystallographic Binary Files" + if filetype.lower() == "*.cif": description = "Crystallographic Information Files" + if filetype.lower() == "*.dic": description = "Crystallographic Information File Dictionaries" + if filetype.lower() == "*.txt": description = "Text Files" + if filetype.lower() == "*.*": description = "All Files" + filetypes.append((description,filetype)) + else: + filetypes = [("Crystallographic Binary Files","*.cbf"),\ + ("Crystallographic Information Files","*.cif"),\ + ("Crystallographic Information File Dictionaries","*.dic"),\ + ("Text files","*.txt"), \ + ("All files","*.*")] + parent = root + if root == None: + thread.start_new_thread(dummyparent,(x,y)) + while parent==None: time.sleep(1) + else: + parent = root + filename = TKFILEDIALOG.askopenfilename( \ + title=title, \ + filetypes = filetypes, \ + parent = parent) + if root == None: + parent.destroy() + if filename is None: + return None + if cbf == None: + cbf = pycbf.cbf_handle_struct() + try: + if mode=="wide": + cbf.read_widefile(str(filename),flags) + else: + cbf.read_file(str(filename),flags) + return cbf + except: + return None diff --git a/py2cbf/cbfdetectorwrappers.i b/py2cbf/cbfdetectorwrappers.i new file mode 100644 index 00000000..3b29cd2d --- /dev/null +++ b/py2cbf/cbfdetectorwrappers.i @@ -0,0 +1,1354 @@ + +// Tell SWIG not to make constructor for these objects +%nodefault cbf_detector_struct; +%nodefault cbf_detector; + +// Tell SWIG what the object is, so we can build the class +typedef struct +{ + cbf_positioner positioner; + + double displacement [2], increment [2]; + + size_t axes, index [2]; +} +cbf_detector_struct; + +typedef cbf_detector_struct *cbf_detector; + +%feature("autodoc","1"); + +%extend cbf_detector_struct{// Tell SWIG to attach functions to the structure + + cbf_detector_struct(){ // Constructor + // DO NOT CONSTRUCT WITHOUT A CBFHANDLE + cbf_failnez(CBF_ARGUMENT); + return NULL; /* Should never be executed */ + } + + ~cbf_detector_struct(){ // Destructor + cbf_failnez(cbf_free_detector(self)); + } +%feature("autodoc", " +Returns : +*args : double indexfast,double indexslow,double centerfast,double centerslow + +C prototype: int cbf_set_beam_center_fs (cbf_detector detector, + double *indexfast, double *indexslow, double *centerfast, + double *centerslow); + +CBFLib documentation: +DESCRIPTION +cbf_get_beam_center sets *centerfast and *centerslow to the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector and *indexfast and +*indexslow to the corresponding indices. cbf_set_beam_center sets the +offsets in the axis category for the detector element axis with +precedence 1 to place the beam center at the position given in mm by +*centerfast and *centerslow as the displacements in mm along the +detector axes from pixel (0, 0) to the point at which the beam +intersects the detector at the indices given *indexfast and +*indexslow. cbf_set_reference_beam_center sets the displacments in +the array_structure_list_axis category to place the beam center at +the position given in mm by *centerfast and *centerslow as the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector at the indices given +by *indexfast and *indexslow. In order to achieve consistent results, +a reference detector should be used for detector to have all axes at +their reference settings. +Note that the precedence 1 axis is the fastest axis, so that +*centerfast and *indexfast are the fast axis components of the center +and *centerslow and *indexslow are the slow axis components of the +center. +The _fs calls give the displacments in a fast-to-slow order. The +calls with no suffix and the calls _sf calls give the displacements +in slow-to-fast order +Any of the destination pointers may be NULL for getting the beam +center. For setting the beam axis, either the indices of the center +must not be NULL. +The indices are non-negative for beam centers within the detector +surface, but the center for an axis with a negative increment will be +negative for a beam center within the detector surface. +For cbf_set_beam_center if the diffrn_data_frame category exists with +a row for the corresponding element id, the values will be set for +_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in +millimetres and the value of _diffrn_data_frame.center_units will be +set to 'mm'. +For cbf_set_reference_beam_center if the diffrn_detector_element +category exists with a row for the corresponding element id, the +values will be set for _diffrn_detector_element.reference_center_fast +and _diffrn_detector_element.reference_center_slow in millimetres and +the value of _diffrn_detector_element.reference_units will be set to +'mm'. +ARGUMENTS +detector Detector handle. indexfast Pointer to the destination +fast index. indexslow Pointer to the destination slow index. +centerfast Pointer to the destination displacement along the fast +axis. centerslow Pointer to the destination displacement along the +slow axis. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_beam_center_fs; + + void set_beam_center_fs(double *indexfast, double *indexslow, + double *centerfast,double *centerslow){ + cbf_failnez(cbf_set_beam_center_fs(self, indexfast, indexslow, + centerfast, centerslow)); + } +%feature("autodoc", " +Returns : +*args : double indexfast,double indexslow,double centerfast,double centerslow + +C prototype: int cbf_set_reference_beam_center_fs (cbf_detector detector, + double *indexfast, double *indexslow, double *centerfast, + double *centerslow); + +CBFLib documentation: +DESCRIPTION +cbf_get_beam_center sets *centerfast and *centerslow to the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector and *indexfast and +*indexslow to the corresponding indices. cbf_set_beam_center sets the +offsets in the axis category for the detector element axis with +precedence 1 to place the beam center at the position given in mm by +*centerfast and *centerslow as the displacements in mm along the +detector axes from pixel (0, 0) to the point at which the beam +intersects the detector at the indices given *indexfast and +*indexslow. cbf_set_reference_beam_center sets the displacments in +the array_structure_list_axis category to place the beam center at +the position given in mm by *centerfast and *centerslow as the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector at the indices given +by *indexfast and *indexslow. In order to achieve consistent results, +a reference detector should be used for detector to have all axes at +their reference settings. +Note that the precedence 1 axis is the fastest axis, so that +*centerfast and *indexfast are the fast axis components of the center +and *centerslow and *indexslow are the slow axis components of the +center. +The _fs calls give the displacments in a fast-to-slow order. The +calls with no suffix and the calls _sf calls give the displacements +in slow-to-fast order +Any of the destination pointers may be NULL for getting the beam +center. For setting the beam axis, either the indices of the center +must not be NULL. +The indices are non-negative for beam centers within the detector +surface, but the center for an axis with a negative increment will be +negative for a beam center within the detector surface. +For cbf_set_beam_center if the diffrn_data_frame category exists with +a row for the corresponding element id, the values will be set for +_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in +millimetres and the value of _diffrn_data_frame.center_units will be +set to 'mm'. +For cbf_set_reference_beam_center if the diffrn_detector_element +category exists with a row for the corresponding element id, the +values will be set for _diffrn_detector_element.reference_center_fast +and _diffrn_detector_element.reference_center_slow in millimetres and +the value of _diffrn_detector_element.reference_units will be set to +'mm'. +ARGUMENTS +detector Detector handle. indexfast Pointer to the destination +fast index. indexslow Pointer to the destination slow index. +centerfast Pointer to the destination displacement along the fast +axis. centerslow Pointer to the destination displacement along the +slow axis. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_reference_beam_center_fs; + + void set_reference_beam_center_fs(double *indexfast, double *indexslow, + double *centerfast,double *centerslow){ + cbf_failnez(cbf_set_reference_beam_center_fs(self, indexfast, indexslow, + centerfast, centerslow)); + } +%feature("autodoc", " +Returns : double index1,double index2,double center1,double center2 +*args : + +C prototype: int cbf_get_beam_center (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, + double *centerfast); + +CBFLib documentation: +DESCRIPTION +cbf_get_beam_center sets *centerfast and *centerslow to the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector and *indexfast and +*indexslow to the corresponding indices. cbf_set_beam_center sets the +offsets in the axis category for the detector element axis with +precedence 1 to place the beam center at the position given in mm by +*centerfast and *centerslow as the displacements in mm along the +detector axes from pixel (0, 0) to the point at which the beam +intersects the detector at the indices given *indexfast and +*indexslow. cbf_set_reference_beam_center sets the displacments in +the array_structure_list_axis category to place the beam center at +the position given in mm by *centerfast and *centerslow as the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector at the indices given +by *indexfast and *indexslow. In order to achieve consistent results, +a reference detector should be used for detector to have all axes at +their reference settings. +Note that the precedence 1 axis is the fastest axis, so that +*centerfast and *indexfast are the fast axis components of the center +and *centerslow and *indexslow are the slow axis components of the +center. +The _fs calls give the displacments in a fast-to-slow order. The +calls with no suffix and the calls _sf calls give the displacements +in slow-to-fast order +Any of the destination pointers may be NULL for getting the beam +center. For setting the beam axis, either the indices of the center +must not be NULL. +The indices are non-negative for beam centers within the detector +surface, but the center for an axis with a negative increment will be +negative for a beam center within the detector surface. +For cbf_set_beam_center if the diffrn_data_frame category exists with +a row for the corresponding element id, the values will be set for +_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in +millimetres and the value of _diffrn_data_frame.center_units will be +set to 'mm'. +For cbf_set_reference_beam_center if the diffrn_detector_element +category exists with a row for the corresponding element id, the +values will be set for _diffrn_detector_element.reference_center_fast +and _diffrn_detector_element.reference_center_slow in millimetres and +the value of _diffrn_detector_element.reference_units will be set to +'mm'. +ARGUMENTS +detector Detector handle. indexfast Pointer to the destination +fast index. indexslow Pointer to the destination slow index. +centerfast Pointer to the destination displacement along the fast +axis. centerslow Pointer to the destination displacement along the +slow axis. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_beam_center; + +%apply double *OUTPUT {double *index1, double *index2, + double *center1,double *center2}; + void get_beam_center(double *index1, double *index2, + double *center1,double *center2){ + cbf_failnez(cbf_get_beam_center(self, index1, index2, + center1, center2)); + } +%feature("autodoc", " +Returns : double coordinate1,double coordinate2,double coordinate3 +*args : double indexfast,double indexslow + +C prototype: int cbf_get_pixel_coordinates_fs (cbf_detector detector, + double indexfast, double indexslow, double *coordinate1, + double *coordinate2, double *coordinate3); + +CBFLib documentation: +DESCRIPTION +cbf_get_pixel_coordinates, cbf_get_pixel_coordinates_fs and +cbf_get_pixel_coordinates_sf ses *coordinate1, *coordinate2, and +*coordinate3 to the vector position of pixel (indexfast, indexslow) +on the detector surface. If indexslow and indexfast are integers then +the coordinates correspond to the center of a pixel. +Any of the destination pointers may be NULL. +ARGUMENTS +detector Detector handle. indexslow Slow index. indexfast + Fast index. coordinate1 Pointer to the destination x component. +coordinate2 Pointer to the destination y component. coordinate3 +Pointer to the destination z component. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_pixel_coordinates_fs; + +%apply double *OUTPUT {double *coordinate1, + double *coordinate2, double *coordinate3}; + void get_pixel_coordinates_fs(double indexfast, double indexslow, + double *coordinate1, + double *coordinate2, + double *coordinate3){ + cbf_failnez(cbf_get_pixel_coordinates_fs(self, indexfast, indexslow, coordinate1, coordinate2, coordinate3)); + } +%feature("autodoc", " +Returns : Float pixel size +*args : Int axis_number + +C prototype: int cbf_get_inferred_pixel_size (cbf_detector detector, + int axis_number, double *psize); + +CBFLib documentation: +DESCRIPTION +cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_sf set +*psize to point to the double value in millimeters of the pixel size +for the axis axis_number value. The slow index is treated as axis 1 +and the next faster index is treated as axis 2. +cbf_get_inferred_pixel_size_fs sets *psize to point to the double +value in millimeters of the pixel size for the axis axis_number +value. The fast index is treated as axis 1 and the next slower index +is treated as axis 2. +If the axis number is negative, the axes are used in the reverse +order so that an axis_number of -1 indicates the fast axes in a call +to cbf_get_inferred_pixel_size or cbf_get_inferred_pixel_size_sf and +indicates the fast axis in a call to cbf_get_inferred_pixel_size_fs. +ARGUMENTS +detector Detector handle. axis_number The number of the axis. +psize Pointer to the destination pizel size in mm. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_inferred_pixel_size; + +%apply double *OUTPUT { double *psize } get_inferred_pixel_size; +void get_inferred_pixel_size(unsigned int axis_number, double* psize){ + cbf_failnez(cbf_get_inferred_pixel_size(self, axis_number, psize)); + } +%feature("autodoc", " +Returns : double area,double projected_area +*args : double index1,double index2 + +C prototype: int cbf_get_pixel_area (cbf_detector detector, double indexslow, + double indexfast, double *area, double *projected_area); + +CBFLib documentation: +DESCRIPTION +cbf_get_pixel_area, cbf_get_pixel_area_fs and cbf_get_pixel_area_sf +set *area to the area of the pixel at (indexfast, indexslow) on the +detector surface and *projected_area to the apparent area of the +pixel as viewed from the sample position, with indexslow being the +slow axis and indexfast being the fast axis. +Either of the destination pointers may be NULL. +ARGUMENTS +detector Detector handle. indexfast Fast index. +indexslow Slow index. area Pointer to the +destination area in mm2. projected_area Pointer to the destination +apparent area in mm2. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_pixel_area; + +%apply double *OUTPUT{double *area,double *projected_area}; + void get_pixel_area(double index1, double index2, + double *area,double *projected_area){ + cbf_failnez(cbf_get_pixel_area (self, + index1, index2, area,projected_area)); + } +%feature("autodoc", " +Returns : double normal1,double normal2,double normal3 +*args : double indexfast,double indexslow + +C prototype: int cbf_get_pixel_normal_fs (cbf_detector detector, + double indexfast, double indexslow, double *normal1, + double *normal2, double *normal3); + +CBFLib documentation: +DESCRIPTION +cbf_get_detector_normal, cbf_get_pixel_normal_fs and +cbf_get_pixel_normal_sf set *normal1, *normal2, and *normal3 to the 3 +components of the of the normal vector to the pixel at (indexfast, +indexslow). The vector is normalized. +Any of the destination pointers may be NULL. +ARGUMENTS +detector Detector handle. indexslow Slow index. indexfast Fast +index. normal1 Pointer to the destination x component of the +normal vector. normal2 Pointer to the destination y component of +the normal vector. normal3 Pointer to the destination z component +of the normal vector. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_pixel_normal_fs; + +%apply double *OUTPUT {double *normal1, double *normal2, double *normal3}; + void get_pixel_normal_fs ( double indexfast, double indexslow, + double *normal1, double *normal2, double *normal3){ + cbf_failnez(cbf_get_pixel_normal_fs(self, + indexfast,indexslow,normal1,normal2,normal3)); + } + +%feature("autodoc", " +Returns : String +*args : Integer index + +C prototype: int cbf_get_detector_surface_axes(cbf_detector detector, + const char * * axis_id1, const char * * axis_id2); + +CBFLib documentation: +DESCRIPTION +cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and +*slowaxis3 to the 3 components of the slow axis of the specified +detector at the current settings of all axes. +cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and +*fastaxis3 to the 3 components of the fast axis of the specified +detector at the current settings of all axes. cbf_get_detector_axes, +cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set +*slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the +slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 +components of the fast axis of the specified detector at the current +settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 +and *axis_id2 to the names of the two surface axes of the detector or + \". \", +Any of the destination pointers may be NULL. +ARGUMENTS +detector Detector handle. slowaxis1 Pointer to the destination x +component of the slow axis vector. slowaxis2 Pointer to the +destination y component of the slow axis vector. slowaxis3 Pointer +to the destination z component of the slow axis vector. fastaxis1 +Pointer to the destination x component of the fast axis vector. +fastaxis2 Pointer to the destination y component of the fast axis +vector. fastaxis3 Pointer to the destination z component of the +fast axis vector. axis_id1 Pointer to the destination first +surface axis name. axis_id2 Pointer to the destination second +surface axis name. axis_id3 Pointer to the destination third +surface axis name. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")cbf_get_detector_surface_axes; + + const char * get_detector_surface_axes (int index ){ + const char * axis_id1; + const char * axis_id2; + cbf_failnez(cbf_get_detector_surface_axes(self, + &axis_id1, &axis_id2)); + if (index == 0) return axis_id1; + if (index == 1) return axis_id2; + return "."; + } + + +%feature("autodoc", " +Returns : double slowaxis1,double slowaxis2,double slowaxis3,double fastaxis1, + double fastaxis2,double fastaxis3 +*args : + +C prototype: int cbf_get_detector_axes (cbf_detector detector, + double *slowaxis1, double *slowaxis2, double *slowaxis3, + double *fastaxis1, double *fastaxis2, double *fastaxis3); + +CBFLib documentation: +DESCRIPTION +cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and +*slowaxis3 to the 3 components of the slow axis of the specified +detector at the current settings of all axes. +cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and +*fastaxis3 to the 3 components of the fast axis of the specified +detector at the current settings of all axes. cbf_get_detector_axes, +cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set +*slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the +slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 +components of the fast axis of the specified detector at the current +settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 +and *axis_id2 to the names of the two surface axes of the detector or + \". \", +Any of the destination pointers may be NULL. +ARGUMENTS +detector Detector handle. slowaxis1 Pointer to the destination x +component of the slow axis vector. slowaxis2 Pointer to the +destination y component of the slow axis vector. slowaxis3 Pointer +to the destination z component of the slow axis vector. fastaxis1 +Pointer to the destination x component of the fast axis vector. +fastaxis2 Pointer to the destination y component of the fast axis +vector. fastaxis3 Pointer to the destination z component of the +fast axis vector. axis_id1 Pointer to the destination first +surface axis name. axis_id2 Pointer to the destination second +surface axis name. axis_id3 Pointer to the destination third +surface axis name. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_detector_axes; + +%apply double *OUTPUT {double *slowaxis1, double *slowaxis2, double *slowaxis3, + double *fastaxis1, double *fastaxis2, double *fastaxis3}; + void get_detector_axes ( double *slowaxis1, double *slowaxis2, double *slowaxis3, + double *fastaxis1, double *fastaxis2, double *fastaxis3){ + cbf_failnez(cbf_get_detector_axes(self, + slowaxis1,slowaxis2,slowaxis3, + fastaxis1,fastaxis2,fastaxis3)); + } + +%feature("autodoc", " +Returns : +*args : double indexslow,double indexfast,double centerslow,double centerfast + +C prototype: int cbf_set_reference_beam_center (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, + double *centerfast); + +CBFLib documentation: +DESCRIPTION +cbf_get_beam_center sets *centerfast and *centerslow to the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector and *indexfast and +*indexslow to the corresponding indices. cbf_set_beam_center sets the +offsets in the axis category for the detector element axis with +precedence 1 to place the beam center at the position given in mm by +*centerfast and *centerslow as the displacements in mm along the +detector axes from pixel (0, 0) to the point at which the beam +intersects the detector at the indices given *indexfast and +*indexslow. cbf_set_reference_beam_center sets the displacments in +the array_structure_list_axis category to place the beam center at +the position given in mm by *centerfast and *centerslow as the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector at the indices given +by *indexfast and *indexslow. In order to achieve consistent results, +a reference detector should be used for detector to have all axes at +their reference settings. +Note that the precedence 1 axis is the fastest axis, so that +*centerfast and *indexfast are the fast axis components of the center +and *centerslow and *indexslow are the slow axis components of the +center. +The _fs calls give the displacments in a fast-to-slow order. The +calls with no suffix and the calls _sf calls give the displacements +in slow-to-fast order +Any of the destination pointers may be NULL for getting the beam +center. For setting the beam axis, either the indices of the center +must not be NULL. +The indices are non-negative for beam centers within the detector +surface, but the center for an axis with a negative increment will be +negative for a beam center within the detector surface. +For cbf_set_beam_center if the diffrn_data_frame category exists with +a row for the corresponding element id, the values will be set for +_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in +millimetres and the value of _diffrn_data_frame.center_units will be +set to 'mm'. +For cbf_set_reference_beam_center if the diffrn_detector_element +category exists with a row for the corresponding element id, the +values will be set for _diffrn_detector_element.reference_center_fast +and _diffrn_detector_element.reference_center_slow in millimetres and +the value of _diffrn_detector_element.reference_units will be set to +'mm'. +ARGUMENTS +detector Detector handle. indexfast Pointer to the destination +fast index. indexslow Pointer to the destination slow index. +centerfast Pointer to the destination displacement along the fast +axis. centerslow Pointer to the destination displacement along the +slow axis. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_reference_beam_center; + + void set_reference_beam_center(double *indexslow, double *indexfast, + double *centerslow,double *centerfast){ + cbf_failnez(cbf_set_reference_beam_center(self, indexslow, indexfast, + centerslow, centerfast)); + } +%feature("autodoc", " +Returns : double slowaxis1,double slowaxis2,double slowaxis3 +*args : + +C prototype: int cbf_get_detector_axis_slow (cbf_detector detector, + double *slowaxis1, double *slowaxis2, double *slowaxis3); + +CBFLib documentation: +DESCRIPTION +cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and +*slowaxis3 to the 3 components of the slow axis of the specified +detector at the current settings of all axes. +cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and +*fastaxis3 to the 3 components of the fast axis of the specified +detector at the current settings of all axes. cbf_get_detector_axes, +cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set +*slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the +slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 +components of the fast axis of the specified detector at the current +settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 +and *axis_id2 to the names of the two surface axes of the detector or + \". \", +Any of the destination pointers may be NULL. +ARGUMENTS +detector Detector handle. slowaxis1 Pointer to the destination x +component of the slow axis vector. slowaxis2 Pointer to the +destination y component of the slow axis vector. slowaxis3 Pointer +to the destination z component of the slow axis vector. fastaxis1 +Pointer to the destination x component of the fast axis vector. +fastaxis2 Pointer to the destination y component of the fast axis +vector. fastaxis3 Pointer to the destination z component of the +fast axis vector. axis_id1 Pointer to the destination first +surface axis name. axis_id2 Pointer to the destination second +surface axis name. axis_id3 Pointer to the destination third +surface axis name. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_detector_axis_slow; + +%apply double *OUTPUT {double *slowaxis1, double *slowaxis2, double *slowaxis3}; + void get_detector_axis_slow ( double *slowaxis1, double *slowaxis2, double *slowaxis3){ + cbf_failnez(cbf_get_detector_axis_slow(self, + slowaxis1,slowaxis2,slowaxis3)); + } + +%feature("autodoc", " +Returns : double distance +*args : + +C prototype: int cbf_get_detector_distance (cbf_detector detector, + double *distance); + +CBFLib documentation: +DESCRIPTION +cbf_get_detector_distance sets *distance to the nearest distance from +the sample position to the detector plane. +ARGUMENTS +detector Detector handle. distance Pointer to the destination +distance. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_detector_distance; + +%apply double *OUTPUT {double *distance}; + void get_detector_distance (double *distance){ + cbf_failnez(cbf_get_detector_distance(self,distance)); + } +%feature("autodoc", " +Returns : Float pixel size +*args : Int axis_number + +C prototype: int cbf_get_inferred_pixel_size_fs(cbf_detector detector, + int axis_number, double *psize); + +CBFLib documentation: +DESCRIPTION +cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_sf set +*psize to point to the double value in millimeters of the pixel size +for the axis axis_number value. The slow index is treated as axis 1 +and the next faster index is treated as axis 2. +cbf_get_inferred_pixel_size_fs sets *psize to point to the double +value in millimeters of the pixel size for the axis axis_number +value. The fast index is treated as axis 1 and the next slower index +is treated as axis 2. +If the axis number is negative, the axes are used in the reverse +order so that an axis_number of -1 indicates the fast axes in a call +to cbf_get_inferred_pixel_size or cbf_get_inferred_pixel_size_sf and +indicates the fast axis in a call to cbf_get_inferred_pixel_size_fs. +ARGUMENTS +detector Detector handle. axis_number The number of the axis. +psize Pointer to the destination pizel size in mm. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_inferred_pixel_size_fs; + +%apply double *OUTPUT { double *psize } get_inferred_pixel_size; +void get_inferred_pixel_size_fs(unsigned int axis_number, double* psize){ + cbf_failnez(cbf_get_inferred_pixel_size_fs(self, axis_number, psize)); + } +%feature("autodoc", " +Returns : double normal1,double normal2,double normal3 +*args : + +C prototype: int cbf_get_detector_normal (cbf_detector detector, + double *normal1, double *normal2, double *normal3); + +CBFLib documentation: +DESCRIPTION +cbf_get_detector_normal sets *normal1, *normal2, and *normal3 to the +3 components of the of the normal vector to the detector plane. The +vector is normalized. +Any of the destination pointers may be NULL. +ARGUMENTS +detector Detector handle. normal1 Pointer to the destination x +component of the normal vector. normal2 Pointer to the destination +y component of the normal vector. normal3 Pointer to the +destination z component of the normal vector. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_detector_normal; + +%apply double *OUTPUT {double *normal1, double *normal2, double *normal3}; + void get_detector_normal(double *normal1, + double *normal2, + double *normal3){ + cbf_failnez(cbf_get_detector_normal(self, + normal1, normal2, normal3)); + } +%feature("autodoc", " +Returns : double fastaxis1,double fastaxis2,double fastaxis3 +*args : + +C prototype: int cbf_get_detector_axis_fast (cbf_detector detector, + double *fastaxis1, double *fastaxis2, double *fastaxis3); + +CBFLib documentation: +DESCRIPTION +cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and +*slowaxis3 to the 3 components of the slow axis of the specified +detector at the current settings of all axes. +cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and +*fastaxis3 to the 3 components of the fast axis of the specified +detector at the current settings of all axes. cbf_get_detector_axes, +cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set +*slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the +slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 +components of the fast axis of the specified detector at the current +settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 +and *axis_id2 to the names of the two surface axes of the detector or + \". \", +Any of the destination pointers may be NULL. +ARGUMENTS +detector Detector handle. slowaxis1 Pointer to the destination x +component of the slow axis vector. slowaxis2 Pointer to the +destination y component of the slow axis vector. slowaxis3 Pointer +to the destination z component of the slow axis vector. fastaxis1 +Pointer to the destination x component of the fast axis vector. +fastaxis2 Pointer to the destination y component of the fast axis +vector. fastaxis3 Pointer to the destination z component of the +fast axis vector. axis_id1 Pointer to the destination first +surface axis name. axis_id2 Pointer to the destination second +surface axis name. axis_id3 Pointer to the destination third +surface axis name. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_detector_axis_fast; + +%apply double *OUTPUT {double *fastaxis1, double *fastaxis2, double *fastaxis3}; + void get_detector_axis_fast ( double *fastaxis1, double *fastaxis2, double *fastaxis3){ + cbf_failnez(cbf_get_detector_axis_fast(self, + fastaxis1,fastaxis2,fastaxis3)); + } + +%feature("autodoc", " +Returns : double fastaxis1,double fastaxis2,double fastaxis3,double slowaxis1, + double slowaxis2,double slowaxis3 +*args : + +C prototype: int cbf_get_detector_axes_fs (cbf_detector detector, + double *fastaxis1, double *fastaxis2, double *fastaxis3, + double *slowaxis1, double *slowaxis2, double *slowaxis3); + +CBFLib documentation: +DESCRIPTION +cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and +*slowaxis3 to the 3 components of the slow axis of the specified +detector at the current settings of all axes. +cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and +*fastaxis3 to the 3 components of the fast axis of the specified +detector at the current settings of all axes. cbf_get_detector_axes, +cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set +*slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the +slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 +components of the fast axis of the specified detector at the current +settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 +and *axis_id2 to the names of the two surface axes of the detector or + \". \", +Any of the destination pointers may be NULL. +ARGUMENTS +detector Detector handle. slowaxis1 Pointer to the destination x +component of the slow axis vector. slowaxis2 Pointer to the +destination y component of the slow axis vector. slowaxis3 Pointer +to the destination z component of the slow axis vector. fastaxis1 +Pointer to the destination x component of the fast axis vector. +fastaxis2 Pointer to the destination y component of the fast axis +vector. fastaxis3 Pointer to the destination z component of the +fast axis vector. axis_id1 Pointer to the destination first +surface axis name. axis_id2 Pointer to the destination second +surface axis name. axis_id3 Pointer to the destination third +surface axis name. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_detector_axes; + +%apply double *OUTPUT {double *slowaxis1, double *slowaxis2, double *slowaxis3, + double *fastaxis1, double *fastaxis2, double *fastaxis3}; + void get_detector_axes_fs ( double *fastaxis1, double *fastaxis2, double *fastaxis3, + double *slowaxis1, double *slowaxis2, double *slowaxis3){ + cbf_failnez(cbf_get_detector_axes(self, + slowaxis1,slowaxis2,slowaxis3, + fastaxis1,fastaxis2,fastaxis3)); + } + +%feature("autodoc", " +Returns : double slowaxis1,double slowaxis2,double slowaxis3,double fastaxis1, + double fastaxis2,double fastaxis3 +*args : + +C prototype: int cbf_get_detector_axes_sf (cbf_detector detector, + double *slowaxis1, double *slowaxis2, double *slowaxis3, + double *fastaxis1, double *fastaxis2, double *fastaxis3); + +CBFLib documentation: +DESCRIPTION +cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and +*slowaxis3 to the 3 components of the slow axis of the specified +detector at the current settings of all axes. +cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and +*fastaxis3 to the 3 components of the fast axis of the specified +detector at the current settings of all axes. cbf_get_detector_axes, +cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set +*slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the +slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 +components of the fast axis of the specified detector at the current +settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 +and *axis_id2 to the names of the two surface axes of the detector or + \". \", +Any of the destination pointers may be NULL. +ARGUMENTS +detector Detector handle. slowaxis1 Pointer to the destination x +component of the slow axis vector. slowaxis2 Pointer to the +destination y component of the slow axis vector. slowaxis3 Pointer +to the destination z component of the slow axis vector. fastaxis1 +Pointer to the destination x component of the fast axis vector. +fastaxis2 Pointer to the destination y component of the fast axis +vector. fastaxis3 Pointer to the destination z component of the +fast axis vector. axis_id1 Pointer to the destination first +surface axis name. axis_id2 Pointer to the destination second +surface axis name. axis_id3 Pointer to the destination third +surface axis name. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_detector_axes_sf; + +%apply double *OUTPUT {double *slowaxis1, double *slowaxis2, double *slowaxis3, + double *fastaxis1, double *fastaxis2, double *fastaxis3}; + void get_detector_axes_sf ( double *slowaxis1, double *slowaxis2, double *slowaxis3, + double *fastaxis1, double *fastaxis2, double *fastaxis3){ + cbf_failnez(cbf_get_detector_axes(self, + slowaxis1,slowaxis2,slowaxis3, + fastaxis1,fastaxis2,fastaxis3)); + } + +%feature("autodoc", " +Returns : double coordinate1,double coordinate2,double coordinate3 +*args : double indexslow,double indexfast + +C prototype: int cbf_get_pixel_coordinates_sf (cbf_detector detector, + double indexslow, double indexfast, double *coordinate1, + double *coordinate2, double *coordinate3); + +CBFLib documentation: +DESCRIPTION +cbf_get_pixel_coordinates, cbf_get_pixel_coordinates_fs and +cbf_get_pixel_coordinates_sf ses *coordinate1, *coordinate2, and +*coordinate3 to the vector position of pixel (indexfast, indexslow) +on the detector surface. If indexslow and indexfast are integers then +the coordinates correspond to the center of a pixel. +Any of the destination pointers may be NULL. +ARGUMENTS +detector Detector handle. indexslow Slow index. indexfast + Fast index. coordinate1 Pointer to the destination x component. +coordinate2 Pointer to the destination y component. coordinate3 +Pointer to the destination z component. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_pixel_coordinates_sf; + +%apply double *OUTPUT {double *coordinate1, + double *coordinate2, double *coordinate3}; + void get_pixel_coordinates_sf(double indexslow, double indexfast, + double *coordinate1, + double *coordinate2, + double *coordinate3){ + cbf_failnez(cbf_get_pixel_coordinates_sf(self, indexslow, indexfast, coordinate1, coordinate2, coordinate3)); + } +%feature("autodoc", " +Returns : +*args : double indexslow,double indexfast,double centerslow,double centerfast + +C prototype: int cbf_set_beam_center (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, + double *centerfast); + +CBFLib documentation: +DESCRIPTION +cbf_get_beam_center sets *centerfast and *centerslow to the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector and *indexfast and +*indexslow to the corresponding indices. cbf_set_beam_center sets the +offsets in the axis category for the detector element axis with +precedence 1 to place the beam center at the position given in mm by +*centerfast and *centerslow as the displacements in mm along the +detector axes from pixel (0, 0) to the point at which the beam +intersects the detector at the indices given *indexfast and +*indexslow. cbf_set_reference_beam_center sets the displacments in +the array_structure_list_axis category to place the beam center at +the position given in mm by *centerfast and *centerslow as the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector at the indices given +by *indexfast and *indexslow. In order to achieve consistent results, +a reference detector should be used for detector to have all axes at +their reference settings. +Note that the precedence 1 axis is the fastest axis, so that +*centerfast and *indexfast are the fast axis components of the center +and *centerslow and *indexslow are the slow axis components of the +center. +The _fs calls give the displacments in a fast-to-slow order. The +calls with no suffix and the calls _sf calls give the displacements +in slow-to-fast order +Any of the destination pointers may be NULL for getting the beam +center. For setting the beam axis, either the indices of the center +must not be NULL. +The indices are non-negative for beam centers within the detector +surface, but the center for an axis with a negative increment will be +negative for a beam center within the detector surface. +For cbf_set_beam_center if the diffrn_data_frame category exists with +a row for the corresponding element id, the values will be set for +_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in +millimetres and the value of _diffrn_data_frame.center_units will be +set to 'mm'. +For cbf_set_reference_beam_center if the diffrn_detector_element +category exists with a row for the corresponding element id, the +values will be set for _diffrn_detector_element.reference_center_fast +and _diffrn_detector_element.reference_center_slow in millimetres and +the value of _diffrn_detector_element.reference_units will be set to +'mm'. +ARGUMENTS +detector Detector handle. indexfast Pointer to the destination +fast index. indexslow Pointer to the destination slow index. +centerfast Pointer to the destination displacement along the fast +axis. centerslow Pointer to the destination displacement along the +slow axis. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_beam_center; + + void set_beam_center(double *indexslow, double *indexfast, + double *centerslow,double *centerfast){ + cbf_failnez(cbf_set_beam_center(self, indexslow, indexfast, + centerslow, centerfast)); + } +%feature("autodoc", " +Returns : double area,double projected_area +*args : double indexfast,double indexslow + +C prototype: int cbf_get_pixel_area_fs(cbf_detector detector, + double indexfast, double indexslow, double *area, + double *projected_area); + +CBFLib documentation: +DESCRIPTION +cbf_get_pixel_area, cbf_get_pixel_area_fs and cbf_get_pixel_area_sf +set *area to the area of the pixel at (indexfast, indexslow) on the +detector surface and *projected_area to the apparent area of the +pixel as viewed from the sample position, with indexslow being the +slow axis and indexfast being the fast axis. +Either of the destination pointers may be NULL. +ARGUMENTS +detector Detector handle. indexfast Fast index. +indexslow Slow index. area Pointer to the +destination area in mm2. projected_area Pointer to the destination +apparent area in mm2. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_pixel_area_fs; + +%apply double *OUTPUT{double *area,double *projected_area}; + void get_pixel_area_fs(double indexfast, double indexslow, + double *area,double *projected_area){ + cbf_failnez(cbf_get_pixel_area_fs (self, + indexfast, indexslow, area,projected_area)); + } +%feature("autodoc", " +Returns : double indexfast,double indexslow,double centerfast,double centerslow +*args : + +C prototype: int cbf_get_beam_center_fs (cbf_detector detector, + double *indexfast, double *indexslow, double *centerfast, + double *centerslow); + +CBFLib documentation: +DESCRIPTION +cbf_get_beam_center sets *centerfast and *centerslow to the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector and *indexfast and +*indexslow to the corresponding indices. cbf_set_beam_center sets the +offsets in the axis category for the detector element axis with +precedence 1 to place the beam center at the position given in mm by +*centerfast and *centerslow as the displacements in mm along the +detector axes from pixel (0, 0) to the point at which the beam +intersects the detector at the indices given *indexfast and +*indexslow. cbf_set_reference_beam_center sets the displacments in +the array_structure_list_axis category to place the beam center at +the position given in mm by *centerfast and *centerslow as the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector at the indices given +by *indexfast and *indexslow. In order to achieve consistent results, +a reference detector should be used for detector to have all axes at +their reference settings. +Note that the precedence 1 axis is the fastest axis, so that +*centerfast and *indexfast are the fast axis components of the center +and *centerslow and *indexslow are the slow axis components of the +center. +The _fs calls give the displacments in a fast-to-slow order. The +calls with no suffix and the calls _sf calls give the displacements +in slow-to-fast order +Any of the destination pointers may be NULL for getting the beam +center. For setting the beam axis, either the indices of the center +must not be NULL. +The indices are non-negative for beam centers within the detector +surface, but the center for an axis with a negative increment will be +negative for a beam center within the detector surface. +For cbf_set_beam_center if the diffrn_data_frame category exists with +a row for the corresponding element id, the values will be set for +_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in +millimetres and the value of _diffrn_data_frame.center_units will be +set to 'mm'. +For cbf_set_reference_beam_center if the diffrn_detector_element +category exists with a row for the corresponding element id, the +values will be set for _diffrn_detector_element.reference_center_fast +and _diffrn_detector_element.reference_center_slow in millimetres and +the value of _diffrn_detector_element.reference_units will be set to +'mm'. +ARGUMENTS +detector Detector handle. indexfast Pointer to the destination +fast index. indexslow Pointer to the destination slow index. +centerfast Pointer to the destination displacement along the fast +axis. centerslow Pointer to the destination displacement along the +slow axis. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_beam_center_fs; + +%apply double *OUTPUT {double *indexfast, double *indexslow, + double *centerfast,double *centerslow}; + void get_beam_center_fs(double *indexfast, double *indexslow, + double *centerfast,double *centerslow){ + cbf_failnez(cbf_get_beam_center_fs(self, indexfast, indexslow, + centerfast, centerslow)); + } +%feature("autodoc", " +Returns : Float pixel size +*args : Int axis_number + +C prototype: int cbf_get_inferred_pixel_size_sf(cbf_detector detector, + int axis_number, double *psize); + +CBFLib documentation: +DESCRIPTION +cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_sf set +*psize to point to the double value in millimeters of the pixel size +for the axis axis_number value. The slow index is treated as axis 1 +and the next faster index is treated as axis 2. +cbf_get_inferred_pixel_size_fs sets *psize to point to the double +value in millimeters of the pixel size for the axis axis_number +value. The fast index is treated as axis 1 and the next slower index +is treated as axis 2. +If the axis number is negative, the axes are used in the reverse +order so that an axis_number of -1 indicates the fast axes in a call +to cbf_get_inferred_pixel_size or cbf_get_inferred_pixel_size_sf and +indicates the fast axis in a call to cbf_get_inferred_pixel_size_fs. +ARGUMENTS +detector Detector handle. axis_number The number of the axis. +psize Pointer to the destination pizel size in mm. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_inferred_pixel_size_sf; + +%apply double *OUTPUT { double *psize } get_inferred_pixel_size; +void get_inferred_pixel_size_sf(unsigned int axis_number, double* psize){ + cbf_failnez(cbf_get_inferred_pixel_size_sf(self, axis_number, psize)); + } +%feature("autodoc", " +Returns : double coordinate1,double coordinate2,double coordinate3 +*args : double index1,double index2 + +C prototype: int cbf_get_pixel_coordinates (cbf_detector detector, + double indexslow, double indexfast, double *coordinate1, + double *coordinate2, double *coordinate3); + +CBFLib documentation: +DESCRIPTION +cbf_get_pixel_coordinates, cbf_get_pixel_coordinates_fs and +cbf_get_pixel_coordinates_sf ses *coordinate1, *coordinate2, and +*coordinate3 to the vector position of pixel (indexfast, indexslow) +on the detector surface. If indexslow and indexfast are integers then +the coordinates correspond to the center of a pixel. +Any of the destination pointers may be NULL. +ARGUMENTS +detector Detector handle. indexslow Slow index. indexfast + Fast index. coordinate1 Pointer to the destination x component. +coordinate2 Pointer to the destination y component. coordinate3 +Pointer to the destination z component. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_pixel_coordinates; + +%apply double *OUTPUT {double *coordinate1, + double *coordinate2, double *coordinate3}; + void get_pixel_coordinates(double index1, double index2, + double *coordinate1, + double *coordinate2, + double *coordinate3){ + cbf_failnez(cbf_get_pixel_coordinates(self, index1, index2, + coordinate1, coordinate2, coordinate3)); + } +%feature("autodoc", " +Returns : double indexslow,double indexfast,double centerslow,double centerfast +*args : + +C prototype: int cbf_get_beam_center_sf (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, + double *centerfast); + +CBFLib documentation: +DESCRIPTION +cbf_get_beam_center sets *centerfast and *centerslow to the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector and *indexfast and +*indexslow to the corresponding indices. cbf_set_beam_center sets the +offsets in the axis category for the detector element axis with +precedence 1 to place the beam center at the position given in mm by +*centerfast and *centerslow as the displacements in mm along the +detector axes from pixel (0, 0) to the point at which the beam +intersects the detector at the indices given *indexfast and +*indexslow. cbf_set_reference_beam_center sets the displacments in +the array_structure_list_axis category to place the beam center at +the position given in mm by *centerfast and *centerslow as the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector at the indices given +by *indexfast and *indexslow. In order to achieve consistent results, +a reference detector should be used for detector to have all axes at +their reference settings. +Note that the precedence 1 axis is the fastest axis, so that +*centerfast and *indexfast are the fast axis components of the center +and *centerslow and *indexslow are the slow axis components of the +center. +The _fs calls give the displacments in a fast-to-slow order. The +calls with no suffix and the calls _sf calls give the displacements +in slow-to-fast order +Any of the destination pointers may be NULL for getting the beam +center. For setting the beam axis, either the indices of the center +must not be NULL. +The indices are non-negative for beam centers within the detector +surface, but the center for an axis with a negative increment will be +negative for a beam center within the detector surface. +For cbf_set_beam_center if the diffrn_data_frame category exists with +a row for the corresponding element id, the values will be set for +_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in +millimetres and the value of _diffrn_data_frame.center_units will be +set to 'mm'. +For cbf_set_reference_beam_center if the diffrn_detector_element +category exists with a row for the corresponding element id, the +values will be set for _diffrn_detector_element.reference_center_fast +and _diffrn_detector_element.reference_center_slow in millimetres and +the value of _diffrn_detector_element.reference_units will be set to +'mm'. +ARGUMENTS +detector Detector handle. indexfast Pointer to the destination +fast index. indexslow Pointer to the destination slow index. +centerfast Pointer to the destination displacement along the fast +axis. centerslow Pointer to the destination displacement along the +slow axis. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_beam_center_sf; + +%apply double *OUTPUT {double *indexslow, double *indexfast, + double *centerslow,double *centerfast}; + void get_beam_center_sf(double *indexslow, double *indexfast, + double *centerslow,double *centerfast){ + cbf_failnez(cbf_get_beam_center_sf(self, indexslow, indexfast, + centerslow, centerfast)); + } +%feature("autodoc", " +Returns : double area,double projected_area +*args : double indexslow,double indexfast + +C prototype: int cbf_get_pixel_area_sf(cbf_detector detector, + double indexslow, double indexfast, double *area, + double *projected_area); + +CBFLib documentation: +DESCRIPTION +cbf_get_pixel_area, cbf_get_pixel_area_fs and cbf_get_pixel_area_sf +set *area to the area of the pixel at (indexfast, indexslow) on the +detector surface and *projected_area to the apparent area of the +pixel as viewed from the sample position, with indexslow being the +slow axis and indexfast being the fast axis. +Either of the destination pointers may be NULL. +ARGUMENTS +detector Detector handle. indexfast Fast index. +indexslow Slow index. area Pointer to the +destination area in mm2. projected_area Pointer to the destination +apparent area in mm2. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_pixel_area_sf; + +%apply double *OUTPUT{double *area,double *projected_area}; + void get_pixel_area_sf(double indexslow, double indexfast, + double *area,double *projected_area){ + cbf_failnez(cbf_get_pixel_area_sf (self, + indexslow, indexfast, area,projected_area)); + } +%feature("autodoc", " +Returns : +*args : double indexslow,double indexfast,double centerslow,double centerfast + +C prototype: int cbf_set_reference_beam_center_sf (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, + double *centerfast); + +CBFLib documentation: +DESCRIPTION +cbf_get_beam_center sets *centerfast and *centerslow to the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector and *indexfast and +*indexslow to the corresponding indices. cbf_set_beam_center sets the +offsets in the axis category for the detector element axis with +precedence 1 to place the beam center at the position given in mm by +*centerfast and *centerslow as the displacements in mm along the +detector axes from pixel (0, 0) to the point at which the beam +intersects the detector at the indices given *indexfast and +*indexslow. cbf_set_reference_beam_center sets the displacments in +the array_structure_list_axis category to place the beam center at +the position given in mm by *centerfast and *centerslow as the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector at the indices given +by *indexfast and *indexslow. In order to achieve consistent results, +a reference detector should be used for detector to have all axes at +their reference settings. +Note that the precedence 1 axis is the fastest axis, so that +*centerfast and *indexfast are the fast axis components of the center +and *centerslow and *indexslow are the slow axis components of the +center. +The _fs calls give the displacments in a fast-to-slow order. The +calls with no suffix and the calls _sf calls give the displacements +in slow-to-fast order +Any of the destination pointers may be NULL for getting the beam +center. For setting the beam axis, either the indices of the center +must not be NULL. +The indices are non-negative for beam centers within the detector +surface, but the center for an axis with a negative increment will be +negative for a beam center within the detector surface. +For cbf_set_beam_center if the diffrn_data_frame category exists with +a row for the corresponding element id, the values will be set for +_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in +millimetres and the value of _diffrn_data_frame.center_units will be +set to 'mm'. +For cbf_set_reference_beam_center if the diffrn_detector_element +category exists with a row for the corresponding element id, the +values will be set for _diffrn_detector_element.reference_center_fast +and _diffrn_detector_element.reference_center_slow in millimetres and +the value of _diffrn_detector_element.reference_units will be set to +'mm'. +ARGUMENTS +detector Detector handle. indexfast Pointer to the destination +fast index. indexslow Pointer to the destination slow index. +centerfast Pointer to the destination displacement along the fast +axis. centerslow Pointer to the destination displacement along the +slow axis. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_reference_beam_center_sf; + + void set_reference_beam_center_sf(double *indexslow, double *indexfast, + double *centerslow,double *centerfast){ + cbf_failnez(cbf_set_reference_beam_center_sf(self, indexslow, indexfast, + centerslow, centerfast)); + } +%feature("autodoc", " +Returns : +*args : double indexslow,double indexfast,double centerslow,double centerfast + +C prototype: int cbf_set_beam_center_sf (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, + double *centerfast); + +CBFLib documentation: +DESCRIPTION +cbf_get_beam_center sets *centerfast and *centerslow to the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector and *indexfast and +*indexslow to the corresponding indices. cbf_set_beam_center sets the +offsets in the axis category for the detector element axis with +precedence 1 to place the beam center at the position given in mm by +*centerfast and *centerslow as the displacements in mm along the +detector axes from pixel (0, 0) to the point at which the beam +intersects the detector at the indices given *indexfast and +*indexslow. cbf_set_reference_beam_center sets the displacments in +the array_structure_list_axis category to place the beam center at +the position given in mm by *centerfast and *centerslow as the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector at the indices given +by *indexfast and *indexslow. In order to achieve consistent results, +a reference detector should be used for detector to have all axes at +their reference settings. +Note that the precedence 1 axis is the fastest axis, so that +*centerfast and *indexfast are the fast axis components of the center +and *centerslow and *indexslow are the slow axis components of the +center. +The _fs calls give the displacments in a fast-to-slow order. The +calls with no suffix and the calls _sf calls give the displacements +in slow-to-fast order +Any of the destination pointers may be NULL for getting the beam +center. For setting the beam axis, either the indices of the center +must not be NULL. +The indices are non-negative for beam centers within the detector +surface, but the center for an axis with a negative increment will be +negative for a beam center within the detector surface. +For cbf_set_beam_center if the diffrn_data_frame category exists with +a row for the corresponding element id, the values will be set for +_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in +millimetres and the value of _diffrn_data_frame.center_units will be +set to 'mm'. +For cbf_set_reference_beam_center if the diffrn_detector_element +category exists with a row for the corresponding element id, the +values will be set for _diffrn_detector_element.reference_center_fast +and _diffrn_detector_element.reference_center_slow in millimetres and +the value of _diffrn_detector_element.reference_units will be set to +'mm'. +ARGUMENTS +detector Detector handle. indexfast Pointer to the destination +fast index. indexslow Pointer to the destination slow index. +centerfast Pointer to the destination displacement along the fast +axis. centerslow Pointer to the destination displacement along the +slow axis. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_beam_center_sf; + + void set_beam_center_sf(double *indexslow, double *indexfast, + double *centerslow,double *centerfast){ + cbf_failnez(cbf_set_beam_center_sf(self, indexslow, indexfast, + centerslow, centerfast)); + } +%feature("autodoc", " +Returns : double normal1,double normal2,double normal3 +*args : double index1,double index2 + +C prototype: int cbf_get_pixel_normal (cbf_detector detector, + double indexslow, double indexfast, double *normal1, + double *normal2, double *normal3); + +CBFLib documentation: +DESCRIPTION +cbf_get_detector_normal, cbf_get_pixel_normal_fs and +cbf_get_pixel_normal_sf set *normal1, *normal2, and *normal3 to the 3 +components of the of the normal vector to the pixel at (indexfast, +indexslow). The vector is normalized. +Any of the destination pointers may be NULL. +ARGUMENTS +detector Detector handle. indexslow Slow index. indexfast Fast +index. normal1 Pointer to the destination x component of the +normal vector. normal2 Pointer to the destination y component of +the normal vector. normal3 Pointer to the destination z component +of the normal vector. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_pixel_normal; + +%apply double *OUTPUT {double *normal1, double *normal2, double *normal3}; + void get_pixel_normal ( double index1, double index2, + double *normal1, double *normal2, double *normal3){ + cbf_failnez(cbf_get_pixel_normal(self, + index1,index2,normal1,normal2,normal3)); + } + + +}; // End of cbf_detector diff --git a/py2cbf/cbfgenericwrappers.i b/py2cbf/cbfgenericwrappers.i new file mode 100644 index 00000000..47917795 --- /dev/null +++ b/py2cbf/cbfgenericwrappers.i @@ -0,0 +1,327 @@ + +// Start of generic functions +%feature("autodoc","1"); + +/* cfunc cbf_get_local_integer_byte_order pyfunc get_local_integer_byte_order + arg char ** byte_order */ + +%feature("autodoc", " +Returns : char **bo,int *bolen +*args : + +C prototype: int cbf_get_local_integer_byte_order (char ** byte_order); + +CBFLib documentation: +DESCRIPTION +cbf_get_local_integer_byte_order returns the byte order of integers +on the machine on which the API is being run in the form of a +character string returned as the value pointed to by byte_order. +cbf_get_local_real_byte_order returns the byte order of reals on the +machine on which the API is being run in the form of a character +string returned as the value pointed to by byte_order. +cbf_get_local_real_format returns the format of floats on the machine +on which the API is being run in the form of a character string +returned as the value pointed to by real_format. The strings returned +must not be modified in any way. +The values returned in byte_order may be the strings \"little_endian +\" or \"big-endian \". The values returned in real_format may be the +strings \"ieee 754-1985 \" or \"other \". Additional values may be +returned by future versions of the API. +ARGUMENTS +byte_order pointer to the returned string real_format pointer to +the returned string +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_local_integer_byte_order; + +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); + %inline { + void get_local_integer_byte_order(char **bo, int *bolen) { + char * byteorder; + char * bot; + error_status = cbf_get_local_integer_byte_order(&byteorder); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + } + } + +/* cfunc cbf_compute_cell_volume pyfunc compute_cell_volume + arg double cell[6] arg double *volume */ + +%feature("autodoc", " +Returns : Float volume +*args : double cell[6] + +C prototype: int cbf_compute_cell_volume ( double cell[6], double *volume ); + +CBFLib documentation: +DESCRIPTION +cbf_compute_cell_volume sets *volume to point to the volume of the +unit cell computed from the double values in cell[0:2] for the cell +edge lengths a, b and c in Ångstroms and the double values given in +cell[3:5] for the cell angles α, β and γ in degrees. +ARGUMENTS +cell Pointer to the array of 6 doubles giving the cell +parameters. volume Pointer to the doubles for cell volume. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")compute_cell_volume; + + +%apply double *OUTPUT {double *volume}; + %inline { + void compute_cell_volume(double cell[6], double *volume) { + cbf_failnez(cbf_compute_cell_volume(cell,volume)); + } + } + +/* cfunc cbf_get_local_real_format pyfunc get_local_real_format + arg char ** real_format */ + +%feature("autodoc", " +Returns : char **rf,int *rflen +*args : + +C prototype: int cbf_get_local_real_format (char ** real_format ); + +CBFLib documentation: +DESCRIPTION +cbf_get_local_integer_byte_order returns the byte order of integers +on the machine on which the API is being run in the form of a +character string returned as the value pointed to by byte_order. +cbf_get_local_real_byte_order returns the byte order of reals on the +machine on which the API is being run in the form of a character +string returned as the value pointed to by byte_order. +cbf_get_local_real_format returns the format of floats on the machine +on which the API is being run in the form of a character string +returned as the value pointed to by real_format. The strings returned +must not be modified in any way. +The values returned in byte_order may be the strings \"little_endian +\" or \"big-endian \". The values returned in real_format may be the +strings \"ieee 754-1985 \" or \"other \". Additional values may be +returned by future versions of the API. +ARGUMENTS +byte_order pointer to the returned string real_format pointer to +the returned string +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_local_real_format; + +%cstring_output_allocate_size(char **rf, int *rflen, free(*$1)); + %inline { + void get_local_real_format(char **rf, int *rflen) { + char * real_format; + char * rft; + error_status = cbf_get_local_real_format(&real_format); + *rflen = strlen(real_format); + if (!(rft = (char *)malloc(*rflen))) {cbf_failnez(CBF_ALLOC)} + strncpy(rft,real_format,*rflen); + *rf = rft; + } + } + +/* cfunc cbf_airy_disk pyfunc airy_disk + arg double x arg double y arg double cenx arg double ceny arg double volume arg double fwhm arg double * value */ + +%feature("autodoc", " +Returns : Float value +*args : double x,double y,double cenx,double ceny,double volume,double fwhm + +C prototype: int cbf_airy_disk(double x, double y, double cenx, double ceny, + double volume, double fwhm, double * value); + +CBFLib documentation: +DESCRIPTION +cbf_airy_disk sets value to point to the value taken at (x,y) of an +truncated Airy function approximation to a point-spread function of +total included volume volume and full width at half max fwhm centered +on (cenx, ceny). +cbf_airy_disk_volume sets to point to the integral in the box with +diagonal corners (xlo, ylo) and of (xhi, yhi) of a truncated Airy +function approximation to a point-spread function of total included +volume volume and full width at half max fwhm centered on (cenx, +ceny). +The Airy function used is an 8-digit approximation up to the first +minimum, after which it is forced to zero, so it cannot be used to +simulate diffraction rings. +ARGUMENTS +x the x-coordinate of a point in the real plane y +the y-coordinate of a point in the real plane xlo the +x-coordinate of a point in the real plane marking the left bound of +integration ylo the y-coordinate of a point in the real plane +marking the bottom bound of integration xhi the x-coordinate +of a point in the real plane marking the right bound of integration +yhi the y-coordinate of a point in the real plane marking the +top bound of integration cenx the x-coordinate of a point in +the real plane marking the PSF center ceny the y-coordinate of +a point in the real plane marking the PSF center volume the +total volume of the PSF fwhm the full-width at half max of the +PSF value Pointer to the value of the Airy function volumeout +Pointer to the value of the integral/TR> +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")airy_disk; + +%apply double *OUTPUT {double *value}; +%inline { +void airy_disk(double x, double y, double cenx, double ceny, +double volume, double fwhm, double *value) { +cbf_failnez(cbf_airy_disk(x,y,cenx,ceny,volume,fwhm,value)); +} +} + + +/* cfunc cbf_get_local_real_byte_order pyfunc get_local_real_byte_order + arg char ** byte_order */ + +%feature("autodoc", " +Returns : char **bo,int *bolen +*args : + +C prototype: int cbf_get_local_real_byte_order (char ** byte_order); + +CBFLib documentation: +DESCRIPTION +cbf_get_local_integer_byte_order returns the byte order of integers +on the machine on which the API is being run in the form of a +character string returned as the value pointed to by byte_order. +cbf_get_local_real_byte_order returns the byte order of reals on the +machine on which the API is being run in the form of a character +string returned as the value pointed to by byte_order. +cbf_get_local_real_format returns the format of floats on the machine +on which the API is being run in the form of a character string +returned as the value pointed to by real_format. The strings returned +must not be modified in any way. +The values returned in byte_order may be the strings \"little_endian +\" or \"big-endian \". The values returned in real_format may be the +strings \"ieee 754-1985 \" or \"other \". Additional values may be +returned by future versions of the API. +ARGUMENTS +byte_order pointer to the returned string real_format pointer to +the returned string +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_local_real_byte_order; + +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); + %inline { + void get_local_real_byte_order(char **bo, int *bolen) { + char * byteorder; + char * bot; + error_status = cbf_get_local_real_byte_order(&byteorder); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + } + } + +/* cfunc cbf_compute_reciprocal_cell pyfunc compute_reciprocal_cell + arg double cell[6] arg double rcell[6] */ + +%feature("autodoc", " +Returns : Float astar,Float bstar,Float cstar,Float alphastar,Float betastar, + Float gammastar +*args : double cell[6] + +C prototype: int cbf_compute_reciprocal_cell ( double cell[6], + double rcell[6] ); + +CBFLib documentation: +DESCRIPTION +cbf_compute_reciprocal_cell sets rcell to point to the array of +reciprocal cell parameters computed from the double values cell[0:2] +giving the cell edge lengths a, b and c in Ångstroms, and the double +values cell[3:5] giving the cell angles α, β and γ in degrees. The +double values rcell[0:2] will be set to the reciprocal cell lengths +a^*, b^* and c^* in Ångstroms^-1 and the double values rcell[3:5] +will be set to the reciprocal cell angles α^*, β^* and γ^* in +degrees. +ARGUMENTS +cell Pointer to the array of 6 doubles giving the cell +parameters. rcell Pointer to the destination array of 6 doubles +giving the reciprocal cell parameters. volume Pointer to the +doubles for cell volume. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")compute_reciprocal_cell; + +%apply double *OUTPUT {double *astar, double *bstar, double *cstar, + double *alphastar, double *betastar, double *gammastar}; + %inline { + void compute_reciprocal_cell(double cell[6], double *astar, double *bstar, double *cstar, + double *alphastar, double *betastar, double *gammastar) { + double rcell[6]; + cbf_failnez(cbf_compute_reciprocal_cell(cell,rcell)); + *astar = rcell[0]; + *bstar = rcell[1]; + *cstar = rcell[2]; + *alphastar = rcell[3]; + *betastar = rcell[4]; + *gammastar = rcell[5]; + } + } + + +/* cfunc cbf_airy_disk_volume pyfunc airy_disk_volume + arg double xlo arg double ylo arg double xhi arg double yhi arg double cenx arg double ceny arg double volume arg double fwhm arg double * volumeout */ + +%feature("autodoc", " +Returns : Float volumeout +*args : double xlo,double ylo,double xhi,double yhi,double cenx,double ceny, + double volumein,double fwhm + +C prototype: int cbf_airy_disk_volume(double xlo, double ylo, double xhi, + double yhi, double cenx, double ceny, double volume, + double fwhm, double * volumeout); + +CBFLib documentation: +DESCRIPTION +cbf_airy_disk sets value to point to the value taken at (x,y) of an +truncated Airy function approximation to a point-spread function of +total included volume volume and full width at half max fwhm centered +on (cenx, ceny). +cbf_airy_disk_volume sets to point to the integral in the box with +diagonal corners (xlo, ylo) and of (xhi, yhi) of a truncated Airy +function approximation to a point-spread function of total included +volume volume and full width at half max fwhm centered on (cenx, +ceny). +The Airy function used is an 8-digit approximation up to the first +minimum, after which it is forced to zero, so it cannot be used to +simulate diffraction rings. +ARGUMENTS +x the x-coordinate of a point in the real plane y +the y-coordinate of a point in the real plane xlo the +x-coordinate of a point in the real plane marking the left bound of +integration ylo the y-coordinate of a point in the real plane +marking the bottom bound of integration xhi the x-coordinate +of a point in the real plane marking the right bound of integration +yhi the y-coordinate of a point in the real plane marking the +top bound of integration cenx the x-coordinate of a point in +the real plane marking the PSF center ceny the y-coordinate of +a point in the real plane marking the PSF center volume the +total volume of the PSF fwhm the full-width at half max of the +PSF value Pointer to the value of the Airy function volumeout +Pointer to the value of the integral/TR> +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")airy_disk_volume; + +%apply double *OUTPUT {double *volumeout}; +%inline { +void airy_disk_volume(double xlo, double ylo, double xhi, double yhi, +double cenx, double ceny, double volumein, double fwhm, double * volumeout) { +cbf_failnez(cbf_airy_disk_volume(xlo,ylo,xhi,yhi,cenx,ceny,volumein,fwhm,volumeout)); +} +} + +// End of generic functions diff --git a/py2cbf/cbfgoniometerwrappers.i b/py2cbf/cbfgoniometerwrappers.i new file mode 100644 index 00000000..e38d51f9 --- /dev/null +++ b/py2cbf/cbfgoniometerwrappers.i @@ -0,0 +1,266 @@ + +// Tell SWIG not to make constructor for these objects +%nodefault cbf_positioner_struct; +%nodefault cbf_goniometer; +%nodefault cbf_axis_struct; + +// Tell SWIG what the object is, so we can build the class +typedef struct +{ + double matrix [3][4]; + + cbf_axis_struct *axis; + + size_t axes; + + int matrix_is_valid; + + double matrix_ratio_used; + + size_t axis_index_limit; + +} +cbf_positioner_struct; + +typedef cbf_positioner_struct *cbf_positioner; +typedef cbf_positioner_struct *cbf_goniometer; + + +%feature("autodoc","1"); + +%extend cbf_positioner_struct{// Tell SWIG to attach functions to the structure + + cbf_positioner_struct(){ // Constructor + // DO NOT CONSTRUCT WITHOUT A CBFHANDLE + cbf_failnez(CBF_ARGUMENT); + return NULL; /* Should never be executed */ + } + + ~cbf_positioner_struct(){ // Destructor + cbf_failnez(cbf_free_positioner(self)); + } +%feature("autodoc", " +Returns : Float start,Float increment +*args : + +C prototype: int cbf_get_rotation_range (cbf_goniometer goniometer, + unsigned int reserved, double *start, double *increment); + +CBFLib documentation: +DESCRIPTION +cbf_get_rotation_range sets *start and *increment to the +corresponding values of the goniometer rotation axis used for the +exposure. +Either of the destination pointers may be NULL. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +goniometer Goniometer handle. reserved Unused. Any value other +than 0 is invalid. start Pointer to the destination start +value. increment Pointer to the destination increment value. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_rotation_range; + +%apply double *OUTPUT {double *start,double *increment}; + + void get_rotation_range(double *start,double *increment){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_get_rotation_range (self,reserved, start,increment)); + } +%feature("autodoc", " +Returns : double final1,double final2,double final3 +*args : double ratio,double initial1,double initial2,double initial3 + +C prototype: int cbf_rotate_vector (cbf_goniometer goniometer, + unsigned int reserved, double ratio, double initial1, + double initial2, double initial3, double *final1, + double *final2, double *final3); + +CBFLib documentation: +DESCRIPTION +cbf_rotate_vector sets *final1, *final2, and *final3 to the 3 +components of the of the vector (initial1, initial2, initial3) after +reorientation by applying the goniometer rotations. The value ratio +specif ies the goniometer setting and varies from 0.0 at the +beginning of the exposure to 1.0 at the end, irrespective of the +actual rotation range. +Any of the destination pointers may be NULL. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +goniometer Goniometer handle. reserved Unused. Any value other +than 0 is invalid. ratio Goniometer setting. 0 = beginning of +exposure, 1 = end. initial1 x component of the initial vector. +initial2 y component of the initial vector. initial3 z +component of the initial vector. final1 Pointer to the +destination x component of the final vector. final2 Pointer to +the destination y component of the final vector. final3 Pointer +to the destination z component of the final vector. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")rotate_vector; + + +%apply double *OUTPUT {double *final1, double *final2, double *final3}; + + void rotate_vector (double ratio, double initial1, double initial2, + double initial3, double *final1, double *final2, double *final3){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_rotate_vector (self, reserved, ratio, initial1, + initial2, initial3, final1, final2, final3)); + } +%feature("autodoc", " +Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2, + Float offset3,Float angle +*args : Float ratio + +C prototype: int cbf_get_goniometer_poise(cbf_goniometer goniometer, + double ratio, double * vector1, double * vector2, + double * vector3, double * offset1, double * offset2, + double * offset3, double * angle); + +CBFLib documentation: +DESCRIPTION +cbf_get_axis_poise sets vector1, vector2, vector3 to point to the +components of the axis vector for axis axis_id, offset1, offset2, +offset3 to point to the components of the axis base offset vector for +axis axis_id, and angle to point to the angle of rotation of axis +axis_id after application of the axis settings for frame frame_id, +using ratio, a value between 0 and 1, indicating how far into the +internal motion in the frame to go. If frame_id is the string \". +\", the first frame found is used. If there is more than one frame, +which frame will be found is indeterminate. If frame_id is NULL, the +overall setting for the scan are used, rather than those for any +particular frame. The vector and offset reported are the reference +vector and offset of the axis axis_id transformed by application of +all motions of the axes on which axis_id depends. +cbf_get_goniometer_poise vector1, vector2, vector3 to point to the +components of the axis vector for the goniometer axis, offset1, +offset2, offset3 to point to the components of the axis base offset +vector for the goniometer axis, and angle to point to the angle of +rotation of the goniometer axis after application of all axis +settings in the goniometer deriving the vector, offset and angle from +the resulting matrix. Calculation of the vector is indeterminate if +the angle is zero. +cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point +to the components of the axis vector for axis axis_id, offset1, +offset2, offset3 to point to the components of the axis base offset +vector for axis axis_id unmodified by axis rotations. Any of the +pointers may be specified as NULL. +ARGUMENTS +handle CBF handle. ratio A number between 0 and 1 +indication how far into the frame to go vector1 Pointer to the +first component of the axis vector vector2 Pointer to the second +component of the axis vector vector3 Pointer to the third +component of the axis vector offset1 Pointer to the first +component of the axis offset offset2 Pointer to the second +component of the axis offset offset3 Pointer to the third +component of the axis offset angle Pointer to the rotation +angle axis_id The specified axis frame_id The specified +frame positioner CBF goniometer +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_goniometer_poise; + + %apply double *OUTPUT {double * vector1, double * vector2, double * vector3, double * offset1, double * offset2, double * offset3, + double * angle}; + + void get_goniometer_poise(double ratio, + double * vector1, double * vector2, double * vector3, + double * offset1, double * offset2, double * offset3, + double * angle){ + cbf_failnez(cbf_get_goniometer_poise(self, ratio, + vector1, vector2, vector3, + offset1, offset2, offset3,angle)); + } + +%feature("autodoc", " +Returns : double reciprocal1,double reciprocal2,double reciprocal3 +*args : double ratio,double wavelength,double real1,double real2,double real3 + +C prototype: int cbf_get_reciprocal (cbf_goniometer goniometer, + unsigned int reserved, double ratio, double wavelength, + double real1, double real2, double real3, + double *reciprocal1, double *reciprocal2, + double *reciprocal3); + +CBFLib documentation: +DESCRIPTION +cbf_get_reciprocal sets *reciprocal1, * reciprocal2, and * +reciprocal3 to the 3 components of the of the reciprocal-space vector +corresponding to the real-space vector (real1, real2, real3). The +reciprocal-space vector is oriented to correspond to the goniometer +setting with all axes at 0. The value wavelength is the wavlength in +Å and the value ratio specifies the current goniometer setting and +varies from 0.0 at the beginning of the exposur e to 1.0 at the end, +irrespective of the actual rotation range. +Any of the destination pointers may be NULL. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +goniometer Goniometer handle. reserved Unused. Any value +other than 0 is invalid. ratio Goniometer setting. 0 = +beginning of exposure, 1 = end. wavelength Wavelength in Å. real1 + x component of the real-space vector. real2 y +component of the real-space vector. real3 z component of the +real-space vector. reciprocal1 Pointer to the destination x +component of the reciprocal-space vector. reciprocal2 Pointer to +the destination y component of the reciprocal-space vector. +reciprocal3 Pointer to the destination z component of the +reciprocal-space vector. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_reciprocal; + +%apply double *OUTPUT {double *reciprocal1, double *reciprocal2, + double *reciprocal3}; + + void get_reciprocal (double ratio,double wavelength, + double real1, double real2, double real3, + double *reciprocal1, double *reciprocal2, + double *reciprocal3){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_get_reciprocal(self,reserved, ratio, wavelength, + real1, real2, real3,reciprocal1, + reciprocal2,reciprocal3)); + } +%feature("autodoc", " +Returns : double vector1,double vector2,double vector3 +*args : + +C prototype: int cbf_get_rotation_axis (cbf_goniometer goniometer, + unsigned int reserved, double *vector1, double *vector2, + double *vector3); + +CBFLib documentation: +DESCRIPTION +cbf_get_rotation_axis sets *vector1, *vector2, and *vector3 to the 3 +components of the goniometer rotation axis used for the exposure. +Any of the destination pointers may be NULL. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +goniometer Goniometer handle. reserved Unused. Any value other +than 0 is invalid. vector1 Pointer to the destination x +component of the rotation axis. vector2 Pointer to the +destination y component of the rotation axis. vector3 Pointer to +the destination z component of the rotation axis. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_rotation_axis; + +%apply double *OUTPUT {double *vector1, double *vector2, double *vector3}; + +void get_rotation_axis (double *vector1, double *vector2, double *vector3){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_get_rotation_axis (self, reserved, + vector1, vector2, vector3)); + } + +}; // End of cbf_positioner diff --git a/py2cbf/cbfhandlewrappers.i b/py2cbf/cbfhandlewrappers.i new file mode 100644 index 00000000..b784f069 --- /dev/null +++ b/py2cbf/cbfhandlewrappers.i @@ -0,0 +1,8406 @@ + +// Tell SWIG not to make constructor for these objects +%nodefault cbf_handle; +%nodefault cbf_handle_struct; +%nodefault cbf_node; + +// A couple of blockitem functions return CBF_NODETYPE +typedef enum +{ + CBF_UNDEFNODE, /* Undefined */ + CBF_LINK, /* Link */ + CBF_ROOT, /* Root */ + CBF_DATABLOCK, /* Datablock */ + CBF_SAVEFRAME, /* Saveframe */ + CBF_CATEGORY, /* Category */ + CBF_COLUMN /* Column */ +} +CBF_NODETYPE; + + +// Tell SWIG what the object is, so we can build the class + +typedef struct +{ + cbf_node *node; + + int row, search_row; +} cbf_handle_struct; + +typedef cbf_handle_struct *cbf_handle; + +typedef cbf_handle_struct handle; +%feature("autodoc","1"); + +%extend cbf_handle_struct{ // Tell SWIG to attach functions to the structure + + cbf_handle_struct(){ // Constructor + cbf_handle handle; + cbf_failnez(cbf_make_handle(&handle)); + return handle; + } + + ~cbf_handle_struct(){ // Destructor + cbf_failnez(cbf_free_handle(self)); + } + +/* cfunc cbf_select_datablock pyfunc select_datablock + arg cbf_handle handle arg unsigned int datablock */ + +%feature("autodoc", " +Returns : +*args : Integer + +C prototype: int cbf_select_datablock (cbf_handle handle, + unsigned int datablock); + +CBFLib documentation: +DESCRIPTION +cbf_select_datablock selects data block number datablock as the +current data block. +The first data block is number 0. +If the data block does not exist, the function returns CBF_NOTFOUND. +ARGUMENTS +handle CBF handle. datablock Number of the data block to +select. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")select_datablock; + void select_datablock(unsigned int arg){ + cbf_failnez(cbf_select_datablock(self,arg));} + +/* cfunc cbf_force_new_datablock pyfunc force_new_datablock + arg cbf_handle handle arg const char *datablockname */ + +%feature("autodoc", " +Returns : string +*args : + +C prototype: int cbf_force_new_datablock (cbf_handle handle, + const char *datablockname); + +CBFLib documentation: +DESCRIPTION +cbf_force_new_datablock creates a new data block with name +datablockname and makes it the current data block. Duplicate data +block names are allowed. cbf_force_new_saveframe creates a new savew +frame with name saveframename and makes it the current save frame. +Duplicate save frame names are allowed. +Even if a save frame with this name already exists, a new save frame +is created and becomes the current save frame. +ARGUMENTS +handle CBF handle. datablockname The name of the new data +block. saveframename The name of the new save frame. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")force_new_datablock; + void force_new_datablock(const char* arg){ + cbf_failnez(cbf_force_new_datablock(self,arg));} +%feature("autodoc", " +Returns : (Binary)String +*args : int element_number,int elsize,int elsign,int ndimfast,int ndimmid, + int ndimslow + +C prototype: int cbf_get_3d_image_fs (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + void *array, size_t elsize, int elsign, size_t ndimfast, + size_t ndimmid, size_t ndimslow); + +CBFLib documentation: +DESCRIPTION +cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image +array for element number element_number into an array. The array +consists of ndimslow×ndimfast elements of elsize bytes each, +starting at array. The elements are signed if elsign is non-0 and +unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and +cbf_get_real_image_sf read the image array of IEEE doubles or floats +for element number element_number into an array. A real array is +always signed. cbf_get_3d_image, cbf_get_3d_image_fs and +cbf_get_3d_image_sf read the 3D image array for element number +element_number into an array. The array consists of +ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting +at array. The elements are signed if elsign is non-0 and unsigned +otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, +cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or +floats for element number element_number into an array. A real array +is always signed. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +The structure of the array as a 1-, 2- or 3-dimensional array should +agree with the structure of the array given in the +ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, +ndimslow should be the array size and ndimfast and, for the 3D calls, +ndimmid, should be set to 1 both in the call and in the imgCIF data +being processed. If the array is 2-dimensional and a 3D call is used, +ndimslow and ndimmid should be the +")get_3d_image_fs_as_string; + +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_3d_image_fs_as_string; + +// Get the length correct + + void get_3d_image_fs_as_string(int element_number, char **s, int *slen, + int elsize, int elsign, int ndimfast, int ndimmid, int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + cbf_failnez (cbf_get_3d_image_fs(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } + +/* cfunc cbf_reset_datablocks pyfunc reset_datablocks + arg cbf_handle handle */ + +%feature("autodoc", " +Returns : +*args : + +C prototype: int cbf_reset_datablocks (cbf_handle handle); + +CBFLib documentation: +DESCRIPTION +cbf_reset_datablocks deletes all categories from all data blocks. +The current data block does not change. +ARGUMENTS +handle CBF handle. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")reset_datablocks; + void reset_datablocks(void){ + cbf_failnez(cbf_reset_datablocks(self));} +%feature("autodoc", " +Returns : +*args : String tagname,String categoryname_in + +C prototype: int cbf_set_tag_category (cbf_handle handle, const char* tagname, + const char* categoryname_in); + +CBFLib documentation: +DESCRIPTION +cbf_find_tag_category sets categoryname to the category associated +with tagname in the dictionary associated with handle. +cbf_set_tag_category upddates the dictionary associated with handle +to indicated that tagname is in category categoryname_in. +ARGUMENTS +handle CBF handle. tagname tag name. +categoryname pointer to a returned category name. +categoryname_in input category name. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_tag_category; + + void set_tag_category(const char *tagname, const char* categoryname_in){ + cbf_failnez(cbf_set_tag_category(self,tagname, categoryname_in)); + } +%feature("autodoc", " +Returns : String tagroot +*args : String tagname + +C prototype: int cbf_require_tag_root (cbf_handle handle, const char* tagname, + const char** tagroot); + +CBFLib documentation: +DESCRIPTION +cbf_find_tag_root sets *tagroot to the root tag of which tagname is +an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in +the dictionary associated with handle, creating the dictionary if +necessary. cbf_require_tag_root sets *tagroot to the root tag of +which tagname is an alias, if there is one, or to the value of +tagname, if tagname is not an alias. +A returned tagroot string must not be modified in any way. +ARGUMENTS +handle CBF handle. tagname tag name which may be an alias. +tagroot pointer to a returned tag root name. tagroot_in input +tag root name. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")require_tag_root; + +const char* require_tag_root(const char* tagname){ + const char* result; + cbf_failnez(cbf_require_tag_root(self,tagname,&result)); + return result; + } + +/* cfunc cbf_row_number pyfunc row_number + arg cbf_handle handle arg unsigned int *row */ + +%feature("autodoc", " +Returns : Integer +*args : + +C prototype: int cbf_row_number (cbf_handle handle, unsigned int *row); + +CBFLib documentation: +DESCRIPTION +cbf_row_number sets *row to the number of the current row of the +current category. +ARGUMENTS +handle CBF handle. row Pointer to the destination row number. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")row_number; + unsigned int row_number(void){ + unsigned int result; + cbf_failnez(cbf_row_number(self,&result)); + return result;} +%feature("autodoc", " +Returns : +*args : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimslow,int dimfast + +C prototype: int cbf_set_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array, size_t elsize, int elsign, size_t ndimslow, + size_t ndimfast); + +CBFLib documentation: +DESCRIPTION +cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image +array for element number element_number. The array consists of +ndimfast×ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-zero and unsigned otherwise. +cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf +write the image array for element number element_number. The array +consists of ndimfast×ndimslow IEEE double or float elements of +elsize bytes each, starting at array. cbf_set_3d_image, +cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array +for element number element_number. The array consists of +ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting +at array. The elements are signed if elsign is non-0 and unsigned +otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and +cbf_set_real_3d_image_sf writes the 3D image array for element number +element_number. The array consists of ndimfast×ndimmid×ndimslow +IEEE double or float elements of elsize bytes each, starting at +array. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +If the array is 1-dimensional, ndimslow should be the array size and +ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the +array is 2-dimensional and the 3D calls are used, ndimslow and +ndimmid should be used for the array dimensions and ndimfast should +be set to 1. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET +Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for +cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof +(int), sizeof(double) or sizeof(float), the function returns +CBF_ARGUMENT. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any value other +than 0 is invalid. element_number The number of the detector +element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. compression Compression type. +array Pointer to the image array. elsize Size in +bytes of each image array element. elsigned Set to non-0 if +the image array elements are signed. ndimslow Slowest array +dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_image; + + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_image; + + void set_image(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int elsign, int ndimslow, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +%feature("autodoc", " +Returns : +*args : Integer element_number,Float slowbinsize_in,Float fastbinsize_in + +C prototype: int cbf_set_bin_sizes(cbf_handle handle, + unsigned int element_number, double slowbinsize_in, + double fastbinsize_in); + +CBFLib documentation: +DESCRIPTION +cbf_get_bin_sizes sets slowbinsize to point to the value of the +number of pixels composing one array element in the dimension that +changes at the second-fastest rate and fastbinsize to point to the +value of the number of pixels composing one array element in the +dimension that changes at the fastest rate for the dectector element +with the ordinal element_number. cbf_set_bin_sizes sets the the pixel +bin sizes in the \"array_intensities \" category to the values of +slowbinsize_in for the number of pixels composing one array element +in the dimension that changes at the second-fastest rate and +fastbinsize_in for the number of pixels composing one array element +in the dimension that changes at the fastest rate for the dectector +element with the ordinal element_number. +In order to allow for software binning involving fractions of pixels, +the bin sizes are doubles rather than ints. +ARGUMENTS +handle CBF handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. slowbinsize Pointer to the +returned number of pixels composing one array element in the +dimension that changes at the second-fastest rate. fastbinsize +Pointer to the returned number of pixels composing one array element +in the dimension that changes at the fastest rate. slowbinsize_in +The number of pixels composing one array element in the dimension +that changes at the second-fastest rate. fastbinsize_in The number +of pixels composing one array element in the dimension that changes +at the fastest rate. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_bin_sizes; + + void set_bin_sizes( int element_number, double slowbinsize_in, double fastbinsize_in) { + cbf_failnez(cbf_set_bin_sizes(self,element_number,slowbinsize_in,fastbinsize_in)); + } + +/* cfunc cbf_new_row pyfunc new_row + arg cbf_handle handle */ + +%feature("autodoc", " +Returns : +*args : + +C prototype: int cbf_new_row (cbf_handle handle); + +CBFLib documentation: +DESCRIPTION +cbf_new_row adds a new row to the current category and makes it the +current row. +ARGUMENTS +handle CBF handle. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")new_row; + void new_row(void){ + cbf_failnez(cbf_new_row(self));} + +/* cfunc cbf_rewind_saveframe pyfunc rewind_saveframe + arg cbf_handle handle */ + +%feature("autodoc", " +Returns : +*args : + +C prototype: int cbf_rewind_saveframe (cbf_handle handle); + +CBFLib documentation: +DESCRIPTION +cbf_rewind_category makes the first category in the current data +block the current category. cbf_rewind_saveframe makes the first +saveframe in the current data block the current saveframe. +cbf_rewind_blockitem makes the first blockitem (category or +saveframe) in the current data block the current blockitem. The type +of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type. +If there are no categories, saveframes or blockitems the function +returns CBF_NOTFOUND. +The current column and row become undefined. +ARGUMENTS +handle CBF handle. type CBF handle. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")rewind_saveframe; + void rewind_saveframe(void){ + cbf_failnez(cbf_rewind_saveframe(self));} +%feature("autodoc", " +Returns : int compression,int binary_id,int elsize,int elements +*args : + +C prototype: int cbf_get_realarrayparameters (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + size_t *elements); + +CBFLib documentation: +DESCRIPTION +cbf_get_integerarrayparameters sets *compression, *binary_id, +*elsize, *elsigned, *elunsigned, *elements, *minelement and +*maxelement to values read from the binary value of the item at the +current column and row. This provides all the arguments needed for a +subsequent call to cbf_set_integerarray, if a copy of the array is to +be made into another CIF or CBF. cbf_get_realarrayparameters sets +*compression, *binary_id, *elsize, *elements to values read from the +binary value of the item at the current column and row. This provides +all the arguments needed for a subsequent call to cbf_set_realarray, +if a copy of the arry is to be made into another CIF or CBF. +The variants cbf_get_integerarrayparameters_wdims, +cbf_get_integerarrayparameters_wdims_fs, +cbf_get_integerarrayparameters_wdims_sf, +cbf_get_realarrayparameters_wdims, +cbf_get_realarrayparameters_wdims_fs, +cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, +*dimmid, *dimslow, and *padding as well, providing the additional +parameters needed for a subsequent call to cbf_set_integerarray_wdims +or cbf_set_realarray_wdims. +The value returned in *byteorder is a pointer either to the string +\"little_endian \" or to the string \"big_endian \". This should be +the byte order of the data, not necessarily of the host machine. No +attempt should be made to modify this string. At this time only +\"little_endian \" will be returned. +The values returned in *dimfast, *dimmid and *dimslow are the sizes +of the fastest changing, second fastest changing and third fastest +changing dimensions of the array, if specified, or zero, if not +specified. +The value returned in *padding is the size of the post-data padding, +if any and if specified in the data header. The value is given as a +count of octets. +If the value is not binary, the function returns CBF_ASCII. +ARGUMENTS +handle CBF handle. compression Compression method used. +elsize Size in bytes of each array element. binary_id +Pointer to the destination integer binary identifier. elsigned +Pointer to an integer. Set to 1 if the elements can be read as signed +integers. elunsigned Pointer to an integer. Set to 1 if the +elements can be read as unsigned integers. elements Pointer to +the destination number of elements. minelement Pointer to the +destination smallest element. maxelement Pointer to the +destination largest element. byteorder Pointer to the destination +byte order. dimfast Pointer to the destination fastest +dimension. dimmid Pointer to the destination second fastest +dimension. dimslow Pointer to the destination third fastest +dimension. padding Pointer to the destination padding size. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")get_realarrayparameters; + +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, int *elements} get_realarrayparameters; + + + void get_realarrayparameters(int *compression,int *binary_id, + int *elsize, int *elements){ + unsigned int comp; + size_t elsiz, elem; + cbf_failnez(cbf_get_realarrayparameters(self, + &comp ,binary_id, &elsiz, &elem )); + *compression = comp; /* FIXME - does this convert in C? */ + *elsize = elsiz; + *elements = elem; + } +%feature("autodoc", " +Returns : Float pixel_size +*args : Int element_number,Int axis_number + +C prototype: int cbf_get_pixel_size_sf(cbf_handle handle, + unsigned int element_number, int axis_number, + double *psize); + +CBFLib documentation: +DESCRIPTION +cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to +the double value in millimeters of the axis axis_number of the +detector element element_number. The axis_number is numbered from 1, +starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to +point to the double value in millimeters of the axis axis_number of +the detector element element_number. The axis_number is numbered from +1, starting with the fastest axis. +If a negative axis number is given, the order of axes is reversed, so +that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the +fastest axis for cbf_get_pixel_size_sf. +If the pixel size is not given explcitly in the \"array_element_size +\" category, the function returns CBF_NOTFOUND. +ARGUMENTS +handle CBF handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. axis_number The number of the +axis, starting from 1 for the fastest for cbf_get_pixel_size and +cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. +psize Pointer to the destination pixel size. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_pixel_size_sf; + +%apply double *OUTPUT {double *psize} get_pixel_size; + void get_pixel_size_sf(unsigned int element_number, + unsigned int axis_number, double *psize){ + cbf_failnez(cbf_get_pixel_size_sf(self, + element_number, + axis_number, + psize)); + } + +/* cfunc cbf_force_new_category pyfunc force_new_category + arg cbf_handle handle arg const char *categoryname */ + +%feature("autodoc", " +Returns : string +*args : + +C prototype: int cbf_force_new_category (cbf_handle handle, + const char *categoryname); + +CBFLib documentation: +DESCRIPTION +cbf_force_new_category creates a new category in the current data +block with name categoryname and makes it the current category. +Duplicate category names are allowed. +Even if a category with this name already exists, a new category of +the same name is created and becomes the current category. The allows +for the creation of unlooped tag/value lists drawn from the same +category. +ARGUMENTS +handle CBF handle. categoryname The name of the new +category. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")force_new_category; + void force_new_category(const char* arg){ + cbf_failnez(cbf_force_new_category(self,arg));} + +/* cfunc cbf_force_new_saveframe pyfunc force_new_saveframe + arg cbf_handle handle arg const char *saveframename */ + +%feature("autodoc", " +Returns : string +*args : + +C prototype: int cbf_force_new_saveframe (cbf_handle handle, + const char *saveframename); + +CBFLib documentation: +DESCRIPTION +cbf_force_new_datablock creates a new data block with name +datablockname and makes it the current data block. Duplicate data +block names are allowed. cbf_force_new_saveframe creates a new savew +frame with name saveframename and makes it the current save frame. +Duplicate save frame names are allowed. +Even if a save frame with this name already exists, a new save frame +is created and becomes the current save frame. +ARGUMENTS +handle CBF handle. datablockname The name of the new data +block. saveframename The name of the new save frame. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")force_new_saveframe; + void force_new_saveframe(const char* arg){ + cbf_failnez(cbf_force_new_saveframe(self,arg));} + +/* cfunc cbf_count_datablocks pyfunc count_datablocks + arg cbf_handle handle arg unsigned int *datablocks */ + +%feature("autodoc", " +Returns : Integer +*args : + +C prototype: int cbf_count_datablocks (cbf_handle handle, + unsigned int *datablocks); + +CBFLib documentation: +DESCRIPTION +cbf_count_datablocks puts the number of data blocks in *datablocks . +ARGUMENTS +handle CBF handle. datablocks Pointer to the destination data +block count. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")count_datablocks; + unsigned int count_datablocks(void){ + unsigned int result; + cbf_failnez(cbf_count_datablocks(self,&result)); + return result;} + +/* cfunc cbf_find_row pyfunc find_row + arg cbf_handle handle arg const char *value */ + +%feature("autodoc", " +Returns : string +*args : + +C prototype: int cbf_find_row (cbf_handle handle, const char *value); + +CBFLib documentation: +DESCRIPTION +cbf_find_row makes the first row in the current column with value +value the current row. +The comparison is case-sensitive. +If a matching row does not exist, the function returns CBF_NOTFOUND. +The current column is not affected. +ARGUMENTS +handle CBF handle. value The value of the row to find. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")find_row; + void find_row(const char* arg){ + cbf_failnez(cbf_find_row(self,arg));} + +/* cfunc cbf_select_column pyfunc select_column + arg cbf_handle handle arg unsigned int column */ + +%feature("autodoc", " +Returns : +*args : Integer + +C prototype: int cbf_select_column (cbf_handle handle, unsigned int column); + +CBFLib documentation: +DESCRIPTION +cbf_select_column selects column number column in the current +category as the current column. +The first column is number 0. +The current row is not affected +If the column does not exist, the function returns CBF_NOTFOUND. +ARGUMENTS +handle CBF handle. column Number of the column to select. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")select_column; + void select_column(unsigned int arg){ + cbf_failnez(cbf_select_column(self,arg));} +%feature("autodoc", " +Returns : pycbf detector object +*args : Integer element_number + +C prototype: int cbf_construct_detector (cbf_handle handle, + cbf_detector *detector, unsigned int element_number); + +CBFLib documentation: +DESCRIPTION +cbf_construct_detector constructs a detector object for detector +element number element_number using the description in the CBF object +handle and initialises the detector handle *detector. +cbf_construct_reference_detector constructs a detector object for +detector element number element_number using the description in the +CBF object handle and initialises the detector handle *detector using +the reference settings of the axes. cbf_require_reference_detector is +similar, but try to force the creations of missing intermediate +categories needed to construct a detector object. +ARGUMENTS +handle CBF handle. detector Pointer to the +destination detector handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")construct_detector; + + cbf_detector construct_detector(unsigned int element_number){ + cbf_detector detector; + cbf_failnez(cbf_construct_detector(self,&detector,element_number)); + return detector; + } +%feature("autodoc", " +Returns : String +*args : String axis_id + +C prototype: int cbf_get_axis_depends_on (cbf_handle handle, + const char *axis_id, const char * *depends_on); + +CBFLib documentation: +DESCRIPTION +cbf_count_axis_ancestors sets ancestors to the number of ancestors of +axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor +axis of index ancestor_index of axis axis_id, starting with axis_id +for ancestor_index 0. +cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of +axis_id or to \". \" if there is no such ancestor. +cbf_get_axis_equipment sets *equipment to the equipment of axis_id or +to \". \" if there is no such equipment. +cbf_get_axis_equipment_component sets *equipment_component to the +equipment_component of axis_id or to \". \" if there is no such +equipment_component. +cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the +components of the ofset of axis_id. +cbf_get_axis_rotation sets rotation to the rotation of axis_id or to +0 if there is no such rotation. cbf_get_axis_rotation_axis sets +*rotation_axis to the rotation_axis of axis_id or to \". \" if there +is no such rotation_axis. +cbf_get_axis_setting sets *start and *increment to the corresponding +values of the axis axis_id. Any of the destination pointers may be +NULL. +cbf_get_axis_type sets axis_type to the type of axis_id. +cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the +components of the vector of axis_id. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any +value other than 0 is invalid. axis_id Axis id. +ancestor_index Integer index of the desired ancestor, starting +with 0 for the current axis_id. ancestor Pointer to +destination ancestor name pointer. depends_on Pointer to +destination depends_on name pointer. equipment Pointer to +destination equipment name pointer. equipment_component Pointer to +destination equipment_component name pointer. offset1 +Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. +rotation Pointer to destination rotation value. +rotation_axis Pointer to destination rotation_axisn name +pointer. start Pointer to the destination start +value. increment Pointer to the destination increment +value. type Pointer to destination axis type of type +. vector1 Pointer to destination first vector component +value. vector2 Pointer to destination second vector +component value. vector3 Pointer to destination third +vector component value. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_axis_depends_on; + + const char * get_axis_depends_on(const char *axis_id){ + const char* dep_on; + cbf_failnez(cbf_get_axis_depends_on(self,axis_id, + &dep_on)); + return dep_on; + } + +/* cfunc cbf_rewind_column pyfunc rewind_column + arg cbf_handle handle */ + +%feature("autodoc", " +Returns : +*args : + +C prototype: int cbf_rewind_column (cbf_handle handle); + +CBFLib documentation: +DESCRIPTION +cbf_rewind_column makes the first column in the current category the +current column. +If there are no columns, the function returns CBF_NOTFOUND. +The current row is not affected. +ARGUMENTS +handle CBF handle. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")rewind_column; + void rewind_column(void){ + cbf_failnez(cbf_rewind_column(self));} +%feature("autodoc", " +Returns : pycbf positioner object +*args : String axis_id + +C prototype: int cbf_construct_reference_positioner (cbf_handle handle, + cbf_positioner *positioner, const char *axis_id); + +CBFLib documentation: +DESCRIPTION +cbf_construct_positioner constructs a positioner object for the axis +given by axis_id using the description in the CBF object handle and +initialises the positioner handle *positioner. +cbf_construct_reference positioner constructs a positioner object for +the axis given by axis_id using the description in the CBF object +handle and initialises the detector handle *detector using the +reference settings of the axes. +ARGUMENTS +handle CBF handle. positioner Pointer to the destination +positioner handle. axis_id The identifier of the axis in the +\"axis \" category. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")construct_reference_positioner; + + cbf_positioner construct_reference_positioner(const char* axis_id){ + cbf_positioner positioner; + cbf_failnez(cbf_construct_reference_positioner(self,&positioner,axis_id)); + return positioner; + } +%feature("autodoc", " +Returns : Float defaultvalue +*args : String columnname,Float Value + +C prototype: int cbf_require_column_doublevalue (cbf_handle handle, + const char *columnname, double *number, + const double defaultvalue); + +CBFLib documentation: +DESCRIPTION +cbf_require_column_doublevalue sets *number to the value of the ASCII +item at the current row for the column given with the name given by +*columnname, with the value interpreted as a decimal floating-point +number, or to the number given by defaultvalue if the item cannot be +found. +ARGUMENTS +handle CBF handle. columnname Name of the column +containing the number. number pointer to the location to +receive the floating-point value. defaultvalue Value to use if the +requested column and value cannot be found. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")require_column_doublevalue; + +%apply double *OUTPUT { double *number} require_column_doublevalue; +void require_column_doublevalue(const char *columnname, double * number, + const double defaultvalue){ + cbf_failnez(cbf_require_column_doublevalue(self, + columnname,number,defaultvalue)); + } +%feature("autodoc", " +Returns : int year,int month,int day,int hour,int minute,double second, + int timezone +*args : + +C prototype: int cbf_get_datestamp (cbf_handle handle, unsigned int reserved, + int *year, int *month, int *day, int *hour, int *minute, + double *second, int *timezone); + +CBFLib documentation: +DESCRIPTION +cbf_get_datestamp sets *year, *month, *day, *hour, *minute and +*second to the corresponding values of the collection timestamp. +*timezone is set to timezone difference from UTC in minutes. The +parameter < i>reserved is presently unused and should be set to 0. +Any of the destination pointers may be NULL. +ARGUMENTS +handle CBF handle. reserved Unused. Any value other than 0 is +invalid. year Pointer to the destination timestamp year. month + Pointer to the destination timestamp month (1-12). day +Pointer to the destination timestamp day (1-31). hour Pointer +to the destination timestamp hour (0-23). minute Pointer to the +destination timestamp minute (0-59). second Pointer to the +destination timestamp second (0-60.0). timezone Pointer to the +destination timezone difference from UTC in minutes. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_datestamp; + +%apply int *OUTPUT {int *year, int *month, int *day, int *hour, + int *minute, double *second, int *timezone} get_datestamp; + void get_datestamp(int *year, int *month, int *day, int *hour, + int *minute, double *second, int *timezone){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_get_datestamp(self,reserved, + year,month,day,hour,minute,second,timezone)); + } + +/* cfunc cbf_get_integervalue pyfunc get_integervalue + arg cbf_handle handle arg int *number */ + +%feature("autodoc", " +Returns : int +*args : + +C prototype: int cbf_get_integervalue (cbf_handle handle, int *number); + +CBFLib documentation: +DESCRIPTION +cbf_get_integervalue sets *number to the value of the ASCII item at +the current column and row interpreted as a decimal integer. +cbf_require_integervalue sets *number to the value of the ASCII item +at the current column and row interpreted as a decimal integer, +setting it to defaultvalue if necessary. +If the value is not ASCII, the function returns CBF_BINARY. +ARGUMENTS +handle CBF handle. number pointer to the number. +defaultvalue default number value. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")get_integervalue; + int get_integervalue(void){ + int result; + cbf_failnez(cbf_get_integervalue(self,&result)); + return result;} + +/* cfunc cbf_get_crystal_id pyfunc get_crystal_id + arg cbf_handle handle arg const char **crystal_id */ + +%feature("autodoc", " +Returns : +*args : string + +C prototype: int cbf_get_crystal_id (cbf_handle handle, + const char **crystal_id); + +CBFLib documentation: +DESCRIPTION +cbf_get_crystal_id sets *crystal_id to point to the ASCII value of +the \"diffrn.crystal_id \" entry. +If the value is not ASCII, the function returns CBF_BINARY. +The value will be valid as long as the item exists and has not been +set to a new value. +The value must not be modified by the program in any way. +ARGUMENTS +handle CBF handle. crystal_id Pointer to the destination +value pointer. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_crystal_id; + const char* get_crystal_id(void){ + const char* result; + cbf_failnez(cbf_get_crystal_id(self, &result)); + return result;} + +/* cfunc cbf_get_doublevalue pyfunc get_doublevalue + arg cbf_handle handle arg double *number */ + +%feature("autodoc", " +Returns : double +*args : + +C prototype: int cbf_get_doublevalue (cbf_handle handle, double *number); + +CBFLib documentation: +DESCRIPTION +cbf_get_doublevalue sets *number to the value of the ASCII item at +the current column and row interpreted as a decimal floating-point +number. cbf_require_doublevalue sets *number to the value of the +ASCII item at the current column and row interpreted as a decimal +floating-point number, setting it to defaultvalue if necessary. +If the value is not ASCII, the function returns CBF_BINARY. +ARGUMENTS +handle CBF handle. number Pointer to the destination +number. defaultvalue default number value. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")get_doublevalue; + double get_doublevalue(void){ + double result; + cbf_failnez(cbf_get_doublevalue(self,&result)); + return result;} +%feature("autodoc", " +Returns : Float a,Float b,Float c,Float alpha,Float beta,Float gamma +*args : + +C prototype: int cbf_get_unit_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); + +CBFLib documentation: +DESCRIPTION +cbf_get_unit_cell sets cell[0:2] to the double values of the cell +edge lengths a, b and c in Ångstroms, cell[3:5] to the double values +of the cell angles α, β and γ in degrees, cell_esd[0:2] to the +double values of the estimated strandard deviations of the cell edge +lengths a, b and c in Ångstroms, cell_esd[3:5] to the double values +of the estimated standard deviations of the the cell angles α, β +and γ in degrees. +The values returned are retrieved from the first row of the \"cell +\" category. The value of \"_cell.entry_id \" is ignored. +cell or cell_esd may be NULL. +If cell is NULL, the cell parameters are not retrieved. +If cell_esd is NULL, the cell parameter esds are not retrieved. +If the \"cell \" category is present, but some of the values are +missing, zeros are returned for the missing values. +ARGUMENTS +handle CBF handle. cell Pointer to the destination array of +6 doubles for the cell parameters. cell_esd Pointer to the +destination array of 6 doubles for the cell parameter esds. +RETURN VALUE +Returns an error code on failure or 0 for success. No errors is +returned for missing values if the \"cell \" category exists. +SEE ALSO +")get_unit_cell; + +%apply double *OUTPUT {double *a, double *b, double *c, + double *alpha, double *beta, double *gamma} get_unit_cell; + void get_unit_cell(double *a, double *b, double *c, + double *alpha, double *beta, double *gamma) { + double cell[6]; + cbf_failnez(cbf_get_unit_cell(self,cell,NULL)); + *a = cell[0]; + *b = cell[1]; + *c = cell[2]; + *alpha = cell[3]; + *beta = cell[4]; + *gamma = cell[5]; + } +%feature("autodoc", " +Returns : doubleArray cell +*args : + +C prototype: int cbf_get_unit_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); + +CBFLib documentation: +DESCRIPTION +cbf_get_unit_cell sets cell[0:2] to the double values of the cell +edge lengths a, b and c in Ångstroms, cell[3:5] to the double values +of the cell angles α, β and γ in degrees, cell_esd[0:2] to the +double values of the estimated strandard deviations of the cell edge +lengths a, b and c in Ångstroms, cell_esd[3:5] to the double values +of the estimated standard deviations of the the cell angles α, β +and γ in degrees. +The values returned are retrieved from the first row of the \"cell +\" category. The value of \"_cell.entry_id \" is ignored. +cell or cell_esd may be NULL. +If cell is NULL, the cell parameters are not retrieved. +If cell_esd is NULL, the cell parameter esds are not retrieved. +If the \"cell \" category is present, but some of the values are +missing, zeros are returned for the missing values. +ARGUMENTS +handle CBF handle. cell Pointer to the destination array of +6 doubles for the cell parameters. cell_esd Pointer to the +destination array of 6 doubles for the cell parameter esds. +RETURN VALUE +Returns an error code on failure or 0 for success. No errors is +returned for missing values if the \"cell \" category exists. +SEE ALSO +")get_unit_cell; + +%apply double *OUTPUT {double *a_esd, double *b_esd, double *c_esd, + double *alpha_esd, double *beta_esd, double *gamma_esd} get_unit_cell_esd; + void get_unit_cell_esd(double *a_esd, double *b_esd, double *c_esd, + double *alpha_esd, double *beta_esd, double *gamma_esd) { + double cell_esd[6]; + cbf_failnez(cbf_get_unit_cell(self,NULL,cell_esd)); + *a_esd = cell_esd[0]; + *b_esd = cell_esd[1]; + *c_esd = cell_esd[2]; + *alpha_esd = cell_esd[3]; + *beta_esd = cell_esd[4]; + *gamma_esd = cell_esd[5]; + } +%feature("autodoc", " +Returns : String +*args : String axis_id + +C prototype: int cbf_get_axis_type (cbf_handle handle, const char *axis_id, + cbf_axis_type *axis_type); + +CBFLib documentation: +DESCRIPTION +cbf_count_axis_ancestors sets ancestors to the number of ancestors of +axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor +axis of index ancestor_index of axis axis_id, starting with axis_id +for ancestor_index 0. +cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of +axis_id or to \". \" if there is no such ancestor. +cbf_get_axis_equipment sets *equipment to the equipment of axis_id or +to \". \" if there is no such equipment. +cbf_get_axis_equipment_component sets *equipment_component to the +equipment_component of axis_id or to \". \" if there is no such +equipment_component. +cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the +components of the ofset of axis_id. +cbf_get_axis_rotation sets rotation to the rotation of axis_id or to +0 if there is no such rotation. cbf_get_axis_rotation_axis sets +*rotation_axis to the rotation_axis of axis_id or to \". \" if there +is no such rotation_axis. +cbf_get_axis_setting sets *start and *increment to the corresponding +values of the axis axis_id. Any of the destination pointers may be +NULL. +cbf_get_axis_type sets axis_type to the type of axis_id. +cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the +components of the vector of axis_id. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any +value other than 0 is invalid. axis_id Axis id. +ancestor_index Integer index of the desired ancestor, starting +with 0 for the current axis_id. ancestor Pointer to +destination ancestor name pointer. depends_on Pointer to +destination depends_on name pointer. equipment Pointer to +destination equipment name pointer. equipment_component Pointer to +destination equipment_component name pointer. offset1 +Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. +rotation Pointer to destination rotation value. +rotation_axis Pointer to destination rotation_axisn name +pointer. start Pointer to the destination start +value. increment Pointer to the destination increment +value. type Pointer to destination axis type of type +. vector1 Pointer to destination first vector component +value. vector2 Pointer to destination second vector +component value. vector3 Pointer to destination third +vector component value. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_axis_type; + + const char * get_axis_type(const char *axis_id){ + cbf_axis_type axis_type; + cbf_failnez(cbf_get_axis_type(self,axis_id, + &axis_type)); + if (axis_type == CBF_TRANSLATION_AXIS) return "translation"; + if (axis_type == CBF_ROTATION_AXIS) return "rotation"; + return "general"; + } + +/* cfunc cbf_remove_column pyfunc remove_column + arg cbf_handle handle */ + +%feature("autodoc", " +Returns : +*args : + +C prototype: int cbf_remove_column (cbf_handle handle); + +CBFLib documentation: +DESCRIPTION +cbf_remove_column deletes the current column. +The current column becomes undefined. +ARGUMENTS +handle CBF handle. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")remove_column; + void remove_column(void){ + cbf_failnez(cbf_remove_column(self));} + +/* cfunc cbf_rewind_blockitem pyfunc rewind_blockitem + arg cbf_handle handle arg CBF_NODETYPE * type */ + +%feature("autodoc", " +Returns : CBF_NODETYPE +*args : + +C prototype: int cbf_rewind_blockitem (cbf_handle handle, + CBF_NODETYPE * type); + +CBFLib documentation: +DESCRIPTION +cbf_rewind_category makes the first category in the current data +block the current category. cbf_rewind_saveframe makes the first +saveframe in the current data block the current saveframe. +cbf_rewind_blockitem makes the first blockitem (category or +saveframe) in the current data block the current blockitem. The type +of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type. +If there are no categories, saveframes or blockitems the function +returns CBF_NOTFOUND. +The current column and row become undefined. +ARGUMENTS +handle CBF handle. type CBF handle. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")rewind_blockitem; + CBF_NODETYPE rewind_blockitem(void){ + CBF_NODETYPE result; + cbf_failnez(cbf_rewind_blockitem(self,&result)); + return result;} + +/* cfunc cbf_get_value pyfunc get_value + arg cbf_handle handle arg const char **value */ + +%feature("autodoc", " +Returns : +*args : string + +C prototype: int cbf_get_value (cbf_handle handle, const char **value); + +CBFLib documentation: +DESCRIPTION +cbf_get_value sets *value to point to the ASCII value of the item at +the current column and row. cbf_require_value sets *value to point to +the ASCII value of the item at the current column and row, creating +the data item if necessary and initializing it to a copy of +defaultvalue. +If the value is not ASCII, the function returns CBF_BINARY. +The value will be valid as long as the item exists and has not been +set to a new value. +The value must not be modified by the program in any way. +ARGUMENTS +handle CBF handle. value Pointer to the destination +value pointer. defaultvalue Default value character string. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")get_value; + const char* get_value(void){ + const char* result; + cbf_failnez(cbf_get_value(self, &result)); + return result;} + +/* cfunc cbf_count_categories pyfunc count_categories + arg cbf_handle handle arg unsigned int *categories */ + +%feature("autodoc", " +Returns : Integer +*args : + +C prototype: int cbf_count_categories (cbf_handle handle, + unsigned int *categories); + +CBFLib documentation: +DESCRIPTION +cbf_count_categories puts the number of categories in the current +data block in *categories. +ARGUMENTS +handle CBF handle. categories Pointer to the destination +category count. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")count_categories; + unsigned int count_categories(void){ + unsigned int result; + cbf_failnez(cbf_count_categories(self,&result)); + return result;} +%feature("autodoc", " +Returns : +*args : String filename,Integer headers + +C prototype: int cbf_read_widefile (cbf_handle handle, FILE *file, int flags); + +CBFLib documentation: +DESCRIPTION +cbf_read_file reads the CBF or CIF file file into the CBF object +specified by handle, using the CIF 1.0 convention of 80 character +lines. cbf_read_widefile reads the CBF or CIF file file into the CBF +object specified by handle, using the CIF 1.1 convention of 2048 +character lines. A warning is issued to stderr for ascii lines over +the limit. No test is performed on binary sections. +Validation is performed in three ways levels: during the lexical +scan, during the parse, and, if a dictionary was converted, against +the value types, value enumerations, categories and parent-child +relationships specified in the dictionary. +flags controls the interpretation of binary section headers, the +parsing of brackets constructs and the parsing of treble-quoted +strings. +MSG_DIGEST: Instructs CBFlib to check that the digest +of the binary section matches any header digest value. If the digests +do not match, the call will return CBF_FORMAT. This evaluation and +comparison is delayed (a \"lazy \" evaluation) to ensure maximal +processing efficiency. If an immediately evaluation is required, see +MSG_DIGESTNOW, below. MSG_DIGESTNOW: Instructs CBFlib to +check that the digest of the binary section matches any header +digeste value. If the digests do not match, the call will return +CBF_FORMAT. This evaluation and comparison is performed during +initial parsing of the section to ensure timely error reporting at +the expense of processing efficiency. If a more efficient delayed ( +\"lazy \") evaluation is required, see MSG_DIGEST, above. +MSG_DIGESTWARN: Instructs CBFlib to check that the digest +of the binary section matches any header digeste value. If the +digests do not match, a warning message will be sent to stderr, but +processing will attempt to continue. This evaluation and comparison +is first performed during initial parsing of the section to ensure +timely error reporting at the expense of processing efficiency. An +mismatch of the message digest usually indicates a serious error, but +it is sometimes worth continuing processing to try to isolate the +cause of the error. Use this option with caution. MSG_NODIGEST: + Do not check the digest (default). PARSE_BRACKETS: +Accept DDLm bracket-delimited [item,item,...item] or +{item,item,...item} or (item,item,...item) constructs as valid, +stripping non-quoted embedded whitespace and comments. These +constructs may span multiple lines. PARSE_LIBERAL_BRACKETS: Accept +DDLm bracket-delimited [item,item,...item] or {item,item,...item} or +(item,item,...item) constructs as valid, stripping embedded +non-quoted, non-separating whitespace and comments. These constructs +may span multiple lines. In this case, whitespace may be used as an +alternative to the comma. PARSE_TRIPLE_QUOTES: Accept DDLm +triple-quoted \" \" \"item,item,...item \" \" \" or +'''item,item,...item''' constructs as valid, stripping embedded +whitespace and comments. These constructs may span multiple lines. If +this flag is set, then ''' will not be interpreted as a quoted +apoptrophe and \" \" \" will not be interpreted as a quoted double +quote mark and PARSE_NOBRACKETS: Do not accept DDLm +bracket-delimited [item,item,...item] or {item,item,...item} or +(item,item,...item) constructs as valid, stripping non-quoted +embedded whitespace and comments. These constructs may span multiple +lines. PARSE_NOTRIPLE_QUOTES: No not accept DDLm triple-quoted \" +\" \"item,item,...item \" \" \" or '''item,item,...item''' constructs +as valid, stripping embedded whitespace and comments. These +constructs may span multiple lines. If this flag is set, then ''' +will be interpreted as a quoted apostrophe and \" \" \" will be +interpreted as a quoted double quote mark. +CBFlib defers reading binary sections as long as possible. In the +current version of CBFlib, this means that: +1. The file must be a random-access file opened in binary mode (fopen +( , +")read_widefile; + + void read_widefile(char* filename, int headers){ + /* CBFlib needs a stream that will remain open + hence DO NOT open from python */ + FILE *stream; + if ( ! ( stream = fopen (filename, "rb")) ){ + cbf_failnez(CBF_FILEOPEN); + } + else{ + cbf_failnez(cbf_read_widefile(self, stream, headers)); + } + } + +/* cfunc cbf_set_wavelength pyfunc set_wavelength + arg cbf_handle handle arg double wavelength */ + +%feature("autodoc", " +Returns : double wavelength +*args : + +C prototype: int cbf_set_wavelength (cbf_handle handle, double wavelength); + +CBFLib documentation: +DESCRIPTION +cbf_set_wavelength sets the current wavelength in Å to wavelength. +ARGUMENTS +handle CBF handle. wavelength Wavelength in Å. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_wavelength; + void set_wavelength(double wavelength){ + cbf_failnez(cbf_set_wavelength(self,wavelength));} +%feature("autodoc", " +Returns : Float vector1,Float vector2,Float vector3 +*args : String axis_id + +C prototype: int cbf_get_axis_vector (cbf_handle handle, const char *axis_id, + double *vector1, double *vector2, double *vector3); + +CBFLib documentation: +DESCRIPTION +cbf_count_axis_ancestors sets ancestors to the number of ancestors of +axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor +axis of index ancestor_index of axis axis_id, starting with axis_id +for ancestor_index 0. +cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of +axis_id or to \". \" if there is no such ancestor. +cbf_get_axis_equipment sets *equipment to the equipment of axis_id or +to \". \" if there is no such equipment. +cbf_get_axis_equipment_component sets *equipment_component to the +equipment_component of axis_id or to \". \" if there is no such +equipment_component. +cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the +components of the ofset of axis_id. +cbf_get_axis_rotation sets rotation to the rotation of axis_id or to +0 if there is no such rotation. cbf_get_axis_rotation_axis sets +*rotation_axis to the rotation_axis of axis_id or to \". \" if there +is no such rotation_axis. +cbf_get_axis_setting sets *start and *increment to the corresponding +values of the axis axis_id. Any of the destination pointers may be +NULL. +cbf_get_axis_type sets axis_type to the type of axis_id. +cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the +components of the vector of axis_id. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any +value other than 0 is invalid. axis_id Axis id. +ancestor_index Integer index of the desired ancestor, starting +with 0 for the current axis_id. ancestor Pointer to +destination ancestor name pointer. depends_on Pointer to +destination depends_on name pointer. equipment Pointer to +destination equipment name pointer. equipment_component Pointer to +destination equipment_component name pointer. offset1 +Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. +rotation Pointer to destination rotation value. +rotation_axis Pointer to destination rotation_axisn name +pointer. start Pointer to the destination start +value. increment Pointer to the destination increment +value. type Pointer to destination axis type of type +. vector1 Pointer to destination first vector component +value. vector2 Pointer to destination second vector +component value. vector3 Pointer to destination third +vector component value. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_axis_vector; + +%apply double *OUTPUT {double *vector1, double *vector2, double vector3} get_axis_vector; + void get_axis_vector(const char *axis_id, + double *vector1, double *vector2, double *vector3){ + cbf_failnez(cbf_get_axis_vector(self,axis_id, + vector1, vector2,vector3)); + } +%feature("autodoc", " +Returns : +*args : Int element_number,Int axis_number,Float pixel size + +C prototype: int cbf_set_pixel_size_sf(cbf_handle handle, + unsigned int element_number, int axis_number, + double psize); + +CBFLib documentation: +DESCRIPTION +cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the +\"size \" column of the \"array_structure_list \" category at the +row which matches axis axis_number of the detector element +element_number converting the double pixel size psize from meters to +millimeters in storing it in the \"size \" column for the axis +axis_number of the detector element element_number. The axis_number +is numbered from 1, starting with the slowest axis. +cbf_set_pixel_size_fs sets the item in the \"size \" column of the +\"array_structure_list \" category at the row which matches axis +axis_number of the detector element element_number converting the +double pixel size psize from meters to millimeters in storing it in +the \"size \" column for the axis axis_number of the detector +element element_number. The axis_number is numbered from 1, starting +with the fastest axis. +If a negative axis number is given, the order of axes is reversed, so +that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the +fastest axis for cbf_get_pixel_size_sf. +If the \"array_structure_list \" category does not already exist, it +is created. +If the appropriate row in the \"array_structure_list \" catgeory +does not already exist, it is created. +If the pixel size is not given explcitly in the \"array_element_size +category \", the function returns CBF_NOTFOUND. +ARGUMENTS +handle CBF handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. axis_number The number of the +axis, fastest first, starting from 1. +")set_pixel_size_sf; + + void set_pixel_size_sf (unsigned int element_number, + unsigned int axis_number, double psize){ + cbf_failnez(cbf_set_pixel_size_sf(self, + element_number, + axis_number, + psize)); + } + +/* cfunc cbf_get_diffrn_id pyfunc get_diffrn_id + arg cbf_handle handle arg const char **diffrn_id */ + +%feature("autodoc", " +Returns : +*args : string + +C prototype: int cbf_get_diffrn_id (cbf_handle handle, + const char **diffrn_id); + +CBFLib documentation: +DESCRIPTION +cbf_get_diffrn_id sets *diffrn_id to point to the ASCII value of the +\"diffrn.id \" entry. cbf_require_diffrn_id also sets *diffrn_id to +point to the ASCII value of the \"diffrn.id \" entry, but, if the +\"diffrn.id \" entry does not exist, it sets the value in the CBF and +in*diffrn_id to the character string given by default_id, creating +the category and column is necessary. +The diffrn_id will be valid as long as the item exists and has not +been set to a new value. +The diffrn_id must not be modified by the program in any way. +ARGUMENTS +handle CBF handle. diffrn_id Pointer to the destination +value pointer. default_id Character string default value. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_diffrn_id; + const char* get_diffrn_id(void){ + const char* result; + cbf_failnez(cbf_get_diffrn_id(self, &result)); + return result;} +%feature("autodoc", " +Returns : Float +*args : String axis_id + +C prototype: int cbf_get_axis_rotation (cbf_handle handle, + const char *axis_id, double *rotation); + +CBFLib documentation: +DESCRIPTION +cbf_count_axis_ancestors sets ancestors to the number of ancestors of +axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor +axis of index ancestor_index of axis axis_id, starting with axis_id +for ancestor_index 0. +cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of +axis_id or to \". \" if there is no such ancestor. +cbf_get_axis_equipment sets *equipment to the equipment of axis_id or +to \". \" if there is no such equipment. +cbf_get_axis_equipment_component sets *equipment_component to the +equipment_component of axis_id or to \". \" if there is no such +equipment_component. +cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the +components of the ofset of axis_id. +cbf_get_axis_rotation sets rotation to the rotation of axis_id or to +0 if there is no such rotation. cbf_get_axis_rotation_axis sets +*rotation_axis to the rotation_axis of axis_id or to \". \" if there +is no such rotation_axis. +cbf_get_axis_setting sets *start and *increment to the corresponding +values of the axis axis_id. Any of the destination pointers may be +NULL. +cbf_get_axis_type sets axis_type to the type of axis_id. +cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the +components of the vector of axis_id. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any +value other than 0 is invalid. axis_id Axis id. +ancestor_index Integer index of the desired ancestor, starting +with 0 for the current axis_id. ancestor Pointer to +destination ancestor name pointer. depends_on Pointer to +destination depends_on name pointer. equipment Pointer to +destination equipment name pointer. equipment_component Pointer to +destination equipment_component name pointer. offset1 +Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. +rotation Pointer to destination rotation value. +rotation_axis Pointer to destination rotation_axisn name +pointer. start Pointer to the destination start +value. increment Pointer to the destination increment +value. type Pointer to destination axis type of type +. vector1 Pointer to destination first vector component +value. vector2 Pointer to destination second vector +component value. vector3 Pointer to destination third +vector component value. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_axis_rotation; + +%apply double *OUTPUT {double *rotation} get_axis_rotation; + void get_axis_rotation(const char *axis_id, + double *rotation){ + cbf_failnez(cbf_get_axis_rotation(self,axis_id, + rotation)); + } + +/* cfunc cbf_find_datablock pyfunc find_datablock + arg cbf_handle handle arg const char *datablockname */ + +%feature("autodoc", " +Returns : string +*args : + +C prototype: int cbf_find_datablock (cbf_handle handle, + const char *datablockname); + +CBFLib documentation: +DESCRIPTION +cbf_find_datablock makes the data block with name datablockname the +current data block. +The comparison is case-insensitive. +If the data block does not exist, the function returns CBF_NOTFOUND. +The current category becomes undefined. +ARGUMENTS +handle CBF handle. datablockname The name of the data +block to find. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")find_datablock; + void find_datablock(const char* arg){ + cbf_failnez(cbf_find_datablock(self,arg));} +%feature("autodoc", " +Returns : float polarizn_source_ratio,float polarizn_source_norm +*args : + +C prototype: int cbf_get_polarization (cbf_handle handle, + double *polarizn_source_ratio, + double *polarizn_source_norm); + +CBFLib documentation: +DESCRIPTION +cbf_get_polarization sets *polarizn_source_ratio and +*polarizn_source_norm to the corresponding source polarization +parameters. +Either destination pointer may be NULL. +ARGUMENTS +handle CBF handle. polarizn_source_ratio Pointer +to the destination polarizn_source_ratio. polarizn_source_norm +Pointer to the destination polarizn_source_norm. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_polarization; + + /* Returns a pair of double values */ +%apply double *OUTPUT { double *in1, double *in2 }; + void get_polarization(double *in1,double *in2){ + cbf_failnez(cbf_get_polarization (self, in1, in2)); + } + +/* cfunc cbf_select_category pyfunc select_category + arg cbf_handle handle arg unsigned int category */ + +%feature("autodoc", " +Returns : +*args : Integer + +C prototype: int cbf_select_category (cbf_handle handle, + unsigned int category); + +CBFLib documentation: +DESCRIPTION +cbf_select_category selects category number category in the current +data block as the current category. +The first category is number 0. +The current column and row become undefined. +If the category does not exist, the function returns CBF_NOTFOUND. +ARGUMENTS +handle CBF handle. category Number of the category to select. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")select_category; + void select_category(unsigned int arg){ + cbf_failnez(cbf_select_category(self,arg));} +%feature("autodoc", " +Returns : Float pixel_size +*args : Int element_number,Int axis_number + +C prototype: int cbf_get_pixel_size_fs(cbf_handle handle, + unsigned int element_number, int axis_number, + double *psize); + +CBFLib documentation: +DESCRIPTION +cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to +the double value in millimeters of the axis axis_number of the +detector element element_number. The axis_number is numbered from 1, +starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to +point to the double value in millimeters of the axis axis_number of +the detector element element_number. The axis_number is numbered from +1, starting with the fastest axis. +If a negative axis number is given, the order of axes is reversed, so +that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the +fastest axis for cbf_get_pixel_size_sf. +If the pixel size is not given explcitly in the \"array_element_size +\" category, the function returns CBF_NOTFOUND. +ARGUMENTS +handle CBF handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. axis_number The number of the +axis, starting from 1 for the fastest for cbf_get_pixel_size and +cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. +psize Pointer to the destination pixel size. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_pixel_size_fs; + +%apply double *OUTPUT {double *psize} get_pixel_size; + void get_pixel_size_fs(unsigned int element_number, + unsigned int axis_number, double *psize){ + cbf_failnez(cbf_get_pixel_size_fs(self, + element_number, + axis_number, + psize)); + } +%feature("autodoc", " +Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2, + Float offset3,Float angle +*args : Float ratio,String axis_id,String frame_id + +C prototype: int cbf_get_axis_poise(cbf_handle handle, double ratio, + double * vector1, double * vector2, double * vector3, + double * offset1, double * offset2, double * offset3, + double * angle, const char * axis_id, + const char * frame_id); + +CBFLib documentation: +DESCRIPTION +cbf_get_axis_poise sets vector1, vector2, vector3 to point to the +components of the axis vector for axis axis_id, offset1, offset2, +offset3 to point to the components of the axis base offset vector for +axis axis_id, and angle to point to the angle of rotation of axis +axis_id after application of the axis settings for frame frame_id, +using ratio, a value between 0 and 1, indicating how far into the +internal motion in the frame to go. If frame_id is the string \". +\", the first frame found is used. If there is more than one frame, +which frame will be found is indeterminate. If frame_id is NULL, the +overall setting for the scan are used, rather than those for any +particular frame. The vector and offset reported are the reference +vector and offset of the axis axis_id transformed by application of +all motions of the axes on which axis_id depends. +cbf_get_goniometer_poise vector1, vector2, vector3 to point to the +components of the axis vector for the goniometer axis, offset1, +offset2, offset3 to point to the components of the axis base offset +vector for the goniometer axis, and angle to point to the angle of +rotation of the goniometer axis after application of all axis +settings in the goniometer deriving the vector, offset and angle from +the resulting matrix. Calculation of the vector is indeterminate if +the angle is zero. +cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point +to the components of the axis vector for axis axis_id, offset1, +offset2, offset3 to point to the components of the axis base offset +vector for axis axis_id unmodified by axis rotations. Any of the +pointers may be specified as NULL. +ARGUMENTS +handle CBF handle. ratio A number between 0 and 1 +indication how far into the frame to go vector1 Pointer to the +first component of the axis vector vector2 Pointer to the second +component of the axis vector vector3 Pointer to the third +component of the axis vector offset1 Pointer to the first +component of the axis offset offset2 Pointer to the second +component of the axis offset offset3 Pointer to the third +component of the axis offset angle Pointer to the rotation +angle axis_id The specified axis frame_id The specified +frame positioner CBF goniometer +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_axis_poise; + + %apply double *OUTPUT {double *vector1, double *vector2, double *vector3, + double *offset1, double *offset2, double *offset3, double *angle}; + + void get_axis_poise(double ratio, + double *vector1, double *vector2, double *vector3, + double *offset1, double *offset2, double *offset3, + double *angle, + const char *axis_id, const char *frame_id){ + cbf_failnez(cbf_get_axis_poise(self, ratio, + vector1, vector2, vector3, + offset1, offset2, offset3, angle, + axis_id, frame_id)); + } + +%feature("autodoc", " +Returns : +*args : String filename,Integer headers + +C prototype: int cbf_read_file (cbf_handle handle, FILE *file, int flags); + +CBFLib documentation: +DESCRIPTION +cbf_read_file reads the CBF or CIF file file into the CBF object +specified by handle, using the CIF 1.0 convention of 80 character +lines. cbf_read_widefile reads the CBF or CIF file file into the CBF +object specified by handle, using the CIF 1.1 convention of 2048 +character lines. A warning is issued to stderr for ascii lines over +the limit. No test is performed on binary sections. +Validation is performed in three ways levels: during the lexical +scan, during the parse, and, if a dictionary was converted, against +the value types, value enumerations, categories and parent-child +relationships specified in the dictionary. +flags controls the interpretation of binary section headers, the +parsing of brackets constructs and the parsing of treble-quoted +strings. +MSG_DIGEST: Instructs CBFlib to check that the digest +of the binary section matches any header digest value. If the digests +do not match, the call will return CBF_FORMAT. This evaluation and +comparison is delayed (a \"lazy \" evaluation) to ensure maximal +processing efficiency. If an immediately evaluation is required, see +MSG_DIGESTNOW, below. MSG_DIGESTNOW: Instructs CBFlib to +check that the digest of the binary section matches any header +digeste value. If the digests do not match, the call will return +CBF_FORMAT. This evaluation and comparison is performed during +initial parsing of the section to ensure timely error reporting at +the expense of processing efficiency. If a more efficient delayed ( +\"lazy \") evaluation is required, see MSG_DIGEST, above. +MSG_DIGESTWARN: Instructs CBFlib to check that the digest +of the binary section matches any header digeste value. If the +digests do not match, a warning message will be sent to stderr, but +processing will attempt to continue. This evaluation and comparison +is first performed during initial parsing of the section to ensure +timely error reporting at the expense of processing efficiency. An +mismatch of the message digest usually indicates a serious error, but +it is sometimes worth continuing processing to try to isolate the +cause of the error. Use this option with caution. MSG_NODIGEST: + Do not check the digest (default). PARSE_BRACKETS: +Accept DDLm bracket-delimited [item,item,...item] or +{item,item,...item} or (item,item,...item) constructs as valid, +stripping non-quoted embedded whitespace and comments. These +constructs may span multiple lines. PARSE_LIBERAL_BRACKETS: Accept +DDLm bracket-delimited [item,item,...item] or {item,item,...item} or +(item,item,...item) constructs as valid, stripping embedded +non-quoted, non-separating whitespace and comments. These constructs +may span multiple lines. In this case, whitespace may be used as an +alternative to the comma. PARSE_TRIPLE_QUOTES: Accept DDLm +triple-quoted \" \" \"item,item,...item \" \" \" or +'''item,item,...item''' constructs as valid, stripping embedded +whitespace and comments. These constructs may span multiple lines. If +this flag is set, then ''' will not be interpreted as a quoted +apoptrophe and \" \" \" will not be interpreted as a quoted double +quote mark and PARSE_NOBRACKETS: Do not accept DDLm +bracket-delimited [item,item,...item] or {item,item,...item} or +(item,item,...item) constructs as valid, stripping non-quoted +embedded whitespace and comments. These constructs may span multiple +lines. PARSE_NOTRIPLE_QUOTES: No not accept DDLm triple-quoted \" +\" \"item,item,...item \" \" \" or '''item,item,...item''' constructs +as valid, stripping embedded whitespace and comments. These +constructs may span multiple lines. If this flag is set, then ''' +will be interpreted as a quoted apostrophe and \" \" \" will be +interpreted as a quoted double quote mark. +CBFlib defers reading binary sections as long as possible. In the +current version of CBFlib, this means that: +1. The file must be a random-access file opened in binary mode (fopen +( , +")read_file; + + void read_file(char* filename, int headers){ + /* CBFlib needs a stream that will remain open + hence DO NOT open from python */ + FILE *stream; + if ( ! ( stream = fopen (filename, "rb")) ){ + cbf_failnez(CBF_FILEOPEN); + } + else{ + cbf_failnez(cbf_read_file(self, stream, headers)); + } + } + +/* cfunc cbf_datablock_name pyfunc datablock_name + arg cbf_handle handle arg const char **datablockname */ + +%feature("autodoc", " +Returns : +*args : string + +C prototype: int cbf_datablock_name (cbf_handle handle, + const char **datablockname); + +CBFLib documentation: +DESCRIPTION +cbf_datablock_name sets *datablockname to point to the name of the +current data block. +The data block name will be valid as long as the data block exists +and has not been renamed. +The name must not be modified by the program in any way. +ARGUMENTS +handle CBF handle. datablockname Pointer to the +destination data block name pointer. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")datablock_name; + const char* datablock_name(void){ + const char* result; + cbf_failnez(cbf_datablock_name(self, &result)); + return result;} +%feature("autodoc", " +Returns : +*args : int compression,int binary_id,(binary) String data,int elsize, + int elements,String byteorder,int dimfast,int dimmid,int dimslow, + int padding + +C prototype: int cbf_set_realarray_wdims (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, size_t elements, const char *byteorder, + size_t dimfast, size_t dimmid, size_t dimslow, + size_t padding); + +CBFLib documentation: +DESCRIPTION +cbf_set_integerarray sets the binary value of the item at the current +column and row to an integer array. The array consists of elements +elements of elsize bytes each, starting at array. The elements are +signed if elsigned is non-0 and unsigned otherwise. binary_id is the +binary section identifier. cbf_set_realarray sets the binary value of +the item at the current column and row to an integer array. The array +consists of elements elements of elsize bytes each, starting at +array. binary_id is the binary section identifier. +The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, +cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, +cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants +allow the data header values of byteorder, dimfast, dimmid, dimslow +and padding to be set to the data byte order, the fastest, second +fastest and third fastest array dimensions and the size in byte of +the post data padding to be used. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +NOTE: This scheme is by far the slowest of the four and uses much +more disk space. It is intended for routine use with small arrays +only. With large arrays (like images) it should be used only for +debugging. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or +floats for cbf_set_realarray. If elsize is not equal to sizeof +(char), sizeof (short) or sizeof (int), the function returns +CBF_ARGUMENT. +ARGUMENTS +handle CBF handle. compression Compression method to use. +binary_id Integer binary identifier. array Pointer to the +source array. elsize Size in bytes of each source array +element. elsigned Set to non-0 if the source array elements are +signed. elements The number of elements in the array +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")set_realarray_wdims; + + /* CBFlib must NOT modify the data string nor the byteorder string + which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray_wdims; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_realarray_wdims; + + void set_realarray_wdims(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elements, + char *bo, int bolen, int dimfast, int dimmid, int dimslow, int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + cbf_failnez(cbf_set_realarray_wdims (self, compression, binary_id, + (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder, + (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +%feature("autodoc", " +Returns : pycbf detector object +*args : Integer element_number + +C prototype: int cbf_construct_reference_detector (cbf_handle handle, + cbf_detector *detector, unsigned int element_number); + +CBFLib documentation: +DESCRIPTION +cbf_construct_detector constructs a detector object for detector +element number element_number using the description in the CBF object +handle and initialises the detector handle *detector. +cbf_construct_reference_detector constructs a detector object for +detector element number element_number using the description in the +CBF object handle and initialises the detector handle *detector using +the reference settings of the axes. cbf_require_reference_detector is +similar, but try to force the creations of missing intermediate +categories needed to construct a detector object. +ARGUMENTS +handle CBF handle. detector Pointer to the +destination detector handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")construct_reference_detector; + + cbf_detector construct_reference_detector(unsigned int element_number){ + cbf_detector detector; + cbf_failnez(cbf_construct_reference_detector(self,&detector,element_number)); + return detector; + } +%feature("autodoc", " +Returns : (Binary)String +*args : int element_number,int elsize,int ndimfast,int ndimmid,int ndimslow + +C prototype: int cbf_get_real_3d_image_fs (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + void *array, size_t elsize, size_t ndimfast, + size_t ndimmid, size_t ndimslow); + +CBFLib documentation: +DESCRIPTION +cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image +array for element number element_number into an array. The array +consists of ndimslow×ndimfast elements of elsize bytes each, +starting at array. The elements are signed if elsign is non-0 and +unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and +cbf_get_real_image_sf read the image array of IEEE doubles or floats +for element number element_number into an array. A real array is +always signed. cbf_get_3d_image, cbf_get_3d_image_fs and +cbf_get_3d_image_sf read the 3D image array for element number +element_number into an array. The array consists of +ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting +at array. The elements are signed if elsign is non-0 and unsigned +otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, +cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or +floats for element number element_number into an array. A real array +is always signed. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +The structure of the array as a 1-, 2- or 3-dimensional array should +agree with the structure of the array given in the +ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, +ndimslow should be the array size and ndimfast and, for the 3D calls, +ndimmid, should be set to 1 both in the call and in the imgCIF data +being processed. If the array is 2-dimensional and a 3D call is used, +ndimslow and ndimmid should be the +")get_real_3d_image_fs_as_string; + +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_real_3d_image_fs_as_string; + +// Get the length correct + + void get_real_3d_image_fs_as_string(int element_number, char **s, int *slen, + int elsize, int ndimfast, int ndimmid, int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + cbf_failnez (cbf_get_real_3d_image_fs(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } + +/* cfunc cbf_rewind_row pyfunc rewind_row + arg cbf_handle handle */ + +%feature("autodoc", " +Returns : +*args : + +C prototype: int cbf_rewind_row (cbf_handle handle); + +CBFLib documentation: +DESCRIPTION +cbf_rewind_row makes the first row in the current category the +current row. +If there are no rows, the function returns CBF_NOTFOUND. +The current column is not affected. +ARGUMENTS +handle CBF handle. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")rewind_row; + void rewind_row(void){ + cbf_failnez(cbf_rewind_row(self));} +%feature("autodoc", " +Returns : Float start,Float increment +*args : String axis_id + +C prototype: int cbf_get_axis_setting (cbf_handle handle, + unsigned int reserved, const char *axis_id, double *start, + double *increment); + +CBFLib documentation: +DESCRIPTION +cbf_count_axis_ancestors sets ancestors to the number of ancestors of +axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor +axis of index ancestor_index of axis axis_id, starting with axis_id +for ancestor_index 0. +cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of +axis_id or to \". \" if there is no such ancestor. +cbf_get_axis_equipment sets *equipment to the equipment of axis_id or +to \". \" if there is no such equipment. +cbf_get_axis_equipment_component sets *equipment_component to the +equipment_component of axis_id or to \". \" if there is no such +equipment_component. +cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the +components of the ofset of axis_id. +cbf_get_axis_rotation sets rotation to the rotation of axis_id or to +0 if there is no such rotation. cbf_get_axis_rotation_axis sets +*rotation_axis to the rotation_axis of axis_id or to \". \" if there +is no such rotation_axis. +cbf_get_axis_setting sets *start and *increment to the corresponding +values of the axis axis_id. Any of the destination pointers may be +NULL. +cbf_get_axis_type sets axis_type to the type of axis_id. +cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the +components of the vector of axis_id. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any +value other than 0 is invalid. axis_id Axis id. +ancestor_index Integer index of the desired ancestor, starting +with 0 for the current axis_id. ancestor Pointer to +destination ancestor name pointer. depends_on Pointer to +destination depends_on name pointer. equipment Pointer to +destination equipment name pointer. equipment_component Pointer to +destination equipment_component name pointer. offset1 +Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. +rotation Pointer to destination rotation value. +rotation_axis Pointer to destination rotation_axisn name +pointer. start Pointer to the destination start +value. increment Pointer to the destination increment +value. type Pointer to destination axis type of type +. vector1 Pointer to destination first vector component +value. vector2 Pointer to destination second vector +component value. vector3 Pointer to destination third +vector component value. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_axis_setting; + +%apply double *OUTPUT {double *start, double *increment} get_axis_setting; + void get_axis_setting(const char *axis_id, + double *start, double *increment){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_get_axis_setting(self,reserved,axis_id, + start,increment)); + } + +/* cfunc cbf_require_column pyfunc require_column + arg cbf_handle handle arg const char *columnname */ + +%feature("autodoc", " +Returns : string +*args : + +C prototype: int cbf_require_column (cbf_handle handle, + const char *columnname); + +CBFLib documentation: +DESCRIPTION +cbf_require_column makes the columns in the current category with +name columnname the current column, if it exists, or creates it if it +does not. +The comparison is case-insensitive. +The current row is not affected. +ARGUMENTS +handle CBF handle. columnname The name of column to find. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")require_column; + void require_column(const char* arg){ + cbf_failnez(cbf_require_column(self,arg));} +%feature("autodoc", " +Returns : Float time,Integer timezone +*args : + +C prototype: int cbf_get_timestamp (cbf_handle handle, unsigned int reserved, + double *time, int *timezone); + +CBFLib documentation: +DESCRIPTION +cbf_get_timestamp sets *time to the collection timestamp in seconds +since January 1 1970. *timezone is set to timezone difference from +UTC in minutes. The parameter reserved is presently unused and should +be set to 0. +Either of the destination pointers may be NULL. +ARGUMENTS +handle CBF handle. reserved Unused. Any value other than 0 is +invalid. time Pointer to the destination collection timestamp. +timezone Pointer to the destination timezone difference. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_timestamp; + +%apply double *OUTPUT {double *time} get_timestamp; +%apply int *OUTPUT {int *timezone} get_timestamp; + void get_timestamp(double *time, int *timezone){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_get_timestamp(self,reserved,time,timezone)); + } + +/* cfunc cbf_find_nextrow pyfunc find_nextrow + arg cbf_handle handle arg const char *value */ + +%feature("autodoc", " +Returns : string +*args : + +C prototype: int cbf_find_nextrow (cbf_handle handle, const char *value); + +CBFLib documentation: +DESCRIPTION +cbf_find_nextrow makes the makes the next row in the current column +with value value the current row. The search starts from the row +following the last row found with cbf_find_row or cbf_find_nextrow, +or from the current row if the current row was defined using any +other function. +The comparison is case-sensitive. +If no more matching rows exist, the function returns CBF_NOTFOUND. +The current column is not affected. +ARGUMENTS +handle CBF handle. value the value to search for. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")find_nextrow; + void find_nextrow(const char* arg){ + cbf_failnez(cbf_find_nextrow(self,arg));} +%feature("autodoc", " +Returns : String +*args : String axis_id + +C prototype: int cbf_get_axis_equipment_component (cbf_handle handle, + const char *axis_id, const char * *equipment_component); + +CBFLib documentation: +DESCRIPTION +cbf_count_axis_ancestors sets ancestors to the number of ancestors of +axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor +axis of index ancestor_index of axis axis_id, starting with axis_id +for ancestor_index 0. +cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of +axis_id or to \". \" if there is no such ancestor. +cbf_get_axis_equipment sets *equipment to the equipment of axis_id or +to \". \" if there is no such equipment. +cbf_get_axis_equipment_component sets *equipment_component to the +equipment_component of axis_id or to \". \" if there is no such +equipment_component. +cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the +components of the ofset of axis_id. +cbf_get_axis_rotation sets rotation to the rotation of axis_id or to +0 if there is no such rotation. cbf_get_axis_rotation_axis sets +*rotation_axis to the rotation_axis of axis_id or to \". \" if there +is no such rotation_axis. +cbf_get_axis_setting sets *start and *increment to the corresponding +values of the axis axis_id. Any of the destination pointers may be +NULL. +cbf_get_axis_type sets axis_type to the type of axis_id. +cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the +components of the vector of axis_id. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any +value other than 0 is invalid. axis_id Axis id. +ancestor_index Integer index of the desired ancestor, starting +with 0 for the current axis_id. ancestor Pointer to +destination ancestor name pointer. depends_on Pointer to +destination depends_on name pointer. equipment Pointer to +destination equipment name pointer. equipment_component Pointer to +destination equipment_component name pointer. offset1 +Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. +rotation Pointer to destination rotation value. +rotation_axis Pointer to destination rotation_axisn name +pointer. start Pointer to the destination start +value. increment Pointer to the destination increment +value. type Pointer to destination axis type of type +. vector1 Pointer to destination first vector component +value. vector2 Pointer to destination second vector +component value. vector3 Pointer to destination third +vector component value. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_axis_equipment_component; + + const char * get_axis_equipment_component(const char *axis_id){ + const char* equip_comp; + cbf_failnez(cbf_get_axis_equipment_component(self,axis_id, + &equip_comp)); + return equip_comp; + } +%feature("autodoc", " +Returns : int compression,int binary_id,int elsize,int elements,char **bo, + int *bolen,int dimslow,int dimmid,int dimfast,int padding +*args : + +C prototype: int cbf_get_realarrayparameters_wdims_sf (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + size_t *elements, const char **byteorder, size_t *dimslow, + size_t *dimmid, size_t *dimfast, size_t *padding); + +CBFLib documentation: +DESCRIPTION +cbf_get_integerarrayparameters sets *compression, *binary_id, +*elsize, *elsigned, *elunsigned, *elements, *minelement and +*maxelement to values read from the binary value of the item at the +current column and row. This provides all the arguments needed for a +subsequent call to cbf_set_integerarray, if a copy of the array is to +be made into another CIF or CBF. cbf_get_realarrayparameters sets +*compression, *binary_id, *elsize, *elements to values read from the +binary value of the item at the current column and row. This provides +all the arguments needed for a subsequent call to cbf_set_realarray, +if a copy of the arry is to be made into another CIF or CBF. +The variants cbf_get_integerarrayparameters_wdims, +cbf_get_integerarrayparameters_wdims_fs, +cbf_get_integerarrayparameters_wdims_sf, +cbf_get_realarrayparameters_wdims, +cbf_get_realarrayparameters_wdims_fs, +cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, +*dimmid, *dimslow, and *padding as well, providing the additional +parameters needed for a subsequent call to cbf_set_integerarray_wdims +or cbf_set_realarray_wdims. +The value returned in *byteorder is a pointer either to the string +\"little_endian \" or to the string \"big_endian \". This should be +the byte order of the data, not necessarily of the host machine. No +attempt should be made to modify this string. At this time only +\"little_endian \" will be returned. +The values returned in *dimfast, *dimmid and *dimslow are the sizes +of the fastest changing, second fastest changing and third fastest +changing dimensions of the array, if specified, or zero, if not +specified. +The value returned in *padding is the size of the post-data padding, +if any and if specified in the data header. The value is given as a +count of octets. +If the value is not binary, the function returns CBF_ASCII. +ARGUMENTS +handle CBF handle. compression Compression method used. +elsize Size in bytes of each array element. binary_id +Pointer to the destination integer binary identifier. elsigned +Pointer to an integer. Set to 1 if the elements can be read as signed +integers. elunsigned Pointer to an integer. Set to 1 if the +elements can be read as unsigned integers. elements Pointer to +the destination number of elements. minelement Pointer to the +destination smallest element. maxelement Pointer to the +destination largest element. byteorder Pointer to the destination +byte order. dimfast Pointer to the destination fastest +dimension. dimmid Pointer to the destination second fastest +dimension. dimslow Pointer to the destination third fastest +dimension. padding Pointer to the destination padding size. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")get_realarrayparameters_wdims_sf; + +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, + int *elements, + int *dimslow, int *dimmid, int *dimfast, int *padding} + get_realarrayparameters_wdims_sf; + + void get_realarrayparameters_wdims_sf(int *compression,int *binary_id, + int *elsize, + int *elements, + char **bo, int *bolen, + int *dimslow, int *dimmid, int *dimfast, int *padding + ){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + cbf_failnez(cbf_get_realarrayparameters_wdims_sf(self, + &comp,binary_id, &elsiz, &elem, + &byteorder,&ds,&dm,&df,&pd )); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } + +/* cfunc cbf_reset_datablock pyfunc reset_datablock + arg cbf_handle handle */ + +%feature("autodoc", " +Returns : +*args : + +C prototype: int cbf_reset_datablock (cbf_handle handle); + +CBFLib documentation: +DESCRIPTION +cbf_reset_datablock deletes all categories from the current data +block. cbf_reset_saveframe deletes all categories from the current +save frame. +ARGUMENTS +handle CBF handle. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")reset_datablock; + void reset_datablock(void){ + cbf_failnez(cbf_reset_datablock(self));} +%feature("autodoc", " +Returns : +*args : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimfast,int dimmid,int dimslow + +C prototype: int cbf_set_3d_image_fs(cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array, size_t elsize, int elsign, size_t ndimfast, + size_t ndimmid, size_t ndimslow); + +CBFLib documentation: +DESCRIPTION +cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image +array for element number element_number. The array consists of +ndimfast×ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-zero and unsigned otherwise. +cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf +write the image array for element number element_number. The array +consists of ndimfast×ndimslow IEEE double or float elements of +elsize bytes each, starting at array. cbf_set_3d_image, +cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array +for element number element_number. The array consists of +ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting +at array. The elements are signed if elsign is non-0 and unsigned +otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and +cbf_set_real_3d_image_sf writes the 3D image array for element number +element_number. The array consists of ndimfast×ndimmid×ndimslow +IEEE double or float elements of elsize bytes each, starting at +array. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +If the array is 1-dimensional, ndimslow should be the array size and +ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the +array is 2-dimensional and the 3D calls are used, ndimslow and +ndimmid should be used for the array dimensions and ndimfast should +be set to 1. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET +Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for +cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof +(int), sizeof(double) or sizeof(float), the function returns +CBF_ARGUMENT. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any value other +than 0 is invalid. element_number The number of the detector +element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. compression Compression type. +array Pointer to the image array. elsize Size in +bytes of each image array element. elsigned Set to non-0 if +the image array elements are signed. ndimslow Slowest array +dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_3d_image_fs; + + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_3d_image; + + void set_3d_image_fs(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int elsign, int ndimfast, int ndimmid, int ndimslow){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_3d_image_fs (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimfast, (size_t) ndimmid, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } + +/* cfunc cbf_set_saveframename pyfunc set_saveframename + arg cbf_handle handle arg const char *saveframename */ + +%feature("autodoc", " +Returns : string +*args : + +C prototype: int cbf_set_saveframename (cbf_handle handle, + const char *saveframename); + +CBFLib documentation: +DESCRIPTION +cbf_set_datablockname changes the name of the current data block to +datablockname. cbf_set_saveframename changes the name of the current +save frame to saveframename. +If a data block or save frame with this name already exists +(comparison is case-insensitive), the function returns CBF_IDENTICAL. +ARGUMENTS +handle CBF handle. datablockname The new data block name. +saveframename The new save frame name. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")set_saveframename; + void set_saveframename(const char* arg){ + cbf_failnez(cbf_set_saveframename(self,arg));} +%feature("autodoc", " +Returns : Int number +*args : Int thedefault + +C prototype: int cbf_require_integervalue (cbf_handle handle, int *number, + int defaultvalue); + +CBFLib documentation: +DESCRIPTION +cbf_get_integervalue sets *number to the value of the ASCII item at +the current column and row interpreted as a decimal integer. +cbf_require_integervalue sets *number to the value of the ASCII item +at the current column and row interpreted as a decimal integer, +setting it to defaultvalue if necessary. +If the value is not ASCII, the function returns CBF_BINARY. +ARGUMENTS +handle CBF handle. number pointer to the number. +defaultvalue default number value. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")require_integervalue; + +%apply int *OUTPUT {int *number} require_integervalue; + + void require_integervalue(int *number, int thedefault){ + + cbf_failnez(cbf_require_integervalue(self,number,thedefault)); + + } +%feature("autodoc", " +Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, + int elements,int minelement,int maxelement +*args : + +C prototype: int cbf_get_integerarrayparameters (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + int *elsigned, int *elunsigned, size_t *elements, + int *minelement, int *maxelement); + +CBFLib documentation: +DESCRIPTION +cbf_get_integerarrayparameters sets *compression, *binary_id, +*elsize, *elsigned, *elunsigned, *elements, *minelement and +*maxelement to values read from the binary value of the item at the +current column and row. This provides all the arguments needed for a +subsequent call to cbf_set_integerarray, if a copy of the array is to +be made into another CIF or CBF. cbf_get_realarrayparameters sets +*compression, *binary_id, *elsize, *elements to values read from the +binary value of the item at the current column and row. This provides +all the arguments needed for a subsequent call to cbf_set_realarray, +if a copy of the arry is to be made into another CIF or CBF. +The variants cbf_get_integerarrayparameters_wdims, +cbf_get_integerarrayparameters_wdims_fs, +cbf_get_integerarrayparameters_wdims_sf, +cbf_get_realarrayparameters_wdims, +cbf_get_realarrayparameters_wdims_fs, +cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, +*dimmid, *dimslow, and *padding as well, providing the additional +parameters needed for a subsequent call to cbf_set_integerarray_wdims +or cbf_set_realarray_wdims. +The value returned in *byteorder is a pointer either to the string +\"little_endian \" or to the string \"big_endian \". This should be +the byte order of the data, not necessarily of the host machine. No +attempt should be made to modify this string. At this time only +\"little_endian \" will be returned. +The values returned in *dimfast, *dimmid and *dimslow are the sizes +of the fastest changing, second fastest changing and third fastest +changing dimensions of the array, if specified, or zero, if not +specified. +The value returned in *padding is the size of the post-data padding, +if any and if specified in the data header. The value is given as a +count of octets. +If the value is not binary, the function returns CBF_ASCII. +ARGUMENTS +handle CBF handle. compression Compression method used. +elsize Size in bytes of each array element. binary_id +Pointer to the destination integer binary identifier. elsigned +Pointer to an integer. Set to 1 if the elements can be read as signed +integers. elunsigned Pointer to an integer. Set to 1 if the +elements can be read as unsigned integers. elements Pointer to +the destination number of elements. minelement Pointer to the +destination smallest element. maxelement Pointer to the +destination largest element. byteorder Pointer to the destination +byte order. dimfast Pointer to the destination fastest +dimension. dimmid Pointer to the destination second fastest +dimension. dimslow Pointer to the destination third fastest +dimension. padding Pointer to the destination padding size. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")get_integerarrayparameters; + +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement} + get_integerarrayparameters; + + void get_integerarrayparameters(int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement){ + unsigned int comp; + size_t elsiz, elem; + cbf_failnez(cbf_get_integerarrayparameters(self, + &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, + minelement, maxelement)); + *compression = comp; /* FIXME - does this convert in C? */ + *elsize = elsiz; + *elements = elem; + } +%feature("autodoc", " +Returns : +*args : int element_number,int compression,(binary) String data,int elsize, + int dimslow,int dimmid,int dimfast + +C prototype: int cbf_set_real_3d_image_sf(cbf_handle handle, + unsigned int reserved, unsigned int element_number, + unsigned int compression, void *array,size_t elsize, + size_t ndimslow, size_t ndimmid, size_t ndimfast); + +CBFLib documentation: +DESCRIPTION +cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image +array for element number element_number. The array consists of +ndimfast×ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-zero and unsigned otherwise. +cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf +write the image array for element number element_number. The array +consists of ndimfast×ndimslow IEEE double or float elements of +elsize bytes each, starting at array. cbf_set_3d_image, +cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array +for element number element_number. The array consists of +ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting +at array. The elements are signed if elsign is non-0 and unsigned +otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and +cbf_set_real_3d_image_sf writes the 3D image array for element number +element_number. The array consists of ndimfast×ndimmid×ndimslow +IEEE double or float elements of elsize bytes each, starting at +array. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +If the array is 1-dimensional, ndimslow should be the array size and +ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the +array is 2-dimensional and the 3D calls are used, ndimslow and +ndimmid should be used for the array dimensions and ndimfast should +be set to 1. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET +Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for +cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof +(int), sizeof(double) or sizeof(float), the function returns +CBF_ARGUMENT. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any value other +than 0 is invalid. element_number The number of the detector +element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. compression Compression type. +array Pointer to the image array. elsize Size in +bytes of each image array element. elsigned Set to non-0 if +the image array elements are signed. ndimslow Slowest array +dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_real_3d_image_sf; + + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_3d_image_sf; + + void set_real_3d_image_sf(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int ndimslow, int ndimmid, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_real_3d_image_sf (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +%feature("autodoc", " +Returns : +*args : String filename,Integer ciforcbf,Integer Headers,Integer encoding + +C prototype: int cbf_write_file (cbf_handle handle, FILE *file, int readable, + int ciforcbf, int flags, int encoding); + +CBFLib documentation: +DESCRIPTION +cbf_write_file writes the CBF object specified by handle into the +file file, following CIF 1.0 conventions of 80 character lines. +cbf_write_widefile writes the CBF object specified by handle into the +file file, following CIF 1.1 conventions of 2048 character lines. A +warning is issued to stderr for ascii lines over the limit, and an +attempt is made to fold lines to fit. No test is performed on binary +sections. +If a dictionary has been provided, aliases will be applied on output. +Unlike cbf_read_file, the file does not have to be random-access. +If the file is random-access and readable, readable can be set to +non-0 to indicate to CBFlib that the file can be used as a buffer to +conserve disk space. If the file is not random-access or not +readable, readable must be 0. +")write_file; + + void write_file(const char* filename, int ciforcbf, int headers, + int encoding){ + FILE *stream; + int readable; + /* Make readable false so we can close the file immediately */ + readable = 0; + if ( ! ( stream = fopen (filename, "w+b")) ){ + cbf_failnez(CBF_FILEOPEN); + } + else{ + cbf_failnez(cbf_write_file(self, stream, readable, + ciforcbf, headers, encoding)); + fclose(stream); + } + } +%feature("autodoc", " +Returns : +*args : Float div_x_source,Float div_y_source,Float div_x_y_source + +C prototype: int cbf_set_divergence (cbf_handle handle, double div_x_source, + double div_y_source, double div_x_y_source); + +CBFLib documentation: +DESCRIPTION +cbf_set_divergence sets the source divergence parameters to the +values specified by div_x_source, div_y_source and div_x_y_source. +ARGUMENTS +handle CBF handle. div_x_source New value of +div_x_source. div_y_source New value of div_y_source. +div_x_y_source New value of div_x_y_source. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_divergence; + + void set_divergence ( double div_x_source, double div_y_source, + double div_x_y_source){ + cbf_failnez(cbf_set_divergence (self, div_x_source, + div_y_source,div_x_y_source)); + } + +/* cfunc cbf_remove_datablock pyfunc remove_datablock + arg cbf_handle handle */ + +%feature("autodoc", " +Returns : +*args : + +C prototype: int cbf_remove_datablock (cbf_handle handle); + +CBFLib documentation: +DESCRIPTION +cbf_remove_datablock deletes the current data block. +cbf_remove_saveframe deletes the current save frame. +The current data block becomes undefined. +ARGUMENTS +handle CBF handle. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")remove_datablock; + void remove_datablock(void){ + cbf_failnez(cbf_remove_datablock(self));} + +/* cfunc cbf_count_elements pyfunc count_elements + arg cbf_handle handle arg unsigned int *elements */ + +%feature("autodoc", " +Returns : Integer +*args : + +C prototype: int cbf_count_elements (cbf_handle handle, + unsigned int *elements); + +CBFLib documentation: +DESCRIPTION +cbf_count_elements sets *elements to the number of detector elements. +ARGUMENTS +handle CBF handle. elements Pointer to the destination count. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")count_elements; + unsigned int count_elements(void){ + unsigned int result; + cbf_failnez(cbf_count_elements(self,&result)); + return result;} +%feature("autodoc", " +Returns : +*args : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimfast,int dimslow + +C prototype: int cbf_set_image_fs(cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array, size_t elsize, int elsign, size_t ndimfast, + size_t ndimslow); + +CBFLib documentation: +DESCRIPTION +cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image +array for element number element_number. The array consists of +ndimfast×ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-zero and unsigned otherwise. +cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf +write the image array for element number element_number. The array +consists of ndimfast×ndimslow IEEE double or float elements of +elsize bytes each, starting at array. cbf_set_3d_image, +cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array +for element number element_number. The array consists of +ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting +at array. The elements are signed if elsign is non-0 and unsigned +otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and +cbf_set_real_3d_image_sf writes the 3D image array for element number +element_number. The array consists of ndimfast×ndimmid×ndimslow +IEEE double or float elements of elsize bytes each, starting at +array. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +If the array is 1-dimensional, ndimslow should be the array size and +ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the +array is 2-dimensional and the 3D calls are used, ndimslow and +ndimmid should be used for the array dimensions and ndimfast should +be set to 1. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET +Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for +cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof +(int), sizeof(double) or sizeof(float), the function returns +CBF_ARGUMENT. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any value other +than 0 is invalid. element_number The number of the detector +element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. compression Compression type. +array Pointer to the image array. elsize Size in +bytes of each image array element. elsigned Set to non-0 if +the image array elements are signed. ndimslow Slowest array +dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_image_fs; + + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_image; + + void set_image_fs(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int elsign, int ndimfast, int ndimslow){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimfast, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +%feature("autodoc", " +Returns : pycbf detector object +*args : Integer element_number + +C prototype: int cbf_require_reference_detector (cbf_handle handle, + cbf_detector *detector, unsigned int element_number); + +CBFLib documentation: +DESCRIPTION +cbf_construct_detector constructs a detector object for detector +element number element_number using the description in the CBF object +handle and initialises the detector handle *detector. +cbf_construct_reference_detector constructs a detector object for +detector element number element_number using the description in the +CBF object handle and initialises the detector handle *detector using +the reference settings of the axes. cbf_require_reference_detector is +similar, but try to force the creations of missing intermediate +categories needed to construct a detector object. +ARGUMENTS +handle CBF handle. detector Pointer to the +destination detector handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")require_reference_detector; + + cbf_detector require_reference_detector(unsigned int element_number){ + cbf_detector detector; + cbf_failnez(cbf_require_reference_detector(self,&detector,element_number)); + return detector; + } + +/* cfunc cbf_next_category pyfunc next_category + arg cbf_handle handle */ + +%feature("autodoc", " +Returns : +*args : + +C prototype: int cbf_next_category (cbf_handle handle); + +CBFLib documentation: +DESCRIPTION +cbf_next_category makes the category following the current category +in the current data block the current category. +If there are no more categories, the function returns CBF_NOTFOUND. +The current column and row become undefined. +ARGUMENTS +handle CBF handle. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")next_category; + void next_category(void){ + cbf_failnez(cbf_next_category(self));} + +/* cfunc cbf_set_diffrn_id pyfunc set_diffrn_id + arg cbf_handle handle arg const char *diffrn_id */ + +%feature("autodoc", " +Returns : string +*args : + +C prototype: int cbf_set_diffrn_id (cbf_handle handle, const char *diffrn_id); + +CBFLib documentation: +DESCRIPTION +cbf_set_diffrn_id sets the \"diffrn.id \" entry of the current +datablock to the ASCII value diffrn_id. +This function also changes corresponding \"diffrn_id \" entries in +the \"diffrn_source \", \"diffrn_radiation \", \"diffrn_detector +\" and \"diffrn_measurement \" categories. +ARGUMENTS +handle CBF handle. diffrn_id ASCII value. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_diffrn_id; + void set_diffrn_id(const char* arg){ + cbf_failnez(cbf_set_diffrn_id(self,arg));} +%feature("autodoc", " +Returns : +*args : Float time,Integer timezone,Float precision + +C prototype: int cbf_set_timestamp (cbf_handle handle, unsigned int reserved, + double time, int timezone, double precision); + +CBFLib documentation: +DESCRIPTION +cbf_set_timestamp sets the collection timestamp in seconds since +January 1 1970 to the value specified by time. The timezone +difference from UTC +")set_timestamp; + + void set_timestamp(double time, int timezone, double precision){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_set_timestamp(self,reserved,time,timezone,precision)); + } +%feature("autodoc", " +Returns : Float matrix_0,Float matrix_1,Float matrix_2,Float matrix_3, + Float matrix_4,Float matrix_5,Float matrix_6,Float matrix_7, + Float matrix_8 +*args : + +C prototype: int cbf_get_orientation_matrix (cbf_handle handle, + double ub_matrix[9]); + +CBFLib documentation: +DESCRIPTION +cbf_get_orientation_matrix sets ub_matrix to point to the array of +orientation matrix entries in the \"diffrn \" category in the order +of columns: + \"UB[1][1] \" \"UB[1][2] \" \"UB[1][3] \" \"UB[2][1] \" +\"UB[2][2] \" \"UB[2][3] \" \"UB[3][1] \" \"UB[3][2] \" +\"UB[3][3] \" +cbf_set_orientation_matrix sets the values in the \"diffrn \" +category to the values pointed to by ub_matrix. +ARGUMENTS +handle CBF handle. ub_matrix Source or destination array of 9 +doubles giving the orientation matrix parameters. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_orientation_matrix; + +%apply double *OUTPUT {double *m0,double *m1,double *m2, +double *m3,double *m4, double *m5,double *m6, +double *m7,double *m8 } get_orientation_matrix; + void get_orientation_matrix( double *m0,double *m1, +double *m2,double *m3,double *m4,double *m5,double *m6, +double *m7,double *m8){ + double m[9]; + cbf_failnez(cbf_get_orientation_matrix(self,m)); + *m0 = m[0]; *m1=m[1] ; *m2=m[2] ; + *m3 = m[3]; *m4=m[4] ; *m5=m[5] ; + *m6 = m[6]; *m7=m[7] ; *m8=m[8] ; + } +%feature("autodoc", " +Returns : size_t ndimfast,size_t ndimslow +*args : Integer element_number + +C prototype: int cbf_get_image_size_fs (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + size_t *ndimfast, size_t *ndimslow); + +CBFLib documentation: +DESCRIPTION +cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf +set *ndimslow and *ndimfast to the slow and fast dimensions of the +image array for element number element_number. If the array is +1-dimensional, *ndimslow will be set to the array size and *ndimfast +will be set to 1. If the array is 3-dimensional an error code will be +returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and +cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the +slowest, next fastest and fastest dimensions, respectively, of the 3D +image array for element number element_number. If the array is +1-dimensional, *ndimslow will be set to the array size and *ndimmid +and +")get_image_size_fs; + +%apply int *OUTPUT {int *ndimfast, int *ndimslow} get_image_size_fs; + void get_image_size_fs(unsigned int element_number, int *ndimfast, int *ndimslow){ + unsigned int reserved; + size_t infast, inslow; + reserved = 0; + cbf_failnez(cbf_get_image_size_fs(self,reserved,element_number,&infast,&inslow)); + *ndimfast = (int)infast; /* FIXME - is that how to convert? */ + *ndimslow = (int)inslow; + } +%feature("autodoc", " +Returns : Float div_x_source,Float div_y_source,Float div_x_y_source +*args : + +C prototype: int cbf_get_divergence (cbf_handle handle, double *div_x_source, + double *div_y_source, double *div_x_y_source); + +CBFLib documentation: +DESCRIPTION +cbf_get_divergence sets *div_x_source, *div_y_source and +*div_x_y_source to the corresponding source divergence parameters. +Any of the destination pointers may be NULL. +ARGUMENTS +handle CBF handle. div_x_source Pointer to the +destination div_x_source. div_y_source Pointer to the destination +div_y_source. div_x_y_source Pointer to the destination +div_x_y_source. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_divergence; + +%apply double *OUTPUT {double *div_x_source, double *div_y_source, + double *div_x_y_source } get_divergence; + void get_divergence(double *div_x_source, double *div_y_source, + double *div_x_y_source){ + cbf_failnez(cbf_get_divergence(self, + div_x_source, + div_y_source, + div_x_y_source)); + } + +/* cfunc cbf_rewind_category pyfunc rewind_category + arg cbf_handle handle */ + +%feature("autodoc", " +Returns : +*args : + +C prototype: int cbf_rewind_category (cbf_handle handle); + +CBFLib documentation: +DESCRIPTION +cbf_rewind_category makes the first category in the current data +block the current category. cbf_rewind_saveframe makes the first +saveframe in the current data block the current saveframe. +cbf_rewind_blockitem makes the first blockitem (category or +saveframe) in the current data block the current blockitem. The type +of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type. +If there are no categories, saveframes or blockitems the function +returns CBF_NOTFOUND. +The current column and row become undefined. +ARGUMENTS +handle CBF handle. type CBF handle. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")rewind_category; + void rewind_category(void){ + cbf_failnez(cbf_rewind_category(self));} +%feature("autodoc", " +Returns : +*args : String filename + +C prototype: int cbf_read_template (cbf_handle handle, FILE *file); + +CBFLib documentation: +DESCRIPTION +cbf_read_template reads the CBF or CIF file file into the CBF object +specified by handle and selects the first datablock as the current +datablock. +ARGUMENTS +handle Pointer to a CBF handle. file Pointer to a file +descriptor. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")read_template; + + void read_template(char* filename){ + /* CBFlib needs a stream that will remain open + hence DO NOT open from python */ + FILE *stream; + if ( ! ( stream = fopen (filename, "rb")) ){ + cbf_failnez(CBF_FILEOPEN); + } + else{ + cbf_failnez(cbf_read_template (self, stream)); } + } + + +/* cfunc cbf_select_row pyfunc select_row + arg cbf_handle handle arg unsigned int row */ + +%feature("autodoc", " +Returns : +*args : Integer + +C prototype: int cbf_select_row (cbf_handle handle, unsigned int row); + +CBFLib documentation: +DESCRIPTION +cbf_select_row selects row number row in the current category as the +current row. +The first row is number 0. +The current column is not affected +If the row does not exist, the function returns CBF_NOTFOUND. +ARGUMENTS +handle CBF handle. row Number of the row to select. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")select_row; + void select_row(unsigned int arg){ + cbf_failnez(cbf_select_row(self,arg));} +%feature("autodoc", " +Returns : (Binary)String +*args : int element_number,int elsize,int elsign,int ndimfast,int ndimslow + +C prototype: int cbf_get_image_fs (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, + int elsign, size_t ndimfast, size_t ndimslow); + +CBFLib documentation: +DESCRIPTION +cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image +array for element number element_number into an array. The array +consists of ndimslow×ndimfast elements of elsize bytes each, +starting at array. The elements are signed if elsign is non-0 and +unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and +cbf_get_real_image_sf read the image array of IEEE doubles or floats +for element number element_number into an array. A real array is +always signed. cbf_get_3d_image, cbf_get_3d_image_fs and +cbf_get_3d_image_sf read the 3D image array for element number +element_number into an array. The array consists of +ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting +at array. The elements are signed if elsign is non-0 and unsigned +otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, +cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or +floats for element number element_number into an array. A real array +is always signed. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +The structure of the array as a 1-, 2- or 3-dimensional array should +agree with the structure of the array given in the +ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, +ndimslow should be the array size and ndimfast and, for the 3D calls, +ndimmid, should be set to 1 both in the call and in the imgCIF data +being processed. If the array is 2-dimensional and a 3D call is used, +ndimslow and ndimmid should be the +")get_image_fs_as_string; + +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_image_fs_as_string; + +// Get the length correct + + void get_image_fs_as_string(int element_number, char **s, int *slen, + int elsize, int elsign, int ndimfast, int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + cbf_failnez (cbf_get_image_fs(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimfast, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } +%feature("autodoc", " +Returns : size_t ndimslow,size_t ndimfast +*args : Integer element_number + +C prototype: int cbf_get_image_size_sf (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + size_t *ndimslow, size_t *ndimfast); + +CBFLib documentation: +DESCRIPTION +cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf +set *ndimslow and *ndimfast to the slow and fast dimensions of the +image array for element number element_number. If the array is +1-dimensional, *ndimslow will be set to the array size and *ndimfast +will be set to 1. If the array is 3-dimensional an error code will be +returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and +cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the +slowest, next fastest and fastest dimensions, respectively, of the 3D +image array for element number element_number. If the array is +1-dimensional, *ndimslow will be set to the array size and *ndimmid +and +")get_image_size_sf; + +%apply int *OUTPUT {int *ndimslow, int *ndimfast} get_image_size_sf; + void get_image_size_sf(unsigned int element_number, int *ndimslow, int *ndimfast){ + unsigned int reserved; + size_t inslow, infast; + reserved = 0; + cbf_failnez(cbf_get_image_size(self,reserved,element_number,&inslow,&infast)); + *ndimslow = (int)inslow; + *ndimfast = (int)infast; + } +%feature("autodoc", " +Returns : (Binary)String +*args : int element_number,int elsize,int ndimfast,int ndimslow + +C prototype: int cbf_get_real_image_fs (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + void *array, size_t elsize, size_t ndimfast, + size_t ndimslow); + +CBFLib documentation: +DESCRIPTION +cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image +array for element number element_number into an array. The array +consists of ndimslow×ndimfast elements of elsize bytes each, +starting at array. The elements are signed if elsign is non-0 and +unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and +cbf_get_real_image_sf read the image array of IEEE doubles or floats +for element number element_number into an array. A real array is +always signed. cbf_get_3d_image, cbf_get_3d_image_fs and +cbf_get_3d_image_sf read the 3D image array for element number +element_number into an array. The array consists of +ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting +at array. The elements are signed if elsign is non-0 and unsigned +otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, +cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or +floats for element number element_number into an array. A real array +is always signed. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +The structure of the array as a 1-, 2- or 3-dimensional array should +agree with the structure of the array given in the +ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, +ndimslow should be the array size and ndimfast and, for the 3D calls, +ndimmid, should be set to 1 both in the call and in the imgCIF data +being processed. If the array is 2-dimensional and a 3D call is used, +ndimslow and ndimmid should be the +")get_real_image_fs_as_string; + +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_real_image_fs_as_string; + +// Get the length correct + + void get_real_image_fs_as_string(int element_number, char **s, int *slen, + int elsize, int ndimfast, int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + cbf_failnez (cbf_get_real_image_fs(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimfast, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } + +/* cfunc cbf_count_columns pyfunc count_columns + arg cbf_handle handle arg unsigned int *columns */ + +%feature("autodoc", " +Returns : Integer +*args : + +C prototype: int cbf_count_columns (cbf_handle handle, unsigned int *columns); + +CBFLib documentation: +DESCRIPTION +cbf_count_columns puts the number of columns in the current category +in *columns. +ARGUMENTS +handle CBF handle. columns Pointer to the destination column +count. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")count_columns; + unsigned int count_columns(void){ + unsigned int result; + cbf_failnez(cbf_count_columns(self,&result)); + return result;} +%feature("autodoc", " +Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, + int elements,int minelement,int maxelement,char **bo,int *bolen, + int dimfast,int dimmid,int dimslow,int padding +*args : + +C prototype: int cbf_get_integerarrayparameters_wdims (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + int *elsigned, int *elunsigned, size_t *elements, + int *minelement, int *maxelement, const char **byteorder, + size_t *dimfast, size_t *dimmid, size_t *dimslow, + size_t *padding); + +CBFLib documentation: +DESCRIPTION +cbf_get_integerarrayparameters sets *compression, *binary_id, +*elsize, *elsigned, *elunsigned, *elements, *minelement and +*maxelement to values read from the binary value of the item at the +current column and row. This provides all the arguments needed for a +subsequent call to cbf_set_integerarray, if a copy of the array is to +be made into another CIF or CBF. cbf_get_realarrayparameters sets +*compression, *binary_id, *elsize, *elements to values read from the +binary value of the item at the current column and row. This provides +all the arguments needed for a subsequent call to cbf_set_realarray, +if a copy of the arry is to be made into another CIF or CBF. +The variants cbf_get_integerarrayparameters_wdims, +cbf_get_integerarrayparameters_wdims_fs, +cbf_get_integerarrayparameters_wdims_sf, +cbf_get_realarrayparameters_wdims, +cbf_get_realarrayparameters_wdims_fs, +cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, +*dimmid, *dimslow, and *padding as well, providing the additional +parameters needed for a subsequent call to cbf_set_integerarray_wdims +or cbf_set_realarray_wdims. +The value returned in *byteorder is a pointer either to the string +\"little_endian \" or to the string \"big_endian \". This should be +the byte order of the data, not necessarily of the host machine. No +attempt should be made to modify this string. At this time only +\"little_endian \" will be returned. +The values returned in *dimfast, *dimmid and *dimslow are the sizes +of the fastest changing, second fastest changing and third fastest +changing dimensions of the array, if specified, or zero, if not +specified. +The value returned in *padding is the size of the post-data padding, +if any and if specified in the data header. The value is given as a +count of octets. +If the value is not binary, the function returns CBF_ASCII. +ARGUMENTS +handle CBF handle. compression Compression method used. +elsize Size in bytes of each array element. binary_id +Pointer to the destination integer binary identifier. elsigned +Pointer to an integer. Set to 1 if the elements can be read as signed +integers. elunsigned Pointer to an integer. Set to 1 if the +elements can be read as unsigned integers. elements Pointer to +the destination number of elements. minelement Pointer to the +destination smallest element. maxelement Pointer to the +destination largest element. byteorder Pointer to the destination +byte order. dimfast Pointer to the destination fastest +dimension. dimmid Pointer to the destination second fastest +dimension. dimslow Pointer to the destination third fastest +dimension. padding Pointer to the destination padding size. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")get_integerarrayparameters_wdims; + +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement, + int *dimfast, int *dimmid, int *dimslow, int *padding} + get_integerarrayparameters_wdims; + + void get_integerarrayparameters_wdims(int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement, + char **bo, int *bolen, + int *dimfast, int *dimmid, int *dimslow, int *padding + ){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + cbf_failnez(cbf_get_integerarrayparameters_wdims(self, + &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, + minelement, maxelement, &byteorder,&df,&dm,&ds,&pd )); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +%feature("autodoc", " +Returns : Float gain,Float gain_esd +*args : + +C prototype: int cbf_get_gain (cbf_handle handle, unsigned int element_number, + double *gain, double *gain_esd); + +CBFLib documentation: +DESCRIPTION +cbf_get_gain sets *gain and *gain_esd to the corresponding gain +parameters for element number element_number. +Either of the destination pointers may be NULL. +ARGUMENTS +handle CBF handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. gain Pointer to the +destination gain. gain_esd Pointer to the destination +gain_esd. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_gain; + +%apply double *OUTPUT {double *gain, double *gain_esd} get_gain; + void get_gain (unsigned int element_number, double *gain, + double *gain_esd){ + cbf_failnez(cbf_get_gain (self, element_number, gain, gain_esd)); + } + +/* cfunc cbf_new_saveframe pyfunc new_saveframe + arg cbf_handle handle arg const char *saveframename */ + +%feature("autodoc", " +Returns : string +*args : + +C prototype: int cbf_new_saveframe (cbf_handle handle, + const char *saveframename); + +CBFLib documentation: +DESCRIPTION +cbf_new_datablock creates a new data block with name datablockname +and makes it the current data block. cbf_new_saveframe creates a new +save frame with name saveframename within the current data block and +makes the new save frame the current save frame. +If a data block or save frame with this name already exists, the +existing data block or save frame becomes the current data block or +save frame. +ARGUMENTS +handle CBF handle. datablockname The name of the new data +block. saveframename The name of the new save frame. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")new_saveframe; + void new_saveframe(const char* arg){ + cbf_failnez(cbf_new_saveframe(self,arg));} +%feature("autodoc", " +Returns : +*args : Float polarizn_source_ratio,Float polarizn_source_norm + +C prototype: int cbf_set_polarization (cbf_handle handle, + double polarizn_source_ratio, + double polarizn_source_norm); + +CBFLib documentation: +DESCRIPTION +cbf_set_polarization sets the source polarization to the values +specified by polarizn_source_ratio and polarizn_source_norm. +ARGUMENTS +handle CBF handle. polarizn_source_ratio New value +of polarizn_source_ratio. polarizn_source_norm New value of +polarizn_source_norm. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_polarization; + + void set_polarization (double polarizn_source_ratio, + double polarizn_source_norm){ + cbf_failnez(cbf_set_polarization(self, + polarizn_source_ratio, + polarizn_source_norm)); + } +%feature("autodoc", " +Returns : +*args : int element_number,int compression,(binary) String data,int elsize, + int dimslow,int dimmid,int dimfast + +C prototype: int cbf_set_real_3d_image (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + unsigned int compression, void *array,size_t elsize, + size_t ndimslow, size_t ndimmid, size_t ndimfast); + +CBFLib documentation: +DESCRIPTION +cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image +array for element number element_number. The array consists of +ndimfast×ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-zero and unsigned otherwise. +cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf +write the image array for element number element_number. The array +consists of ndimfast×ndimslow IEEE double or float elements of +elsize bytes each, starting at array. cbf_set_3d_image, +cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array +for element number element_number. The array consists of +ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting +at array. The elements are signed if elsign is non-0 and unsigned +otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and +cbf_set_real_3d_image_sf writes the 3D image array for element number +element_number. The array consists of ndimfast×ndimmid×ndimslow +IEEE double or float elements of elsize bytes each, starting at +array. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +If the array is 1-dimensional, ndimslow should be the array size and +ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the +array is 2-dimensional and the 3D calls are used, ndimslow and +ndimmid should be used for the array dimensions and ndimfast should +be set to 1. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET +Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for +cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof +(int), sizeof(double) or sizeof(float), the function returns +CBF_ARGUMENT. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any value other +than 0 is invalid. element_number The number of the detector +element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. compression Compression type. +array Pointer to the image array. elsize Size in +bytes of each image array element. elsigned Set to non-0 if +the image array elements are signed. ndimslow Slowest array +dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_real_3d_image; + + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_3d_image_sf; + + void set_real_3d_image(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int ndimslow, int ndimmid, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_real_3d_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } + +/* cfunc cbf_delete_row pyfunc delete_row + arg cbf_handle handle arg unsigned int rownumber */ + +%feature("autodoc", " +Returns : +*args : Integer + +C prototype: int cbf_delete_row (cbf_handle handle, unsigned int rownumber); + +CBFLib documentation: +DESCRIPTION +cbf_delete_row deletes a row from the current category. Rows starting +from rownumber +1 are moved down by 1. If the current row was higher +than rownumber, or if the current row is the last row, it will also +move down by 1. +The row numbers start from 0. +ARGUMENTS +handle CBF handle. rownumber The number of the row to delete. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")delete_row; + void delete_row(unsigned int arg){ + cbf_failnez(cbf_delete_row(self,arg));} + +/* cfunc cbf_column_name pyfunc column_name + arg cbf_handle handle arg const char **columnname */ + +%feature("autodoc", " +Returns : +*args : string + +C prototype: int cbf_column_name (cbf_handle handle, const char **columnname); + +CBFLib documentation: +DESCRIPTION +cbf_column_name sets *columnname to point to the name of the current +column of the current category. +The column name will be valid as long as the column exists. +The name must not be modified by the program in any way. +cbf_set_column_name sets the name of the current column to +newcolumnname +ARGUMENTS +handle CBF handle. columnname Pointer to the +destination column name pointer. newcolumnname New column name +pointer. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")column_name; + const char* column_name(void){ + const char* result; + cbf_failnez(cbf_column_name(self, &result)); + return result;} + +/* cfunc cbf_remove_saveframe pyfunc remove_saveframe + arg cbf_handle handle */ + +%feature("autodoc", " +Returns : +*args : + +C prototype: int cbf_remove_saveframe (cbf_handle handle); + +CBFLib documentation: +DESCRIPTION +cbf_remove_datablock deletes the current data block. +cbf_remove_saveframe deletes the current save frame. +The current data block becomes undefined. +ARGUMENTS +handle CBF handle. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")remove_saveframe; + void remove_saveframe(void){ + cbf_failnez(cbf_remove_saveframe(self));} +%feature("autodoc", " +Returns : +*args : int compression,int binary_id,(binary) String data,int elsize, + int elsigned,int elements,String byteorder,int dimslow,int dimmid, + int dimfast,int padding + +C prototype: int cbf_set_integerarray_wdims_sf (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, int elsigned, size_t elements, + const char *byteorder, size_t dimslow, size_t dimmid, + size_t dimfast, size_t padding); + +CBFLib documentation: +DESCRIPTION +cbf_set_integerarray sets the binary value of the item at the current +column and row to an integer array. The array consists of elements +elements of elsize bytes each, starting at array. The elements are +signed if elsigned is non-0 and unsigned otherwise. binary_id is the +binary section identifier. cbf_set_realarray sets the binary value of +the item at the current column and row to an integer array. The array +consists of elements elements of elsize bytes each, starting at +array. binary_id is the binary section identifier. +The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, +cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, +cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants +allow the data header values of byteorder, dimfast, dimmid, dimslow +and padding to be set to the data byte order, the fastest, second +fastest and third fastest array dimensions and the size in byte of +the post data padding to be used. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +NOTE: This scheme is by far the slowest of the four and uses much +more disk space. It is intended for routine use with small arrays +only. With large arrays (like images) it should be used only for +debugging. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or +floats for cbf_set_realarray. If elsize is not equal to sizeof +(char), sizeof (short) or sizeof (int), the function returns +CBF_ARGUMENT. +ARGUMENTS +handle CBF handle. compression Compression method to use. +binary_id Integer binary identifier. array Pointer to the +source array. elsize Size in bytes of each source array +element. elsigned Set to non-0 if the source array elements are +signed. elements The number of elements in the array +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")set_integerarray_wdims_sf; + + /* CBFlib must NOT modify the data string nor the byteorder string + which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray_wdims_sf; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_integerarray_wdims_sf; + + void set_integerarray_wdims_sf(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elsigned, int elements, + char *bo, int bolen, int dimslow, int dimmid, int dimfast, int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + cbf_failnez(cbf_set_integerarray_wdims_sf (self, compression, binary_id, + (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder, + (size_t)dimslow, (size_t)dimmid, (size_t)dimfast, (size_t)padding)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +%feature("autodoc", " +Returns : String Value +*args : String defaultvalue + +C prototype: int cbf_require_value (cbf_handle handle, const char **value, + const char *defaultvalue ); + +CBFLib documentation: +DESCRIPTION +cbf_get_value sets *value to point to the ASCII value of the item at +the current column and row. cbf_require_value sets *value to point to +the ASCII value of the item at the current column and row, creating +the data item if necessary and initializing it to a copy of +defaultvalue. +If the value is not ASCII, the function returns CBF_BINARY. +The value will be valid as long as the item exists and has not been +set to a new value. +The value must not be modified by the program in any way. +ARGUMENTS +handle CBF handle. value Pointer to the destination +value pointer. defaultvalue Default value character string. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")require_value; + + + const char* require_value(const char* defaultvalue){ + const char * result; + cbf_failnez(cbf_require_value(self, &result, defaultvalue)); + return result; + } +%feature("autodoc", " +Returns : Int Value +*args : String Columnvalue,Int default + +C prototype: int cbf_require_column_integervalue (cbf_handle handle, + const char *columnname, int *number, + const int defaultvalue); + +CBFLib documentation: +DESCRIPTION +cbf_require_column_doublevalue sets *number to the value of the ASCII +item at the current row for the column given with the name given by +*columnname, with the value interpreted as an integer number, or to +the number given by defaultvalue if the item cannot be found. +ARGUMENTS +handle CBF handle. columnname Name of the column +containing the number. number pointer to the location to +receive the integer value. defaultvalue Value to use if the +requested column and value cannot be found. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")require_column_integervalue; + +%apply int *OUTPUT {int *number} require_column_integervalue; +void require_column_integervalue(const char *columnname, + int *number, const int defaultvalue){ + cbf_failnez(cbf_require_column_integervalue(self, + columnname, number,defaultvalue)); + } +%feature("autodoc", " +Returns : +*args : Int element_number,Int axis_number,Float pixel size + +C prototype: int cbf_set_pixel_size (cbf_handle handle, + unsigned int element_number, int axis_number, + double psize); + +CBFLib documentation: +DESCRIPTION +cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the +\"size \" column of the \"array_structure_list \" category at the +row which matches axis axis_number of the detector element +element_number converting the double pixel size psize from meters to +millimeters in storing it in the \"size \" column for the axis +axis_number of the detector element element_number. The axis_number +is numbered from 1, starting with the slowest axis. +cbf_set_pixel_size_fs sets the item in the \"size \" column of the +\"array_structure_list \" category at the row which matches axis +axis_number of the detector element element_number converting the +double pixel size psize from meters to millimeters in storing it in +the \"size \" column for the axis axis_number of the detector +element element_number. The axis_number is numbered from 1, starting +with the fastest axis. +If a negative axis number is given, the order of axes is reversed, so +that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the +fastest axis for cbf_get_pixel_size_sf. +If the \"array_structure_list \" category does not already exist, it +is created. +If the appropriate row in the \"array_structure_list \" catgeory +does not already exist, it is created. +If the pixel size is not given explcitly in the \"array_element_size +category \", the function returns CBF_NOTFOUND. +ARGUMENTS +handle CBF handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. axis_number The number of the +axis, fastest first, starting from 1. +")set_pixel_size; + + void set_pixel_size (unsigned int element_number, + unsigned int axis_number, double psize){ + cbf_failnez(cbf_set_pixel_size(self, + element_number, + axis_number, + psize)); + } + +/* cfunc cbf_next_column pyfunc next_column + arg cbf_handle handle */ + +%feature("autodoc", " +Returns : +*args : + +C prototype: int cbf_next_column (cbf_handle handle); + +CBFLib documentation: +DESCRIPTION +cbf_next_column makes the column following the current column in the +current category the current column. +If there are no more columns, the function returns CBF_NOTFOUND. +The current row is not affected. +ARGUMENTS +handle CBF handle. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")next_column; + void next_column(void){ + cbf_failnez(cbf_next_column(self));} +%feature("autodoc", " +Returns : size_t ndimslow,size_t ndimmid,size_t ndimfast +*args : Integer element_number + +C prototype: int cbf_get_3d_image_size_sf (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + size_t *ndimslow, size_t *ndimmid, size_t *ndimfast); + +CBFLib documentation: +DESCRIPTION +cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf +set *ndimslow and *ndimfast to the slow and fast dimensions of the +image array for element number element_number. If the array is +1-dimensional, *ndimslow will be set to the array size and *ndimfast +will be set to 1. If the array is 3-dimensional an error code will be +returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and +cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the +slowest, next fastest and fastest dimensions, respectively, of the 3D +image array for element number element_number. If the array is +1-dimensional, *ndimslow will be set to the array size and *ndimmid +and +")get_3d_image_size_sf; + +%apply int *OUTPUT {int *ndimslow, int *ndimmid, int *ndimfast} get_3d_image_size_sf; + void get_3d_image_size_sf(unsigned int element_number, int *ndimslow, int *ndimmid, int *ndimfast){ + unsigned int reserved; + size_t inslow, inmid, infast; + reserved = 0; + cbf_failnez(cbf_get_3d_image_size_sf(self,reserved,element_number,&inslow,&inmid,&infast)); + *ndimslow = (int)inslow; /* FIXME - is that how to convert? */ + *ndimmid = (int)inmid; + *ndimfast = (int)infast; + } +%feature("autodoc", " +Returns : int compression,int binary_id,int elsize,int elements,char **bo, + int *bolen,int dimfast,int dimmid,int dimslow,int padding +*args : + +C prototype: int cbf_get_realarrayparameters_wdims_fs (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + size_t *elements, const char **byteorder, size_t *dimfast, + size_t *dimmid, size_t *dimslow, size_t *padding); + +CBFLib documentation: +DESCRIPTION +cbf_get_integerarrayparameters sets *compression, *binary_id, +*elsize, *elsigned, *elunsigned, *elements, *minelement and +*maxelement to values read from the binary value of the item at the +current column and row. This provides all the arguments needed for a +subsequent call to cbf_set_integerarray, if a copy of the array is to +be made into another CIF or CBF. cbf_get_realarrayparameters sets +*compression, *binary_id, *elsize, *elements to values read from the +binary value of the item at the current column and row. This provides +all the arguments needed for a subsequent call to cbf_set_realarray, +if a copy of the arry is to be made into another CIF or CBF. +The variants cbf_get_integerarrayparameters_wdims, +cbf_get_integerarrayparameters_wdims_fs, +cbf_get_integerarrayparameters_wdims_sf, +cbf_get_realarrayparameters_wdims, +cbf_get_realarrayparameters_wdims_fs, +cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, +*dimmid, *dimslow, and *padding as well, providing the additional +parameters needed for a subsequent call to cbf_set_integerarray_wdims +or cbf_set_realarray_wdims. +The value returned in *byteorder is a pointer either to the string +\"little_endian \" or to the string \"big_endian \". This should be +the byte order of the data, not necessarily of the host machine. No +attempt should be made to modify this string. At this time only +\"little_endian \" will be returned. +The values returned in *dimfast, *dimmid and *dimslow are the sizes +of the fastest changing, second fastest changing and third fastest +changing dimensions of the array, if specified, or zero, if not +specified. +The value returned in *padding is the size of the post-data padding, +if any and if specified in the data header. The value is given as a +count of octets. +If the value is not binary, the function returns CBF_ASCII. +ARGUMENTS +handle CBF handle. compression Compression method used. +elsize Size in bytes of each array element. binary_id +Pointer to the destination integer binary identifier. elsigned +Pointer to an integer. Set to 1 if the elements can be read as signed +integers. elunsigned Pointer to an integer. Set to 1 if the +elements can be read as unsigned integers. elements Pointer to +the destination number of elements. minelement Pointer to the +destination smallest element. maxelement Pointer to the +destination largest element. byteorder Pointer to the destination +byte order. dimfast Pointer to the destination fastest +dimension. dimmid Pointer to the destination second fastest +dimension. dimslow Pointer to the destination third fastest +dimension. padding Pointer to the destination padding size. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")get_realarrayparameters_wdims_fs; + +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, + int *elements, + int *dimslow, int *dimmid, int *dimfast, int *padding} + get_realarrayparameters_wdims_fs; + + void get_realarrayparameters_wdims_fs(int *compression,int *binary_id, + int *elsize, + int *elements, + char **bo, int *bolen, + int *dimfast, int *dimmid, int *dimslow, int *padding + ){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + cbf_failnez(cbf_get_realarrayparameters_wdims_fs(self, + &comp,binary_id, &elsiz, &elem, + &byteorder,&df,&dm,&ds,&pd )); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +%feature("autodoc", " +Returns : (Binary)String +*args : + +C prototype: int cbf_get_realarray (cbf_handle handle, int *binary_id, + void *array, size_t elsize, size_t elements, + size_t *elements_read); + +CBFLib documentation: +DESCRIPTION +cbf_get_integerarray reads the binary value of the item at the +current column and row into an integer array. The array consists of +elements elements of elsize bytes each, starting at array. The +elements are signed if elsigned is non-0 and unsigned otherwise. +*binary_id is set to the binary section identifier and *elements_read +to the number of elements actually read. cbf_get_realarray reads the +binary value of the item at the current column and row into a real +array. The array consists of elements elements of elsize bytes each, +starting at array. *binary_id is set to the binary section identifier +and *elements_read to the number of elements actually read. +If any element in the integer binary data cant fit into the +destination element, the destination is set the nearest possible +value. +If the value is not binary, the function returns CBF_ASCII. +If the requested number of elements cant be read, the function will +read as many as it can and then return CBF_ENDOFDATA. +Currently, the destination array must consist of chars, shorts or +ints (signed or unsigned). If elsize is not equal to sizeof (char), +sizeof (short) or sizeof (int), for cbf_get_integerarray, or +sizeof(double) or sizeof(float), for cbf_get_realarray the function +returns CBF_ARGUMENT. +An additional restriction in the current version of CBFlib is that +values too large to fit in an int are not correctly decompressed. As +an example, if the machine with 32-bit ints is reading an array +containing a value outside the range 0 .. 2^^32-1 (unsigned) or +-2^^31 .. 2^^31-1 (signed), the array will not be correctly +decompressed. This restriction will be removed in a future release. +For cbf_get_realarray, only IEEE format is supported. No conversion +to other floating point formats is done at this time. +ARGUMENTS +handle CBF handle. binary_id Pointer to the +destination integer binary identifier. array Pointer to the +destination array. elsize Size in bytes of each destination +array element. elsigned Set to non-0 if the destination array +elements are signed. elements The number of elements to read. +elements_read Pointer to the destination number of elements +actually read. +RETURN VALUE +Returns an error code on failure or 0 for success. SEE ALSO +")get_realarray_as_string; + +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_realarray_as_string; + +// Get the length correct + + void get_realarray_as_string(char **s, int *slen){ + int binary_id; + size_t elements, elements_read, elsize; + unsigned int compression; + void * array; + *slen = 0; /* Initialise in case of problems */ + cbf_failnez(cbf_get_realarrayparameters(self, &compression, + &binary_id, &elsize, + &elements)); + + if ((array=malloc(elsize*elements))) { + /* cbf_failnez (cbf_select_column(cbf,colnum)) */ + cbf_failnez (cbf_get_realarray(self, &binary_id, + (void *)array, elsize, + elements, &elements_read)); + + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*elements; + *s = (char *) array; + } +%feature("autodoc", " +Returns : Float slowbinsize,Float fastbinsize +*args : Integer element_number + +C prototype: int cbf_get_bin_sizes(cbf_handle handle, + unsigned int element_number, double * slowbinsize, + double * fastbinsize); + +CBFLib documentation: +DESCRIPTION +cbf_get_bin_sizes sets slowbinsize to point to the value of the +number of pixels composing one array element in the dimension that +changes at the second-fastest rate and fastbinsize to point to the +value of the number of pixels composing one array element in the +dimension that changes at the fastest rate for the dectector element +with the ordinal element_number. cbf_set_bin_sizes sets the the pixel +bin sizes in the \"array_intensities \" category to the values of +slowbinsize_in for the number of pixels composing one array element +in the dimension that changes at the second-fastest rate and +fastbinsize_in for the number of pixels composing one array element +in the dimension that changes at the fastest rate for the dectector +element with the ordinal element_number. +In order to allow for software binning involving fractions of pixels, +the bin sizes are doubles rather than ints. +ARGUMENTS +handle CBF handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. slowbinsize Pointer to the +returned number of pixels composing one array element in the +dimension that changes at the second-fastest rate. fastbinsize +Pointer to the returned number of pixels composing one array element +in the dimension that changes at the fastest rate. slowbinsize_in +The number of pixels composing one array element in the dimension +that changes at the second-fastest rate. fastbinsize_in The number +of pixels composing one array element in the dimension that changes +at the fastest rate. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_bin_sizes; + +%apply double *OUTPUT {double *slowbinsize,double *fastbinsize}; + void get_bin_sizes(int element_number, double *slowbinsize, double *fastbinsize) { + cbf_failnez(cbf_get_bin_sizes (self, (unsigned int)element_number, slowbinsize, fastbinsize)); + } + +/* cfunc cbf_reset_category pyfunc reset_category + arg cbf_handle handle */ + +%feature("autodoc", " +Returns : +*args : + +C prototype: int cbf_reset_category (cbf_handle handle); + +CBFLib documentation: +DESCRIPTION +cbf_reset_category deletes all columns and rows from current category. +ARGUMENTS +handle CBF handle. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")reset_category; + void reset_category(void){ + cbf_failnez(cbf_reset_category(self));} +%feature("autodoc", " +Returns : Integer +*args : String axis_id + +C prototype: int cbf_count_axis_ancestors (cbf_handle handle, + const char *axis_id, unsigned int *ancestors); + +CBFLib documentation: +DESCRIPTION +cbf_count_axis_ancestors sets ancestors to the number of ancestors of +axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor +axis of index ancestor_index of axis axis_id, starting with axis_id +for ancestor_index 0. +cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of +axis_id or to \". \" if there is no such ancestor. +cbf_get_axis_equipment sets *equipment to the equipment of axis_id or +to \". \" if there is no such equipment. +cbf_get_axis_equipment_component sets *equipment_component to the +equipment_component of axis_id or to \". \" if there is no such +equipment_component. +cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the +components of the ofset of axis_id. +cbf_get_axis_rotation sets rotation to the rotation of axis_id or to +0 if there is no such rotation. cbf_get_axis_rotation_axis sets +*rotation_axis to the rotation_axis of axis_id or to \". \" if there +is no such rotation_axis. +cbf_get_axis_setting sets *start and *increment to the corresponding +values of the axis axis_id. Any of the destination pointers may be +NULL. +cbf_get_axis_type sets axis_type to the type of axis_id. +cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the +components of the vector of axis_id. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any +value other than 0 is invalid. axis_id Axis id. +ancestor_index Integer index of the desired ancestor, starting +with 0 for the current axis_id. ancestor Pointer to +destination ancestor name pointer. depends_on Pointer to +destination depends_on name pointer. equipment Pointer to +destination equipment name pointer. equipment_component Pointer to +destination equipment_component name pointer. offset1 +Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. +rotation Pointer to destination rotation value. +rotation_axis Pointer to destination rotation_axisn name +pointer. start Pointer to the destination start +value. increment Pointer to the destination increment +value. type Pointer to destination axis type of type +. vector1 Pointer to destination first vector component +value. vector2 Pointer to destination second vector +component value. vector3 Pointer to destination third +vector component value. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")count_axis_ancestors; + +%apply int *OUTPUT {int *ancestors} count_axis_ancestors; + void count_axis_ancestors(const char *axis_id, + int *ancestors){ + unsigned int anc; + cbf_failnez(cbf_count_axis_ancestors(self,axis_id,&anc)); + *ancestors = anc; + } +%feature("autodoc", " +Returns : pycbf goniometer object +*args : + +C prototype: int cbf_construct_goniometer (cbf_handle handle, + cbf_goniometer *goniometer); + +CBFLib documentation: +DESCRIPTION +cbf_construct_goniometer constructs a goniometer object using the +description in the CBF object handle and initialises the goniometer +handle *goniometer. +ARGUMENTS +handle CBF handle. goniometer Pointer to the destination +goniometer handle. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")construct_goniometer; + + cbf_goniometer construct_goniometer(){ + cbf_goniometer goniometer; + cbf_failnez(cbf_construct_goniometer(self,&goniometer)); + return goniometer; + } + +/* cfunc cbf_set_datablockname pyfunc set_datablockname + arg cbf_handle handle arg const char *datablockname */ + +%feature("autodoc", " +Returns : string +*args : + +C prototype: int cbf_set_datablockname (cbf_handle handle, + const char *datablockname); + +CBFLib documentation: +DESCRIPTION +cbf_set_datablockname changes the name of the current data block to +datablockname. cbf_set_saveframename changes the name of the current +save frame to saveframename. +If a data block or save frame with this name already exists +(comparison is case-insensitive), the function returns CBF_IDENTICAL. +ARGUMENTS +handle CBF handle. datablockname The new data block name. +saveframename The new save frame name. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")set_datablockname; + void set_datablockname(const char* arg){ + cbf_failnez(cbf_set_datablockname(self,arg));} + +/* cfunc cbf_get_element_number pyfunc get_element_number + arg cbf_handle handle arg const char *element_id arg const char *array_id arg const char *array_section_id arg unsigned int *element_number */ + + void get_element_number(void){ + cbf_failnez(CBF_NOTIMPLEMENTED);} + +/* cfunc cbf_set_crystal_id pyfunc set_crystal_id + arg cbf_handle handle arg const char *crystal_id */ + +%feature("autodoc", " +Returns : string +*args : + +C prototype: int cbf_set_crystal_id (cbf_handle handle, + const char *crystal_id); + +CBFLib documentation: +DESCRIPTION +cbf_set_crystal_id sets the \"diffrn.crystal_id \" entry to the +ASCII value crystal_id. +ARGUMENTS +handle CBF handle. crystal_id ASCII value. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_crystal_id; + void set_crystal_id(const char* arg){ + cbf_failnez(cbf_set_crystal_id(self,arg));} +%feature("autodoc", " +Returns : (Binary)String +*args : + +C prototype: int cbf_get_integerarray (cbf_handle handle, int *binary_id, + void *array, size_t elsize, int elsigned, size_t elements, + size_t *elements_read); + +CBFLib documentation: +DESCRIPTION +cbf_get_integerarray reads the binary value of the item at the +current column and row into an integer array. The array consists of +elements elements of elsize bytes each, starting at array. The +elements are signed if elsigned is non-0 and unsigned otherwise. +*binary_id is set to the binary section identifier and *elements_read +to the number of elements actually read. cbf_get_realarray reads the +binary value of the item at the current column and row into a real +array. The array consists of elements elements of elsize bytes each, +starting at array. *binary_id is set to the binary section identifier +and *elements_read to the number of elements actually read. +If any element in the integer binary data cant fit into the +destination element, the destination is set the nearest possible +value. +If the value is not binary, the function returns CBF_ASCII. +If the requested number of elements cant be read, the function will +read as many as it can and then return CBF_ENDOFDATA. +Currently, the destination array must consist of chars, shorts or +ints (signed or unsigned). If elsize is not equal to sizeof (char), +sizeof (short) or sizeof (int), for cbf_get_integerarray, or +sizeof(double) or sizeof(float), for cbf_get_realarray the function +returns CBF_ARGUMENT. +An additional restriction in the current version of CBFlib is that +values too large to fit in an int are not correctly decompressed. As +an example, if the machine with 32-bit ints is reading an array +containing a value outside the range 0 .. 2^^32-1 (unsigned) or +-2^^31 .. 2^^31-1 (signed), the array will not be correctly +decompressed. This restriction will be removed in a future release. +For cbf_get_realarray, only IEEE format is supported. No conversion +to other floating point formats is done at this time. +ARGUMENTS +handle CBF handle. binary_id Pointer to the +destination integer binary identifier. array Pointer to the +destination array. elsize Size in bytes of each destination +array element. elsigned Set to non-0 if the destination array +elements are signed. elements The number of elements to read. +elements_read Pointer to the destination number of elements +actually read. +RETURN VALUE +Returns an error code on failure or 0 for success. SEE ALSO +")get_integerarray_as_string; + +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_integerarray_as_string; + +// Get the length correct + + void get_integerarray_as_string(char **s, int *slen){ + int binary_id, elsigned, elunsigned; + size_t elements, elements_read, elsize; + int minelement, maxelement; + unsigned int compression; + void * array; + *slen = 0; /* Initialise in case of problems */ + cbf_failnez(cbf_get_integerarrayparameters(self, &compression, + &binary_id, &elsize, &elsigned, &elunsigned, + &elements, &minelement, &maxelement)); + + if ((array=malloc(elsize*elements))) { + /* cbf_failnez (cbf_select_column(cbf,colnum)) */ + cbf_failnez (cbf_get_integerarray(self, &binary_id, + (void *)array, elsize, elsigned, + elements, &elements_read)); + + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*elements; + *s = (char *) array; + } +%feature("autodoc", " +Returns : +*args : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimslow,int dimmid,int dimfast + +C prototype: int cbf_set_3d_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array, size_t elsize, int elsign, size_t ndimslow, + size_t ndimmid, size_t ndimfast); + +CBFLib documentation: +DESCRIPTION +cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image +array for element number element_number. The array consists of +ndimfast×ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-zero and unsigned otherwise. +cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf +write the image array for element number element_number. The array +consists of ndimfast×ndimslow IEEE double or float elements of +elsize bytes each, starting at array. cbf_set_3d_image, +cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array +for element number element_number. The array consists of +ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting +at array. The elements are signed if elsign is non-0 and unsigned +otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and +cbf_set_real_3d_image_sf writes the 3D image array for element number +element_number. The array consists of ndimfast×ndimmid×ndimslow +IEEE double or float elements of elsize bytes each, starting at +array. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +If the array is 1-dimensional, ndimslow should be the array size and +ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the +array is 2-dimensional and the 3D calls are used, ndimslow and +ndimmid should be used for the array dimensions and ndimfast should +be set to 1. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET +Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for +cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof +(int), sizeof(double) or sizeof(float), the function returns +CBF_ARGUMENT. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any value other +than 0 is invalid. element_number The number of the detector +element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. compression Compression type. +array Pointer to the image array. elsize Size in +bytes of each image array element. elsigned Set to non-0 if +the image array elements are signed. ndimslow Slowest array +dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_3d_image; + + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_3d_image; + + void set_3d_image(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int elsign, int ndimslow, int ndimmid, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_3d_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t) ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +%feature("autodoc", " +Returns : +*args : CBFHandle dictionary + +C prototype: int cbf_set_dictionary (cbf_handle handle, + cbf_handle dictionary_in); + +CBFLib documentation: +DESCRIPTION +cbf_get_dictionary sets *dictionary to the handle of a CBF which has +been associated with the CBF handle by cbf_set_dictionary. +cbf_set_dictionary associates the CBF handle dictionary_in with +handle as its dictionary. cbf_require_dictionary sets *dictionary to +the handle of a CBF which has been associated with the CBF handle by +cbf_set_dictionary or creates a new empty CBF and associates it with +handle, returning the new handle in *dictionary. +ARGUMENTS +handle CBF handle. dictionary Pointer to CBF handle of +dictionary. dictionary_in CBF handle of dcitionary. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_dictionary; + +void set_dictionary(cbf_handle other){ + cbf_failnez(cbf_set_dictionary(self,other)); +} +%feature("autodoc", " +Returns : String categoryname +*args : String tagname + +C prototype: int cbf_find_tag_category (cbf_handle handle, + const char* tagname, const char** categoryname); + +CBFLib documentation: +DESCRIPTION +cbf_find_tag_category sets categoryname to the category associated +with tagname in the dictionary associated with handle. +cbf_set_tag_category upddates the dictionary associated with handle +to indicated that tagname is in category categoryname_in. +ARGUMENTS +handle CBF handle. tagname tag name. +categoryname pointer to a returned category name. +categoryname_in input category name. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")find_tag_category; + + + const char * find_tag_category(const char *tagname){ + const char * result; + cbf_failnez(cbf_find_tag_category(self,tagname, &result)); + return result; + } +%feature("autodoc", " +Returns : (Binary)String +*args : int element_number,int elsize,int ndimslow,int ndimmid,int ndimfast + +C prototype: int cbf_get_real_3d_image_sf (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + void *array, size_t elsize, size_t ndimslow, + size_t ndimmid, size_t ndimfast); + +CBFLib documentation: +DESCRIPTION +cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image +array for element number element_number into an array. The array +consists of ndimslow×ndimfast elements of elsize bytes each, +starting at array. The elements are signed if elsign is non-0 and +unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and +cbf_get_real_image_sf read the image array of IEEE doubles or floats +for element number element_number into an array. A real array is +always signed. cbf_get_3d_image, cbf_get_3d_image_fs and +cbf_get_3d_image_sf read the 3D image array for element number +element_number into an array. The array consists of +ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting +at array. The elements are signed if elsign is non-0 and unsigned +otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, +cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or +floats for element number element_number into an array. A real array +is always signed. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +The structure of the array as a 1-, 2- or 3-dimensional array should +agree with the structure of the array given in the +ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, +ndimslow should be the array size and ndimfast and, for the 3D calls, +ndimmid, should be set to 1 both in the call and in the imgCIF data +being processed. If the array is 2-dimensional and a 3D call is used, +ndimslow and ndimmid should be the +")get_real_3d_image_sf_as_string; + +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_real_3d_image_sf_as_string; + +// Get the length correct + + void get_real_3d_image_sf_as_string(int element_number, char **s, int *slen, + int elsize, int ndimslow, int ndimmid, int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + cbf_failnez (cbf_get_real_3d_image_sf(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } + +/* cfunc cbf_set_typeofvalue pyfunc set_typeofvalue + arg cbf_handle handle arg const char *typeofvalue */ + +%feature("autodoc", " +Returns : string +*args : + +C prototype: int cbf_set_typeofvalue (cbf_handle handle, + const char *typeofvalue); + +CBFLib documentation: +DESCRIPTION +cbf_set_typeofvalue sets the type of the item at the current column +and row to the type specified by the ASCII character string given by +typeofvalue. The strings that may be used are: + \"null \" for a null value indicated by a \". \" or a \"? \" +\"bnry \" for a binary value \"word \" for an unquoted string +\"dblq \" for a double-quoted string \"sglq \" for a single-quoted +string \"text \" for a semicolon-quoted string (multiline text +field) \"prns \" for a parenthesis-bracketed string (multiline text +field) \"brcs \" for a brace-bracketed string (multiline text field) + \"bkts \" for a square-bracket-bracketed string (multiline text +field) \"tsqs \" for a treble-single-quote quoted string (multiline +text field) \"tdqs \" for a treble-double-quote quoted string +(multiline text field) +Not all types may be used for all values. Not all types are valid for +all type of CIF files. In partcular the types \"prns \", \"brcs \", + \"bkts \" were introduced with DDLm and are not valid in DDL1 or +DDL2 CIFS. The types \"tsqs \" and \"tdqs \" are not formally part +of the CIF syntax. No changes may be made to the type of binary +values. You may not set the type of a string that contains a single +quote followed by a blank or a tab or which contains multiple lines +to \"sglq \". You may not set the type of a string that contains a +double quote followed by a blank or a tab or which contains multiple +lines to \"dblq \". +ARGUMENTS +handle CBF handle. typeofvalue ASCII string for desired type +of value. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")set_typeofvalue; + void set_typeofvalue(const char* arg){ + cbf_failnez(cbf_set_typeofvalue(self,arg));} +%feature("autodoc", " +Returns : String +*args : String axis_id + +C prototype: int cbf_get_axis_rotation_axis (cbf_handle handle, + const char *axis_id, const char * *rotation_axis); + +CBFLib documentation: +DESCRIPTION +cbf_count_axis_ancestors sets ancestors to the number of ancestors of +axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor +axis of index ancestor_index of axis axis_id, starting with axis_id +for ancestor_index 0. +cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of +axis_id or to \". \" if there is no such ancestor. +cbf_get_axis_equipment sets *equipment to the equipment of axis_id or +to \". \" if there is no such equipment. +cbf_get_axis_equipment_component sets *equipment_component to the +equipment_component of axis_id or to \". \" if there is no such +equipment_component. +cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the +components of the ofset of axis_id. +cbf_get_axis_rotation sets rotation to the rotation of axis_id or to +0 if there is no such rotation. cbf_get_axis_rotation_axis sets +*rotation_axis to the rotation_axis of axis_id or to \". \" if there +is no such rotation_axis. +cbf_get_axis_setting sets *start and *increment to the corresponding +values of the axis axis_id. Any of the destination pointers may be +NULL. +cbf_get_axis_type sets axis_type to the type of axis_id. +cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the +components of the vector of axis_id. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any +value other than 0 is invalid. axis_id Axis id. +ancestor_index Integer index of the desired ancestor, starting +with 0 for the current axis_id. ancestor Pointer to +destination ancestor name pointer. depends_on Pointer to +destination depends_on name pointer. equipment Pointer to +destination equipment name pointer. equipment_component Pointer to +destination equipment_component name pointer. offset1 +Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. +rotation Pointer to destination rotation value. +rotation_axis Pointer to destination rotation_axisn name +pointer. start Pointer to the destination start +value. increment Pointer to the destination increment +value. type Pointer to destination axis type of type +. vector1 Pointer to destination first vector component +value. vector2 Pointer to destination second vector +component value. vector3 Pointer to destination third +vector component value. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_axis_rotation_axis; + + const char * get_axis_rotation_axis(const char *axis_id){ + const char* rot_axis; + cbf_failnez(cbf_get_axis_rotation_axis(self,axis_id, + &rot_axis)); + return rot_axis; + } +%feature("autodoc", " +Returns : +*args : int compression,int binary_id,(binary) String data,int elsize, + int elsigned,int elements,String byteorder,int dimfast,int dimmid, + int dimslow,int padding + +C prototype: int cbf_set_integerarray_wdims (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, int elsigned, size_t elements, + const char *byteorder, size_t dimfast, size_t dimmid, + size_t dimslow, size_t padding); + +CBFLib documentation: +DESCRIPTION +cbf_set_integerarray sets the binary value of the item at the current +column and row to an integer array. The array consists of elements +elements of elsize bytes each, starting at array. The elements are +signed if elsigned is non-0 and unsigned otherwise. binary_id is the +binary section identifier. cbf_set_realarray sets the binary value of +the item at the current column and row to an integer array. The array +consists of elements elements of elsize bytes each, starting at +array. binary_id is the binary section identifier. +The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, +cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, +cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants +allow the data header values of byteorder, dimfast, dimmid, dimslow +and padding to be set to the data byte order, the fastest, second +fastest and third fastest array dimensions and the size in byte of +the post data padding to be used. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +NOTE: This scheme is by far the slowest of the four and uses much +more disk space. It is intended for routine use with small arrays +only. With large arrays (like images) it should be used only for +debugging. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or +floats for cbf_set_realarray. If elsize is not equal to sizeof +(char), sizeof (short) or sizeof (int), the function returns +CBF_ARGUMENT. +ARGUMENTS +handle CBF handle. compression Compression method to use. +binary_id Integer binary identifier. array Pointer to the +source array. elsize Size in bytes of each source array +element. elsigned Set to non-0 if the source array elements are +signed. elements The number of elements in the array +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")set_integerarray_wdims; + + /* CBFlib must NOT modify the data string nor the byteorder string + which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray_wdims; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_integerarray_wdims; + + void set_integerarray_wdims(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elsigned, int elements, + char *bo, int bolen, int dimfast, int dimmid, int dimslow, int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + cbf_failnez(cbf_set_integerarray_wdims (self, compression, binary_id, + (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder, + (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +%feature("autodoc", " +Returns : +*args : Float time + +C prototype: int cbf_set_integration_time (cbf_handle handle, + unsigned int reserved, double time); + +CBFLib documentation: +DESCRIPTION +cbf_set_integration_time sets the integration time in seconds to the +value specified by time. The parameter reserved is presently unused +and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any value other than 0 is +invalid. time Integration time in seconds. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_integration_time; + + void set_integration_time(double time){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_set_integration_time(self,reserved,time)); + } +%feature("autodoc", " +Returns : +*args : String axis_id,Float start,Float increment + +C prototype: int cbf_set_axis_setting (cbf_handle handle, + unsigned int reserved, const char *axis_id, double start, + double increment); + +CBFLib documentation: +DESCRIPTION +cbf_set_axis_setting sets the starting and increment values of the +axis axis_id to start and increment. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any value other than 0 is +invalid. axis_id Axis id. start Start value. increment +Increment value. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_axis_setting; + + void set_axis_setting(const char *axis_id, + double start, double increment){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_set_axis_setting(self,reserved, + axis_id,start,increment)); + } +%feature("autodoc", " +Returns : (Binary)String +*args : int element_number,int elsize,int ndimslow,int ndimfast + +C prototype: int cbf_get_real_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, + size_t ndimslow, size_t ndimfast); + +CBFLib documentation: +DESCRIPTION +cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image +array for element number element_number into an array. The array +consists of ndimslow×ndimfast elements of elsize bytes each, +starting at array. The elements are signed if elsign is non-0 and +unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and +cbf_get_real_image_sf read the image array of IEEE doubles or floats +for element number element_number into an array. A real array is +always signed. cbf_get_3d_image, cbf_get_3d_image_fs and +cbf_get_3d_image_sf read the 3D image array for element number +element_number into an array. The array consists of +ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting +at array. The elements are signed if elsign is non-0 and unsigned +otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, +cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or +floats for element number element_number into an array. A real array +is always signed. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +The structure of the array as a 1-, 2- or 3-dimensional array should +agree with the structure of the array given in the +ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, +ndimslow should be the array size and ndimfast and, for the 3D calls, +ndimmid, should be set to 1 both in the call and in the imgCIF data +being processed. If the array is 2-dimensional and a 3D call is used, +ndimslow and ndimmid should be the +")get_real_image_as_string; + +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_real_image_as_string; + +// Get the length correct + + void get_real_image_as_string(int element_number, char **s, int *slen, + int elsize, int ndimslow, int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + cbf_failnez (cbf_get_real_image(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } +%feature("autodoc", " +Returns : String +*args : String axis_id,Integer ancestor_index + +C prototype: int cbf_get_axis_ancestor (cbf_handle handle, + const char *axis_id, const unsigned int ancestor_index, + const char * *ancestor); + +CBFLib documentation: +DESCRIPTION +cbf_count_axis_ancestors sets ancestors to the number of ancestors of +axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor +axis of index ancestor_index of axis axis_id, starting with axis_id +for ancestor_index 0. +cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of +axis_id or to \". \" if there is no such ancestor. +cbf_get_axis_equipment sets *equipment to the equipment of axis_id or +to \". \" if there is no such equipment. +cbf_get_axis_equipment_component sets *equipment_component to the +equipment_component of axis_id or to \". \" if there is no such +equipment_component. +cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the +components of the ofset of axis_id. +cbf_get_axis_rotation sets rotation to the rotation of axis_id or to +0 if there is no such rotation. cbf_get_axis_rotation_axis sets +*rotation_axis to the rotation_axis of axis_id or to \". \" if there +is no such rotation_axis. +cbf_get_axis_setting sets *start and *increment to the corresponding +values of the axis axis_id. Any of the destination pointers may be +NULL. +cbf_get_axis_type sets axis_type to the type of axis_id. +cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the +components of the vector of axis_id. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any +value other than 0 is invalid. axis_id Axis id. +ancestor_index Integer index of the desired ancestor, starting +with 0 for the current axis_id. ancestor Pointer to +destination ancestor name pointer. depends_on Pointer to +destination depends_on name pointer. equipment Pointer to +destination equipment name pointer. equipment_component Pointer to +destination equipment_component name pointer. offset1 +Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. +rotation Pointer to destination rotation value. +rotation_axis Pointer to destination rotation_axisn name +pointer. start Pointer to the destination start +value. increment Pointer to the destination increment +value. type Pointer to destination axis type of type +. vector1 Pointer to destination first vector component +value. vector2 Pointer to destination second vector +component value. vector3 Pointer to destination third +vector component value. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_axis_ancestor; + + const char * get_axis_ancestor(const char *axis_id, + int ancestor_index){ + const char* anc; + cbf_failnez(cbf_get_axis_ancestor(self,axis_id, + (unsigned int)ancestor_index,&anc)); + return anc; + } +%feature("autodoc", " +Returns : (Binary)String +*args : int element_number,int elsize,int elsign,int ndimslow,int ndimmid, + int ndimfast + +C prototype: int cbf_get_3d_image_sf (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + void *array, size_t elsize, int elsign, size_t ndimslow, + size_t ndimmid, size_t ndimfast); + +CBFLib documentation: +DESCRIPTION +cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image +array for element number element_number into an array. The array +consists of ndimslow×ndimfast elements of elsize bytes each, +starting at array. The elements are signed if elsign is non-0 and +unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and +cbf_get_real_image_sf read the image array of IEEE doubles or floats +for element number element_number into an array. A real array is +always signed. cbf_get_3d_image, cbf_get_3d_image_fs and +cbf_get_3d_image_sf read the 3D image array for element number +element_number into an array. The array consists of +ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting +at array. The elements are signed if elsign is non-0 and unsigned +otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, +cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or +floats for element number element_number into an array. A real array +is always signed. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +The structure of the array as a 1-, 2- or 3-dimensional array should +agree with the structure of the array given in the +ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, +ndimslow should be the array size and ndimfast and, for the 3D calls, +ndimmid, should be set to 1 both in the call and in the imgCIF data +being processed. If the array is 2-dimensional and a 3D call is used, +ndimslow and ndimmid should be the +")get_3d_image_sf_as_string; + +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_3d_image_sf_as_string; + +// Get the length correct + + void get_3d_image_sf_as_string(int element_number, char **s, int *slen, + int elsize, int elsign, int ndimfast, int ndimmid, int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + cbf_failnez (cbf_get_3d_image_sf(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } +%feature("autodoc", " +Returns : +*args : int element_number,int compression,(binary) String data,int elsize, + int dimfast,int dimslow + +C prototype: int cbf_set_real_image_fs(cbf_handle handle, + unsigned int reserved, unsigned int element_number, + unsigned int compression, void *array,size_t elsize, + size_t ndimfast, size_t ndimslow); + +CBFLib documentation: +DESCRIPTION +cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image +array for element number element_number. The array consists of +ndimfast×ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-zero and unsigned otherwise. +cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf +write the image array for element number element_number. The array +consists of ndimfast×ndimslow IEEE double or float elements of +elsize bytes each, starting at array. cbf_set_3d_image, +cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array +for element number element_number. The array consists of +ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting +at array. The elements are signed if elsign is non-0 and unsigned +otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and +cbf_set_real_3d_image_sf writes the 3D image array for element number +element_number. The array consists of ndimfast×ndimmid×ndimslow +IEEE double or float elements of elsize bytes each, starting at +array. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +If the array is 1-dimensional, ndimslow should be the array size and +ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the +array is 2-dimensional and the 3D calls are used, ndimslow and +ndimmid should be used for the array dimensions and ndimfast should +be set to 1. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET +Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for +cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof +(int), sizeof(double) or sizeof(float), the function returns +CBF_ARGUMENT. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any value other +than 0 is invalid. element_number The number of the detector +element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. compression Compression type. +array Pointer to the image array. elsize Size in +bytes of each image array element. elsigned Set to non-0 if +the image array elements are signed. ndimslow Slowest array +dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_real_image_fs; + + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_image; + + void set_real_image_fs(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int ndimfast, int ndimslow){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_real_image_fs (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimfast, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +%feature("autodoc", " +Returns : Float overload +*args : Integer element_number + +C prototype: int cbf_get_overload (cbf_handle handle, + unsigned int element_number, double *overload); + +CBFLib documentation: +DESCRIPTION +cbf_get_overload sets *overload to the overload value for element +number element_number. +ARGUMENTS +handle CBF handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. overload Pointer to the +destination overload. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_overload; + +%apply double *OUTPUT {double *overload} get_overload; + void get_overload(unsigned int element_number, double *overload){ + cbf_failnez(cbf_get_overload(self,element_number,overload)); + } + +/* cfunc cbf_get_wavelength pyfunc get_wavelength + arg cbf_handle handle arg double *wavelength */ + +%feature("autodoc", " +Returns : double +*args : + +C prototype: int cbf_get_wavelength (cbf_handle handle, double *wavelength); + +CBFLib documentation: +DESCRIPTION +cbf_get_wavelength sets *wavelength to the current wavelength in Å. +ARGUMENTS +handle CBF handle. wavelength Pointer to the destination. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_wavelength; + double get_wavelength(void){ + double result; + cbf_failnez(cbf_get_wavelength(self,&result)); + return result;} + +/* cfunc cbf_next_datablock pyfunc next_datablock + arg cbf_handle handle */ + +%feature("autodoc", " +Returns : +*args : + +C prototype: int cbf_next_datablock (cbf_handle handle); + +CBFLib documentation: +DESCRIPTION +cbf_next_datablock makes the data block following the current data +block the current data block. +If there are no more data blocks, the function returns CBF_NOTFOUND. +The current category becomes undefined. +ARGUMENTS +handle CBF handle. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")next_datablock; + void next_datablock(void){ + cbf_failnez(cbf_next_datablock(self));} +%feature("autodoc", " +Returns : int compression,int binary_id,int elsize,int elements,char **bo, + int *bolen,int dimfast,int dimmid,int dimslow,int padding +*args : + +C prototype: int cbf_get_realarrayparameters_wdims (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + size_t *elements, const char **byteorder, size_t *dimfast, + size_t *dimmid, size_t *dimslow, size_t *padding); + +CBFLib documentation: +DESCRIPTION +cbf_get_integerarrayparameters sets *compression, *binary_id, +*elsize, *elsigned, *elunsigned, *elements, *minelement and +*maxelement to values read from the binary value of the item at the +current column and row. This provides all the arguments needed for a +subsequent call to cbf_set_integerarray, if a copy of the array is to +be made into another CIF or CBF. cbf_get_realarrayparameters sets +*compression, *binary_id, *elsize, *elements to values read from the +binary value of the item at the current column and row. This provides +all the arguments needed for a subsequent call to cbf_set_realarray, +if a copy of the arry is to be made into another CIF or CBF. +The variants cbf_get_integerarrayparameters_wdims, +cbf_get_integerarrayparameters_wdims_fs, +cbf_get_integerarrayparameters_wdims_sf, +cbf_get_realarrayparameters_wdims, +cbf_get_realarrayparameters_wdims_fs, +cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, +*dimmid, *dimslow, and *padding as well, providing the additional +parameters needed for a subsequent call to cbf_set_integerarray_wdims +or cbf_set_realarray_wdims. +The value returned in *byteorder is a pointer either to the string +\"little_endian \" or to the string \"big_endian \". This should be +the byte order of the data, not necessarily of the host machine. No +attempt should be made to modify this string. At this time only +\"little_endian \" will be returned. +The values returned in *dimfast, *dimmid and *dimslow are the sizes +of the fastest changing, second fastest changing and third fastest +changing dimensions of the array, if specified, or zero, if not +specified. +The value returned in *padding is the size of the post-data padding, +if any and if specified in the data header. The value is given as a +count of octets. +If the value is not binary, the function returns CBF_ASCII. +ARGUMENTS +handle CBF handle. compression Compression method used. +elsize Size in bytes of each array element. binary_id +Pointer to the destination integer binary identifier. elsigned +Pointer to an integer. Set to 1 if the elements can be read as signed +integers. elunsigned Pointer to an integer. Set to 1 if the +elements can be read as unsigned integers. elements Pointer to +the destination number of elements. minelement Pointer to the +destination smallest element. maxelement Pointer to the +destination largest element. byteorder Pointer to the destination +byte order. dimfast Pointer to the destination fastest +dimension. dimmid Pointer to the destination second fastest +dimension. dimslow Pointer to the destination third fastest +dimension. padding Pointer to the destination padding size. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")get_realarrayparameters_wdims; + +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, + int *elements, + int *dimslow, int *dimmid, int *dimfast, int *padding} + get_realarrayparameters_wdims; + + void get_realarrayparameters_wdims(int *compression,int *binary_id, + int *elsize, + int *elements, + char **bo, int *bolen, + int *dimfast, int *dimmid, int *dimslow, int *padding + ){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + cbf_failnez(cbf_get_realarrayparameters_wdims(self, + &comp,binary_id, &elsiz, &elem, + &byteorder,&df,&dm,&ds,&pd )); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +%feature("autodoc", " +Returns : +*args : Float matrix_0,Float matrix_1,Float matrix_2,Float matrix_3, + Float matrix_4,Float matrix_5,Float matrix_6,Float matrix_7, + Float matrix_8 + +C prototype: int cbf_set_orientation_matrix (cbf_handle handle, + double ub_matrix[9]); + +CBFLib documentation: +DESCRIPTION +cbf_get_orientation_matrix sets ub_matrix to point to the array of +orientation matrix entries in the \"diffrn \" category in the order +of columns: + \"UB[1][1] \" \"UB[1][2] \" \"UB[1][3] \" \"UB[2][1] \" +\"UB[2][2] \" \"UB[2][3] \" \"UB[3][1] \" \"UB[3][2] \" +\"UB[3][3] \" +cbf_set_orientation_matrix sets the values in the \"diffrn \" +category to the values pointed to by ub_matrix. +ARGUMENTS +handle CBF handle. ub_matrix Source or destination array of 9 +doubles giving the orientation matrix parameters. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_orientation_matrix; + + void set_orientation_matrix( double m0,double m1, +double m2,double m3,double m4,double m5,double m6, +double m7,double m8){ + double m[9]; + m[0] = m0; m[1]=m1 ; m[2]=m2 ; + m[3] = m3; m[4]=m4 ; m[5]=m5 ; + m[6] = m6; m[7]=m7 ; m[8]=m8 ; + cbf_failnez(cbf_get_orientation_matrix(self,m)); + } + +/* cfunc cbf_new_category pyfunc new_category + arg cbf_handle handle arg const char *categoryname */ + +%feature("autodoc", " +Returns : string +*args : + +C prototype: int cbf_new_category (cbf_handle handle, + const char *categoryname); + +CBFLib documentation: +DESCRIPTION +cbf_new_category creates a new category in the current data block +with name categoryname and makes it the current category. +If a category with this name already exists, the existing category +becomes the current category. +ARGUMENTS +handle CBF handle. categoryname The name of the new +category. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")new_category; + void new_category(const char* arg){ + cbf_failnez(cbf_new_category(self,arg));} +%feature("autodoc", " +Returns : +*args : Float gain,Float gain_esd + +C prototype: int cbf_set_gain (cbf_handle handle, unsigned int element_number, + double gain, double gain_esd); + +CBFLib documentation: +DESCRIPTION +cbf_set_gain sets the gain of element number element_number to the +values specified by gain and gain_esd. +ARGUMENTS +handle CBF handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. gain New gain value. +gain_esd New gain_esd value. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_gain; + + void set_gain (unsigned int element_number, double gain, double gain_esd){ + cbf_failnez(cbf_set_gain (self, element_number, gain, gain_esd)); + } + +/* cfunc cbf_find_column pyfunc find_column + arg cbf_handle handle arg const char *columnname */ + +%feature("autodoc", " +Returns : string +*args : + +C prototype: int cbf_find_column (cbf_handle handle, const char *columnname); + +CBFLib documentation: +DESCRIPTION +cbf_find_column makes the columns in the current category with name +columnname the current column. +The comparison is case-insensitive. +If the column does not exist, the function returns CBF_NOTFOUND. +The current row is not affected. +ARGUMENTS +handle CBF handle. columnname The name of column to find. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")find_column; + void find_column(const char* arg){ + cbf_failnez(cbf_find_column(self,arg));} + +/* cfunc cbf_remove_category pyfunc remove_category + arg cbf_handle handle */ + +%feature("autodoc", " +Returns : +*args : + +C prototype: int cbf_remove_category (cbf_handle handle); + +CBFLib documentation: +DESCRIPTION +cbf_remove_category deletes the current category. +The current category becomes undefined. +ARGUMENTS +handle CBF handle. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")remove_category; + void remove_category(void){ + cbf_failnez(cbf_remove_category(self));} +%feature("autodoc", " +Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, + int elements,int minelement,int maxelement,char **bo,int *bolen, + int dimslow,int dimmid,int dimfast,int padding +*args : + +C prototype: int cbf_get_integerarrayparameters_wdims_sf (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + int *elsigned, int *elunsigned, size_t *elements, + int *minelement, int *maxelement, const char **byteorder, + size_t *dimslow, size_t *dimmid, size_t *dimfast, + size_t *padding); + +CBFLib documentation: +DESCRIPTION +cbf_get_integerarrayparameters sets *compression, *binary_id, +*elsize, *elsigned, *elunsigned, *elements, *minelement and +*maxelement to values read from the binary value of the item at the +current column and row. This provides all the arguments needed for a +subsequent call to cbf_set_integerarray, if a copy of the array is to +be made into another CIF or CBF. cbf_get_realarrayparameters sets +*compression, *binary_id, *elsize, *elements to values read from the +binary value of the item at the current column and row. This provides +all the arguments needed for a subsequent call to cbf_set_realarray, +if a copy of the arry is to be made into another CIF or CBF. +The variants cbf_get_integerarrayparameters_wdims, +cbf_get_integerarrayparameters_wdims_fs, +cbf_get_integerarrayparameters_wdims_sf, +cbf_get_realarrayparameters_wdims, +cbf_get_realarrayparameters_wdims_fs, +cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, +*dimmid, *dimslow, and *padding as well, providing the additional +parameters needed for a subsequent call to cbf_set_integerarray_wdims +or cbf_set_realarray_wdims. +The value returned in *byteorder is a pointer either to the string +\"little_endian \" or to the string \"big_endian \". This should be +the byte order of the data, not necessarily of the host machine. No +attempt should be made to modify this string. At this time only +\"little_endian \" will be returned. +The values returned in *dimfast, *dimmid and *dimslow are the sizes +of the fastest changing, second fastest changing and third fastest +changing dimensions of the array, if specified, or zero, if not +specified. +The value returned in *padding is the size of the post-data padding, +if any and if specified in the data header. The value is given as a +count of octets. +If the value is not binary, the function returns CBF_ASCII. +ARGUMENTS +handle CBF handle. compression Compression method used. +elsize Size in bytes of each array element. binary_id +Pointer to the destination integer binary identifier. elsigned +Pointer to an integer. Set to 1 if the elements can be read as signed +integers. elunsigned Pointer to an integer. Set to 1 if the +elements can be read as unsigned integers. elements Pointer to +the destination number of elements. minelement Pointer to the +destination smallest element. maxelement Pointer to the +destination largest element. byteorder Pointer to the destination +byte order. dimfast Pointer to the destination fastest +dimension. dimmid Pointer to the destination second fastest +dimension. dimslow Pointer to the destination third fastest +dimension. padding Pointer to the destination padding size. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")get_integerarrayparameters_wdims_sf; + +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement, + int *dimslow, int *dimmid, int *dimfast, int *padding} + get_integerarrayparameters_wdims_sf; + + void get_integerarrayparameters_wdims_sf(int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement, + char **bo, int *bolen, + int *dimslow, int *dimmid, int *dimfast, int *padding + ){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + cbf_failnez(cbf_get_integerarrayparameters_wdims_sf(self, + &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, + minelement, maxelement, &byteorder,&ds,&dm,&df,&pd )); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +%feature("autodoc", " +Returns : Float pixel_size +*args : Int element_number,Int axis_number + +C prototype: int cbf_get_pixel_size (cbf_handle handle, + unsigned int element_number, int axis_number, + double *psize); + +CBFLib documentation: +DESCRIPTION +cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to +the double value in millimeters of the axis axis_number of the +detector element element_number. The axis_number is numbered from 1, +starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to +point to the double value in millimeters of the axis axis_number of +the detector element element_number. The axis_number is numbered from +1, starting with the fastest axis. +If a negative axis number is given, the order of axes is reversed, so +that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the +fastest axis for cbf_get_pixel_size_sf. +If the pixel size is not given explcitly in the \"array_element_size +\" category, the function returns CBF_NOTFOUND. +ARGUMENTS +handle CBF handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. axis_number The number of the +axis, starting from 1 for the fastest for cbf_get_pixel_size and +cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. +psize Pointer to the destination pixel size. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_pixel_size; + +%apply double *OUTPUT {double *psize} get_pixel_size; + void get_pixel_size(unsigned int element_number, + unsigned int axis_number, double *psize){ + cbf_failnez(cbf_get_pixel_size(self, + element_number, + axis_number, + psize)); + } +%feature("autodoc", " +Returns : +*args : int element_number,int compression,(binary) String data,int elsize, + int dimslow,int dimfast + +C prototype: int cbf_set_real_image_sf(cbf_handle handle, + unsigned int reserved, unsigned int element_number, + unsigned int compression, void *array,size_t elsize, + size_t ndimslow, size_t ndimfast); + +CBFLib documentation: +DESCRIPTION +cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image +array for element number element_number. The array consists of +ndimfast×ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-zero and unsigned otherwise. +cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf +write the image array for element number element_number. The array +consists of ndimfast×ndimslow IEEE double or float elements of +elsize bytes each, starting at array. cbf_set_3d_image, +cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array +for element number element_number. The array consists of +ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting +at array. The elements are signed if elsign is non-0 and unsigned +otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and +cbf_set_real_3d_image_sf writes the 3D image array for element number +element_number. The array consists of ndimfast×ndimmid×ndimslow +IEEE double or float elements of elsize bytes each, starting at +array. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +If the array is 1-dimensional, ndimslow should be the array size and +ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the +array is 2-dimensional and the 3D calls are used, ndimslow and +ndimmid should be used for the array dimensions and ndimfast should +be set to 1. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET +Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for +cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof +(int), sizeof(double) or sizeof(float), the function returns +CBF_ARGUMENT. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any value other +than 0 is invalid. element_number The number of the detector +element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. compression Compression type. +array Pointer to the image array. elsize Size in +bytes of each image array element. elsigned Set to non-0 if +the image array elements are signed. ndimslow Slowest array +dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_real_image_sf; + + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_image_sf; + + void set_real_image_sf(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int ndimslow, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_real_image_sf (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } + +/* cfunc cbf_require_category pyfunc require_category + arg cbf_handle handle arg const char *categoryname */ + +%feature("autodoc", " +Returns : string +*args : + +C prototype: int cbf_require_category (cbf_handle handle, + const char *categoryname); + +CBFLib documentation: +DESCRIPTION +cbf_rewuire_category makes the category in the current data block +with name categoryname the current category, if it exists, or creates +the catagory if it does not exist. +The comparison is case-insensitive. +The current column and row become undefined. +ARGUMENTS +handle CBF handle. categoryname The name of the category to +find. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")require_category; + void require_category(const char* arg){ + cbf_failnez(cbf_require_category(self,arg));} +%feature("autodoc", " +Returns : Float astar,Float bstar,Float cstar,Float alphastar,Float betastar, + Float gammastar +*args : + +C prototype: int cbf_get_reciprocal_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); + +CBFLib documentation: +DESCRIPTION +cbf_get_reciprocal_cell sets cell[0:2] to the double values of the +reciprocal cell edge lengths a^*, b^* and c^* in Ångstroms^-1, +cell[3:5] to the double values of the reciprocal cell angles α^*, +β^* and γ^* in degrees, cell_esd[0:2] to the double values of the +estimated strandard deviations of the reciprocal cell edge lengths +a^*, b^* and c^* in Ångstroms^-1, cell_esd[3:5] to the double values +of the estimated standard deviations of the the reciprocal cell +angles α^*, β^* and γ^* in degrees. +The values returned are retrieved from the first row of the \"cell +\" category. The value of \"_cell.entry_id \" is ignored. +cell or cell_esd may be NULL. +If cell is NULL, the reciprocal cell parameters are not retrieved. +If cell_esd is NULL, the reciprocal cell parameter esds are not +retrieved. +If the \"cell \" category is present, but some of the values are +missing, zeros are returned for the missing values. +ARGUMENTS +handle CBF handle. cell Pointer to the destination array of +6 doubles for the reciprocal cell parameters. cell_esd Pointer to +the destination array of 6 doubles for the reciprocal cell parameter +esds. +RETURN VALUE +Returns an error code on failure or 0 for success. No errors is +returned for missing values if the \"cell \" category exists. +SEE ALSO +")get_reciprocal_cell; + +%apply double *OUTPUT {double *astar, double *bstar, double *cstar, + double *alphastar, double *betastar, double *gammastar} get_reciprocal_cell; + void get_reciprocal_cell(double *astar, double *bstar, double *cstar, + double *alphastar, double *betastar, double *gammastar) { + double rcell[6]; + cbf_failnez(cbf_get_reciprocal_cell(self,rcell,NULL)); + *astar = rcell[0]; + *bstar = rcell[1]; + *cstar = rcell[2]; + *alphastar = rcell[3]; + *betastar = rcell[4]; + *gammastar = rcell[5]; + } +%feature("autodoc", " +Returns : doubleArray cell +*args : + +C prototype: int cbf_get_reciprocal_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); + +CBFLib documentation: +DESCRIPTION +cbf_get_reciprocal_cell sets cell[0:2] to the double values of the +reciprocal cell edge lengths a^*, b^* and c^* in Ångstroms^-1, +cell[3:5] to the double values of the reciprocal cell angles α^*, +β^* and γ^* in degrees, cell_esd[0:2] to the double values of the +estimated strandard deviations of the reciprocal cell edge lengths +a^*, b^* and c^* in Ångstroms^-1, cell_esd[3:5] to the double values +of the estimated standard deviations of the the reciprocal cell +angles α^*, β^* and γ^* in degrees. +The values returned are retrieved from the first row of the \"cell +\" category. The value of \"_cell.entry_id \" is ignored. +cell or cell_esd may be NULL. +If cell is NULL, the reciprocal cell parameters are not retrieved. +If cell_esd is NULL, the reciprocal cell parameter esds are not +retrieved. +If the \"cell \" category is present, but some of the values are +missing, zeros are returned for the missing values. +ARGUMENTS +handle CBF handle. cell Pointer to the destination array of +6 doubles for the reciprocal cell parameters. cell_esd Pointer to +the destination array of 6 doubles for the reciprocal cell parameter +esds. +RETURN VALUE +Returns an error code on failure or 0 for success. No errors is +returned for missing values if the \"cell \" category exists. +SEE ALSO +")get_reciprocal_cell; + +%apply double *OUTPUT {double *a_esd, double *b_esd, double *c_esd, + double *alpha_esd, double *beta_esd, double *gamma_esd} get_reciprocal_cell_esd; + void get_reciprocal_cell_esd(double *a_esd, double *b_esd, double *c_esd, + double *alpha_esd, double *beta_esd, double *gamma_esd) { + double cell_esd[6]; + cbf_failnez(cbf_get_reciprocal_cell(self,NULL,cell_esd)); + *a_esd = cell_esd[0]; + *b_esd = cell_esd[1]; + *c_esd = cell_esd[2]; + *alpha_esd = cell_esd[3]; + *beta_esd = cell_esd[4]; + *gamma_esd = cell_esd[5]; + } +%feature("autodoc", " +Returns : size_t ndimslow,size_t ndimmid,size_t ndimfast +*args : Integer element_number + +C prototype: int cbf_get_3d_image_size (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + size_t *ndimslow, size_t *ndimmid, size_t *ndimfast); + +CBFLib documentation: +DESCRIPTION +cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf +set *ndimslow and *ndimfast to the slow and fast dimensions of the +image array for element number element_number. If the array is +1-dimensional, *ndimslow will be set to the array size and *ndimfast +will be set to 1. If the array is 3-dimensional an error code will be +returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and +cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the +slowest, next fastest and fastest dimensions, respectively, of the 3D +image array for element number element_number. If the array is +1-dimensional, *ndimslow will be set to the array size and *ndimmid +and +")get_3d_image_size; + +%apply int *OUTPUT {int *ndimslow, int *ndimmid, int *ndimfast} get_3d_image_size; + void get_3d_image_size(unsigned int element_number, int *ndimslow, int *ndimmid, int *ndimfast){ + unsigned int reserved; + size_t inslow, inmid, infast; + reserved = 0; + cbf_failnez(cbf_get_3d_image_size(self,reserved,element_number,&inslow,&inmid,&infast)); + *ndimslow = (int)inslow; /* FIXME - is that how to convert? */ + *ndimmid = (int)inmid; + *ndimfast = (int)infast; + } +%feature("autodoc", " +Returns : String tagroot +*args : String tagname + +C prototype: int cbf_find_tag_root (cbf_handle handle, const char* tagname, + const char** tagroot); + +CBFLib documentation: +DESCRIPTION +cbf_find_tag_root sets *tagroot to the root tag of which tagname is +an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in +the dictionary associated with handle, creating the dictionary if +necessary. cbf_require_tag_root sets *tagroot to the root tag of +which tagname is an alias, if there is one, or to the value of +tagname, if tagname is not an alias. +A returned tagroot string must not be modified in any way. +ARGUMENTS +handle CBF handle. tagname tag name which may be an alias. +tagroot pointer to a returned tag root name. tagroot_in input +tag root name. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")find_tag_root; + +const char * find_tag_root(const char* tagname){ + const char* result; + cbf_failnez(cbf_find_tag_root(self,tagname,&result)); + return result; +} +%feature("autodoc", " +Returns : String categoryroot +*args : String Categoryname + +C prototype: int cbf_require_category_root (cbf_handle handle, + const char* categoryname, const char** categoryroot); + +CBFLib documentation: +DESCRIPTION +cbf_find_category_root sets *categoryroot to the root category of +which categoryname is an alias. cbf_set_category_root sets +categoryname_in as an alias of categoryroot in the dictionary +associated with handle, creating the dictionary if necessary. +cbf_require_category_root sets *categoryroot to the root category of +which categoryname is an alias, if there is one, or to the value of +categoryname, if categoryname is not an alias. +A returned categoryroot string must not be modified in any way. +ARGUMENTS +handle CBF handle. categoryname category name which +may be an alias. categoryroot pointer to a returned category +root name. categoryroot_in input category root name. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")cbf_require_category_root; + +const char* require_category_root (const char* categoryname){ + const char* result; + cbf_failnez(cbf_require_category_root(self,categoryname, &result)); + return result; +} +%feature("autodoc", " +Returns : +*args : int compression,int binary_id,(binary) String data,int elsize, + int elements,String byteorder,int dimslow,int dimmid,int dimfast, + int padding + +C prototype: int cbf_set_realarray_wdims_sf (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, size_t elements, const char *byteorder, + size_t dimslow, size_t dimmid, size_t dimfast, + size_t padding); + +CBFLib documentation: +DESCRIPTION +cbf_set_integerarray sets the binary value of the item at the current +column and row to an integer array. The array consists of elements +elements of elsize bytes each, starting at array. The elements are +signed if elsigned is non-0 and unsigned otherwise. binary_id is the +binary section identifier. cbf_set_realarray sets the binary value of +the item at the current column and row to an integer array. The array +consists of elements elements of elsize bytes each, starting at +array. binary_id is the binary section identifier. +The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, +cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, +cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants +allow the data header values of byteorder, dimfast, dimmid, dimslow +and padding to be set to the data byte order, the fastest, second +fastest and third fastest array dimensions and the size in byte of +the post data padding to be used. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +NOTE: This scheme is by far the slowest of the four and uses much +more disk space. It is intended for routine use with small arrays +only. With large arrays (like images) it should be used only for +debugging. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or +floats for cbf_set_realarray. If elsize is not equal to sizeof +(char), sizeof (short) or sizeof (int), the function returns +CBF_ARGUMENT. +ARGUMENTS +handle CBF handle. compression Compression method to use. +binary_id Integer binary identifier. array Pointer to the +source array. elsize Size in bytes of each source array +element. elsigned Set to non-0 if the source array elements are +signed. elements The number of elements in the array +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")set_realarray_wdims_sf; + + /* CBFlib must NOT modify the data string nor the byteorder string + which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray_wdims_sf; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_realarray_wdims_sf; + + void set_realarray_wdims_sf(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elements, + char *bo, int bolen, int dimslow, int dimmid, int dimfast, int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + cbf_failnez(cbf_set_realarray_wdims_sf (self, compression, binary_id, + (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder, + (size_t) dimslow, (size_t) dimmid, (size_t) dimfast, (size_t)padding)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } + +/* cfunc cbf_set_integervalue pyfunc set_integervalue + arg cbf_handle handle arg int number */ + +%feature("autodoc", " +Returns : int number +*args : + +C prototype: int cbf_set_integervalue (cbf_handle handle, int number); + +CBFLib documentation: +DESCRIPTION +cbf_set_integervalue sets the item at the current column and row to +the integer value number written as a decimal ASCII string. +ARGUMENTS +handle CBF handle. number Integer value. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")set_integervalue; + void set_integervalue(int number){ + cbf_failnez(cbf_set_integervalue(self,number));} + +/* cfunc cbf_category_name pyfunc category_name + arg cbf_handle handle arg const char **categoryname */ + +%feature("autodoc", " +Returns : +*args : string + +C prototype: int cbf_category_name (cbf_handle handle, + const char **categoryname); + +CBFLib documentation: +DESCRIPTION +cbf_category_name sets *categoryname to point to the name of the +current category of the current data block. +The category name will be valid as long as the category exists. +The name must not be modified by the program in any way. +ARGUMENTS +handle CBF handle. categoryname Pointer to the destination +category name pointer. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")category_name; + const char* category_name(void){ + const char* result; + cbf_failnez(cbf_category_name(self, &result)); + return result;} + +/* cfunc cbf_get_typeofvalue pyfunc get_typeofvalue + arg cbf_handle handle arg const char **typeofvalue */ + +%feature("autodoc", " +Returns : +*args : string + +C prototype: int cbf_get_typeofvalue (cbf_handle handle, + const char **typeofvalue); + +CBFLib documentation: +DESCRIPTION +cbf_get_value sets *typeofvalue to point an ASCII descriptor of the +value of the item at the current column and row. The strings that may +be returned are: + \"null \" for a null value indicated by a \". \" or a \"? \" +\"bnry \" for a binary value \"word \" for an unquoted string +\"dblq \" for a double-quoted string \"sglq \" for a single-quoted +string \"text \" for a semicolon-quoted string (multiline text +field) \"prns \" for a parenthesis-bracketed string (multiline text +field) \"brcs \" for a brace-bracketed string (multiline text field) + \"bkts \" for a square-bracket-bracketed string (multiline text +field) \"tsqs \" for a treble-single-quote quoted string (multiline +text field) \"tdqs \" for a treble-double-quote quoted string +(multiline text field) +Not all types are valid for all type of CIF files. In partcular the +types \"prns \", \"brcs \", \"bkts \" were introduced with DDLm +and are not valid in DDL1 or DDL2 CIFS. The types \"tsqs \" and +\"tdqs \" are not formally part of the CIF syntax. A field for which +no value has been set sets *typeofvalue to NULL rather than to the +string \"null \". +The typeofvalue must not be modified by the program in any way. +ARGUMENTS +handle CBF handle. typeofvalue Pointer to the destination +type-of-value string pointer. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")get_typeofvalue; + const char* get_typeofvalue(void){ + const char* result; + cbf_failnez(cbf_get_typeofvalue(self, &result)); + return result;} +%feature("autodoc", " +Returns : +*args : int element_number,int compression,(binary) String data,int elsize, + int dimslow,int dimfast + +C prototype: int cbf_set_real_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array,size_t elsize, size_t ndimslow, + size_t ndimfast); + +CBFLib documentation: +DESCRIPTION +cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image +array for element number element_number. The array consists of +ndimfast×ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-zero and unsigned otherwise. +cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf +write the image array for element number element_number. The array +consists of ndimfast×ndimslow IEEE double or float elements of +elsize bytes each, starting at array. cbf_set_3d_image, +cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array +for element number element_number. The array consists of +ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting +at array. The elements are signed if elsign is non-0 and unsigned +otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and +cbf_set_real_3d_image_sf writes the 3D image array for element number +element_number. The array consists of ndimfast×ndimmid×ndimslow +IEEE double or float elements of elsize bytes each, starting at +array. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +If the array is 1-dimensional, ndimslow should be the array size and +ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the +array is 2-dimensional and the 3D calls are used, ndimslow and +ndimmid should be used for the array dimensions and ndimfast should +be set to 1. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET +Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for +cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof +(int), sizeof(double) or sizeof(float), the function returns +CBF_ARGUMENT. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any value other +than 0 is invalid. element_number The number of the detector +element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. compression Compression type. +array Pointer to the image array. elsize Size in +bytes of each image array element. elsigned Set to non-0 if +the image array elements are signed. ndimslow Slowest array +dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_real_image; + + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_image; + + void set_real_image(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int ndimslow, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_real_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +%feature("autodoc", " +Returns : (Binary)String +*args : int element_number,int elsize,int elsign,int ndimslow,int ndimmid, + int ndimfast + +C prototype: int cbf_get_3d_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, + int elsign, size_t ndimslow, size_t ndimmid, + size_t ndimfast); + +CBFLib documentation: +DESCRIPTION +cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image +array for element number element_number into an array. The array +consists of ndimslow×ndimfast elements of elsize bytes each, +starting at array. The elements are signed if elsign is non-0 and +unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and +cbf_get_real_image_sf read the image array of IEEE doubles or floats +for element number element_number into an array. A real array is +always signed. cbf_get_3d_image, cbf_get_3d_image_fs and +cbf_get_3d_image_sf read the 3D image array for element number +element_number into an array. The array consists of +ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting +at array. The elements are signed if elsign is non-0 and unsigned +otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, +cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or +floats for element number element_number into an array. A real array +is always signed. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +The structure of the array as a 1-, 2- or 3-dimensional array should +agree with the structure of the array given in the +ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, +ndimslow should be the array size and ndimfast and, for the 3D calls, +ndimmid, should be set to 1 both in the call and in the imgCIF data +being processed. If the array is 2-dimensional and a 3D call is used, +ndimslow and ndimmid should be the +")get_3d_image_as_string; + +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_3d_image_as_string; + +// Get the length correct + + void get_3d_image_as_string(int element_number, char **s, int *slen, + int elsize, int elsign, int ndimfast, int ndimmid, int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + cbf_failnez (cbf_get_3d_image(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } +%feature("autodoc", " +Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2, + Float offset3 +*args : String axis_id + +C prototype: int cbf_get_axis_reference_poise(cbf_handle handle, + double * vector1, double * vector2, double * vector3, + double * offset1, double * offset2, double * offset3, + const char * axis_id); + +CBFLib documentation: +DESCRIPTION +cbf_get_axis_poise sets vector1, vector2, vector3 to point to the +components of the axis vector for axis axis_id, offset1, offset2, +offset3 to point to the components of the axis base offset vector for +axis axis_id, and angle to point to the angle of rotation of axis +axis_id after application of the axis settings for frame frame_id, +using ratio, a value between 0 and 1, indicating how far into the +internal motion in the frame to go. If frame_id is the string \". +\", the first frame found is used. If there is more than one frame, +which frame will be found is indeterminate. If frame_id is NULL, the +overall setting for the scan are used, rather than those for any +particular frame. The vector and offset reported are the reference +vector and offset of the axis axis_id transformed by application of +all motions of the axes on which axis_id depends. +cbf_get_goniometer_poise vector1, vector2, vector3 to point to the +components of the axis vector for the goniometer axis, offset1, +offset2, offset3 to point to the components of the axis base offset +vector for the goniometer axis, and angle to point to the angle of +rotation of the goniometer axis after application of all axis +settings in the goniometer deriving the vector, offset and angle from +the resulting matrix. Calculation of the vector is indeterminate if +the angle is zero. +cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point +to the components of the axis vector for axis axis_id, offset1, +offset2, offset3 to point to the components of the axis base offset +vector for axis axis_id unmodified by axis rotations. Any of the +pointers may be specified as NULL. +ARGUMENTS +handle CBF handle. ratio A number between 0 and 1 +indication how far into the frame to go vector1 Pointer to the +first component of the axis vector vector2 Pointer to the second +component of the axis vector vector3 Pointer to the third +component of the axis vector offset1 Pointer to the first +component of the axis offset offset2 Pointer to the second +component of the axis offset offset3 Pointer to the third +component of the axis offset angle Pointer to the rotation +angle axis_id The specified axis frame_id The specified +frame positioner CBF goniometer +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_axis_reference_poise; + + %apply double *OUTPUT {double *vector1, double *vector2, double *vector3, + double *offset1, double *offset2, double *offset3}; + + void get_axis_reference_poise(double *vector1, double *vector2, double *vector3, + double *offset1, double *offset2, double *offset3, + const char *axis_id){ + cbf_failnez(cbf_get_axis_reference_poise(self, + vector1, vector2, vector3, + offset1, offset2, offset3, + axis_id)); + } + + +/* cfunc cbf_remove_row pyfunc remove_row + arg cbf_handle handle */ + +%feature("autodoc", " +Returns : +*args : + +C prototype: int cbf_remove_row (cbf_handle handle); + +CBFLib documentation: +DESCRIPTION +cbf_remove_row deletes the current row in the current category. +If the current row was the last row, it will move down by 1, +otherwise, it will remain the same. +ARGUMENTS +handle CBF handle. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")remove_row; + void remove_row(void){ + cbf_failnez(cbf_remove_row(self));} +%feature("autodoc", " +Returns : +*args : Integer element_number,Float overload + +C prototype: int cbf_set_overload (cbf_handle handle, + unsigned int element_number, double overload); + +CBFLib documentation: +DESCRIPTION +cbf_set_overload sets the overload value of element number +element_number to overload. +ARGUMENTS +handle CBF handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. overload New overload value. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_overload; + + void set_overload(unsigned int element_number, double overload){ + cbf_failnez(cbf_set_overload(self,element_number,overload)); + } +%feature("autodoc", " +Returns : size_t ndim1,size_t ndim2 +*args : Integer element_number + +C prototype: int cbf_get_image_size (cbf_handle handle, unsigned int reserved, + unsigned int element_number, size_t *ndimslow, + size_t *ndimfast); + +CBFLib documentation: +DESCRIPTION +cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf +set *ndimslow and *ndimfast to the slow and fast dimensions of the +image array for element number element_number. If the array is +1-dimensional, *ndimslow will be set to the array size and *ndimfast +will be set to 1. If the array is 3-dimensional an error code will be +returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and +cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the +slowest, next fastest and fastest dimensions, respectively, of the 3D +image array for element number element_number. If the array is +1-dimensional, *ndimslow will be set to the array size and *ndimmid +and +")get_image_size; + +%apply int *OUTPUT {int *ndimslow, int *ndimfast} get_image_size; + void get_image_size(unsigned int element_number, int *ndimslow, int *ndimfast){ + unsigned int reserved; + size_t inslow, infast; + reserved = 0; + cbf_failnez(cbf_get_image_size(self,reserved,element_number,&inslow,&infast)); + *ndimslow = (int)inslow; + *ndimfast = (int)infast; + } +%feature("autodoc", " +Returns : +*args : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimslow,int dimmid,int dimfast + +C prototype: int cbf_set_3d_image_sf(cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array, size_t elsize, int elsign, size_t ndimslow, + size_t ndimmid, size_t ndimfast); + +CBFLib documentation: +DESCRIPTION +cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image +array for element number element_number. The array consists of +ndimfast×ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-zero and unsigned otherwise. +cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf +write the image array for element number element_number. The array +consists of ndimfast×ndimslow IEEE double or float elements of +elsize bytes each, starting at array. cbf_set_3d_image, +cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array +for element number element_number. The array consists of +ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting +at array. The elements are signed if elsign is non-0 and unsigned +otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and +cbf_set_real_3d_image_sf writes the 3D image array for element number +element_number. The array consists of ndimfast×ndimmid×ndimslow +IEEE double or float elements of elsize bytes each, starting at +array. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +If the array is 1-dimensional, ndimslow should be the array size and +ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the +array is 2-dimensional and the 3D calls are used, ndimslow and +ndimmid should be used for the array dimensions and ndimfast should +be set to 1. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET +Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for +cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof +(int), sizeof(double) or sizeof(float), the function returns +CBF_ARGUMENT. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any value other +than 0 is invalid. element_number The number of the detector +element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. compression Compression type. +array Pointer to the image array. elsize Size in +bytes of each image array element. elsigned Set to non-0 if +the image array elements are signed. ndimslow Slowest array +dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_3d_image_sf; + + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_3d_image; + + void set_3d_image_sf(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int elsign, int ndimslow, int ndimmid, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_3d_image_sf (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t) ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +%feature("autodoc", " +Returns : (Binary)String +*args : int element_number,int elsize,int ndimslow,int ndimfast + +C prototype: int cbf_get_real_image_sf (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + void *array, size_t elsize, size_t ndimslow, + size_t ndimfast); + +CBFLib documentation: +DESCRIPTION +cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image +array for element number element_number into an array. The array +consists of ndimslow×ndimfast elements of elsize bytes each, +starting at array. The elements are signed if elsign is non-0 and +unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and +cbf_get_real_image_sf read the image array of IEEE doubles or floats +for element number element_number into an array. A real array is +always signed. cbf_get_3d_image, cbf_get_3d_image_fs and +cbf_get_3d_image_sf read the 3D image array for element number +element_number into an array. The array consists of +ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting +at array. The elements are signed if elsign is non-0 and unsigned +otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, +cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or +floats for element number element_number into an array. A real array +is always signed. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +The structure of the array as a 1-, 2- or 3-dimensional array should +agree with the structure of the array given in the +ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, +ndimslow should be the array size and ndimfast and, for the 3D calls, +ndimmid, should be set to 1 both in the call and in the imgCIF data +being processed. If the array is 2-dimensional and a 3D call is used, +ndimslow and ndimmid should be the +")get_real_image_sf_as_string; + +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_real_image_sf_as_string; + +// Get the length correct + + void get_real_image_sf_as_string(int element_number, char **s, int *slen, + int elsize, int ndimslow, int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + cbf_failnez (cbf_get_real_image_sf(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } +%feature("autodoc", " +Returns : (Binary)String +*args : int element_number,int elsize,int elsign,int ndimslow,int ndimfast + +C prototype: int cbf_get_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, + int elsign, size_t ndimslow, size_t ndimfast); + +CBFLib documentation: +DESCRIPTION +cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image +array for element number element_number into an array. The array +consists of ndimslow×ndimfast elements of elsize bytes each, +starting at array. The elements are signed if elsign is non-0 and +unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and +cbf_get_real_image_sf read the image array of IEEE doubles or floats +for element number element_number into an array. A real array is +always signed. cbf_get_3d_image, cbf_get_3d_image_fs and +cbf_get_3d_image_sf read the 3D image array for element number +element_number into an array. The array consists of +ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting +at array. The elements are signed if elsign is non-0 and unsigned +otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, +cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or +floats for element number element_number into an array. A real array +is always signed. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +The structure of the array as a 1-, 2- or 3-dimensional array should +agree with the structure of the array given in the +ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, +ndimslow should be the array size and ndimfast and, for the 3D calls, +ndimmid, should be set to 1 both in the call and in the imgCIF data +being processed. If the array is 2-dimensional and a 3D call is used, +ndimslow and ndimmid should be the +")get_image_as_string; + +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_image_as_string; + +// Get the length correct + + void get_image_as_string(int element_number, char **s, int *slen, + int elsize, int elsign, int ndimslow, int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + cbf_failnez (cbf_get_image(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } +%feature("autodoc", " +Returns : +*args : String tagname,String tagroot_in + +C prototype: int cbf_set_tag_root (cbf_handle handle, const char* tagname, + const char*tagroot_in); + +CBFLib documentation: +DESCRIPTION +cbf_find_tag_root sets *tagroot to the root tag of which tagname is +an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in +the dictionary associated with handle, creating the dictionary if +necessary. cbf_require_tag_root sets *tagroot to the root tag of +which tagname is an alias, if there is one, or to the value of +tagname, if tagname is not an alias. +A returned tagroot string must not be modified in any way. +ARGUMENTS +handle CBF handle. tagname tag name which may be an alias. +tagroot pointer to a returned tag root name. tagroot_in input +tag root name. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_tag_root; + +void set_tag_root(const char* tagname, const char* tagroot_in){ + cbf_failnez(cbf_set_tag_root(self,tagname,tagroot_in)); +} +%feature("autodoc", " +Returns : +*args : String filename,Integer ciforcbf,Integer Headers,Integer encoding + +C prototype: int cbf_write_widefile (cbf_handle handle, FILE *file, + int readable, int ciforcbf, int flags, int encoding); + +CBFLib documentation: +DESCRIPTION +cbf_write_file writes the CBF object specified by handle into the +file file, following CIF 1.0 conventions of 80 character lines. +cbf_write_widefile writes the CBF object specified by handle into the +file file, following CIF 1.1 conventions of 2048 character lines. A +warning is issued to stderr for ascii lines over the limit, and an +attempt is made to fold lines to fit. No test is performed on binary +sections. +If a dictionary has been provided, aliases will be applied on output. +Unlike cbf_read_file, the file does not have to be random-access. +If the file is random-access and readable, readable can be set to +non-0 to indicate to CBFlib that the file can be used as a buffer to +conserve disk space. If the file is not random-access or not +readable, readable must be 0. +")write_widefile; + + void write_widefile(const char* filename, int ciforcbf, int headers, + int encoding){ + FILE *stream; + int readable; + /* Make readable false so we can close the file immediately */ + readable = 0; + if ( ! ( stream = fopen (filename, "w+b")) ){ + cbf_failnez(CBF_FILEOPEN); + } + else{ + cbf_failnez(cbf_write_widefile(self, stream, readable, + ciforcbf, headers, encoding)); + fclose(stream); + + } + } + +/* cfunc cbf_count_rows pyfunc count_rows + arg cbf_handle handle arg unsigned int *rows */ + +%feature("autodoc", " +Returns : Integer +*args : + +C prototype: int cbf_count_rows (cbf_handle handle, unsigned int *rows); + +CBFLib documentation: +DESCRIPTION +cbf_count_rows puts the number of rows in the current category in +*rows . +ARGUMENTS +handle CBF handle. rows Pointer to the destination row count. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")count_rows; + unsigned int count_rows(void){ + unsigned int result; + cbf_failnez(cbf_count_rows(self,&result)); + return result;} + +/* cfunc cbf_require_datablock pyfunc require_datablock + arg cbf_handle handle arg const char *datablockname */ + +%feature("autodoc", " +Returns : string +*args : + +C prototype: int cbf_require_datablock (cbf_handle handle, + const char *datablockname); + +CBFLib documentation: +DESCRIPTION +cbf_require_datablock makes the data block with name datablockname +the current data block, if it exists, or creates it if it does not. +The comparison is case-insensitive. +The current category becomes undefined. +ARGUMENTS +handle CBF handle. datablockname The name of the data +block to find or create. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")require_datablock; + void require_datablock(const char* arg){ + cbf_failnez(cbf_require_datablock(self,arg));} +%feature("autodoc", " +Returns : +*args : int compression,int binary_id,(binary) String data,int elsize, + int elsigned,int elements + +C prototype: int cbf_set_integerarray (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, int elsigned, size_t elements); + +CBFLib documentation: +DESCRIPTION +cbf_set_integerarray sets the binary value of the item at the current +column and row to an integer array. The array consists of elements +elements of elsize bytes each, starting at array. The elements are +signed if elsigned is non-0 and unsigned otherwise. binary_id is the +binary section identifier. cbf_set_realarray sets the binary value of +the item at the current column and row to an integer array. The array +consists of elements elements of elsize bytes each, starting at +array. binary_id is the binary section identifier. +The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, +cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, +cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants +allow the data header values of byteorder, dimfast, dimmid, dimslow +and padding to be set to the data byte order, the fastest, second +fastest and third fastest array dimensions and the size in byte of +the post data padding to be used. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +NOTE: This scheme is by far the slowest of the four and uses much +more disk space. It is intended for routine use with small arrays +only. With large arrays (like images) it should be used only for +debugging. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or +floats for cbf_set_realarray. If elsize is not equal to sizeof +(char), sizeof (short) or sizeof (int), the function returns +CBF_ARGUMENT. +ARGUMENTS +handle CBF handle. compression Compression method to use. +binary_id Integer binary identifier. array Pointer to the +source array. elsize Size in bytes of each source array +element. elsigned Set to non-0 if the source array elements are +signed. elements The number of elements in the array +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")set_integerarray; + + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray; + + void set_integerarray(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elsigned, int elements){ + /* safety check on args */ + size_t els, ele; + void *array; + if(len == elsize*elements){ + array = data; + els = elsize; + ele = elements; + cbf_failnez(cbf_set_integerarray (self, compression, binary_id, + (void *) data, (size_t) elsize, elsigned, (size_t) elements)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } + +/* cfunc cbf_new_datablock pyfunc new_datablock + arg cbf_handle handle arg const char *datablockname */ + +%feature("autodoc", " +Returns : string +*args : + +C prototype: int cbf_new_datablock (cbf_handle handle, + const char *datablockname); + +CBFLib documentation: +DESCRIPTION +cbf_new_datablock creates a new data block with name datablockname +and makes it the current data block. cbf_new_saveframe creates a new +save frame with name saveframename within the current data block and +makes the new save frame the current save frame. +If a data block or save frame with this name already exists, the +existing data block or save frame becomes the current data block or +save frame. +ARGUMENTS +handle CBF handle. datablockname The name of the new data +block. saveframename The name of the new save frame. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")new_datablock; + void new_datablock(const char* arg){ + cbf_failnez(cbf_new_datablock(self,arg));} +%feature("autodoc", " +Returns : +*args : int year,int month,int day,int hour,int minute,double second, + int timezone,Float precision + +C prototype: int cbf_set_datestamp (cbf_handle handle, unsigned int reserved, + int year, int month, int day, int hour, int minute, + double second, int timezone, double precision); + +CBFLib documentation: +DESCRIPTION +cbf_set_datestamp sets the collection timestamp in seconds since +January 1 1970 to the value specified by time. The timezone +difference from UTC +")set_datestamp; + + void set_datestamp(int year, int month, int day, int hour, + int minute, double second, int timezone, + double precision){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_set_datestamp(self,reserved, + year,month,day,hour,minute,second,timezone,precision)); + } + +/* cfunc cbf_next_row pyfunc next_row + arg cbf_handle handle */ + +%feature("autodoc", " +Returns : +*args : + +C prototype: int cbf_next_row (cbf_handle handle); + +CBFLib documentation: +DESCRIPTION +cbf_next_row makes the row following the current row in the current +category the current row. +If there are no more rows, the function returns CBF_NOTFOUND. +The current column is not affected. +ARGUMENTS +handle CBF handle. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")next_row; + void next_row(void){ + cbf_failnez(cbf_next_row(self));} +%feature("autodoc", " +Returns : +*args : String categoryname,String categoryroot + +C prototype: int cbf_set_category_root (cbf_handle handle, + const char* categoryname_in, const char*categoryroot); + +CBFLib documentation: +DESCRIPTION +cbf_find_category_root sets *categoryroot to the root category of +which categoryname is an alias. cbf_set_category_root sets +categoryname_in as an alias of categoryroot in the dictionary +associated with handle, creating the dictionary if necessary. +cbf_require_category_root sets *categoryroot to the root category of +which categoryname is an alias, if there is one, or to the value of +categoryname, if categoryname is not an alias. +A returned categoryroot string must not be modified in any way. +ARGUMENTS +handle CBF handle. categoryname category name which +may be an alias. categoryroot pointer to a returned category +root name. categoryroot_in input category root name. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_category_root; + +void set_category_root(const char* categoryname, const char* categoryroot){ + cbf_failnez(cbf_set_category_root(self,categoryname,categoryroot)); +} +%feature("autodoc", " +Returns : Float offset1,Float offset2,Float offset3 +*args : String axis_id + +C prototype: int cbf_get_axis_offset (cbf_handle handle, const char *axis_id, + double *offset1, double *offset2, double *offset3); + +CBFLib documentation: +DESCRIPTION +cbf_count_axis_ancestors sets ancestors to the number of ancestors of +axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor +axis of index ancestor_index of axis axis_id, starting with axis_id +for ancestor_index 0. +cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of +axis_id or to \". \" if there is no such ancestor. +cbf_get_axis_equipment sets *equipment to the equipment of axis_id or +to \". \" if there is no such equipment. +cbf_get_axis_equipment_component sets *equipment_component to the +equipment_component of axis_id or to \". \" if there is no such +equipment_component. +cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the +components of the ofset of axis_id. +cbf_get_axis_rotation sets rotation to the rotation of axis_id or to +0 if there is no such rotation. cbf_get_axis_rotation_axis sets +*rotation_axis to the rotation_axis of axis_id or to \". \" if there +is no such rotation_axis. +cbf_get_axis_setting sets *start and *increment to the corresponding +values of the axis axis_id. Any of the destination pointers may be +NULL. +cbf_get_axis_type sets axis_type to the type of axis_id. +cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the +components of the vector of axis_id. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any +value other than 0 is invalid. axis_id Axis id. +ancestor_index Integer index of the desired ancestor, starting +with 0 for the current axis_id. ancestor Pointer to +destination ancestor name pointer. depends_on Pointer to +destination depends_on name pointer. equipment Pointer to +destination equipment name pointer. equipment_component Pointer to +destination equipment_component name pointer. offset1 +Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. +rotation Pointer to destination rotation value. +rotation_axis Pointer to destination rotation_axisn name +pointer. start Pointer to the destination start +value. increment Pointer to the destination increment +value. type Pointer to destination axis type of type +. vector1 Pointer to destination first vector component +value. vector2 Pointer to destination second vector +component value. vector3 Pointer to destination third +vector component value. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_axis_offset; + +%apply double *OUTPUT {double *offset1, double *offset2, double offset3} get_axis_offset; + void get_axis_offset(const char *axis_id, + double *offset1, double *offset2, double*offset3){ + cbf_failnez(cbf_get_axis_offset(self,axis_id, + offset1, offset2,offset3)); + } +%feature("autodoc", " +Returns : +*args : Int element_number,Int axis_number,Float pixel size + +C prototype: int cbf_set_pixel_size_fs(cbf_handle handle, + unsigned int element_number, int axis_number, + double psize); + +CBFLib documentation: +DESCRIPTION +cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the +\"size \" column of the \"array_structure_list \" category at the +row which matches axis axis_number of the detector element +element_number converting the double pixel size psize from meters to +millimeters in storing it in the \"size \" column for the axis +axis_number of the detector element element_number. The axis_number +is numbered from 1, starting with the slowest axis. +cbf_set_pixel_size_fs sets the item in the \"size \" column of the +\"array_structure_list \" category at the row which matches axis +axis_number of the detector element element_number converting the +double pixel size psize from meters to millimeters in storing it in +the \"size \" column for the axis axis_number of the detector +element element_number. The axis_number is numbered from 1, starting +with the fastest axis. +If a negative axis number is given, the order of axes is reversed, so +that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the +fastest axis for cbf_get_pixel_size_sf. +If the \"array_structure_list \" category does not already exist, it +is created. +If the appropriate row in the \"array_structure_list \" catgeory +does not already exist, it is created. +If the pixel size is not given explcitly in the \"array_element_size +category \", the function returns CBF_NOTFOUND. +ARGUMENTS +handle CBF handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. axis_number The number of the +axis, fastest first, starting from 1. +")set_pixel_size_fs; + + void set_pixel_size_fs (unsigned int element_number, + unsigned int axis_number, double psize){ + cbf_failnez(cbf_set_pixel_size_fs(self, + element_number, + axis_number, + psize)); + } + +/* cfunc cbf_insert_row pyfunc insert_row + arg cbf_handle handle arg unsigned int rownumber */ + +%feature("autodoc", " +Returns : +*args : Integer + +C prototype: int cbf_insert_row (cbf_handle handle, unsigned int rownumber); + +CBFLib documentation: +DESCRIPTION +cbf_insert_row adds a new row to the current category. The new row is +inserted as row rownumber and existing rows starting from rownumber +are moved up by 1. The new row becomes the current row. +If the category has fewer than rownumber rows, the function returns +CBF_NOTFOUND. +The row numbers start from 0. +ARGUMENTS +handle CBF handle. rownumber The row number of the new row. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")insert_row; + void insert_row(unsigned int arg){ + cbf_failnez(cbf_insert_row(self,arg));} + +/* cfunc cbf_new_column pyfunc new_column + arg cbf_handle handle arg const char *columnname */ + +%feature("autodoc", " +Returns : string +*args : + +C prototype: int cbf_new_column (cbf_handle handle, const char *columnname); + +CBFLib documentation: +DESCRIPTION +cbf_new_column creates a new column in the current category with name +columnname and makes it the current column. +If a column with this name already exists, the existing column +becomes the current category. +ARGUMENTS +handle CBF handle. columnname The name of the new column. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")new_column; + void new_column(const char* arg){ + cbf_failnez(cbf_new_column(self,arg));} +%feature("autodoc", " +Returns : (Binary)String +*args : int element_number,int elsize,int ndimslow,int ndimmid,int ndimfast + +C prototype: int cbf_get_real_3d_image (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + void *array, size_t elsize, size_t ndimslow, + size_t ndimmid, size_t ndimfast); + +CBFLib documentation: +DESCRIPTION +cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image +array for element number element_number into an array. The array +consists of ndimslow×ndimfast elements of elsize bytes each, +starting at array. The elements are signed if elsign is non-0 and +unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and +cbf_get_real_image_sf read the image array of IEEE doubles or floats +for element number element_number into an array. A real array is +always signed. cbf_get_3d_image, cbf_get_3d_image_fs and +cbf_get_3d_image_sf read the 3D image array for element number +element_number into an array. The array consists of +ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting +at array. The elements are signed if elsign is non-0 and unsigned +otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, +cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or +floats for element number element_number into an array. A real array +is always signed. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +The structure of the array as a 1-, 2- or 3-dimensional array should +agree with the structure of the array given in the +ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, +ndimslow should be the array size and ndimfast and, for the 3D calls, +ndimmid, should be set to 1 both in the call and in the imgCIF data +being processed. If the array is 2-dimensional and a 3D call is used, +ndimslow and ndimmid should be the +")get_real_3d_image_as_string; + +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_real_3d_image_as_string; + +// Get the length correct + + void get_real_3d_image_as_string(int element_number, char **s, int *slen, + int elsize, int ndimslow, int ndimmid, int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + cbf_failnez (cbf_get_real_3d_image(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } +%feature("autodoc", " +Returns : Float time +*args : + +C prototype: int cbf_get_integration_time (cbf_handle handle, + unsigned int reserved, double *time); + +CBFLib documentation: +DESCRIPTION +cbf_get_integration_time sets *time to the integration time in +seconds. The parameter reserved is presently unused and should be set +to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any value other than 0 is +invalid. time Pointer to the destination time. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_integration_time; + +%apply double *OUTPUT {double *time} get_integration_time; + void get_integration_time( double *time ){ + unsigned int reserved; + double tim; + reserved = 0; + cbf_failnez(cbf_get_integration_time(self,reserved,&tim)); + *time = tim; + } +%feature("autodoc", " +Returns : +*args : int compression,int binary_id,(binary) String data,int elsize, + int elements + +C prototype: int cbf_set_realarray (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, size_t elements); + +CBFLib documentation: +DESCRIPTION +cbf_set_integerarray sets the binary value of the item at the current +column and row to an integer array. The array consists of elements +elements of elsize bytes each, starting at array. The elements are +signed if elsigned is non-0 and unsigned otherwise. binary_id is the +binary section identifier. cbf_set_realarray sets the binary value of +the item at the current column and row to an integer array. The array +consists of elements elements of elsize bytes each, starting at +array. binary_id is the binary section identifier. +The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, +cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, +cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants +allow the data header values of byteorder, dimfast, dimmid, dimslow +and padding to be set to the data byte order, the fastest, second +fastest and third fastest array dimensions and the size in byte of +the post data padding to be used. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +NOTE: This scheme is by far the slowest of the four and uses much +more disk space. It is intended for routine use with small arrays +only. With large arrays (like images) it should be used only for +debugging. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or +floats for cbf_set_realarray. If elsize is not equal to sizeof +(char), sizeof (short) or sizeof (int), the function returns +CBF_ARGUMENT. +ARGUMENTS +handle CBF handle. compression Compression method to use. +binary_id Integer binary identifier. array Pointer to the +source array. elsize Size in bytes of each source array +element. elsigned Set to non-0 if the source array elements are +signed. elements The number of elements in the array +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")set_realarray; + + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray; + + void set_realarray(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elements){ + /* safety check on args */ + size_t els, ele; + void *array; + if(len == elsize*elements){ + array = data; + els = elsize; + ele = elements; + cbf_failnez(cbf_set_realarray (self, compression, binary_id, + (void *) data, (size_t) elsize, (size_t) elements)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +%feature("autodoc", " +Returns : String +*args : Integer element_number + +C prototype: int cbf_get_element_id (cbf_handle handle, + unsigned int element_number, const char **element_id); + +CBFLib documentation: +DESCRIPTION +cbf_get_element_number sets element_number to a number that can be +used in other cbf_simple calls to identify the detector element +element_id and optionally the specific array_id> and +array_section_id. cbf_get_element_id sets *element_id to point to the +ASCII value of the element_number'th +\"diffrn_data_frame.detector_element_id \" entry, counting from 0. +The element_number is the ordinal of the detector element in the +DIFFRN_DETECTOR_ELEMENT category. If an array_section_id is specified +(i.e. is not NULL), the element_number is the sum of the ordinal of +the detector element plus the number of detector elements multiplied +by the ordinal of array_section_id for the specified array_id> in the +ARRAY_STRUCTURE_LIST_SECTION category. +If the detector element does not exist, the function returns +CBF_NOTFOUND. +The element_id will be valid as long as the item exists and has not +been set to a new value. +The element_id must not be modified by the program in any way. +ARGUMENTS +handle CBF handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. element_id Pointer to the +destination string for cbf_get_element_id, but the string itself for +cbf_get_element_number. array_id The optional array id or +NULL. array_section_id The optional array_section_id or NULL. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_element_id; + + const char * get_element_id(unsigned int element_number){ + const char * result; + cbf_failnez(cbf_get_element_id (self, element_number, &result)); + return result; + } +%feature("autodoc", " +Returns : (Binary)String +*args : int element_number,int elsize,int elsign,int ndimslow,int ndimfast + +C prototype: int cbf_get_image_sf (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, + int elsign, size_t ndimslow, size_t ndimfast); + +CBFLib documentation: +DESCRIPTION +cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image +array for element number element_number into an array. The array +consists of ndimslow×ndimfast elements of elsize bytes each, +starting at array. The elements are signed if elsign is non-0 and +unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and +cbf_get_real_image_sf read the image array of IEEE doubles or floats +for element number element_number into an array. A real array is +always signed. cbf_get_3d_image, cbf_get_3d_image_fs and +cbf_get_3d_image_sf read the 3D image array for element number +element_number into an array. The array consists of +ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting +at array. The elements are signed if elsign is non-0 and unsigned +otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, +cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or +floats for element number element_number into an array. A real array +is always signed. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +The structure of the array as a 1-, 2- or 3-dimensional array should +agree with the structure of the array given in the +ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, +ndimslow should be the array size and ndimfast and, for the 3D calls, +ndimmid, should be set to 1 both in the call and in the imgCIF data +being processed. If the array is 2-dimensional and a 3D call is used, +ndimslow and ndimmid should be the +")get_image_sf_as_string; + +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_image_fs_as_string; + +// Get the length correct + + void get_image_sf_as_string(int element_number, char **s, int *slen, + int elsize, int elsign, int ndimslow, int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + cbf_failnez (cbf_get_image_sf(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } +%feature("autodoc", " +Returns : pycbf positioner object +*args : String axis_id + +C prototype: int cbf_construct_positioner (cbf_handle handle, + cbf_positioner *positioner, const char *axis_id); + +CBFLib documentation: +DESCRIPTION +cbf_construct_positioner constructs a positioner object for the axis +given by axis_id using the description in the CBF object handle and +initialises the positioner handle *positioner. +cbf_construct_reference positioner constructs a positioner object for +the axis given by axis_id using the description in the CBF object +handle and initialises the detector handle *detector using the +reference settings of the axes. +ARGUMENTS +handle CBF handle. positioner Pointer to the destination +positioner handle. axis_id The identifier of the axis in the +\"axis \" category. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")construct_positioner; + + cbf_positioner construct_positioner(const char* axis_id){ + cbf_positioner positioner; + cbf_failnez(cbf_construct_positioner(self,&positioner,axis_id)); + return positioner; + } +%feature("autodoc", " +Returns : size_t ndimfast,size_t ndimmid,size_t ndimslow +*args : Integer element_number + +C prototype: int cbf_get_3d_image_size_fs (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + size_t *ndimfast, size_t *ndimmid, size_t *ndimslow); + +CBFLib documentation: +DESCRIPTION +cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf +set *ndimslow and *ndimfast to the slow and fast dimensions of the +image array for element number element_number. If the array is +1-dimensional, *ndimslow will be set to the array size and *ndimfast +will be set to 1. If the array is 3-dimensional an error code will be +returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and +cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the +slowest, next fastest and fastest dimensions, respectively, of the 3D +image array for element number element_number. If the array is +1-dimensional, *ndimslow will be set to the array size and *ndimmid +and +")get_3d_image_size; + +%apply int *OUTPUT {int *ndimslow, int *ndimmid, int *ndimfast} get_3d_image_size; + void get_3d_image_size_fs(unsigned int element_number, int *ndimfast, int *ndimmid, int *ndimslow){ + unsigned int reserved; + size_t inslow, inmid, infast; + reserved = 0; + cbf_failnez(cbf_get_3d_image_size_fs(self,reserved,element_number,&infast,&inmid,&inslow)); + *ndimslow = (int)inslow; /* FIXME - is that how to convert? */ + *ndimmid = (int)inmid; + *ndimfast = (int)infast; + } + +/* cfunc cbf_set_value pyfunc set_value + arg cbf_handle handle arg const char *value */ + +%feature("autodoc", " +Returns : string +*args : + +C prototype: int cbf_set_value (cbf_handle handle, const char *value); + +CBFLib documentation: +DESCRIPTION +cbf_set_value sets the item at the current column and row to the +ASCII value value. +ARGUMENTS +handle CBF handle. value ASCII value. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")set_value; + void set_value(const char* arg){ + cbf_failnez(cbf_set_value(self,arg));} +%feature("autodoc", " +Returns : +*args : Integer timezone + +C prototype: int cbf_set_current_timestamp (cbf_handle handle, + unsigned int reserved, int timezone); + +CBFLib documentation: +DESCRIPTION +cbf_set_current_timestamp sets the collection timestamp to the +current time. The timezone difference from UTC in minutes is set to +timezone. If no timezone is desired, timezone should be +CBF_NOTIMEZONE. If no timezone is used, the timest amp will be UTC. +The parameter reserved is presently unused and should be set to 0. +The new timestamp will have a precision of 1 second. +ARGUMENTS +handle CBF handle. reserved Unused. Any value other than 0 is +invalid. timezone Timezone difference from UTC in minutes or +CBF_NOTIMEZONE. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_current_timestamp; + + void set_current_timestamp(int timezone){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_set_current_timestamp(self,reserved,timezone)); + } +%feature("autodoc", " +Returns : Float Number +*args : Float Default + +C prototype: int cbf_require_doublevalue (cbf_handle handle, double *number, + double defaultvalue); + +CBFLib documentation: +DESCRIPTION +cbf_get_doublevalue sets *number to the value of the ASCII item at +the current column and row interpreted as a decimal floating-point +number. cbf_require_doublevalue sets *number to the value of the +ASCII item at the current column and row interpreted as a decimal +floating-point number, setting it to defaultvalue if necessary. +If the value is not ASCII, the function returns CBF_BINARY. +ARGUMENTS +handle CBF handle. number Pointer to the destination +number. defaultvalue default number value. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")require_doublevalue; + +%apply double *OUTPUT {double *number} require_doublevalue; +void require_doublevalue(double *number, double defaultvalue){ + cbf_failnez(cbf_require_doublevalue(self,number,defaultvalue)); +} + +/* cfunc cbf_rewind_datablock pyfunc rewind_datablock + arg cbf_handle handle */ + +%feature("autodoc", " +Returns : +*args : + +C prototype: int cbf_rewind_datablock (cbf_handle handle); + +CBFLib documentation: +DESCRIPTION +cbf_rewind_datablock makes the first data block the current data +block. +If there are no data blocks, the function returns CBF_NOTFOUND. +The current category becomes undefined. +ARGUMENTS +handle CBF handle. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")rewind_datablock; + void rewind_datablock(void){ + cbf_failnez(cbf_rewind_datablock(self));} +%feature("autodoc", " +Returns : String Name +*args : String columnnanme,String Default + +C prototype: int cbf_require_column_value (cbf_handle handle, + const char *columnname, const char **value, + const char *defaultvalue); + +CBFLib documentation: +DESCRIPTION +cbf_require_column_doublevalue sets *value to the ASCII item at the +current row for the column given with the name given by *columnname, +or to the string given by defaultvalue if the item cannot be found. +ARGUMENTS +handle CBF handle. columnname Name of the column +containing the number. value pointer to the location to +receive the value. defaultvalue Value to use if the requested +column and value cannot be found. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")require_column_value; + + const char* require_column_value(const char *columnname, + const char *defaultvalue){ + const char * result; + cbf_failnez(cbf_require_column_value(self,columnname, + &result,defaultvalue)); + return result; +} +%feature("autodoc", " +Returns : CBFHandle dictionary +*args : + +C prototype: int cbf_get_dictionary (cbf_handle handle, + cbf_handle * dictionary); + +CBFLib documentation: +DESCRIPTION +cbf_get_dictionary sets *dictionary to the handle of a CBF which has +been associated with the CBF handle by cbf_set_dictionary. +cbf_set_dictionary associates the CBF handle dictionary_in with +handle as its dictionary. cbf_require_dictionary sets *dictionary to +the handle of a CBF which has been associated with the CBF handle by +cbf_set_dictionary or creates a new empty CBF and associates it with +handle, returning the new handle in *dictionary. +ARGUMENTS +handle CBF handle. dictionary Pointer to CBF handle of +dictionary. dictionary_in CBF handle of dcitionary. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_dictionary; + +cbf_handle get_dictionary(){ + cbf_handle temp; + cbf_failnez(cbf_get_dictionary(self,&temp)); + return temp; +} + +/* cfunc cbf_reset_saveframe pyfunc reset_saveframe + arg cbf_handle handle */ + +%feature("autodoc", " +Returns : +*args : + +C prototype: int cbf_reset_saveframe (cbf_handle handle); + +CBFLib documentation: +DESCRIPTION +cbf_reset_datablock deletes all categories from the current data +block. cbf_reset_saveframe deletes all categories from the current +save frame. +ARGUMENTS +handle CBF handle. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")reset_saveframe; + void reset_saveframe(void){ + cbf_failnez(cbf_reset_saveframe(self));} +%feature("autodoc", " +Returns : +*args : double cell[6] + +C prototype: int cbf_set_reciprocal_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); + +CBFLib documentation: +DESCRIPTION +cbf_set_reciprocal_cell sets the reciprocal cell parameters to the +double values given in cell[0:2] for the reciprocal cell edge lengths +a^*, b^* and c^* in Ångstroms^-1, the double values given in +cell[3:5] for the reciprocal cell angles α^*, β^* and γ^* in +degrees, the double values given in cell_esd[0:2] for the estimated +strandard deviations of the reciprocal cell edge lengths a^*, b^* and +c^* in Ångstroms, and the double values given in cell_esd[3:5] for +the estimated standard deviations of the reciprocal cell angles α^*, +β^* and γ^* in degrees. +The values are placed in the first row of the \"cell \" category. If +no value has been given for \"_cell.entry_id \", it is set to the +value of the \"diffrn.id \" entry of the current data block. +cell or cell_esd may be NULL. +If cell is NULL, the reciprocal cell parameters are not set. +If cell_esd is NULL, the reciprocal cell parameter esds are not set. +If the \"cell \" category is not present, it is created. If any of +the necessary columns are not present, they are created. +ARGUMENTS +handle CBF handle. cell Pointer to the array of 6 doubles +for the reciprocal cell parameters. cell_esd Pointer to the array +of 6 doubles for the reciprocal cell parameter esds. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")set_reciprocal_cell; + + void set_reciprocal_cell(double cell[6]) { + cbf_failnez(cbf_set_reciprocal_cell(self,cell,NULL)); + } +%feature("autodoc", " +Returns : +*args : double cell_esd[6] + +C prototype: int cbf_set_reciprocal_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); + +CBFLib documentation: +DESCRIPTION +cbf_set_reciprocal_cell sets the reciprocal cell parameters to the +double values given in cell[0:2] for the reciprocal cell edge lengths +a^*, b^* and c^* in Ångstroms^-1, the double values given in +cell[3:5] for the reciprocal cell angles α^*, β^* and γ^* in +degrees, the double values given in cell_esd[0:2] for the estimated +strandard deviations of the reciprocal cell edge lengths a^*, b^* and +c^* in Ångstroms, and the double values given in cell_esd[3:5] for +the estimated standard deviations of the reciprocal cell angles α^*, +β^* and γ^* in degrees. +The values are placed in the first row of the \"cell \" category. If +no value has been given for \"_cell.entry_id \", it is set to the +value of the \"diffrn.id \" entry of the current data block. +cell or cell_esd may be NULL. +If cell is NULL, the reciprocal cell parameters are not set. +If cell_esd is NULL, the reciprocal cell parameter esds are not set. +If the \"cell \" category is not present, it is created. If any of +the necessary columns are not present, they are created. +ARGUMENTS +handle CBF handle. cell Pointer to the array of 6 doubles +for the reciprocal cell parameters. cell_esd Pointer to the array +of 6 doubles for the reciprocal cell parameter esds. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")set_reciprocal_cell_esd; + + void set_reciprocal_cell_esd(double cell_esd[6]) { + cbf_failnez(cbf_set_reciprocal_cell(self,NULL,cell_esd)); + } +%feature("autodoc", " +Returns : +*args : int element_number,int compression,(binary) String data,int elsize, + int dimfast,int dimmid,int dimslow + +C prototype: int cbf_set_real_3d_image_fs(cbf_handle handle, + unsigned int reserved, unsigned int element_number, + unsigned int compression, void *array,size_t elsize, + size_t ndimfast, size_t ndimmid, size_t ndimslow); + +CBFLib documentation: +DESCRIPTION +cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image +array for element number element_number. The array consists of +ndimfast×ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-zero and unsigned otherwise. +cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf +write the image array for element number element_number. The array +consists of ndimfast×ndimslow IEEE double or float elements of +elsize bytes each, starting at array. cbf_set_3d_image, +cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array +for element number element_number. The array consists of +ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting +at array. The elements are signed if elsign is non-0 and unsigned +otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and +cbf_set_real_3d_image_sf writes the 3D image array for element number +element_number. The array consists of ndimfast×ndimmid×ndimslow +IEEE double or float elements of elsize bytes each, starting at +array. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +If the array is 1-dimensional, ndimslow should be the array size and +ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the +array is 2-dimensional and the 3D calls are used, ndimslow and +ndimmid should be used for the array dimensions and ndimfast should +be set to 1. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET +Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for +cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof +(int), sizeof(double) or sizeof(float), the function returns +CBF_ARGUMENT. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any value other +than 0 is invalid. element_number The number of the detector +element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. compression Compression type. +array Pointer to the image array. elsize Size in +bytes of each image array element. elsigned Set to non-0 if +the image array elements are signed. ndimslow Slowest array +dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_real_3d_image_fs; + + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_3d_image_fs; + + void set_real_3d_image_fs(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int ndimfast, int ndimmid, int ndimslow){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_real_3d_image_fs (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +%feature("autodoc", " +Returns : +*args : String format,Float number + +C prototype: int cbf_set_doublevalue (cbf_handle handle, const char *format, + double number); + +CBFLib documentation: +DESCRIPTION +cbf_set_doublevalue sets the item at the current column and row to +the floating-point value number written as an ASCII string with the +format specified by format as appropriate for the printf function. +ARGUMENTS +handle CBF handle. format Format for the number. number +Floating-point value. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")set_doublevalue; + + void set_doublevalue(const char *format, double number){ + cbf_failnez(cbf_set_doublevalue(self,format,number));} + +/* cfunc cbf_find_category pyfunc find_category + arg cbf_handle handle arg const char *categoryname */ + +%feature("autodoc", " +Returns : string +*args : + +C prototype: int cbf_find_category (cbf_handle handle, + const char *categoryname); + +CBFLib documentation: +DESCRIPTION +cbf_find_category makes the category in the current data block with +name categoryname the current category. +The comparison is case-insensitive. +If the category does not exist, the function returns CBF_NOTFOUND. +The current column and row become undefined. +ARGUMENTS +handle CBF handle. categoryname The name of the category to +find. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")find_category; + void find_category(const char* arg){ + cbf_failnez(cbf_find_category(self,arg));} +%feature("autodoc", " +Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, + int elements,int minelement,int maxelement,char **bo,int *bolen, + int dimfast,int dimmid,int dimslow,int padding +*args : + +C prototype: int cbf_get_integerarrayparameters_wdims_fs (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + int *elsigned, int *elunsigned, size_t *elements, + int *minelement, int *maxelement, const char **byteorder, + size_t *dimfast, size_t *dimmid, size_t *dimslow, + size_t *padding); + +CBFLib documentation: +DESCRIPTION +cbf_get_integerarrayparameters sets *compression, *binary_id, +*elsize, *elsigned, *elunsigned, *elements, *minelement and +*maxelement to values read from the binary value of the item at the +current column and row. This provides all the arguments needed for a +subsequent call to cbf_set_integerarray, if a copy of the array is to +be made into another CIF or CBF. cbf_get_realarrayparameters sets +*compression, *binary_id, *elsize, *elements to values read from the +binary value of the item at the current column and row. This provides +all the arguments needed for a subsequent call to cbf_set_realarray, +if a copy of the arry is to be made into another CIF or CBF. +The variants cbf_get_integerarrayparameters_wdims, +cbf_get_integerarrayparameters_wdims_fs, +cbf_get_integerarrayparameters_wdims_sf, +cbf_get_realarrayparameters_wdims, +cbf_get_realarrayparameters_wdims_fs, +cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, +*dimmid, *dimslow, and *padding as well, providing the additional +parameters needed for a subsequent call to cbf_set_integerarray_wdims +or cbf_set_realarray_wdims. +The value returned in *byteorder is a pointer either to the string +\"little_endian \" or to the string \"big_endian \". This should be +the byte order of the data, not necessarily of the host machine. No +attempt should be made to modify this string. At this time only +\"little_endian \" will be returned. +The values returned in *dimfast, *dimmid and *dimslow are the sizes +of the fastest changing, second fastest changing and third fastest +changing dimensions of the array, if specified, or zero, if not +specified. +The value returned in *padding is the size of the post-data padding, +if any and if specified in the data header. The value is given as a +count of octets. +If the value is not binary, the function returns CBF_ASCII. +ARGUMENTS +handle CBF handle. compression Compression method used. +elsize Size in bytes of each array element. binary_id +Pointer to the destination integer binary identifier. elsigned +Pointer to an integer. Set to 1 if the elements can be read as signed +integers. elunsigned Pointer to an integer. Set to 1 if the +elements can be read as unsigned integers. elements Pointer to +the destination number of elements. minelement Pointer to the +destination smallest element. maxelement Pointer to the +destination largest element. byteorder Pointer to the destination +byte order. dimfast Pointer to the destination fastest +dimension. dimmid Pointer to the destination second fastest +dimension. dimslow Pointer to the destination third fastest +dimension. padding Pointer to the destination padding size. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")get_integerarrayparameters_wdims_fs; + +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement, + int *dimfast, int *dimmid, int *dimslow, int *padding} + get_integerarrayparameters_wdims_fs; + + void get_integerarrayparameters_wdims_fs(int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement, + char **bo, int *bolen, + int *dimfast, int *dimmid, int *dimslow, int *padding + ){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + cbf_failnez(cbf_get_integerarrayparameters_wdims_fs(self, + &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, + minelement, maxelement, &byteorder,&df,&dm,&ds,&pd )); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +%feature("autodoc", " +Returns : +*args : int compression,int binary_id,(binary) String data,int elsize, + int elements,String byteorder,int dimfast,int dimmid,int dimslow, + int padding + +C prototype: int cbf_set_realarray_wdims_fs (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, size_t elements, const char *byteorder, + size_t dimfast, size_t dimmid, size_t dimslow, + size_t padding); + +CBFLib documentation: +DESCRIPTION +cbf_set_integerarray sets the binary value of the item at the current +column and row to an integer array. The array consists of elements +elements of elsize bytes each, starting at array. The elements are +signed if elsigned is non-0 and unsigned otherwise. binary_id is the +binary section identifier. cbf_set_realarray sets the binary value of +the item at the current column and row to an integer array. The array +consists of elements elements of elsize bytes each, starting at +array. binary_id is the binary section identifier. +The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, +cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, +cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants +allow the data header values of byteorder, dimfast, dimmid, dimslow +and padding to be set to the data byte order, the fastest, second +fastest and third fastest array dimensions and the size in byte of +the post data padding to be used. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +NOTE: This scheme is by far the slowest of the four and uses much +more disk space. It is intended for routine use with small arrays +only. With large arrays (like images) it should be used only for +debugging. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or +floats for cbf_set_realarray. If elsize is not equal to sizeof +(char), sizeof (short) or sizeof (int), the function returns +CBF_ARGUMENT. +ARGUMENTS +handle CBF handle. compression Compression method to use. +binary_id Integer binary identifier. array Pointer to the +source array. elsize Size in bytes of each source array +element. elsigned Set to non-0 if the source array elements are +signed. elements The number of elements in the array +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")set_realarray_wdims_fs; + + /* CBFlib must NOT modify the data string nor the byteorder string + which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray_wdims_fs; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_realarray_wdims_fs; + + void set_realarray_wdims_fs(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elements, + char *bo, int bolen, int dimfast, int dimmid, int dimslow, int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + cbf_failnez(cbf_set_realarray_wdims_fs (self, compression, binary_id, + (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder, + (size_t) dimfast, (size_t) dimmid, (size_t) dimslow, (size_t)padding)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +%feature("autodoc", " +Returns : String categoryroot +*args : String categoryname + +C prototype: int cbf_find_category_root (cbf_handle handle, + const char* categoryname, const char** categoryroot); + +CBFLib documentation: +DESCRIPTION +cbf_find_category_root sets *categoryroot to the root category of +which categoryname is an alias. cbf_set_category_root sets +categoryname_in as an alias of categoryroot in the dictionary +associated with handle, creating the dictionary if necessary. +cbf_require_category_root sets *categoryroot to the root category of +which categoryname is an alias, if there is one, or to the value of +categoryname, if categoryname is not an alias. +A returned categoryroot string must not be modified in any way. +ARGUMENTS +handle CBF handle. categoryname category name which +may be an alias. categoryroot pointer to a returned category +root name. categoryroot_in input category root name. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")find_category_root; + +const char* find_category_root(const char* categoryname){ + const char * result; + cbf_failnez(cbf_find_category_root(self,categoryname,&result)); + return result; +} +%feature("autodoc", " +Returns : +*args : int compression,int binary_id,(binary) String data,int elsize, + int elsigned,int elements,String byteorder,int dimfast,int dimmid, + int dimslow,int padding + +C prototype: int cbf_set_integerarray_wdims_fs (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, int elsigned, size_t elements, + const char *byteorder, size_t dimfast, size_t dimmid, + size_t dimslow, size_t padding); + +CBFLib documentation: +DESCRIPTION +cbf_set_integerarray sets the binary value of the item at the current +column and row to an integer array. The array consists of elements +elements of elsize bytes each, starting at array. The elements are +signed if elsigned is non-0 and unsigned otherwise. binary_id is the +binary section identifier. cbf_set_realarray sets the binary value of +the item at the current column and row to an integer array. The array +consists of elements elements of elsize bytes each, starting at +array. binary_id is the binary section identifier. +The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, +cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, +cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants +allow the data header values of byteorder, dimfast, dimmid, dimslow +and padding to be set to the data byte order, the fastest, second +fastest and third fastest array dimensions and the size in byte of +the post data padding to be used. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +NOTE: This scheme is by far the slowest of the four and uses much +more disk space. It is intended for routine use with small arrays +only. With large arrays (like images) it should be used only for +debugging. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or +floats for cbf_set_realarray. If elsize is not equal to sizeof +(char), sizeof (short) or sizeof (int), the function returns +CBF_ARGUMENT. +ARGUMENTS +handle CBF handle. compression Compression method to use. +binary_id Integer binary identifier. array Pointer to the +source array. elsize Size in bytes of each source array +element. elsigned Set to non-0 if the source array elements are +signed. elements The number of elements in the array +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")set_integerarray_wdims_fs; + + /* CBFlib must NOT modify the data string nor the byteorder string + which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray_wdims_fs; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_integerarray_wdims_fs; + + void set_integerarray_wdims_fs(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elsigned, int elements, + char *bo, int bolen, int dimfast, int dimmid, int dimslow, int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + cbf_failnez(cbf_set_integerarray_wdims_fs (self, compression, binary_id, + (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder, + (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +%feature("autodoc", " +Returns : +*args : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimslow,int dimfast + +C prototype: int cbf_set_image_sf(cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array, size_t elsize, int elsign, size_t ndimslow, + size_t ndimfast); + +CBFLib documentation: +DESCRIPTION +cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image +array for element number element_number. The array consists of +ndimfast×ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-zero and unsigned otherwise. +cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf +write the image array for element number element_number. The array +consists of ndimfast×ndimslow IEEE double or float elements of +elsize bytes each, starting at array. cbf_set_3d_image, +cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array +for element number element_number. The array consists of +ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting +at array. The elements are signed if elsign is non-0 and unsigned +otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and +cbf_set_real_3d_image_sf writes the 3D image array for element number +element_number. The array consists of ndimfast×ndimmid×ndimslow +IEEE double or float elements of elsize bytes each, starting at +array. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +If the array is 1-dimensional, ndimslow should be the array size and +ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the +array is 2-dimensional and the 3D calls are used, ndimslow and +ndimmid should be used for the array dimensions and ndimfast should +be set to 1. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET +Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for +cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof +(int), sizeof(double) or sizeof(float), the function returns +CBF_ARGUMENT. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any value other +than 0 is invalid. element_number The number of the detector +element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. compression Compression type. +array Pointer to the image array. elsize Size in +bytes of each image array element. elsigned Set to non-0 if +the image array elements are signed. ndimslow Slowest array +dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_image_sf; + + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_image_sf; + + void set_image_sf(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int elsign, int ndimslow, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_image_sf (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +%feature("autodoc", " +Returns : String +*args : String axis_id + +C prototype: int cbf_get_axis_equipment (cbf_handle handle, + const char *axis_id, const char * *equipment); + +CBFLib documentation: +DESCRIPTION +cbf_count_axis_ancestors sets ancestors to the number of ancestors of +axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor +axis of index ancestor_index of axis axis_id, starting with axis_id +for ancestor_index 0. +cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of +axis_id or to \". \" if there is no such ancestor. +cbf_get_axis_equipment sets *equipment to the equipment of axis_id or +to \". \" if there is no such equipment. +cbf_get_axis_equipment_component sets *equipment_component to the +equipment_component of axis_id or to \". \" if there is no such +equipment_component. +cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the +components of the ofset of axis_id. +cbf_get_axis_rotation sets rotation to the rotation of axis_id or to +0 if there is no such rotation. cbf_get_axis_rotation_axis sets +*rotation_axis to the rotation_axis of axis_id or to \". \" if there +is no such rotation_axis. +cbf_get_axis_setting sets *start and *increment to the corresponding +values of the axis axis_id. Any of the destination pointers may be +NULL. +cbf_get_axis_type sets axis_type to the type of axis_id. +cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the +components of the vector of axis_id. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any +value other than 0 is invalid. axis_id Axis id. +ancestor_index Integer index of the desired ancestor, starting +with 0 for the current axis_id. ancestor Pointer to +destination ancestor name pointer. depends_on Pointer to +destination depends_on name pointer. equipment Pointer to +destination equipment name pointer. equipment_component Pointer to +destination equipment_component name pointer. offset1 +Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. +rotation Pointer to destination rotation value. +rotation_axis Pointer to destination rotation_axisn name +pointer. start Pointer to the destination start +value. increment Pointer to the destination increment +value. type Pointer to destination axis type of type +. vector1 Pointer to destination first vector component +value. vector2 Pointer to destination second vector +component value. vector3 Pointer to destination third +vector component value. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_axis_equipment; + + const char * get_axis_equipment(const char *axis_id){ + const char* equip; + cbf_failnez(cbf_get_axis_equipment(self,axis_id, + &equip)); + return equip; + } +%feature("autodoc", " +Returns : +*args : double cell[6] + +C prototype: int cbf_set_unit_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); + +CBFLib documentation: +DESCRIPTION +cbf_set_unit_cell sets the cell parameters to the double values given +in cell[0:2] for the cell edge lengths a, b and c in Ångstroms, the +double values given in cell[3:5] for the cell angles α, β and γ in +degrees, the double values given in cell_esd[0:2] for the estimated +strandard deviations of the cell edge lengths a, b and c in +Ångstroms, and the double values given in cell_esd[3:5] for the +estimated standard deviations of the the cell angles α, β and γ in +degrees. +The values are placed in the first row of the \"cell \" category. If +no value has been given for \"_cell.entry_id \", it is set to the +value of the \"diffrn.id \" entry of the current data block. +cell or cell_esd may be NULL. +If cell is NULL, the cell parameters are not set. +If cell_esd is NULL, the cell parameter esds are not set. +If the \"cell \" category is not present, it is created. If any of +the necessary columns are not present, they are created. +ARGUMENTS +handle CBF handle. cell Pointer to the array of 6 doubles +for the cell parameters. cell_esd Pointer to the array of 6 doubles +for the cell parameter esds. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")set_unit_cell; + + void set_unit_cell(double cell[6]) { + cbf_failnez(cbf_set_unit_cell(self,cell,NULL)); + } +%feature("autodoc", " +Returns : +*args : double cell_esd[6] + +C prototype: int cbf_set_unit_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); + +CBFLib documentation: +DESCRIPTION +cbf_set_unit_cell sets the cell parameters to the double values given +in cell[0:2] for the cell edge lengths a, b and c in Ångstroms, the +double values given in cell[3:5] for the cell angles α, β and γ in +degrees, the double values given in cell_esd[0:2] for the estimated +strandard deviations of the cell edge lengths a, b and c in +Ångstroms, and the double values given in cell_esd[3:5] for the +estimated standard deviations of the the cell angles α, β and γ in +degrees. +The values are placed in the first row of the \"cell \" category. If +no value has been given for \"_cell.entry_id \", it is set to the +value of the \"diffrn.id \" entry of the current data block. +cell or cell_esd may be NULL. +If cell is NULL, the cell parameters are not set. +If cell_esd is NULL, the cell parameter esds are not set. +If the \"cell \" category is not present, it is created. If any of +the necessary columns are not present, they are created. +ARGUMENTS +handle CBF handle. cell Pointer to the array of 6 doubles +for the cell parameters. cell_esd Pointer to the array of 6 doubles +for the cell parameter esds. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")set_unit_cell_esd; + + void set_unit_cell_esd(double cell_esd[6]) { + cbf_failnez(cbf_set_unit_cell(self,NULL,cell_esd)); + } + +}; // End of cbf_handle_struct diff --git a/py2cbf/cbfpositionerwrappers.i b/py2cbf/cbfpositionerwrappers.i new file mode 100644 index 00000000..cd1d6601 --- /dev/null +++ b/py2cbf/cbfpositionerwrappers.i @@ -0,0 +1,35 @@ + +// Tell SWIG not to make constructor for these objects +%nodefault cbf_positioner_struct; +%nodefault cbf_positioner; + +// Tell SWIG what the object is, so we can build the class +typedef struct +{ + double matrix [3][4]; + + cbf_axis_struct *axis; + + size_t axes; + + int matrix_is_valid, axes_are_connected; +} +cbf_positioner_struct; + +typedef cbf_positioner_struct *cbf_positioner; + +%feature("autodoc","1"); + +%extend cbf_positioner_struct{// Tell SWIG to attach functions to the structure + + cbf_positioner_struct(){ // Constructor + // DO NOT CONSTRUCT WITHOUT A CBFHANDLE + cbf_failnez(CBF_ARGUMENT); + return NULL; /* Should never be executed */ + } + + ~cbf_positioner_struct(){ // Destructor + cbf_failnez(cbf_free_positioner(self)); + } + +}; // End of cbf_positioner diff --git a/py2cbf/fel_test1.cbf b/py2cbf/fel_test1.cbf new file mode 100644 index 00000000..30c11f2f --- /dev/null +++ b/py2cbf/fel_test1.cbf @@ -0,0 +1,1514 @@ +###CBF: VERSION 1.7.6 +# CBF file written by CBFlib v0.9.3 +# +# fel_test1.cbf +# Derived from new_idx-s00-20130304084113427 +# Provided by Aaron Brewster +# Linac Coherent Light Source +# 2575 Sand Hill Road, MS103 +# Menlo Park, CA 94025 +# +# Tel: 650-926-3191 +# Fax: 650-926-3600 +# Data removed to make a small embedded test +# file +# -- H. J. Bernstein, 7 November 2013 + + +data_new_idx-s00-20130304084113427 + +_diffrn.id DS1 + +_diffrn_source.diffrn_id DS1 +_diffrn_source.source xfel +_diffrn_source.type 'LCLS CXI Endstation' + +_diffrn_radiation.diffrn_id DS1 +_diffrn_radiation.wavelength_id WAVELENGTH1 +_diffrn_radiation.probe x-ray + +_diffrn_radiation_wavelength.id WAVELENGTH1 +_diffrn_radiation_wavelength.wavelength 1.768552 +_diffrn_radiation_wavelength.wt 1.0 + +_diffrn_detector.diffrn_id DS1 +_diffrn_detector.id CSPAD_FRONT +_diffrn_detector.type 'CS PAD' +_diffrn_detector.details . +_diffrn_detector.number_of_axes 104 + +loop_ +_diffrn_detector_axis.detector_id +_diffrn_detector_axis.axis_id + CSPAD_FRONT AXIS_D0_X + CSPAD_FRONT AXIS_D0_Y + CSPAD_FRONT AXIS_D0_Z + CSPAD_FRONT AXIS_D0_R + CSPAD_FRONT FS_D0Q0 + CSPAD_FRONT FS_D0Q0S0 + CSPAD_FRONT FS_D0Q0S0A0 + CSPAD_FRONT FS_D0Q0S0A1 + CSPAD_FRONT FS_D0Q0S1 + CSPAD_FRONT FS_D0Q0S1A0 + CSPAD_FRONT FS_D0Q0S1A1 + CSPAD_FRONT FS_D0Q0S2 + CSPAD_FRONT FS_D0Q0S2A0 + CSPAD_FRONT FS_D0Q0S2A1 + CSPAD_FRONT FS_D0Q0S3 + CSPAD_FRONT FS_D0Q0S3A0 + CSPAD_FRONT FS_D0Q0S3A1 + CSPAD_FRONT FS_D0Q0S4 + CSPAD_FRONT FS_D0Q0S4A0 + CSPAD_FRONT FS_D0Q0S4A1 + CSPAD_FRONT FS_D0Q0S5 + CSPAD_FRONT FS_D0Q0S5A0 + CSPAD_FRONT FS_D0Q0S5A1 + CSPAD_FRONT FS_D0Q0S6 + CSPAD_FRONT FS_D0Q0S6A0 + CSPAD_FRONT FS_D0Q0S6A1 + CSPAD_FRONT FS_D0Q0S7 + CSPAD_FRONT FS_D0Q0S7A0 + CSPAD_FRONT FS_D0Q0S7A1 + CSPAD_FRONT FS_D0Q1 + CSPAD_FRONT FS_D0Q1S0 + CSPAD_FRONT FS_D0Q1S0A0 + CSPAD_FRONT FS_D0Q1S0A1 + CSPAD_FRONT FS_D0Q1S1 + CSPAD_FRONT FS_D0Q1S1A0 + CSPAD_FRONT FS_D0Q1S1A1 + CSPAD_FRONT FS_D0Q1S2 + CSPAD_FRONT FS_D0Q1S2A0 + CSPAD_FRONT FS_D0Q1S2A1 + CSPAD_FRONT FS_D0Q1S3 + CSPAD_FRONT FS_D0Q1S3A0 + CSPAD_FRONT FS_D0Q1S3A1 + CSPAD_FRONT FS_D0Q1S4 + CSPAD_FRONT FS_D0Q1S4A0 + CSPAD_FRONT FS_D0Q1S4A1 + CSPAD_FRONT FS_D0Q1S5 + CSPAD_FRONT FS_D0Q1S5A0 + CSPAD_FRONT FS_D0Q1S5A1 + CSPAD_FRONT FS_D0Q1S6 + CSPAD_FRONT FS_D0Q1S6A0 + CSPAD_FRONT FS_D0Q1S6A1 + CSPAD_FRONT FS_D0Q1S7 + CSPAD_FRONT FS_D0Q1S7A0 + CSPAD_FRONT FS_D0Q1S7A1 + CSPAD_FRONT FS_D0Q2 + CSPAD_FRONT FS_D0Q2S0 + CSPAD_FRONT FS_D0Q2S0A0 + CSPAD_FRONT FS_D0Q2S0A1 + CSPAD_FRONT FS_D0Q2S1 + CSPAD_FRONT FS_D0Q2S1A0 + CSPAD_FRONT FS_D0Q2S1A1 + CSPAD_FRONT FS_D0Q2S2 + CSPAD_FRONT FS_D0Q2S2A0 + CSPAD_FRONT FS_D0Q2S2A1 + CSPAD_FRONT FS_D0Q2S3 + CSPAD_FRONT FS_D0Q2S3A0 + CSPAD_FRONT FS_D0Q2S3A1 + CSPAD_FRONT FS_D0Q2S4 + CSPAD_FRONT FS_D0Q2S4A0 + CSPAD_FRONT FS_D0Q2S4A1 + CSPAD_FRONT FS_D0Q2S5 + CSPAD_FRONT FS_D0Q2S5A0 + CSPAD_FRONT FS_D0Q2S5A1 + CSPAD_FRONT FS_D0Q2S6 + CSPAD_FRONT FS_D0Q2S6A0 + CSPAD_FRONT FS_D0Q2S6A1 + CSPAD_FRONT FS_D0Q2S7 + CSPAD_FRONT FS_D0Q2S7A0 + CSPAD_FRONT FS_D0Q2S7A1 + CSPAD_FRONT FS_D0Q3 + CSPAD_FRONT FS_D0Q3S0 + CSPAD_FRONT FS_D0Q3S0A0 + CSPAD_FRONT FS_D0Q3S0A1 + CSPAD_FRONT FS_D0Q3S1 + CSPAD_FRONT FS_D0Q3S1A0 + CSPAD_FRONT FS_D0Q3S1A1 + CSPAD_FRONT FS_D0Q3S2 + CSPAD_FRONT FS_D0Q3S2A0 + CSPAD_FRONT FS_D0Q3S2A1 + CSPAD_FRONT FS_D0Q3S3 + CSPAD_FRONT FS_D0Q3S3A0 + CSPAD_FRONT FS_D0Q3S3A1 + CSPAD_FRONT FS_D0Q3S4 + CSPAD_FRONT FS_D0Q3S4A0 + CSPAD_FRONT FS_D0Q3S4A1 + CSPAD_FRONT FS_D0Q3S5 + CSPAD_FRONT FS_D0Q3S5A0 + CSPAD_FRONT FS_D0Q3S5A1 + CSPAD_FRONT FS_D0Q3S6 + CSPAD_FRONT FS_D0Q3S6A0 + CSPAD_FRONT FS_D0Q3S6A1 + CSPAD_FRONT FS_D0Q3S7 + CSPAD_FRONT FS_D0Q3S7A0 + CSPAD_FRONT FS_D0Q3S7A1 + +loop_ +_diffrn_detector_element.id +_diffrn_detector_element.detector_id + ELE_D0Q0S0A0 CSPAD_FRONT + ELE_D0Q0S0A1 CSPAD_FRONT + ELE_D0Q0S1A0 CSPAD_FRONT + ELE_D0Q0S1A1 CSPAD_FRONT + ELE_D0Q0S2A0 CSPAD_FRONT + ELE_D0Q0S2A1 CSPAD_FRONT + ELE_D0Q0S3A0 CSPAD_FRONT + ELE_D0Q0S3A1 CSPAD_FRONT + ELE_D0Q0S4A0 CSPAD_FRONT + ELE_D0Q0S4A1 CSPAD_FRONT + ELE_D0Q0S5A0 CSPAD_FRONT + ELE_D0Q0S5A1 CSPAD_FRONT + ELE_D0Q0S6A0 CSPAD_FRONT + ELE_D0Q0S6A1 CSPAD_FRONT + ELE_D0Q0S7A0 CSPAD_FRONT + ELE_D0Q0S7A1 CSPAD_FRONT + ELE_D0Q1S0A0 CSPAD_FRONT + ELE_D0Q1S0A1 CSPAD_FRONT + ELE_D0Q1S1A0 CSPAD_FRONT + ELE_D0Q1S1A1 CSPAD_FRONT + ELE_D0Q1S2A0 CSPAD_FRONT + ELE_D0Q1S2A1 CSPAD_FRONT + ELE_D0Q1S3A0 CSPAD_FRONT + ELE_D0Q1S3A1 CSPAD_FRONT + ELE_D0Q1S4A0 CSPAD_FRONT + ELE_D0Q1S4A1 CSPAD_FRONT + ELE_D0Q1S5A0 CSPAD_FRONT + ELE_D0Q1S5A1 CSPAD_FRONT + ELE_D0Q1S6A0 CSPAD_FRONT + ELE_D0Q1S6A1 CSPAD_FRONT + ELE_D0Q1S7A0 CSPAD_FRONT + ELE_D0Q1S7A1 CSPAD_FRONT + ELE_D0Q2S0A0 CSPAD_FRONT + ELE_D0Q2S0A1 CSPAD_FRONT + ELE_D0Q2S1A0 CSPAD_FRONT + ELE_D0Q2S1A1 CSPAD_FRONT + ELE_D0Q2S2A0 CSPAD_FRONT + ELE_D0Q2S2A1 CSPAD_FRONT + ELE_D0Q2S3A0 CSPAD_FRONT + ELE_D0Q2S3A1 CSPAD_FRONT + ELE_D0Q2S4A0 CSPAD_FRONT + ELE_D0Q2S4A1 CSPAD_FRONT + ELE_D0Q2S5A0 CSPAD_FRONT + ELE_D0Q2S5A1 CSPAD_FRONT + ELE_D0Q2S6A0 CSPAD_FRONT + ELE_D0Q2S6A1 CSPAD_FRONT + ELE_D0Q2S7A0 CSPAD_FRONT + ELE_D0Q2S7A1 CSPAD_FRONT + ELE_D0Q3S0A0 CSPAD_FRONT + ELE_D0Q3S0A1 CSPAD_FRONT + ELE_D0Q3S1A0 CSPAD_FRONT + ELE_D0Q3S1A1 CSPAD_FRONT + ELE_D0Q3S2A0 CSPAD_FRONT + ELE_D0Q3S2A1 CSPAD_FRONT + ELE_D0Q3S3A0 CSPAD_FRONT + ELE_D0Q3S3A1 CSPAD_FRONT + ELE_D0Q3S4A0 CSPAD_FRONT + ELE_D0Q3S4A1 CSPAD_FRONT + ELE_D0Q3S5A0 CSPAD_FRONT + ELE_D0Q3S5A1 CSPAD_FRONT + ELE_D0Q3S6A0 CSPAD_FRONT + ELE_D0Q3S6A1 CSPAD_FRONT + ELE_D0Q3S7A0 CSPAD_FRONT + ELE_D0Q3S7A1 CSPAD_FRONT + +loop_ +_diffrn_data_frame.id +_diffrn_data_frame.detector_element_id +_diffrn_data_frame.array_id +_diffrn_data_frame.binary_id + FRAME1 ELE_D0Q0S0A0 ARRAY_D0Q0S0A0 1 + FRAME1 ELE_D0Q0S0A1 ARRAY_D0Q0S0A1 2 + FRAME1 ELE_D0Q0S1A0 ARRAY_D0Q0S1A0 3 + FRAME1 ELE_D0Q0S1A1 ARRAY_D0Q0S1A1 4 + FRAME1 ELE_D0Q0S2A0 ARRAY_D0Q0S2A0 5 + FRAME1 ELE_D0Q0S2A1 ARRAY_D0Q0S2A1 6 + FRAME1 ELE_D0Q0S3A0 ARRAY_D0Q0S3A0 7 + FRAME1 ELE_D0Q0S3A1 ARRAY_D0Q0S3A1 8 + FRAME1 ELE_D0Q0S4A0 ARRAY_D0Q0S4A0 9 + FRAME1 ELE_D0Q0S4A1 ARRAY_D0Q0S4A1 10 + FRAME1 ELE_D0Q0S5A0 ARRAY_D0Q0S5A0 11 + FRAME1 ELE_D0Q0S5A1 ARRAY_D0Q0S5A1 12 + FRAME1 ELE_D0Q0S6A0 ARRAY_D0Q0S6A0 13 + FRAME1 ELE_D0Q0S6A1 ARRAY_D0Q0S6A1 14 + FRAME1 ELE_D0Q0S7A0 ARRAY_D0Q0S7A0 15 + FRAME1 ELE_D0Q0S7A1 ARRAY_D0Q0S7A1 16 + FRAME1 ELE_D0Q1S0A0 ARRAY_D0Q1S0A0 17 + FRAME1 ELE_D0Q1S0A1 ARRAY_D0Q1S0A1 18 + FRAME1 ELE_D0Q1S1A0 ARRAY_D0Q1S1A0 19 + FRAME1 ELE_D0Q1S1A1 ARRAY_D0Q1S1A1 20 + FRAME1 ELE_D0Q1S2A0 ARRAY_D0Q1S2A0 21 + FRAME1 ELE_D0Q1S2A1 ARRAY_D0Q1S2A1 22 + FRAME1 ELE_D0Q1S3A0 ARRAY_D0Q1S3A0 23 + FRAME1 ELE_D0Q1S3A1 ARRAY_D0Q1S3A1 24 + FRAME1 ELE_D0Q1S4A0 ARRAY_D0Q1S4A0 25 + FRAME1 ELE_D0Q1S4A1 ARRAY_D0Q1S4A1 26 + FRAME1 ELE_D0Q1S5A0 ARRAY_D0Q1S5A0 27 + FRAME1 ELE_D0Q1S5A1 ARRAY_D0Q1S5A1 28 + FRAME1 ELE_D0Q1S6A0 ARRAY_D0Q1S6A0 29 + FRAME1 ELE_D0Q1S6A1 ARRAY_D0Q1S6A1 30 + FRAME1 ELE_D0Q1S7A0 ARRAY_D0Q1S7A0 31 + FRAME1 ELE_D0Q1S7A1 ARRAY_D0Q1S7A1 32 + FRAME1 ELE_D0Q2S0A0 ARRAY_D0Q2S0A0 33 + FRAME1 ELE_D0Q2S0A1 ARRAY_D0Q2S0A1 34 + FRAME1 ELE_D0Q2S1A0 ARRAY_D0Q2S1A0 35 + FRAME1 ELE_D0Q2S1A1 ARRAY_D0Q2S1A1 36 + FRAME1 ELE_D0Q2S2A0 ARRAY_D0Q2S2A0 37 + FRAME1 ELE_D0Q2S2A1 ARRAY_D0Q2S2A1 38 + FRAME1 ELE_D0Q2S3A0 ARRAY_D0Q2S3A0 39 + FRAME1 ELE_D0Q2S3A1 ARRAY_D0Q2S3A1 40 + FRAME1 ELE_D0Q2S4A0 ARRAY_D0Q2S4A0 41 + FRAME1 ELE_D0Q2S4A1 ARRAY_D0Q2S4A1 42 + FRAME1 ELE_D0Q2S5A0 ARRAY_D0Q2S5A0 43 + FRAME1 ELE_D0Q2S5A1 ARRAY_D0Q2S5A1 44 + FRAME1 ELE_D0Q2S6A0 ARRAY_D0Q2S6A0 45 + FRAME1 ELE_D0Q2S6A1 ARRAY_D0Q2S6A1 46 + FRAME1 ELE_D0Q2S7A0 ARRAY_D0Q2S7A0 47 + FRAME1 ELE_D0Q2S7A1 ARRAY_D0Q2S7A1 48 + FRAME1 ELE_D0Q3S0A0 ARRAY_D0Q3S0A0 49 + FRAME1 ELE_D0Q3S0A1 ARRAY_D0Q3S0A1 50 + FRAME1 ELE_D0Q3S1A0 ARRAY_D0Q3S1A0 51 + FRAME1 ELE_D0Q3S1A1 ARRAY_D0Q3S1A1 52 + FRAME1 ELE_D0Q3S2A0 ARRAY_D0Q3S2A0 53 + FRAME1 ELE_D0Q3S2A1 ARRAY_D0Q3S2A1 54 + FRAME1 ELE_D0Q3S3A0 ARRAY_D0Q3S3A0 55 + FRAME1 ELE_D0Q3S3A1 ARRAY_D0Q3S3A1 56 + FRAME1 ELE_D0Q3S4A0 ARRAY_D0Q3S4A0 57 + FRAME1 ELE_D0Q3S4A1 ARRAY_D0Q3S4A1 58 + FRAME1 ELE_D0Q3S5A0 ARRAY_D0Q3S5A0 59 + FRAME1 ELE_D0Q3S5A1 ARRAY_D0Q3S5A1 60 + FRAME1 ELE_D0Q3S6A0 ARRAY_D0Q3S6A0 61 + FRAME1 ELE_D0Q3S6A1 ARRAY_D0Q3S6A1 62 + FRAME1 ELE_D0Q3S7A0 ARRAY_D0Q3S7A0 63 + FRAME1 ELE_D0Q3S7A1 ARRAY_D0Q3S7A1 64 + +_diffrn_measurement.diffrn_id DS1 +_diffrn_measurement.id INJECTION +_diffrn_measurement.number_of_axes 0 +_diffrn_measurement.method electrospray +_diffrn_measurement.details 'crystals injected by electrospray' + +_diffrn_scan.id SCAN1 +_diffrn_scan.frame_id_start FRAME1 +_diffrn_scan.frame_id_end FRAME1 +_diffrn_scan.frames 1 + +_diffrn_scan_frame.frame_id FRAME1 +_diffrn_scan_frame.frame_number 1 +_diffrn_scan_frame.integration_time 0.0 +_diffrn_scan_frame.scan_id SCAN1 +_diffrn_scan_frame.date 2013-03-04T08:41Z13.427 + +loop_ +_axis.id +_axis.type +_axis.equipment +_axis.depends_on +_axis.vector[1] +_axis.vector[2] +_axis.vector[3] +_axis.offset[1] +_axis.offset[2] +_axis.offset[3] +_axis.equipment_component + AXIS_SOURCE general source . 0 0 1 . . . . + AXIS_GRAVITY general gravity . 0 -1 0 . . . . + AXIS_D0_Z translation detector . 0 0 1 . . . detector_arm + AXIS_D0_Y translation detector AXIS_D0_Z 0 1 0 . . . detector_arm + AXIS_D0_X translation detector AXIS_D0_Y 1 0 0 . . . detector_arm + AXIS_D0_R rotation detector AXIS_D0_X 0 0 1 0.0 0.0 0.0 detector_arm + FS_D0Q0 rotation detector AXIS_D0_R 0 0 1 -49.860765625 41.643353125 0.0 detector_quadrant + FS_D0Q0S0 rotation detector FS_D0Q0 0.0 0.0 1.0 11.3696 -23.189925 0.0 detector_sensor + FS_D0Q0S0A0 rotation detector FS_D0Q0S0 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q0S0A0_F translation detector FS_D0Q0S0A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q0S0A0_S translation detector AXIS_D0Q0S0A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q0S0A1 rotation detector FS_D0Q0S0 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q0S0A1_F translation detector FS_D0Q0S0A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q0S0A1_S translation detector AXIS_D0Q0S0A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q0S1 rotation detector FS_D0Q0 0.0 0.0 1.0 34.815 -23.309825 0.0 detector_sensor + FS_D0Q0S1A0 rotation detector FS_D0Q0S1 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q0S1A0_F translation detector FS_D0Q0S1A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q0S1A0_S translation detector AXIS_D0Q0S1A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q0S1A1 rotation detector FS_D0Q0S1 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q0S1A1_F translation detector FS_D0Q0S1A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q0S1A1_S translation detector AXIS_D0Q0S1A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q0S2 rotation detector FS_D0Q0 -0.0 -0.0 -1.0 -23.5389 -10.921625 0.0 detector_sensor + FS_D0Q0S2A0 rotation detector FS_D0Q0S2 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q0S2A0_F translation detector FS_D0Q0S2A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q0S2A0_S translation detector AXIS_D0Q0S2A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q0S2A1 rotation detector FS_D0Q0S2 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q0S2A1_F translation detector FS_D0Q0S2A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q0S2A1_S translation detector AXIS_D0Q0S2A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q0S3 rotation detector FS_D0Q0 0.0 0.0 1.0 -23.5499 -34.181125 0.0 detector_sensor + FS_D0Q0S3A0 rotation detector FS_D0Q0S3 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q0S3A0_F translation detector FS_D0Q0S3A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q0S3A0_S translation detector AXIS_D0Q0S3A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q0S3A1 rotation detector FS_D0Q0S3 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q0S3A1_F translation detector FS_D0Q0S3A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q0S3A1_S translation detector AXIS_D0Q0S3A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q0S4 rotation detector FS_D0Q0 0.0 0.0 1.0 -11.2651 24.282775 0.0 detector_sensor + FS_D0Q0S4A0 rotation detector FS_D0Q0S4 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q0S4A0_F translation detector FS_D0Q0S4A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q0S4A0_S translation detector AXIS_D0Q0S4A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q0S4A1 rotation detector FS_D0Q0S4 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q0S4A1_F translation detector FS_D0Q0S4A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q0S4A1_S translation detector AXIS_D0Q0S4A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q0S5 rotation detector FS_D0Q0 0.0 0.0 1.0 -34.7336 24.169475 0.0 detector_sensor + FS_D0Q0S5A0 rotation detector FS_D0Q0S5 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q0S5A0_F translation detector FS_D0Q0S5A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q0S5A0_S translation detector AXIS_D0Q0S5A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q0S5A1 rotation detector FS_D0Q0S5 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q0S5A1_F translation detector FS_D0Q0S5A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q0S5A1_S translation detector AXIS_D0Q0S5A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q0S6 rotation detector FS_D0Q0 0.0 0.0 1.0 23.5488 33.320375 0.0 detector_sensor + FS_D0Q0S6A0 rotation detector FS_D0Q0S6 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q0S6A0_F translation detector FS_D0Q0S6A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q0S6A0_S translation detector AXIS_D0Q0S6A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q0S6A1 rotation detector FS_D0Q0S6 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q0S6A1_F translation detector FS_D0Q0S6A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q0S6A1_S translation detector AXIS_D0Q0S6A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q0S7 rotation detector FS_D0Q0 0.0 0.0 1.0 23.3541 9.829875 0.0 detector_sensor + FS_D0Q0S7A0 rotation detector FS_D0Q0S7 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q0S7A0_F translation detector FS_D0Q0S7A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q0S7A0_S translation detector AXIS_D0Q0S7A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q0S7A1 rotation detector FS_D0Q0S7 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q0S7A1_F translation detector FS_D0Q0S7A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q0S7A1_S translation detector AXIS_D0Q0S7A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q1 rotation detector AXIS_D0_R 0 0 1 41.512521875 50.149653125 0.0 detector_quadrant + FS_D0Q1S0 rotation detector FS_D0Q1 -0.0 -0.0 -1.0 -23.1589875 -11.451825 0.0 detector_sensor + FS_D0Q1S0A0 rotation detector FS_D0Q1S0 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q1S0A0_F translation detector FS_D0Q1S0A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q1S0A0_S translation detector AXIS_D0Q1S0A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q1S0A1 rotation detector FS_D0Q1S0 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q1S0A1_F translation detector FS_D0Q1S0A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q1S0A1_S translation detector AXIS_D0Q1S0A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q1S1 rotation detector FS_D0Q1 -0.0 -0.0 -1.0 -23.2073875 -34.782825 0.0 detector_sensor + FS_D0Q1S1A0 rotation detector FS_D0Q1S1 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q1S1A0_F translation detector FS_D0Q1S1A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q1S1A0_S translation detector AXIS_D0Q1S1A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q1S1A1 rotation detector FS_D0Q1S1 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q1S1A1_F translation detector FS_D0Q1S1A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q1S1A1_S translation detector AXIS_D0Q1S1A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q1S2 rotation detector FS_D0Q1 0.0 0.0 1.0 -10.7311875 23.286175 0.0 detector_sensor + FS_D0Q1S2A0 rotation detector FS_D0Q1S2 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q1S2A0_F translation detector FS_D0Q1S2A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q1S2A0_S translation detector AXIS_D0Q1S2A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q1S2A1 rotation detector FS_D0Q1S2 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q1S2A1_F translation detector FS_D0Q1S2A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q1S2A1_S translation detector AXIS_D0Q1S2A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q1S3 rotation detector FS_D0Q1 0.0 0.0 1.0 -34.1402875 23.344475 0.0 detector_sensor + FS_D0Q1S3A0 rotation detector FS_D0Q1S3 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q1S3A0_F translation detector FS_D0Q1S3A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q1S3A0_S translation detector AXIS_D0Q1S3A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q1S3A1 rotation detector FS_D0Q1S3 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q1S3A1_F translation detector FS_D0Q1S3A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q1S3A1_S translation detector AXIS_D0Q1S3A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q1S4 rotation detector FS_D0Q1 0.0 0.0 1.0 24.0035125 11.407275 0.0 detector_sensor + FS_D0Q1S4A0 rotation detector FS_D0Q1S4 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q1S4A0_F translation detector FS_D0Q1S4A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q1S4A0_S translation detector AXIS_D0Q1S4A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q1S4A1 rotation detector FS_D0Q1S4 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q1S4A1_F translation detector FS_D0Q1S4A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q1S4A1_S translation detector AXIS_D0Q1S4A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q1S5 rotation detector FS_D0Q1 0.0 0.0 1.0 24.0035125 34.876875 0.0 detector_sensor + FS_D0Q1S5A0 rotation detector FS_D0Q1S5 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q1S5A0_F translation detector FS_D0Q1S5A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q1S5A0_S translation detector AXIS_D0Q1S5A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q1S5A1 rotation detector FS_D0Q1S5 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q1S5A1_F translation detector FS_D0Q1S5A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q1S5A1_S translation detector AXIS_D0Q1S5A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q1S6 rotation detector FS_D0Q1 0.0 0.0 1.0 33.2523125 -23.321925 0.0 detector_sensor + FS_D0Q1S6A0 rotation detector FS_D0Q1S6 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q1S6A0_F translation detector FS_D0Q1S6A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q1S6A0_S translation detector AXIS_D0Q1S6A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q1S6A1 rotation detector FS_D0Q1S6 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q1S6A1_F translation detector FS_D0Q1S6A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q1S6A1_S translation detector AXIS_D0Q1S6A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q1S7 rotation detector FS_D0Q1 0.0 0.0 1.0 9.9785125 -23.358225 0.0 detector_sensor + FS_D0Q1S7A0 rotation detector FS_D0Q1S7 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q1S7A0_F translation detector FS_D0Q1S7A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q1S7A0_S translation detector AXIS_D0Q1S7A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q1S7A1 rotation detector FS_D0Q1S7 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q1S7A1_F translation detector FS_D0Q1S7A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q1S7A1_S translation detector AXIS_D0Q1S7A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q2 rotation detector AXIS_D0_R 0 0 1 49.596146875 -41.351371875 0.0 detector_quadrant + FS_D0Q2S0 rotation detector FS_D0Q2 -0.0 -0.0 -1.0 -11.3150125 23.1242 0.0 detector_sensor + FS_D0Q2S0A0 rotation detector FS_D0Q2S0 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q2S0A0_F translation detector FS_D0Q2S0A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q2S0A0_S translation detector AXIS_D0Q2S0A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q2S0A1 rotation detector FS_D0Q2S0 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q2S0A1_F translation detector FS_D0Q2S0A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q2S0A1_S translation detector AXIS_D0Q2S0A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q2S1 rotation detector FS_D0Q2 -0.0 -0.0 -1.0 -34.6999125 23.155 0.0 detector_sensor + FS_D0Q2S1A0 rotation detector FS_D0Q2S1 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q2S1A0_F translation detector FS_D0Q2S1A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q2S1A0_S translation detector AXIS_D0Q2S1A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q2S1A1 rotation detector FS_D0Q2S1 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q2S1A1_F translation detector FS_D0Q2S1A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q2S1A1_S translation detector AXIS_D0Q2S1A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q2S2 rotation detector FS_D0Q2 0.0 0.0 1.0 23.4746875 10.7811 0.0 detector_sensor + FS_D0Q2S2A0 rotation detector FS_D0Q2S2 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q2S2A0_F translation detector FS_D0Q2S2A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q2S2A0_S translation detector AXIS_D0Q2S2A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q2S2A1 rotation detector FS_D0Q2S2 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q2S2A1_F translation detector FS_D0Q2S2A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q2S2A1_S translation detector AXIS_D0Q2S2A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q2S3 rotation detector FS_D0Q2 0.0 0.0 1.0 23.6220875 34.2221 0.0 detector_sensor + FS_D0Q2S3A0 rotation detector FS_D0Q2S3 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q2S3A0_F translation detector FS_D0Q2S3A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q2S3A0_S translation detector AXIS_D0Q2S3A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q2S3A1 rotation detector FS_D0Q2S3 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q2S3A1_F translation detector FS_D0Q2S3A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q2S3A1_S translation detector AXIS_D0Q2S3A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q2S4 rotation detector FS_D0Q2 0.0 0.0 1.0 11.1953875 -23.9954 0.0 detector_sensor + FS_D0Q2S4A0 rotation detector FS_D0Q2S4 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q2S4A0_F translation detector FS_D0Q2S4A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q2S4A0_S translation detector AXIS_D0Q2S4A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q2S4A1 rotation detector FS_D0Q2S4 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q2S4A1_F translation detector FS_D0Q2S4A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q2S4A1_S translation detector AXIS_D0Q2S4A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q2S5 rotation detector FS_D0Q2 0.0 0.0 1.0 34.5494875 -24.1901 0.0 detector_sensor + FS_D0Q2S5A0 rotation detector FS_D0Q2S5 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q2S5A0_F translation detector FS_D0Q2S5A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q2S5A0_S translation detector AXIS_D0Q2S5A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q2S5A1 rotation detector FS_D0Q2S5 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q2S5A1_F translation detector FS_D0Q2S5A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q2S5A1_S translation detector AXIS_D0Q2S5A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q2S6 rotation detector FS_D0Q2 0.0 0.0 1.0 -23.4854125 -33.2552 0.0 detector_sensor + FS_D0Q2S6A0 rotation detector FS_D0Q2S6 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q2S6A0_F translation detector FS_D0Q2S6A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q2S6A0_S translation detector AXIS_D0Q2S6A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q2S6A1 rotation detector FS_D0Q2S6 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q2S6A1_F translation detector FS_D0Q2S6A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q2S6A1_S translation detector AXIS_D0Q2S6A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q2S7 rotation detector FS_D0Q2 0.0 0.0 1.0 -23.3413125 -9.8417 0.0 detector_sensor + FS_D0Q2S7A0 rotation detector FS_D0Q2S7 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q2S7A0_F translation detector FS_D0Q2S7A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q2S7A0_S translation detector AXIS_D0Q2S7A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q2S7A1 rotation detector FS_D0Q2S7 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q2S7A1_F translation detector FS_D0Q2S7A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q2S7A1_S translation detector AXIS_D0Q2S7A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q3 rotation detector AXIS_D0_R 0 0 1 -41.247903125 -50.441634375 0.0 detector_quadrant + FS_D0Q3S0 rotation detector FS_D0Q3 0.0 0.0 1.0 23.1056375 11.6367625 0.0 detector_sensor + FS_D0Q3S0A0 rotation detector FS_D0Q3S0 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q3S0A0_F translation detector FS_D0Q3S0A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q3S0A0_S translation detector AXIS_D0Q3S0A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q3S0A1 rotation detector FS_D0Q3S0 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q3S0A1_F translation detector FS_D0Q3S0A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q3S0A1_S translation detector AXIS_D0Q3S0A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q3S1 rotation detector FS_D0Q3 0.0 0.0 1.0 23.1298375 34.9864625 0.0 detector_sensor + FS_D0Q3S1A0 rotation detector FS_D0Q3S1 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q3S1A0_F translation detector FS_D0Q3S1A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q3S1A0_S translation detector AXIS_D0Q3S1A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q3S1A1 rotation detector FS_D0Q3S1 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q3S1A1_F translation detector FS_D0Q3S1A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q3S1A1_S translation detector AXIS_D0Q3S1A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q3S2 rotation detector FS_D0Q3 -0.0 -0.0 -1.0 10.9572375 -23.5830375 0.0 detector_sensor + FS_D0Q3S2A0 rotation detector FS_D0Q3S2 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q3S2A0_F translation detector FS_D0Q3S2A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q3S2A0_S translation detector AXIS_D0Q3S2A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q3S2A1 rotation detector FS_D0Q3S2 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q3S2A1_F translation detector FS_D0Q3S2A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q3S2A1_S translation detector AXIS_D0Q3S2A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q3S3 rotation detector FS_D0Q3 -0.0 -0.0 -1.0 34.4180375 -23.4818375 0.0 detector_sensor + FS_D0Q3S3A0 rotation detector FS_D0Q3S3 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q3S3A0_F translation detector FS_D0Q3S3A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q3S3A0_S translation detector AXIS_D0Q3S3A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q3S3A1 rotation detector FS_D0Q3S3 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q3S3A1_F translation detector FS_D0Q3S3A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q3S3A1_S translation detector AXIS_D0Q3S3A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q3S4 rotation detector FS_D0Q3 0.0 0.0 1.0 -24.1283625 -11.5336375 0.0 detector_sensor + FS_D0Q3S4A0 rotation detector FS_D0Q3S4 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q3S4A0_F translation detector FS_D0Q3S4A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q3S4A0_S translation detector AXIS_D0Q3S4A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q3S4A1 rotation detector FS_D0Q3S4 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q3S4A1_F translation detector FS_D0Q3S4A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q3S4A1_S translation detector AXIS_D0Q3S4A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q3S5 rotation detector FS_D0Q3 0.0 0.0 1.0 -24.1701625 -34.9548375 0.0 detector_sensor + FS_D0Q3S5A0 rotation detector FS_D0Q3S5 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q3S5A0_F translation detector FS_D0Q3S5A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q3S5A0_S translation detector AXIS_D0Q3S5A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q3S5A1 rotation detector FS_D0Q3S5 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q3S5A1_F translation detector FS_D0Q3S5A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q3S5A1_S translation detector AXIS_D0Q3S5A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q3S6 rotation detector FS_D0Q3 -0.0 -0.0 -1.0 -33.3089625 23.4474625 0.0 detector_sensor + FS_D0Q3S6A0 rotation detector FS_D0Q3S6 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q3S6A0_F translation detector FS_D0Q3S6A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q3S6A0_S translation detector AXIS_D0Q3S6A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q3S6A1 rotation detector FS_D0Q3S6 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q3S6A1_F translation detector FS_D0Q3S6A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q3S6A1_S translation detector AXIS_D0Q3S6A1_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q3S7 rotation detector FS_D0Q3 -0.0 -0.0 -1.0 -10.0032625 23.4826625 0.0 detector_sensor + FS_D0Q3S7A0 rotation detector FS_D0Q3S7 0 0 1 -10.835 0.0 0.0 detector_asic + AXIS_D0Q3S7A0_F translation detector FS_D0Q3S7A0 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q3S7A0_S translation detector AXIS_D0Q3S7A0_F 0 -1 0 0 0 0.0 detector_asic + FS_D0Q3S7A1 rotation detector FS_D0Q3S7 0 0 1 10.835 0.0 0.0 detector_asic + AXIS_D0Q3S7A1_F translation detector FS_D0Q3S7A1 1 0 0 -10.615000 10.120000 0.0 detector_asic + AXIS_D0Q3S7A1_S translation detector AXIS_D0Q3S7A1_F 0 -1 0 0 0 0.0 detector_asic + +loop_ +_diffrn_scan_axis.axis_id +_diffrn_scan_axis.scan_id +_diffrn_scan_axis.angle_start +_diffrn_scan_axis.angle_range +_diffrn_scan_axis.angle_increment +_diffrn_scan_axis.displacement_start +_diffrn_scan_axis.displacement_range +_diffrn_scan_axis.displacement_increment + AXIS_SOURCE SCAN1 0 0 0 0 0 0 + AXIS_GRAVITY SCAN1 0 0 0 0 0 0 + AXIS_D0_Z SCAN1 0 0 0 0 0 0 + AXIS_D0_Y SCAN1 0 0 0 0 0 0 + AXIS_D0_X SCAN1 0 0 0 0 0 0 + AXIS_D0_R SCAN1 0 0 0 0 0 0 + FS_D0Q0 SCAN1 0 0 0 0 0 0 + FS_D0Q0S0 SCAN1 0 0 0 0 0 0 + FS_D0Q0S0A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S0A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S0A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S0A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S0A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S0A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S1 SCAN1 0 0 0 0 0 0 + FS_D0Q0S1A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S1A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S1A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S1A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S1A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S1A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S2 SCAN1 0 0 0 0 0 0 + FS_D0Q0S2A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S2A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S2A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S2A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S2A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S2A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S3 SCAN1 0 0 0 0 0 0 + FS_D0Q0S3A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S3A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S3A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S3A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S3A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S3A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S4 SCAN1 0 0 0 0 0 0 + FS_D0Q0S4A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S4A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S4A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S4A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S4A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S4A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S5 SCAN1 0 0 0 0 0 0 + FS_D0Q0S5A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S5A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S5A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S5A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S5A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S5A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S6 SCAN1 0 0 0 0 0 0 + FS_D0Q0S6A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S6A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S6A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S6A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S6A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S6A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S7 SCAN1 0 0 0 0 0 0 + FS_D0Q0S7A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S7A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S7A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S7A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S7A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S7A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q1 SCAN1 0 0 0 0 0 0 + FS_D0Q1S0 SCAN1 0 0 0 0 0 0 + FS_D0Q1S0A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S0A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S0A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S0A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S0A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S0A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S1 SCAN1 0 0 0 0 0 0 + FS_D0Q1S1A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S1A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S1A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S1A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S1A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S1A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S2 SCAN1 0 0 0 0 0 0 + FS_D0Q1S2A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S2A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S2A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S2A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S2A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S2A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S3 SCAN1 0 0 0 0 0 0 + FS_D0Q1S3A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S3A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S3A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S3A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S3A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S3A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S4 SCAN1 0 0 0 0 0 0 + FS_D0Q1S4A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S4A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S4A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S4A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S4A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S4A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S5 SCAN1 0 0 0 0 0 0 + FS_D0Q1S5A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S5A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S5A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S5A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S5A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S5A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S6 SCAN1 0 0 0 0 0 0 + FS_D0Q1S6A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S6A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S6A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S6A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S6A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S6A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S7 SCAN1 0 0 0 0 0 0 + FS_D0Q1S7A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S7A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S7A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S7A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S7A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S7A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q2 SCAN1 0 0 0 0 0 0 + FS_D0Q2S0 SCAN1 0 0 0 0 0 0 + FS_D0Q2S0A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S0A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S0A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S0A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S0A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S0A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S1 SCAN1 0 0 0 0 0 0 + FS_D0Q2S1A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S1A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S1A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S1A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S1A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S1A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S2 SCAN1 0 0 0 0 0 0 + FS_D0Q2S2A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S2A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S2A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S2A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S2A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S2A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S3 SCAN1 0 0 0 0 0 0 + FS_D0Q2S3A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S3A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S3A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S3A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S3A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S3A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S4 SCAN1 0 0 0 0 0 0 + FS_D0Q2S4A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S4A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S4A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S4A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S4A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S4A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S5 SCAN1 0 0 0 0 0 0 + FS_D0Q2S5A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S5A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S5A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S5A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S5A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S5A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S6 SCAN1 0 0 0 0 0 0 + FS_D0Q2S6A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S6A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S6A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S6A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S6A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S6A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S7 SCAN1 0 0 0 0 0 0 + FS_D0Q2S7A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S7A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S7A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S7A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S7A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S7A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q3 SCAN1 0 0 0 0 0 0 + FS_D0Q3S0 SCAN1 0 0 0 0 0 0 + FS_D0Q3S0A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S0A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S0A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S0A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S0A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S0A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S1 SCAN1 0 0 0 0 0 0 + FS_D0Q3S1A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S1A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S1A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S1A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S1A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S1A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S2 SCAN1 0 0 0 0 0 0 + FS_D0Q3S2A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S2A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S2A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S2A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S2A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S2A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S3 SCAN1 0 0 0 0 0 0 + FS_D0Q3S3A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S3A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S3A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S3A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S3A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S3A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S4 SCAN1 0 0 0 0 0 0 + FS_D0Q3S4A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S4A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S4A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S4A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S4A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S4A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S5 SCAN1 0 0 0 0 0 0 + FS_D0Q3S5A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S5A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S5A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S5A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S5A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S5A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S6 SCAN1 0 0 0 0 0 0 + FS_D0Q3S6A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S6A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S6A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S6A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S6A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S6A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S7 SCAN1 0 0 0 0 0 0 + FS_D0Q3S7A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S7A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S7A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S7A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S7A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S7A1_S SCAN1 0 0 0 0 0 0 + +loop_ +_diffrn_scan_frame_axis.axis_id +_diffrn_scan_frame_axis.frame_id +_diffrn_scan_frame_axis.angle +_diffrn_scan_frame_axis.displacement + AXIS_SOURCE FRAME1 0 0 + AXIS_GRAVITY FRAME1 0 0 + AXIS_D0_X FRAME1 0 0 + AXIS_D0_Y FRAME1 0 0 + AXIS_D0_Z FRAME1 0 -171.0104 + AXIS_D0_R FRAME1 0.0 0 + FS_D0Q0 FRAME1 0.0 0 + FS_D0Q0S0 FRAME1 89.66181 0 + FS_D0Q0S0A0 FRAME1 0.0 0 + AXIS_D0Q0S0A0_F FRAME1 0 0 + AXIS_D0Q0S0A0_S FRAME1 0 0 + FS_D0Q0S0A1 FRAME1 0.0 0 + AXIS_D0Q0S0A1_F FRAME1 0 0 + AXIS_D0Q0S0A1_S FRAME1 0 0 + FS_D0Q0S1 FRAME1 90.00132 0 + FS_D0Q0S1A0 FRAME1 0.0 0 + AXIS_D0Q0S1A0_F FRAME1 0 0 + AXIS_D0Q0S1A0_S FRAME1 0 0 + FS_D0Q0S1A1 FRAME1 0.0 0 + AXIS_D0Q0S1A1_F FRAME1 0 0 + AXIS_D0Q0S1A1_S FRAME1 0 0 + FS_D0Q0S2 FRAME1 359.68548 0 + FS_D0Q0S2A0 FRAME1 0.0 0 + AXIS_D0Q0S2A0_F FRAME1 0 0 + AXIS_D0Q0S2A0_S FRAME1 0 0 + FS_D0Q0S2A1 FRAME1 0.0 0 + AXIS_D0Q0S2A1_F FRAME1 0 0 + AXIS_D0Q0S2A1_S FRAME1 0 0 + FS_D0Q0S3 FRAME1 359.96513 0 + FS_D0Q0S3A0 FRAME1 0.0 0 + AXIS_D0Q0S3A0_F FRAME1 0 0 + AXIS_D0Q0S3A0_S FRAME1 0 0 + FS_D0Q0S3A1 FRAME1 0.0 0 + AXIS_D0Q0S3A1_F FRAME1 0 0 + AXIS_D0Q0S3A1_S FRAME1 0 0 + FS_D0Q0S4 FRAME1 270.14738 0 + FS_D0Q0S4A0 FRAME1 0.0 0 + AXIS_D0Q0S4A0_F FRAME1 0 0 + AXIS_D0Q0S4A0_S FRAME1 0 0 + FS_D0Q0S4A1 FRAME1 0.0 0 + AXIS_D0Q0S4A1_F FRAME1 0 0 + AXIS_D0Q0S4A1_S FRAME1 0 0 + FS_D0Q0S5 FRAME1 270.07896 0 + FS_D0Q0S5A0 FRAME1 0.0 0 + AXIS_D0Q0S5A0_F FRAME1 0 0 + AXIS_D0Q0S5A0_S FRAME1 0 0 + FS_D0Q0S5A1 FRAME1 0.0 0 + AXIS_D0Q0S5A1_F FRAME1 0 0 + AXIS_D0Q0S5A1_S FRAME1 0 0 + FS_D0Q0S6 FRAME1 359.78222 0 + FS_D0Q0S6A0 FRAME1 0.0 0 + AXIS_D0Q0S6A0_F FRAME1 0 0 + AXIS_D0Q0S6A0_S FRAME1 0 0 + FS_D0Q0S6A1 FRAME1 0.0 0 + AXIS_D0Q0S6A1_F FRAME1 0 0 + AXIS_D0Q0S6A1_S FRAME1 0 0 + FS_D0Q0S7 FRAME1 359.89604 0 + FS_D0Q0S7A0 FRAME1 0.0 0 + AXIS_D0Q0S7A0_F FRAME1 0 0 + AXIS_D0Q0S7A0_S FRAME1 0 0 + FS_D0Q0S7A1 FRAME1 0.0 0 + AXIS_D0Q0S7A1_F FRAME1 0 0 + AXIS_D0Q0S7A1_S FRAME1 0 0 + FS_D0Q1 FRAME1 0.0 0 + FS_D0Q1S0 FRAME1 0.27238 0 + FS_D0Q1S0A0 FRAME1 0.0 0 + AXIS_D0Q1S0A0_F FRAME1 0 0 + AXIS_D0Q1S0A0_S FRAME1 0 0 + FS_D0Q1S0A1 FRAME1 0.0 0 + AXIS_D0Q1S0A1_F FRAME1 0 0 + AXIS_D0Q1S0A1_S FRAME1 0 0 + FS_D0Q1S1 FRAME1 0.00525999986641 0 + FS_D0Q1S1A0 FRAME1 0.0 0 + AXIS_D0Q1S1A0_F FRAME1 0 0 + AXIS_D0Q1S1A0_S FRAME1 0 0 + FS_D0Q1S1A1 FRAME1 0.0 0 + AXIS_D0Q1S1A1_F FRAME1 0 0 + AXIS_D0Q1S1A1_S FRAME1 0 0 + FS_D0Q1S2 FRAME1 270.02545 0 + FS_D0Q1S2A0 FRAME1 0.0 0 + AXIS_D0Q1S2A0_F FRAME1 0 0 + AXIS_D0Q1S2A0_S FRAME1 0 0 + FS_D0Q1S2A1 FRAME1 0.0 0 + AXIS_D0Q1S2A1_F FRAME1 0 0 + AXIS_D0Q1S2A1_S FRAME1 0 0 + FS_D0Q1S3 FRAME1 270.03066 0 + FS_D0Q1S3A0 FRAME1 0.0 0 + AXIS_D0Q1S3A0_F FRAME1 0 0 + AXIS_D0Q1S3A0_S FRAME1 0 0 + FS_D0Q1S3A1 FRAME1 0.0 0 + AXIS_D0Q1S3A1_F FRAME1 0 0 + AXIS_D0Q1S3A1_S FRAME1 0 0 + FS_D0Q1S4 FRAME1 179.96381 0 + FS_D0Q1S4A0 FRAME1 0.0 0 + AXIS_D0Q1S4A0_F FRAME1 0 0 + AXIS_D0Q1S4A0_S FRAME1 0 0 + FS_D0Q1S4A1 FRAME1 0.0 0 + AXIS_D0Q1S4A1_F FRAME1 0 0 + AXIS_D0Q1S4A1_S FRAME1 0 0 + FS_D0Q1S5 FRAME1 180.02434 0 + FS_D0Q1S5A0 FRAME1 0.0 0 + AXIS_D0Q1S5A0_F FRAME1 0 0 + AXIS_D0Q1S5A0_S FRAME1 0 0 + FS_D0Q1S5A1 FRAME1 0.0 0 + AXIS_D0Q1S5A1_F FRAME1 0 0 + AXIS_D0Q1S5A1_S FRAME1 0 0 + FS_D0Q1S6 FRAME1 270.08027 0 + FS_D0Q1S6A0 FRAME1 0.0 0 + AXIS_D0Q1S6A0_F FRAME1 0 0 + AXIS_D0Q1S6A0_S FRAME1 0 0 + FS_D0Q1S6A1 FRAME1 0.0 0 + AXIS_D0Q1S6A1_F FRAME1 0 0 + AXIS_D0Q1S6A1_S FRAME1 0 0 + FS_D0Q1S7 FRAME1 270.15067 0 + FS_D0Q1S7A0 FRAME1 0.0 0 + AXIS_D0Q1S7A0_F FRAME1 0 0 + AXIS_D0Q1S7A0_S FRAME1 0 0 + FS_D0Q1S7A1 FRAME1 0.0 0 + AXIS_D0Q1S7A1_F FRAME1 0 0 + AXIS_D0Q1S7A1_S FRAME1 0 0 + FS_D0Q2 FRAME1 0.0 0 + FS_D0Q2S0 FRAME1 90.04803 0 + FS_D0Q2S0A0 FRAME1 0.0 0 + AXIS_D0Q2S0A0_F FRAME1 0 0 + AXIS_D0Q2S0A0_S FRAME1 0 0 + FS_D0Q2S0A1 FRAME1 0.0 0 + AXIS_D0Q2S0A1_F FRAME1 0 0 + AXIS_D0Q2S0A1_S FRAME1 0 0 + FS_D0Q2S1 FRAME1 90.00592 0 + FS_D0Q2S1A0 FRAME1 0.0 0 + AXIS_D0Q2S1A0_F FRAME1 0 0 + AXIS_D0Q2S1A0_S FRAME1 0 0 + FS_D0Q2S1A1 FRAME1 0.0 0 + AXIS_D0Q2S1A1_F FRAME1 0 0 + AXIS_D0Q2S1A1_S FRAME1 0 0 + FS_D0Q2S2 FRAME1 180.11318 0 + FS_D0Q2S2A0 FRAME1 0.0 0 + AXIS_D0Q2S2A0_F FRAME1 0 0 + AXIS_D0Q2S2A0_S FRAME1 0 0 + FS_D0Q2S2A1 FRAME1 0.0 0 + AXIS_D0Q2S2A1_F FRAME1 0 0 + AXIS_D0Q2S2A1_S FRAME1 0 0 + FS_D0Q2S3 FRAME1 179.92104 0 + FS_D0Q2S3A0 FRAME1 0.0 0 + AXIS_D0Q2S3A0_F FRAME1 0 0 + AXIS_D0Q2S3A0_S FRAME1 0 0 + FS_D0Q2S3A1 FRAME1 0.0 0 + AXIS_D0Q2S3A1_F FRAME1 0 0 + AXIS_D0Q2S3A1_S FRAME1 0 0 + FS_D0Q2S4 FRAME1 89.63875 0 + FS_D0Q2S4A0 FRAME1 0.0 0 + AXIS_D0Q2S4A0_F FRAME1 0 0 + AXIS_D0Q2S4A0_S FRAME1 0 0 + FS_D0Q2S4A1 FRAME1 0.0 0 + AXIS_D0Q2S4A1_F FRAME1 0 0 + AXIS_D0Q2S4A1_S FRAME1 0 0 + FS_D0Q2S5 FRAME1 89.68154 0 + FS_D0Q2S5A0 FRAME1 0.0 0 + AXIS_D0Q2S5A0_F FRAME1 0 0 + AXIS_D0Q2S5A0_S FRAME1 0 0 + FS_D0Q2S5A1 FRAME1 0.0 0 + AXIS_D0Q2S5A1_F FRAME1 0 0 + AXIS_D0Q2S5A1_S FRAME1 0 0 + FS_D0Q2S6 FRAME1 179.83473 0 + FS_D0Q2S6A0 FRAME1 0.0 0 + AXIS_D0Q2S6A0_F FRAME1 0 0 + AXIS_D0Q2S6A0_S FRAME1 0 0 + FS_D0Q2S6A1 FRAME1 0.0 0 + AXIS_D0Q2S6A1_F FRAME1 0 0 + AXIS_D0Q2S6A1_S FRAME1 0 0 + FS_D0Q2S7 FRAME1 180.092 0 + FS_D0Q2S7A0 FRAME1 0.0 0 + AXIS_D0Q2S7A0_F FRAME1 0 0 + AXIS_D0Q2S7A0_S FRAME1 0 0 + FS_D0Q2S7A1 FRAME1 0.0 0 + AXIS_D0Q2S7A1_F FRAME1 0 0 + AXIS_D0Q2S7A1_S FRAME1 0 0 + FS_D0Q3 FRAME1 0.0 0 + FS_D0Q3S0 FRAME1 180.12436 0 + FS_D0Q3S0A0 FRAME1 0.0 0 + AXIS_D0Q3S0A0_F FRAME1 0 0 + AXIS_D0Q3S0A0_S FRAME1 0 0 + FS_D0Q3S0A1 FRAME1 0.0 0 + AXIS_D0Q3S0A1_F FRAME1 0 0 + AXIS_D0Q3S0A1_S FRAME1 0 0 + FS_D0Q3S1 FRAME1 180.00263 0 + FS_D0Q3S1A0 FRAME1 0.0 0 + AXIS_D0Q3S1A0_F FRAME1 0 0 + AXIS_D0Q3S1A0_S FRAME1 0 0 + FS_D0Q3S1A1 FRAME1 0.0 0 + AXIS_D0Q3S1A1_F FRAME1 0 0 + AXIS_D0Q3S1A1_S FRAME1 0 0 + FS_D0Q3S2 FRAME1 269.55191 0 + FS_D0Q3S2A0 FRAME1 0.0 0 + AXIS_D0Q3S2A0_F FRAME1 0 0 + AXIS_D0Q3S2A0_S FRAME1 0 0 + FS_D0Q3S2A1 FRAME1 0.0 0 + AXIS_D0Q3S2A1_F FRAME1 0 0 + AXIS_D0Q3S2A1_S FRAME1 0 0 + FS_D0Q3S3 FRAME1 269.74206 0 + FS_D0Q3S3A0 FRAME1 0.0 0 + AXIS_D0Q3S3A0_F FRAME1 0 0 + AXIS_D0Q3S3A0_S FRAME1 0 0 + FS_D0Q3S3A1 FRAME1 0.0 0 + AXIS_D0Q3S3A1_F FRAME1 0 0 + AXIS_D0Q3S3A1_S FRAME1 0 0 + FS_D0Q3S4 FRAME1 359.81971 0 + FS_D0Q3S4A0 FRAME1 0.0 0 + AXIS_D0Q3S4A0_F FRAME1 0 0 + AXIS_D0Q3S4A0_S FRAME1 0 0 + FS_D0Q3S4A1 FRAME1 0.0 0 + AXIS_D0Q3S4A1_F FRAME1 0 0 + AXIS_D0Q3S4A1_S FRAME1 0 0 + FS_D0Q3S5 FRAME1 359.99883 0 + FS_D0Q3S5A0 FRAME1 0.0 0 + AXIS_D0Q3S5A0_F FRAME1 0 0 + AXIS_D0Q3S5A0_S FRAME1 0 0 + FS_D0Q3S5A1 FRAME1 0.0 0 + AXIS_D0Q3S5A1_F FRAME1 0 0 + AXIS_D0Q3S5A1_S FRAME1 0 0 + FS_D0Q3S6 FRAME1 269.67299 0 + FS_D0Q3S6A0 FRAME1 0.0 0 + AXIS_D0Q3S6A0_F FRAME1 0 0 + AXIS_D0Q3S6A0_S FRAME1 0 0 + FS_D0Q3S6A1 FRAME1 0.0 0 + AXIS_D0Q3S6A1_F FRAME1 0 0 + AXIS_D0Q3S6A1_S FRAME1 0 0 + FS_D0Q3S7 FRAME1 269.67561 0 + FS_D0Q3S7A0 FRAME1 0.0 0 + AXIS_D0Q3S7A0_F FRAME1 0 0 + AXIS_D0Q3S7A0_S FRAME1 0 0 + FS_D0Q3S7A1 FRAME1 0.0 0 + AXIS_D0Q3S7A1_F FRAME1 0 0 + AXIS_D0Q3S7A1_S FRAME1 0 0 + +loop_ +_array_structure_list.array_id +_array_structure_list.index +_array_structure_list.dimension +_array_structure_list.precedence +_array_structure_list.direction +_array_structure_list.axis_set_id + ARRAY_D0Q0S0A0 1 194 2 increasing AXIS_D0Q0S0A0_F + ARRAY_D0Q0S0A0 2 185 1 increasing AXIS_D0Q0S0A0_S + ARRAY_D0Q0S0A1 1 194 2 increasing AXIS_D0Q0S0A1_F + ARRAY_D0Q0S0A1 2 185 1 increasing AXIS_D0Q0S0A1_S + ARRAY_D0Q0S1A0 1 194 2 increasing AXIS_D0Q0S1A0_F + ARRAY_D0Q0S1A0 2 185 1 increasing AXIS_D0Q0S1A0_S + ARRAY_D0Q0S1A1 1 194 2 increasing AXIS_D0Q0S1A1_F + ARRAY_D0Q0S1A1 2 185 1 increasing AXIS_D0Q0S1A1_S + ARRAY_D0Q0S2A0 1 194 2 increasing AXIS_D0Q0S2A0_F + ARRAY_D0Q0S2A0 2 185 1 increasing AXIS_D0Q0S2A0_S + ARRAY_D0Q0S2A1 1 194 2 increasing AXIS_D0Q0S2A1_F + ARRAY_D0Q0S2A1 2 185 1 increasing AXIS_D0Q0S2A1_S + ARRAY_D0Q0S3A0 1 194 2 increasing AXIS_D0Q0S3A0_F + ARRAY_D0Q0S3A0 2 185 1 increasing AXIS_D0Q0S3A0_S + ARRAY_D0Q0S3A1 1 194 2 increasing AXIS_D0Q0S3A1_F + ARRAY_D0Q0S3A1 2 185 1 increasing AXIS_D0Q0S3A1_S + ARRAY_D0Q0S4A0 1 194 2 increasing AXIS_D0Q0S4A0_F + ARRAY_D0Q0S4A0 2 185 1 increasing AXIS_D0Q0S4A0_S + ARRAY_D0Q0S4A1 1 194 2 increasing AXIS_D0Q0S4A1_F + ARRAY_D0Q0S4A1 2 185 1 increasing AXIS_D0Q0S4A1_S + ARRAY_D0Q0S5A0 1 194 2 increasing AXIS_D0Q0S5A0_F + ARRAY_D0Q0S5A0 2 185 1 increasing AXIS_D0Q0S5A0_S + ARRAY_D0Q0S5A1 1 194 2 increasing AXIS_D0Q0S5A1_F + ARRAY_D0Q0S5A1 2 185 1 increasing AXIS_D0Q0S5A1_S + ARRAY_D0Q0S6A0 1 194 2 increasing AXIS_D0Q0S6A0_F + ARRAY_D0Q0S6A0 2 185 1 increasing AXIS_D0Q0S6A0_S + ARRAY_D0Q0S6A1 1 194 2 increasing AXIS_D0Q0S6A1_F + ARRAY_D0Q0S6A1 2 185 1 increasing AXIS_D0Q0S6A1_S + ARRAY_D0Q0S7A0 1 194 2 increasing AXIS_D0Q0S7A0_F + ARRAY_D0Q0S7A0 2 185 1 increasing AXIS_D0Q0S7A0_S + ARRAY_D0Q0S7A1 1 194 2 increasing AXIS_D0Q0S7A1_F + ARRAY_D0Q0S7A1 2 185 1 increasing AXIS_D0Q0S7A1_S + ARRAY_D0Q1S0A0 1 194 2 increasing AXIS_D0Q1S0A0_F + ARRAY_D0Q1S0A0 2 185 1 increasing AXIS_D0Q1S0A0_S + ARRAY_D0Q1S0A1 1 194 2 increasing AXIS_D0Q1S0A1_F + ARRAY_D0Q1S0A1 2 185 1 increasing AXIS_D0Q1S0A1_S + ARRAY_D0Q1S1A0 1 194 2 increasing AXIS_D0Q1S1A0_F + ARRAY_D0Q1S1A0 2 185 1 increasing AXIS_D0Q1S1A0_S + ARRAY_D0Q1S1A1 1 194 2 increasing AXIS_D0Q1S1A1_F + ARRAY_D0Q1S1A1 2 185 1 increasing AXIS_D0Q1S1A1_S + ARRAY_D0Q1S2A0 1 194 2 increasing AXIS_D0Q1S2A0_F + ARRAY_D0Q1S2A0 2 185 1 increasing AXIS_D0Q1S2A0_S + ARRAY_D0Q1S2A1 1 194 2 increasing AXIS_D0Q1S2A1_F + ARRAY_D0Q1S2A1 2 185 1 increasing AXIS_D0Q1S2A1_S + ARRAY_D0Q1S3A0 1 194 2 increasing AXIS_D0Q1S3A0_F + ARRAY_D0Q1S3A0 2 185 1 increasing AXIS_D0Q1S3A0_S + ARRAY_D0Q1S3A1 1 194 2 increasing AXIS_D0Q1S3A1_F + ARRAY_D0Q1S3A1 2 185 1 increasing AXIS_D0Q1S3A1_S + ARRAY_D0Q1S4A0 1 194 2 increasing AXIS_D0Q1S4A0_F + ARRAY_D0Q1S4A0 2 185 1 increasing AXIS_D0Q1S4A0_S + ARRAY_D0Q1S4A1 1 194 2 increasing AXIS_D0Q1S4A1_F + ARRAY_D0Q1S4A1 2 185 1 increasing AXIS_D0Q1S4A1_S + ARRAY_D0Q1S5A0 1 194 2 increasing AXIS_D0Q1S5A0_F + ARRAY_D0Q1S5A0 2 185 1 increasing AXIS_D0Q1S5A0_S + ARRAY_D0Q1S5A1 1 194 2 increasing AXIS_D0Q1S5A1_F + ARRAY_D0Q1S5A1 2 185 1 increasing AXIS_D0Q1S5A1_S + ARRAY_D0Q1S6A0 1 194 2 increasing AXIS_D0Q1S6A0_F + ARRAY_D0Q1S6A0 2 185 1 increasing AXIS_D0Q1S6A0_S + ARRAY_D0Q1S6A1 1 194 2 increasing AXIS_D0Q1S6A1_F + ARRAY_D0Q1S6A1 2 185 1 increasing AXIS_D0Q1S6A1_S + ARRAY_D0Q1S7A0 1 194 2 increasing AXIS_D0Q1S7A0_F + ARRAY_D0Q1S7A0 2 185 1 increasing AXIS_D0Q1S7A0_S + ARRAY_D0Q1S7A1 1 194 2 increasing AXIS_D0Q1S7A1_F + ARRAY_D0Q1S7A1 2 185 1 increasing AXIS_D0Q1S7A1_S + ARRAY_D0Q2S0A0 1 194 2 increasing AXIS_D0Q2S0A0_F + ARRAY_D0Q2S0A0 2 185 1 increasing AXIS_D0Q2S0A0_S + ARRAY_D0Q2S0A1 1 194 2 increasing AXIS_D0Q2S0A1_F + ARRAY_D0Q2S0A1 2 185 1 increasing AXIS_D0Q2S0A1_S + ARRAY_D0Q2S1A0 1 194 2 increasing AXIS_D0Q2S1A0_F + ARRAY_D0Q2S1A0 2 185 1 increasing AXIS_D0Q2S1A0_S + ARRAY_D0Q2S1A1 1 194 2 increasing AXIS_D0Q2S1A1_F + ARRAY_D0Q2S1A1 2 185 1 increasing AXIS_D0Q2S1A1_S + ARRAY_D0Q2S2A0 1 194 2 increasing AXIS_D0Q2S2A0_F + ARRAY_D0Q2S2A0 2 185 1 increasing AXIS_D0Q2S2A0_S + ARRAY_D0Q2S2A1 1 194 2 increasing AXIS_D0Q2S2A1_F + ARRAY_D0Q2S2A1 2 185 1 increasing AXIS_D0Q2S2A1_S + ARRAY_D0Q2S3A0 1 194 2 increasing AXIS_D0Q2S3A0_F + ARRAY_D0Q2S3A0 2 185 1 increasing AXIS_D0Q2S3A0_S + ARRAY_D0Q2S3A1 1 194 2 increasing AXIS_D0Q2S3A1_F + ARRAY_D0Q2S3A1 2 185 1 increasing AXIS_D0Q2S3A1_S + ARRAY_D0Q2S4A0 1 194 2 increasing AXIS_D0Q2S4A0_F + ARRAY_D0Q2S4A0 2 185 1 increasing AXIS_D0Q2S4A0_S + ARRAY_D0Q2S4A1 1 194 2 increasing AXIS_D0Q2S4A1_F + ARRAY_D0Q2S4A1 2 185 1 increasing AXIS_D0Q2S4A1_S + ARRAY_D0Q2S5A0 1 194 2 increasing AXIS_D0Q2S5A0_F + ARRAY_D0Q2S5A0 2 185 1 increasing AXIS_D0Q2S5A0_S + ARRAY_D0Q2S5A1 1 194 2 increasing AXIS_D0Q2S5A1_F + ARRAY_D0Q2S5A1 2 185 1 increasing AXIS_D0Q2S5A1_S + ARRAY_D0Q2S6A0 1 194 2 increasing AXIS_D0Q2S6A0_F + ARRAY_D0Q2S6A0 2 185 1 increasing AXIS_D0Q2S6A0_S + ARRAY_D0Q2S6A1 1 194 2 increasing AXIS_D0Q2S6A1_F + ARRAY_D0Q2S6A1 2 185 1 increasing AXIS_D0Q2S6A1_S + ARRAY_D0Q2S7A0 1 194 2 increasing AXIS_D0Q2S7A0_F + ARRAY_D0Q2S7A0 2 185 1 increasing AXIS_D0Q2S7A0_S + ARRAY_D0Q2S7A1 1 194 2 increasing AXIS_D0Q2S7A1_F + ARRAY_D0Q2S7A1 2 185 1 increasing AXIS_D0Q2S7A1_S + ARRAY_D0Q3S0A0 1 194 2 increasing AXIS_D0Q3S0A0_F + ARRAY_D0Q3S0A0 2 185 1 increasing AXIS_D0Q3S0A0_S + ARRAY_D0Q3S0A1 1 194 2 increasing AXIS_D0Q3S0A1_F + ARRAY_D0Q3S0A1 2 185 1 increasing AXIS_D0Q3S0A1_S + ARRAY_D0Q3S1A0 1 194 2 increasing AXIS_D0Q3S1A0_F + ARRAY_D0Q3S1A0 2 185 1 increasing AXIS_D0Q3S1A0_S + ARRAY_D0Q3S1A1 1 194 2 increasing AXIS_D0Q3S1A1_F + ARRAY_D0Q3S1A1 2 185 1 increasing AXIS_D0Q3S1A1_S + ARRAY_D0Q3S2A0 1 194 2 increasing AXIS_D0Q3S2A0_F + ARRAY_D0Q3S2A0 2 185 1 increasing AXIS_D0Q3S2A0_S + ARRAY_D0Q3S2A1 1 194 2 increasing AXIS_D0Q3S2A1_F + ARRAY_D0Q3S2A1 2 185 1 increasing AXIS_D0Q3S2A1_S + ARRAY_D0Q3S3A0 1 194 2 increasing AXIS_D0Q3S3A0_F + ARRAY_D0Q3S3A0 2 185 1 increasing AXIS_D0Q3S3A0_S + ARRAY_D0Q3S3A1 1 194 2 increasing AXIS_D0Q3S3A1_F + ARRAY_D0Q3S3A1 2 185 1 increasing AXIS_D0Q3S3A1_S + ARRAY_D0Q3S4A0 1 194 2 increasing AXIS_D0Q3S4A0_F + ARRAY_D0Q3S4A0 2 185 1 increasing AXIS_D0Q3S4A0_S + ARRAY_D0Q3S4A1 1 194 2 increasing AXIS_D0Q3S4A1_F + ARRAY_D0Q3S4A1 2 185 1 increasing AXIS_D0Q3S4A1_S + ARRAY_D0Q3S5A0 1 194 2 increasing AXIS_D0Q3S5A0_F + ARRAY_D0Q3S5A0 2 185 1 increasing AXIS_D0Q3S5A0_S + ARRAY_D0Q3S5A1 1 194 2 increasing AXIS_D0Q3S5A1_F + ARRAY_D0Q3S5A1 2 185 1 increasing AXIS_D0Q3S5A1_S + ARRAY_D0Q3S6A0 1 194 2 increasing AXIS_D0Q3S6A0_F + ARRAY_D0Q3S6A0 2 185 1 increasing AXIS_D0Q3S6A0_S + ARRAY_D0Q3S6A1 1 194 2 increasing AXIS_D0Q3S6A1_F + ARRAY_D0Q3S6A1 2 185 1 increasing AXIS_D0Q3S6A1_S + ARRAY_D0Q3S7A0 1 194 2 increasing AXIS_D0Q3S7A0_F + ARRAY_D0Q3S7A0 2 185 1 increasing AXIS_D0Q3S7A0_S + ARRAY_D0Q3S7A1 1 194 2 increasing AXIS_D0Q3S7A1_F + ARRAY_D0Q3S7A1 2 185 1 increasing AXIS_D0Q3S7A1_S + +loop_ +_array_structure_list_axis.axis_set_id +_array_structure_list_axis.axis_id +_array_structure_list_axis.displacement +_array_structure_list_axis.displacement_increment + AXIS_D0Q0S0A0_F AXIS_D0Q0S0A0_F 0.0 0.110000 + AXIS_D0Q0S0A0_S AXIS_D0Q0S0A0_S 0.0 0.110000 + AXIS_D0Q0S0A1_F AXIS_D0Q0S0A1_F 0.0 0.110000 + AXIS_D0Q0S0A1_S AXIS_D0Q0S0A1_S 0.0 0.110000 + AXIS_D0Q0S1A0_F AXIS_D0Q0S1A0_F 0.0 0.110000 + AXIS_D0Q0S1A0_S AXIS_D0Q0S1A0_S 0.0 0.110000 + AXIS_D0Q0S1A1_F AXIS_D0Q0S1A1_F 0.0 0.110000 + AXIS_D0Q0S1A1_S AXIS_D0Q0S1A1_S 0.0 0.110000 + AXIS_D0Q0S2A0_F AXIS_D0Q0S2A0_F 0.0 0.110000 + AXIS_D0Q0S2A0_S AXIS_D0Q0S2A0_S 0.0 0.110000 + AXIS_D0Q0S2A1_F AXIS_D0Q0S2A1_F 0.0 0.110000 + AXIS_D0Q0S2A1_S AXIS_D0Q0S2A1_S 0.0 0.110000 + AXIS_D0Q0S3A0_F AXIS_D0Q0S3A0_F 0.0 0.110000 + AXIS_D0Q0S3A0_S AXIS_D0Q0S3A0_S 0.0 0.110000 + AXIS_D0Q0S3A1_F AXIS_D0Q0S3A1_F 0.0 0.110000 + AXIS_D0Q0S3A1_S AXIS_D0Q0S3A1_S 0.0 0.110000 + AXIS_D0Q0S4A0_F AXIS_D0Q0S4A0_F 0.0 0.110000 + AXIS_D0Q0S4A0_S AXIS_D0Q0S4A0_S 0.0 0.110000 + AXIS_D0Q0S4A1_F AXIS_D0Q0S4A1_F 0.0 0.110000 + AXIS_D0Q0S4A1_S AXIS_D0Q0S4A1_S 0.0 0.110000 + AXIS_D0Q0S5A0_F AXIS_D0Q0S5A0_F 0.0 0.110000 + AXIS_D0Q0S5A0_S AXIS_D0Q0S5A0_S 0.0 0.110000 + AXIS_D0Q0S5A1_F AXIS_D0Q0S5A1_F 0.0 0.110000 + AXIS_D0Q0S5A1_S AXIS_D0Q0S5A1_S 0.0 0.110000 + AXIS_D0Q0S6A0_F AXIS_D0Q0S6A0_F 0.0 0.110000 + AXIS_D0Q0S6A0_S AXIS_D0Q0S6A0_S 0.0 0.110000 + AXIS_D0Q0S6A1_F AXIS_D0Q0S6A1_F 0.0 0.110000 + AXIS_D0Q0S6A1_S AXIS_D0Q0S6A1_S 0.0 0.110000 + AXIS_D0Q0S7A0_F AXIS_D0Q0S7A0_F 0.0 0.110000 + AXIS_D0Q0S7A0_S AXIS_D0Q0S7A0_S 0.0 0.110000 + AXIS_D0Q0S7A1_F AXIS_D0Q0S7A1_F 0.0 0.110000 + AXIS_D0Q0S7A1_S AXIS_D0Q0S7A1_S 0.0 0.110000 + AXIS_D0Q1S0A0_F AXIS_D0Q1S0A0_F 0.0 0.110000 + AXIS_D0Q1S0A0_S AXIS_D0Q1S0A0_S 0.0 0.110000 + AXIS_D0Q1S0A1_F AXIS_D0Q1S0A1_F 0.0 0.110000 + AXIS_D0Q1S0A1_S AXIS_D0Q1S0A1_S 0.0 0.110000 + AXIS_D0Q1S1A0_F AXIS_D0Q1S1A0_F 0.0 0.110000 + AXIS_D0Q1S1A0_S AXIS_D0Q1S1A0_S 0.0 0.110000 + AXIS_D0Q1S1A1_F AXIS_D0Q1S1A1_F 0.0 0.110000 + AXIS_D0Q1S1A1_S AXIS_D0Q1S1A1_S 0.0 0.110000 + AXIS_D0Q1S2A0_F AXIS_D0Q1S2A0_F 0.0 0.110000 + AXIS_D0Q1S2A0_S AXIS_D0Q1S2A0_S 0.0 0.110000 + AXIS_D0Q1S2A1_F AXIS_D0Q1S2A1_F 0.0 0.110000 + AXIS_D0Q1S2A1_S AXIS_D0Q1S2A1_S 0.0 0.110000 + AXIS_D0Q1S3A0_F AXIS_D0Q1S3A0_F 0.0 0.110000 + AXIS_D0Q1S3A0_S AXIS_D0Q1S3A0_S 0.0 0.110000 + AXIS_D0Q1S3A1_F AXIS_D0Q1S3A1_F 0.0 0.110000 + AXIS_D0Q1S3A1_S AXIS_D0Q1S3A1_S 0.0 0.110000 + AXIS_D0Q1S4A0_F AXIS_D0Q1S4A0_F 0.0 0.110000 + AXIS_D0Q1S4A0_S AXIS_D0Q1S4A0_S 0.0 0.110000 + AXIS_D0Q1S4A1_F AXIS_D0Q1S4A1_F 0.0 0.110000 + AXIS_D0Q1S4A1_S AXIS_D0Q1S4A1_S 0.0 0.110000 + AXIS_D0Q1S5A0_F AXIS_D0Q1S5A0_F 0.0 0.110000 + AXIS_D0Q1S5A0_S AXIS_D0Q1S5A0_S 0.0 0.110000 + AXIS_D0Q1S5A1_F AXIS_D0Q1S5A1_F 0.0 0.110000 + AXIS_D0Q1S5A1_S AXIS_D0Q1S5A1_S 0.0 0.110000 + AXIS_D0Q1S6A0_F AXIS_D0Q1S6A0_F 0.0 0.110000 + AXIS_D0Q1S6A0_S AXIS_D0Q1S6A0_S 0.0 0.110000 + AXIS_D0Q1S6A1_F AXIS_D0Q1S6A1_F 0.0 0.110000 + AXIS_D0Q1S6A1_S AXIS_D0Q1S6A1_S 0.0 0.110000 + AXIS_D0Q1S7A0_F AXIS_D0Q1S7A0_F 0.0 0.110000 + AXIS_D0Q1S7A0_S AXIS_D0Q1S7A0_S 0.0 0.110000 + AXIS_D0Q1S7A1_F AXIS_D0Q1S7A1_F 0.0 0.110000 + AXIS_D0Q1S7A1_S AXIS_D0Q1S7A1_S 0.0 0.110000 + AXIS_D0Q2S0A0_F AXIS_D0Q2S0A0_F 0.0 0.110000 + AXIS_D0Q2S0A0_S AXIS_D0Q2S0A0_S 0.0 0.110000 + AXIS_D0Q2S0A1_F AXIS_D0Q2S0A1_F 0.0 0.110000 + AXIS_D0Q2S0A1_S AXIS_D0Q2S0A1_S 0.0 0.110000 + AXIS_D0Q2S1A0_F AXIS_D0Q2S1A0_F 0.0 0.110000 + AXIS_D0Q2S1A0_S AXIS_D0Q2S1A0_S 0.0 0.110000 + AXIS_D0Q2S1A1_F AXIS_D0Q2S1A1_F 0.0 0.110000 + AXIS_D0Q2S1A1_S AXIS_D0Q2S1A1_S 0.0 0.110000 + AXIS_D0Q2S2A0_F AXIS_D0Q2S2A0_F 0.0 0.110000 + AXIS_D0Q2S2A0_S AXIS_D0Q2S2A0_S 0.0 0.110000 + AXIS_D0Q2S2A1_F AXIS_D0Q2S2A1_F 0.0 0.110000 + AXIS_D0Q2S2A1_S AXIS_D0Q2S2A1_S 0.0 0.110000 + AXIS_D0Q2S3A0_F AXIS_D0Q2S3A0_F 0.0 0.110000 + AXIS_D0Q2S3A0_S AXIS_D0Q2S3A0_S 0.0 0.110000 + AXIS_D0Q2S3A1_F AXIS_D0Q2S3A1_F 0.0 0.110000 + AXIS_D0Q2S3A1_S AXIS_D0Q2S3A1_S 0.0 0.110000 + AXIS_D0Q2S4A0_F AXIS_D0Q2S4A0_F 0.0 0.110000 + AXIS_D0Q2S4A0_S AXIS_D0Q2S4A0_S 0.0 0.110000 + AXIS_D0Q2S4A1_F AXIS_D0Q2S4A1_F 0.0 0.110000 + AXIS_D0Q2S4A1_S AXIS_D0Q2S4A1_S 0.0 0.110000 + AXIS_D0Q2S5A0_F AXIS_D0Q2S5A0_F 0.0 0.110000 + AXIS_D0Q2S5A0_S AXIS_D0Q2S5A0_S 0.0 0.110000 + AXIS_D0Q2S5A1_F AXIS_D0Q2S5A1_F 0.0 0.110000 + AXIS_D0Q2S5A1_S AXIS_D0Q2S5A1_S 0.0 0.110000 + AXIS_D0Q2S6A0_F AXIS_D0Q2S6A0_F 0.0 0.110000 + AXIS_D0Q2S6A0_S AXIS_D0Q2S6A0_S 0.0 0.110000 + AXIS_D0Q2S6A1_F AXIS_D0Q2S6A1_F 0.0 0.110000 + AXIS_D0Q2S6A1_S AXIS_D0Q2S6A1_S 0.0 0.110000 + AXIS_D0Q2S7A0_F AXIS_D0Q2S7A0_F 0.0 0.110000 + AXIS_D0Q2S7A0_S AXIS_D0Q2S7A0_S 0.0 0.110000 + AXIS_D0Q2S7A1_F AXIS_D0Q2S7A1_F 0.0 0.110000 + AXIS_D0Q2S7A1_S AXIS_D0Q2S7A1_S 0.0 0.110000 + AXIS_D0Q3S0A0_F AXIS_D0Q3S0A0_F 0.0 0.110000 + AXIS_D0Q3S0A0_S AXIS_D0Q3S0A0_S 0.0 0.110000 + AXIS_D0Q3S0A1_F AXIS_D0Q3S0A1_F 0.0 0.110000 + AXIS_D0Q3S0A1_S AXIS_D0Q3S0A1_S 0.0 0.110000 + AXIS_D0Q3S1A0_F AXIS_D0Q3S1A0_F 0.0 0.110000 + AXIS_D0Q3S1A0_S AXIS_D0Q3S1A0_S 0.0 0.110000 + AXIS_D0Q3S1A1_F AXIS_D0Q3S1A1_F 0.0 0.110000 + AXIS_D0Q3S1A1_S AXIS_D0Q3S1A1_S 0.0 0.110000 + AXIS_D0Q3S2A0_F AXIS_D0Q3S2A0_F 0.0 0.110000 + AXIS_D0Q3S2A0_S AXIS_D0Q3S2A0_S 0.0 0.110000 + AXIS_D0Q3S2A1_F AXIS_D0Q3S2A1_F 0.0 0.110000 + AXIS_D0Q3S2A1_S AXIS_D0Q3S2A1_S 0.0 0.110000 + AXIS_D0Q3S3A0_F AXIS_D0Q3S3A0_F 0.0 0.110000 + AXIS_D0Q3S3A0_S AXIS_D0Q3S3A0_S 0.0 0.110000 + AXIS_D0Q3S3A1_F AXIS_D0Q3S3A1_F 0.0 0.110000 + AXIS_D0Q3S3A1_S AXIS_D0Q3S3A1_S 0.0 0.110000 + AXIS_D0Q3S4A0_F AXIS_D0Q3S4A0_F 0.0 0.110000 + AXIS_D0Q3S4A0_S AXIS_D0Q3S4A0_S 0.0 0.110000 + AXIS_D0Q3S4A1_F AXIS_D0Q3S4A1_F 0.0 0.110000 + AXIS_D0Q3S4A1_S AXIS_D0Q3S4A1_S 0.0 0.110000 + AXIS_D0Q3S5A0_F AXIS_D0Q3S5A0_F 0.0 0.110000 + AXIS_D0Q3S5A0_S AXIS_D0Q3S5A0_S 0.0 0.110000 + AXIS_D0Q3S5A1_F AXIS_D0Q3S5A1_F 0.0 0.110000 + AXIS_D0Q3S5A1_S AXIS_D0Q3S5A1_S 0.0 0.110000 + AXIS_D0Q3S6A0_F AXIS_D0Q3S6A0_F 0.0 0.110000 + AXIS_D0Q3S6A0_S AXIS_D0Q3S6A0_S 0.0 0.110000 + AXIS_D0Q3S6A1_F AXIS_D0Q3S6A1_F 0.0 0.110000 + AXIS_D0Q3S6A1_S AXIS_D0Q3S6A1_S 0.0 0.110000 + AXIS_D0Q3S7A0_F AXIS_D0Q3S7A0_F 0.0 0.110000 + AXIS_D0Q3S7A0_S AXIS_D0Q3S7A0_S 0.0 0.110000 + AXIS_D0Q3S7A1_F AXIS_D0Q3S7A1_F 0.0 0.110000 + AXIS_D0Q3S7A1_S AXIS_D0Q3S7A1_S 0.0 0.110000 + +loop_ +_array_intensities.array_id +_array_intensities.binary_id +_array_intensities.linearity +_array_intensities.gain +_array_intensities.gain_esd +_array_intensities.overload +_array_intensities.undefined_value + ARRAY_D0Q0S0A0 1 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S0A1 2 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S1A0 3 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S1A1 4 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S2A0 5 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S2A1 6 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S3A0 7 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S3A1 8 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S4A0 9 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S4A1 10 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S5A0 11 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S5A1 12 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S6A0 13 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S6A1 14 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S7A0 15 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S7A1 16 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S0A0 17 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S0A1 18 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S1A0 19 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S1A1 20 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S2A0 21 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S2A1 22 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S3A0 23 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S3A1 24 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S4A0 25 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S4A1 26 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S5A0 27 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S5A1 28 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S6A0 29 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S6A1 30 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S7A0 31 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S7A1 32 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S0A0 33 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S0A1 34 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S1A0 35 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S1A1 36 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S2A0 37 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S2A1 38 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S3A0 39 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S3A1 40 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S4A0 41 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S4A1 42 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S5A0 43 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S5A1 44 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S6A0 45 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S6A1 46 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S7A0 47 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S7A1 48 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S0A0 49 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S0A1 50 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S1A0 51 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S1A1 52 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S2A0 53 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S2A1 54 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S3A0 55 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S3A1 56 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S4A0 57 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S4A1 58 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S5A0 59 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S5A1 60 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S6A0 61 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S6A1 62 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S7A0 63 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S7A1 64 linear 1.0 0.1 16383.0 0.0 + +loop_ +_array_structure.id +_array_structure.encoding_type +_array_structure.compression_type +_array_structure.byte_order + ARRAY_D0Q0S0A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S0A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S1A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S1A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S2A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S2A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S3A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S3A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S4A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S4A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S5A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S5A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S6A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S6A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S7A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S7A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S0A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S0A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S1A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S1A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S2A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S2A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S3A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S3A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S4A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S4A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S5A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S5A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S6A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S6A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S7A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S7A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S0A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S0A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S1A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S1A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S2A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S2A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S3A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S3A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S4A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S4A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S5A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S5A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S6A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S6A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S7A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S7A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S0A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S0A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S1A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S1A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S2A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S2A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S3A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S3A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S4A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S4A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S5A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S5A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S6A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S6A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S7A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S7A1 'signed 64-bit real IEEE' canonical little_endian + +loop_ +_array_data.array_id +_array_data.binary_id +_array_data.data + ARRAY_D0Q0S0A0 1 . + ARRAY_D0Q0S0A1 2 . + ARRAY_D0Q0S1A0 3 . + ARRAY_D0Q0S1A1 4 . + ARRAY_D0Q0S2A0 5 . + ARRAY_D0Q0S2A1 6 . + ARRAY_D0Q0S3A0 7 . + ARRAY_D0Q0S3A1 8 . + ARRAY_D0Q0S4A0 9 . + ARRAY_D0Q0S4A1 10 . + ARRAY_D0Q0S5A0 11 . + ARRAY_D0Q0S5A1 12 . + ARRAY_D0Q0S6A0 13 . + ARRAY_D0Q0S6A1 14 . + ARRAY_D0Q0S7A0 15 . + ARRAY_D0Q0S7A1 16 . + ARRAY_D0Q1S0A0 17 . + ARRAY_D0Q1S0A1 18 . + ARRAY_D0Q1S1A0 19 . + ARRAY_D0Q1S1A1 20 . + ARRAY_D0Q1S2A0 21 . + ARRAY_D0Q1S2A1 22 . + ARRAY_D0Q1S3A0 23 . + ARRAY_D0Q1S3A1 24 . + ARRAY_D0Q1S4A0 25 . + ARRAY_D0Q1S4A1 26 . + ARRAY_D0Q1S5A0 27 . + ARRAY_D0Q1S5A1 28 . + ARRAY_D0Q1S6A0 29 . + ARRAY_D0Q1S6A1 30 . + ARRAY_D0Q1S7A0 31 . + ARRAY_D0Q1S7A1 32 . + ARRAY_D0Q2S0A0 33 . + ARRAY_D0Q2S0A1 34 . + ARRAY_D0Q2S1A0 35 . + ARRAY_D0Q2S1A1 36 . + ARRAY_D0Q2S2A0 37 . + ARRAY_D0Q2S2A1 38 . + ARRAY_D0Q2S3A0 39 . + ARRAY_D0Q2S3A1 40 . + ARRAY_D0Q2S4A0 41 . + ARRAY_D0Q2S4A1 42 . + ARRAY_D0Q2S5A0 43 . + ARRAY_D0Q2S5A1 44 . + ARRAY_D0Q2S6A0 45 . + ARRAY_D0Q2S6A1 46 . + ARRAY_D0Q2S7A0 47 . + ARRAY_D0Q2S7A1 48 . + ARRAY_D0Q3S0A0 49 . + ARRAY_D0Q3S0A1 50 . + ARRAY_D0Q3S1A0 51 . + ARRAY_D0Q3S1A1 52 . + ARRAY_D0Q3S2A0 53 . + ARRAY_D0Q3S2A1 54 . + ARRAY_D0Q3S3A0 55 . + ARRAY_D0Q3S3A1 56 . + ARRAY_D0Q3S4A0 57 . + ARRAY_D0Q3S4A1 58 . + ARRAY_D0Q3S5A0 59 . + ARRAY_D0Q3S5A1 60 . + ARRAY_D0Q3S6A0 61 . + ARRAY_D0Q3S6A1 62 . + ARRAY_D0Q3S7A0 63 . + ARRAY_D0Q3S7A1 64 . diff --git a/py2cbf/fel_test1_orig.out b/py2cbf/fel_test1_orig.out new file mode 100644 index 00000000..189b0bea --- /dev/null +++ b/py2cbf/fel_test1_orig.out @@ -0,0 +1,4608 @@ +element: 0 +(0, 0) v00 [ -48.737597848 -2.936464972 -171.010400000 ] +(0, 1) v01 [ -48.627599764 -2.937114247 -171.010400000 ] +(1, 0) v10 [ -48.736948573 -2.826466888 -171.010400000 ] +(1, 1) v11 [ -48.626950490 -2.827116163 -171.010400000 ] +surface axes: AXIS_D0Q0S0A0_S AXIS_D0Q0S0A0_F +AXIS_D0Q0S0A0_S has 8 ancestors +AXIS_D0Q0S0A0_F has 7 ancestors +axis AXIS_D0Q0S0A0_S index: 0 + equipment detector + depends_on AXIS_D0Q0S0A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S0A0_F index: 1 + equipment detector + depends_on FS_D0Q0S0A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S0A0 index: 2 + equipment detector + depends_on FS_D0Q0S0 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S0 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [11.3696, -23.189925, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 1 +(0, 0) v00 [ -48.609690787 18.733157539 -171.010400000 ] +(0, 1) v01 [ -48.499692703 18.732508265 -171.010400000 ] +(1, 0) v10 [ -48.609041513 18.843155623 -171.010400000 ] +(1, 1) v11 [ -48.499043429 18.842506349 -171.010400000 ] +surface axes: AXIS_D0Q0S0A1_S AXIS_D0Q0S0A1_F +AXIS_D0Q0S0A1_S has 8 ancestors +AXIS_D0Q0S0A1_F has 7 ancestors +axis AXIS_D0Q0S0A1_S index: 0 + equipment detector + depends_on AXIS_D0Q0S0A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S0A1_F index: 1 + equipment detector + depends_on FS_D0Q0S0A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S0A1 index: 2 + equipment detector + depends_on FS_D0Q0S0 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S0 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [11.3696, -23.189925, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 2 +(0, 0) v00 [ -25.165271450 -3.116705017 -171.010400000 ] +(0, 1) v01 [ -25.055271450 -3.116702483 -171.010400000 ] +(1, 0) v10 [ -25.165273984 -3.006705017 -171.010400000 ] +(1, 1) v11 [ -25.055273984 -3.006702483 -171.010400000 ] +surface axes: AXIS_D0Q0S1A0_S AXIS_D0Q0S1A0_F +AXIS_D0Q0S1A0_S has 8 ancestors +AXIS_D0Q0S1A0_F has 7 ancestors +axis AXIS_D0Q0S1A0_S index: 0 + equipment detector + depends_on AXIS_D0Q0S1A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S1A0_F index: 1 + equipment detector + depends_on FS_D0Q0S1A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S1A0 index: 2 + equipment detector + depends_on FS_D0Q0S1 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S1 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [34.815, -23.309825, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 3 +(0, 0) v00 [ -25.165770691 18.553294977 -171.010400000 ] +(0, 1) v01 [ -25.055770691 18.553297511 -171.010400000 ] +(1, 0) v10 [ -25.165773225 18.663294977 -171.010400000 ] +(1, 1) v11 [ -25.055773225 18.663297511 -171.010400000 ] +surface axes: AXIS_D0Q0S1A1_S AXIS_D0Q0S1A1_F +AXIS_D0Q0S1A1_S has 8 ancestors +AXIS_D0Q0S1A1_F has 7 ancestors +axis AXIS_D0Q0S1A1_S index: 0 + equipment detector + depends_on AXIS_D0Q0S1A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S1A1_F index: 1 + equipment detector + depends_on FS_D0Q0S1A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S1A1 index: 2 + equipment detector + depends_on FS_D0Q0S1 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S1 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [34.815, -23.309825, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 4 +(0, 0) v00 [ -94.904894989 40.723828406 -171.010400000 ] +(0, 1) v01 [ -94.904291157 40.613830063 -171.010400000 ] +(1, 0) v10 [ -94.794896646 40.724432238 -171.010400000 ] +(1, 1) v11 [ -94.794292814 40.614433895 -171.010400000 ] +surface axes: AXIS_D0Q0S2A0_S AXIS_D0Q0S2A0_F +AXIS_D0Q0S2A0_S has 8 ancestors +AXIS_D0Q0S2A0_F has 7 ancestors +axis AXIS_D0Q0S2A0_S index: 0 + equipment detector + depends_on AXIS_D0Q0S2A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S2A0_F index: 1 + equipment detector + depends_on FS_D0Q0S2A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S2A0 index: 2 + equipment detector + depends_on FS_D0Q0S2 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S2 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-23.5389, -10.921625, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 5 +(0, 0) v00 [ -73.235221486 40.842783313 -171.010400000 ] +(0, 1) v01 [ -73.234617654 40.732784971 -171.010400000 ] +(1, 0) v10 [ -73.125223143 40.843387145 -171.010400000 ] +(1, 1) v11 [ -73.124619311 40.733388803 -171.010400000 ] +surface axes: AXIS_D0Q0S2A1_S AXIS_D0Q0S2A1_F +AXIS_D0Q0S2A1_S has 8 ancestors +AXIS_D0Q0S2A1_F has 7 ancestors +axis AXIS_D0Q0S2A1_S index: 0 + equipment detector + depends_on AXIS_D0Q0S2A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S2A1_F index: 1 + equipment detector + depends_on FS_D0Q0S2A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S2A1 index: 2 + equipment detector + depends_on FS_D0Q0S2 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S2 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-23.5389, -10.921625, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 6 +(0, 0) v00 [ -94.854502658 17.595280641 -171.010400000 ] +(0, 1) v01 [ -94.854569604 17.485280661 -171.010400000 ] +(1, 0) v10 [ -94.744502679 17.595213695 -171.010400000 ] +(1, 1) v11 [ -94.744569624 17.485213716 -171.010400000 ] +surface axes: AXIS_D0Q0S3A0_S AXIS_D0Q0S3A0_F +AXIS_D0Q0S3A0_S has 8 ancestors +AXIS_D0Q0S3A0_F has 7 ancestors +axis AXIS_D0Q0S3A0_S index: 0 + equipment detector + depends_on AXIS_D0Q0S3A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S3A0_F index: 1 + equipment detector + depends_on FS_D0Q0S3A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S3A0 index: 2 + equipment detector + depends_on FS_D0Q0S3 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S3 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-23.5499, -34.181125, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 7 +(0, 0) v00 [ -73.184506672 17.582092360 -171.010400000 ] +(0, 1) v01 [ -73.184573617 17.472092380 -171.010400000 ] +(1, 0) v10 [ -73.074506692 17.582025414 -171.010400000 ] +(1, 1) v11 [ -73.074573637 17.472025434 -171.010400000 ] +surface axes: AXIS_D0Q0S3A1_S AXIS_D0Q0S3A1_F +AXIS_D0Q0S3A1_S has 8 ancestors +AXIS_D0Q0S3A1_F has 7 ancestors +axis AXIS_D0Q0S3A1_S index: 0 + equipment detector + depends_on AXIS_D0Q0S3A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S3A1_F index: 1 + equipment detector + depends_on FS_D0Q0S3A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S3A1 index: 2 + equipment detector + depends_on FS_D0Q0S3 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S3 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-23.5499, -34.181125, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 8 +(0, 0) v00 [ -51.061074155 87.402088468 -171.010400000 ] +(0, 1) v01 [ -51.171073791 87.401805519 -171.010400000 ] +(1, 0) v10 [ -51.060791206 87.292088832 -171.010400000 ] +(1, 1) v11 [ -51.170790842 87.291805883 -171.010400000 ] +surface axes: AXIS_D0Q0S4A0_S AXIS_D0Q0S4A0_F +AXIS_D0Q0S4A0_S has 8 ancestors +AXIS_D0Q0S4A0_F has 7 ancestors +axis AXIS_D0Q0S4A0_S index: 0 + equipment detector + depends_on AXIS_D0Q0S4A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S4A0_F index: 1 + equipment detector + depends_on FS_D0Q0S4A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S4A0 index: 2 + equipment detector + depends_on FS_D0Q0S4 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S4 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-11.2651, 24.282775, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 9 +(0, 0) v00 [ -51.005333207 65.732160159 -171.010400000 ] +(0, 1) v01 [ -51.115332843 65.731877210 -171.010400000 ] +(1, 0) v10 [ -51.005050258 65.622160523 -171.010400000 ] +(1, 1) v11 [ -51.115049894 65.621877574 -171.010400000 ] +surface axes: AXIS_D0Q0S4A1_S AXIS_D0Q0S4A1_F +AXIS_D0Q0S4A1_S has 8 ancestors +AXIS_D0Q0S4A1_F has 7 ancestors +axis AXIS_D0Q0S4A1_S index: 0 + equipment detector + depends_on AXIS_D0Q0S4A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S4A1_F index: 1 + equipment detector + depends_on FS_D0Q0S4A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S4A1 index: 2 + equipment detector + depends_on FS_D0Q0S4 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S4 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-11.2651, 24.282775, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 10 +(0, 0) v00 [ -74.503935728 87.276754245 -171.010400000 ] +(0, 1) v01 [ -74.613935623 87.276602653 -171.010400000 ] +(1, 0) v10 [ -74.503784135 87.166754349 -171.010400000 ] +(1, 1) v11 [ -74.613784031 87.166602757 -171.010400000 ] +surface axes: AXIS_D0Q0S5A0_S AXIS_D0Q0S5A0_F +AXIS_D0Q0S5A0_S has 8 ancestors +AXIS_D0Q0S5A0_F has 7 ancestors +axis AXIS_D0Q0S5A0_S index: 0 + equipment detector + depends_on AXIS_D0Q0S5A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S5A0_F index: 1 + equipment detector + depends_on FS_D0Q0S5A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S5A0 index: 2 + equipment detector + depends_on FS_D0Q0S5 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S5 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-34.7336, 24.169475, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 11 +(0, 0) v00 [ -74.474072050 65.606774823 -171.010400000 ] +(0, 1) v01 [ -74.584071946 65.606623230 -171.010400000 ] +(1, 0) v10 [ -74.473920458 65.496774927 -171.010400000 ] +(1, 1) v11 [ -74.583920354 65.496623335 -171.010400000 ] +surface axes: AXIS_D0Q0S5A1_S AXIS_D0Q0S5A1_F +AXIS_D0Q0S5A1_S has 8 ancestors +AXIS_D0Q0S5A1_F has 7 ancestors +axis AXIS_D0Q0S5A1_S index: 0 + equipment detector + depends_on AXIS_D0Q0S5A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S5A1_F index: 1 + equipment detector + depends_on FS_D0Q0S5A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S5A1 index: 2 + equipment detector + depends_on FS_D0Q0S5 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S5 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-34.7336, 24.169475, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 12 +(0, 0) v00 [ -47.723344871 85.165185804 -171.010400000 ] +(0, 1) v01 [ -47.723762978 85.055186598 -171.010400000 ] +(1, 0) v10 [ -47.613345666 85.164767697 -171.010400000 ] +(1, 1) v11 [ -47.613763772 85.054768492 -171.010400000 ] +surface axes: AXIS_D0Q0S6A0_S AXIS_D0Q0S6A0_F +AXIS_D0Q0S6A0_S has 8 ancestors +AXIS_D0Q0S6A0_F has 7 ancestors +axis AXIS_D0Q0S6A0_S index: 0 + equipment detector + depends_on AXIS_D0Q0S6A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S6A0_F index: 1 + equipment detector + depends_on FS_D0Q0S6A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S6A0 index: 2 + equipment detector + depends_on FS_D0Q0S6 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S6 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [23.5488, 33.320375, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 13 +(0, 0) v00 [ -26.053501409 85.082818808 -171.010400000 ] +(0, 1) v01 [ -26.053919516 84.972819603 -171.010400000 ] +(1, 0) v10 [ -25.943502204 85.082400701 -171.010400000 ] +(1, 1) v11 [ -25.943920310 84.972401496 -171.010400000 ] +surface axes: AXIS_D0Q0S6A1_S AXIS_D0Q0S6A1_F +AXIS_D0Q0S6A1_S has 8 ancestors +AXIS_D0Q0S6A1_F has 7 ancestors +axis AXIS_D0Q0S6A1_S index: 0 + equipment detector + depends_on AXIS_D0Q0S6A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S6A1_F index: 1 + equipment detector + depends_on FS_D0Q0S6A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S6A1 index: 2 + equipment detector + depends_on FS_D0Q0S6 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S6 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [23.5488, 33.320375, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 14 +(0, 0) v00 [ -47.938268150 61.632131275 -171.010400000 ] +(0, 1) v01 [ -47.938467739 61.522131456 -171.010400000 ] +(1, 0) v10 [ -47.828268331 61.631931686 -171.010400000 ] +(1, 1) v11 [ -47.828467920 61.521931867 -171.010400000 ] +surface axes: AXIS_D0Q0S7A0_S AXIS_D0Q0S7A0_F +AXIS_D0Q0S7A0_S has 8 ancestors +AXIS_D0Q0S7A0_F has 7 ancestors +axis AXIS_D0Q0S7A0_S index: 0 + equipment detector + depends_on AXIS_D0Q0S7A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S7A0_F index: 1 + equipment detector + depends_on FS_D0Q0S7A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S7A0 index: 2 + equipment detector + depends_on FS_D0Q0S7 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S7 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [23.3541, 9.829875, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 15 +(0, 0) v00 [ -26.268303821 61.592812289 -171.010400000 ] +(0, 1) v01 [ -26.268503410 61.482812470 -171.010400000 ] +(1, 0) v10 [ -26.158304002 61.592612700 -171.010400000 ] +(1, 1) v11 [ -26.158503591 61.482612881 -171.010400000 ] +surface axes: AXIS_D0Q0S7A1_S AXIS_D0Q0S7A1_F +AXIS_D0Q0S7A1_S has 8 ancestors +AXIS_D0Q0S7A1_F has 7 ancestors +axis AXIS_D0Q0S7A1_S index: 0 + equipment detector + depends_on AXIS_D0Q0S7A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S7A1_F index: 1 + equipment detector + depends_on FS_D0Q0S7A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S7A1 index: 2 + equipment detector + depends_on FS_D0Q0S7 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S7 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [23.3541, 9.829875, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 16 +(0, 0) v00 [ -3.048113674 48.919685138 -171.010400000 ] +(0, 1) v01 [ -3.048636604 48.809686381 -171.010400000 ] +(1, 0) v10 [ -2.938114917 48.919162208 -171.010400000 ] +(1, 1) v11 [ -2.938637847 48.809163451 -171.010400000 ] +surface axes: AXIS_D0Q1S0A0_S AXIS_D0Q1S0A0_F +AXIS_D0Q1S0A0_S has 8 ancestors +AXIS_D0Q1S0A0_F has 7 ancestors +axis AXIS_D0Q1S0A0_S index: 0 + equipment detector + depends_on AXIS_D0Q1S0A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S0A0_F index: 1 + equipment detector + depends_on FS_D0Q1S0A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S0A0 index: 2 + equipment detector + depends_on FS_D0Q1S0 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S0 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-23.1589875, -11.451825, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 17 +(0, 0) v00 [ 18.621641457 48.816667910 -171.010400000 ] +(0, 1) v01 [ 18.621118527 48.706669153 -171.010400000 ] +(1, 0) v10 [ 18.731640214 48.816144980 -171.010400000 ] +(1, 1) v11 [ 18.731117284 48.706146223 -171.010400000 ] +surface axes: AXIS_D0Q1S0A1_S AXIS_D0Q1S0A1_F +AXIS_D0Q1S0A1_S has 8 ancestors +AXIS_D0Q1S0A1_F has 7 ancestors +axis AXIS_D0Q1S0A1_S index: 0 + equipment detector + depends_on AXIS_D0Q1S0A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S0A1_F index: 1 + equipment detector + depends_on FS_D0Q1S0A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S0A1 index: 2 + equipment detector + depends_on FS_D0Q1S0 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S0 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-23.1589875, -11.451825, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 18 +(0, 0) v00 [ -3.143936475 25.488797285 -171.010400000 ] +(0, 1) v01 [ -3.143946573 25.378797285 -171.010400000 ] +(1, 0) v10 [ -3.033936475 25.488787187 -171.010400000 ] +(1, 1) v11 [ -3.033946574 25.378787187 -171.010400000 ] +surface axes: AXIS_D0Q1S1A0_S AXIS_D0Q1S1A0_F +AXIS_D0Q1S1A0_S has 8 ancestors +AXIS_D0Q1S1A0_F has 7 ancestors +axis AXIS_D0Q1S1A0_S index: 0 + equipment detector + depends_on AXIS_D0Q1S1A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S1A0_F index: 1 + equipment detector + depends_on FS_D0Q1S1A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S1A0 index: 2 + equipment detector + depends_on FS_D0Q1S1 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S1 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-23.2073875, -34.782825, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 19 +(0, 0) v00 [ 18.526063434 25.486807885 -171.010400000 ] +(0, 1) v01 [ 18.526053335 25.376807886 -171.010400000 ] +(1, 0) v10 [ 18.636063433 25.486797787 -171.010400000 ] +(1, 1) v11 [ 18.636053335 25.376797787 -171.010400000 ] +surface axes: AXIS_D0Q1S1A1_S AXIS_D0Q1S1A1_F +AXIS_D0Q1S1A1_S has 8 ancestors +AXIS_D0Q1S1A1_F has 7 ancestors +axis AXIS_D0Q1S1A1_S index: 0 + equipment detector + depends_on AXIS_D0Q1S1A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S1A1_F index: 1 + equipment detector + depends_on FS_D0Q1S1A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S1A1 index: 2 + equipment detector + depends_on FS_D0Q1S1 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S1 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-23.2073875, -34.782825, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 20 +(0, 0) v00 [ 40.891805581 94.890321174 -171.010400000 ] +(0, 1) v01 [ 40.781805592 94.890272314 -171.010400000 ] +(1, 0) v10 [ 40.891854441 94.780321185 -171.010400000 ] +(1, 1) v11 [ 40.781854452 94.780272325 -171.010400000 ] +surface axes: AXIS_D0Q1S2A0_S AXIS_D0Q1S2A0_F +AXIS_D0Q1S2A0_S has 8 ancestors +AXIS_D0Q1S2A0_F has 7 ancestors +axis AXIS_D0Q1S2A0_S index: 0 + equipment detector + depends_on AXIS_D0Q1S2A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S2A0_F index: 1 + equipment detector + depends_on FS_D0Q1S2A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S2A0 index: 2 + equipment detector + depends_on FS_D0Q1S2 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S2 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-10.7311875, 23.286175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 21 +(0, 0) v00 [ 40.901431098 73.220323312 -171.010400000 ] +(0, 1) v01 [ 40.791431109 73.220274451 -171.010400000 ] +(1, 0) v10 [ 40.901479958 73.110323323 -171.010400000 ] +(1, 1) v11 [ 40.791479969 73.110274462 -171.010400000 ] +surface axes: AXIS_D0Q1S2A1_S AXIS_D0Q1S2A1_F +AXIS_D0Q1S2A1_S has 8 ancestors +AXIS_D0Q1S2A1_F has 7 ancestors +axis AXIS_D0Q1S2A1_S index: 0 + equipment detector + depends_on AXIS_D0Q1S2A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S2A1_F index: 1 + equipment detector + depends_on FS_D0Q1S2A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S2A1 index: 2 + equipment detector + depends_on FS_D0Q1S2 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S2 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-10.7311875, 23.286175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 22 +(0, 0) v00 [ 17.480754647 94.949540447 -171.010400000 ] +(0, 1) v01 [ 17.370754662 94.949481584 -171.010400000 ] +(1, 0) v10 [ 17.480813510 94.839540463 -171.010400000 ] +(1, 1) v11 [ 17.370813525 94.839481600 -171.010400000 ] +surface axes: AXIS_D0Q1S3A0_S AXIS_D0Q1S3A0_F +AXIS_D0Q1S3A0_S has 8 ancestors +AXIS_D0Q1S3A0_F has 7 ancestors +axis AXIS_D0Q1S3A0_S index: 0 + equipment detector + depends_on AXIS_D0Q1S3A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S3A0_F index: 1 + equipment detector + depends_on FS_D0Q1S3A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S3A0 index: 2 + equipment detector + depends_on FS_D0Q1S3 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S3 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-34.1402875, 23.344475, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 23 +(0, 0) v00 [ 17.492350652 73.279543550 -171.010400000 ] +(0, 1) v01 [ 17.382350668 73.279484687 -171.010400000 ] +(1, 0) v10 [ 17.492409515 73.169543566 -171.010400000 ] +(1, 1) v11 [ 17.382409531 73.169484703 -171.010400000 ] +surface axes: AXIS_D0Q1S3A1_S AXIS_D0Q1S3A1_F +AXIS_D0Q1S3A1_S has 8 ancestors +AXIS_D0Q1S3A1_F has 7 ancestors +axis AXIS_D0Q1S3A1_S index: 0 + equipment detector + depends_on AXIS_D0Q1S3A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S3A1_F index: 1 + equipment detector + depends_on FS_D0Q1S3A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S3A1 index: 2 + equipment detector + depends_on FS_D0Q1S3 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S3 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-34.1402875, 23.344475, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 24 +(0, 0) v00 [ 86.959637954 51.423381581 -171.010400000 ] +(0, 1) v01 [ 86.959707434 51.533381559 -171.010400000 ] +(1, 0) v10 [ 86.849637976 51.423451061 -171.010400000 ] +(1, 1) v11 [ 86.849707456 51.533451039 -171.010400000 ] +surface axes: AXIS_D0Q1S4A0_S AXIS_D0Q1S4A0_F +AXIS_D0Q1S4A0_S has 8 ancestors +AXIS_D0Q1S4A0_F has 7 ancestors +axis AXIS_D0Q1S4A0_S index: 0 + equipment detector + depends_on AXIS_D0Q1S4A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S4A0_F index: 1 + equipment detector + depends_on FS_D0Q1S4A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S4A0 index: 2 + equipment detector + depends_on FS_D0Q1S4 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S4 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [24.0035125, 11.407275, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 25 +(0, 0) v00 [ 65.289642277 51.437069103 -171.010400000 ] +(0, 1) v01 [ 65.289711756 51.547069081 -171.010400000 ] +(1, 0) v10 [ 65.179642299 51.437138583 -171.010400000 ] +(1, 1) v11 [ 65.179711778 51.547138561 -171.010400000 ] +surface axes: AXIS_D0Q1S4A1_S AXIS_D0Q1S4A1_F +AXIS_D0Q1S4A1_S has 8 ancestors +AXIS_D0Q1S4A1_F has 7 ancestors +axis AXIS_D0Q1S4A1_S index: 0 + equipment detector + depends_on AXIS_D0Q1S4A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S4A1_F index: 1 + equipment detector + depends_on FS_D0Q1S4A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S4A1 index: 2 + equipment detector + depends_on FS_D0Q1S4 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S4 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [24.0035125, 11.407275, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 26 +(0, 0) v00 [ 86.970331548 74.915641280 -171.010400000 ] +(0, 1) v01 [ 86.970284819 75.025641270 -171.010400000 ] +(1, 0) v10 [ 86.860331558 74.915594550 -171.010400000 ] +(1, 1) v11 [ 86.860284829 75.025594540 -171.010400000 ] +surface axes: AXIS_D0Q1S5A0_S AXIS_D0Q1S5A0_F +AXIS_D0Q1S5A0_S has 8 ancestors +AXIS_D0Q1S5A0_F has 7 ancestors +axis AXIS_D0Q1S5A0_S index: 0 + equipment detector + depends_on AXIS_D0Q1S5A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S5A0_F index: 1 + equipment detector + depends_on FS_D0Q1S5A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S5A0 index: 2 + equipment detector + depends_on FS_D0Q1S5 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S5 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [24.0035125, 34.876875, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 27 +(0, 0) v00 [ 65.300333504 74.906435579 -171.010400000 ] +(0, 1) v01 [ 65.300286774 75.016435569 -171.010400000 ] +(1, 0) v10 [ 65.190333514 74.906388850 -171.010400000 ] +(1, 1) v11 [ 65.190286784 75.016388840 -171.010400000 ] +surface axes: AXIS_D0Q1S5A1_S AXIS_D0Q1S5A1_F +AXIS_D0Q1S5A1_S has 8 ancestors +AXIS_D0Q1S5A1_F has 7 ancestors +axis AXIS_D0Q1S5A1_S index: 0 + equipment detector + depends_on AXIS_D0Q1S5A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S5A1_F index: 1 + equipment detector + depends_on FS_D0Q1S5A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S5A1 index: 2 + equipment detector + depends_on FS_D0Q1S5 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S5 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [24.0035125, 34.876875, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 28 +(0, 0) v00 [ 84.854773523 48.291884945 -171.010400000 ] +(0, 1) v01 [ 84.744773631 48.291730838 -171.010400000 ] +(1, 0) v10 [ 84.854927630 48.181885053 -171.010400000 ] +(1, 1) v11 [ 84.744927738 48.181730946 -171.010400000 ] +surface axes: AXIS_D0Q1S6A0_S AXIS_D0Q1S6A0_F +AXIS_D0Q1S6A0_S has 8 ancestors +AXIS_D0Q1S6A0_F has 7 ancestors +axis AXIS_D0Q1S6A0_S index: 0 + equipment detector + depends_on AXIS_D0Q1S6A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S6A0_F index: 1 + equipment detector + depends_on FS_D0Q1S6A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S6A0 index: 2 + equipment detector + depends_on FS_D0Q1S6 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S6 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [33.2523125, -23.321925, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 29 +(0, 0) v00 [ 84.885132658 26.621906211 -171.010400000 ] +(0, 1) v01 [ 84.775132766 26.621752104 -171.010400000 ] +(1, 0) v10 [ 84.885286765 26.511906319 -171.010400000 ] +(1, 1) v11 [ 84.775286873 26.511752212 -171.010400000 ] +surface axes: AXIS_D0Q1S6A1_S AXIS_D0Q1S6A1_F +AXIS_D0Q1S6A1_S has 8 ancestors +AXIS_D0Q1S6A1_F has 7 ancestors +axis AXIS_D0Q1S6A1_S index: 0 + equipment detector + depends_on AXIS_D0Q1S6A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S6A1_F index: 1 + equipment detector + depends_on FS_D0Q1S6A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S6A1 index: 2 + equipment detector + depends_on FS_D0Q1S6 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S6 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [33.2523125, -23.321925, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 30 +(0, 0) v00 [ 61.554592650 48.267966367 -171.010400000 ] +(0, 1) v01 [ 61.444593031 48.267677101 -171.010400000 ] +(1, 0) v10 [ 61.554881916 48.157966747 -171.010400000 ] +(1, 1) v11 [ 61.444882296 48.157677482 -171.010400000 ] +surface axes: AXIS_D0Q1S7A0_S AXIS_D0Q1S7A0_F +AXIS_D0Q1S7A0_S has 8 ancestors +AXIS_D0Q1S7A0_F has 7 ancestors +axis AXIS_D0Q1S7A0_S index: 0 + equipment detector + depends_on AXIS_D0Q1S7A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S7A0_F index: 1 + equipment detector + depends_on FS_D0Q1S7A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S7A0 index: 2 + equipment detector + depends_on FS_D0Q1S7 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S7 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [9.9785125, -23.358225, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 31 +(0, 0) v00 [ 61.611577914 26.598041293 -171.010400000 ] +(0, 1) v01 [ 61.501578295 26.597752028 -171.010400000 ] +(1, 0) v10 [ 61.611867180 26.488041674 -171.010400000 ] +(1, 1) v11 [ 61.501867560 26.487752408 -171.010400000 ] +surface axes: AXIS_D0Q1S7A1_S AXIS_D0Q1S7A1_F +AXIS_D0Q1S7A1_S has 8 ancestors +AXIS_D0Q1S7A1_F has 7 ancestors +axis AXIS_D0Q1S7A1_S index: 0 + equipment detector + depends_on AXIS_D0Q1S7A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S7A1_F index: 1 + equipment detector + depends_on FS_D0Q1S7A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S7A1 index: 2 + equipment detector + depends_on FS_D0Q1S7 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S7 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [9.9785125, -23.358225, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 32 +(0, 0) v00 [ 48.419111958 3.214337179 -171.010400000 ] +(0, 1) v01 [ 48.309111997 3.214429390 -171.010400000 ] +(1, 0) v10 [ 48.419019747 3.104337218 -171.010400000 ] +(1, 1) v11 [ 48.309019786 3.104429429 -171.010400000 ] +surface axes: AXIS_D0Q2S0A0_S AXIS_D0Q2S0A0_F +AXIS_D0Q2S0A0_S has 8 ancestors +AXIS_D0Q2S0A0_F has 7 ancestors +axis AXIS_D0Q2S0A0_S index: 0 + equipment detector + depends_on AXIS_D0Q2S0A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S0A0_F index: 1 + equipment detector + depends_on FS_D0Q2S0A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S0A0 index: 2 + equipment detector + depends_on FS_D0Q2S0 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S0 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-11.3150125, 23.1242, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 33 +(0, 0) v00 [ 48.400946397 -18.455655207 -171.010400000 ] +(0, 1) v01 [ 48.290946436 -18.455562996 -171.010400000 ] +(1, 0) v10 [ 48.400854186 -18.565655168 -171.010400000 ] +(1, 1) v11 [ 48.290854225 -18.565562957 -171.010400000 ] +surface axes: AXIS_D0Q2S0A1_S AXIS_D0Q2S0A1_F +AXIS_D0Q2S0A1_S has 8 ancestors +AXIS_D0Q2S0A1_F has 7 ancestors +axis AXIS_D0Q2S0A1_S index: 0 + equipment detector + depends_on AXIS_D0Q2S0A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S0A1_F index: 1 + equipment detector + depends_on FS_D0Q2S0A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S0A1 index: 2 + equipment detector + depends_on FS_D0Q2S0 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S0 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-11.3150125, 23.1242, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 34 +(0, 0) v00 [ 25.018450610 3.252582377 -171.010400000 ] +(0, 1) v01 [ 24.908450611 3.252593742 -171.010400000 ] +(1, 0) v10 [ 25.018439244 3.142582377 -171.010400000 ] +(1, 1) v11 [ 24.908439245 3.142593743 -171.010400000 ] +surface axes: AXIS_D0Q2S1A0_S AXIS_D0Q2S1A0_F +AXIS_D0Q2S1A0_S has 8 ancestors +AXIS_D0Q2S1A0_F has 7 ancestors +axis AXIS_D0Q2S1A0_S index: 0 + equipment detector + depends_on AXIS_D0Q2S1A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S1A0_F index: 1 + equipment detector + depends_on FS_D0Q2S1A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S1A0 index: 2 + equipment detector + depends_on FS_D0Q2S1 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S1 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-34.6999125, 23.155, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 35 +(0, 0) v00 [ 25.016211590 -18.417417508 -171.010400000 ] +(0, 1) v01 [ 24.906211590 -18.417406142 -171.010400000 ] +(1, 0) v10 [ 25.016200224 -18.527417507 -171.010400000 ] +(1, 1) v11 [ 24.906200225 -18.527406141 -171.010400000 ] +surface axes: AXIS_D0Q2S1A1_S AXIS_D0Q2S1A1_F +AXIS_D0Q2S1A1_S has 8 ancestors +AXIS_D0Q2S1A1_F has 7 ancestors +axis AXIS_D0Q2S1A1_S index: 0 + equipment detector + depends_on AXIS_D0Q2S1A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S1A1_F index: 1 + equipment detector + depends_on FS_D0Q2S1A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S1A1 index: 2 + equipment detector + depends_on FS_D0Q2S1 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S1 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-34.6999125, 23.155, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 36 +(0, 0) v00 [ 94.540783193 -40.647880608 -171.010400000 ] +(0, 1) v01 [ 94.540565903 -40.537880823 -171.010400000 ] +(1, 0) v10 [ 94.430783407 -40.648097898 -171.010400000 ] +(1, 1) v11 [ 94.430566117 -40.538098112 -171.010400000 ] +surface axes: AXIS_D0Q2S2A0_S AXIS_D0Q2S2A0_F +AXIS_D0Q2S2A0_S has 8 ancestors +AXIS_D0Q2S2A0_F has 7 ancestors +axis AXIS_D0Q2S2A0_S index: 0 + equipment detector + depends_on AXIS_D0Q2S2A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S2A0_F index: 1 + equipment detector + depends_on FS_D0Q2S2A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S2A0 index: 2 + equipment detector + depends_on FS_D0Q2S2 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S2 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [23.4746875, 10.7811, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 37 +(0, 0) v00 [ 72.870825471 -40.690686710 -171.010400000 ] +(0, 1) v01 [ 72.870608182 -40.580686925 -171.010400000 ] +(1, 0) v10 [ 72.760825686 -40.690904000 -171.010400000 ] +(1, 1) v11 [ 72.760608396 -40.580904215 -171.010400000 ] +surface axes: AXIS_D0Q2S2A1_S AXIS_D0Q2S2A1_F +AXIS_D0Q2S2A1_S has 8 ancestors +AXIS_D0Q2S2A1_F has 7 ancestors +axis AXIS_D0Q2S2A1_S index: 0 + equipment detector + depends_on AXIS_D0Q2S2A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S2A1_F index: 1 + equipment detector + depends_on FS_D0Q2S2A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S2A1 index: 2 + equipment detector + depends_on FS_D0Q2S2 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S2 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [23.4746875, 10.7811, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 38 +(0, 0) v00 [ 94.654267517 -17.278822758 -171.010400000 ] +(0, 1) v01 [ 94.654419110 -17.168822862 -171.010400000 ] +(1, 0) v10 [ 94.544267622 -17.278671165 -171.010400000 ] +(1, 1) v11 [ 94.544419214 -17.168671270 -171.010400000 ] +surface axes: AXIS_D0Q2S3A0_S AXIS_D0Q2S3A0_F +AXIS_D0Q2S3A0_S has 8 ancestors +AXIS_D0Q2S3A0_F has 7 ancestors +axis AXIS_D0Q2S3A0_S index: 0 + equipment detector + depends_on AXIS_D0Q2S3A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S3A0_F index: 1 + equipment detector + depends_on FS_D0Q2S3A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S3A0 index: 2 + equipment detector + depends_on FS_D0Q2S3 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S3 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [23.6220875, 34.2221, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 39 +(0, 0) v00 [ 72.984288095 -17.248959081 -171.010400000 ] +(0, 1) v01 [ 72.984439687 -17.138959185 -171.010400000 ] +(1, 0) v10 [ 72.874288200 -17.248807488 -171.010400000 ] +(1, 1) v11 [ 72.874439792 -17.138807593 -171.010400000 ] +surface axes: AXIS_D0Q2S3A1_S AXIS_D0Q2S3A1_F +AXIS_D0Q2S3A1_S has 8 ancestors +AXIS_D0Q2S3A1_F has 7 ancestors +axis AXIS_D0Q2S3A1_S index: 0 + equipment detector + depends_on AXIS_D0Q2S3A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S3A1_F index: 1 + equipment detector + depends_on FS_D0Q2S3A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S3A1 index: 2 + equipment detector + depends_on FS_D0Q2S3 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S3 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [23.6220875, 34.2221, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 40 +(0, 0) v00 [ 50.536494130 -86.732539328 -171.010400000 ] +(0, 1) v01 [ 50.646491943 -86.733232874 -171.010400000 ] +(1, 0) v10 [ 50.537187675 -86.622541515 -171.010400000 ] +(1, 1) v11 [ 50.647185489 -86.623235060 -171.010400000 ] +surface axes: AXIS_D0Q2S4A0_S AXIS_D0Q2S4A0_F +AXIS_D0Q2S4A0_S has 8 ancestors +AXIS_D0Q2S4A0_F has 7 ancestors +axis AXIS_D0Q2S4A0_S index: 0 + equipment detector + depends_on AXIS_D0Q2S4A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S4A0_F index: 1 + equipment detector + depends_on FS_D0Q2S4A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S4A0 index: 2 + equipment detector + depends_on FS_D0Q2S4 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S4 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [11.1953875, -23.9954, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 41 +(0, 0) v00 [ 50.673122616 -65.062970051 -171.010400000 ] +(0, 1) v01 [ 50.783120430 -65.063663597 -171.010400000 ] +(1, 0) v10 [ 50.673816162 -64.952972238 -171.010400000 ] +(1, 1) v11 [ 50.783813975 -64.953665783 -171.010400000 ] +surface axes: AXIS_D0Q2S4A1_S AXIS_D0Q2S4A1_F +AXIS_D0Q2S4A1_S has 8 ancestors +AXIS_D0Q2S4A1_F has 7 ancestors +axis AXIS_D0Q2S4A1_S index: 0 + equipment detector + depends_on AXIS_D0Q2S4A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S4A1_F index: 1 + equipment detector + depends_on FS_D0Q2S4A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S4A1 index: 2 + equipment detector + depends_on FS_D0Q2S4 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S4 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [11.1953875, -23.9954, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 42 +(0, 0) v00 [ 73.906568443 -86.934892098 -171.010400000 ] +(0, 1) v01 [ 74.016566744 -86.935503494 -171.010400000 ] +(1, 0) v10 [ 73.907179840 -86.824893797 -171.010400000 ] +(1, 1) v11 [ 74.017178140 -86.825505194 -171.010400000 ] +surface axes: AXIS_D0Q2S5A0_S AXIS_D0Q2S5A0_F +AXIS_D0Q2S5A0_S has 8 ancestors +AXIS_D0Q2S5A0_F has 7 ancestors +axis AXIS_D0Q2S5A0_S index: 0 + equipment detector + depends_on AXIS_D0Q2S5A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S5A0_F index: 1 + equipment detector + depends_on FS_D0Q2S5A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S5A0 index: 2 + equipment detector + depends_on FS_D0Q2S5 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S5 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [34.5494875, -24.1901, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 43 +(0, 0) v00 [ 74.027013487 -65.265226827 -171.010400000 ] +(0, 1) v01 [ 74.137011788 -65.265838223 -171.010400000 ] +(1, 0) v10 [ 74.027624883 -65.155228526 -171.010400000 ] +(1, 1) v11 [ 74.137623184 -65.155839922 -171.010400000 ] +surface axes: AXIS_D0Q2S5A1_S AXIS_D0Q2S5A1_F +AXIS_D0Q2S5A1_S has 8 ancestors +AXIS_D0Q2S5A1_F has 7 ancestors +axis AXIS_D0Q2S5A1_S index: 0 + equipment detector + depends_on AXIS_D0Q2S5A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S5A1_F index: 1 + equipment detector + depends_on FS_D0Q2S5A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S5A1 index: 2 + equipment detector + depends_on FS_D0Q2S5 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S5 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [34.5494875, -24.1901, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 44 +(0, 0) v00 [ 47.531453982 -84.788402334 -171.010400000 ] +(0, 1) v01 [ 47.531771278 -84.678402792 -171.010400000 ] +(1, 0) v10 [ 47.421454440 -84.788085039 -171.010400000 ] +(1, 1) v11 [ 47.421771735 -84.678085497 -171.010400000 ] +surface axes: AXIS_D0Q2S6A0_S AXIS_D0Q2S6A0_F +AXIS_D0Q2S6A0_S has 8 ancestors +AXIS_D0Q2S6A0_F has 7 ancestors +axis AXIS_D0Q2S6A0_S index: 0 + equipment detector + depends_on AXIS_D0Q2S6A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S6A0_F index: 1 + equipment detector + depends_on FS_D0Q2S6A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S6A0 index: 2 + equipment detector + depends_on FS_D0Q2S6 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S6 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-23.4854125, -33.2552, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 45 +(0, 0) v00 [ 25.861544134 -84.725895184 -171.010400000 ] +(0, 1) v01 [ 25.861861429 -84.615895641 -171.010400000 ] +(1, 0) v10 [ 25.751544591 -84.725577888 -171.010400000 ] +(1, 1) v11 [ 25.751861886 -84.615578346 -171.010400000 ] +surface axes: AXIS_D0Q2S6A1_S AXIS_D0Q2S6A1_F +AXIS_D0Q2S6A1_S has 8 ancestors +AXIS_D0Q2S6A1_F has 7 ancestors +axis AXIS_D0Q2S6A1_S index: 0 + equipment detector + depends_on AXIS_D0Q2S6A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S6A1_F index: 1 + equipment detector + depends_on FS_D0Q2S6A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S6A1 index: 2 + equipment detector + depends_on FS_D0Q2S6 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S6 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-23.4854125, -33.2552, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 46 +(0, 0) v00 [ 47.721056429 -61.278616516 -171.010400000 ] +(0, 1) v01 [ 47.720879802 -61.168616658 -171.010400000 ] +(1, 0) v10 [ 47.611056571 -61.278793144 -171.010400000 ] +(1, 1) v11 [ 47.610879944 -61.168793285 -171.010400000 ] +surface axes: AXIS_D0Q2S7A0_S AXIS_D0Q2S7A0_F +AXIS_D0Q2S7A0_S has 8 ancestors +AXIS_D0Q2S7A0_F has 7 ancestors +axis AXIS_D0Q2S7A0_S index: 0 + equipment detector + depends_on AXIS_D0Q2S7A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S7A0_F index: 1 + equipment detector + depends_on FS_D0Q2S7A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S7A0 index: 2 + equipment detector + depends_on FS_D0Q2S7 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S7 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-23.3413125, -9.8417, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 47 +(0, 0) v00 [ 26.051084365 -61.313412083 -171.010400000 ] +(0, 1) v01 [ 26.050907738 -61.203412225 -171.010400000 ] +(1, 0) v10 [ 25.941084507 -61.313588711 -171.010400000 ] +(1, 1) v11 [ 25.940907880 -61.203588852 -171.010400000 ] +surface axes: AXIS_D0Q2S7A1_S AXIS_D0Q2S7A1_F +AXIS_D0Q2S7A1_S has 8 ancestors +AXIS_D0Q2S7A1_F has 7 ancestors +axis AXIS_D0Q2S7A1_S index: 0 + equipment detector + depends_on AXIS_D0Q2S7A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S7A1_F index: 1 + equipment detector + depends_on FS_D0Q2S7A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S7A1 index: 2 + equipment detector + depends_on FS_D0Q2S7 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S7 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-23.3413125, -9.8417, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 48 +(0, 0) v00 [ 3.329649206 -48.878291032 -171.010400000 ] +(0, 1) v01 [ 3.329410452 -48.768291291 -171.010400000 ] +(1, 0) v10 [ 3.219649465 -48.878529786 -171.010400000 ] +(1, 1) v11 [ 3.219410711 -48.768530045 -171.010400000 ] +surface axes: AXIS_D0Q3S0A0_S AXIS_D0Q3S0A0_F +AXIS_D0Q3S0A0_S has 8 ancestors +AXIS_D0Q3S0A0_F has 7 ancestors +axis AXIS_D0Q3S0A0_S index: 0 + equipment detector + depends_on AXIS_D0Q3S0A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S0A0_F index: 1 + equipment detector + depends_on FS_D0Q3S0A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S0A0 index: 2 + equipment detector + depends_on FS_D0Q3S0 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S0 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [23.1056375, 11.6367625, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 49 +(0, 0) v00 [ -18.340299751 -48.925325545 -171.010400000 ] +(0, 1) v01 [ -18.340538504 -48.815325804 -171.010400000 ] +(1, 0) v10 [ -18.450299491 -48.925564299 -171.010400000 ] +(1, 1) v11 [ -18.450538245 -48.815564558 -171.010400000 ] +surface axes: AXIS_D0Q3S0A1_S AXIS_D0Q3S0A1_F +AXIS_D0Q3S0A1_S has 8 ancestors +AXIS_D0Q3S0A1_F has 7 ancestors +axis AXIS_D0Q3S0A1_S index: 0 + equipment detector + depends_on AXIS_D0Q3S0A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S0A1_F index: 1 + equipment detector + depends_on FS_D0Q3S0A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S0A1 index: 2 + equipment detector + depends_on FS_D0Q3S0 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S0 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [23.1056375, 11.6367625, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 50 +(0, 0) v00 [ 3.332398882 -25.574187263 -171.010400000 ] +(0, 1) v01 [ 3.332393833 -25.464187263 -171.010400000 ] +(1, 0) v10 [ 3.222398882 -25.574192312 -171.010400000 ] +(1, 1) v11 [ 3.222393833 -25.464192312 -171.010400000 ] +surface axes: AXIS_D0Q3S1A0_S AXIS_D0Q3S1A0_F +AXIS_D0Q3S1A0_S has 8 ancestors +AXIS_D0Q3S1A0_F has 7 ancestors +axis AXIS_D0Q3S1A0_S index: 0 + equipment detector + depends_on AXIS_D0Q3S1A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S1A0_F index: 1 + equipment detector + depends_on FS_D0Q3S1A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S1A0 index: 2 + equipment detector + depends_on FS_D0Q3S1 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S1 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [23.1298375, 34.9864625, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 51 +(0, 0) v00 [ -18.337601095 -25.575181963 -171.010400000 ] +(0, 1) v01 [ -18.337606144 -25.465181963 -171.010400000 ] +(1, 0) v10 [ -18.447601095 -25.575187012 -171.010400000 ] +(1, 1) v11 [ -18.447606144 -25.465187012 -171.010400000 ] +surface axes: AXIS_D0Q3S1A1_S AXIS_D0Q3S1A1_F +AXIS_D0Q3S1A1_S has 8 ancestors +AXIS_D0Q3S1A1_F has 7 ancestors +axis AXIS_D0Q3S1A1_S index: 0 + equipment detector + depends_on AXIS_D0Q3S1A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S1A1_F index: 1 + equipment detector + depends_on FS_D0Q3S1A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S1A1 index: 2 + equipment detector + depends_on FS_D0Q3S1 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S1 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [23.1298375, 34.9864625, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 52 +(0, 0) v00 [ -40.242605001 -95.553160040 -171.010400000 ] +(0, 1) v01 [ -40.132608365 -95.552299777 -171.010400000 ] +(1, 0) v10 [ -40.243465263 -95.443163404 -171.010400000 ] +(1, 1) v11 [ -40.133468627 -95.442303141 -171.010400000 ] +surface axes: AXIS_D0Q3S2A0_S AXIS_D0Q3S2A0_F +AXIS_D0Q3S2A0_S has 8 ancestors +AXIS_D0Q3S2A0_F has 7 ancestors +axis AXIS_D0Q3S2A0_S index: 0 + equipment detector + depends_on AXIS_D0Q3S2A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S2A0_F index: 1 + equipment detector + depends_on FS_D0Q3S2A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S2A0 index: 2 + equipment detector + depends_on FS_D0Q3S2 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S2 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [10.9572375, -23.5830375, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 53 +(0, 0) v00 [ -40.412076669 -73.883822732 -171.010400000 ] +(0, 1) v01 [ -40.302080033 -73.882962470 -171.010400000 ] +(1, 0) v10 [ -40.412936931 -73.773826096 -171.010400000 ] +(1, 1) v11 [ -40.302940295 -73.772965834 -171.010400000 ] +surface axes: AXIS_D0Q3S2A1_S AXIS_D0Q3S2A1_F +AXIS_D0Q3S2A1_S has 8 ancestors +AXIS_D0Q3S2A1_F has 7 ancestors +axis AXIS_D0Q3S2A1_S index: 0 + equipment detector + depends_on AXIS_D0Q3S2A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S2A1_F index: 1 + equipment detector + depends_on FS_D0Q3S2A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S2A1 index: 2 + equipment detector + depends_on FS_D0Q3S2 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S2 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [10.9572375, -23.5830375, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 54 +(0, 0) v00 [ -16.853197596 -95.418813608 -171.010400000 ] +(0, 1) v01 [ -16.743198711 -95.418318400 -171.010400000 ] +(1, 0) v10 [ -16.853692804 -95.308814722 -171.010400000 ] +(1, 1) v11 [ -16.743693918 -95.308319515 -171.010400000 ] +surface axes: AXIS_D0Q3S3A0_S AXIS_D0Q3S3A0_F +AXIS_D0Q3S3A0_S has 8 ancestors +AXIS_D0Q3S3A0_F has 7 ancestors +axis AXIS_D0Q3S3A0_S index: 0 + equipment detector + depends_on AXIS_D0Q3S3A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S3A0_F index: 1 + equipment detector + depends_on FS_D0Q3S3A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S3A0 index: 2 + equipment detector + depends_on FS_D0Q3S3 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S3 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [34.4180375, -23.4818375, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 55 +(0, 0) v00 [ -16.950753489 -73.749033202 -171.010400000 ] +(0, 1) v01 [ -16.840754603 -73.748537994 -171.010400000 ] +(1, 0) v10 [ -16.951248696 -73.639034316 -171.010400000 ] +(1, 1) v11 [ -16.841249811 -73.638539109 -171.010400000 ] +surface axes: AXIS_D0Q3S3A1_S AXIS_D0Q3S3A1_F +AXIS_D0Q3S3A1_S has 8 ancestors +AXIS_D0Q3S3A1_F has 7 ancestors +axis AXIS_D0Q3S3A1_S index: 0 + equipment detector + depends_on AXIS_D0Q3S3A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S3A1_F index: 1 + equipment detector + depends_on FS_D0Q3S3A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S3A1 index: 2 + equipment detector + depends_on FS_D0Q3S3 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S3 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [34.4180375, -23.4818375, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 56 +(0, 0) v00 [ -86.794315345 -51.787826357 -171.010400000 ] +(0, 1) v01 [ -86.794661477 -51.897825812 -171.010400000 ] +(1, 0) v10 [ -86.684315890 -51.788172488 -171.010400000 ] +(1, 1) v11 [ -86.684662021 -51.898171944 -171.010400000 ] +surface axes: AXIS_D0Q3S4A0_S AXIS_D0Q3S4A0_F +AXIS_D0Q3S4A0_S has 8 ancestors +AXIS_D0Q3S4A0_F has 7 ancestors +axis AXIS_D0Q3S4A0_S index: 0 + equipment detector + depends_on AXIS_D0Q3S4A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S4A0_F index: 1 + equipment detector + depends_on FS_D0Q3S4A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S4A0 index: 2 + equipment detector + depends_on FS_D0Q3S4 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S4 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-24.1283625, -11.5336375, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 57 +(0, 0) v00 [ -65.124422627 -51.856014239 -171.010400000 ] +(0, 1) v01 [ -65.124768759 -51.966013694 -171.010400000 ] +(1, 0) v10 [ -65.014423172 -51.856360370 -171.010400000 ] +(1, 1) v11 [ -65.014769303 -51.966359826 -171.010400000 ] +surface axes: AXIS_D0Q3S4A1_S AXIS_D0Q3S4A1_F +AXIS_D0Q3S4A1_S has 8 ancestors +AXIS_D0Q3S4A1_F has 7 ancestors +axis AXIS_D0Q3S4A1_S index: 0 + equipment detector + depends_on AXIS_D0Q3S4A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S4A1_F index: 1 + equipment detector + depends_on FS_D0Q3S4A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S4A1 index: 2 + equipment detector + depends_on FS_D0Q3S4 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S4 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-24.1283625, -11.5336375, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 58 +(0, 0) v00 [ -86.867858967 -75.276033861 -171.010400000 ] +(0, 1) v01 [ -86.867861213 -75.386033861 -171.010400000 ] +(1, 0) v10 [ -86.757858967 -75.276036107 -171.010400000 ] +(1, 1) v11 [ -86.757861213 -75.386036107 -171.010400000 ] +surface axes: AXIS_D0Q3S5A0_S AXIS_D0Q3S5A0_F +AXIS_D0Q3S5A0_S has 8 ancestors +AXIS_D0Q3S5A0_F has 7 ancestors +axis AXIS_D0Q3S5A0_S index: 0 + equipment detector + depends_on AXIS_D0Q3S5A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S5A0_F index: 1 + equipment detector + depends_on FS_D0Q3S5A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S5A0 index: 2 + equipment detector + depends_on FS_D0Q3S5 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S5 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-24.1701625, -34.9548375, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 59 +(0, 0) v00 [ -65.197858971 -75.276476370 -171.010400000 ] +(0, 1) v01 [ -65.197861217 -75.386476370 -171.010400000 ] +(1, 0) v10 [ -65.087858971 -75.276478616 -171.010400000 ] +(1, 1) v11 [ -65.087861217 -75.386478616 -171.010400000 ] +surface axes: AXIS_D0Q3S5A1_S AXIS_D0Q3S5A1_F +AXIS_D0Q3S5A1_S has 8 ancestors +AXIS_D0Q3S5A1_F has 7 ancestors +axis AXIS_D0Q3S5A1_S index: 0 + equipment detector + depends_on AXIS_D0Q3S5A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S5A1_F index: 1 + equipment detector + depends_on FS_D0Q3S5A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S5A1 index: 2 + equipment detector + depends_on FS_D0Q3S5 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S5 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-24.1701625, -34.9548375, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 60 +(0, 0) v00 [ -84.554277708 -48.501581102 -171.010400000 ] +(0, 1) v01 [ -84.444279500 -48.500953291 -171.010400000 ] +(1, 0) v10 [ -84.554905519 -48.391582893 -171.010400000 ] +(1, 1) v11 [ -84.444907310 -48.390955083 -171.010400000 ] +surface axes: AXIS_D0Q3S6A0_S AXIS_D0Q3S6A0_F +AXIS_D0Q3S6A0_S has 8 ancestors +AXIS_D0Q3S6A0_F has 7 ancestors +axis AXIS_D0Q3S6A0_S index: 0 + equipment detector + depends_on AXIS_D0Q3S6A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S6A0_F index: 1 + equipment detector + depends_on FS_D0Q3S6A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S6A0 index: 2 + equipment detector + depends_on FS_D0Q3S6 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S6 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-33.3089625, 23.4474625, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 61 +(0, 0) v00 [ -84.677956420 -26.831934045 -171.010400000 ] +(0, 1) v01 [ -84.567958212 -26.831306234 -171.010400000 ] +(1, 0) v10 [ -84.678584231 -26.721935836 -171.010400000 ] +(1, 1) v11 [ -84.568586023 -26.721308026 -171.010400000 ] +surface axes: AXIS_D0Q3S6A1_S AXIS_D0Q3S6A1_F +AXIS_D0Q3S6A1_S has 8 ancestors +AXIS_D0Q3S6A1_F has 7 ancestors +axis AXIS_D0Q3S6A1_S index: 0 + equipment detector + depends_on AXIS_D0Q3S6A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S6A1_F index: 1 + equipment detector + depends_on FS_D0Q3S6A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S6A1 index: 2 + equipment detector + depends_on FS_D0Q3S6 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S6 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-33.3089625, 23.4474625, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 62 +(0, 0) v00 [ -61.249561180 -48.465923921 -171.010400000 ] +(0, 1) v01 [ -61.139562943 -48.465301141 -171.010400000 ] +(1, 0) v10 [ -61.250183961 -48.355925684 -171.010400000 ] +(1, 1) v11 [ -61.140185724 -48.355302904 -171.010400000 ] +surface axes: AXIS_D0Q3S7A0_S AXIS_D0Q3S7A0_F +AXIS_D0Q3S7A0_S has 8 ancestors +AXIS_D0Q3S7A0_F has 7 ancestors +axis AXIS_D0Q3S7A0_S index: 0 + equipment detector + depends_on AXIS_D0Q3S7A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S7A0_F index: 1 + equipment detector + depends_on FS_D0Q3S7A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S7A0 index: 2 + equipment detector + depends_on FS_D0Q3S7 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S7 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-10.0032625, 23.4826625, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 63 +(0, 0) v00 [ -61.372248991 -26.796271231 -171.010400000 ] +(0, 1) v01 [ -61.262250754 -26.795648451 -171.010400000 ] +(1, 0) v10 [ -61.372871772 -26.686272994 -171.010400000 ] +(1, 1) v11 [ -61.262873535 -26.685650214 -171.010400000 ] +surface axes: AXIS_D0Q3S7A1_S AXIS_D0Q3S7A1_F +AXIS_D0Q3S7A1_S has 8 ancestors +AXIS_D0Q3S7A1_F has 7 ancestors +axis AXIS_D0Q3S7A1_S index: 0 + equipment detector + depends_on AXIS_D0Q3S7A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S7A1_F index: 1 + equipment detector + depends_on FS_D0Q3S7A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S7A1 index: 2 + equipment detector + depends_on FS_D0Q3S7 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S7 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-10.0032625, 23.4826625, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . diff --git a/py2cbf/fel_test2.cbf b/py2cbf/fel_test2.cbf new file mode 100644 index 00000000..5eecb83c --- /dev/null +++ b/py2cbf/fel_test2.cbf @@ -0,0 +1,1516 @@ +###CBF: VERSION 1.7.6 +# CBF file written by CBFlib v0.9.3 +# +# fel_test2.cbf +# Derived from new_idx-s00-20130304084113427 +# Provided by Aaron Brewster +# Linac Coherent Light Source +# 2575 Sand Hill Road, MS103 +# Menlo Park, CA 94025 +# +# Tel: 650-926-3191 +# Fax: 650-926-3600 +# Data removed and converted to use _axis.rotation +# and _axis.rotation axis for module positioning +# -- H. J. Bernstein, 7 November 2013 + +data_new_idx-s00-20130304084113427 + +_diffrn.id DS1 + +_diffrn_source.diffrn_id DS1 +_diffrn_source.source xfel +_diffrn_source.type 'LCLS CXI Endstation' + +_diffrn_radiation.diffrn_id DS1 +_diffrn_radiation.wavelength_id WAVELENGTH1 +_diffrn_radiation.probe x-ray + +_diffrn_radiation_wavelength.id WAVELENGTH1 +_diffrn_radiation_wavelength.wavelength 1.768552 +_diffrn_radiation_wavelength.wt 1.0 + +_diffrn_detector.diffrn_id DS1 +_diffrn_detector.id CSPAD_FRONT +_diffrn_detector.type 'CS PAD' +_diffrn_detector.details . +_diffrn_detector.number_of_axes 104 + +loop_ +_diffrn_detector_axis.detector_id +_diffrn_detector_axis.axis_id + CSPAD_FRONT AXIS_D0_X + CSPAD_FRONT AXIS_D0_Y + CSPAD_FRONT AXIS_D0_Z + CSPAD_FRONT AXIS_D0_R + CSPAD_FRONT FS_D0Q0 + CSPAD_FRONT FS_D0Q0S0 + CSPAD_FRONT FS_D0Q0S0A0 + CSPAD_FRONT FS_D0Q0S0A1 + CSPAD_FRONT FS_D0Q0S1 + CSPAD_FRONT FS_D0Q0S1A0 + CSPAD_FRONT FS_D0Q0S1A1 + CSPAD_FRONT FS_D0Q0S2 + CSPAD_FRONT FS_D0Q0S2A0 + CSPAD_FRONT FS_D0Q0S2A1 + CSPAD_FRONT FS_D0Q0S3 + CSPAD_FRONT FS_D0Q0S3A0 + CSPAD_FRONT FS_D0Q0S3A1 + CSPAD_FRONT FS_D0Q0S4 + CSPAD_FRONT FS_D0Q0S4A0 + CSPAD_FRONT FS_D0Q0S4A1 + CSPAD_FRONT FS_D0Q0S5 + CSPAD_FRONT FS_D0Q0S5A0 + CSPAD_FRONT FS_D0Q0S5A1 + CSPAD_FRONT FS_D0Q0S6 + CSPAD_FRONT FS_D0Q0S6A0 + CSPAD_FRONT FS_D0Q0S6A1 + CSPAD_FRONT FS_D0Q0S7 + CSPAD_FRONT FS_D0Q0S7A0 + CSPAD_FRONT FS_D0Q0S7A1 + CSPAD_FRONT FS_D0Q1 + CSPAD_FRONT FS_D0Q1S0 + CSPAD_FRONT FS_D0Q1S0A0 + CSPAD_FRONT FS_D0Q1S0A1 + CSPAD_FRONT FS_D0Q1S1 + CSPAD_FRONT FS_D0Q1S1A0 + CSPAD_FRONT FS_D0Q1S1A1 + CSPAD_FRONT FS_D0Q1S2 + CSPAD_FRONT FS_D0Q1S2A0 + CSPAD_FRONT FS_D0Q1S2A1 + CSPAD_FRONT FS_D0Q1S3 + CSPAD_FRONT FS_D0Q1S3A0 + CSPAD_FRONT FS_D0Q1S3A1 + CSPAD_FRONT FS_D0Q1S4 + CSPAD_FRONT FS_D0Q1S4A0 + CSPAD_FRONT FS_D0Q1S4A1 + CSPAD_FRONT FS_D0Q1S5 + CSPAD_FRONT FS_D0Q1S5A0 + CSPAD_FRONT FS_D0Q1S5A1 + CSPAD_FRONT FS_D0Q1S6 + CSPAD_FRONT FS_D0Q1S6A0 + CSPAD_FRONT FS_D0Q1S6A1 + CSPAD_FRONT FS_D0Q1S7 + CSPAD_FRONT FS_D0Q1S7A0 + CSPAD_FRONT FS_D0Q1S7A1 + CSPAD_FRONT FS_D0Q2 + CSPAD_FRONT FS_D0Q2S0 + CSPAD_FRONT FS_D0Q2S0A0 + CSPAD_FRONT FS_D0Q2S0A1 + CSPAD_FRONT FS_D0Q2S1 + CSPAD_FRONT FS_D0Q2S1A0 + CSPAD_FRONT FS_D0Q2S1A1 + CSPAD_FRONT FS_D0Q2S2 + CSPAD_FRONT FS_D0Q2S2A0 + CSPAD_FRONT FS_D0Q2S2A1 + CSPAD_FRONT FS_D0Q2S3 + CSPAD_FRONT FS_D0Q2S3A0 + CSPAD_FRONT FS_D0Q2S3A1 + CSPAD_FRONT FS_D0Q2S4 + CSPAD_FRONT FS_D0Q2S4A0 + CSPAD_FRONT FS_D0Q2S4A1 + CSPAD_FRONT FS_D0Q2S5 + CSPAD_FRONT FS_D0Q2S5A0 + CSPAD_FRONT FS_D0Q2S5A1 + CSPAD_FRONT FS_D0Q2S6 + CSPAD_FRONT FS_D0Q2S6A0 + CSPAD_FRONT FS_D0Q2S6A1 + CSPAD_FRONT FS_D0Q2S7 + CSPAD_FRONT FS_D0Q2S7A0 + CSPAD_FRONT FS_D0Q2S7A1 + CSPAD_FRONT FS_D0Q3 + CSPAD_FRONT FS_D0Q3S0 + CSPAD_FRONT FS_D0Q3S0A0 + CSPAD_FRONT FS_D0Q3S0A1 + CSPAD_FRONT FS_D0Q3S1 + CSPAD_FRONT FS_D0Q3S1A0 + CSPAD_FRONT FS_D0Q3S1A1 + CSPAD_FRONT FS_D0Q3S2 + CSPAD_FRONT FS_D0Q3S2A0 + CSPAD_FRONT FS_D0Q3S2A1 + CSPAD_FRONT FS_D0Q3S3 + CSPAD_FRONT FS_D0Q3S3A0 + CSPAD_FRONT FS_D0Q3S3A1 + CSPAD_FRONT FS_D0Q3S4 + CSPAD_FRONT FS_D0Q3S4A0 + CSPAD_FRONT FS_D0Q3S4A1 + CSPAD_FRONT FS_D0Q3S5 + CSPAD_FRONT FS_D0Q3S5A0 + CSPAD_FRONT FS_D0Q3S5A1 + CSPAD_FRONT FS_D0Q3S6 + CSPAD_FRONT FS_D0Q3S6A0 + CSPAD_FRONT FS_D0Q3S6A1 + CSPAD_FRONT FS_D0Q3S7 + CSPAD_FRONT FS_D0Q3S7A0 + CSPAD_FRONT FS_D0Q3S7A1 + +loop_ +_diffrn_detector_element.id +_diffrn_detector_element.detector_id + ELE_D0Q0S0A0 CSPAD_FRONT + ELE_D0Q0S0A1 CSPAD_FRONT + ELE_D0Q0S1A0 CSPAD_FRONT + ELE_D0Q0S1A1 CSPAD_FRONT + ELE_D0Q0S2A0 CSPAD_FRONT + ELE_D0Q0S2A1 CSPAD_FRONT + ELE_D0Q0S3A0 CSPAD_FRONT + ELE_D0Q0S3A1 CSPAD_FRONT + ELE_D0Q0S4A0 CSPAD_FRONT + ELE_D0Q0S4A1 CSPAD_FRONT + ELE_D0Q0S5A0 CSPAD_FRONT + ELE_D0Q0S5A1 CSPAD_FRONT + ELE_D0Q0S6A0 CSPAD_FRONT + ELE_D0Q0S6A1 CSPAD_FRONT + ELE_D0Q0S7A0 CSPAD_FRONT + ELE_D0Q0S7A1 CSPAD_FRONT + ELE_D0Q1S0A0 CSPAD_FRONT + ELE_D0Q1S0A1 CSPAD_FRONT + ELE_D0Q1S1A0 CSPAD_FRONT + ELE_D0Q1S1A1 CSPAD_FRONT + ELE_D0Q1S2A0 CSPAD_FRONT + ELE_D0Q1S2A1 CSPAD_FRONT + ELE_D0Q1S3A0 CSPAD_FRONT + ELE_D0Q1S3A1 CSPAD_FRONT + ELE_D0Q1S4A0 CSPAD_FRONT + ELE_D0Q1S4A1 CSPAD_FRONT + ELE_D0Q1S5A0 CSPAD_FRONT + ELE_D0Q1S5A1 CSPAD_FRONT + ELE_D0Q1S6A0 CSPAD_FRONT + ELE_D0Q1S6A1 CSPAD_FRONT + ELE_D0Q1S7A0 CSPAD_FRONT + ELE_D0Q1S7A1 CSPAD_FRONT + ELE_D0Q2S0A0 CSPAD_FRONT + ELE_D0Q2S0A1 CSPAD_FRONT + ELE_D0Q2S1A0 CSPAD_FRONT + ELE_D0Q2S1A1 CSPAD_FRONT + ELE_D0Q2S2A0 CSPAD_FRONT + ELE_D0Q2S2A1 CSPAD_FRONT + ELE_D0Q2S3A0 CSPAD_FRONT + ELE_D0Q2S3A1 CSPAD_FRONT + ELE_D0Q2S4A0 CSPAD_FRONT + ELE_D0Q2S4A1 CSPAD_FRONT + ELE_D0Q2S5A0 CSPAD_FRONT + ELE_D0Q2S5A1 CSPAD_FRONT + ELE_D0Q2S6A0 CSPAD_FRONT + ELE_D0Q2S6A1 CSPAD_FRONT + ELE_D0Q2S7A0 CSPAD_FRONT + ELE_D0Q2S7A1 CSPAD_FRONT + ELE_D0Q3S0A0 CSPAD_FRONT + ELE_D0Q3S0A1 CSPAD_FRONT + ELE_D0Q3S1A0 CSPAD_FRONT + ELE_D0Q3S1A1 CSPAD_FRONT + ELE_D0Q3S2A0 CSPAD_FRONT + ELE_D0Q3S2A1 CSPAD_FRONT + ELE_D0Q3S3A0 CSPAD_FRONT + ELE_D0Q3S3A1 CSPAD_FRONT + ELE_D0Q3S4A0 CSPAD_FRONT + ELE_D0Q3S4A1 CSPAD_FRONT + ELE_D0Q3S5A0 CSPAD_FRONT + ELE_D0Q3S5A1 CSPAD_FRONT + ELE_D0Q3S6A0 CSPAD_FRONT + ELE_D0Q3S6A1 CSPAD_FRONT + ELE_D0Q3S7A0 CSPAD_FRONT + ELE_D0Q3S7A1 CSPAD_FRONT + +loop_ +_diffrn_data_frame.id +_diffrn_data_frame.detector_element_id +_diffrn_data_frame.array_id +_diffrn_data_frame.binary_id + FRAME1 ELE_D0Q0S0A0 ARRAY_D0Q0S0A0 1 + FRAME1 ELE_D0Q0S0A1 ARRAY_D0Q0S0A1 2 + FRAME1 ELE_D0Q0S1A0 ARRAY_D0Q0S1A0 3 + FRAME1 ELE_D0Q0S1A1 ARRAY_D0Q0S1A1 4 + FRAME1 ELE_D0Q0S2A0 ARRAY_D0Q0S2A0 5 + FRAME1 ELE_D0Q0S2A1 ARRAY_D0Q0S2A1 6 + FRAME1 ELE_D0Q0S3A0 ARRAY_D0Q0S3A0 7 + FRAME1 ELE_D0Q0S3A1 ARRAY_D0Q0S3A1 8 + FRAME1 ELE_D0Q0S4A0 ARRAY_D0Q0S4A0 9 + FRAME1 ELE_D0Q0S4A1 ARRAY_D0Q0S4A1 10 + FRAME1 ELE_D0Q0S5A0 ARRAY_D0Q0S5A0 11 + FRAME1 ELE_D0Q0S5A1 ARRAY_D0Q0S5A1 12 + FRAME1 ELE_D0Q0S6A0 ARRAY_D0Q0S6A0 13 + FRAME1 ELE_D0Q0S6A1 ARRAY_D0Q0S6A1 14 + FRAME1 ELE_D0Q0S7A0 ARRAY_D0Q0S7A0 15 + FRAME1 ELE_D0Q0S7A1 ARRAY_D0Q0S7A1 16 + FRAME1 ELE_D0Q1S0A0 ARRAY_D0Q1S0A0 17 + FRAME1 ELE_D0Q1S0A1 ARRAY_D0Q1S0A1 18 + FRAME1 ELE_D0Q1S1A0 ARRAY_D0Q1S1A0 19 + FRAME1 ELE_D0Q1S1A1 ARRAY_D0Q1S1A1 20 + FRAME1 ELE_D0Q1S2A0 ARRAY_D0Q1S2A0 21 + FRAME1 ELE_D0Q1S2A1 ARRAY_D0Q1S2A1 22 + FRAME1 ELE_D0Q1S3A0 ARRAY_D0Q1S3A0 23 + FRAME1 ELE_D0Q1S3A1 ARRAY_D0Q1S3A1 24 + FRAME1 ELE_D0Q1S4A0 ARRAY_D0Q1S4A0 25 + FRAME1 ELE_D0Q1S4A1 ARRAY_D0Q1S4A1 26 + FRAME1 ELE_D0Q1S5A0 ARRAY_D0Q1S5A0 27 + FRAME1 ELE_D0Q1S5A1 ARRAY_D0Q1S5A1 28 + FRAME1 ELE_D0Q1S6A0 ARRAY_D0Q1S6A0 29 + FRAME1 ELE_D0Q1S6A1 ARRAY_D0Q1S6A1 30 + FRAME1 ELE_D0Q1S7A0 ARRAY_D0Q1S7A0 31 + FRAME1 ELE_D0Q1S7A1 ARRAY_D0Q1S7A1 32 + FRAME1 ELE_D0Q2S0A0 ARRAY_D0Q2S0A0 33 + FRAME1 ELE_D0Q2S0A1 ARRAY_D0Q2S0A1 34 + FRAME1 ELE_D0Q2S1A0 ARRAY_D0Q2S1A0 35 + FRAME1 ELE_D0Q2S1A1 ARRAY_D0Q2S1A1 36 + FRAME1 ELE_D0Q2S2A0 ARRAY_D0Q2S2A0 37 + FRAME1 ELE_D0Q2S2A1 ARRAY_D0Q2S2A1 38 + FRAME1 ELE_D0Q2S3A0 ARRAY_D0Q2S3A0 39 + FRAME1 ELE_D0Q2S3A1 ARRAY_D0Q2S3A1 40 + FRAME1 ELE_D0Q2S4A0 ARRAY_D0Q2S4A0 41 + FRAME1 ELE_D0Q2S4A1 ARRAY_D0Q2S4A1 42 + FRAME1 ELE_D0Q2S5A0 ARRAY_D0Q2S5A0 43 + FRAME1 ELE_D0Q2S5A1 ARRAY_D0Q2S5A1 44 + FRAME1 ELE_D0Q2S6A0 ARRAY_D0Q2S6A0 45 + FRAME1 ELE_D0Q2S6A1 ARRAY_D0Q2S6A1 46 + FRAME1 ELE_D0Q2S7A0 ARRAY_D0Q2S7A0 47 + FRAME1 ELE_D0Q2S7A1 ARRAY_D0Q2S7A1 48 + FRAME1 ELE_D0Q3S0A0 ARRAY_D0Q3S0A0 49 + FRAME1 ELE_D0Q3S0A1 ARRAY_D0Q3S0A1 50 + FRAME1 ELE_D0Q3S1A0 ARRAY_D0Q3S1A0 51 + FRAME1 ELE_D0Q3S1A1 ARRAY_D0Q3S1A1 52 + FRAME1 ELE_D0Q3S2A0 ARRAY_D0Q3S2A0 53 + FRAME1 ELE_D0Q3S2A1 ARRAY_D0Q3S2A1 54 + FRAME1 ELE_D0Q3S3A0 ARRAY_D0Q3S3A0 55 + FRAME1 ELE_D0Q3S3A1 ARRAY_D0Q3S3A1 56 + FRAME1 ELE_D0Q3S4A0 ARRAY_D0Q3S4A0 57 + FRAME1 ELE_D0Q3S4A1 ARRAY_D0Q3S4A1 58 + FRAME1 ELE_D0Q3S5A0 ARRAY_D0Q3S5A0 59 + FRAME1 ELE_D0Q3S5A1 ARRAY_D0Q3S5A1 60 + FRAME1 ELE_D0Q3S6A0 ARRAY_D0Q3S6A0 61 + FRAME1 ELE_D0Q3S6A1 ARRAY_D0Q3S6A1 62 + FRAME1 ELE_D0Q3S7A0 ARRAY_D0Q3S7A0 63 + FRAME1 ELE_D0Q3S7A1 ARRAY_D0Q3S7A1 64 + +_diffrn_measurement.diffrn_id DS1 +_diffrn_measurement.id INJECTION +_diffrn_measurement.number_of_axes 0 +_diffrn_measurement.method electrospray +_diffrn_measurement.details 'crystals injected by electrospray' + +_diffrn_scan.id SCAN1 +_diffrn_scan.frame_id_start FRAME1 +_diffrn_scan.frame_id_end FRAME1 +_diffrn_scan.frames 1 + +_diffrn_scan_frame.frame_id FRAME1 +_diffrn_scan_frame.frame_number 1 +_diffrn_scan_frame.integration_time 0.0 +_diffrn_scan_frame.scan_id SCAN1 +_diffrn_scan_frame.date 2013-03-04T08:41Z13.427 + +loop_ +_axis.id +_axis.type +_axis.equipment +_axis.depends_on +_axis.vector[1] +_axis.vector[2] +_axis.vector[3] +_axis.offset[1] +_axis.offset[2] +_axis.offset[3] +_axis.equipment_component +_axis.rotation +_axis.rotation_axis + AXIS_SOURCE general source . 0 0 1 . . . . . . + AXIS_GRAVITY general gravity . 0 -1 0 . . . . . . + AXIS_D0_Z translation detector . 0 0 1 . . . detector_arm . . + AXIS_D0_Y translation detector AXIS_D0_Z 0 1 0 . . . detector_arm . . + AXIS_D0_X translation detector AXIS_D0_Y 1 0 0 . . . detector_arm . . + AXIS_D0_R rotation detector AXIS_D0_X 0 0 1 0.0 0.0 0.0 detector_arm . . + FS_D0Q0 rotation detector AXIS_D0_R 0 0 1 -49.860765625 41.643353125 0.0 detector_quadrant . . + FS_D0Q0S0 rotation detector FS_D0Q0 0.0 0.0 1.0 11.3696 -23.189925 0.0 detector_sensor . . + FS_D0Q0S0A0 rotation detector FS_D0Q0S0 0 0 1 -10.835 0.0 0.0 detector_asic 89.66181 FS_D0Q0S0 + AXIS_D0Q0S0A0_F translation detector FS_D0Q0S0A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q0S0A0_S translation detector AXIS_D0Q0S0A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q0S0A1 rotation detector FS_D0Q0S0 0 0 1 10.835 0.0 0.0 detector_asic 89.66181 FS_D0Q0S0 + AXIS_D0Q0S0A1_F translation detector FS_D0Q0S0A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q0S0A1_S translation detector AXIS_D0Q0S0A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q0S1 rotation detector FS_D0Q0 0.0 0.0 1.0 34.815 -23.309825 0.0 detector_sensor . . + FS_D0Q0S1A0 rotation detector FS_D0Q0S1 0 0 1 -10.835 0.0 0.0 detector_asic 90.00132 FS_D0Q0S1 + AXIS_D0Q0S1A0_F translation detector FS_D0Q0S1A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q0S1A0_S translation detector AXIS_D0Q0S1A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q0S1A1 rotation detector FS_D0Q0S1 0 0 1 10.835 0.0 0.0 detector_asic 90.00132 FS_D0Q0S1 + AXIS_D0Q0S1A1_F translation detector FS_D0Q0S1A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q0S1A1_S translation detector AXIS_D0Q0S1A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q0S2 rotation detector FS_D0Q0 -0.0 -0.0 -1.0 -23.5389 -10.921625 0.0 detector_sensor . . + FS_D0Q0S2A0 rotation detector FS_D0Q0S2 0 0 1 -10.835 0.0 0.0 detector_asic 359.68548 FS_D0Q0S2 + AXIS_D0Q0S2A0_F translation detector FS_D0Q0S2A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q0S2A0_S translation detector AXIS_D0Q0S2A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q0S2A1 rotation detector FS_D0Q0S2 0 0 1 10.835 0.0 0.0 detector_asic 359.68548 FS_D0Q0S2 + AXIS_D0Q0S2A1_F translation detector FS_D0Q0S2A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q0S2A1_S translation detector AXIS_D0Q0S2A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q0S3 rotation detector FS_D0Q0 0.0 0.0 1.0 -23.5499 -34.181125 0.0 detector_sensor . . + FS_D0Q0S3A0 rotation detector FS_D0Q0S3 0 0 1 -10.835 0.0 0.0 detector_asic 359.96513 FS_D0Q0S3 + AXIS_D0Q0S3A0_F translation detector FS_D0Q0S3A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q0S3A0_S translation detector AXIS_D0Q0S3A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q0S3A1 rotation detector FS_D0Q0S3 0 0 1 10.835 0.0 0.0 detector_asic 359.96513 FS_D0Q0S3 + AXIS_D0Q0S3A1_F translation detector FS_D0Q0S3A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q0S3A1_S translation detector AXIS_D0Q0S3A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q0S4 rotation detector FS_D0Q0 0.0 0.0 1.0 -11.2651 24.282775 0.0 detector_sensor . . + FS_D0Q0S4A0 rotation detector FS_D0Q0S4 0 0 1 -10.835 0.0 0.0 detector_asic 270.14738 FS_D0Q0S4 + AXIS_D0Q0S4A0_F translation detector FS_D0Q0S4A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q0S4A0_S translation detector AXIS_D0Q0S4A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q0S4A1 rotation detector FS_D0Q0S4 0 0 1 10.835 0.0 0.0 detector_asic 270.14738 FS_D0Q0S4 + AXIS_D0Q0S4A1_F translation detector FS_D0Q0S4A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q0S4A1_S translation detector AXIS_D0Q0S4A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q0S5 rotation detector FS_D0Q0 0.0 0.0 1.0 -34.7336 24.169475 0.0 detector_sensor . . + FS_D0Q0S5A0 rotation detector FS_D0Q0S5 0 0 1 -10.835 0.0 0.0 detector_asic 270.07896 FS_D0Q0S5 + AXIS_D0Q0S5A0_F translation detector FS_D0Q0S5A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q0S5A0_S translation detector AXIS_D0Q0S5A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q0S5A1 rotation detector FS_D0Q0S5 0 0 1 10.835 0.0 0.0 detector_asic 270.07896 FS_D0Q0S5 + AXIS_D0Q0S5A1_F translation detector FS_D0Q0S5A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q0S5A1_S translation detector AXIS_D0Q0S5A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q0S6 rotation detector FS_D0Q0 0.0 0.0 1.0 23.5488 33.320375 0.0 detector_sensor . . + FS_D0Q0S6A0 rotation detector FS_D0Q0S6 0 0 1 -10.835 0.0 0.0 detector_asic 359.78222 FS_D0Q0S6 + AXIS_D0Q0S6A0_F translation detector FS_D0Q0S6A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q0S6A0_S translation detector AXIS_D0Q0S6A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q0S6A1 rotation detector FS_D0Q0S6 0 0 1 10.835 0.0 0.0 detector_asic 359.78222 FS_D0Q0S6 + AXIS_D0Q0S6A1_F translation detector FS_D0Q0S6A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q0S6A1_S translation detector AXIS_D0Q0S6A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q0S7 rotation detector FS_D0Q0 0.0 0.0 1.0 23.3541 9.829875 0.0 detector_sensor . . + FS_D0Q0S7A0 rotation detector FS_D0Q0S7 0 0 1 -10.835 0.0 0.0 detector_asic 359.89604 FS_D0Q0S7 + AXIS_D0Q0S7A0_F translation detector FS_D0Q0S7A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q0S7A0_S translation detector AXIS_D0Q0S7A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q0S7A1 rotation detector FS_D0Q0S7 0 0 1 10.835 0.0 0.0 detector_asic 359.89604 FS_D0Q0S7 + AXIS_D0Q0S7A1_F translation detector FS_D0Q0S7A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q0S7A1_S translation detector AXIS_D0Q0S7A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q1 rotation detector AXIS_D0_R 0 0 1 41.512521875 50.149653125 0.0 detector_quadrant . . + FS_D0Q1S0 rotation detector FS_D0Q1 -0.0 -0.0 -1.0 -23.1589875 -11.451825 0.0 detector_sensor . . + FS_D0Q1S0A0 rotation detector FS_D0Q1S0 0 0 1 -10.835 0.0 0.0 detector_asic 0.27238 FS_D0Q1S0 + AXIS_D0Q1S0A0_F translation detector FS_D0Q1S0A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q1S0A0_S translation detector AXIS_D0Q1S0A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q1S0A1 rotation detector FS_D0Q1S0 0 0 1 10.835 0.0 0.0 detector_asic 0.27238 FS_D0Q1S0 + AXIS_D0Q1S0A1_F translation detector FS_D0Q1S0A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q1S0A1_S translation detector AXIS_D0Q1S0A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q1S1 rotation detector FS_D0Q1 -0.0 -0.0 -1.0 -23.2073875 -34.782825 0.0 detector_sensor . . + FS_D0Q1S1A0 rotation detector FS_D0Q1S1 0 0 1 -10.835 0.0 0.0 detector_asic 0.00525999986641 FS_D0Q1S1 + AXIS_D0Q1S1A0_F translation detector FS_D0Q1S1A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q1S1A0_S translation detector AXIS_D0Q1S1A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q1S1A1 rotation detector FS_D0Q1S1 0 0 1 10.835 0.0 0.0 detector_asic 0.00525999986641 FS_D0Q1S1 + AXIS_D0Q1S1A1_F translation detector FS_D0Q1S1A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q1S1A1_S translation detector AXIS_D0Q1S1A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q1S2 rotation detector FS_D0Q1 0.0 0.0 1.0 -10.7311875 23.286175 0.0 detector_sensor . . + FS_D0Q1S2A0 rotation detector FS_D0Q1S2 0 0 1 -10.835 0.0 0.0 detector_asic 270.02545 FS_D0Q1S2 + AXIS_D0Q1S2A0_F translation detector FS_D0Q1S2A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q1S2A0_S translation detector AXIS_D0Q1S2A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q1S2A1 rotation detector FS_D0Q1S2 0 0 1 10.835 0.0 0.0 detector_asic 270.02545 FS_D0Q1S2 + AXIS_D0Q1S2A1_F translation detector FS_D0Q1S2A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q1S2A1_S translation detector AXIS_D0Q1S2A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q1S3 rotation detector FS_D0Q1 0.0 0.0 1.0 -34.1402875 23.344475 0.0 detector_sensor . . + FS_D0Q1S3A0 rotation detector FS_D0Q1S3 0 0 1 -10.835 0.0 0.0 detector_asic 270.03066 FS_D0Q1S3 + AXIS_D0Q1S3A0_F translation detector FS_D0Q1S3A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q1S3A0_S translation detector AXIS_D0Q1S3A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q1S3A1 rotation detector FS_D0Q1S3 0 0 1 10.835 0.0 0.0 detector_asic 270.03066 FS_D0Q1S3 + AXIS_D0Q1S3A1_F translation detector FS_D0Q1S3A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q1S3A1_S translation detector AXIS_D0Q1S3A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q1S4 rotation detector FS_D0Q1 0.0 0.0 1.0 24.0035125 11.407275 0.0 detector_sensor . . + FS_D0Q1S4A0 rotation detector FS_D0Q1S4 0 0 1 -10.835 0.0 0.0 detector_asic 179.96381 FS_D0Q1S4 + AXIS_D0Q1S4A0_F translation detector FS_D0Q1S4A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q1S4A0_S translation detector AXIS_D0Q1S4A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q1S4A1 rotation detector FS_D0Q1S4 0 0 1 10.835 0.0 0.0 detector_asic 179.96381 FS_D0Q1S4 + AXIS_D0Q1S4A1_F translation detector FS_D0Q1S4A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q1S4A1_S translation detector AXIS_D0Q1S4A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q1S5 rotation detector FS_D0Q1 0.0 0.0 1.0 24.0035125 34.876875 0.0 detector_sensor . . + FS_D0Q1S5A0 rotation detector FS_D0Q1S5 0 0 1 -10.835 0.0 0.0 detector_asic 180.02434 FS_D0Q1S5 + AXIS_D0Q1S5A0_F translation detector FS_D0Q1S5A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q1S5A0_S translation detector AXIS_D0Q1S5A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q1S5A1 rotation detector FS_D0Q1S5 0 0 1 10.835 0.0 0.0 detector_asic 180.02434 FS_D0Q1S5 + AXIS_D0Q1S5A1_F translation detector FS_D0Q1S5A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q1S5A1_S translation detector AXIS_D0Q1S5A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q1S6 rotation detector FS_D0Q1 0.0 0.0 1.0 33.2523125 -23.321925 0.0 detector_sensor . . + FS_D0Q1S6A0 rotation detector FS_D0Q1S6 0 0 1 -10.835 0.0 0.0 detector_asic 270.08027 FS_D0Q1S6 + AXIS_D0Q1S6A0_F translation detector FS_D0Q1S6A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q1S6A0_S translation detector AXIS_D0Q1S6A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q1S6A1 rotation detector FS_D0Q1S6 0 0 1 10.835 0.0 0.0 detector_asic 270.08027 FS_D0Q1S6 + AXIS_D0Q1S6A1_F translation detector FS_D0Q1S6A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q1S6A1_S translation detector AXIS_D0Q1S6A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q1S7 rotation detector FS_D0Q1 0.0 0.0 1.0 9.9785125 -23.358225 0.0 detector_sensor . . + FS_D0Q1S7A0 rotation detector FS_D0Q1S7 0 0 1 -10.835 0.0 0.0 detector_asic 270.15067 FS_D0Q1S7 + AXIS_D0Q1S7A0_F translation detector FS_D0Q1S7A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q1S7A0_S translation detector AXIS_D0Q1S7A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q1S7A1 rotation detector FS_D0Q1S7 0 0 1 10.835 0.0 0.0 detector_asic 270.15067 FS_D0Q1S7 + AXIS_D0Q1S7A1_F translation detector FS_D0Q1S7A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q1S7A1_S translation detector AXIS_D0Q1S7A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q2 rotation detector AXIS_D0_R 0 0 1 49.596146875 -41.351371875 0.0 detector_quadrant . . + FS_D0Q2S0 rotation detector FS_D0Q2 -0.0 -0.0 -1.0 -11.3150125 23.1242 0.0 detector_sensor . . + FS_D0Q2S0A0 rotation detector FS_D0Q2S0 0 0 1 -10.835 0.0 0.0 detector_asic 90.04803 FS_D0Q2S0 + AXIS_D0Q2S0A0_F translation detector FS_D0Q2S0A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q2S0A0_S translation detector AXIS_D0Q2S0A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q2S0A1 rotation detector FS_D0Q2S0 0 0 1 10.835 0.0 0.0 detector_asic 90.04803 FS_D0Q2S0 + AXIS_D0Q2S0A1_F translation detector FS_D0Q2S0A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q2S0A1_S translation detector AXIS_D0Q2S0A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q2S1 rotation detector FS_D0Q2 -0.0 -0.0 -1.0 -34.6999125 23.155 0.0 detector_sensor . . + FS_D0Q2S1A0 rotation detector FS_D0Q2S1 0 0 1 -10.835 0.0 0.0 detector_asic 90.00592 FS_D0Q2S1 + AXIS_D0Q2S1A0_F translation detector FS_D0Q2S1A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q2S1A0_S translation detector AXIS_D0Q2S1A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q2S1A1 rotation detector FS_D0Q2S1 0 0 1 10.835 0.0 0.0 detector_asic 90.00592 FS_D0Q2S1 + AXIS_D0Q2S1A1_F translation detector FS_D0Q2S1A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q2S1A1_S translation detector AXIS_D0Q2S1A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q2S2 rotation detector FS_D0Q2 0.0 0.0 1.0 23.4746875 10.7811 0.0 detector_sensor . . + FS_D0Q2S2A0 rotation detector FS_D0Q2S2 0 0 1 -10.835 0.0 0.0 detector_asic 180.11318 FS_D0Q2S2 + AXIS_D0Q2S2A0_F translation detector FS_D0Q2S2A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q2S2A0_S translation detector AXIS_D0Q2S2A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q2S2A1 rotation detector FS_D0Q2S2 0 0 1 10.835 0.0 0.0 detector_asic 180.11318 FS_D0Q2S2 + AXIS_D0Q2S2A1_F translation detector FS_D0Q2S2A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q2S2A1_S translation detector AXIS_D0Q2S2A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q2S3 rotation detector FS_D0Q2 0.0 0.0 1.0 23.6220875 34.2221 0.0 detector_sensor . . + FS_D0Q2S3A0 rotation detector FS_D0Q2S3 0 0 1 -10.835 0.0 0.0 detector_asic 179.92104 FS_D0Q2S3 + AXIS_D0Q2S3A0_F translation detector FS_D0Q2S3A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q2S3A0_S translation detector AXIS_D0Q2S3A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q2S3A1 rotation detector FS_D0Q2S3 0 0 1 10.835 0.0 0.0 detector_asic 179.92104 FS_D0Q2S3 + AXIS_D0Q2S3A1_F translation detector FS_D0Q2S3A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q2S3A1_S translation detector AXIS_D0Q2S3A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q2S4 rotation detector FS_D0Q2 0.0 0.0 1.0 11.1953875 -23.9954 0.0 detector_sensor . . + FS_D0Q2S4A0 rotation detector FS_D0Q2S4 0 0 1 -10.835 0.0 0.0 detector_asic 89.63875 FS_D0Q2S4 + AXIS_D0Q2S4A0_F translation detector FS_D0Q2S4A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q2S4A0_S translation detector AXIS_D0Q2S4A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q2S4A1 rotation detector FS_D0Q2S4 0 0 1 10.835 0.0 0.0 detector_asic 89.63875 FS_D0Q2S4 + AXIS_D0Q2S4A1_F translation detector FS_D0Q2S4A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q2S4A1_S translation detector AXIS_D0Q2S4A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q2S5 rotation detector FS_D0Q2 0.0 0.0 1.0 34.5494875 -24.1901 0.0 detector_sensor . . + FS_D0Q2S5A0 rotation detector FS_D0Q2S5 0 0 1 -10.835 0.0 0.0 detector_asic 89.68154 FS_D0Q2S5 + AXIS_D0Q2S5A0_F translation detector FS_D0Q2S5A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q2S5A0_S translation detector AXIS_D0Q2S5A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q2S5A1 rotation detector FS_D0Q2S5 0 0 1 10.835 0.0 0.0 detector_asic 89.68154 FS_D0Q2S5 + AXIS_D0Q2S5A1_F translation detector FS_D0Q2S5A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q2S5A1_S translation detector AXIS_D0Q2S5A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q2S6 rotation detector FS_D0Q2 0.0 0.0 1.0 -23.4854125 -33.2552 0.0 detector_sensor . . + FS_D0Q2S6A0 rotation detector FS_D0Q2S6 0 0 1 -10.835 0.0 0.0 detector_asic 179.83473 FS_D0Q2S6 + AXIS_D0Q2S6A0_F translation detector FS_D0Q2S6A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q2S6A0_S translation detector AXIS_D0Q2S6A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q2S6A1 rotation detector FS_D0Q2S6 0 0 1 10.835 0.0 0.0 detector_asic 179.83473 FS_D0Q2S6 + AXIS_D0Q2S6A1_F translation detector FS_D0Q2S6A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q2S6A1_S translation detector AXIS_D0Q2S6A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q2S7 rotation detector FS_D0Q2 0.0 0.0 1.0 -23.3413125 -9.8417 0.0 detector_sensor . . + FS_D0Q2S7A0 rotation detector FS_D0Q2S7 0 0 1 -10.835 0.0 0.0 detector_asic 180.092 FS_D0Q2S7 + AXIS_D0Q2S7A0_F translation detector FS_D0Q2S7A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q2S7A0_S translation detector AXIS_D0Q2S7A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q2S7A1 rotation detector FS_D0Q2S7 0 0 1 10.835 0.0 0.0 detector_asic 180.092 FS_D0Q2S7 + AXIS_D0Q2S7A1_F translation detector FS_D0Q2S7A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q2S7A1_S translation detector AXIS_D0Q2S7A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q3 rotation detector AXIS_D0_R 0 0 1 -41.247903125 -50.441634375 0.0 detector_quadrant . . + FS_D0Q3S0 rotation detector FS_D0Q3 0.0 0.0 1.0 23.1056375 11.6367625 0.0 detector_sensor . . + FS_D0Q3S0A0 rotation detector FS_D0Q3S0 0 0 1 -10.835 0.0 0.0 detector_asic 180.12436 FS_D0Q3S0 + AXIS_D0Q3S0A0_F translation detector FS_D0Q3S0A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q3S0A0_S translation detector AXIS_D0Q3S0A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q3S0A1 rotation detector FS_D0Q3S0 0 0 1 10.835 0.0 0.0 detector_asic 180.12436 FS_D0Q3S0 + AXIS_D0Q3S0A1_F translation detector FS_D0Q3S0A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q3S0A1_S translation detector AXIS_D0Q3S0A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q3S1 rotation detector FS_D0Q3 0.0 0.0 1.0 23.1298375 34.9864625 0.0 detector_sensor . . + FS_D0Q3S1A0 rotation detector FS_D0Q3S1 0 0 1 -10.835 0.0 0.0 detector_asic 180.00263 FS_D0Q3S1 + AXIS_D0Q3S1A0_F translation detector FS_D0Q3S1A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q3S1A0_S translation detector AXIS_D0Q3S1A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q3S1A1 rotation detector FS_D0Q3S1 0 0 1 10.835 0.0 0.0 detector_asic 180.00263 FS_D0Q3S1 + AXIS_D0Q3S1A1_F translation detector FS_D0Q3S1A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q3S1A1_S translation detector AXIS_D0Q3S1A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q3S2 rotation detector FS_D0Q3 -0.0 -0.0 -1.0 10.9572375 -23.5830375 0.0 detector_sensor . . + FS_D0Q3S2A0 rotation detector FS_D0Q3S2 0 0 1 -10.835 0.0 0.0 detector_asic 269.55191 FS_D0Q3S2 + AXIS_D0Q3S2A0_F translation detector FS_D0Q3S2A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q3S2A0_S translation detector AXIS_D0Q3S2A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q3S2A1 rotation detector FS_D0Q3S2 0 0 1 10.835 0.0 0.0 detector_asic 269.55191 FS_D0Q3S2 + AXIS_D0Q3S2A1_F translation detector FS_D0Q3S2A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q3S2A1_S translation detector AXIS_D0Q3S2A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q3S3 rotation detector FS_D0Q3 -0.0 -0.0 -1.0 34.4180375 -23.4818375 0.0 detector_sensor . . + FS_D0Q3S3A0 rotation detector FS_D0Q3S3 0 0 1 -10.835 0.0 0.0 detector_asic 269.74206 FS_D0Q3S3 + AXIS_D0Q3S3A0_F translation detector FS_D0Q3S3A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q3S3A0_S translation detector AXIS_D0Q3S3A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q3S3A1 rotation detector FS_D0Q3S3 0 0 1 10.835 0.0 0.0 detector_asic 269.74206 FS_D0Q3S3 + AXIS_D0Q3S3A1_F translation detector FS_D0Q3S3A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q3S3A1_S translation detector AXIS_D0Q3S3A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q3S4 rotation detector FS_D0Q3 0.0 0.0 1.0 -24.1283625 -11.5336375 0.0 detector_sensor . . + FS_D0Q3S4A0 rotation detector FS_D0Q3S4 0 0 1 -10.835 0.0 0.0 detector_asic 359.81971 FS_D0Q3S4 + AXIS_D0Q3S4A0_F translation detector FS_D0Q3S4A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q3S4A0_S translation detector AXIS_D0Q3S4A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q3S4A1 rotation detector FS_D0Q3S4 0 0 1 10.835 0.0 0.0 detector_asic 359.81971 FS_D0Q3S4 + AXIS_D0Q3S4A1_F translation detector FS_D0Q3S4A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q3S4A1_S translation detector AXIS_D0Q3S4A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q3S5 rotation detector FS_D0Q3 0.0 0.0 1.0 -24.1701625 -34.9548375 0.0 detector_sensor . . + FS_D0Q3S5A0 rotation detector FS_D0Q3S5 0 0 1 -10.835 0.0 0.0 detector_asic 359.99883 FS_D0Q3S5 + AXIS_D0Q3S5A0_F translation detector FS_D0Q3S5A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q3S5A0_S translation detector AXIS_D0Q3S5A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q3S5A1 rotation detector FS_D0Q3S5 0 0 1 10.835 0.0 0.0 detector_asic 359.99883 FS_D0Q3S5 + AXIS_D0Q3S5A1_F translation detector FS_D0Q3S5A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q3S5A1_S translation detector AXIS_D0Q3S5A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q3S6 rotation detector FS_D0Q3 -0.0 -0.0 -1.0 -33.3089625 23.4474625 0.0 detector_sensor . . + FS_D0Q3S6A0 rotation detector FS_D0Q3S6 0 0 1 -10.835 0.0 0.0 detector_asic 269.67299 FS_D0Q3S6 + AXIS_D0Q3S6A0_F translation detector FS_D0Q3S6A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q3S6A0_S translation detector AXIS_D0Q3S6A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q3S6A1 rotation detector FS_D0Q3S6 0 0 1 10.835 0.0 0.0 detector_asic 269.67299 FS_D0Q3S6 + AXIS_D0Q3S6A1_F translation detector FS_D0Q3S6A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q3S6A1_S translation detector AXIS_D0Q3S6A1_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q3S7 rotation detector FS_D0Q3 -0.0 -0.0 -1.0 -10.0032625 23.4826625 0.0 detector_sensor . . + FS_D0Q3S7A0 rotation detector FS_D0Q3S7 0 0 1 -10.835 0.0 0.0 detector_asic 269.67561 FS_D0Q3S7 + AXIS_D0Q3S7A0_F translation detector FS_D0Q3S7A0 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q3S7A0_S translation detector AXIS_D0Q3S7A0_F 0 -1 0 0 0 0.0 detector_asic . . + FS_D0Q3S7A1 rotation detector FS_D0Q3S7 0 0 1 10.835 0.0 0.0 detector_asic 269.67561 FS_D0Q3S7 + AXIS_D0Q3S7A1_F translation detector FS_D0Q3S7A1 1 0 0 -10.615000 10.120000 0.0 detector_asic . . + AXIS_D0Q3S7A1_S translation detector AXIS_D0Q3S7A1_F 0 -1 0 0 0 0.0 detector_asic . . + +loop_ +_diffrn_scan_axis.axis_id +_diffrn_scan_axis.scan_id +_diffrn_scan_axis.angle_start +_diffrn_scan_axis.angle_range +_diffrn_scan_axis.angle_increment +_diffrn_scan_axis.displacement_start +_diffrn_scan_axis.displacement_range +_diffrn_scan_axis.displacement_increment + AXIS_SOURCE SCAN1 0 0 0 0 0 0 + AXIS_GRAVITY SCAN1 0 0 0 0 0 0 + AXIS_D0_Z SCAN1 0 0 0 0 0 0 + AXIS_D0_Y SCAN1 0 0 0 0 0 0 + AXIS_D0_X SCAN1 0 0 0 0 0 0 + AXIS_D0_R SCAN1 0 0 0 0 0 0 + FS_D0Q0 SCAN1 0 0 0 0 0 0 + FS_D0Q0S0 SCAN1 0 0 0 0 0 0 + FS_D0Q0S0A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S0A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S0A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S0A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S0A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S0A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S1 SCAN1 0 0 0 0 0 0 + FS_D0Q0S1A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S1A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S1A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S1A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S1A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S1A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S2 SCAN1 0 0 0 0 0 0 + FS_D0Q0S2A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S2A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S2A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S2A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S2A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S2A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S3 SCAN1 0 0 0 0 0 0 + FS_D0Q0S3A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S3A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S3A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S3A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S3A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S3A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S4 SCAN1 0 0 0 0 0 0 + FS_D0Q0S4A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S4A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S4A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S4A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S4A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S4A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S5 SCAN1 0 0 0 0 0 0 + FS_D0Q0S5A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S5A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S5A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S5A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S5A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S5A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S6 SCAN1 0 0 0 0 0 0 + FS_D0Q0S6A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S6A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S6A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S6A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S6A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S6A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S7 SCAN1 0 0 0 0 0 0 + FS_D0Q0S7A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S7A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S7A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q0S7A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S7A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q0S7A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q1 SCAN1 0 0 0 0 0 0 + FS_D0Q1S0 SCAN1 0 0 0 0 0 0 + FS_D0Q1S0A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S0A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S0A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S0A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S0A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S0A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S1 SCAN1 0 0 0 0 0 0 + FS_D0Q1S1A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S1A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S1A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S1A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S1A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S1A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S2 SCAN1 0 0 0 0 0 0 + FS_D0Q1S2A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S2A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S2A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S2A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S2A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S2A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S3 SCAN1 0 0 0 0 0 0 + FS_D0Q1S3A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S3A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S3A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S3A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S3A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S3A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S4 SCAN1 0 0 0 0 0 0 + FS_D0Q1S4A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S4A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S4A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S4A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S4A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S4A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S5 SCAN1 0 0 0 0 0 0 + FS_D0Q1S5A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S5A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S5A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S5A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S5A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S5A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S6 SCAN1 0 0 0 0 0 0 + FS_D0Q1S6A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S6A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S6A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S6A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S6A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S6A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S7 SCAN1 0 0 0 0 0 0 + FS_D0Q1S7A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S7A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S7A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q1S7A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S7A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q1S7A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q2 SCAN1 0 0 0 0 0 0 + FS_D0Q2S0 SCAN1 0 0 0 0 0 0 + FS_D0Q2S0A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S0A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S0A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S0A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S0A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S0A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S1 SCAN1 0 0 0 0 0 0 + FS_D0Q2S1A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S1A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S1A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S1A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S1A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S1A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S2 SCAN1 0 0 0 0 0 0 + FS_D0Q2S2A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S2A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S2A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S2A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S2A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S2A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S3 SCAN1 0 0 0 0 0 0 + FS_D0Q2S3A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S3A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S3A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S3A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S3A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S3A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S4 SCAN1 0 0 0 0 0 0 + FS_D0Q2S4A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S4A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S4A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S4A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S4A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S4A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S5 SCAN1 0 0 0 0 0 0 + FS_D0Q2S5A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S5A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S5A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S5A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S5A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S5A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S6 SCAN1 0 0 0 0 0 0 + FS_D0Q2S6A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S6A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S6A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S6A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S6A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S6A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S7 SCAN1 0 0 0 0 0 0 + FS_D0Q2S7A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S7A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S7A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q2S7A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S7A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q2S7A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q3 SCAN1 0 0 0 0 0 0 + FS_D0Q3S0 SCAN1 0 0 0 0 0 0 + FS_D0Q3S0A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S0A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S0A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S0A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S0A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S0A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S1 SCAN1 0 0 0 0 0 0 + FS_D0Q3S1A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S1A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S1A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S1A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S1A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S1A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S2 SCAN1 0 0 0 0 0 0 + FS_D0Q3S2A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S2A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S2A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S2A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S2A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S2A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S3 SCAN1 0 0 0 0 0 0 + FS_D0Q3S3A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S3A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S3A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S3A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S3A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S3A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S4 SCAN1 0 0 0 0 0 0 + FS_D0Q3S4A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S4A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S4A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S4A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S4A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S4A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S5 SCAN1 0 0 0 0 0 0 + FS_D0Q3S5A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S5A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S5A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S5A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S5A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S5A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S6 SCAN1 0 0 0 0 0 0 + FS_D0Q3S6A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S6A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S6A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S6A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S6A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S6A1_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S7 SCAN1 0 0 0 0 0 0 + FS_D0Q3S7A0 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S7A0_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S7A0_S SCAN1 0 0 0 0 0 0 + FS_D0Q3S7A1 SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S7A1_F SCAN1 0 0 0 0 0 0 + AXIS_D0Q3S7A1_S SCAN1 0 0 0 0 0 0 + +loop_ +_diffrn_scan_frame_axis.axis_id +_diffrn_scan_frame_axis.frame_id +_diffrn_scan_frame_axis.angle +_diffrn_scan_frame_axis.displacement + AXIS_SOURCE FRAME1 0 0 + AXIS_GRAVITY FRAME1 0 0 + AXIS_D0_X FRAME1 0 0 + AXIS_D0_Y FRAME1 0 0 + AXIS_D0_Z FRAME1 0 -171.0104 + AXIS_D0_R FRAME1 0.0 0 + FS_D0Q0 FRAME1 0.0 0 + FS_D0Q0S0 FRAME1 0 0 + FS_D0Q0S0A0 FRAME1 0.0 0 + AXIS_D0Q0S0A0_F FRAME1 0 0 + AXIS_D0Q0S0A0_S FRAME1 0 0 + FS_D0Q0S0A1 FRAME1 0.0 0 + AXIS_D0Q0S0A1_F FRAME1 0 0 + AXIS_D0Q0S0A1_S FRAME1 0 0 + FS_D0Q0S1 FRAME1 0.0 0 + FS_D0Q0S1A0 FRAME1 0.0 0 + AXIS_D0Q0S1A0_F FRAME1 0 0 + AXIS_D0Q0S1A0_S FRAME1 0 0 + FS_D0Q0S1A1 FRAME1 0.0 0 + AXIS_D0Q0S1A1_F FRAME1 0 0 + AXIS_D0Q0S1A1_S FRAME1 0 0 + FS_D0Q0S2 FRAME1 0.0 0 + FS_D0Q0S2A0 FRAME1 0.0 0 + AXIS_D0Q0S2A0_F FRAME1 0 0 + AXIS_D0Q0S2A0_S FRAME1 0 0 + FS_D0Q0S2A1 FRAME1 0.0 0 + AXIS_D0Q0S2A1_F FRAME1 0 0 + AXIS_D0Q0S2A1_S FRAME1 0 0 + FS_D0Q0S3 FRAME1 0.0 0 + FS_D0Q0S3A0 FRAME1 0.0 0 + AXIS_D0Q0S3A0_F FRAME1 0 0 + AXIS_D0Q0S3A0_S FRAME1 0 0 + FS_D0Q0S3A1 FRAME1 0.0 0 + AXIS_D0Q0S3A1_F FRAME1 0 0 + AXIS_D0Q0S3A1_S FRAME1 0 0 + FS_D0Q0S4 FRAME1 0.0 0 + FS_D0Q0S4A0 FRAME1 0.0 0 + AXIS_D0Q0S4A0_F FRAME1 0 0 + AXIS_D0Q0S4A0_S FRAME1 0 0 + FS_D0Q0S4A1 FRAME1 0.0 0 + AXIS_D0Q0S4A1_F FRAME1 0 0 + AXIS_D0Q0S4A1_S FRAME1 0 0 + FS_D0Q0S5 FRAME1 0.0 0 + FS_D0Q0S5A0 FRAME1 0.0 0 + AXIS_D0Q0S5A0_F FRAME1 0 0 + AXIS_D0Q0S5A0_S FRAME1 0 0 + FS_D0Q0S5A1 FRAME1 0.0 0 + AXIS_D0Q0S5A1_F FRAME1 0 0 + AXIS_D0Q0S5A1_S FRAME1 0 0 + FS_D0Q0S6 FRAME1 0.0 0 + FS_D0Q0S6A0 FRAME1 0.0 0 + AXIS_D0Q0S6A0_F FRAME1 0 0 + AXIS_D0Q0S6A0_S FRAME1 0 0 + FS_D0Q0S6A1 FRAME1 0.0 0 + AXIS_D0Q0S6A1_F FRAME1 0 0 + AXIS_D0Q0S6A1_S FRAME1 0 0 + FS_D0Q0S7 FRAME1 0.0 0 + FS_D0Q0S7A0 FRAME1 0.0 0 + AXIS_D0Q0S7A0_F FRAME1 0 0 + AXIS_D0Q0S7A0_S FRAME1 0 0 + FS_D0Q0S7A1 FRAME1 0.0 0 + AXIS_D0Q0S7A1_F FRAME1 0 0 + AXIS_D0Q0S7A1_S FRAME1 0 0 + FS_D0Q1 FRAME1 0.0 0 + FS_D0Q1S0 FRAME1 0.0 0 + FS_D0Q1S0A0 FRAME1 0.0 0 + AXIS_D0Q1S0A0_F FRAME1 0 0 + AXIS_D0Q1S0A0_S FRAME1 0 0 + FS_D0Q1S0A1 FRAME1 0.0 0 + AXIS_D0Q1S0A1_F FRAME1 0 0 + AXIS_D0Q1S0A1_S FRAME1 0 0 + FS_D0Q1S1 FRAME1 0.0 0 + FS_D0Q1S1A0 FRAME1 0.0 0 + AXIS_D0Q1S1A0_F FRAME1 0 0 + AXIS_D0Q1S1A0_S FRAME1 0 0 + FS_D0Q1S1A1 FRAME1 0.0 0 + AXIS_D0Q1S1A1_F FRAME1 0 0 + AXIS_D0Q1S1A1_S FRAME1 0 0 + FS_D0Q1S2 FRAME1 0.0 0 + FS_D0Q1S2A0 FRAME1 0.0 0 + AXIS_D0Q1S2A0_F FRAME1 0 0 + AXIS_D0Q1S2A0_S FRAME1 0 0 + FS_D0Q1S2A1 FRAME1 0.0 0 + AXIS_D0Q1S2A1_F FRAME1 0 0 + AXIS_D0Q1S2A1_S FRAME1 0 0 + FS_D0Q1S3 FRAME1 0.0 0 + FS_D0Q1S3A0 FRAME1 0.0 0 + AXIS_D0Q1S3A0_F FRAME1 0 0 + AXIS_D0Q1S3A0_S FRAME1 0 0 + FS_D0Q1S3A1 FRAME1 0.0 0 + AXIS_D0Q1S3A1_F FRAME1 0 0 + AXIS_D0Q1S3A1_S FRAME1 0 0 + FS_D0Q1S4 FRAME1 0.0 0 + FS_D0Q1S4A0 FRAME1 0.0 0 + AXIS_D0Q1S4A0_F FRAME1 0 0 + AXIS_D0Q1S4A0_S FRAME1 0 0 + FS_D0Q1S4A1 FRAME1 0.0 0 + AXIS_D0Q1S4A1_F FRAME1 0 0 + AXIS_D0Q1S4A1_S FRAME1 0 0 + FS_D0Q1S5 FRAME1 0.0 0 + FS_D0Q1S5A0 FRAME1 0.0 0 + AXIS_D0Q1S5A0_F FRAME1 0 0 + AXIS_D0Q1S5A0_S FRAME1 0 0 + FS_D0Q1S5A1 FRAME1 0.0 0 + AXIS_D0Q1S5A1_F FRAME1 0 0 + AXIS_D0Q1S5A1_S FRAME1 0 0 + FS_D0Q1S6 FRAME1 0.0 0 + FS_D0Q1S6A0 FRAME1 0.0 0 + AXIS_D0Q1S6A0_F FRAME1 0 0 + AXIS_D0Q1S6A0_S FRAME1 0 0 + FS_D0Q1S6A1 FRAME1 0.0 0 + AXIS_D0Q1S6A1_F FRAME1 0 0 + AXIS_D0Q1S6A1_S FRAME1 0 0 + FS_D0Q1S7 FRAME1 0.0 0 + FS_D0Q1S7A0 FRAME1 0.0 0 + AXIS_D0Q1S7A0_F FRAME1 0 0 + AXIS_D0Q1S7A0_S FRAME1 0 0 + FS_D0Q1S7A1 FRAME1 0.0 0 + AXIS_D0Q1S7A1_F FRAME1 0 0 + AXIS_D0Q1S7A1_S FRAME1 0 0 + FS_D0Q2 FRAME1 0.0 0 + FS_D0Q2S0 FRAME1 0.0 0 + FS_D0Q2S0A0 FRAME1 0.0 0 + AXIS_D0Q2S0A0_F FRAME1 0 0 + AXIS_D0Q2S0A0_S FRAME1 0 0 + FS_D0Q2S0A1 FRAME1 0.0 0 + AXIS_D0Q2S0A1_F FRAME1 0 0 + AXIS_D0Q2S0A1_S FRAME1 0 0 + FS_D0Q2S1 FRAME1 0.0 0 + FS_D0Q2S1A0 FRAME1 0.0 0 + AXIS_D0Q2S1A0_F FRAME1 0 0 + AXIS_D0Q2S1A0_S FRAME1 0 0 + FS_D0Q2S1A1 FRAME1 0.0 0 + AXIS_D0Q2S1A1_F FRAME1 0 0 + AXIS_D0Q2S1A1_S FRAME1 0 0 + FS_D0Q2S2 FRAME1 0.0 0 + FS_D0Q2S2A0 FRAME1 0.0 0 + AXIS_D0Q2S2A0_F FRAME1 0 0 + AXIS_D0Q2S2A0_S FRAME1 0 0 + FS_D0Q2S2A1 FRAME1 0.0 0 + AXIS_D0Q2S2A1_F FRAME1 0 0 + AXIS_D0Q2S2A1_S FRAME1 0 0 + FS_D0Q2S3 FRAME1 0.0 0 + FS_D0Q2S3A0 FRAME1 0.0 0 + AXIS_D0Q2S3A0_F FRAME1 0 0 + AXIS_D0Q2S3A0_S FRAME1 0 0 + FS_D0Q2S3A1 FRAME1 0.0 0 + AXIS_D0Q2S3A1_F FRAME1 0 0 + AXIS_D0Q2S3A1_S FRAME1 0 0 + FS_D0Q2S4 FRAME1 0.0 0 + FS_D0Q2S4A0 FRAME1 0.0 0 + AXIS_D0Q2S4A0_F FRAME1 0 0 + AXIS_D0Q2S4A0_S FRAME1 0 0 + FS_D0Q2S4A1 FRAME1 0.0 0 + AXIS_D0Q2S4A1_F FRAME1 0 0 + AXIS_D0Q2S4A1_S FRAME1 0 0 + FS_D0Q2S5 FRAME1 0.0 0 + FS_D0Q2S5A0 FRAME1 0.0 0 + AXIS_D0Q2S5A0_F FRAME1 0 0 + AXIS_D0Q2S5A0_S FRAME1 0 0 + FS_D0Q2S5A1 FRAME1 0.0 0 + AXIS_D0Q2S5A1_F FRAME1 0 0 + AXIS_D0Q2S5A1_S FRAME1 0 0 + FS_D0Q2S6 FRAME1 0.0 0 + FS_D0Q2S6A0 FRAME1 0.0 0 + AXIS_D0Q2S6A0_F FRAME1 0 0 + AXIS_D0Q2S6A0_S FRAME1 0 0 + FS_D0Q2S6A1 FRAME1 0.0 0 + AXIS_D0Q2S6A1_F FRAME1 0 0 + AXIS_D0Q2S6A1_S FRAME1 0 0 + FS_D0Q2S7 FRAME1 0.0 0 + FS_D0Q2S7A0 FRAME1 0.0 0 + AXIS_D0Q2S7A0_F FRAME1 0 0 + AXIS_D0Q2S7A0_S FRAME1 0 0 + FS_D0Q2S7A1 FRAME1 0.0 0 + AXIS_D0Q2S7A1_F FRAME1 0 0 + AXIS_D0Q2S7A1_S FRAME1 0 0 + FS_D0Q3 FRAME1 0.0 0 + FS_D0Q3S0 FRAME1 0.0 0 + FS_D0Q3S0A0 FRAME1 0.0 0 + AXIS_D0Q3S0A0_F FRAME1 0 0 + AXIS_D0Q3S0A0_S FRAME1 0 0 + FS_D0Q3S0A1 FRAME1 0.0 0 + AXIS_D0Q3S0A1_F FRAME1 0 0 + AXIS_D0Q3S0A1_S FRAME1 0 0 + FS_D0Q3S1 FRAME1 0.0 0 + FS_D0Q3S1A0 FRAME1 0.0 0 + AXIS_D0Q3S1A0_F FRAME1 0 0 + AXIS_D0Q3S1A0_S FRAME1 0 0 + FS_D0Q3S1A1 FRAME1 0.0 0 + AXIS_D0Q3S1A1_F FRAME1 0 0 + AXIS_D0Q3S1A1_S FRAME1 0 0 + FS_D0Q3S2 FRAME1 0.0 0 + FS_D0Q3S2A0 FRAME1 0.0 0 + AXIS_D0Q3S2A0_F FRAME1 0 0 + AXIS_D0Q3S2A0_S FRAME1 0 0 + FS_D0Q3S2A1 FRAME1 0.0 0 + AXIS_D0Q3S2A1_F FRAME1 0 0 + AXIS_D0Q3S2A1_S FRAME1 0 0 + FS_D0Q3S3 FRAME1 0.0 0 + FS_D0Q3S3A0 FRAME1 0.0 0 + AXIS_D0Q3S3A0_F FRAME1 0 0 + AXIS_D0Q3S3A0_S FRAME1 0 0 + FS_D0Q3S3A1 FRAME1 0.0 0 + AXIS_D0Q3S3A1_F FRAME1 0 0 + AXIS_D0Q3S3A1_S FRAME1 0 0 + FS_D0Q3S4 FRAME1 0.0 0 + FS_D0Q3S4A0 FRAME1 0.0 0 + AXIS_D0Q3S4A0_F FRAME1 0 0 + AXIS_D0Q3S4A0_S FRAME1 0 0 + FS_D0Q3S4A1 FRAME1 0.0 0 + AXIS_D0Q3S4A1_F FRAME1 0 0 + AXIS_D0Q3S4A1_S FRAME1 0 0 + FS_D0Q3S5 FRAME1 0.0 0 + FS_D0Q3S5A0 FRAME1 0.0 0 + AXIS_D0Q3S5A0_F FRAME1 0 0 + AXIS_D0Q3S5A0_S FRAME1 0 0 + FS_D0Q3S5A1 FRAME1 0.0 0 + AXIS_D0Q3S5A1_F FRAME1 0 0 + AXIS_D0Q3S5A1_S FRAME1 0 0 + FS_D0Q3S6 FRAME1 0.0 0 + FS_D0Q3S6A0 FRAME1 0.0 0 + AXIS_D0Q3S6A0_F FRAME1 0 0 + AXIS_D0Q3S6A0_S FRAME1 0 0 + FS_D0Q3S6A1 FRAME1 0.0 0 + AXIS_D0Q3S6A1_F FRAME1 0 0 + AXIS_D0Q3S6A1_S FRAME1 0 0 + FS_D0Q3S7 FRAME1 0 0 + FS_D0Q3S7A0 FRAME1 0.0 0 + AXIS_D0Q3S7A0_F FRAME1 0 0 + AXIS_D0Q3S7A0_S FRAME1 0 0 + FS_D0Q3S7A1 FRAME1 0.0 0 + AXIS_D0Q3S7A1_F FRAME1 0 0 + AXIS_D0Q3S7A1_S FRAME1 0 0 + +loop_ +_array_structure_list.array_id +_array_structure_list.index +_array_structure_list.dimension +_array_structure_list.precedence +_array_structure_list.direction +_array_structure_list.axis_set_id + ARRAY_D0Q0S0A0 1 194 2 increasing AXIS_D0Q0S0A0_F + ARRAY_D0Q0S0A0 2 185 1 increasing AXIS_D0Q0S0A0_S + ARRAY_D0Q0S0A1 1 194 2 increasing AXIS_D0Q0S0A1_F + ARRAY_D0Q0S0A1 2 185 1 increasing AXIS_D0Q0S0A1_S + ARRAY_D0Q0S1A0 1 194 2 increasing AXIS_D0Q0S1A0_F + ARRAY_D0Q0S1A0 2 185 1 increasing AXIS_D0Q0S1A0_S + ARRAY_D0Q0S1A1 1 194 2 increasing AXIS_D0Q0S1A1_F + ARRAY_D0Q0S1A1 2 185 1 increasing AXIS_D0Q0S1A1_S + ARRAY_D0Q0S2A0 1 194 2 increasing AXIS_D0Q0S2A0_F + ARRAY_D0Q0S2A0 2 185 1 increasing AXIS_D0Q0S2A0_S + ARRAY_D0Q0S2A1 1 194 2 increasing AXIS_D0Q0S2A1_F + ARRAY_D0Q0S2A1 2 185 1 increasing AXIS_D0Q0S2A1_S + ARRAY_D0Q0S3A0 1 194 2 increasing AXIS_D0Q0S3A0_F + ARRAY_D0Q0S3A0 2 185 1 increasing AXIS_D0Q0S3A0_S + ARRAY_D0Q0S3A1 1 194 2 increasing AXIS_D0Q0S3A1_F + ARRAY_D0Q0S3A1 2 185 1 increasing AXIS_D0Q0S3A1_S + ARRAY_D0Q0S4A0 1 194 2 increasing AXIS_D0Q0S4A0_F + ARRAY_D0Q0S4A0 2 185 1 increasing AXIS_D0Q0S4A0_S + ARRAY_D0Q0S4A1 1 194 2 increasing AXIS_D0Q0S4A1_F + ARRAY_D0Q0S4A1 2 185 1 increasing AXIS_D0Q0S4A1_S + ARRAY_D0Q0S5A0 1 194 2 increasing AXIS_D0Q0S5A0_F + ARRAY_D0Q0S5A0 2 185 1 increasing AXIS_D0Q0S5A0_S + ARRAY_D0Q0S5A1 1 194 2 increasing AXIS_D0Q0S5A1_F + ARRAY_D0Q0S5A1 2 185 1 increasing AXIS_D0Q0S5A1_S + ARRAY_D0Q0S6A0 1 194 2 increasing AXIS_D0Q0S6A0_F + ARRAY_D0Q0S6A0 2 185 1 increasing AXIS_D0Q0S6A0_S + ARRAY_D0Q0S6A1 1 194 2 increasing AXIS_D0Q0S6A1_F + ARRAY_D0Q0S6A1 2 185 1 increasing AXIS_D0Q0S6A1_S + ARRAY_D0Q0S7A0 1 194 2 increasing AXIS_D0Q0S7A0_F + ARRAY_D0Q0S7A0 2 185 1 increasing AXIS_D0Q0S7A0_S + ARRAY_D0Q0S7A1 1 194 2 increasing AXIS_D0Q0S7A1_F + ARRAY_D0Q0S7A1 2 185 1 increasing AXIS_D0Q0S7A1_S + ARRAY_D0Q1S0A0 1 194 2 increasing AXIS_D0Q1S0A0_F + ARRAY_D0Q1S0A0 2 185 1 increasing AXIS_D0Q1S0A0_S + ARRAY_D0Q1S0A1 1 194 2 increasing AXIS_D0Q1S0A1_F + ARRAY_D0Q1S0A1 2 185 1 increasing AXIS_D0Q1S0A1_S + ARRAY_D0Q1S1A0 1 194 2 increasing AXIS_D0Q1S1A0_F + ARRAY_D0Q1S1A0 2 185 1 increasing AXIS_D0Q1S1A0_S + ARRAY_D0Q1S1A1 1 194 2 increasing AXIS_D0Q1S1A1_F + ARRAY_D0Q1S1A1 2 185 1 increasing AXIS_D0Q1S1A1_S + ARRAY_D0Q1S2A0 1 194 2 increasing AXIS_D0Q1S2A0_F + ARRAY_D0Q1S2A0 2 185 1 increasing AXIS_D0Q1S2A0_S + ARRAY_D0Q1S2A1 1 194 2 increasing AXIS_D0Q1S2A1_F + ARRAY_D0Q1S2A1 2 185 1 increasing AXIS_D0Q1S2A1_S + ARRAY_D0Q1S3A0 1 194 2 increasing AXIS_D0Q1S3A0_F + ARRAY_D0Q1S3A0 2 185 1 increasing AXIS_D0Q1S3A0_S + ARRAY_D0Q1S3A1 1 194 2 increasing AXIS_D0Q1S3A1_F + ARRAY_D0Q1S3A1 2 185 1 increasing AXIS_D0Q1S3A1_S + ARRAY_D0Q1S4A0 1 194 2 increasing AXIS_D0Q1S4A0_F + ARRAY_D0Q1S4A0 2 185 1 increasing AXIS_D0Q1S4A0_S + ARRAY_D0Q1S4A1 1 194 2 increasing AXIS_D0Q1S4A1_F + ARRAY_D0Q1S4A1 2 185 1 increasing AXIS_D0Q1S4A1_S + ARRAY_D0Q1S5A0 1 194 2 increasing AXIS_D0Q1S5A0_F + ARRAY_D0Q1S5A0 2 185 1 increasing AXIS_D0Q1S5A0_S + ARRAY_D0Q1S5A1 1 194 2 increasing AXIS_D0Q1S5A1_F + ARRAY_D0Q1S5A1 2 185 1 increasing AXIS_D0Q1S5A1_S + ARRAY_D0Q1S6A0 1 194 2 increasing AXIS_D0Q1S6A0_F + ARRAY_D0Q1S6A0 2 185 1 increasing AXIS_D0Q1S6A0_S + ARRAY_D0Q1S6A1 1 194 2 increasing AXIS_D0Q1S6A1_F + ARRAY_D0Q1S6A1 2 185 1 increasing AXIS_D0Q1S6A1_S + ARRAY_D0Q1S7A0 1 194 2 increasing AXIS_D0Q1S7A0_F + ARRAY_D0Q1S7A0 2 185 1 increasing AXIS_D0Q1S7A0_S + ARRAY_D0Q1S7A1 1 194 2 increasing AXIS_D0Q1S7A1_F + ARRAY_D0Q1S7A1 2 185 1 increasing AXIS_D0Q1S7A1_S + ARRAY_D0Q2S0A0 1 194 2 increasing AXIS_D0Q2S0A0_F + ARRAY_D0Q2S0A0 2 185 1 increasing AXIS_D0Q2S0A0_S + ARRAY_D0Q2S0A1 1 194 2 increasing AXIS_D0Q2S0A1_F + ARRAY_D0Q2S0A1 2 185 1 increasing AXIS_D0Q2S0A1_S + ARRAY_D0Q2S1A0 1 194 2 increasing AXIS_D0Q2S1A0_F + ARRAY_D0Q2S1A0 2 185 1 increasing AXIS_D0Q2S1A0_S + ARRAY_D0Q2S1A1 1 194 2 increasing AXIS_D0Q2S1A1_F + ARRAY_D0Q2S1A1 2 185 1 increasing AXIS_D0Q2S1A1_S + ARRAY_D0Q2S2A0 1 194 2 increasing AXIS_D0Q2S2A0_F + ARRAY_D0Q2S2A0 2 185 1 increasing AXIS_D0Q2S2A0_S + ARRAY_D0Q2S2A1 1 194 2 increasing AXIS_D0Q2S2A1_F + ARRAY_D0Q2S2A1 2 185 1 increasing AXIS_D0Q2S2A1_S + ARRAY_D0Q2S3A0 1 194 2 increasing AXIS_D0Q2S3A0_F + ARRAY_D0Q2S3A0 2 185 1 increasing AXIS_D0Q2S3A0_S + ARRAY_D0Q2S3A1 1 194 2 increasing AXIS_D0Q2S3A1_F + ARRAY_D0Q2S3A1 2 185 1 increasing AXIS_D0Q2S3A1_S + ARRAY_D0Q2S4A0 1 194 2 increasing AXIS_D0Q2S4A0_F + ARRAY_D0Q2S4A0 2 185 1 increasing AXIS_D0Q2S4A0_S + ARRAY_D0Q2S4A1 1 194 2 increasing AXIS_D0Q2S4A1_F + ARRAY_D0Q2S4A1 2 185 1 increasing AXIS_D0Q2S4A1_S + ARRAY_D0Q2S5A0 1 194 2 increasing AXIS_D0Q2S5A0_F + ARRAY_D0Q2S5A0 2 185 1 increasing AXIS_D0Q2S5A0_S + ARRAY_D0Q2S5A1 1 194 2 increasing AXIS_D0Q2S5A1_F + ARRAY_D0Q2S5A1 2 185 1 increasing AXIS_D0Q2S5A1_S + ARRAY_D0Q2S6A0 1 194 2 increasing AXIS_D0Q2S6A0_F + ARRAY_D0Q2S6A0 2 185 1 increasing AXIS_D0Q2S6A0_S + ARRAY_D0Q2S6A1 1 194 2 increasing AXIS_D0Q2S6A1_F + ARRAY_D0Q2S6A1 2 185 1 increasing AXIS_D0Q2S6A1_S + ARRAY_D0Q2S7A0 1 194 2 increasing AXIS_D0Q2S7A0_F + ARRAY_D0Q2S7A0 2 185 1 increasing AXIS_D0Q2S7A0_S + ARRAY_D0Q2S7A1 1 194 2 increasing AXIS_D0Q2S7A1_F + ARRAY_D0Q2S7A1 2 185 1 increasing AXIS_D0Q2S7A1_S + ARRAY_D0Q3S0A0 1 194 2 increasing AXIS_D0Q3S0A0_F + ARRAY_D0Q3S0A0 2 185 1 increasing AXIS_D0Q3S0A0_S + ARRAY_D0Q3S0A1 1 194 2 increasing AXIS_D0Q3S0A1_F + ARRAY_D0Q3S0A1 2 185 1 increasing AXIS_D0Q3S0A1_S + ARRAY_D0Q3S1A0 1 194 2 increasing AXIS_D0Q3S1A0_F + ARRAY_D0Q3S1A0 2 185 1 increasing AXIS_D0Q3S1A0_S + ARRAY_D0Q3S1A1 1 194 2 increasing AXIS_D0Q3S1A1_F + ARRAY_D0Q3S1A1 2 185 1 increasing AXIS_D0Q3S1A1_S + ARRAY_D0Q3S2A0 1 194 2 increasing AXIS_D0Q3S2A0_F + ARRAY_D0Q3S2A0 2 185 1 increasing AXIS_D0Q3S2A0_S + ARRAY_D0Q3S2A1 1 194 2 increasing AXIS_D0Q3S2A1_F + ARRAY_D0Q3S2A1 2 185 1 increasing AXIS_D0Q3S2A1_S + ARRAY_D0Q3S3A0 1 194 2 increasing AXIS_D0Q3S3A0_F + ARRAY_D0Q3S3A0 2 185 1 increasing AXIS_D0Q3S3A0_S + ARRAY_D0Q3S3A1 1 194 2 increasing AXIS_D0Q3S3A1_F + ARRAY_D0Q3S3A1 2 185 1 increasing AXIS_D0Q3S3A1_S + ARRAY_D0Q3S4A0 1 194 2 increasing AXIS_D0Q3S4A0_F + ARRAY_D0Q3S4A0 2 185 1 increasing AXIS_D0Q3S4A0_S + ARRAY_D0Q3S4A1 1 194 2 increasing AXIS_D0Q3S4A1_F + ARRAY_D0Q3S4A1 2 185 1 increasing AXIS_D0Q3S4A1_S + ARRAY_D0Q3S5A0 1 194 2 increasing AXIS_D0Q3S5A0_F + ARRAY_D0Q3S5A0 2 185 1 increasing AXIS_D0Q3S5A0_S + ARRAY_D0Q3S5A1 1 194 2 increasing AXIS_D0Q3S5A1_F + ARRAY_D0Q3S5A1 2 185 1 increasing AXIS_D0Q3S5A1_S + ARRAY_D0Q3S6A0 1 194 2 increasing AXIS_D0Q3S6A0_F + ARRAY_D0Q3S6A0 2 185 1 increasing AXIS_D0Q3S6A0_S + ARRAY_D0Q3S6A1 1 194 2 increasing AXIS_D0Q3S6A1_F + ARRAY_D0Q3S6A1 2 185 1 increasing AXIS_D0Q3S6A1_S + ARRAY_D0Q3S7A0 1 194 2 increasing AXIS_D0Q3S7A0_F + ARRAY_D0Q3S7A0 2 185 1 increasing AXIS_D0Q3S7A0_S + ARRAY_D0Q3S7A1 1 194 2 increasing AXIS_D0Q3S7A1_F + ARRAY_D0Q3S7A1 2 185 1 increasing AXIS_D0Q3S7A1_S + +loop_ +_array_structure_list_axis.axis_set_id +_array_structure_list_axis.axis_id +_array_structure_list_axis.displacement +_array_structure_list_axis.displacement_increment + AXIS_D0Q0S0A0_F AXIS_D0Q0S0A0_F 0.0 0.110000 + AXIS_D0Q0S0A0_S AXIS_D0Q0S0A0_S 0.0 0.110000 + AXIS_D0Q0S0A1_F AXIS_D0Q0S0A1_F 0.0 0.110000 + AXIS_D0Q0S0A1_S AXIS_D0Q0S0A1_S 0.0 0.110000 + AXIS_D0Q0S1A0_F AXIS_D0Q0S1A0_F 0.0 0.110000 + AXIS_D0Q0S1A0_S AXIS_D0Q0S1A0_S 0.0 0.110000 + AXIS_D0Q0S1A1_F AXIS_D0Q0S1A1_F 0.0 0.110000 + AXIS_D0Q0S1A1_S AXIS_D0Q0S1A1_S 0.0 0.110000 + AXIS_D0Q0S2A0_F AXIS_D0Q0S2A0_F 0.0 0.110000 + AXIS_D0Q0S2A0_S AXIS_D0Q0S2A0_S 0.0 0.110000 + AXIS_D0Q0S2A1_F AXIS_D0Q0S2A1_F 0.0 0.110000 + AXIS_D0Q0S2A1_S AXIS_D0Q0S2A1_S 0.0 0.110000 + AXIS_D0Q0S3A0_F AXIS_D0Q0S3A0_F 0.0 0.110000 + AXIS_D0Q0S3A0_S AXIS_D0Q0S3A0_S 0.0 0.110000 + AXIS_D0Q0S3A1_F AXIS_D0Q0S3A1_F 0.0 0.110000 + AXIS_D0Q0S3A1_S AXIS_D0Q0S3A1_S 0.0 0.110000 + AXIS_D0Q0S4A0_F AXIS_D0Q0S4A0_F 0.0 0.110000 + AXIS_D0Q0S4A0_S AXIS_D0Q0S4A0_S 0.0 0.110000 + AXIS_D0Q0S4A1_F AXIS_D0Q0S4A1_F 0.0 0.110000 + AXIS_D0Q0S4A1_S AXIS_D0Q0S4A1_S 0.0 0.110000 + AXIS_D0Q0S5A0_F AXIS_D0Q0S5A0_F 0.0 0.110000 + AXIS_D0Q0S5A0_S AXIS_D0Q0S5A0_S 0.0 0.110000 + AXIS_D0Q0S5A1_F AXIS_D0Q0S5A1_F 0.0 0.110000 + AXIS_D0Q0S5A1_S AXIS_D0Q0S5A1_S 0.0 0.110000 + AXIS_D0Q0S6A0_F AXIS_D0Q0S6A0_F 0.0 0.110000 + AXIS_D0Q0S6A0_S AXIS_D0Q0S6A0_S 0.0 0.110000 + AXIS_D0Q0S6A1_F AXIS_D0Q0S6A1_F 0.0 0.110000 + AXIS_D0Q0S6A1_S AXIS_D0Q0S6A1_S 0.0 0.110000 + AXIS_D0Q0S7A0_F AXIS_D0Q0S7A0_F 0.0 0.110000 + AXIS_D0Q0S7A0_S AXIS_D0Q0S7A0_S 0.0 0.110000 + AXIS_D0Q0S7A1_F AXIS_D0Q0S7A1_F 0.0 0.110000 + AXIS_D0Q0S7A1_S AXIS_D0Q0S7A1_S 0.0 0.110000 + AXIS_D0Q1S0A0_F AXIS_D0Q1S0A0_F 0.0 0.110000 + AXIS_D0Q1S0A0_S AXIS_D0Q1S0A0_S 0.0 0.110000 + AXIS_D0Q1S0A1_F AXIS_D0Q1S0A1_F 0.0 0.110000 + AXIS_D0Q1S0A1_S AXIS_D0Q1S0A1_S 0.0 0.110000 + AXIS_D0Q1S1A0_F AXIS_D0Q1S1A0_F 0.0 0.110000 + AXIS_D0Q1S1A0_S AXIS_D0Q1S1A0_S 0.0 0.110000 + AXIS_D0Q1S1A1_F AXIS_D0Q1S1A1_F 0.0 0.110000 + AXIS_D0Q1S1A1_S AXIS_D0Q1S1A1_S 0.0 0.110000 + AXIS_D0Q1S2A0_F AXIS_D0Q1S2A0_F 0.0 0.110000 + AXIS_D0Q1S2A0_S AXIS_D0Q1S2A0_S 0.0 0.110000 + AXIS_D0Q1S2A1_F AXIS_D0Q1S2A1_F 0.0 0.110000 + AXIS_D0Q1S2A1_S AXIS_D0Q1S2A1_S 0.0 0.110000 + AXIS_D0Q1S3A0_F AXIS_D0Q1S3A0_F 0.0 0.110000 + AXIS_D0Q1S3A0_S AXIS_D0Q1S3A0_S 0.0 0.110000 + AXIS_D0Q1S3A1_F AXIS_D0Q1S3A1_F 0.0 0.110000 + AXIS_D0Q1S3A1_S AXIS_D0Q1S3A1_S 0.0 0.110000 + AXIS_D0Q1S4A0_F AXIS_D0Q1S4A0_F 0.0 0.110000 + AXIS_D0Q1S4A0_S AXIS_D0Q1S4A0_S 0.0 0.110000 + AXIS_D0Q1S4A1_F AXIS_D0Q1S4A1_F 0.0 0.110000 + AXIS_D0Q1S4A1_S AXIS_D0Q1S4A1_S 0.0 0.110000 + AXIS_D0Q1S5A0_F AXIS_D0Q1S5A0_F 0.0 0.110000 + AXIS_D0Q1S5A0_S AXIS_D0Q1S5A0_S 0.0 0.110000 + AXIS_D0Q1S5A1_F AXIS_D0Q1S5A1_F 0.0 0.110000 + AXIS_D0Q1S5A1_S AXIS_D0Q1S5A1_S 0.0 0.110000 + AXIS_D0Q1S6A0_F AXIS_D0Q1S6A0_F 0.0 0.110000 + AXIS_D0Q1S6A0_S AXIS_D0Q1S6A0_S 0.0 0.110000 + AXIS_D0Q1S6A1_F AXIS_D0Q1S6A1_F 0.0 0.110000 + AXIS_D0Q1S6A1_S AXIS_D0Q1S6A1_S 0.0 0.110000 + AXIS_D0Q1S7A0_F AXIS_D0Q1S7A0_F 0.0 0.110000 + AXIS_D0Q1S7A0_S AXIS_D0Q1S7A0_S 0.0 0.110000 + AXIS_D0Q1S7A1_F AXIS_D0Q1S7A1_F 0.0 0.110000 + AXIS_D0Q1S7A1_S AXIS_D0Q1S7A1_S 0.0 0.110000 + AXIS_D0Q2S0A0_F AXIS_D0Q2S0A0_F 0.0 0.110000 + AXIS_D0Q2S0A0_S AXIS_D0Q2S0A0_S 0.0 0.110000 + AXIS_D0Q2S0A1_F AXIS_D0Q2S0A1_F 0.0 0.110000 + AXIS_D0Q2S0A1_S AXIS_D0Q2S0A1_S 0.0 0.110000 + AXIS_D0Q2S1A0_F AXIS_D0Q2S1A0_F 0.0 0.110000 + AXIS_D0Q2S1A0_S AXIS_D0Q2S1A0_S 0.0 0.110000 + AXIS_D0Q2S1A1_F AXIS_D0Q2S1A1_F 0.0 0.110000 + AXIS_D0Q2S1A1_S AXIS_D0Q2S1A1_S 0.0 0.110000 + AXIS_D0Q2S2A0_F AXIS_D0Q2S2A0_F 0.0 0.110000 + AXIS_D0Q2S2A0_S AXIS_D0Q2S2A0_S 0.0 0.110000 + AXIS_D0Q2S2A1_F AXIS_D0Q2S2A1_F 0.0 0.110000 + AXIS_D0Q2S2A1_S AXIS_D0Q2S2A1_S 0.0 0.110000 + AXIS_D0Q2S3A0_F AXIS_D0Q2S3A0_F 0.0 0.110000 + AXIS_D0Q2S3A0_S AXIS_D0Q2S3A0_S 0.0 0.110000 + AXIS_D0Q2S3A1_F AXIS_D0Q2S3A1_F 0.0 0.110000 + AXIS_D0Q2S3A1_S AXIS_D0Q2S3A1_S 0.0 0.110000 + AXIS_D0Q2S4A0_F AXIS_D0Q2S4A0_F 0.0 0.110000 + AXIS_D0Q2S4A0_S AXIS_D0Q2S4A0_S 0.0 0.110000 + AXIS_D0Q2S4A1_F AXIS_D0Q2S4A1_F 0.0 0.110000 + AXIS_D0Q2S4A1_S AXIS_D0Q2S4A1_S 0.0 0.110000 + AXIS_D0Q2S5A0_F AXIS_D0Q2S5A0_F 0.0 0.110000 + AXIS_D0Q2S5A0_S AXIS_D0Q2S5A0_S 0.0 0.110000 + AXIS_D0Q2S5A1_F AXIS_D0Q2S5A1_F 0.0 0.110000 + AXIS_D0Q2S5A1_S AXIS_D0Q2S5A1_S 0.0 0.110000 + AXIS_D0Q2S6A0_F AXIS_D0Q2S6A0_F 0.0 0.110000 + AXIS_D0Q2S6A0_S AXIS_D0Q2S6A0_S 0.0 0.110000 + AXIS_D0Q2S6A1_F AXIS_D0Q2S6A1_F 0.0 0.110000 + AXIS_D0Q2S6A1_S AXIS_D0Q2S6A1_S 0.0 0.110000 + AXIS_D0Q2S7A0_F AXIS_D0Q2S7A0_F 0.0 0.110000 + AXIS_D0Q2S7A0_S AXIS_D0Q2S7A0_S 0.0 0.110000 + AXIS_D0Q2S7A1_F AXIS_D0Q2S7A1_F 0.0 0.110000 + AXIS_D0Q2S7A1_S AXIS_D0Q2S7A1_S 0.0 0.110000 + AXIS_D0Q3S0A0_F AXIS_D0Q3S0A0_F 0.0 0.110000 + AXIS_D0Q3S0A0_S AXIS_D0Q3S0A0_S 0.0 0.110000 + AXIS_D0Q3S0A1_F AXIS_D0Q3S0A1_F 0.0 0.110000 + AXIS_D0Q3S0A1_S AXIS_D0Q3S0A1_S 0.0 0.110000 + AXIS_D0Q3S1A0_F AXIS_D0Q3S1A0_F 0.0 0.110000 + AXIS_D0Q3S1A0_S AXIS_D0Q3S1A0_S 0.0 0.110000 + AXIS_D0Q3S1A1_F AXIS_D0Q3S1A1_F 0.0 0.110000 + AXIS_D0Q3S1A1_S AXIS_D0Q3S1A1_S 0.0 0.110000 + AXIS_D0Q3S2A0_F AXIS_D0Q3S2A0_F 0.0 0.110000 + AXIS_D0Q3S2A0_S AXIS_D0Q3S2A0_S 0.0 0.110000 + AXIS_D0Q3S2A1_F AXIS_D0Q3S2A1_F 0.0 0.110000 + AXIS_D0Q3S2A1_S AXIS_D0Q3S2A1_S 0.0 0.110000 + AXIS_D0Q3S3A0_F AXIS_D0Q3S3A0_F 0.0 0.110000 + AXIS_D0Q3S3A0_S AXIS_D0Q3S3A0_S 0.0 0.110000 + AXIS_D0Q3S3A1_F AXIS_D0Q3S3A1_F 0.0 0.110000 + AXIS_D0Q3S3A1_S AXIS_D0Q3S3A1_S 0.0 0.110000 + AXIS_D0Q3S4A0_F AXIS_D0Q3S4A0_F 0.0 0.110000 + AXIS_D0Q3S4A0_S AXIS_D0Q3S4A0_S 0.0 0.110000 + AXIS_D0Q3S4A1_F AXIS_D0Q3S4A1_F 0.0 0.110000 + AXIS_D0Q3S4A1_S AXIS_D0Q3S4A1_S 0.0 0.110000 + AXIS_D0Q3S5A0_F AXIS_D0Q3S5A0_F 0.0 0.110000 + AXIS_D0Q3S5A0_S AXIS_D0Q3S5A0_S 0.0 0.110000 + AXIS_D0Q3S5A1_F AXIS_D0Q3S5A1_F 0.0 0.110000 + AXIS_D0Q3S5A1_S AXIS_D0Q3S5A1_S 0.0 0.110000 + AXIS_D0Q3S6A0_F AXIS_D0Q3S6A0_F 0.0 0.110000 + AXIS_D0Q3S6A0_S AXIS_D0Q3S6A0_S 0.0 0.110000 + AXIS_D0Q3S6A1_F AXIS_D0Q3S6A1_F 0.0 0.110000 + AXIS_D0Q3S6A1_S AXIS_D0Q3S6A1_S 0.0 0.110000 + AXIS_D0Q3S7A0_F AXIS_D0Q3S7A0_F 0.0 0.110000 + AXIS_D0Q3S7A0_S AXIS_D0Q3S7A0_S 0.0 0.110000 + AXIS_D0Q3S7A1_F AXIS_D0Q3S7A1_F 0.0 0.110000 + AXIS_D0Q3S7A1_S AXIS_D0Q3S7A1_S 0.0 0.110000 + +loop_ +_array_intensities.array_id +_array_intensities.binary_id +_array_intensities.linearity +_array_intensities.gain +_array_intensities.gain_esd +_array_intensities.overload +_array_intensities.undefined_value + ARRAY_D0Q0S0A0 1 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S0A1 2 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S1A0 3 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S1A1 4 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S2A0 5 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S2A1 6 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S3A0 7 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S3A1 8 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S4A0 9 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S4A1 10 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S5A0 11 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S5A1 12 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S6A0 13 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S6A1 14 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S7A0 15 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q0S7A1 16 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S0A0 17 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S0A1 18 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S1A0 19 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S1A1 20 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S2A0 21 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S2A1 22 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S3A0 23 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S3A1 24 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S4A0 25 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S4A1 26 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S5A0 27 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S5A1 28 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S6A0 29 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S6A1 30 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S7A0 31 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q1S7A1 32 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S0A0 33 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S0A1 34 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S1A0 35 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S1A1 36 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S2A0 37 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S2A1 38 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S3A0 39 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S3A1 40 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S4A0 41 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S4A1 42 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S5A0 43 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S5A1 44 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S6A0 45 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S6A1 46 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S7A0 47 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q2S7A1 48 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S0A0 49 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S0A1 50 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S1A0 51 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S1A1 52 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S2A0 53 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S2A1 54 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S3A0 55 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S3A1 56 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S4A0 57 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S4A1 58 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S5A0 59 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S5A1 60 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S6A0 61 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S6A1 62 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S7A0 63 linear 1.0 0.1 16383.0 0.0 + ARRAY_D0Q3S7A1 64 linear 1.0 0.1 16383.0 0.0 + +loop_ +_array_structure.id +_array_structure.encoding_type +_array_structure.compression_type +_array_structure.byte_order + ARRAY_D0Q0S0A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S0A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S1A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S1A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S2A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S2A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S3A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S3A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S4A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S4A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S5A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S5A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S6A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S6A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S7A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q0S7A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S0A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S0A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S1A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S1A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S2A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S2A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S3A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S3A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S4A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S4A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S5A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S5A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S6A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S6A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S7A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q1S7A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S0A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S0A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S1A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S1A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S2A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S2A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S3A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S3A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S4A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S4A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S5A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S5A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S6A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S6A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S7A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q2S7A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S0A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S0A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S1A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S1A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S2A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S2A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S3A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S3A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S4A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S4A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S5A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S5A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S6A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S6A1 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S7A0 'signed 64-bit real IEEE' canonical little_endian + ARRAY_D0Q3S7A1 'signed 64-bit real IEEE' canonical little_endian + +loop_ +_array_data.array_id +_array_data.binary_id +_array_data.data + ARRAY_D0Q0S0A0 1 . + ARRAY_D0Q0S0A1 2 . + ARRAY_D0Q0S1A0 3 . + ARRAY_D0Q0S1A1 4 . + ARRAY_D0Q0S2A0 5 . + ARRAY_D0Q0S2A1 6 . + ARRAY_D0Q0S3A0 7 . + ARRAY_D0Q0S3A1 8 . + ARRAY_D0Q0S4A0 9 . + ARRAY_D0Q0S4A1 10 . + ARRAY_D0Q0S5A0 11 . + ARRAY_D0Q0S5A1 12 . + ARRAY_D0Q0S6A0 13 . + ARRAY_D0Q0S6A1 14 . + ARRAY_D0Q0S7A0 15 . + ARRAY_D0Q0S7A1 16 . + ARRAY_D0Q1S0A0 17 . + ARRAY_D0Q1S0A1 18 . + ARRAY_D0Q1S1A0 19 . + ARRAY_D0Q1S1A1 20 . + ARRAY_D0Q1S2A0 21 . + ARRAY_D0Q1S2A1 22 . + ARRAY_D0Q1S3A0 23 . + ARRAY_D0Q1S3A1 24 . + ARRAY_D0Q1S4A0 25 . + ARRAY_D0Q1S4A1 26 . + ARRAY_D0Q1S5A0 27 . + ARRAY_D0Q1S5A1 28 . + ARRAY_D0Q1S6A0 29 . + ARRAY_D0Q1S6A1 30 . + ARRAY_D0Q1S7A0 31 . + ARRAY_D0Q1S7A1 32 . + ARRAY_D0Q2S0A0 33 . + ARRAY_D0Q2S0A1 34 . + ARRAY_D0Q2S1A0 35 . + ARRAY_D0Q2S1A1 36 . + ARRAY_D0Q2S2A0 37 . + ARRAY_D0Q2S2A1 38 . + ARRAY_D0Q2S3A0 39 . + ARRAY_D0Q2S3A1 40 . + ARRAY_D0Q2S4A0 41 . + ARRAY_D0Q2S4A1 42 . + ARRAY_D0Q2S5A0 43 . + ARRAY_D0Q2S5A1 44 . + ARRAY_D0Q2S6A0 45 . + ARRAY_D0Q2S6A1 46 . + ARRAY_D0Q2S7A0 47 . + ARRAY_D0Q2S7A1 48 . + ARRAY_D0Q3S0A0 49 . + ARRAY_D0Q3S0A1 50 . + ARRAY_D0Q3S1A0 51 . + ARRAY_D0Q3S1A1 52 . + ARRAY_D0Q3S2A0 53 . + ARRAY_D0Q3S2A1 54 . + ARRAY_D0Q3S3A0 55 . + ARRAY_D0Q3S3A1 56 . + ARRAY_D0Q3S4A0 57 . + ARRAY_D0Q3S4A1 58 . + ARRAY_D0Q3S5A0 59 . + ARRAY_D0Q3S5A1 60 . + ARRAY_D0Q3S6A0 61 . + ARRAY_D0Q3S6A1 62 . + ARRAY_D0Q3S7A0 63 . + ARRAY_D0Q3S7A1 64 . + diff --git a/py2cbf/fel_test2_orig.out b/py2cbf/fel_test2_orig.out new file mode 100644 index 00000000..0ca314b8 --- /dev/null +++ b/py2cbf/fel_test2_orig.out @@ -0,0 +1,4608 @@ +element: 0 +(0, 0) v00 [ -48.737597848 -2.936464972 -171.010400000 ] +(0, 1) v01 [ -48.627599764 -2.937114247 -171.010400000 ] +(1, 0) v10 [ -48.736948573 -2.826466888 -171.010400000 ] +(1, 1) v11 [ -48.626950490 -2.827116163 -171.010400000 ] +surface axes: AXIS_D0Q0S0A0_S AXIS_D0Q0S0A0_F +AXIS_D0Q0S0A0_S has 8 ancestors +AXIS_D0Q0S0A0_F has 7 ancestors +axis AXIS_D0Q0S0A0_S index: 0 + equipment detector + depends_on AXIS_D0Q0S0A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S0A0_F index: 1 + equipment detector + depends_on FS_D0Q0S0A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S0A0 index: 2 + equipment detector + depends_on FS_D0Q0S0 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 89.66181 + rotation_axis FS_D0Q0S0 +axis FS_D0Q0S0 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [11.3696, -23.189925, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 1 +(0, 0) v00 [ -48.609690787 18.733157539 -171.010400000 ] +(0, 1) v01 [ -48.499692703 18.732508265 -171.010400000 ] +(1, 0) v10 [ -48.609041513 18.843155623 -171.010400000 ] +(1, 1) v11 [ -48.499043429 18.842506349 -171.010400000 ] +surface axes: AXIS_D0Q0S0A1_S AXIS_D0Q0S0A1_F +AXIS_D0Q0S0A1_S has 8 ancestors +AXIS_D0Q0S0A1_F has 7 ancestors +axis AXIS_D0Q0S0A1_S index: 0 + equipment detector + depends_on AXIS_D0Q0S0A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S0A1_F index: 1 + equipment detector + depends_on FS_D0Q0S0A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S0A1 index: 2 + equipment detector + depends_on FS_D0Q0S0 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 89.66181 + rotation_axis FS_D0Q0S0 +axis FS_D0Q0S0 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [11.3696, -23.189925, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 2 +(0, 0) v00 [ -25.165271450 -3.116705017 -171.010400000 ] +(0, 1) v01 [ -25.055271450 -3.116702483 -171.010400000 ] +(1, 0) v10 [ -25.165273984 -3.006705017 -171.010400000 ] +(1, 1) v11 [ -25.055273984 -3.006702483 -171.010400000 ] +surface axes: AXIS_D0Q0S1A0_S AXIS_D0Q0S1A0_F +AXIS_D0Q0S1A0_S has 8 ancestors +AXIS_D0Q0S1A0_F has 7 ancestors +axis AXIS_D0Q0S1A0_S index: 0 + equipment detector + depends_on AXIS_D0Q0S1A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S1A0_F index: 1 + equipment detector + depends_on FS_D0Q0S1A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S1A0 index: 2 + equipment detector + depends_on FS_D0Q0S1 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 90.00132 + rotation_axis FS_D0Q0S1 +axis FS_D0Q0S1 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [34.815, -23.309825, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 3 +(0, 0) v00 [ -25.165770691 18.553294977 -171.010400000 ] +(0, 1) v01 [ -25.055770691 18.553297511 -171.010400000 ] +(1, 0) v10 [ -25.165773225 18.663294977 -171.010400000 ] +(1, 1) v11 [ -25.055773225 18.663297511 -171.010400000 ] +surface axes: AXIS_D0Q0S1A1_S AXIS_D0Q0S1A1_F +AXIS_D0Q0S1A1_S has 8 ancestors +AXIS_D0Q0S1A1_F has 7 ancestors +axis AXIS_D0Q0S1A1_S index: 0 + equipment detector + depends_on AXIS_D0Q0S1A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S1A1_F index: 1 + equipment detector + depends_on FS_D0Q0S1A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S1A1 index: 2 + equipment detector + depends_on FS_D0Q0S1 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 90.00132 + rotation_axis FS_D0Q0S1 +axis FS_D0Q0S1 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [34.815, -23.309825, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 4 +(0, 0) v00 [ -94.904894989 40.723828406 -171.010400000 ] +(0, 1) v01 [ -94.904291157 40.613830063 -171.010400000 ] +(1, 0) v10 [ -94.794896646 40.724432238 -171.010400000 ] +(1, 1) v11 [ -94.794292814 40.614433895 -171.010400000 ] +surface axes: AXIS_D0Q0S2A0_S AXIS_D0Q0S2A0_F +AXIS_D0Q0S2A0_S has 8 ancestors +AXIS_D0Q0S2A0_F has 7 ancestors +axis AXIS_D0Q0S2A0_S index: 0 + equipment detector + depends_on AXIS_D0Q0S2A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S2A0_F index: 1 + equipment detector + depends_on FS_D0Q0S2A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S2A0 index: 2 + equipment detector + depends_on FS_D0Q0S2 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 359.68548 + rotation_axis FS_D0Q0S2 +axis FS_D0Q0S2 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-23.5389, -10.921625, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 5 +(0, 0) v00 [ -73.235221486 40.842783313 -171.010400000 ] +(0, 1) v01 [ -73.234617654 40.732784971 -171.010400000 ] +(1, 0) v10 [ -73.125223143 40.843387145 -171.010400000 ] +(1, 1) v11 [ -73.124619311 40.733388803 -171.010400000 ] +surface axes: AXIS_D0Q0S2A1_S AXIS_D0Q0S2A1_F +AXIS_D0Q0S2A1_S has 8 ancestors +AXIS_D0Q0S2A1_F has 7 ancestors +axis AXIS_D0Q0S2A1_S index: 0 + equipment detector + depends_on AXIS_D0Q0S2A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S2A1_F index: 1 + equipment detector + depends_on FS_D0Q0S2A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S2A1 index: 2 + equipment detector + depends_on FS_D0Q0S2 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 359.68548 + rotation_axis FS_D0Q0S2 +axis FS_D0Q0S2 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-23.5389, -10.921625, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 6 +(0, 0) v00 [ -94.854502658 17.595280641 -171.010400000 ] +(0, 1) v01 [ -94.854569604 17.485280661 -171.010400000 ] +(1, 0) v10 [ -94.744502679 17.595213695 -171.010400000 ] +(1, 1) v11 [ -94.744569624 17.485213716 -171.010400000 ] +surface axes: AXIS_D0Q0S3A0_S AXIS_D0Q0S3A0_F +AXIS_D0Q0S3A0_S has 8 ancestors +AXIS_D0Q0S3A0_F has 7 ancestors +axis AXIS_D0Q0S3A0_S index: 0 + equipment detector + depends_on AXIS_D0Q0S3A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S3A0_F index: 1 + equipment detector + depends_on FS_D0Q0S3A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S3A0 index: 2 + equipment detector + depends_on FS_D0Q0S3 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 359.96513 + rotation_axis FS_D0Q0S3 +axis FS_D0Q0S3 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-23.5499, -34.181125, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 7 +(0, 0) v00 [ -73.184506672 17.582092360 -171.010400000 ] +(0, 1) v01 [ -73.184573617 17.472092380 -171.010400000 ] +(1, 0) v10 [ -73.074506692 17.582025414 -171.010400000 ] +(1, 1) v11 [ -73.074573637 17.472025434 -171.010400000 ] +surface axes: AXIS_D0Q0S3A1_S AXIS_D0Q0S3A1_F +AXIS_D0Q0S3A1_S has 8 ancestors +AXIS_D0Q0S3A1_F has 7 ancestors +axis AXIS_D0Q0S3A1_S index: 0 + equipment detector + depends_on AXIS_D0Q0S3A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S3A1_F index: 1 + equipment detector + depends_on FS_D0Q0S3A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S3A1 index: 2 + equipment detector + depends_on FS_D0Q0S3 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 359.96513 + rotation_axis FS_D0Q0S3 +axis FS_D0Q0S3 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-23.5499, -34.181125, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 8 +(0, 0) v00 [ -51.061074155 87.402088468 -171.010400000 ] +(0, 1) v01 [ -51.171073791 87.401805519 -171.010400000 ] +(1, 0) v10 [ -51.060791206 87.292088832 -171.010400000 ] +(1, 1) v11 [ -51.170790842 87.291805883 -171.010400000 ] +surface axes: AXIS_D0Q0S4A0_S AXIS_D0Q0S4A0_F +AXIS_D0Q0S4A0_S has 8 ancestors +AXIS_D0Q0S4A0_F has 7 ancestors +axis AXIS_D0Q0S4A0_S index: 0 + equipment detector + depends_on AXIS_D0Q0S4A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S4A0_F index: 1 + equipment detector + depends_on FS_D0Q0S4A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S4A0 index: 2 + equipment detector + depends_on FS_D0Q0S4 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 270.14738 + rotation_axis FS_D0Q0S4 +axis FS_D0Q0S4 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-11.2651, 24.282775, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 9 +(0, 0) v00 [ -51.005333207 65.732160159 -171.010400000 ] +(0, 1) v01 [ -51.115332843 65.731877210 -171.010400000 ] +(1, 0) v10 [ -51.005050258 65.622160523 -171.010400000 ] +(1, 1) v11 [ -51.115049894 65.621877574 -171.010400000 ] +surface axes: AXIS_D0Q0S4A1_S AXIS_D0Q0S4A1_F +AXIS_D0Q0S4A1_S has 8 ancestors +AXIS_D0Q0S4A1_F has 7 ancestors +axis AXIS_D0Q0S4A1_S index: 0 + equipment detector + depends_on AXIS_D0Q0S4A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S4A1_F index: 1 + equipment detector + depends_on FS_D0Q0S4A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S4A1 index: 2 + equipment detector + depends_on FS_D0Q0S4 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 270.14738 + rotation_axis FS_D0Q0S4 +axis FS_D0Q0S4 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-11.2651, 24.282775, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 10 +(0, 0) v00 [ -74.503935728 87.276754245 -171.010400000 ] +(0, 1) v01 [ -74.613935623 87.276602653 -171.010400000 ] +(1, 0) v10 [ -74.503784135 87.166754349 -171.010400000 ] +(1, 1) v11 [ -74.613784031 87.166602757 -171.010400000 ] +surface axes: AXIS_D0Q0S5A0_S AXIS_D0Q0S5A0_F +AXIS_D0Q0S5A0_S has 8 ancestors +AXIS_D0Q0S5A0_F has 7 ancestors +axis AXIS_D0Q0S5A0_S index: 0 + equipment detector + depends_on AXIS_D0Q0S5A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S5A0_F index: 1 + equipment detector + depends_on FS_D0Q0S5A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S5A0 index: 2 + equipment detector + depends_on FS_D0Q0S5 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 270.07896 + rotation_axis FS_D0Q0S5 +axis FS_D0Q0S5 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-34.7336, 24.169475, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 11 +(0, 0) v00 [ -74.474072050 65.606774823 -171.010400000 ] +(0, 1) v01 [ -74.584071946 65.606623230 -171.010400000 ] +(1, 0) v10 [ -74.473920458 65.496774927 -171.010400000 ] +(1, 1) v11 [ -74.583920354 65.496623335 -171.010400000 ] +surface axes: AXIS_D0Q0S5A1_S AXIS_D0Q0S5A1_F +AXIS_D0Q0S5A1_S has 8 ancestors +AXIS_D0Q0S5A1_F has 7 ancestors +axis AXIS_D0Q0S5A1_S index: 0 + equipment detector + depends_on AXIS_D0Q0S5A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S5A1_F index: 1 + equipment detector + depends_on FS_D0Q0S5A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S5A1 index: 2 + equipment detector + depends_on FS_D0Q0S5 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 270.07896 + rotation_axis FS_D0Q0S5 +axis FS_D0Q0S5 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-34.7336, 24.169475, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 12 +(0, 0) v00 [ -47.723344871 85.165185804 -171.010400000 ] +(0, 1) v01 [ -47.723762978 85.055186598 -171.010400000 ] +(1, 0) v10 [ -47.613345666 85.164767697 -171.010400000 ] +(1, 1) v11 [ -47.613763772 85.054768492 -171.010400000 ] +surface axes: AXIS_D0Q0S6A0_S AXIS_D0Q0S6A0_F +AXIS_D0Q0S6A0_S has 8 ancestors +AXIS_D0Q0S6A0_F has 7 ancestors +axis AXIS_D0Q0S6A0_S index: 0 + equipment detector + depends_on AXIS_D0Q0S6A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S6A0_F index: 1 + equipment detector + depends_on FS_D0Q0S6A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S6A0 index: 2 + equipment detector + depends_on FS_D0Q0S6 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 359.78222 + rotation_axis FS_D0Q0S6 +axis FS_D0Q0S6 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [23.5488, 33.320375, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 13 +(0, 0) v00 [ -26.053501409 85.082818808 -171.010400000 ] +(0, 1) v01 [ -26.053919516 84.972819603 -171.010400000 ] +(1, 0) v10 [ -25.943502204 85.082400701 -171.010400000 ] +(1, 1) v11 [ -25.943920310 84.972401496 -171.010400000 ] +surface axes: AXIS_D0Q0S6A1_S AXIS_D0Q0S6A1_F +AXIS_D0Q0S6A1_S has 8 ancestors +AXIS_D0Q0S6A1_F has 7 ancestors +axis AXIS_D0Q0S6A1_S index: 0 + equipment detector + depends_on AXIS_D0Q0S6A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S6A1_F index: 1 + equipment detector + depends_on FS_D0Q0S6A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S6A1 index: 2 + equipment detector + depends_on FS_D0Q0S6 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 359.78222 + rotation_axis FS_D0Q0S6 +axis FS_D0Q0S6 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [23.5488, 33.320375, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 14 +(0, 0) v00 [ -47.938268150 61.632131275 -171.010400000 ] +(0, 1) v01 [ -47.938467739 61.522131456 -171.010400000 ] +(1, 0) v10 [ -47.828268331 61.631931686 -171.010400000 ] +(1, 1) v11 [ -47.828467920 61.521931867 -171.010400000 ] +surface axes: AXIS_D0Q0S7A0_S AXIS_D0Q0S7A0_F +AXIS_D0Q0S7A0_S has 8 ancestors +AXIS_D0Q0S7A0_F has 7 ancestors +axis AXIS_D0Q0S7A0_S index: 0 + equipment detector + depends_on AXIS_D0Q0S7A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S7A0_F index: 1 + equipment detector + depends_on FS_D0Q0S7A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S7A0 index: 2 + equipment detector + depends_on FS_D0Q0S7 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 359.89604 + rotation_axis FS_D0Q0S7 +axis FS_D0Q0S7 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [23.3541, 9.829875, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 15 +(0, 0) v00 [ -26.268303821 61.592812289 -171.010400000 ] +(0, 1) v01 [ -26.268503410 61.482812470 -171.010400000 ] +(1, 0) v10 [ -26.158304002 61.592612700 -171.010400000 ] +(1, 1) v11 [ -26.158503591 61.482612881 -171.010400000 ] +surface axes: AXIS_D0Q0S7A1_S AXIS_D0Q0S7A1_F +AXIS_D0Q0S7A1_S has 8 ancestors +AXIS_D0Q0S7A1_F has 7 ancestors +axis AXIS_D0Q0S7A1_S index: 0 + equipment detector + depends_on AXIS_D0Q0S7A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S7A1_F index: 1 + equipment detector + depends_on FS_D0Q0S7A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S7A1 index: 2 + equipment detector + depends_on FS_D0Q0S7 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 359.89604 + rotation_axis FS_D0Q0S7 +axis FS_D0Q0S7 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [23.3541, 9.829875, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-49.860765625, 41.643353125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 16 +(0, 0) v00 [ -3.048113674 48.919685138 -171.010400000 ] +(0, 1) v01 [ -3.048636604 48.809686381 -171.010400000 ] +(1, 0) v10 [ -2.938114917 48.919162208 -171.010400000 ] +(1, 1) v11 [ -2.938637847 48.809163451 -171.010400000 ] +surface axes: AXIS_D0Q1S0A0_S AXIS_D0Q1S0A0_F +AXIS_D0Q1S0A0_S has 8 ancestors +AXIS_D0Q1S0A0_F has 7 ancestors +axis AXIS_D0Q1S0A0_S index: 0 + equipment detector + depends_on AXIS_D0Q1S0A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S0A0_F index: 1 + equipment detector + depends_on FS_D0Q1S0A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S0A0 index: 2 + equipment detector + depends_on FS_D0Q1S0 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.27238 + rotation_axis FS_D0Q1S0 +axis FS_D0Q1S0 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-23.1589875, -11.451825, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 17 +(0, 0) v00 [ 18.621641457 48.816667910 -171.010400000 ] +(0, 1) v01 [ 18.621118527 48.706669153 -171.010400000 ] +(1, 0) v10 [ 18.731640214 48.816144980 -171.010400000 ] +(1, 1) v11 [ 18.731117284 48.706146223 -171.010400000 ] +surface axes: AXIS_D0Q1S0A1_S AXIS_D0Q1S0A1_F +AXIS_D0Q1S0A1_S has 8 ancestors +AXIS_D0Q1S0A1_F has 7 ancestors +axis AXIS_D0Q1S0A1_S index: 0 + equipment detector + depends_on AXIS_D0Q1S0A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S0A1_F index: 1 + equipment detector + depends_on FS_D0Q1S0A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S0A1 index: 2 + equipment detector + depends_on FS_D0Q1S0 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.27238 + rotation_axis FS_D0Q1S0 +axis FS_D0Q1S0 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-23.1589875, -11.451825, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 18 +(0, 0) v00 [ -3.143936475 25.488797285 -171.010400000 ] +(0, 1) v01 [ -3.143946573 25.378797285 -171.010400000 ] +(1, 0) v10 [ -3.033936475 25.488787187 -171.010400000 ] +(1, 1) v11 [ -3.033946574 25.378787187 -171.010400000 ] +surface axes: AXIS_D0Q1S1A0_S AXIS_D0Q1S1A0_F +AXIS_D0Q1S1A0_S has 8 ancestors +AXIS_D0Q1S1A0_F has 7 ancestors +axis AXIS_D0Q1S1A0_S index: 0 + equipment detector + depends_on AXIS_D0Q1S1A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S1A0_F index: 1 + equipment detector + depends_on FS_D0Q1S1A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S1A0 index: 2 + equipment detector + depends_on FS_D0Q1S1 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.00525999986641 + rotation_axis FS_D0Q1S1 +axis FS_D0Q1S1 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-23.2073875, -34.782825, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 19 +(0, 0) v00 [ 18.526063434 25.486807885 -171.010400000 ] +(0, 1) v01 [ 18.526053335 25.376807886 -171.010400000 ] +(1, 0) v10 [ 18.636063433 25.486797787 -171.010400000 ] +(1, 1) v11 [ 18.636053335 25.376797787 -171.010400000 ] +surface axes: AXIS_D0Q1S1A1_S AXIS_D0Q1S1A1_F +AXIS_D0Q1S1A1_S has 8 ancestors +AXIS_D0Q1S1A1_F has 7 ancestors +axis AXIS_D0Q1S1A1_S index: 0 + equipment detector + depends_on AXIS_D0Q1S1A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S1A1_F index: 1 + equipment detector + depends_on FS_D0Q1S1A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S1A1 index: 2 + equipment detector + depends_on FS_D0Q1S1 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.00525999986641 + rotation_axis FS_D0Q1S1 +axis FS_D0Q1S1 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-23.2073875, -34.782825, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 20 +(0, 0) v00 [ 40.891805581 94.890321174 -171.010400000 ] +(0, 1) v01 [ 40.781805592 94.890272314 -171.010400000 ] +(1, 0) v10 [ 40.891854441 94.780321185 -171.010400000 ] +(1, 1) v11 [ 40.781854452 94.780272325 -171.010400000 ] +surface axes: AXIS_D0Q1S2A0_S AXIS_D0Q1S2A0_F +AXIS_D0Q1S2A0_S has 8 ancestors +AXIS_D0Q1S2A0_F has 7 ancestors +axis AXIS_D0Q1S2A0_S index: 0 + equipment detector + depends_on AXIS_D0Q1S2A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S2A0_F index: 1 + equipment detector + depends_on FS_D0Q1S2A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S2A0 index: 2 + equipment detector + depends_on FS_D0Q1S2 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 270.02545 + rotation_axis FS_D0Q1S2 +axis FS_D0Q1S2 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-10.7311875, 23.286175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 21 +(0, 0) v00 [ 40.901431098 73.220323312 -171.010400000 ] +(0, 1) v01 [ 40.791431109 73.220274451 -171.010400000 ] +(1, 0) v10 [ 40.901479958 73.110323323 -171.010400000 ] +(1, 1) v11 [ 40.791479969 73.110274462 -171.010400000 ] +surface axes: AXIS_D0Q1S2A1_S AXIS_D0Q1S2A1_F +AXIS_D0Q1S2A1_S has 8 ancestors +AXIS_D0Q1S2A1_F has 7 ancestors +axis AXIS_D0Q1S2A1_S index: 0 + equipment detector + depends_on AXIS_D0Q1S2A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S2A1_F index: 1 + equipment detector + depends_on FS_D0Q1S2A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S2A1 index: 2 + equipment detector + depends_on FS_D0Q1S2 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 270.02545 + rotation_axis FS_D0Q1S2 +axis FS_D0Q1S2 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-10.7311875, 23.286175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 22 +(0, 0) v00 [ 17.480754647 94.949540447 -171.010400000 ] +(0, 1) v01 [ 17.370754662 94.949481584 -171.010400000 ] +(1, 0) v10 [ 17.480813510 94.839540463 -171.010400000 ] +(1, 1) v11 [ 17.370813525 94.839481600 -171.010400000 ] +surface axes: AXIS_D0Q1S3A0_S AXIS_D0Q1S3A0_F +AXIS_D0Q1S3A0_S has 8 ancestors +AXIS_D0Q1S3A0_F has 7 ancestors +axis AXIS_D0Q1S3A0_S index: 0 + equipment detector + depends_on AXIS_D0Q1S3A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S3A0_F index: 1 + equipment detector + depends_on FS_D0Q1S3A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S3A0 index: 2 + equipment detector + depends_on FS_D0Q1S3 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 270.03066 + rotation_axis FS_D0Q1S3 +axis FS_D0Q1S3 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-34.1402875, 23.344475, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 23 +(0, 0) v00 [ 17.492350652 73.279543550 -171.010400000 ] +(0, 1) v01 [ 17.382350668 73.279484687 -171.010400000 ] +(1, 0) v10 [ 17.492409515 73.169543566 -171.010400000 ] +(1, 1) v11 [ 17.382409531 73.169484703 -171.010400000 ] +surface axes: AXIS_D0Q1S3A1_S AXIS_D0Q1S3A1_F +AXIS_D0Q1S3A1_S has 8 ancestors +AXIS_D0Q1S3A1_F has 7 ancestors +axis AXIS_D0Q1S3A1_S index: 0 + equipment detector + depends_on AXIS_D0Q1S3A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S3A1_F index: 1 + equipment detector + depends_on FS_D0Q1S3A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S3A1 index: 2 + equipment detector + depends_on FS_D0Q1S3 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 270.03066 + rotation_axis FS_D0Q1S3 +axis FS_D0Q1S3 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-34.1402875, 23.344475, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 24 +(0, 0) v00 [ 86.959637954 51.423381581 -171.010400000 ] +(0, 1) v01 [ 86.959707434 51.533381559 -171.010400000 ] +(1, 0) v10 [ 86.849637976 51.423451061 -171.010400000 ] +(1, 1) v11 [ 86.849707456 51.533451039 -171.010400000 ] +surface axes: AXIS_D0Q1S4A0_S AXIS_D0Q1S4A0_F +AXIS_D0Q1S4A0_S has 8 ancestors +AXIS_D0Q1S4A0_F has 7 ancestors +axis AXIS_D0Q1S4A0_S index: 0 + equipment detector + depends_on AXIS_D0Q1S4A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S4A0_F index: 1 + equipment detector + depends_on FS_D0Q1S4A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S4A0 index: 2 + equipment detector + depends_on FS_D0Q1S4 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 179.96381 + rotation_axis FS_D0Q1S4 +axis FS_D0Q1S4 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [24.0035125, 11.407275, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 25 +(0, 0) v00 [ 65.289642277 51.437069103 -171.010400000 ] +(0, 1) v01 [ 65.289711756 51.547069081 -171.010400000 ] +(1, 0) v10 [ 65.179642299 51.437138583 -171.010400000 ] +(1, 1) v11 [ 65.179711778 51.547138561 -171.010400000 ] +surface axes: AXIS_D0Q1S4A1_S AXIS_D0Q1S4A1_F +AXIS_D0Q1S4A1_S has 8 ancestors +AXIS_D0Q1S4A1_F has 7 ancestors +axis AXIS_D0Q1S4A1_S index: 0 + equipment detector + depends_on AXIS_D0Q1S4A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S4A1_F index: 1 + equipment detector + depends_on FS_D0Q1S4A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S4A1 index: 2 + equipment detector + depends_on FS_D0Q1S4 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 179.96381 + rotation_axis FS_D0Q1S4 +axis FS_D0Q1S4 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [24.0035125, 11.407275, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 26 +(0, 0) v00 [ 86.970331548 74.915641280 -171.010400000 ] +(0, 1) v01 [ 86.970284819 75.025641270 -171.010400000 ] +(1, 0) v10 [ 86.860331558 74.915594550 -171.010400000 ] +(1, 1) v11 [ 86.860284829 75.025594540 -171.010400000 ] +surface axes: AXIS_D0Q1S5A0_S AXIS_D0Q1S5A0_F +AXIS_D0Q1S5A0_S has 8 ancestors +AXIS_D0Q1S5A0_F has 7 ancestors +axis AXIS_D0Q1S5A0_S index: 0 + equipment detector + depends_on AXIS_D0Q1S5A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S5A0_F index: 1 + equipment detector + depends_on FS_D0Q1S5A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S5A0 index: 2 + equipment detector + depends_on FS_D0Q1S5 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 180.02434 + rotation_axis FS_D0Q1S5 +axis FS_D0Q1S5 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [24.0035125, 34.876875, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 27 +(0, 0) v00 [ 65.300333504 74.906435579 -171.010400000 ] +(0, 1) v01 [ 65.300286774 75.016435569 -171.010400000 ] +(1, 0) v10 [ 65.190333514 74.906388850 -171.010400000 ] +(1, 1) v11 [ 65.190286784 75.016388840 -171.010400000 ] +surface axes: AXIS_D0Q1S5A1_S AXIS_D0Q1S5A1_F +AXIS_D0Q1S5A1_S has 8 ancestors +AXIS_D0Q1S5A1_F has 7 ancestors +axis AXIS_D0Q1S5A1_S index: 0 + equipment detector + depends_on AXIS_D0Q1S5A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S5A1_F index: 1 + equipment detector + depends_on FS_D0Q1S5A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S5A1 index: 2 + equipment detector + depends_on FS_D0Q1S5 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 180.02434 + rotation_axis FS_D0Q1S5 +axis FS_D0Q1S5 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [24.0035125, 34.876875, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 28 +(0, 0) v00 [ 84.854773523 48.291884945 -171.010400000 ] +(0, 1) v01 [ 84.744773631 48.291730838 -171.010400000 ] +(1, 0) v10 [ 84.854927630 48.181885053 -171.010400000 ] +(1, 1) v11 [ 84.744927738 48.181730946 -171.010400000 ] +surface axes: AXIS_D0Q1S6A0_S AXIS_D0Q1S6A0_F +AXIS_D0Q1S6A0_S has 8 ancestors +AXIS_D0Q1S6A0_F has 7 ancestors +axis AXIS_D0Q1S6A0_S index: 0 + equipment detector + depends_on AXIS_D0Q1S6A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S6A0_F index: 1 + equipment detector + depends_on FS_D0Q1S6A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S6A0 index: 2 + equipment detector + depends_on FS_D0Q1S6 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 270.08027 + rotation_axis FS_D0Q1S6 +axis FS_D0Q1S6 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [33.2523125, -23.321925, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 29 +(0, 0) v00 [ 84.885132658 26.621906211 -171.010400000 ] +(0, 1) v01 [ 84.775132766 26.621752104 -171.010400000 ] +(1, 0) v10 [ 84.885286765 26.511906319 -171.010400000 ] +(1, 1) v11 [ 84.775286873 26.511752212 -171.010400000 ] +surface axes: AXIS_D0Q1S6A1_S AXIS_D0Q1S6A1_F +AXIS_D0Q1S6A1_S has 8 ancestors +AXIS_D0Q1S6A1_F has 7 ancestors +axis AXIS_D0Q1S6A1_S index: 0 + equipment detector + depends_on AXIS_D0Q1S6A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S6A1_F index: 1 + equipment detector + depends_on FS_D0Q1S6A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S6A1 index: 2 + equipment detector + depends_on FS_D0Q1S6 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 270.08027 + rotation_axis FS_D0Q1S6 +axis FS_D0Q1S6 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [33.2523125, -23.321925, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 30 +(0, 0) v00 [ 61.554592650 48.267966367 -171.010400000 ] +(0, 1) v01 [ 61.444593031 48.267677101 -171.010400000 ] +(1, 0) v10 [ 61.554881916 48.157966747 -171.010400000 ] +(1, 1) v11 [ 61.444882296 48.157677482 -171.010400000 ] +surface axes: AXIS_D0Q1S7A0_S AXIS_D0Q1S7A0_F +AXIS_D0Q1S7A0_S has 8 ancestors +AXIS_D0Q1S7A0_F has 7 ancestors +axis AXIS_D0Q1S7A0_S index: 0 + equipment detector + depends_on AXIS_D0Q1S7A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S7A0_F index: 1 + equipment detector + depends_on FS_D0Q1S7A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S7A0 index: 2 + equipment detector + depends_on FS_D0Q1S7 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 270.15067 + rotation_axis FS_D0Q1S7 +axis FS_D0Q1S7 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [9.9785125, -23.358225, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 31 +(0, 0) v00 [ 61.611577914 26.598041293 -171.010400000 ] +(0, 1) v01 [ 61.501578295 26.597752028 -171.010400000 ] +(1, 0) v10 [ 61.611867180 26.488041674 -171.010400000 ] +(1, 1) v11 [ 61.501867560 26.487752408 -171.010400000 ] +surface axes: AXIS_D0Q1S7A1_S AXIS_D0Q1S7A1_F +AXIS_D0Q1S7A1_S has 8 ancestors +AXIS_D0Q1S7A1_F has 7 ancestors +axis AXIS_D0Q1S7A1_S index: 0 + equipment detector + depends_on AXIS_D0Q1S7A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S7A1_F index: 1 + equipment detector + depends_on FS_D0Q1S7A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S7A1 index: 2 + equipment detector + depends_on FS_D0Q1S7 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 270.15067 + rotation_axis FS_D0Q1S7 +axis FS_D0Q1S7 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [9.9785125, -23.358225, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [41.512521875, 50.149653125, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 32 +(0, 0) v00 [ 48.419111958 3.214337179 -171.010400000 ] +(0, 1) v01 [ 48.309111997 3.214429390 -171.010400000 ] +(1, 0) v10 [ 48.419019747 3.104337218 -171.010400000 ] +(1, 1) v11 [ 48.309019786 3.104429429 -171.010400000 ] +surface axes: AXIS_D0Q2S0A0_S AXIS_D0Q2S0A0_F +AXIS_D0Q2S0A0_S has 8 ancestors +AXIS_D0Q2S0A0_F has 7 ancestors +axis AXIS_D0Q2S0A0_S index: 0 + equipment detector + depends_on AXIS_D0Q2S0A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S0A0_F index: 1 + equipment detector + depends_on FS_D0Q2S0A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S0A0 index: 2 + equipment detector + depends_on FS_D0Q2S0 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 90.04803 + rotation_axis FS_D0Q2S0 +axis FS_D0Q2S0 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-11.3150125, 23.1242, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 33 +(0, 0) v00 [ 48.400946397 -18.455655207 -171.010400000 ] +(0, 1) v01 [ 48.290946436 -18.455562996 -171.010400000 ] +(1, 0) v10 [ 48.400854186 -18.565655168 -171.010400000 ] +(1, 1) v11 [ 48.290854225 -18.565562957 -171.010400000 ] +surface axes: AXIS_D0Q2S0A1_S AXIS_D0Q2S0A1_F +AXIS_D0Q2S0A1_S has 8 ancestors +AXIS_D0Q2S0A1_F has 7 ancestors +axis AXIS_D0Q2S0A1_S index: 0 + equipment detector + depends_on AXIS_D0Q2S0A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S0A1_F index: 1 + equipment detector + depends_on FS_D0Q2S0A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S0A1 index: 2 + equipment detector + depends_on FS_D0Q2S0 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 90.04803 + rotation_axis FS_D0Q2S0 +axis FS_D0Q2S0 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-11.3150125, 23.1242, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 34 +(0, 0) v00 [ 25.018450610 3.252582377 -171.010400000 ] +(0, 1) v01 [ 24.908450611 3.252593742 -171.010400000 ] +(1, 0) v10 [ 25.018439244 3.142582377 -171.010400000 ] +(1, 1) v11 [ 24.908439245 3.142593743 -171.010400000 ] +surface axes: AXIS_D0Q2S1A0_S AXIS_D0Q2S1A0_F +AXIS_D0Q2S1A0_S has 8 ancestors +AXIS_D0Q2S1A0_F has 7 ancestors +axis AXIS_D0Q2S1A0_S index: 0 + equipment detector + depends_on AXIS_D0Q2S1A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S1A0_F index: 1 + equipment detector + depends_on FS_D0Q2S1A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S1A0 index: 2 + equipment detector + depends_on FS_D0Q2S1 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 90.00592 + rotation_axis FS_D0Q2S1 +axis FS_D0Q2S1 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-34.6999125, 23.155, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 35 +(0, 0) v00 [ 25.016211590 -18.417417508 -171.010400000 ] +(0, 1) v01 [ 24.906211590 -18.417406142 -171.010400000 ] +(1, 0) v10 [ 25.016200224 -18.527417507 -171.010400000 ] +(1, 1) v11 [ 24.906200225 -18.527406141 -171.010400000 ] +surface axes: AXIS_D0Q2S1A1_S AXIS_D0Q2S1A1_F +AXIS_D0Q2S1A1_S has 8 ancestors +AXIS_D0Q2S1A1_F has 7 ancestors +axis AXIS_D0Q2S1A1_S index: 0 + equipment detector + depends_on AXIS_D0Q2S1A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S1A1_F index: 1 + equipment detector + depends_on FS_D0Q2S1A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S1A1 index: 2 + equipment detector + depends_on FS_D0Q2S1 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 90.00592 + rotation_axis FS_D0Q2S1 +axis FS_D0Q2S1 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-34.6999125, 23.155, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 36 +(0, 0) v00 [ 94.540783193 -40.647880608 -171.010400000 ] +(0, 1) v01 [ 94.540565903 -40.537880823 -171.010400000 ] +(1, 0) v10 [ 94.430783407 -40.648097898 -171.010400000 ] +(1, 1) v11 [ 94.430566117 -40.538098112 -171.010400000 ] +surface axes: AXIS_D0Q2S2A0_S AXIS_D0Q2S2A0_F +AXIS_D0Q2S2A0_S has 8 ancestors +AXIS_D0Q2S2A0_F has 7 ancestors +axis AXIS_D0Q2S2A0_S index: 0 + equipment detector + depends_on AXIS_D0Q2S2A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S2A0_F index: 1 + equipment detector + depends_on FS_D0Q2S2A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S2A0 index: 2 + equipment detector + depends_on FS_D0Q2S2 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 180.11318 + rotation_axis FS_D0Q2S2 +axis FS_D0Q2S2 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [23.4746875, 10.7811, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 37 +(0, 0) v00 [ 72.870825471 -40.690686710 -171.010400000 ] +(0, 1) v01 [ 72.870608182 -40.580686925 -171.010400000 ] +(1, 0) v10 [ 72.760825686 -40.690904000 -171.010400000 ] +(1, 1) v11 [ 72.760608396 -40.580904215 -171.010400000 ] +surface axes: AXIS_D0Q2S2A1_S AXIS_D0Q2S2A1_F +AXIS_D0Q2S2A1_S has 8 ancestors +AXIS_D0Q2S2A1_F has 7 ancestors +axis AXIS_D0Q2S2A1_S index: 0 + equipment detector + depends_on AXIS_D0Q2S2A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S2A1_F index: 1 + equipment detector + depends_on FS_D0Q2S2A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S2A1 index: 2 + equipment detector + depends_on FS_D0Q2S2 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 180.11318 + rotation_axis FS_D0Q2S2 +axis FS_D0Q2S2 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [23.4746875, 10.7811, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 38 +(0, 0) v00 [ 94.654267517 -17.278822758 -171.010400000 ] +(0, 1) v01 [ 94.654419110 -17.168822862 -171.010400000 ] +(1, 0) v10 [ 94.544267622 -17.278671165 -171.010400000 ] +(1, 1) v11 [ 94.544419214 -17.168671270 -171.010400000 ] +surface axes: AXIS_D0Q2S3A0_S AXIS_D0Q2S3A0_F +AXIS_D0Q2S3A0_S has 8 ancestors +AXIS_D0Q2S3A0_F has 7 ancestors +axis AXIS_D0Q2S3A0_S index: 0 + equipment detector + depends_on AXIS_D0Q2S3A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S3A0_F index: 1 + equipment detector + depends_on FS_D0Q2S3A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S3A0 index: 2 + equipment detector + depends_on FS_D0Q2S3 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 179.92104 + rotation_axis FS_D0Q2S3 +axis FS_D0Q2S3 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [23.6220875, 34.2221, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 39 +(0, 0) v00 [ 72.984288095 -17.248959081 -171.010400000 ] +(0, 1) v01 [ 72.984439687 -17.138959185 -171.010400000 ] +(1, 0) v10 [ 72.874288200 -17.248807488 -171.010400000 ] +(1, 1) v11 [ 72.874439792 -17.138807593 -171.010400000 ] +surface axes: AXIS_D0Q2S3A1_S AXIS_D0Q2S3A1_F +AXIS_D0Q2S3A1_S has 8 ancestors +AXIS_D0Q2S3A1_F has 7 ancestors +axis AXIS_D0Q2S3A1_S index: 0 + equipment detector + depends_on AXIS_D0Q2S3A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S3A1_F index: 1 + equipment detector + depends_on FS_D0Q2S3A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S3A1 index: 2 + equipment detector + depends_on FS_D0Q2S3 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 179.92104 + rotation_axis FS_D0Q2S3 +axis FS_D0Q2S3 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [23.6220875, 34.2221, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 40 +(0, 0) v00 [ 50.536494130 -86.732539328 -171.010400000 ] +(0, 1) v01 [ 50.646491943 -86.733232874 -171.010400000 ] +(1, 0) v10 [ 50.537187675 -86.622541515 -171.010400000 ] +(1, 1) v11 [ 50.647185489 -86.623235060 -171.010400000 ] +surface axes: AXIS_D0Q2S4A0_S AXIS_D0Q2S4A0_F +AXIS_D0Q2S4A0_S has 8 ancestors +AXIS_D0Q2S4A0_F has 7 ancestors +axis AXIS_D0Q2S4A0_S index: 0 + equipment detector + depends_on AXIS_D0Q2S4A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S4A0_F index: 1 + equipment detector + depends_on FS_D0Q2S4A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S4A0 index: 2 + equipment detector + depends_on FS_D0Q2S4 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 89.63875 + rotation_axis FS_D0Q2S4 +axis FS_D0Q2S4 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [11.1953875, -23.9954, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 41 +(0, 0) v00 [ 50.673122616 -65.062970051 -171.010400000 ] +(0, 1) v01 [ 50.783120430 -65.063663597 -171.010400000 ] +(1, 0) v10 [ 50.673816162 -64.952972238 -171.010400000 ] +(1, 1) v11 [ 50.783813975 -64.953665783 -171.010400000 ] +surface axes: AXIS_D0Q2S4A1_S AXIS_D0Q2S4A1_F +AXIS_D0Q2S4A1_S has 8 ancestors +AXIS_D0Q2S4A1_F has 7 ancestors +axis AXIS_D0Q2S4A1_S index: 0 + equipment detector + depends_on AXIS_D0Q2S4A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S4A1_F index: 1 + equipment detector + depends_on FS_D0Q2S4A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S4A1 index: 2 + equipment detector + depends_on FS_D0Q2S4 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 89.63875 + rotation_axis FS_D0Q2S4 +axis FS_D0Q2S4 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [11.1953875, -23.9954, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 42 +(0, 0) v00 [ 73.906568443 -86.934892098 -171.010400000 ] +(0, 1) v01 [ 74.016566744 -86.935503494 -171.010400000 ] +(1, 0) v10 [ 73.907179840 -86.824893797 -171.010400000 ] +(1, 1) v11 [ 74.017178140 -86.825505194 -171.010400000 ] +surface axes: AXIS_D0Q2S5A0_S AXIS_D0Q2S5A0_F +AXIS_D0Q2S5A0_S has 8 ancestors +AXIS_D0Q2S5A0_F has 7 ancestors +axis AXIS_D0Q2S5A0_S index: 0 + equipment detector + depends_on AXIS_D0Q2S5A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S5A0_F index: 1 + equipment detector + depends_on FS_D0Q2S5A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S5A0 index: 2 + equipment detector + depends_on FS_D0Q2S5 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 89.68154 + rotation_axis FS_D0Q2S5 +axis FS_D0Q2S5 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [34.5494875, -24.1901, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 43 +(0, 0) v00 [ 74.027013487 -65.265226827 -171.010400000 ] +(0, 1) v01 [ 74.137011788 -65.265838223 -171.010400000 ] +(1, 0) v10 [ 74.027624883 -65.155228526 -171.010400000 ] +(1, 1) v11 [ 74.137623184 -65.155839922 -171.010400000 ] +surface axes: AXIS_D0Q2S5A1_S AXIS_D0Q2S5A1_F +AXIS_D0Q2S5A1_S has 8 ancestors +AXIS_D0Q2S5A1_F has 7 ancestors +axis AXIS_D0Q2S5A1_S index: 0 + equipment detector + depends_on AXIS_D0Q2S5A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S5A1_F index: 1 + equipment detector + depends_on FS_D0Q2S5A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S5A1 index: 2 + equipment detector + depends_on FS_D0Q2S5 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 89.68154 + rotation_axis FS_D0Q2S5 +axis FS_D0Q2S5 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [34.5494875, -24.1901, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 44 +(0, 0) v00 [ 47.531453982 -84.788402334 -171.010400000 ] +(0, 1) v01 [ 47.531771278 -84.678402792 -171.010400000 ] +(1, 0) v10 [ 47.421454440 -84.788085039 -171.010400000 ] +(1, 1) v11 [ 47.421771735 -84.678085497 -171.010400000 ] +surface axes: AXIS_D0Q2S6A0_S AXIS_D0Q2S6A0_F +AXIS_D0Q2S6A0_S has 8 ancestors +AXIS_D0Q2S6A0_F has 7 ancestors +axis AXIS_D0Q2S6A0_S index: 0 + equipment detector + depends_on AXIS_D0Q2S6A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S6A0_F index: 1 + equipment detector + depends_on FS_D0Q2S6A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S6A0 index: 2 + equipment detector + depends_on FS_D0Q2S6 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 179.83473 + rotation_axis FS_D0Q2S6 +axis FS_D0Q2S6 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-23.4854125, -33.2552, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 45 +(0, 0) v00 [ 25.861544134 -84.725895184 -171.010400000 ] +(0, 1) v01 [ 25.861861429 -84.615895641 -171.010400000 ] +(1, 0) v10 [ 25.751544591 -84.725577888 -171.010400000 ] +(1, 1) v11 [ 25.751861886 -84.615578346 -171.010400000 ] +surface axes: AXIS_D0Q2S6A1_S AXIS_D0Q2S6A1_F +AXIS_D0Q2S6A1_S has 8 ancestors +AXIS_D0Q2S6A1_F has 7 ancestors +axis AXIS_D0Q2S6A1_S index: 0 + equipment detector + depends_on AXIS_D0Q2S6A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S6A1_F index: 1 + equipment detector + depends_on FS_D0Q2S6A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S6A1 index: 2 + equipment detector + depends_on FS_D0Q2S6 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 179.83473 + rotation_axis FS_D0Q2S6 +axis FS_D0Q2S6 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-23.4854125, -33.2552, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 46 +(0, 0) v00 [ 47.721056429 -61.278616516 -171.010400000 ] +(0, 1) v01 [ 47.720879802 -61.168616658 -171.010400000 ] +(1, 0) v10 [ 47.611056571 -61.278793144 -171.010400000 ] +(1, 1) v11 [ 47.610879944 -61.168793285 -171.010400000 ] +surface axes: AXIS_D0Q2S7A0_S AXIS_D0Q2S7A0_F +AXIS_D0Q2S7A0_S has 8 ancestors +AXIS_D0Q2S7A0_F has 7 ancestors +axis AXIS_D0Q2S7A0_S index: 0 + equipment detector + depends_on AXIS_D0Q2S7A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S7A0_F index: 1 + equipment detector + depends_on FS_D0Q2S7A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S7A0 index: 2 + equipment detector + depends_on FS_D0Q2S7 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 180.092 + rotation_axis FS_D0Q2S7 +axis FS_D0Q2S7 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-23.3413125, -9.8417, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 47 +(0, 0) v00 [ 26.051084365 -61.313412083 -171.010400000 ] +(0, 1) v01 [ 26.050907738 -61.203412225 -171.010400000 ] +(1, 0) v10 [ 25.941084507 -61.313588711 -171.010400000 ] +(1, 1) v11 [ 25.940907880 -61.203588852 -171.010400000 ] +surface axes: AXIS_D0Q2S7A1_S AXIS_D0Q2S7A1_F +AXIS_D0Q2S7A1_S has 8 ancestors +AXIS_D0Q2S7A1_F has 7 ancestors +axis AXIS_D0Q2S7A1_S index: 0 + equipment detector + depends_on AXIS_D0Q2S7A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S7A1_F index: 1 + equipment detector + depends_on FS_D0Q2S7A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S7A1 index: 2 + equipment detector + depends_on FS_D0Q2S7 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 180.092 + rotation_axis FS_D0Q2S7 +axis FS_D0Q2S7 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-23.3413125, -9.8417, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [49.596146875, -41.351371875, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 48 +(0, 0) v00 [ 3.329649206 -48.878291032 -171.010400000 ] +(0, 1) v01 [ 3.329410452 -48.768291291 -171.010400000 ] +(1, 0) v10 [ 3.219649465 -48.878529786 -171.010400000 ] +(1, 1) v11 [ 3.219410711 -48.768530045 -171.010400000 ] +surface axes: AXIS_D0Q3S0A0_S AXIS_D0Q3S0A0_F +AXIS_D0Q3S0A0_S has 8 ancestors +AXIS_D0Q3S0A0_F has 7 ancestors +axis AXIS_D0Q3S0A0_S index: 0 + equipment detector + depends_on AXIS_D0Q3S0A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S0A0_F index: 1 + equipment detector + depends_on FS_D0Q3S0A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S0A0 index: 2 + equipment detector + depends_on FS_D0Q3S0 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 180.12436 + rotation_axis FS_D0Q3S0 +axis FS_D0Q3S0 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [23.1056375, 11.6367625, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 49 +(0, 0) v00 [ -18.340299751 -48.925325545 -171.010400000 ] +(0, 1) v01 [ -18.340538504 -48.815325804 -171.010400000 ] +(1, 0) v10 [ -18.450299491 -48.925564299 -171.010400000 ] +(1, 1) v11 [ -18.450538245 -48.815564558 -171.010400000 ] +surface axes: AXIS_D0Q3S0A1_S AXIS_D0Q3S0A1_F +AXIS_D0Q3S0A1_S has 8 ancestors +AXIS_D0Q3S0A1_F has 7 ancestors +axis AXIS_D0Q3S0A1_S index: 0 + equipment detector + depends_on AXIS_D0Q3S0A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S0A1_F index: 1 + equipment detector + depends_on FS_D0Q3S0A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S0A1 index: 2 + equipment detector + depends_on FS_D0Q3S0 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 180.12436 + rotation_axis FS_D0Q3S0 +axis FS_D0Q3S0 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [23.1056375, 11.6367625, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 50 +(0, 0) v00 [ 3.332398882 -25.574187263 -171.010400000 ] +(0, 1) v01 [ 3.332393833 -25.464187263 -171.010400000 ] +(1, 0) v10 [ 3.222398882 -25.574192312 -171.010400000 ] +(1, 1) v11 [ 3.222393833 -25.464192312 -171.010400000 ] +surface axes: AXIS_D0Q3S1A0_S AXIS_D0Q3S1A0_F +AXIS_D0Q3S1A0_S has 8 ancestors +AXIS_D0Q3S1A0_F has 7 ancestors +axis AXIS_D0Q3S1A0_S index: 0 + equipment detector + depends_on AXIS_D0Q3S1A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S1A0_F index: 1 + equipment detector + depends_on FS_D0Q3S1A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S1A0 index: 2 + equipment detector + depends_on FS_D0Q3S1 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 180.00263 + rotation_axis FS_D0Q3S1 +axis FS_D0Q3S1 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [23.1298375, 34.9864625, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 51 +(0, 0) v00 [ -18.337601095 -25.575181963 -171.010400000 ] +(0, 1) v01 [ -18.337606144 -25.465181963 -171.010400000 ] +(1, 0) v10 [ -18.447601095 -25.575187012 -171.010400000 ] +(1, 1) v11 [ -18.447606144 -25.465187012 -171.010400000 ] +surface axes: AXIS_D0Q3S1A1_S AXIS_D0Q3S1A1_F +AXIS_D0Q3S1A1_S has 8 ancestors +AXIS_D0Q3S1A1_F has 7 ancestors +axis AXIS_D0Q3S1A1_S index: 0 + equipment detector + depends_on AXIS_D0Q3S1A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S1A1_F index: 1 + equipment detector + depends_on FS_D0Q3S1A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S1A1 index: 2 + equipment detector + depends_on FS_D0Q3S1 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 180.00263 + rotation_axis FS_D0Q3S1 +axis FS_D0Q3S1 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [23.1298375, 34.9864625, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 52 +(0, 0) v00 [ -40.242605001 -95.553160040 -171.010400000 ] +(0, 1) v01 [ -40.132608365 -95.552299777 -171.010400000 ] +(1, 0) v10 [ -40.243465263 -95.443163404 -171.010400000 ] +(1, 1) v11 [ -40.133468627 -95.442303141 -171.010400000 ] +surface axes: AXIS_D0Q3S2A0_S AXIS_D0Q3S2A0_F +AXIS_D0Q3S2A0_S has 8 ancestors +AXIS_D0Q3S2A0_F has 7 ancestors +axis AXIS_D0Q3S2A0_S index: 0 + equipment detector + depends_on AXIS_D0Q3S2A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S2A0_F index: 1 + equipment detector + depends_on FS_D0Q3S2A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S2A0 index: 2 + equipment detector + depends_on FS_D0Q3S2 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 269.55191 + rotation_axis FS_D0Q3S2 +axis FS_D0Q3S2 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [10.9572375, -23.5830375, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 53 +(0, 0) v00 [ -40.412076669 -73.883822732 -171.010400000 ] +(0, 1) v01 [ -40.302080033 -73.882962470 -171.010400000 ] +(1, 0) v10 [ -40.412936931 -73.773826096 -171.010400000 ] +(1, 1) v11 [ -40.302940295 -73.772965834 -171.010400000 ] +surface axes: AXIS_D0Q3S2A1_S AXIS_D0Q3S2A1_F +AXIS_D0Q3S2A1_S has 8 ancestors +AXIS_D0Q3S2A1_F has 7 ancestors +axis AXIS_D0Q3S2A1_S index: 0 + equipment detector + depends_on AXIS_D0Q3S2A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S2A1_F index: 1 + equipment detector + depends_on FS_D0Q3S2A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S2A1 index: 2 + equipment detector + depends_on FS_D0Q3S2 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 269.55191 + rotation_axis FS_D0Q3S2 +axis FS_D0Q3S2 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [10.9572375, -23.5830375, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 54 +(0, 0) v00 [ -16.853197596 -95.418813608 -171.010400000 ] +(0, 1) v01 [ -16.743198711 -95.418318400 -171.010400000 ] +(1, 0) v10 [ -16.853692804 -95.308814722 -171.010400000 ] +(1, 1) v11 [ -16.743693918 -95.308319515 -171.010400000 ] +surface axes: AXIS_D0Q3S3A0_S AXIS_D0Q3S3A0_F +AXIS_D0Q3S3A0_S has 8 ancestors +AXIS_D0Q3S3A0_F has 7 ancestors +axis AXIS_D0Q3S3A0_S index: 0 + equipment detector + depends_on AXIS_D0Q3S3A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S3A0_F index: 1 + equipment detector + depends_on FS_D0Q3S3A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S3A0 index: 2 + equipment detector + depends_on FS_D0Q3S3 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 269.74206 + rotation_axis FS_D0Q3S3 +axis FS_D0Q3S3 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [34.4180375, -23.4818375, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 55 +(0, 0) v00 [ -16.950753489 -73.749033202 -171.010400000 ] +(0, 1) v01 [ -16.840754603 -73.748537994 -171.010400000 ] +(1, 0) v10 [ -16.951248696 -73.639034316 -171.010400000 ] +(1, 1) v11 [ -16.841249811 -73.638539109 -171.010400000 ] +surface axes: AXIS_D0Q3S3A1_S AXIS_D0Q3S3A1_F +AXIS_D0Q3S3A1_S has 8 ancestors +AXIS_D0Q3S3A1_F has 7 ancestors +axis AXIS_D0Q3S3A1_S index: 0 + equipment detector + depends_on AXIS_D0Q3S3A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S3A1_F index: 1 + equipment detector + depends_on FS_D0Q3S3A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S3A1 index: 2 + equipment detector + depends_on FS_D0Q3S3 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 269.74206 + rotation_axis FS_D0Q3S3 +axis FS_D0Q3S3 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [34.4180375, -23.4818375, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 56 +(0, 0) v00 [ -86.794315345 -51.787826357 -171.010400000 ] +(0, 1) v01 [ -86.794661477 -51.897825812 -171.010400000 ] +(1, 0) v10 [ -86.684315890 -51.788172488 -171.010400000 ] +(1, 1) v11 [ -86.684662021 -51.898171944 -171.010400000 ] +surface axes: AXIS_D0Q3S4A0_S AXIS_D0Q3S4A0_F +AXIS_D0Q3S4A0_S has 8 ancestors +AXIS_D0Q3S4A0_F has 7 ancestors +axis AXIS_D0Q3S4A0_S index: 0 + equipment detector + depends_on AXIS_D0Q3S4A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S4A0_F index: 1 + equipment detector + depends_on FS_D0Q3S4A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S4A0 index: 2 + equipment detector + depends_on FS_D0Q3S4 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 359.81971 + rotation_axis FS_D0Q3S4 +axis FS_D0Q3S4 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-24.1283625, -11.5336375, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 57 +(0, 0) v00 [ -65.124422627 -51.856014239 -171.010400000 ] +(0, 1) v01 [ -65.124768759 -51.966013694 -171.010400000 ] +(1, 0) v10 [ -65.014423172 -51.856360370 -171.010400000 ] +(1, 1) v11 [ -65.014769303 -51.966359826 -171.010400000 ] +surface axes: AXIS_D0Q3S4A1_S AXIS_D0Q3S4A1_F +AXIS_D0Q3S4A1_S has 8 ancestors +AXIS_D0Q3S4A1_F has 7 ancestors +axis AXIS_D0Q3S4A1_S index: 0 + equipment detector + depends_on AXIS_D0Q3S4A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S4A1_F index: 1 + equipment detector + depends_on FS_D0Q3S4A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S4A1 index: 2 + equipment detector + depends_on FS_D0Q3S4 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 359.81971 + rotation_axis FS_D0Q3S4 +axis FS_D0Q3S4 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-24.1283625, -11.5336375, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 58 +(0, 0) v00 [ -86.867858967 -75.276033861 -171.010400000 ] +(0, 1) v01 [ -86.867861213 -75.386033861 -171.010400000 ] +(1, 0) v10 [ -86.757858967 -75.276036107 -171.010400000 ] +(1, 1) v11 [ -86.757861213 -75.386036107 -171.010400000 ] +surface axes: AXIS_D0Q3S5A0_S AXIS_D0Q3S5A0_F +AXIS_D0Q3S5A0_S has 8 ancestors +AXIS_D0Q3S5A0_F has 7 ancestors +axis AXIS_D0Q3S5A0_S index: 0 + equipment detector + depends_on AXIS_D0Q3S5A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S5A0_F index: 1 + equipment detector + depends_on FS_D0Q3S5A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S5A0 index: 2 + equipment detector + depends_on FS_D0Q3S5 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 359.99883 + rotation_axis FS_D0Q3S5 +axis FS_D0Q3S5 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-24.1701625, -34.9548375, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 59 +(0, 0) v00 [ -65.197858971 -75.276476370 -171.010400000 ] +(0, 1) v01 [ -65.197861217 -75.386476370 -171.010400000 ] +(1, 0) v10 [ -65.087858971 -75.276478616 -171.010400000 ] +(1, 1) v11 [ -65.087861217 -75.386478616 -171.010400000 ] +surface axes: AXIS_D0Q3S5A1_S AXIS_D0Q3S5A1_F +AXIS_D0Q3S5A1_S has 8 ancestors +AXIS_D0Q3S5A1_F has 7 ancestors +axis AXIS_D0Q3S5A1_S index: 0 + equipment detector + depends_on AXIS_D0Q3S5A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S5A1_F index: 1 + equipment detector + depends_on FS_D0Q3S5A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S5A1 index: 2 + equipment detector + depends_on FS_D0Q3S5 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 359.99883 + rotation_axis FS_D0Q3S5 +axis FS_D0Q3S5 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [0.0, 0.0, 1.0] + offset [-24.1701625, -34.9548375, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 60 +(0, 0) v00 [ -84.554277708 -48.501581102 -171.010400000 ] +(0, 1) v01 [ -84.444279500 -48.500953291 -171.010400000 ] +(1, 0) v10 [ -84.554905519 -48.391582893 -171.010400000 ] +(1, 1) v11 [ -84.444907310 -48.390955083 -171.010400000 ] +surface axes: AXIS_D0Q3S6A0_S AXIS_D0Q3S6A0_F +AXIS_D0Q3S6A0_S has 8 ancestors +AXIS_D0Q3S6A0_F has 7 ancestors +axis AXIS_D0Q3S6A0_S index: 0 + equipment detector + depends_on AXIS_D0Q3S6A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S6A0_F index: 1 + equipment detector + depends_on FS_D0Q3S6A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S6A0 index: 2 + equipment detector + depends_on FS_D0Q3S6 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 269.67299 + rotation_axis FS_D0Q3S6 +axis FS_D0Q3S6 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-33.3089625, 23.4474625, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 61 +(0, 0) v00 [ -84.677956420 -26.831934045 -171.010400000 ] +(0, 1) v01 [ -84.567958212 -26.831306234 -171.010400000 ] +(1, 0) v10 [ -84.678584231 -26.721935836 -171.010400000 ] +(1, 1) v11 [ -84.568586023 -26.721308026 -171.010400000 ] +surface axes: AXIS_D0Q3S6A1_S AXIS_D0Q3S6A1_F +AXIS_D0Q3S6A1_S has 8 ancestors +AXIS_D0Q3S6A1_F has 7 ancestors +axis AXIS_D0Q3S6A1_S index: 0 + equipment detector + depends_on AXIS_D0Q3S6A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S6A1_F index: 1 + equipment detector + depends_on FS_D0Q3S6A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S6A1 index: 2 + equipment detector + depends_on FS_D0Q3S6 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 269.67299 + rotation_axis FS_D0Q3S6 +axis FS_D0Q3S6 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-33.3089625, 23.4474625, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 62 +(0, 0) v00 [ -61.249561180 -48.465923921 -171.010400000 ] +(0, 1) v01 [ -61.139562943 -48.465301141 -171.010400000 ] +(1, 0) v10 [ -61.250183961 -48.355925684 -171.010400000 ] +(1, 1) v11 [ -61.140185724 -48.355302904 -171.010400000 ] +surface axes: AXIS_D0Q3S7A0_S AXIS_D0Q3S7A0_F +AXIS_D0Q3S7A0_S has 8 ancestors +AXIS_D0Q3S7A0_F has 7 ancestors +axis AXIS_D0Q3S7A0_S index: 0 + equipment detector + depends_on AXIS_D0Q3S7A0_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S7A0_F index: 1 + equipment detector + depends_on FS_D0Q3S7A0 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S7A0 index: 2 + equipment detector + depends_on FS_D0Q3S7 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 269.67561 + rotation_axis FS_D0Q3S7 +axis FS_D0Q3S7 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-10.0032625, 23.4826625, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 63 +(0, 0) v00 [ -61.372248991 -26.796271231 -171.010400000 ] +(0, 1) v01 [ -61.262250754 -26.795648451 -171.010400000 ] +(1, 0) v10 [ -61.372871772 -26.686272994 -171.010400000 ] +(1, 1) v11 [ -61.262873535 -26.685650214 -171.010400000 ] +surface axes: AXIS_D0Q3S7A1_S AXIS_D0Q3S7A1_F +AXIS_D0Q3S7A1_S has 8 ancestors +AXIS_D0Q3S7A1_F has 7 ancestors +axis AXIS_D0Q3S7A1_S index: 0 + equipment detector + depends_on AXIS_D0Q3S7A1_F + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S7A1_F index: 1 + equipment detector + depends_on FS_D0Q3S7A1 + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [-10.615, 10.12, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S7A1 index: 2 + equipment detector + depends_on FS_D0Q3S7 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 269.67561 + rotation_axis FS_D0Q3S7 +axis FS_D0Q3S7 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.0, -0.0, -1.0] + offset [-10.0032625, 23.4826625, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-41.247903125, -50.441634375, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . diff --git a/py2cbf/fel_test3_orig.out b/py2cbf/fel_test3_orig.out new file mode 100644 index 00000000..efde67ea --- /dev/null +++ b/py2cbf/fel_test3_orig.out @@ -0,0 +1,4608 @@ +element: 0 +(0, 0) v00 [ -43.268864273 0.244454075 -104.897928069 ] +(0, 1) v01 [ -43.268949351 0.354453707 -104.898199635 ] +(1, 0) v10 [ -43.158864306 0.244539134 -104.897935968 ] +(1, 1) v11 [ -43.158949384 0.354538766 -104.898207534 ] +surface axes: AXIS_D0Q0S0A0_F AXIS_D0Q0S0A0_S +AXIS_D0Q0S0A0_F has 8 ancestors +AXIS_D0Q0S0A0_S has 7 ancestors +axis AXIS_D0Q0S0A0_F index: 0 + equipment detector + depends_on AXIS_D0Q0S0A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S0A0_S index: 1 + equipment detector + depends_on FS_D0Q0S0A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S0A0 index: 2 + equipment detector + depends_on FS_D0Q0S0 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S0 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [-0.00119851753497, 0.001269343806, 0.99999847616] + offset [11.84740625, -22.9244375, 0.04621875] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.95790625, 44.6816875, 0.00503125] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 1 +(0, 0) v00 [ 0.236365915 43.471610123 -104.799863774 ] +(0, 1) v01 [ 0.346365768 43.471779231 -104.799803142 ] +(1, 0) v10 [ 0.236535242 43.361610980 -104.800263662 ] +(1, 1) v11 [ 0.346535096 43.361780088 -104.800203031 ] +surface axes: AXIS_D0Q1S0A0_F AXIS_D0Q1S0A0_S +AXIS_D0Q1S0A0_F has 8 ancestors +AXIS_D0Q1S0A0_S has 7 ancestors +axis AXIS_D0Q1S0A0_F index: 0 + equipment detector + depends_on AXIS_D0Q1S0A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S0A0_S index: 1 + equipment detector + depends_on FS_D0Q1S0A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S0A0 index: 2 + equipment detector + depends_on FS_D0Q1S0 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S0 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.9121963574, -0.137590297876, 0.385962064815] + offset [-22.8013125, -11.7255625, 0.00853125] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [44.5583125, 45.0553125, 0.16946875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 2 +(0, 0) v00 [ 43.331041757 -0.179887182 -105.007586095 ] +(0, 1) v01 [ 43.330967354 -0.289887157 -105.007587359 ] +(1, 0) v10 [ 43.221041802 -0.179812780 -105.007520330 ] +(1, 1) v11 [ 43.220967399 -0.289812754 -105.007521594 ] +surface axes: AXIS_D0Q2S0A0_F AXIS_D0Q2S0A0_S +AXIS_D0Q2S0A0_F has 8 ancestors +AXIS_D0Q2S0A0_S has 7 ancestors +axis AXIS_D0Q2S0A0_F index: 0 + equipment detector + depends_on AXIS_D0Q2S0A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S0A0_S index: 1 + equipment detector + depends_on FS_D0Q2S0A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S0A0 index: 2 + equipment detector + depends_on FS_D0Q2S0 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S0 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [-0.000292981371778, 0.000304670304034, -0.999999910669] + offset [-11.98534375, 22.88215625, 0.00165625] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [45.12684375, -44.56015625, -0.00040625] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 3 +(0, 0) v00 [ -0.208968817 -43.238540374 -104.832298701 ] +(0, 1) v01 [ -0.318968630 -43.238717260 -104.832398506 ] +(1, 0) v10 [ -0.209145226 -43.128541762 -104.832822371 ] +(1, 1) v11 [ -0.319145039 -43.128718648 -104.832922176 ] +surface axes: AXIS_D0Q3S0A0_F AXIS_D0Q3S0A0_S +AXIS_D0Q3S0A0_F has 8 ancestors +AXIS_D0Q3S0A0_S has 7 ancestors +axis AXIS_D0Q3S0A0_F index: 0 + equipment detector + depends_on AXIS_D0Q3S0A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S0A0_S index: 1 + equipment detector + depends_on FS_D0Q3S0A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S0A0 index: 2 + equipment detector + depends_on FS_D0Q3S0 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S0 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.000455570499938, 0.00237996082126, 0.999997064117] + offset [22.8553125, 11.9615, -0.0604375] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.5855625, -45.05975, 0.1631875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 4 +(0, 0) v00 [ -43.285624548 21.914381556 -104.951426701 ] +(0, 1) v01 [ -43.285709626 22.024381187 -104.951698267 ] +(1, 0) v10 [ -43.175624581 21.914466614 -104.951434600 ] +(1, 1) v11 [ -43.175709659 22.024466246 -104.951706166 ] +surface axes: AXIS_D0Q0S0A1_F AXIS_D0Q0S0A1_S +AXIS_D0Q0S0A1_F has 8 ancestors +AXIS_D0Q0S0A1_S has 7 ancestors +axis AXIS_D0Q0S0A1_F index: 0 + equipment detector + depends_on AXIS_D0Q0S0A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S0A1_S index: 1 + equipment detector + depends_on FS_D0Q0S0A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S0A1 index: 2 + equipment detector + depends_on FS_D0Q0S0 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S0 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [-0.00119851753497, 0.001269343806, 0.99999847616] + offset [11.84740625, -22.9244375, 0.04621875] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.95790625, 44.6816875, 0.00503125] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 5 +(0, 0) v00 [ 21.906337016 43.504924371 -104.787919389 ] +(0, 1) v01 [ 22.016336869 43.505093479 -104.787858758 ] +(1, 0) v10 [ 21.906506343 43.394925228 -104.788319277 ] +(1, 1) v11 [ 22.016506196 43.395094336 -104.788258646 ] +surface axes: AXIS_D0Q1S0A1_F AXIS_D0Q1S0A1_S +AXIS_D0Q1S0A1_F has 8 ancestors +AXIS_D0Q1S0A1_S has 7 ancestors +axis AXIS_D0Q1S0A1_F index: 0 + equipment detector + depends_on AXIS_D0Q1S0A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S0A1_S index: 1 + equipment detector + depends_on FS_D0Q1S0A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S0A1 index: 2 + equipment detector + depends_on FS_D0Q1S0 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S0 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.9121963574, -0.137590297876, 0.385962064815] + offset [-22.8013125, -11.7255625, 0.00853125] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [44.5583125, 45.0553125, 0.16946875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 6 +(0, 0) v00 [ 43.316384249 -21.849882224 -105.007835098 ] +(0, 1) v01 [ 43.316309845 -21.959882199 -105.007836362 ] +(1, 0) v10 [ 43.206384293 -21.849807821 -105.007769334 ] +(1, 1) v11 [ 43.206309890 -21.959807796 -105.007770598 ] +surface axes: AXIS_D0Q2S0A1_F AXIS_D0Q2S0A1_S +AXIS_D0Q2S0A1_F has 8 ancestors +AXIS_D0Q2S0A1_S has 7 ancestors +axis AXIS_D0Q2S0A1_F index: 0 + equipment detector + depends_on AXIS_D0Q2S0A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S0A1_S index: 1 + equipment detector + depends_on FS_D0Q2S0A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S0A1 index: 2 + equipment detector + depends_on FS_D0Q2S0 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S0 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [-0.000292981371778, 0.000304670304034, -0.999999910669] + offset [-11.98534375, 22.88215625, 0.00165625] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [45.12684375, -44.56015625, -0.00040625] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 7 +(0, 0) v00 [ -21.878931880 -43.273386942 -104.851960234 ] +(0, 1) v01 [ -21.988931693 -43.273563829 -104.852060039 ] +(1, 0) v10 [ -21.879108289 -43.163388330 -104.852483904 ] +(1, 1) v11 [ -21.989108102 -43.163565217 -104.852583709 ] +surface axes: AXIS_D0Q3S0A1_F AXIS_D0Q3S0A1_S +AXIS_D0Q3S0A1_F has 8 ancestors +AXIS_D0Q3S0A1_S has 7 ancestors +axis AXIS_D0Q3S0A1_F index: 0 + equipment detector + depends_on AXIS_D0Q3S0A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S0A1_S index: 1 + equipment detector + depends_on FS_D0Q3S0A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S0A1 index: 2 + equipment detector + depends_on FS_D0Q3S0 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S0 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.000455570499938, 0.00237996082126, 0.999997064117] + offset [22.8553125, 11.9615, -0.0604375] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.5855625, -45.05975, 0.1631875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 8 +(0, 0) v00 [ -20.628421882 0.262868911 -104.939319945 ] +(0, 1) v01 [ -20.628442741 0.372868666 -104.939551082 ] +(1, 0) v10 [ -20.518421884 0.262889764 -104.939322570 ] +(1, 1) v11 [ -20.518442743 0.372889520 -104.939553707 ] +surface axes: AXIS_D0Q0S1A0_F AXIS_D0Q0S1A0_S +AXIS_D0Q0S1A0_F has 8 ancestors +AXIS_D0Q0S1A0_S has 7 ancestors +axis AXIS_D0Q0S1A0_F index: 0 + equipment detector + depends_on AXIS_D0Q0S1A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S1A0_S index: 1 + equipment detector + depends_on FS_D0Q0S1A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S1A0 index: 2 + equipment detector + depends_on FS_D0Q0S1 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S1 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [-0.00103869542788, 0.00106235325338, 0.999998896258] + offset [34.50040625, -22.9119375, 0.01321875] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.95790625, 44.6816875, 0.00503125] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 9 +(0, 0) v00 [ 0.270342182 20.626408905 -104.912764169 ] +(0, 1) v01 [ 0.380342148 20.626383295 -104.912682051 ] +(1, 0) v10 [ 0.270316932 20.516409961 -104.913245681 ] +(1, 1) v11 [ 0.380316898 20.516384352 -104.913163563 ] +surface axes: AXIS_D0Q1S1A0_F AXIS_D0Q1S1A0_S +AXIS_D0Q1S1A0_F has 8 ancestors +AXIS_D0Q1S1A0_S has 7 ancestors +axis AXIS_D0Q1S1A0_F index: 0 + equipment detector + depends_on AXIS_D0Q1S1A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S1A0_S index: 1 + equipment detector + depends_on FS_D0Q1S1A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S1A0 index: 2 + equipment detector + depends_on FS_D0Q1S1 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S1 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.984414920897, -0.168000905029, -0.051989993514] + offset [-22.7853125, -34.6088125, -0.10771875] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [44.5583125, 45.0553125, 0.16946875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 10 +(0, 0) v00 [ 20.635675048 -0.358506599 -105.045265324 ] +(0, 1) v01 [ 20.635209401 -0.468505562 -105.045159267 ] +(1, 0) v10 [ 20.525676223 -0.358041151 -105.045470393 ] +(1, 1) v11 [ 20.525210577 -0.468040115 -105.045364336 ] +surface axes: AXIS_D0Q2S1A0_F AXIS_D0Q2S1A0_S +AXIS_D0Q2S1A0_F has 8 ancestors +AXIS_D0Q2S1A0_S has 7 ancestors +axis AXIS_D0Q2S1A0_F index: 0 + equipment detector + depends_on AXIS_D0Q2S1A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S1A0_S index: 1 + equipment detector + depends_on FS_D0Q2S1A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S1A0 index: 2 + equipment detector + depends_on FS_D0Q2S1 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S1 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.000446114950845, -0.00141217059297, -0.999998903377] + offset [-34.75709375, 22.73990625, -0.04009375] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [45.12684375, -44.56015625, -0.00040625] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 11 +(0, 0) v00 [ -0.239238918 -20.627912406 -104.894953479 ] +(0, 1) v01 [ -0.349238837 -20.628037291 -104.895000226 ] +(1, 0) v10 [ -0.239363533 -20.517914274 -104.895582207 ] +(1, 1) v11 [ -0.349363452 -20.518039158 -104.895628955 ] +surface axes: AXIS_D0Q3S1A0_F AXIS_D0Q3S1A0_S +AXIS_D0Q3S1A0_F has 8 ancestors +AXIS_D0Q3S1A0_S has 7 ancestors +axis AXIS_D0Q3S1A0_F index: 0 + equipment detector + depends_on AXIS_D0Q3S1A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S1A0_S index: 1 + equipment detector + depends_on FS_D0Q3S1A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S1A0 index: 2 + equipment detector + depends_on FS_D0Q3S1 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S1 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.000214109382229, 0.00285774944096, 0.999995893704] + offset [22.8298125, 34.58225, -0.1224375] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.5855625, -45.05975, 0.1631875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 12 +(0, 0) v00 [ -20.632531103 21.932820682 -104.984853937 ] +(0, 1) v01 [ -20.632551962 22.042820437 -104.985085074 ] +(1, 0) v10 [ -20.522531105 21.932841536 -104.984856562 ] +(1, 1) v11 [ -20.522551964 22.042841291 -104.985087699 ] +surface axes: AXIS_D0Q0S1A1_F AXIS_D0Q0S1A1_S +AXIS_D0Q0S1A1_F has 8 ancestors +AXIS_D0Q0S1A1_S has 7 ancestors +axis AXIS_D0Q0S1A1_F index: 0 + equipment detector + depends_on AXIS_D0Q0S1A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S1A1_S index: 1 + equipment detector + depends_on FS_D0Q0S1A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S1A1 index: 2 + equipment detector + depends_on FS_D0Q0S1 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S1 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [-0.00103869542788, 0.00106235325338, 0.999998896258] + offset [34.50040625, -22.9119375, 0.01321875] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.95790625, 44.6816875, 0.00503125] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 13 +(0, 0) v00 [ 21.940335556 20.621363833 -104.896586937 ] +(0, 1) v01 [ 22.050335522 20.621338224 -104.896504819 ] +(1, 0) v10 [ 21.940310306 20.511364890 -104.897068450 ] +(1, 1) v11 [ 22.050310273 20.511339280 -104.896986332 ] +surface axes: AXIS_D0Q1S1A1_F AXIS_D0Q1S1A1_S +AXIS_D0Q1S1A1_F has 8 ancestors +AXIS_D0Q1S1A1_S has 7 ancestors +axis AXIS_D0Q1S1A1_F index: 0 + equipment detector + depends_on AXIS_D0Q1S1A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S1A1_S index: 1 + equipment detector + depends_on FS_D0Q1S1A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S1A1 index: 2 + equipment detector + depends_on FS_D0Q1S1 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S1 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.984414920897, -0.168000905029, -0.051989993514] + offset [-22.7853125, -34.6088125, -0.10771875] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [44.5583125, 45.0553125, 0.16946875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 14 +(0, 0) v00 [ 20.543942761 -22.028302368 -105.024372087 ] +(0, 1) v01 [ 20.543477115 -22.138301331 -105.024266030 ] +(1, 0) v10 [ 20.433943937 -22.027836920 -105.024577156 ] +(1, 1) v11 [ 20.433478291 -22.137835883 -105.024471099 ] +surface axes: AXIS_D0Q2S1A1_F AXIS_D0Q2S1A1_S +AXIS_D0Q2S1A1_F has 8 ancestors +AXIS_D0Q2S1A1_S has 7 ancestors +axis AXIS_D0Q2S1A1_F index: 0 + equipment detector + depends_on AXIS_D0Q2S1A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S1A1_S index: 1 + equipment detector + depends_on FS_D0Q2S1A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S1A1 index: 2 + equipment detector + depends_on FS_D0Q2S1 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S1 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.000446114950845, -0.00141217059297, -0.999998903377] + offset [-34.75709375, 22.73990625, -0.04009375] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [45.12684375, -44.56015625, -0.00040625] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 15 +(0, 0) v00 [ -21.909222995 -20.652514590 -104.904162707 ] +(0, 1) v01 [ -22.019222914 -20.652639474 -104.904209454 ] +(1, 0) v10 [ -21.909347610 -20.542516457 -104.904791436 ] +(1, 1) v11 [ -22.019347529 -20.542641342 -104.904838183 ] +surface axes: AXIS_D0Q3S1A1_F AXIS_D0Q3S1A1_S +AXIS_D0Q3S1A1_F has 8 ancestors +AXIS_D0Q3S1A1_S has 7 ancestors +axis AXIS_D0Q3S1A1_F index: 0 + equipment detector + depends_on AXIS_D0Q3S1A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S1A1_S index: 1 + equipment detector + depends_on FS_D0Q3S1A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S1A1 index: 2 + equipment detector + depends_on FS_D0Q3S1 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S1 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.000214109382229, 0.00285774944096, 0.999995893704] + offset [22.8298125, 34.58225, -0.1224375] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.5855625, -45.05975, 0.1631875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 16 +(0, 0) v00 [ -89.777295492 43.645315287 -105.086036396 ] +(0, 1) v01 [ -89.667295655 43.645286732 -105.085849464 ] +(1, 0) v10 [ -89.777324387 43.535315472 -105.085836490 ] +(1, 1) v11 [ -89.667324549 43.535286917 -105.085649559 ] +surface axes: AXIS_D0Q0S2A0_F AXIS_D0Q0S2A0_S +AXIS_D0Q0S2A0_F has 8 ancestors +AXIS_D0Q0S2A0_S has 7 ancestors +axis AXIS_D0Q0S2A0_F index: 0 + equipment detector + depends_on AXIS_D0Q0S2A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S2A0_S index: 1 + equipment detector + depends_on FS_D0Q0S2A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S2A0 index: 2 + equipment detector + depends_on FS_D0Q0S2 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S2 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [-0.726510433286, -0.679181441997, -0.10437987916] + offset [-23.31709375, -11.2169375, -0.03303125] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.95790625, 44.6816875, 0.00503125] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 17 +(0, 0) v00 [ 43.594988404 89.668071393 -104.709324456 ] +(0, 1) v01 [ 43.595040869 89.558071498 -104.709467206 ] +(1, 0) v10 [ 43.484988455 89.668019048 -104.709416542 ] +(1, 1) v11 [ 43.485040920 89.558019153 -104.709559292 ] +surface axes: AXIS_D0Q1S2A0_F AXIS_D0Q1S2A0_S +AXIS_D0Q1S2A0_F has 8 ancestors +AXIS_D0Q1S2A0_S has 7 ancestors +axis AXIS_D0Q1S2A0_F index: 0 + equipment detector + depends_on AXIS_D0Q1S2A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S2A0_S index: 1 + equipment detector + depends_on FS_D0Q1S2A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S2A0 index: 2 + equipment detector + depends_on FS_D0Q1S2 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S2 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.00106763504262, 0.000230599116836, -0.99999940349] + offset [-11.1280625, 23.1029375, 0.08778125] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [44.5583125, 45.0553125, 0.16946875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 18 +(0, 0) v00 [ 89.915184154 -43.499814708 -104.952217873 ] +(0, 1) v01 [ 89.805186605 -43.499108649 -104.952016011 ] +(1, 0) v10 [ 89.915890496 -43.389817084 -104.952063777 ] +(1, 1) v11 [ 89.805892947 -43.389111025 -104.951861915 ] +surface axes: AXIS_D0Q2S2A0_F AXIS_D0Q2S2A0_S +AXIS_D0Q2S2A0_F has 8 ancestors +AXIS_D0Q2S2A0_S has 7 ancestors +axis AXIS_D0Q2S2A0_F index: 0 + equipment detector + depends_on AXIS_D0Q2S2A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S2A0_S index: 1 + equipment detector + depends_on FS_D0Q2S2A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S2A0 index: 2 + equipment detector + depends_on FS_D0Q2S2 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S2 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.000915306099233, -0.00070338214954, 0.999999333734] + offset [23.34915625, 11.37315625, 0.10490625] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [45.12684375, -44.56015625, -0.00040625] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 19 +(0, 0) v00 [ -43.239961998 -90.017488389 -104.656970434 ] +(0, 1) v01 [ -43.240616001 -89.907490918 -104.657329185 ] +(1, 0) v10 [ -43.129963950 -90.016834521 -104.657012529 ] +(1, 1) v11 [ -43.130617952 -89.906837050 -104.657371280 ] +surface axes: AXIS_D0Q3S2A0_F AXIS_D0Q3S2A0_S +AXIS_D0Q3S2A0_F has 8 ancestors +AXIS_D0Q3S2A0_S has 7 ancestors +axis AXIS_D0Q3S2A0_F index: 0 + equipment detector + depends_on AXIS_D0Q3S2A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S2A0_S index: 1 + equipment detector + depends_on FS_D0Q3S2A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S2A0 index: 2 + equipment detector + depends_on FS_D0Q3S2 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S2 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.0014404772615, 0.00181236123537, 0.999997320182] + offset [11.3925625, -23.39275, 0.1088125] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.5855625, -45.05975, 0.1631875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 20 +(0, 0) v00 [ -68.107327513 43.639690015 -105.049210875 ] +(0, 1) v01 [ -67.997327675 43.639661460 -105.049023943 ] +(1, 0) v10 [ -68.107356407 43.529690200 -105.049010969 ] +(1, 1) v11 [ -67.997356570 43.529661645 -105.048824038 ] +surface axes: AXIS_D0Q0S2A1_F AXIS_D0Q0S2A1_S +AXIS_D0Q0S2A1_F has 8 ancestors +AXIS_D0Q0S2A1_S has 7 ancestors +axis AXIS_D0Q0S2A1_F index: 0 + equipment detector + depends_on AXIS_D0Q0S2A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S2A1_S index: 1 + equipment detector + depends_on FS_D0Q0S2A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S2A1 index: 2 + equipment detector + depends_on FS_D0Q0S2 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S2 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [-0.726510433286, -0.679181441997, -0.10437987916] + offset [-23.31709375, -11.2169375, -0.03303125] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.95790625, 44.6816875, 0.00503125] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 21 +(0, 0) v00 [ 43.605323980 67.998092105 -104.737446168 ] +(0, 1) v01 [ 43.605376445 67.888092210 -104.737588917 ] +(1, 0) v10 [ 43.495324031 67.998039760 -104.737538254 ] +(1, 1) v11 [ 43.495376496 67.888039865 -104.737681003 ] +surface axes: AXIS_D0Q1S2A1_F AXIS_D0Q1S2A1_S +AXIS_D0Q1S2A1_F has 8 ancestors +AXIS_D0Q1S2A1_S has 7 ancestors +axis AXIS_D0Q1S2A1_F index: 0 + equipment detector + depends_on AXIS_D0Q1S2A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S2A1_S index: 1 + equipment detector + depends_on FS_D0Q1S2A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S2A1 index: 2 + equipment detector + depends_on FS_D0Q1S2 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S2 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.00106763504262, 0.000230599116836, -0.99999940349] + offset [-11.1280625, 23.1029375, 0.08778125] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [44.5583125, 45.0553125, 0.16946875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 22 +(0, 0) v00 [ 68.245667049 -43.360721153 -104.912451086 ] +(0, 1) v01 [ 68.135669500 -43.360015094 -104.912249224 ] +(1, 0) v10 [ 68.246373391 -43.250723529 -104.912296990 ] +(1, 1) v11 [ 68.136375842 -43.250017470 -104.912095128 ] +surface axes: AXIS_D0Q2S2A1_F AXIS_D0Q2S2A1_S +AXIS_D0Q2S2A1_F has 8 ancestors +AXIS_D0Q2S2A1_S has 7 ancestors +axis AXIS_D0Q2S2A1_F index: 0 + equipment detector + depends_on AXIS_D0Q2S2A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S2A1_S index: 1 + equipment detector + depends_on FS_D0Q2S2A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S2A1 index: 2 + equipment detector + depends_on FS_D0Q2S2 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S2 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.000915306099233, -0.00070338214954, 0.999999333734] + offset [23.34915625, 11.37315625, 0.10490625] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [45.12684375, -44.56015625, -0.00040625] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 23 +(0, 0) v00 [ -43.368800494 -68.347986645 -104.727644319 ] +(0, 1) v01 [ -43.369454497 -68.237989174 -104.728003070 ] +(1, 0) v10 [ -43.258802446 -68.347332776 -104.727686415 ] +(1, 1) v11 [ -43.259456448 -68.237335306 -104.728045165 ] +surface axes: AXIS_D0Q3S2A1_F AXIS_D0Q3S2A1_S +AXIS_D0Q3S2A1_F has 8 ancestors +AXIS_D0Q3S2A1_S has 7 ancestors +axis AXIS_D0Q3S2A1_F index: 0 + equipment detector + depends_on AXIS_D0Q3S2A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S2A1_S index: 1 + equipment detector + depends_on FS_D0Q3S2A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S2A1 index: 2 + equipment detector + depends_on FS_D0Q3S2 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S2 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.0014404772615, 0.00181236123537, 0.999997320182] + offset [11.3925625, -23.39275, 0.1088125] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.5855625, -45.05975, 0.1631875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 24 +(0, 0) v00 [ -89.799274461 20.956162190 -105.040469385 ] +(0, 1) v01 [ -89.689274781 20.956103802 -105.040210524 ] +(1, 0) v10 [ -89.799332980 20.846162219 -105.040414118 ] +(1, 1) v11 [ -89.689333300 20.846103831 -105.040155258 ] +surface axes: AXIS_D0Q0S3A0_F AXIS_D0Q0S3A0_S +AXIS_D0Q0S3A0_F has 8 ancestors +AXIS_D0Q0S3A0_S has 7 ancestors +axis AXIS_D0Q0S3A0_F index: 0 + equipment detector + depends_on AXIS_D0Q0S3A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S3A0_S index: 1 + equipment detector + depends_on FS_D0Q0S3A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S3A0 index: 2 + equipment detector + depends_on FS_D0Q0S3 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S3 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [-0.204135389798, -0.954897355881, -0.215638081894] + offset [-23.34184375, -33.9119375, 0.01321875] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.95790625, 44.6816875, 0.00503125] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 25 +(0, 0) v00 [ 20.788787967 89.695536067 -104.715966053 ] +(0, 1) v01 [ 20.788864428 89.585536165 -104.716091117 ] +(1, 0) v10 [ 20.678788119 89.695459795 -104.716131825 ] +(1, 1) v11 [ 20.678864579 89.585459893 -104.716256889 ] +surface axes: AXIS_D0Q1S3A0_F AXIS_D0Q1S3A0_S +AXIS_D0Q1S3A0_F has 8 ancestors +AXIS_D0Q1S3A0_S has 7 ancestors +axis AXIS_D0Q1S3A0_F index: 0 + equipment detector + depends_on AXIS_D0Q1S3A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S3A0_S index: 1 + equipment detector + depends_on FS_D0Q1S3A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S3A0 index: 2 + equipment detector + depends_on FS_D0Q1S3 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S3 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.00132250659518, -0.000184643470589, -0.999999108441] + offset [-33.9295625, 23.1281875, 0.07778125] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [44.5583125, 45.0553125, 0.16946875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 26 +(0, 0) v00 [ 89.999993235 -20.836797748 -105.043716950 ] +(0, 1) v01 [ 89.889993401 -20.836670838 -105.043574214 ] +(1, 0) v10 [ 90.000119984 -20.726797890 -105.043840604 ] +(1, 1) v11 [ 89.890120150 -20.726670980 -105.043697868 ] +surface axes: AXIS_D0Q2S3A0_F AXIS_D0Q2S3A0_S +AXIS_D0Q2S3A0_F has 8 ancestors +AXIS_D0Q2S3A0_S has 7 ancestors +axis AXIS_D0Q2S3A0_F index: 0 + equipment detector + depends_on AXIS_D0Q2S3A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S3A0_S index: 1 + equipment detector + depends_on FS_D0Q2S3A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S3A0 index: 2 + equipment detector + depends_on FS_D0Q2S3 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S3 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.00064912454537, 0.000561687576284, 0.999999631572] + offset [23.37990625, 33.92315625, -0.02384375] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [45.12684375, -44.56015625, -0.00040625] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 27 +(0, 0) v00 [ -21.072902234 -89.924914902 -104.676673314 ] +(0, 1) v01 [ -21.072937258 -89.814915305 -104.676968921 ] +(1, 0) v10 [ -20.962902241 -89.924879835 -104.676657483 ] +(1, 1) v11 [ -20.962937265 -89.814880238 -104.676953089 ] +surface axes: AXIS_D0Q3S3A0_F AXIS_D0Q3S3A0_S +AXIS_D0Q3S3A0_F has 8 ancestors +AXIS_D0Q3S3A0_S has 7 ancestors +axis AXIS_D0Q3S3A0_F index: 0 + equipment detector + depends_on AXIS_D0Q3S3A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S3A0_S index: 1 + equipment detector + depends_on FS_D0Q3S3A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S3A0 index: 2 + equipment detector + depends_on FS_D0Q3S3 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S3 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.00141560507691, 0.00127127717988, 0.999998189957] + offset [33.6808125, -23.357, 0.1068125] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.5855625, -45.05975, 0.1631875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 28 +(0, 0) v00 [ -68.129337517 20.944659694 -104.989473868 ] +(0, 1) v01 [ -68.019337837 20.944601305 -104.989215008 ] +(1, 0) v10 [ -68.129396036 20.834659723 -104.989418602 ] +(1, 1) v11 [ -68.019396356 20.834601335 -104.989159741 ] +surface axes: AXIS_D0Q0S3A1_F AXIS_D0Q0S3A1_S +AXIS_D0Q0S3A1_F has 8 ancestors +AXIS_D0Q0S3A1_S has 7 ancestors +axis AXIS_D0Q0S3A1_F index: 0 + equipment detector + depends_on AXIS_D0Q0S3A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S3A1_S index: 1 + equipment detector + depends_on FS_D0Q0S3A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S3A1 index: 2 + equipment detector + depends_on FS_D0Q0S3 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S3 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [-0.204135389798, -0.954897355881, -0.215638081894] + offset [-23.34184375, -33.9119375, 0.01321875] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.95790625, 44.6816875, 0.00503125] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 29 +(0, 0) v00 [ 20.803850691 68.025555308 -104.740603652 ] +(0, 1) v01 [ 20.803927151 67.915555405 -104.740728715 ] +(1, 0) v10 [ 20.693850842 68.025479036 -104.740769424 ] +(1, 1) v11 [ 20.693927302 67.915479133 -104.740894488 ] +surface axes: AXIS_D0Q1S3A1_F AXIS_D0Q1S3A1_S +AXIS_D0Q1S3A1_F has 8 ancestors +AXIS_D0Q1S3A1_S has 7 ancestors +axis AXIS_D0Q1S3A1_F index: 0 + equipment detector + depends_on AXIS_D0Q1S3A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S3A1_S index: 1 + equipment detector + depends_on FS_D0Q1S3A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S3A1 index: 2 + equipment detector + depends_on FS_D0Q1S3 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S3 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.00132250659518, -0.000184643470589, -0.999999108441] + offset [-33.9295625, 23.1281875, 0.07778125] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [44.5583125, 45.0553125, 0.16946875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 30 +(0, 0) v00 [ 68.330025901 -20.811796451 -105.015597946 ] +(0, 1) v01 [ 68.220026067 -20.811669541 -105.015455210 ] +(1, 0) v10 [ 68.330152650 -20.701796594 -105.015721600 ] +(1, 1) v11 [ 68.220152816 -20.701669684 -105.015578864 ] +surface axes: AXIS_D0Q2S3A1_F AXIS_D0Q2S3A1_S +AXIS_D0Q2S3A1_F has 8 ancestors +AXIS_D0Q2S3A1_S has 7 ancestors +axis AXIS_D0Q2S3A1_F index: 0 + equipment detector + depends_on AXIS_D0Q2S3A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S3A1_S index: 1 + equipment detector + depends_on FS_D0Q2S3A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S3A1 index: 2 + equipment detector + depends_on FS_D0Q2S3 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S3 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.00064912454537, 0.000561687576284, 0.999999631572] + offset [23.37990625, 33.92315625, -0.02384375] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [45.12684375, -44.56015625, -0.00040625] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 31 +(0, 0) v00 [ -21.079801913 -68.254994248 -104.734907825 ] +(0, 1) v01 [ -21.079836937 -68.144994651 -104.735203431 ] +(1, 0) v10 [ -20.969801920 -68.254959182 -104.734891993 ] +(1, 1) v11 [ -20.969836944 -68.144959585 -104.735187600 ] +surface axes: AXIS_D0Q3S3A1_F AXIS_D0Q3S3A1_S +AXIS_D0Q3S3A1_F has 8 ancestors +AXIS_D0Q3S3A1_S has 7 ancestors +axis AXIS_D0Q3S3A1_F index: 0 + equipment detector + depends_on AXIS_D0Q3S3A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S3A1_S index: 1 + equipment detector + depends_on FS_D0Q3S3A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S3A1 index: 2 + equipment detector + depends_on FS_D0Q3S3 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S3 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.00141560507691, 0.00127127717988, 0.999998189957] + offset [33.6808125, -23.357, 0.1068125] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.5855625, -45.05975, 0.1631875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 32 +(0, 0) v00 [ -46.511435398 90.044014861 -104.900016657 ] +(0, 1) v01 [ -46.510891638 89.934016419 -104.900233635 ] +(1, 0) v10 [ -46.621433989 90.043470867 -104.899898432 ] +(1, 1) v11 [ -46.620890229 89.933472425 -104.900115410 ] +surface axes: AXIS_D0Q0S4A0_F AXIS_D0Q0S4A0_S +AXIS_D0Q0S4A0_F has 8 ancestors +AXIS_D0Q0S4A0_S has 7 ancestors +axis AXIS_D0Q0S4A0_F index: 0 + equipment detector + depends_on AXIS_D0Q0S4A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S4A0_S index: 1 + equipment detector + depends_on FS_D0Q0S4A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S4A0 index: 2 + equipment detector + depends_on FS_D0Q0S4 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S4 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.000446211609729, 0.0015285403289, -0.999998732229] + offset [-11.62209375, 23.8073125, 0.06646875] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.95790625, 44.6816875, 0.00503125] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 33 +(0, 0) v00 [ 89.853997542 46.774744869 -104.840615395 ] +(0, 1) v01 [ 89.743997557 46.774744920 -104.840672234 ] +(1, 0) v10 [ 89.853997538 46.884744816 -104.840507531 ] +(1, 1) v11 [ 89.743997553 46.884744867 -104.840564370 ] +surface axes: AXIS_D0Q1S4A0_F AXIS_D0Q1S4A0_S +AXIS_D0Q1S4A0_F has 8 ancestors +AXIS_D0Q1S4A0_S has 7 ancestors +axis AXIS_D0Q1S4A0_F index: 0 + equipment detector + depends_on AXIS_D0Q1S4A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S4A0_S index: 1 + equipment detector + depends_on FS_D0Q1S4A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S4A0 index: 2 + equipment detector + depends_on FS_D0Q1S4 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S4 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [-0.000258358886012, -0.000490290302599, 0.999999846433] + offset [23.7906875, 11.8944375, -0.00821875] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [44.5583125, 45.0553125, 0.16946875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 34 +(0, 0) v00 [ 47.008871463 -89.844988855 -105.037277518 ] +(0, 1) v01 [ 47.008554133 -89.734989338 -105.037202992 ] +(1, 0) v10 [ 47.118870561 -89.844671738 -105.036964460 ] +(1, 1) v11 [ 47.118553231 -89.734672221 -105.036889935 ] +surface axes: AXIS_D0Q2S4A0_F AXIS_D0Q2S4A0_S +AXIS_D0Q2S4A0_F has 8 ancestors +AXIS_D0Q2S4A0_S has 7 ancestors +axis AXIS_D0Q2S4A0_F index: 0 + equipment detector + depends_on AXIS_D0Q2S4A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S4A0_S index: 1 + equipment detector + depends_on FS_D0Q2S4A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S4A0 index: 2 + equipment detector + depends_on FS_D0Q2S4 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S4 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [-0.00108013700666, -0.00176076369873, 0.999997866505] + offset [11.99490625, -23.75059375, 0.00965625] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [45.12684375, -44.56015625, -0.00040625] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 35 +(0, 0) v00 [ -90.097764910 -46.794987844 -104.848059138 ] +(0, 1) v01 [ -89.987765252 -46.794748943 -104.847923980 ] +(1, 0) v10 [ -90.097526187 -46.904987490 -104.847914426 ] +(1, 1) v11 [ -89.987526529 -46.904748589 -104.847779268 ] +surface axes: AXIS_D0Q3S4A0_F AXIS_D0Q3S4A0_S +AXIS_D0Q3S4A0_F has 8 ancestors +AXIS_D0Q3S4A0_S has 7 ancestors +axis AXIS_D0Q3S4A0_F index: 0 + equipment detector + depends_on AXIS_D0Q3S4A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S4A0_S index: 1 + equipment detector + depends_on FS_D0Q3S4A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S4A0 index: 2 + equipment detector + depends_on FS_D0Q3S4 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S4 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.46599746509, -0.43618149564, 0.769800016492] + offset [-23.9851875, -11.8635, 0.0315625] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.5855625, -45.05975, 0.1631875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 36 +(0, 0) v00 [ -46.404314662 68.374321784 -104.942761318 ] +(0, 1) v01 [ -46.403770902 68.264323342 -104.942978296 ] +(1, 0) v10 [ -46.514313254 68.373777790 -104.942643093 ] +(1, 1) v11 [ -46.513769494 68.263779348 -104.942860071 ] +surface axes: AXIS_D0Q0S4A1_F AXIS_D0Q0S4A1_S +AXIS_D0Q0S4A1_F has 8 ancestors +AXIS_D0Q0S4A1_S has 7 ancestors +axis AXIS_D0Q0S4A1_F index: 0 + equipment detector + depends_on AXIS_D0Q0S4A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S4A1_S index: 1 + equipment detector + depends_on FS_D0Q0S4A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S4A1 index: 2 + equipment detector + depends_on FS_D0Q0S4 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S4 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.000446211609729, 0.0015285403289, -0.999998732229] + offset [-11.62209375, 23.8073125, 0.06646875] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.95790625, 44.6816875, 0.00503125] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 37 +(0, 0) v00 [ 68.184000435 46.774754969 -104.851812665 ] +(0, 1) v01 [ 68.074000450 46.774755020 -104.851869504 ] +(1, 0) v10 [ 68.184000431 46.884754916 -104.851704801 ] +(1, 1) v11 [ 68.074000445 46.884754967 -104.851761640 ] +surface axes: AXIS_D0Q1S4A1_F AXIS_D0Q1S4A1_S +AXIS_D0Q1S4A1_F has 8 ancestors +AXIS_D0Q1S4A1_S has 7 ancestors +axis AXIS_D0Q1S4A1_F index: 0 + equipment detector + depends_on AXIS_D0Q1S4A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S4A1_S index: 1 + equipment detector + depends_on FS_D0Q1S4A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S4A1 index: 2 + equipment detector + depends_on FS_D0Q1S4 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S4 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [-0.000258358886012, -0.000490290302599, 0.999999846433] + offset [23.7906875, 11.8944375, -0.00821875] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [44.5583125, 45.0553125, 0.16946875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 38 +(0, 0) v00 [ 46.946357494 -68.175083999 -105.022595997 ] +(0, 1) v01 [ 46.946040165 -68.065084482 -105.022521472 ] +(1, 0) v10 [ 47.056356592 -68.174766883 -105.022282940 ] +(1, 1) v11 [ 47.056039262 -68.064767366 -105.022208414 ] +surface axes: AXIS_D0Q2S4A1_F AXIS_D0Q2S4A1_S +AXIS_D0Q2S4A1_F has 8 ancestors +AXIS_D0Q2S4A1_S has 7 ancestors +axis AXIS_D0Q2S4A1_F index: 0 + equipment detector + depends_on AXIS_D0Q2S4A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S4A1_S index: 1 + equipment detector + depends_on FS_D0Q2S4A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S4A1 index: 2 + equipment detector + depends_on FS_D0Q2S4 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S4 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [-0.00108013700666, -0.00176076369873, 0.999997866505] + offset [11.99490625, -23.75059375, 0.00965625] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [45.12684375, -44.56015625, -0.00040625] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 39 +(0, 0) v00 [ -68.427832375 -46.747924415 -104.821433056 ] +(0, 1) v01 [ -68.317832717 -46.747685514 -104.821297898 ] +(1, 0) v10 [ -68.427593652 -46.857924061 -104.821288344 ] +(1, 1) v11 [ -68.317593994 -46.857685160 -104.821153187 ] +surface axes: AXIS_D0Q3S4A1_F AXIS_D0Q3S4A1_S +AXIS_D0Q3S4A1_F has 8 ancestors +AXIS_D0Q3S4A1_S has 7 ancestors +axis AXIS_D0Q3S4A1_F index: 0 + equipment detector + depends_on AXIS_D0Q3S4A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S4A1_S index: 1 + equipment detector + depends_on FS_D0Q3S4A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S4A1 index: 2 + equipment detector + depends_on FS_D0Q3S4 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S4 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.46599746509, -0.43618149564, 0.769800016492] + offset [-23.9851875, -11.8635, 0.0315625] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.5855625, -45.05975, 0.1631875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 40 +(0, 0) v00 [ -69.439498998 90.060119140 -105.029485550 ] +(0, 1) v01 [ -69.439570738 89.950119250 -105.029347902 ] +(1, 0) v10 [ -69.549498737 90.060190594 -105.029714467 ] +(1, 1) v11 [ -69.549570477 89.950190703 -105.029576818 ] +surface axes: AXIS_D0Q0S5A0_F AXIS_D0Q0S5A0_S +AXIS_D0Q0S5A0_F has 8 ancestors +AXIS_D0Q0S5A0_S has 7 ancestors +axis AXIS_D0Q0S5A0_F index: 0 + equipment detector + depends_on AXIS_D0Q0S5A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S5A0_S index: 1 + equipment detector + depends_on FS_D0Q0S5A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S5A0 index: 2 + equipment detector + depends_on FS_D0Q0S5 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S5 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.000414176699182, -0.00166579914013, -0.999998526784] + offset [-34.67059375, 23.8800625, -0.02578125] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.95790625, 44.6816875, 0.00503125] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 41 +(0, 0) v00 [ 89.862770438 69.634576466 -104.725708635 ] +(0, 1) v01 [ 89.752770848 69.634443134 -104.725977685 ] +(1, 0) v10 [ 89.862636918 69.744576359 -104.725632331 ] +(1, 1) v11 [ 89.752637328 69.744443026 -104.725901382 ] +surface axes: AXIS_D0Q1S5A0_F AXIS_D0Q1S5A0_S +AXIS_D0Q1S5A0_F has 8 ancestors +AXIS_D0Q1S5A0_S has 7 ancestors +axis AXIS_D0Q1S5A0_F index: 0 + equipment detector + depends_on AXIS_D0Q1S5A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S5A0_S index: 1 + equipment detector + depends_on FS_D0Q1S5A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S5A0 index: 2 + equipment detector + depends_on FS_D0Q1S5 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S5 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [-0.00122274945083, -0.000347577024108, 0.999999192037] + offset [23.7871875, 34.7281875, 0.06228125] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [44.5583125, 45.0553125, 0.16946875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 42 +(0, 0) v00 [ 69.569902914 -89.780682800 -105.056258151 ] +(0, 1) v01 [ 69.569676334 -89.670683051 -105.056196265 ] +(1, 0) v10 [ 69.679901761 -89.780455969 -105.056707778 ] +(1, 1) v11 [ 69.679675181 -89.670456220 -105.056645892 ] +surface axes: AXIS_D0Q2S5A0_F AXIS_D0Q2S5A0_S +AXIS_D0Q2S5A0_F has 8 ancestors +AXIS_D0Q2S5A0_S has 7 ancestors +axis AXIS_D0Q2S5A0_F index: 0 + equipment detector + depends_on AXIS_D0Q2S5A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S5A0_S index: 1 + equipment detector + depends_on FS_D0Q2S5A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S5A0 index: 2 + equipment detector + depends_on FS_D0Q2S5 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S5 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.00232085457863, 0.00176304146716, 0.99999575265] + offset [34.57365625, -23.69459375, -0.08234375] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [45.12684375, -44.56015625, -0.00040625] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 43 +(0, 0) v00 [ -89.998159424 -69.569711220 -104.797396568 ] +(0, 1) v01 [ -89.888160193 -69.569310364 -104.797304358 ] +(1, 0) v10 [ -89.997758778 -69.679710207 -104.797146625 ] +(1, 1) v11 [ -89.887759547 -69.679309350 -104.797054416 ] +surface axes: AXIS_D0Q3S5A0_F AXIS_D0Q3S5A0_S +AXIS_D0Q3S5A0_F has 8 ancestors +AXIS_D0Q3S5A0_S has 7 ancestors +axis AXIS_D0Q3S5A0_F index: 0 + equipment detector + depends_on AXIS_D0Q3S5A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S5A0_S index: 1 + equipment detector + depends_on FS_D0Q3S5A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S5A0 index: 2 + equipment detector + depends_on FS_D0Q3S5 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S5 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.519039453351, -0.192560045605, 0.832777686242] + offset [-23.8706875, -34.6065, 0.0835625] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.5855625, -45.05975, 0.1631875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 44 +(0, 0) v00 [ -69.453631790 68.390140715 -105.002368741 ] +(0, 1) v01 [ -69.453703530 68.280140825 -105.002231093 ] +(1, 0) v10 [ -69.563631528 68.390212169 -105.002597658 ] +(1, 1) v11 [ -69.563703268 68.280212278 -105.002460009 ] +surface axes: AXIS_D0Q0S5A1_F AXIS_D0Q0S5A1_S +AXIS_D0Q0S5A1_F has 8 ancestors +AXIS_D0Q0S5A1_S has 7 ancestors +axis AXIS_D0Q0S5A1_F index: 0 + equipment detector + depends_on AXIS_D0Q0S5A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S5A1_S index: 1 + equipment detector + depends_on FS_D0Q0S5A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S5A1 index: 2 + equipment detector + depends_on FS_D0Q0S5 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S5 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.000414176699182, -0.00166579914013, -0.999998526784] + offset [-34.67059375, 23.8800625, -0.02578125] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.95790625, 44.6816875, 0.00503125] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 45 +(0, 0) v00 [ 68.192851177 69.608309945 -104.778711669 ] +(0, 1) v01 [ 68.082851587 69.608176612 -104.778980720 ] +(1, 0) v10 [ 68.192717658 69.718309837 -104.778635366 ] +(1, 1) v11 [ 68.082718068 69.718176505 -104.778904417 ] +surface axes: AXIS_D0Q1S5A1_F AXIS_D0Q1S5A1_S +AXIS_D0Q1S5A1_F has 8 ancestors +AXIS_D0Q1S5A1_S has 7 ancestors +axis AXIS_D0Q1S5A1_F index: 0 + equipment detector + depends_on AXIS_D0Q1S5A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S5A1_S index: 1 + equipment detector + depends_on FS_D0Q1S5A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S5A1 index: 2 + equipment detector + depends_on FS_D0Q1S5 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S5 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [-0.00122274945083, -0.000347577024108, 0.999999192037] + offset [23.7871875, 34.7281875, 0.06228125] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [44.5583125, 45.0553125, 0.16946875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 46 +(0, 0) v00 [ 69.525266766 -68.110732200 -105.044066608 ] +(0, 1) v01 [ 69.525040187 -68.000732451 -105.044004722 ] +(1, 0) v10 [ 69.635265613 -68.110505370 -105.044516235 ] +(1, 1) v11 [ 69.635039034 -68.000505621 -105.044454349 ] +surface axes: AXIS_D0Q2S5A1_F AXIS_D0Q2S5A1_S +AXIS_D0Q2S5A1_F has 8 ancestors +AXIS_D0Q2S5A1_S has 7 ancestors +axis AXIS_D0Q2S5A1_F index: 0 + equipment detector + depends_on AXIS_D0Q2S5A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S5A1_S index: 1 + equipment detector + depends_on FS_D0Q2S5A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S5A1 index: 2 + equipment detector + depends_on FS_D0Q2S5 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S5 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [0.00232085457863, 0.00176304146716, 0.99999575265] + offset [34.57365625, -23.69459375, -0.08234375] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [45.12684375, -44.56015625, -0.00040625] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 47 +(0, 0) v00 [ -68.328310925 -69.490742472 -104.779231347 ] +(0, 1) v01 [ -68.218311694 -69.490341616 -104.779139137 ] +(1, 0) v10 [ -68.327910279 -69.600741459 -104.778981404 ] +(1, 1) v11 [ -68.217911048 -69.600340602 -104.778889195 ] +surface axes: AXIS_D0Q3S5A1_F AXIS_D0Q3S5A1_S +AXIS_D0Q3S5A1_F has 8 ancestors +AXIS_D0Q3S5A1_S has 7 ancestors +axis AXIS_D0Q3S5A1_F index: 0 + equipment detector + depends_on AXIS_D0Q3S5A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S5A1_S index: 1 + equipment detector + depends_on FS_D0Q3S5A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S5A1 index: 2 + equipment detector + depends_on FS_D0Q3S5 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S5 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.519039453351, -0.192560045605, 0.832777686242] + offset [-23.8706875, -34.6065, 0.0835625] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.5855625, -45.05975, 0.1631875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 48 +(0, 0) v00 [ -43.272328550 87.978031620 -105.021777720 ] +(0, 1) v01 [ -43.162328647 87.978175914 -105.021753771 ] +(1, 0) v10 [ -43.272184252 87.868031716 -105.021795603 ] +(1, 1) v11 [ -43.162184349 87.868176010 -105.021771655 ] +surface axes: AXIS_D0Q0S6A0_F AXIS_D0Q0S6A0_S +AXIS_D0Q0S6A0_F has 8 ancestors +AXIS_D0Q0S6A0_S has 7 ancestors +axis AXIS_D0Q0S6A0_F index: 0 + equipment detector + depends_on AXIS_D0Q0S6A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S6A0_S index: 1 + equipment detector + depends_on FS_D0Q0S6A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S6A0 index: 2 + equipment detector + depends_on FS_D0Q0S6 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S6 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.121465013044, -0.16243803956, 0.979214038865] + offset [23.20390625, 33.1495625, -0.02078125] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.95790625, 44.6816875, 0.00503125] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 49 +(0, 0) v00 [ 87.610250761 43.325540426 -104.836095939 ] +(0, 1) v01 [ 87.610346615 43.215540700 -104.836321970 ] +(1, 0) v10 [ 87.500250867 43.325444816 -104.836214479 ] +(1, 1) v11 [ 87.500346721 43.215445090 -104.836440510 ] +surface axes: AXIS_D0Q1S6A0_F AXIS_D0Q1S6A0_S +AXIS_D0Q1S6A0_F has 8 ancestors +AXIS_D0Q1S6A0_S has 7 ancestors +axis AXIS_D0Q1S6A0_F index: 0 + equipment detector + depends_on AXIS_D0Q1S6A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S6A0_S index: 1 + equipment detector + depends_on FS_D0Q1S6A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S6A0 index: 2 + equipment detector + depends_on FS_D0Q1S6 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S6 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.00156670209466, 0.000489491259463, -0.999998652921] + offset [32.8956875, -23.2435625, -0.05771875] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [44.5583125, 45.0553125, 0.16946875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 50 +(0, 0) v00 [ 43.381191293 -88.114303134 -104.972716844 ] +(0, 1) v01 [ 43.271191482 -88.114492028 -104.972793888 ] +(1, 0) v10 [ 43.381002338 -88.004303331 -104.972630043 ] +(1, 1) v11 [ 43.271002527 -88.004492224 -104.972707088 ] +surface axes: AXIS_D0Q2S6A0_F AXIS_D0Q2S6A0_S +AXIS_D0Q2S6A0_F has 8 ancestors +AXIS_D0Q2S6A0_S has 7 ancestors +axis AXIS_D0Q2S6A0_F index: 0 + equipment detector + depends_on AXIS_D0Q2S6A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S6A0_S index: 1 + equipment detector + depends_on FS_D0Q2S6A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S6A0 index: 2 + equipment detector + depends_on FS_D0Q2S6 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S6 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [-0.00034986352054, -0.000394848418258, 0.999999860845] + offset [-23.26809375, -33.41609375, 0.02365625] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [45.12684375, -44.56015625, -0.00040625] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 51 +(0, 0) v00 [ -87.580297677 -43.196004882 -104.830379459 ] +(0, 1) v01 [ -87.580400991 -43.086006439 -104.830955480 ] +(1, 0) v10 [ -87.470297726 -43.195901539 -104.830374145 ] +(1, 1) v11 [ -87.470401039 -43.085903096 -104.830950166 ] +surface axes: AXIS_D0Q3S6A0_F AXIS_D0Q3S6A0_S +AXIS_D0Q3S6A0_F has 8 ancestors +AXIS_D0Q3S6A0_S has 7 ancestors +axis AXIS_D0Q3S6A0_F index: 0 + equipment detector + depends_on AXIS_D0Q3S6A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S6A0_S index: 1 + equipment detector + depends_on FS_D0Q3S6A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S6A0 index: 2 + equipment detector + depends_on FS_D0Q3S6 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S6 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.00264240490242, 0.00259166531889, 0.99999315046] + offset [-32.8399375, 23.378, -0.1026875] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.5855625, -45.05975, 0.1631875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 52 +(0, 0) v00 [ -21.602347708 88.006457552 -105.017059875 ] +(0, 1) v01 [ -21.492347805 88.006601846 -105.017035927 ] +(1, 0) v10 [ -21.602203410 87.896457648 -105.017077759 ] +(1, 1) v11 [ -21.492203507 87.896601942 -105.017053810 ] +surface axes: AXIS_D0Q0S6A1_F AXIS_D0Q0S6A1_S +AXIS_D0Q0S6A1_F has 8 ancestors +AXIS_D0Q0S6A1_S has 7 ancestors +axis AXIS_D0Q0S6A1_F index: 0 + equipment detector + depends_on AXIS_D0Q0S6A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S6A1_S index: 1 + equipment detector + depends_on FS_D0Q0S6A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S6A1 index: 2 + equipment detector + depends_on FS_D0Q0S6 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S6 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [0.121465013044, -0.16243803956, 0.979214038865] + offset [23.20390625, 33.1495625, -0.02078125] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.95790625, 44.6816875, 0.00503125] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 53 +(0, 0) v00 [ 87.629134030 21.655594403 -104.880624098 ] +(0, 1) v01 [ 87.629229884 21.545594677 -104.880850129 ] +(1, 0) v10 [ 87.519134135 21.655498792 -104.880742638 ] +(1, 1) v11 [ 87.519229989 21.545499066 -104.880968669 ] +surface axes: AXIS_D0Q1S6A1_F AXIS_D0Q1S6A1_S +AXIS_D0Q1S6A1_F has 8 ancestors +AXIS_D0Q1S6A1_S has 7 ancestors +axis AXIS_D0Q1S6A1_F index: 0 + equipment detector + depends_on AXIS_D0Q1S6A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S6A1_S index: 1 + equipment detector + depends_on FS_D0Q1S6A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S6A1 index: 2 + equipment detector + depends_on FS_D0Q1S6 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S6 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.00156670209466, 0.000489491259463, -0.999998652921] + offset [32.8956875, -23.2435625, -0.05771875] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [44.5583125, 45.0553125, 0.16946875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 54 +(0, 0) v00 [ 21.711228558 -88.151515161 -104.987894611 ] +(0, 1) v01 [ 21.601228748 -88.151704054 -104.987971655 ] +(1, 0) v10 [ 21.711039604 -88.041515357 -104.987807811 ] +(1, 1) v11 [ 21.601039793 -88.041704251 -104.987884855 ] +surface axes: AXIS_D0Q2S6A1_F AXIS_D0Q2S6A1_S +AXIS_D0Q2S6A1_F has 8 ancestors +AXIS_D0Q2S6A1_S has 7 ancestors +axis AXIS_D0Q2S6A1_F index: 0 + equipment detector + depends_on AXIS_D0Q2S6A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S6A1_S index: 1 + equipment detector + depends_on FS_D0Q2S6A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S6A1 index: 2 + equipment detector + depends_on FS_D0Q2S6 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S6 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [-0.00034986352054, -0.000394848418258, 0.999999860845] + offset [-23.26809375, -33.41609375, 0.02365625] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [45.12684375, -44.56015625, -0.00040625] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 55 +(0, 0) v00 [ -87.600650468 -21.526311554 -104.943855523 ] +(0, 1) v01 [ -87.600753782 -21.416313110 -104.944431544 ] +(1, 0) v10 [ -87.490650517 -21.526208211 -104.943850210 ] +(1, 1) v11 [ -87.490753831 -21.416209767 -104.944426231 ] +surface axes: AXIS_D0Q3S6A1_F AXIS_D0Q3S6A1_S +AXIS_D0Q3S6A1_F has 8 ancestors +AXIS_D0Q3S6A1_S has 7 ancestors +axis AXIS_D0Q3S6A1_F index: 0 + equipment detector + depends_on AXIS_D0Q3S6A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S6A1_S index: 1 + equipment detector + depends_on FS_D0Q3S6A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S6A1 index: 2 + equipment detector + depends_on FS_D0Q3S6 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S6 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.00264240490242, 0.00259166531889, 0.99999315046] + offset [-32.8399375, 23.378, -0.1026875] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.5855625, -45.05975, 0.1631875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 56 +(0, 0) v00 [ -43.051686446 65.008876745 -105.059969099 ] +(0, 1) v01 [ -42.941686515 65.008754581 -105.059956469 ] +(1, 0) v10 [ -43.051808610 64.898876813 -105.059969098 ] +(1, 1) v11 [ -42.941808679 64.898754649 -105.059956469 ] +surface axes: AXIS_D0Q0S7A0_F AXIS_D0Q0S7A0_S +AXIS_D0Q0S7A0_F has 8 ancestors +AXIS_D0Q0S7A0_S has 7 ancestors +axis AXIS_D0Q0S7A0_F index: 0 + equipment detector + depends_on AXIS_D0Q0S7A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S7A0_S index: 1 + equipment detector + depends_on FS_D0Q0S7A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S7A0 index: 2 + equipment detector + depends_on FS_D0Q0S7 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S7 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [-6.08312895859e-05, -0.102833148168, -0.994698617641] + offset [23.39990625, 10.1283125, -0.05953125] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.95790625, 44.6816875, 0.00503125] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 57 +(0, 0) v00 [ 64.875302035 43.297936179 -104.824769831 ] +(0, 1) v01 [ 64.875448761 43.187936742 -104.825089406 ] +(1, 0) v10 [ 64.765302175 43.297789736 -104.824867165 ] +(1, 1) v11 [ 64.765448901 43.187790298 -104.825186739 ] +surface axes: AXIS_D0Q1S7A0_F AXIS_D0Q1S7A0_S +AXIS_D0Q1S7A0_F has 8 ancestors +AXIS_D0Q1S7A0_S has 7 ancestors +axis AXIS_D0Q1S7A0_F index: 0 + equipment detector + depends_on AXIS_D0Q1S7A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S7A0_S index: 1 + equipment detector + depends_on FS_D0Q1S7A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S7A0 index: 2 + equipment detector + depends_on FS_D0Q1S7 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S7 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.00189562561041, 0.00101212583573, -0.9999976911] + offset [10.1706875, -23.2758125, -0.06271875] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [44.5583125, 45.0553125, 0.16946875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 58 +(0, 0) v00 [ 43.379039510 -64.719451603 -104.983577095 ] +(0, 1) v01 [ 43.269040183 -64.719823667 -104.983675615 ] +(1, 0) v10 [ 43.378667390 -64.609452251 -104.983513985 ] +(1, 1) v11 [ 43.268668063 -64.609824315 -104.983612505 ] +surface axes: AXIS_D0Q2S7A0_F AXIS_D0Q2S7A0_S +AXIS_D0Q2S7A0_F has 8 ancestors +AXIS_D0Q2S7A0_S has 7 ancestors +axis AXIS_D0Q2S7A0_F index: 0 + equipment detector + depends_on AXIS_D0Q2S7A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S7A0_S index: 1 + equipment detector + depends_on FS_D0Q2S7A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S7A0 index: 2 + equipment detector + depends_on FS_D0Q2S7 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S7 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [-0.000447331453409, -0.000287621616036, 0.999999858584] + offset [-23.28709375, -10.05709375, 0.00640625] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [45.12684375, -44.56015625, -0.00040625] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 59 +(0, 0) v00 [ -64.817170371 -43.269459770 -104.800566990 ] +(0, 1) v01 [ -64.817201467 -43.159460593 -104.800991400 ] +(1, 0) v10 [ -64.707170377 -43.269428736 -104.800582783 ] +(1, 1) v11 [ -64.707201472 -43.159429559 -104.801007193 ] +surface axes: AXIS_D0Q3S7A0_F AXIS_D0Q3S7A0_S +AXIS_D0Q3S7A0_F has 8 ancestors +AXIS_D0Q3S7A0_S has 7 ancestors +axis AXIS_D0Q3S7A0_F index: 0 + equipment detector + depends_on AXIS_D0Q3S7A0_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S7A0_S index: 1 + equipment detector + depends_on FS_D0Q3S7A0 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S7A0 index: 2 + equipment detector + depends_on FS_D0Q3S7 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [-10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S7 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.00185736764332, 0.0020003790191, 0.999996274328] + offset [-10.0626875, 23.298, -0.0451875] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.5855625, -45.05975, 0.1631875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 60 +(0, 0) v00 [ -21.381699953 64.984810480 -105.057481098 ] +(0, 1) v01 [ -21.271700021 64.984688316 -105.057468469 ] +(1, 0) v10 [ -21.381822117 64.874810547 -105.057481098 ] +(1, 1) v11 [ -21.271822185 64.874688384 -105.057468468 ] +surface axes: AXIS_D0Q0S7A1_F AXIS_D0Q0S7A1_S +AXIS_D0Q0S7A1_F has 8 ancestors +AXIS_D0Q0S7A1_S has 7 ancestors +axis AXIS_D0Q0S7A1_F index: 0 + equipment detector + depends_on AXIS_D0Q0S7A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q0S7A1_S index: 1 + equipment detector + depends_on FS_D0Q0S7A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S7A1 index: 2 + equipment detector + depends_on FS_D0Q0S7 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q0S7 index: 3 + equipment detector + depends_on FS_D0Q0 + equipment_component detector_sensor + vector [-6.08312895859e-05, -0.102833148168, -0.994698617641] + offset [23.39990625, 10.1283125, -0.05953125] + rotation 0.0 + rotation_axis . +axis FS_D0Q0 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.95790625, 44.6816875, 0.00503125] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 61 +(0, 0) v00 [ 64.904207089 21.628046909 -104.887726045 ] +(0, 1) v01 [ 64.904353815 21.518047471 -104.888045620 ] +(1, 0) v10 [ 64.794207230 21.627900465 -104.887823379 ] +(1, 1) v11 [ 64.794353956 21.517901027 -104.888142953 ] +surface axes: AXIS_D0Q1S7A1_F AXIS_D0Q1S7A1_S +AXIS_D0Q1S7A1_F has 8 ancestors +AXIS_D0Q1S7A1_S has 7 ancestors +axis AXIS_D0Q1S7A1_F index: 0 + equipment detector + depends_on AXIS_D0Q1S7A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q1S7A1_S index: 1 + equipment detector + depends_on FS_D0Q1S7A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S7A1 index: 2 + equipment detector + depends_on FS_D0Q1S7 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q1S7 index: 3 + equipment detector + depends_on FS_D0Q1 + equipment_component detector_sensor + vector [0.00189562561041, 0.00101212583573, -0.9999976911] + offset [10.1706875, -23.2758125, -0.06271875] + rotation 0.0 + rotation_axis . +axis FS_D0Q1 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [44.5583125, 45.0553125, 0.16946875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 62 +(0, 0) v00 [ 21.709172161 -64.792748199 -105.002985465 ] +(0, 1) v01 [ 21.599172834 -64.793120263 -105.003083985 ] +(1, 0) v10 [ 21.708800041 -64.682748847 -105.002922355 ] +(1, 1) v11 [ 21.598800714 -64.683120911 -105.003020875 ] +surface axes: AXIS_D0Q2S7A1_F AXIS_D0Q2S7A1_S +AXIS_D0Q2S7A1_F has 8 ancestors +AXIS_D0Q2S7A1_S has 7 ancestors +axis AXIS_D0Q2S7A1_F index: 0 + equipment detector + depends_on AXIS_D0Q2S7A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q2S7A1_S index: 1 + equipment detector + depends_on FS_D0Q2S7A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S7A1 index: 2 + equipment detector + depends_on FS_D0Q2S7 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q2S7 index: 3 + equipment detector + depends_on FS_D0Q2 + equipment_component detector_sensor + vector [-0.000447331453409, -0.000287621616036, 0.999999858584] + offset [-23.28709375, -10.05709375, 0.00640625] + rotation 0.0 + rotation_axis . +axis FS_D0Q2 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [45.12684375, -44.56015625, -0.00040625] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +element: 63 +(0, 0) v00 [ -64.823296133 -21.599621929 -104.884175725 ] +(0, 1) v01 [ -64.823327228 -21.489622752 -104.884600135 ] +(1, 0) v10 [ -64.713296139 -21.599590895 -104.884191519 ] +(1, 1) v11 [ -64.713327234 -21.489591718 -104.884615928 ] +surface axes: AXIS_D0Q3S7A1_F AXIS_D0Q3S7A1_S +AXIS_D0Q3S7A1_F has 8 ancestors +AXIS_D0Q3S7A1_S has 7 ancestors +axis AXIS_D0Q3S7A1_F index: 0 + equipment detector + depends_on AXIS_D0Q3S7A1_S + equipment_component detector_asic + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0Q3S7A1_S index: 1 + equipment detector + depends_on FS_D0Q3S7A1 + equipment_component detector_asic + vector [0.0, -1.0, 0.0] + offset [-10.67, 10.175, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S7A1 index: 2 + equipment detector + depends_on FS_D0Q3S7 + equipment_component detector_asic + vector [0.0, 0.0, 1.0] + offset [10.835, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis FS_D0Q3S7 index: 3 + equipment detector + depends_on FS_D0Q3 + equipment_component detector_sensor + vector [-0.00185736764332, 0.0020003790191, 0.999996274328] + offset [-10.0626875, 23.298, -0.0451875] + rotation 0.0 + rotation_axis . +axis FS_D0Q3 index: 4 + equipment detector + depends_on AXIS_D0_R + equipment_component detector_quadrant + vector [0.0, 0.0, 1.0] + offset [-44.5855625, -45.05975, 0.1631875] + rotation 0.0 + rotation_axis . +axis AXIS_D0_R index: 5 + equipment detector + depends_on AXIS_D0_X + equipment_component detector_arm + vector [0.0, 0.0, 1.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_X index: 6 + equipment detector + depends_on AXIS_D0_Y + equipment_component detector_arm + vector [1.0, 0.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . +axis AXIS_D0_Y index: 7 + equipment detector + depends_on AXIS_D0_Z + equipment_component detector_arm + vector [0.0, 1.0, 0.0] + offset [0.0, 0.0, 0.0] + rotation 0.0 + rotation_axis . diff --git a/py2cbf/installsetup.py b/py2cbf/installsetup.py new file mode 100644 index 00000000..c621a6c9 --- /dev/null +++ b/py2cbf/installsetup.py @@ -0,0 +1,13 @@ +# Import the things to build python binary extensions + +from distutils.core import setup, Extension + +# Make our extension module + +e = Extension('_pycbf', + sources = ["pycbf_wrap.c","../src/cbf_simple.c","../src/cbf_airy_disk.c"], + extra_compile_args=["-g"], + libraries=["_cbf"], + include_dirs = ["../include"] ) +# Build it +setup(name="_pycbf",ext_modules=[e],py_modules = ['pycbf']) diff --git a/py2cbf/linux.sh b/py2cbf/linux.sh new file mode 100644 index 00000000..416a91f5 --- /dev/null +++ b/py2cbf/linux.sh @@ -0,0 +1,17 @@ + +nuweb pycbf +latex pycbf +nuweb pycbf +latex pycbf +dvipdfm pycbf +nuweb pycbf +lynx -dump CBFlib.html > CBFlib.txt +python make_pycbf.py +swig -python pycbf.i +python setup.py build +rm _py2cbf.so +cp build/lib.linux-i686-2.4/_py2cbf.so . +python pycbf_test1.py +python pycbf_test2.py +pydoc -w pycbf +python makeflatascii.py pycbf_ascii_help.txt diff --git a/py2cbf/make_pycbf.py b/py2cbf/make_pycbf.py new file mode 100644 index 00000000..38864262 --- /dev/null +++ b/py2cbf/make_pycbf.py @@ -0,0 +1,3399 @@ + +print "\\begin{verbatim}" +print "This output comes from make_pycbf.py which generates the wrappers" +print "pycbf Copyright (C) 2005 Jonathan Wright, no warranty, LGPL" + + +###################################################################### +# # +# YOU MAY REDISTRIBUTE THE CBFLIB PACKAGE INCLUDING PYCBF UNDER THE # +# TERMS OF THE GPL # +# # +# ALTERNATIVELY YOU MAY REDISTRIBUTE THE CBFLIB API INCLUDING PYCBF # +# UNDER THE TERMS OF THE LGPL # +# # +###################################################################### + + +########################### GPL NOTICES ############################## +# # +# This program is free software; you can redistribute it and/or # +# modify it under the terms of the GNU General Public License as # +# published by the Free Software Foundation; either version 2 of # +# (the License, or (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # +# 02111-1307 USA # +# # +###################################################################### + + +######################### LGPL NOTICES ############################### +# # +# This library is free software; you can redistribute it and/or # +# modify it under the terms of the GNU Lesser General Public # +# License as published by the Free Software Foundation; either # +# version 2.1 of the License, or (at your option) any later version. # +# # +# This library is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # +# Lesser General Public License for more details. # +# # +# You should have received a copy of the GNU Lesser General Public # +# License along with this library; if not, write to the Free # +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # +# MA 02110-1301 USA # +# # +###################################################################### + + +# Get the ascii text as a list of strings +lines = open("CBFlib.txt","r").readlines() + +# Variables to hold the useful things we find in the file +docstring = "\n" +name="" + +# Flag to indicate we have not read anything useful yet +on=0 + + +# Dictionary of function prototypes and documentation, keyed by name in C. +name_dict = {} +i=-1 +debug = 0 +# Parse the text +prototypes = "" +while i=0 and on==1: + on=10 # Only try for ten lines after it say PROTOTYPE + continue + if line.find("#include")>=0: # why? + continue + if line.find("int cbf_")>=0: # We found a function + # keep going up to DESCRIPTION + prototypes+=""+lines[i].rstrip()+" " + # print lines[i].rstrip() + check=0 + while lines[i+1].find("DESCRIPTION")==-1 and lines[i+1].find("int cbf_")==-1: + i=i+1 + prototypes+=lines[i].rstrip()+" " # lose the \n + # print lines[i].rstrip() + check+=1 + if check>50: + raise Exception("Runaway prototype "+prototypes) + on=1 # Keep reading docstring + continue + if on > 1: # why? + on=on-1 + if line.find("3. File format")>=0 and on==1: + # Stop processing at section 3 + i=len(lines) + if on==1: + # Docstring ends at 2.xxx for next function or see also + # We are losing the see also information for now (needed the section + # breaks in the rtf file) + if len(line.strip())==0: + docstring+="\n" + continue + else: + if docstring[-1]=="\n": + docstring += line.lstrip().rstrip() + else: + docstring =docstring+" "+line.lstrip().rstrip() + if line.strip()[0] in [str(j) for j in range(9)] or \ + line.find("SEE ALSO")>=0 or \ + line.find("________")>=0 or \ + line.find("--------")>=0: + if len(docstring)>0: + # print "Prototypes: ",prototypes + docstring = docstring.replace("\"", " \\\"") # escape the quotes + for prototype in prototypes.strip().split(";")[:-1]: + name = prototype.split("(")[0].strip() + cname = name.split()[1].strip() + prototype = prototype.strip()+";" + name_dict[cname]=[prototype,docstring] + # print "Prototype: ","::",cname,"::",name,"::", prototype + prototypes = "" + # print "Found ",prototype + docstring="\n" + prototype="" + cname="" + on=0 + else: + raise Exception("bad docstring") + +# End of CBFlib.txt file - now generate wrapper code for swig + + +def myformat(s,l,indent=0,breakon=" "): + """ + Try to pretty print lines - this is a pain... + """ + lines = s.rstrip().split("\n") + out="" + for line in lines: + if len(line)==0: + continue # skip blank lines + if len(line)>l: + words = line.split(breakon) + newline=words[0] + if len(words)>1: + for word in words[1:]: + if len(newline)+len(word)+1 < l: + newline=newline+breakon+word + else: + out = out+newline+breakon+"\n"+indent*" " + newline=word + out += newline+"\n" + else: + out += "\n" + else: + out += line+"\n" # Last one + if out == "": + return "\n" + else: + return out + + +def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): + doc = "%feature(\"autodoc\", \"\nReturns : " + returns = "" + for out in output: + returns += out+"," + if len(returns)>0: + doc += myformat(returns[:-1],70,indent = 10,breakon=",") + else: + doc += "\n" + doc += "*args : " + takes = "" + for inp in input: + takes += inp+"," + if len(takes)>0: + doc += myformat(takes[:-1],70,indent = 10,breakon=",") + else: + doc += "\n" + doc += "\nC prototype: "+myformat(prototype,65,indent=16,breakon=",") + doc += "\nCBFLib documentation:\n"+myformat(cbflibdoc,70)+"\")" + doc += pyfunc+";\n" + return doc + + +cbfhandle_specials = { + + + +"cbf_get_integerarrayparameters":[""" +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement} + get_integerarrayparameters; + + void get_integerarrayparameters(int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement){ + unsigned int comp; + size_t elsiz, elem; + cbf_failnez(cbf_get_integerarrayparameters(self, + &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, + minelement, maxelement)); + *compression = comp; /* FIXME - does this convert in C? */ + *elsize = elsiz; + *elements = elem; + } +""","get_integerarrayparameters",[],["int compression","int binary_id", + "int elsize", "int elsigned", "int elunsigned", + "int elements", "int minelement", "int maxelement"]], + + +"cbf_get_integerarrayparameters_wdims":[""" +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement, + int *dimfast, int *dimmid, int *dimslow, int *padding} + get_integerarrayparameters_wdims; + + void get_integerarrayparameters_wdims(int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement, + char **bo, int *bolen, + int *dimfast, int *dimmid, int *dimslow, int *padding + ){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + cbf_failnez(cbf_get_integerarrayparameters_wdims(self, + &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, + minelement, maxelement, &byteorder,&df,&dm,&ds,&pd )); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +""","get_integerarrayparameters_wdims",[],["int compression","int binary_id", + "int elsize", "int elsigned", "int elunsigned", + "int elements", "int minelement", "int maxelement", "char **bo", "int *bolen", + "int dimfast", "int dimmid", "int dimslow", "int padding"]], + + +"cbf_get_integerarrayparameters_wdims_fs":[""" +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement, + int *dimfast, int *dimmid, int *dimslow, int *padding} + get_integerarrayparameters_wdims_fs; + + void get_integerarrayparameters_wdims_fs(int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement, + char **bo, int *bolen, + int *dimfast, int *dimmid, int *dimslow, int *padding + ){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + cbf_failnez(cbf_get_integerarrayparameters_wdims_fs(self, + &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, + minelement, maxelement, &byteorder,&df,&dm,&ds,&pd )); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +""","get_integerarrayparameters_wdims_fs",[],["int compression","int binary_id", + "int elsize", "int elsigned", "int elunsigned", + "int elements", "int minelement", "int maxelement", "char **bo", "int *bolen", + "int dimfast", "int dimmid", "int dimslow", "int padding"]], + + +"cbf_get_integerarrayparameters_wdims_sf":[""" +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement, + int *dimslow, int *dimmid, int *dimfast, int *padding} + get_integerarrayparameters_wdims_sf; + + void get_integerarrayparameters_wdims_sf(int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement, + char **bo, int *bolen, + int *dimslow, int *dimmid, int *dimfast, int *padding + ){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + cbf_failnez(cbf_get_integerarrayparameters_wdims_sf(self, + &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, + minelement, maxelement, &byteorder,&ds,&dm,&df,&pd )); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +""","get_integerarrayparameters_wdims_sf",[],["int compression","int binary_id", + "int elsize", "int elsigned", "int elunsigned", + "int elements", "int minelement", "int maxelement", "char **bo", "int *bolen", + "int dimslow", "int dimmid", "int dimfast", "int padding"]], + + +"cbf_get_realarrayparameters":[""" +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, int *elements} get_realarrayparameters; + + + void get_realarrayparameters(int *compression,int *binary_id, + int *elsize, int *elements){ + unsigned int comp; + size_t elsiz, elem; + cbf_failnez(cbf_get_realarrayparameters(self, + &comp ,binary_id, &elsiz, &elem )); + *compression = comp; /* FIXME - does this convert in C? */ + *elsize = elsiz; + *elements = elem; + } +""","get_realarrayparameters",[],["int compression","int binary_id", + "int elsize", "int elements"]], + + +"cbf_get_realarrayparameters_wdims":[""" +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, + int *elements, + int *dimslow, int *dimmid, int *dimfast, int *padding} + get_realarrayparameters_wdims; + + void get_realarrayparameters_wdims(int *compression,int *binary_id, + int *elsize, + int *elements, + char **bo, int *bolen, + int *dimfast, int *dimmid, int *dimslow, int *padding + ){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + cbf_failnez(cbf_get_realarrayparameters_wdims(self, + &comp,binary_id, &elsiz, &elem, + &byteorder,&df,&dm,&ds,&pd )); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +""","get_realarrayparameters_wdims",[],["int compression","int binary_id", + "int elsize", + "int elements", "char **bo", "int *bolen", + "int dimfast", "int dimmid", "int dimslow", "int padding"]], + + +"cbf_get_realarrayparameters_wdims_fs":[""" +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, + int *elements, + int *dimslow, int *dimmid, int *dimfast, int *padding} + get_realarrayparameters_wdims_fs; + + void get_realarrayparameters_wdims_fs(int *compression,int *binary_id, + int *elsize, + int *elements, + char **bo, int *bolen, + int *dimfast, int *dimmid, int *dimslow, int *padding + ){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + cbf_failnez(cbf_get_realarrayparameters_wdims_fs(self, + &comp,binary_id, &elsiz, &elem, + &byteorder,&df,&dm,&ds,&pd )); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +""","get_realarrayparameters_wdims_fs",[],["int compression","int binary_id", + "int elsize", + "int elements", "char **bo", "int *bolen", + "int dimfast", "int dimmid", "int dimslow", "int padding"]], + + +"cbf_get_realarrayparameters_wdims_sf":[""" +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, + int *elements, + int *dimslow, int *dimmid, int *dimfast, int *padding} + get_realarrayparameters_wdims_sf; + + void get_realarrayparameters_wdims_sf(int *compression,int *binary_id, + int *elsize, + int *elements, + char **bo, int *bolen, + int *dimslow, int *dimmid, int *dimfast, int *padding + ){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + cbf_failnez(cbf_get_realarrayparameters_wdims_sf(self, + &comp,binary_id, &elsiz, &elem, + &byteorder,&ds,&dm,&df,&pd )); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +""","get_realarrayparameters_wdims_sf",[],["int compression","int binary_id", + "int elsize", + "int elements", "char **bo", "int *bolen", + "int dimslow", "int dimmid", "int dimfast", "int padding"]], + + +"cbf_get_integerarray":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_integerarray_as_string; + +// Get the length correct + + void get_integerarray_as_string(char **s, int *slen){ + int binary_id, elsigned, elunsigned; + size_t elements, elements_read, elsize; + int minelement, maxelement; + unsigned int compression; + void * array; + *slen = 0; /* Initialise in case of problems */ + cbf_failnez(cbf_get_integerarrayparameters(self, &compression, + &binary_id, &elsize, &elsigned, &elunsigned, + &elements, &minelement, &maxelement)); + + if ((array=malloc(elsize*elements))) { + /* cbf_failnez (cbf_select_column(cbf,colnum)) */ + cbf_failnez (cbf_get_integerarray(self, &binary_id, + (void *)array, elsize, elsigned, + elements, &elements_read)); + + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*elements; + *s = (char *) array; + } +""","get_integerarray_as_string",[],["(Binary)String"] ], + + +"cbf_get_image":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_image_as_string; + +// Get the length correct + + void get_image_as_string(int element_number, char **s, int *slen, + int elsize, int elsign, int ndimslow, int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + cbf_failnez (cbf_get_image(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } +""","get_image_as_string",["int element_number", + "int elsize", "int elsign", "int ndimslow", "int ndimfast"],["(Binary)String"] ], + + +"cbf_get_image_fs":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_image_fs_as_string; + +// Get the length correct + + void get_image_fs_as_string(int element_number, char **s, int *slen, + int elsize, int elsign, int ndimfast, int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + cbf_failnez (cbf_get_image_fs(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimfast, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } +""","get_image_fs_as_string",["int element_number", + "int elsize", "int elsign", "int ndimfast", "int ndimslow"],["(Binary)String"] ], + + +"cbf_get_image_sf":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_image_fs_as_string; + +// Get the length correct + + void get_image_sf_as_string(int element_number, char **s, int *slen, + int elsize, int elsign, int ndimslow, int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + cbf_failnez (cbf_get_image_sf(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } +""","get_image_sf_as_string",["int element_number", + "int elsize", "int elsign", "int ndimslow", "int ndimfast"],["(Binary)String"] ], + + +"cbf_get_real_image":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_real_image_as_string; + +// Get the length correct + + void get_real_image_as_string(int element_number, char **s, int *slen, + int elsize, int ndimslow, int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + cbf_failnez (cbf_get_real_image(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } +""","get_real_image_as_string",["int element_number", + "int elsize", "int ndimslow", "int ndimfast"],["(Binary)String"] ], + + +"cbf_get_real_image_fs":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_real_image_fs_as_string; + +// Get the length correct + + void get_real_image_fs_as_string(int element_number, char **s, int *slen, + int elsize, int ndimfast, int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + cbf_failnez (cbf_get_real_image_fs(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimfast, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } +""","get_real_image_fs_as_string",["int element_number", + "int elsize", "int ndimfast", "int ndimslow"],["(Binary)String"] ], + + +"cbf_get_real_image_sf":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_real_image_sf_as_string; + +// Get the length correct + + void get_real_image_sf_as_string(int element_number, char **s, int *slen, + int elsize, int ndimslow, int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + cbf_failnez (cbf_get_real_image_sf(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } +""","get_real_image_sf_as_string",["int element_number", + "int elsize", "int ndimslow", "int ndimfast"],["(Binary)String"] ], + + +"cbf_get_3d_image":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_3d_image_as_string; + +// Get the length correct + + void get_3d_image_as_string(int element_number, char **s, int *slen, + int elsize, int elsign, int ndimfast, int ndimmid, int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + cbf_failnez (cbf_get_3d_image(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } +""","get_3d_image_as_string",["int element_number", + "int elsize", "int elsign", "int ndimslow", "int ndimmid", "int ndimfast"],["(Binary)String"] ], + + +"cbf_get_3d_image_fs":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_3d_image_fs_as_string; + +// Get the length correct + + void get_3d_image_fs_as_string(int element_number, char **s, int *slen, + int elsize, int elsign, int ndimfast, int ndimmid, int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + cbf_failnez (cbf_get_3d_image_fs(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } +""","get_3d_image_fs_as_string",["int element_number", + "int elsize", "int elsign", "int ndimfast", "int ndimmid", "int ndimslow"],["(Binary)String"] ], + + +"cbf_get_3d_image_sf":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_3d_image_sf_as_string; + +// Get the length correct + + void get_3d_image_sf_as_string(int element_number, char **s, int *slen, + int elsize, int elsign, int ndimfast, int ndimmid, int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + cbf_failnez (cbf_get_3d_image_sf(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } +""","get_3d_image_sf_as_string",["int element_number", + "int elsize", "int elsign", "int ndimslow", "int ndimmid", "int ndimfast"],["(Binary)String"] ], + + +"cbf_get_real_3d_image":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_real_3d_image_as_string; + +// Get the length correct + + void get_real_3d_image_as_string(int element_number, char **s, int *slen, + int elsize, int ndimslow, int ndimmid, int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + cbf_failnez (cbf_get_real_3d_image(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } +""","get_real_3d_image_as_string",["int element_number", + "int elsize", "int ndimslow", "int ndimmid", "int ndimfast"],["(Binary)String"] ], + + +"cbf_get_real_3d_image_fs":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_real_3d_image_fs_as_string; + +// Get the length correct + + void get_real_3d_image_fs_as_string(int element_number, char **s, int *slen, + int elsize, int ndimfast, int ndimmid, int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + cbf_failnez (cbf_get_real_3d_image_fs(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } +""","get_real_3d_image_fs_as_string",["int element_number", + "int elsize", "int ndimfast", "int ndimmid", "int ndimslow"],["(Binary)String"] ], + +"cbf_get_real_3d_image_sf":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_real_3d_image_sf_as_string; + +// Get the length correct + + void get_real_3d_image_sf_as_string(int element_number, char **s, int *slen, + int elsize, int ndimslow, int ndimmid, int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + cbf_failnez (cbf_get_real_3d_image_sf(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } +""","get_real_3d_image_sf_as_string",["int element_number", + "int elsize", "int ndimslow", "int ndimmid", "int ndimfast"],["(Binary)String"] ], + + +"cbf_get_realarray":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_realarray_as_string; + +// Get the length correct + + void get_realarray_as_string(char **s, int *slen){ + int binary_id; + size_t elements, elements_read, elsize; + unsigned int compression; + void * array; + *slen = 0; /* Initialise in case of problems */ + cbf_failnez(cbf_get_realarrayparameters(self, &compression, + &binary_id, &elsize, + &elements)); + + if ((array=malloc(elsize*elements))) { + /* cbf_failnez (cbf_select_column(cbf,colnum)) */ + cbf_failnez (cbf_get_realarray(self, &binary_id, + (void *)array, elsize, + elements, &elements_read)); + + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*elements; + *s = (char *) array; + } +""","get_realarray_as_string",[],["(Binary)String"] ], + + +"cbf_set_integerarray":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray; + + void set_integerarray(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elsigned, int elements){ + /* safety check on args */ + size_t els, ele; + void *array; + if(len == elsize*elements){ + array = data; + els = elsize; + ele = elements; + cbf_failnez(cbf_set_integerarray (self, compression, binary_id, + (void *) data, (size_t) elsize, elsigned, (size_t) elements)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_integerarray", +[ "int compression", "int binary_id","(binary) String data", + "int elsize", "int elsigned","int elements"],[]], + + +"cbf_set_integerarray_wdims":[""" + /* CBFlib must NOT modify the data string nor the byteorder string + which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray_wdims; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_integerarray_wdims; + + void set_integerarray_wdims(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elsigned, int elements, + char *bo, int bolen, int dimfast, int dimmid, int dimslow, int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + cbf_failnez(cbf_set_integerarray_wdims (self, compression, binary_id, + (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder, + (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_integerarray_wdims", +[ "int compression", "int binary_id","(binary) String data", + "int elsize", "int elsigned", "int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]], + + +"cbf_set_integerarray_wdims_sf":[""" + /* CBFlib must NOT modify the data string nor the byteorder string + which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray_wdims_sf; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_integerarray_wdims_sf; + + void set_integerarray_wdims_sf(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elsigned, int elements, + char *bo, int bolen, int dimslow, int dimmid, int dimfast, int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + cbf_failnez(cbf_set_integerarray_wdims_sf (self, compression, binary_id, + (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder, + (size_t)dimslow, (size_t)dimmid, (size_t)dimfast, (size_t)padding)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_integerarray_wdims_sf", +[ "int compression", "int binary_id","(binary) String data", + "int elsize","int elsigned","int elements", "String byteorder", "int dimslow", "int dimmid", "int dimfast", "int padding"],[]], + +"cbf_set_integerarray_wdims_fs":[""" + /* CBFlib must NOT modify the data string nor the byteorder string + which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray_wdims_fs; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_integerarray_wdims_fs; + + void set_integerarray_wdims_fs(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elsigned, int elements, + char *bo, int bolen, int dimfast, int dimmid, int dimslow, int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + cbf_failnez(cbf_set_integerarray_wdims_fs (self, compression, binary_id, + (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder, + (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_integerarray_wdims_fs", +[ "int compression", "int binary_id","(binary) String data", + "int elsize","int elsigned","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]], + + +"cbf_set_realarray":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray; + + void set_realarray(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elements){ + /* safety check on args */ + size_t els, ele; + void *array; + if(len == elsize*elements){ + array = data; + els = elsize; + ele = elements; + cbf_failnez(cbf_set_realarray (self, compression, binary_id, + (void *) data, (size_t) elsize, (size_t) elements)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_realarray", +[ "int compression", "int binary_id","(binary) String data", + "int elsize","int elements"],[]], + + +"cbf_set_realarray_wdims":[""" + /* CBFlib must NOT modify the data string nor the byteorder string + which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray_wdims; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_realarray_wdims; + + void set_realarray_wdims(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elements, + char *bo, int bolen, int dimfast, int dimmid, int dimslow, int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + cbf_failnez(cbf_set_realarray_wdims (self, compression, binary_id, + (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder, + (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_realarray_wdims", +[ "int compression", "int binary_id","(binary) String data", + "int elsize","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]], + + +"cbf_set_realarray_wdims_sf":[""" + /* CBFlib must NOT modify the data string nor the byteorder string + which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray_wdims_sf; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_realarray_wdims_sf; + + void set_realarray_wdims_sf(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elements, + char *bo, int bolen, int dimslow, int dimmid, int dimfast, int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + cbf_failnez(cbf_set_realarray_wdims_sf (self, compression, binary_id, + (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder, + (size_t) dimslow, (size_t) dimmid, (size_t) dimfast, (size_t)padding)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_realarray_wdims_sf", +[ "int compression", "int binary_id","(binary) String data", + "int elsize","int elements", "String byteorder", "int dimslow", "int dimmid", "int dimfast", "int padding"],[]], + + +"cbf_set_realarray_wdims_fs":[""" + /* CBFlib must NOT modify the data string nor the byteorder string + which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray_wdims_fs; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_realarray_wdims_fs; + + void set_realarray_wdims_fs(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elements, + char *bo, int bolen, int dimfast, int dimmid, int dimslow, int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + cbf_failnez(cbf_set_realarray_wdims_fs (self, compression, binary_id, + (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder, + (size_t) dimfast, (size_t) dimmid, (size_t) dimslow, (size_t)padding)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_realarray_wdims_fs", +[ "int compression", "int binary_id","(binary) String data", + "int elsize","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]], + + +"cbf_set_image":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_image; + + void set_image(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int elsign, int ndimslow, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_image", +[ "int element_number","int compression","(binary) String data", + "int elsize", "int elsign", "int dimslow", "int dimfast"],[]], + + +"cbf_set_image_fs":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_image; + + void set_image_fs(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int elsign, int ndimfast, int ndimslow){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimfast, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_image_fs", +[ "int element_number","int compression","(binary) String data", + "int elsize", "int elsign", "int dimfast", "int dimslow"],[]], + + +"cbf_set_image_sf":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_image_sf; + + void set_image_sf(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int elsign, int ndimslow, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_image_sf (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_image_sf", +[ "int element_number","int compression","(binary) String data", + "int elsize", "int elsign", "int dimslow", "int dimfast"],[]], + + +"cbf_set_real_image":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_image; + + void set_real_image(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int ndimslow, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_real_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_real_image", +[ "int element_number","int compression","(binary) String data", + "int elsize", "int dimslow", "int dimfast"],[]], + + +"cbf_set_real_image_fs":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_image; + + void set_real_image_fs(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int ndimfast, int ndimslow){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_real_image_fs (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimfast, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_real_image_fs", +[ "int element_number","int compression","(binary) String data", + "int elsize", "int dimfast", "int dimslow"],[]], + + +"cbf_set_real_image_sf":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_image_sf; + + void set_real_image_sf(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int ndimslow, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_real_image_sf (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_real_image_sf", +[ "int element_number","int compression","(binary) String data", + "int elsize", "int dimslow", "int dimfast"],[]], + + +"cbf_set_3d_image":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_3d_image; + + void set_3d_image(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int elsign, int ndimslow, int ndimmid, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_3d_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t) ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_3d_image", +[ "int element_number","int compression","(binary) String data", + "int elsize", "int elsign", "int dimslow", "int dimmid", "int dimfast"],[]], + + +"cbf_set_3d_image_fs":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_3d_image; + + void set_3d_image_fs(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int elsign, int ndimfast, int ndimmid, int ndimslow){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_3d_image_fs (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimfast, (size_t) ndimmid, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_3d_image_fs", +[ "int element_number","int compression","(binary) String data", + "int elsize", "int elsign", "int dimfast", "int dimmid", "int dimslow"],[]], + + +"cbf_set_3d_image_sf":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_3d_image; + + void set_3d_image_sf(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int elsign, int ndimslow, int ndimmid, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_3d_image_sf (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t) ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_3d_image_sf", +[ "int element_number","int compression","(binary) String data", + "int elsize", "int elsign", "int dimslow", "int dimmid", "int dimfast"],[]], + + +"cbf_set_real_3d_image":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_3d_image_sf; + + void set_real_3d_image(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int ndimslow, int ndimmid, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_real_3d_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_real_3d_image", +[ "int element_number","int compression","(binary) String data", + "int elsize", "int dimslow", "int dimmid", "int dimfast"],[]], + + +"cbf_set_real_3d_image_fs":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_3d_image_fs; + + void set_real_3d_image_fs(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int ndimfast, int ndimmid, int ndimslow){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_real_3d_image_fs (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_real_3d_image_fs", +[ "int element_number","int compression","(binary) String data", + "int elsize", "int dimfast", "int dimmid", "int dimslow"],[]], + + +"cbf_set_real_3d_image_sf":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_3d_image_sf; + + void set_real_3d_image_sf(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int ndimslow, int ndimmid, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_real_3d_image_sf (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_real_3d_image_sf", +[ "int element_number","int compression","(binary) String data", + "int elsize", "int dimslow", "int dimmid", "int dimfast"],[]], + + +"cbf_get_image_size": [""" +%apply int *OUTPUT {int *ndimslow, int *ndimfast} get_image_size; + void get_image_size(unsigned int element_number, int *ndimslow, int *ndimfast){ + unsigned int reserved; + size_t inslow, infast; + reserved = 0; + cbf_failnez(cbf_get_image_size(self,reserved,element_number,&inslow,&infast)); + *ndimslow = (int)inslow; + *ndimfast = (int)infast; + } +""","get_image_size",["Integer element_number"],["size_t ndim1","size_t ndim2"]], + + +"cbf_get_image_size_fs": [""" +%apply int *OUTPUT {int *ndimfast, int *ndimslow} get_image_size_fs; + void get_image_size_fs(unsigned int element_number, int *ndimfast, int *ndimslow){ + unsigned int reserved; + size_t infast, inslow; + reserved = 0; + cbf_failnez(cbf_get_image_size_fs(self,reserved,element_number,&infast,&inslow)); + *ndimfast = (int)infast; /* FIXME - is that how to convert? */ + *ndimslow = (int)inslow; + } +""","get_image_size_fs",["Integer element_number"],["size_t ndimfast","size_t ndimslow"]], + + +"cbf_get_image_size_sf": [""" +%apply int *OUTPUT {int *ndimslow, int *ndimfast} get_image_size_sf; + void get_image_size_sf(unsigned int element_number, int *ndimslow, int *ndimfast){ + unsigned int reserved; + size_t inslow, infast; + reserved = 0; + cbf_failnez(cbf_get_image_size(self,reserved,element_number,&inslow,&infast)); + *ndimslow = (int)inslow; + *ndimfast = (int)infast; + } +""","get_image_size_sf",["Integer element_number"],["size_t ndimslow","size_t ndimfast"]], + + +"cbf_get_3d_image_size": [""" +%apply int *OUTPUT {int *ndimslow, int *ndimmid, int *ndimfast} get_3d_image_size; + void get_3d_image_size(unsigned int element_number, int *ndimslow, int *ndimmid, int *ndimfast){ + unsigned int reserved; + size_t inslow, inmid, infast; + reserved = 0; + cbf_failnez(cbf_get_3d_image_size(self,reserved,element_number,&inslow,&inmid,&infast)); + *ndimslow = (int)inslow; /* FIXME - is that how to convert? */ + *ndimmid = (int)inmid; + *ndimfast = (int)infast; + } +""","get_3d_image_size",["Integer element_number"],["size_t ndimslow","size_t ndimmid","size_t ndimfast"]], + + +"cbf_get_3d_image_size_fs": [""" +%apply int *OUTPUT {int *ndimslow, int *ndimmid, int *ndimfast} get_3d_image_size; + void get_3d_image_size_fs(unsigned int element_number, int *ndimfast, int *ndimmid, int *ndimslow){ + unsigned int reserved; + size_t inslow, inmid, infast; + reserved = 0; + cbf_failnez(cbf_get_3d_image_size_fs(self,reserved,element_number,&infast,&inmid,&inslow)); + *ndimslow = (int)inslow; /* FIXME - is that how to convert? */ + *ndimmid = (int)inmid; + *ndimfast = (int)infast; + } +""","get_3d_image_size",["Integer element_number"],["size_t ndimfast","size_t ndimmid","size_t ndimslow"]], + + +"cbf_get_3d_image_size_sf": [""" +%apply int *OUTPUT {int *ndimslow, int *ndimmid, int *ndimfast} get_3d_image_size_sf; + void get_3d_image_size_sf(unsigned int element_number, int *ndimslow, int *ndimmid, int *ndimfast){ + unsigned int reserved; + size_t inslow, inmid, infast; + reserved = 0; + cbf_failnez(cbf_get_3d_image_size_sf(self,reserved,element_number,&inslow,&inmid,&infast)); + *ndimslow = (int)inslow; /* FIXME - is that how to convert? */ + *ndimmid = (int)inmid; + *ndimfast = (int)infast; + } +""","get_3d_image_size_sf",["Integer element_number"],["size_t ndimslow","size_t ndimmid","size_t ndimfast"]], + + +"cbf_get_pixel_size" : [""" +%apply double *OUTPUT {double *psize} get_pixel_size; + void get_pixel_size(unsigned int element_number, + unsigned int axis_number, double *psize){ + cbf_failnez(cbf_get_pixel_size(self, + element_number, + axis_number, + psize)); + } +""","get_pixel_size",["Int element_number","Int axis_number"], + ["Float pixel_size"]] , + + +"cbf_get_pixel_size_fs" : [""" +%apply double *OUTPUT {double *psize} get_pixel_size; + void get_pixel_size_fs(unsigned int element_number, + unsigned int axis_number, double *psize){ + cbf_failnez(cbf_get_pixel_size_fs(self, + element_number, + axis_number, + psize)); + } +""","get_pixel_size_fs",["Int element_number","Int axis_number"], + ["Float pixel_size"]] , + + +"cbf_get_pixel_size_sf" : [""" +%apply double *OUTPUT {double *psize} get_pixel_size; + void get_pixel_size_sf(unsigned int element_number, + unsigned int axis_number, double *psize){ + cbf_failnez(cbf_get_pixel_size_sf(self, + element_number, + axis_number, + psize)); + } +""","get_pixel_size_sf",["Int element_number","Int axis_number"], + ["Float pixel_size"]] , + + +"cbf_set_pixel_size":[""" + void set_pixel_size (unsigned int element_number, + unsigned int axis_number, double psize){ + cbf_failnez(cbf_set_pixel_size(self, + element_number, + axis_number, + psize)); + } +""","set_pixel_size", + ["Int element_number","Int axis_number","Float pixel size"],[]], + + +"cbf_set_pixel_size_fs":[""" + void set_pixel_size_fs (unsigned int element_number, + unsigned int axis_number, double psize){ + cbf_failnez(cbf_set_pixel_size_fs(self, + element_number, + axis_number, + psize)); + } +""","set_pixel_size_fs", + ["Int element_number","Int axis_number","Float pixel size"],[]], + + +"cbf_set_pixel_size_sf":[""" + void set_pixel_size_sf (unsigned int element_number, + unsigned int axis_number, double psize){ + cbf_failnez(cbf_set_pixel_size_sf(self, + element_number, + axis_number, + psize)); + } +""","set_pixel_size_sf", + ["Int element_number","Int axis_number","Float pixel size"],[]], + + +"cbf_write_file" : [""" + void write_file(const char* filename, int ciforcbf, int headers, + int encoding){ + FILE *stream; + int readable; + /* Make readable false so we can close the file immediately */ + readable = 0; + if ( ! ( stream = fopen (filename, "w+b")) ){ + cbf_failnez(CBF_FILEOPEN); + } + else{ + cbf_failnez(cbf_write_file(self, stream, readable, + ciforcbf, headers, encoding)); + fclose(stream); + } + } +""","write_file",["String filename","Integer ciforcbf","Integer Headers", + "Integer encoding"],[]], + + +"cbf_write_widefile" : [""" + void write_widefile(const char* filename, int ciforcbf, int headers, + int encoding){ + FILE *stream; + int readable; + /* Make readable false so we can close the file immediately */ + readable = 0; + if ( ! ( stream = fopen (filename, "w+b")) ){ + cbf_failnez(CBF_FILEOPEN); + } + else{ + cbf_failnez(cbf_write_widefile(self, stream, readable, + ciforcbf, headers, encoding)); + fclose(stream); + + } + } +""","write_widefile",["String filename","Integer ciforcbf","Integer Headers", + "Integer encoding"],[]], + + +"cbf_read_template":[""" + void read_template(char* filename){ + /* CBFlib needs a stream that will remain open + hence DO NOT open from python */ + FILE *stream; + if ( ! ( stream = fopen (filename, "rb")) ){ + cbf_failnez(CBF_FILEOPEN); + } + else{ + cbf_failnez(cbf_read_template (self, stream)); } + } + +""","read_template",["String filename"],[]], + + +"cbf_read_file" : [""" + void read_file(char* filename, int headers){ + /* CBFlib needs a stream that will remain open + hence DO NOT open from python */ + FILE *stream; + if ( ! ( stream = fopen (filename, "rb")) ){ + cbf_failnez(CBF_FILEOPEN); + } + else{ + cbf_failnez(cbf_read_file(self, stream, headers)); + } + } +""","read_file",["String filename","Integer headers"],[]], + + + +"cbf_read_widefile" : [""" + void read_widefile(char* filename, int headers){ + /* CBFlib needs a stream that will remain open + hence DO NOT open from python */ + FILE *stream; + if ( ! ( stream = fopen (filename, "rb")) ){ + cbf_failnez(CBF_FILEOPEN); + } + else{ + cbf_failnez(cbf_read_widefile(self, stream, headers)); + } + } +""","read_widefile",["String filename","Integer headers"],[]], + + +"cbf_set_doublevalue":[""" + void set_doublevalue(const char *format, double number){ + cbf_failnez(cbf_set_doublevalue(self,format,number));} +""","set_doublevalue",["String format","Float number"],[]], + + +"cbf_require_integervalue":[""" +%apply int *OUTPUT {int *number} require_integervalue; + + void require_integervalue(int *number, int thedefault){ + + cbf_failnez(cbf_require_integervalue(self,number,thedefault)); + + } +""","require_integervalue", ["Int thedefault"],["Int number"]], + + +"cbf_require_doublevalue":[""" +%apply double *OUTPUT {double *number} require_doublevalue; +void require_doublevalue(double *number, double defaultvalue){ + cbf_failnez(cbf_require_doublevalue(self,number,defaultvalue)); +} +""","require_doublevalue",["Float Default"],["Float Number"]], + + +"cbf_require_column_value":[""" + const char* require_column_value(const char *columnname, + const char *defaultvalue){ + const char * result; + cbf_failnez(cbf_require_column_value(self,columnname, + &result,defaultvalue)); + return result; +} +""","require_column_value", + ["String columnnanme","String Default"],["String Name"]], + + +"cbf_require_column_doublevalue":[""" +%apply double *OUTPUT { double *number} require_column_doublevalue; +void require_column_doublevalue(const char *columnname, double * number, + const double defaultvalue){ + cbf_failnez(cbf_require_column_doublevalue(self, + columnname,number,defaultvalue)); + } +""","require_column_doublevalue",["String columnname","Float Value"], + ["Float defaultvalue"]], + + +"cbf_require_column_integervalue":[""" +%apply int *OUTPUT {int *number} require_column_integervalue; +void require_column_integervalue(const char *columnname, + int *number, const int defaultvalue){ + cbf_failnez(cbf_require_column_integervalue(self, + columnname, number,defaultvalue)); + } +""","require_column_integervalue",["String Columnvalue","Int default"], + ["Int Value"]], + + + + +"cbf_require_value" : [""" + + const char* require_value(const char* defaultvalue){ + const char * result; + cbf_failnez(cbf_require_value(self, &result, defaultvalue)); + return result; + } +""","require_value",["String defaultvalue"],['String Value']], + + +"cbf_require_diffrn_id":[""" + const char* require_diffrn_id(const char* defaultid){ + const char * id; + cbf_failnez(cbf_require_diffrn_id(self,&id,defaultid)); + return id; + } +""","require_diffrn_id", ["String Default_id"],["String diffrn_id"]], + + + +"cbf_get_polarization":[""" + /* Returns a pair of double values */ +%apply double *OUTPUT { double *in1, double *in2 }; + void get_polarization(double *in1,double *in2){ + cbf_failnez(cbf_get_polarization (self, in1, in2)); + } +""","get_polarization",[], + ["float polarizn_source_ratio","float polarizn_source_norm"]], + + +"cbf_set_polarization":[""" + void set_polarization (double polarizn_source_ratio, + double polarizn_source_norm){ + cbf_failnez(cbf_set_polarization(self, + polarizn_source_ratio, + polarizn_source_norm)); + } +""","set_polarization", + ["Float polarizn_source_ratio","Float polarizn_source_norm"],[]], + + +"cbf_get_divergence":[""" +%apply double *OUTPUT {double *div_x_source, double *div_y_source, + double *div_x_y_source } get_divergence; + void get_divergence(double *div_x_source, double *div_y_source, + double *div_x_y_source){ + cbf_failnez(cbf_get_divergence(self, + div_x_source, + div_y_source, + div_x_y_source)); + } +""","get_divergence",[], + ["Float div_x_source","Float div_y_source","Float div_x_y_source"]], + + +"cbf_set_divergence":[""" + void set_divergence ( double div_x_source, double div_y_source, + double div_x_y_source){ + cbf_failnez(cbf_set_divergence (self, div_x_source, + div_y_source,div_x_y_source)); + } +""","set_divergence", + ["Float div_x_source","Float div_y_source","Float div_x_y_source"],[]], + +"cbf_get_gain":[""" +%apply double *OUTPUT {double *gain, double *gain_esd} get_gain; + void get_gain (unsigned int element_number, double *gain, + double *gain_esd){ + cbf_failnez(cbf_get_gain (self, element_number, gain, gain_esd)); + } +""","get_gain", + [],["Float gain", "Float gain_esd"]], + + +"cbf_set_gain":[""" + void set_gain (unsigned int element_number, double gain, double gain_esd){ + cbf_failnez(cbf_set_gain (self, element_number, gain, gain_esd)); + } +""","set_gain",["Float gain", "Float gain_esd"],[]], + +"cbf_get_element_id":[""" + const char * get_element_id(unsigned int element_number){ + const char * result; + cbf_failnez(cbf_get_element_id (self, element_number, &result)); + return result; + } +""","get_element_id", ["Integer element_number"],["String"]], + + + +"cbf_set_axis_setting":[""" + void set_axis_setting(const char *axis_id, + double start, double increment){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_set_axis_setting(self,reserved, + axis_id,start,increment)); + } +""","set_axis_setting",["String axis_id", "Float start", "Float increment"], + []], + + + +"cbf_count_axis_ancestors":[""" +%apply int *OUTPUT {int *ancestors} count_axis_ancestors; + void count_axis_ancestors(const char *axis_id, + int *ancestors){ + unsigned int anc; + cbf_failnez(cbf_count_axis_ancestors(self,axis_id,&anc)); + *ancestors = anc; + } +""","count_axis_ancestors",["String axis_id"],["Integer"],], + + +"cbf_get_axis_ancestor":[""" + const char * get_axis_ancestor(const char *axis_id, + int ancestor_index){ + const char* anc; + cbf_failnez(cbf_get_axis_ancestor(self,axis_id, + (unsigned int)ancestor_index,&anc)); + return anc; + } +""","get_axis_ancestor",["String axis_id", "Integer ancestor_index"],["String"],], + +"cbf_get_axis_depends_on":[""" + const char * get_axis_depends_on(const char *axis_id){ + const char* dep_on; + cbf_failnez(cbf_get_axis_depends_on(self,axis_id, + &dep_on)); + return dep_on; + } +""","get_axis_depends_on",["String axis_id"],["String"],], + +"cbf_get_axis_equipment":[""" + const char * get_axis_equipment(const char *axis_id){ + const char* equip; + cbf_failnez(cbf_get_axis_equipment(self,axis_id, + &equip)); + return equip; + } +""","get_axis_equipment",["String axis_id"],["String"],], + + +"cbf_get_axis_equipment_component":[""" + const char * get_axis_equipment_component(const char *axis_id){ + const char* equip_comp; + cbf_failnez(cbf_get_axis_equipment_component(self,axis_id, + &equip_comp)); + return equip_comp; + } +""","get_axis_equipment_component",["String axis_id"],["String"],], + + +"cbf_get_axis_offset":[""" +%apply double *OUTPUT {double *offset1, double *offset2, double offset3} get_axis_offset; + void get_axis_offset(const char *axis_id, + double *offset1, double *offset2, double*offset3){ + cbf_failnez(cbf_get_axis_offset(self,axis_id, + offset1, offset2,offset3)); + } +""","get_axis_offset",["String axis_id"], + ["Float offset1", "Float offset2", "Float offset3"],], + +"cbf_get_axis_rotation":[""" +%apply double *OUTPUT {double *rotation} get_axis_rotation; + void get_axis_rotation(const char *axis_id, + double *rotation){ + cbf_failnez(cbf_get_axis_rotation(self,axis_id, + rotation)); + } +""","get_axis_rotation",["String axis_id"], + ["Float"],], + +"cbf_get_axis_rotation_axis":[""" + const char * get_axis_rotation_axis(const char *axis_id){ + const char* rot_axis; + cbf_failnez(cbf_get_axis_rotation_axis(self,axis_id, + &rot_axis)); + return rot_axis; + } +""","get_axis_rotation_axis",["String axis_id"],["String"],], + +"cbf_get_axis_type":[""" + const char * get_axis_type(const char *axis_id){ + cbf_axis_type axis_type; + cbf_failnez(cbf_get_axis_type(self,axis_id, + &axis_type)); + if (axis_type == CBF_TRANSLATION_AXIS) return "translation"; + if (axis_type == CBF_ROTATION_AXIS) return "rotation"; + return "general"; + } +""","get_axis_type",["String axis_id"],["String"],], + + +"cbf_get_axis_vector":[""" +%apply double *OUTPUT {double *vector1, double *vector2, double vector3} get_axis_vector; + void get_axis_vector(const char *axis_id, + double *vector1, double *vector2, double *vector3){ + cbf_failnez(cbf_get_axis_vector(self,axis_id, + vector1, vector2,vector3)); + } +""","get_axis_vector",["String axis_id"], + ["Float vector1", "Float vector2", "Float vector3"],], + +"cbf_get_axis_setting":[""" +%apply double *OUTPUT {double *start, double *increment} get_axis_setting; + void get_axis_setting(const char *axis_id, + double *start, double *increment){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_get_axis_setting(self,reserved,axis_id, + start,increment)); + } +""","get_axis_setting",["String axis_id"],["Float start", "Float increment"],], + + + +"cbf_get_datestamp":[""" +%apply int *OUTPUT {int *year, int *month, int *day, int *hour, + int *minute, double *second, int *timezone} get_datestamp; + void get_datestamp(int *year, int *month, int *day, int *hour, + int *minute, double *second, int *timezone){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_get_datestamp(self,reserved, + year,month,day,hour,minute,second,timezone)); + } +""","get_datestamp",[],["int year", "int month", "int day", "int hour", +"int minute", "double second", "int timezone"]], + + + +"cbf_set_datestamp":[""" + void set_datestamp(int year, int month, int day, int hour, + int minute, double second, int timezone, + double precision){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_set_datestamp(self,reserved, + year,month,day,hour,minute,second,timezone,precision)); + } +""","set_datestamp",["int year", "int month", "int day", "int hour", +"int minute", "double second", "int timezone","Float precision"],[]], + + +"cbf_get_timestamp":[""" +%apply double *OUTPUT {double *time} get_timestamp; +%apply int *OUTPUT {int *timezone} get_timestamp; + void get_timestamp(double *time, int *timezone){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_get_timestamp(self,reserved,time,timezone)); + } +""","get_timestamp",[],["Float time","Integer timezone"]], + + + +"cbf_set_timestamp":[""" + void set_timestamp(double time, int timezone, double precision){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_set_timestamp(self,reserved,time,timezone,precision)); + } +""","set_timestamp",["Float time","Integer timezone","Float precision"],[]], + + +"cbf_set_current_timestamp":[""" + void set_current_timestamp(int timezone){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_set_current_timestamp(self,reserved,timezone)); + } +""","set_current_timestamp",["Integer timezone"],[]], + + + +"cbf_get_overload":[""" +%apply double *OUTPUT {double *overload} get_overload; + void get_overload(unsigned int element_number, double *overload){ + cbf_failnez(cbf_get_overload(self,element_number,overload)); + } +""","get_overload",["Integer element_number"],["Float overload"]], + +"cbf_set_overload":[""" + void set_overload(unsigned int element_number, double overload){ + cbf_failnez(cbf_set_overload(self,element_number,overload)); + } +""","set_overload",["Integer element_number","Float overload"],[]], + + +"cbf_set_integration_time":[""" + void set_integration_time(double time){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_set_integration_time(self,reserved,time)); + } +""","set_integration_time",["Float time"],[]], + + + +"cbf_get_integration_time":[""" +%apply double *OUTPUT {double *time} get_integration_time; + void get_integration_time( double *time ){ + unsigned int reserved; + double tim; + reserved = 0; + cbf_failnez(cbf_get_integration_time(self,reserved,&tim)); + *time = tim; + } +""","get_integration_time",[],["Float time"]], + +"cbf_get_orientation_matrix":[""" +%apply double *OUTPUT {double *m0,double *m1,double *m2, +double *m3,double *m4, double *m5,double *m6, +double *m7,double *m8 } get_orientation_matrix; + void get_orientation_matrix( double *m0,double *m1, +double *m2,double *m3,double *m4,double *m5,double *m6, +double *m7,double *m8){ + double m[9]; + cbf_failnez(cbf_get_orientation_matrix(self,m)); + *m0 = m[0]; *m1=m[1] ; *m2=m[2] ; + *m3 = m[3]; *m4=m[4] ; *m5=m[5] ; + *m6 = m[6]; *m7=m[7] ; *m8=m[8] ; + } +""","get_orientation_matrix", + [],[ "Float matrix_%d"%(ind) for ind in range(9) ]], + +"cbf_get_unit_cell":[""" +%apply double *OUTPUT {double *a, double *b, double *c, + double *alpha, double *beta, double *gamma} get_unit_cell; + void get_unit_cell(double *a, double *b, double *c, + double *alpha, double *beta, double *gamma) { + double cell[6]; + cbf_failnez(cbf_get_unit_cell(self,cell,NULL)); + *a = cell[0]; + *b = cell[1]; + *c = cell[2]; + *alpha = cell[3]; + *beta = cell[4]; + *gamma = cell[5]; + } +""","get_unit_cell", + [],["Float a", "Float b", "Float c", "Float alpha", "Float beta", "Float gamma" ] ], + +"cbf_get_unit_cell_esd":[""" +%apply double *OUTPUT {double *a_esd, double *b_esd, double *c_esd, + double *alpha_esd, double *beta_esd, double *gamma_esd} get_unit_cell_esd; + void get_unit_cell_esd(double *a_esd, double *b_esd, double *c_esd, + double *alpha_esd, double *beta_esd, double *gamma_esd) { + double cell_esd[6]; + cbf_failnez(cbf_get_unit_cell(self,NULL,cell_esd)); + *a_esd = cell_esd[0]; + *b_esd = cell_esd[1]; + *c_esd = cell_esd[2]; + *alpha_esd = cell_esd[3]; + *beta_esd = cell_esd[4]; + *gamma_esd = cell_esd[5]; + } +""","get_unit_cell", + [],["doubleArray cell"] ], + + +"cbf_get_reciprocal_cell":[""" +%apply double *OUTPUT {double *astar, double *bstar, double *cstar, + double *alphastar, double *betastar, double *gammastar} get_reciprocal_cell; + void get_reciprocal_cell(double *astar, double *bstar, double *cstar, + double *alphastar, double *betastar, double *gammastar) { + double rcell[6]; + cbf_failnez(cbf_get_reciprocal_cell(self,rcell,NULL)); + *astar = rcell[0]; + *bstar = rcell[1]; + *cstar = rcell[2]; + *alphastar = rcell[3]; + *betastar = rcell[4]; + *gammastar = rcell[5]; + } +""","get_reciprocal_cell", + [],["Float astar", "Float bstar", "Float cstar", "Float alphastar", "Float betastar", "Float gammastar"] ], + +"cbf_get_reciprocal_cell_esd":[""" +%apply double *OUTPUT {double *a_esd, double *b_esd, double *c_esd, + double *alpha_esd, double *beta_esd, double *gamma_esd} get_reciprocal_cell_esd; + void get_reciprocal_cell_esd(double *a_esd, double *b_esd, double *c_esd, + double *alpha_esd, double *beta_esd, double *gamma_esd) { + double cell_esd[6]; + cbf_failnez(cbf_get_reciprocal_cell(self,NULL,cell_esd)); + *a_esd = cell_esd[0]; + *b_esd = cell_esd[1]; + *c_esd = cell_esd[2]; + *alpha_esd = cell_esd[3]; + *beta_esd = cell_esd[4]; + *gamma_esd = cell_esd[5]; + } +""","get_reciprocal_cell", + [],["doubleArray cell"] ], + + + +"cbf_set_unit_cell":[""" + void set_unit_cell(double cell[6]) { + cbf_failnez(cbf_set_unit_cell(self,cell,NULL)); + } +""","set_unit_cell", + ["double cell[6]"],[] ], + +"cbf_set_unit_cell_esd":[""" + void set_unit_cell_esd(double cell_esd[6]) { + cbf_failnez(cbf_set_unit_cell(self,NULL,cell_esd)); + } +""","set_unit_cell_esd", + ["double cell_esd[6]"],[] ], + + +"cbf_set_reciprocal_cell":[""" + void set_reciprocal_cell(double cell[6]) { + cbf_failnez(cbf_set_reciprocal_cell(self,cell,NULL)); + } +""","set_reciprocal_cell", + ["double cell[6]"],[] ], + +"cbf_set_reciprocal_cell_esd":[""" + void set_reciprocal_cell_esd(double cell_esd[6]) { + cbf_failnez(cbf_set_reciprocal_cell(self,NULL,cell_esd)); + } +""","set_reciprocal_cell_esd", + ["double cell_esd[6]"],[] ], + + +"cbf_set_tag_category":[""" + void set_tag_category(const char *tagname, const char* categoryname_in){ + cbf_failnez(cbf_set_tag_category(self,tagname, categoryname_in)); + } +""","set_tag_category",["String tagname","String categoryname_in"],[] ], + + + +"cbf_find_tag_category":[""" + + const char * find_tag_category(const char *tagname){ + const char * result; + cbf_failnez(cbf_find_tag_category(self,tagname, &result)); + return result; + } +""","find_tag_category",["String tagname"],["String categoryname"] ], + + +"cbf_require_tag_root":[""" +const char* require_tag_root(const char* tagname){ + const char* result; + cbf_failnez(cbf_require_tag_root(self,tagname,&result)); + return result; + } +""","require_tag_root",["String tagname"],["String tagroot"]], + +"cbf_find_tag_root":[""" +const char * find_tag_root(const char* tagname){ + const char* result; + cbf_failnez(cbf_find_tag_root(self,tagname,&result)); + return result; +} +""","find_tag_root",["String tagname"],["String tagroot"]], + + +"cbf_set_tag_root":[""" +void set_tag_root(const char* tagname, const char* tagroot_in){ + cbf_failnez(cbf_set_tag_root(self,tagname,tagroot_in)); +} +""","set_tag_root",["String tagname","String tagroot_in"],[]], + +"cbf_set_category_root":[""" +void set_category_root(const char* categoryname, const char* categoryroot){ + cbf_failnez(cbf_set_category_root(self,categoryname,categoryroot)); +} +""","set_category_root",["String categoryname","String categoryroot"],[]], + + +"cbf_find_category_root":[""" +const char* find_category_root(const char* categoryname){ + const char * result; + cbf_failnez(cbf_find_category_root(self,categoryname,&result)); + return result; +} +""","find_category_root",["String categoryname"],["String categoryroot"]], + + + + + + +"cbf_require_category_root":[""" +const char* require_category_root (const char* categoryname){ + const char* result; + cbf_failnez(cbf_require_category_root(self,categoryname, &result)); + return result; +} +""","cbf_require_category_root",["String Categoryname"],["String categoryroot"]], + + +"cbf_set_orientation_matrix":[""" + void set_orientation_matrix( double m0,double m1, +double m2,double m3,double m4,double m5,double m6, +double m7,double m8){ + double m[9]; + m[0] = m0; m[1]=m1 ; m[2]=m2 ; + m[3] = m3; m[4]=m4 ; m[5]=m5 ; + m[6] = m6; m[7]=m7 ; m[8]=m8 ; + cbf_failnez(cbf_get_orientation_matrix(self,m)); + } +""","set_orientation_matrix", + [ "Float matrix_%d"%(ind) for ind in range(9) ] ,[]], + +"cbf_set_bin_sizes":[""" + void set_bin_sizes( int element_number, double slowbinsize_in, double fastbinsize_in) { + cbf_failnez(cbf_set_bin_sizes(self,element_number,slowbinsize_in,fastbinsize_in)); + } +""","set_bin_sizes",["Integer element_number","Float slowbinsize_in","Float fastbinsize_in"],[] ], + + +"cbf_get_bin_sizes":[""" +%apply double *OUTPUT {double *slowbinsize,double *fastbinsize}; + void get_bin_sizes(int element_number, double *slowbinsize, double *fastbinsize) { + cbf_failnez(cbf_get_bin_sizes (self, (unsigned int)element_number, slowbinsize, fastbinsize)); + } +""","get_bin_sizes",["Integer element_number"],["Float slowbinsize","Float fastbinsize"] ], + + + +# cbfhandle dict functions UNTESTED + + +"cbf_require_dictionary":[""" +cbf_handle require_dictionary(){ + cbf_handle temp; + cbf_failnez(cbf_require_dictionary(self,&temp)); + return temp; +} +""","require_dictionary",[],["CBFHandle dictionary"]], + + +"cbf_get_dictionary":[""" +cbf_handle get_dictionary(){ + cbf_handle temp; + cbf_failnez(cbf_get_dictionary(self,&temp)); + return temp; +} +""","get_dictionary",[],["CBFHandle dictionary"]], + + + +"cbf_set_dictionary":[""" +void set_dictionary(cbf_handle other){ + cbf_failnez(cbf_set_dictionary(self,other)); +} +""","set_dictionary",["CBFHandle dictionary"],[]], + + + +"cbf_convert_dictionary":[""" +void convert_dictionary(cbf_handle other){ + cbf_failnez(cbf_convert_dictionary(self,other)); +} +""","convert_dictionary",["CBFHandle dictionary"],[]], + + +"cbf_construct_detector":[""" + cbf_detector construct_detector(unsigned int element_number){ + cbf_detector detector; + cbf_failnez(cbf_construct_detector(self,&detector,element_number)); + return detector; + } +""","construct_detector",["Integer element_number"],["pycbf detector object"]], + +"cbf_construct_reference_detector":[""" + cbf_detector construct_reference_detector(unsigned int element_number){ + cbf_detector detector; + cbf_failnez(cbf_construct_reference_detector(self,&detector,element_number)); + return detector; + } +""","construct_reference_detector",["Integer element_number"],["pycbf detector object"]], + +"cbf_require_reference_detector":[""" + cbf_detector require_reference_detector(unsigned int element_number){ + cbf_detector detector; + cbf_failnez(cbf_require_reference_detector(self,&detector,element_number)); + return detector; + } +""","require_reference_detector",["Integer element_number"],["pycbf detector object"]], + + +"cbf_construct_goniometer":[""" + cbf_goniometer construct_goniometer(){ + cbf_goniometer goniometer; + cbf_failnez(cbf_construct_goniometer(self,&goniometer)); + return goniometer; + } +""","construct_goniometer",[],["pycbf goniometer object"]], + +"cbf_construct_positioner":[""" + cbf_positioner construct_positioner(const char* axis_id){ + cbf_positioner positioner; + cbf_failnez(cbf_construct_positioner(self,&positioner,axis_id)); + return positioner; + } +""","construct_positioner",["String axis_id"],["pycbf positioner object"]], + +"cbf_construct_reference_positioner":[""" + cbf_positioner construct_reference_positioner(const char* axis_id){ + cbf_positioner positioner; + cbf_failnez(cbf_construct_reference_positioner(self,&positioner,axis_id)); + return positioner; + } +""","construct_reference_positioner",["String axis_id"],["pycbf positioner object"]], + +"cbf_get_axis_reference_poise":[""" + %apply double *OUTPUT {double *vector1, double *vector2, double *vector3, + double *offset1, double *offset2, double *offset3}; + + void get_axis_reference_poise(double *vector1, double *vector2, double *vector3, + double *offset1, double *offset2, double *offset3, + const char *axis_id){ + cbf_failnez(cbf_get_axis_reference_poise(self, + vector1, vector2, vector3, + offset1, offset2, offset3, + axis_id)); + } + +""","get_axis_reference_poise",["String axis_id"], + ["Float vector1","Float vector2","Float vector3", + "Float offset1","Float offset2","Float offset3"]], + +"cbf_get_axis_poise":[""" + %apply double *OUTPUT {double *vector1, double *vector2, double *vector3, + double *offset1, double *offset2, double *offset3, double *angle}; + + void get_axis_poise(double ratio, + double *vector1, double *vector2, double *vector3, + double *offset1, double *offset2, double *offset3, + double *angle, + const char *axis_id, const char *frame_id){ + cbf_failnez(cbf_get_axis_poise(self, ratio, + vector1, vector2, vector3, + offset1, offset2, offset3, angle, + axis_id, frame_id)); + } + +""","get_axis_poise", + ["Float ratio", "String axis_id", "String frame_id"], + ["Float vector1","Float vector2","Float vector3", + "Float offset1","Float offset2","Float offset3","Float angle"]], + +} + +cbf_positioner_specials = { + +} + +# Prelude to the next section of the nuweb doc + + +class cbfhandlewrapper: + def __init__(self): + self.code = """ +// Tell SWIG not to make constructor for these objects +%nodefault cbf_handle; +%nodefault cbf_handle_struct; +%nodefault cbf_node; + +// A couple of blockitem functions return CBF_NODETYPE +typedef enum +{ + CBF_UNDEFNODE, /* Undefined */ + CBF_LINK, /* Link */ + CBF_ROOT, /* Root */ + CBF_DATABLOCK, /* Datablock */ + CBF_SAVEFRAME, /* Saveframe */ + CBF_CATEGORY, /* Category */ + CBF_COLUMN /* Column */ +} +CBF_NODETYPE; + + +// Tell SWIG what the object is, so we can build the class + +typedef struct +{ + cbf_node *node; + + int row, search_row; +} cbf_handle_struct; + +typedef cbf_handle_struct *cbf_handle; + +typedef cbf_handle_struct handle; +%feature("autodoc","1"); + +%extend cbf_handle_struct{ // Tell SWIG to attach functions to the structure + + cbf_handle_struct(){ // Constructor + cbf_handle handle; + cbf_failnez(cbf_make_handle(&handle)); + return handle; + } + + ~cbf_handle_struct(){ // Destructor + cbf_failnez(cbf_free_handle(self)); + } +""" + self.tail = """ +}; // End of cbf_handle_struct +""" + # End of init function + def get_code(self): + return self.code+self.tail + def wrap(self,cfunc,prototype,args,docstring): + # print "cfunc: ", cfunc + pyfunc = cfunc.replace("cbf_","") + # Insert a comment for debugging this script + code = "\n/* cfunc %s pyfunc %s \n"%(cfunc,pyfunc) + for a in args: + code += " arg %s "%(a) + code += "*/\n\n" + # Make and free handle are done in the header so skip + if cfunc.find("cbf_make_handle")>-1 or cfunc.find("cbf_free_handle")>-1: + # Constructor and destructor done in headers + return + if args[0] != "cbf_handle handle": # Must be for cbfhandle + print "problem",cfunc,pyfunc,args + return + if len(args)==1: # Only takes CBFhandle arg + code+= docstringwrite(pyfunc,[],[],prototype,docstring) + code+= " void %s(void){\n"%(pyfunc) + code+= " cbf_failnez(%s(self));}\n"%(cfunc) + self.code=self.code+code + return + # Now case by case rather than writing a proper parser + # Special cases ... + not_found=0 + try: + code, pyname, input, output = cbfhandle_specials[cfunc] + self.code += docstringwrite(pyname,input,output, + prototype,docstring)+ code + return + except KeyError: + not_found = 1 + # print "KeyError" + except ValueError: + print "problem in",cfunc + for item in cbfhandle_specials[cfunc]: + print "***",item + raise + if len(args)==2: + if args[1].find("const char")>-1 and \ + args[1].find("*")>-1 and \ + args[1].find("**")==-1 : + # 1 input string + code += docstringwrite(pyfunc,[],["string"],prototype,docstring) + code += " void %s(const char* arg){\n"%(pyfunc) + code +=" cbf_failnez(%s(self,arg));}\n"%(cfunc) + self.code=self.code+code + return + if args[1].find("const char")>-1 and \ + args[1].find("**")>-1 :# return string + code += docstringwrite(pyfunc,["string"],[],prototype,docstring) + code += " const char* %s(void){\n"%(pyfunc) + code += " const char* result;\n" + code += " cbf_failnez(%s(self, &result));\n"%(cfunc) + code += " return result;}\n" + self.code=self.code+code + return + if args[1].find("unsigned int")>-1 and args[1].find("*")==-1: + # set uint + if args[1].find("reserved")>-1: + raise Exception("Setting reserved??? %s %s %s"%(pyfunc, + cfunc,str(args))) + code += docstringwrite(pyfunc,["Integer"],[],prototype,docstring) + code +=" void %s(unsigned int arg){\n"%(pyfunc) + code +=" cbf_failnez(%s(self,arg));}\n"%(cfunc) + self.code=self.code+code + return + if args[1].find("unsigned int *")>-1 and args[1].find("**")==-1: + # output uint + if args[1].find("reserved")>-1: + raise Exception("Setting reserved??? %s %s %s"%(pyfunc, + cfunc,str(args))) + code += docstringwrite(pyfunc,[],["Integer"],prototype,docstring) + code +=" unsigned int %s(void){\n"%(pyfunc) + code +=" unsigned int result;\n" + code +=" cbf_failnez(%s(self,&result));\n"%(cfunc) + code +=" return result;}\n" + self.code=self.code+code + return + # For the rest attempt to guess + if args[1].find("cbf")==-1: # but do not try the goniometer constructor + if args[1].find("*")>-1 and args[1].find("cbf")==-1: + # pointer used for returning something + type = args[1].split(" ")[0] + code += docstringwrite(pyfunc,[],[type.replace("*","")], + prototype,docstring) + code+= " "+type+" "+pyfunc+"(void){\n" + code+= " "+type+" result;\n" + code+= " cbf_failnez(%s(self,&result));\n"%(cfunc) + code+= " return result;}\n" + self.code=self.code+code + return + else: + var = args[1].split(" ")[-1] + code += docstringwrite(pyfunc,[],[args[1]],prototype,docstring) + code+= " void %s(%s){\n"%(pyfunc,args[1]) + code +=" cbf_failnez(%s(self,%s));}\n"%(cfunc,var) + self.code=self.code+code + return + if not_found: + code+= " void %s(void){\n"%(pyfunc) + code +=" cbf_failnez(CBF_NOTIMPLEMENTED);}\n" + self.code=self.code+code + print "Have not implemented: cbfhandle.%s"%(pyfunc) + print " ",cfunc + print " args:" + for a in args: + print " ",a + print + return + + + +cbf_handle_wrapper = cbfhandlewrapper() + + +cbf_goniometer_specials = { +"cbf_get_rotation_range":[""" +%apply double *OUTPUT {double *start,double *increment}; + + void get_rotation_range(double *start,double *increment){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_get_rotation_range (self,reserved, start,increment)); + } +""","get_rotation_range",[],["Float start","Float increment"]], + +"cbf_rotate_vector":[""" + +%apply double *OUTPUT {double *final1, double *final2, double *final3}; + + void rotate_vector (double ratio, double initial1, double initial2, + double initial3, double *final1, double *final2, double *final3){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_rotate_vector (self, reserved, ratio, initial1, + initial2, initial3, final1, final2, final3)); + } +""", "rotate_vector", + [ "double ratio", "double initial1","double initial2", "double initial3" ] , + [ "double final1" ,"double final2" , "double final3" ] ], + + + +"cbf_get_reciprocal":[""" +%apply double *OUTPUT {double *reciprocal1, double *reciprocal2, + double *reciprocal3}; + + void get_reciprocal (double ratio,double wavelength, + double real1, double real2, double real3, + double *reciprocal1, double *reciprocal2, + double *reciprocal3){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_get_reciprocal(self,reserved, ratio, wavelength, + real1, real2, real3,reciprocal1, + reciprocal2,reciprocal3)); + } +""", "get_reciprocal", + ["double ratio","double wavelength", + "double real1","double real2","double real3"], + ["double reciprocal1","double reciprocal2", "double reciprocal3" ]], + +"cbf_get_rotation_axis":[""" +%apply double *OUTPUT {double *vector1, double *vector2, double *vector3}; + +void get_rotation_axis (double *vector1, double *vector2, double *vector3){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_get_rotation_axis (self, reserved, + vector1, vector2, vector3)); + } +""","get_rotation_axis", [] , + ["double vector1", "double vector2", "double vector3"] ], + + "cbf_get_goniometer_poise":[""" + %apply double *OUTPUT {double * vector1, double * vector2, double * vector3, double * offset1, double * offset2, double * offset3, + double * angle}; + + void get_goniometer_poise(double ratio, + double * vector1, double * vector2, double * vector3, + double * offset1, double * offset2, double * offset3, + double * angle){ + cbf_failnez(cbf_get_goniometer_poise(self, ratio, + vector1, vector2, vector3, + offset1, offset2, offset3,angle)); + } + +""","get_goniometer_poise",["Float ratio"], + ["Float vector1","Float vector2","Float vector3", + "Float offset1","Float offset2","Float offset3", + "Float angle"]], + + +} + + +class cbfgoniometerwrapper: + def __init__(self): + self.code = """ +// Tell SWIG not to make constructor for these objects +%nodefault cbf_positioner_struct; +%nodefault cbf_goniometer; +%nodefault cbf_axis_struct; + +// Tell SWIG what the object is, so we can build the class +typedef struct +{ + double matrix [3][4]; + + cbf_axis_struct *axis; + + size_t axes; + + int matrix_is_valid; + + double matrix_ratio_used; + + size_t axis_index_limit; + +} +cbf_positioner_struct; + +typedef cbf_positioner_struct *cbf_positioner; +typedef cbf_positioner_struct *cbf_goniometer; + + +%feature("autodoc","1"); + +%extend cbf_positioner_struct{// Tell SWIG to attach functions to the structure + + cbf_positioner_struct(){ // Constructor + // DO NOT CONSTRUCT WITHOUT A CBFHANDLE + cbf_failnez(CBF_ARGUMENT); + return NULL; /* Should never be executed */ + } + + ~cbf_positioner_struct(){ // Destructor + cbf_failnez(cbf_free_positioner(self)); + } +""" + self.tail = """ +}; // End of cbf_positioner +""" + def wrap(self,cfunc,prototype,args,docstring): + if cfunc.find("cbf_free_goniometer")>-1: + return + try: + code, pyname, input, output = cbf_goniometer_specials[cfunc] + self.code += docstringwrite(pyname,input,output, + prototype,docstring)+ code + except KeyError: + print "TODO: Goniometer:",prototype + def get_code(self): + return self.code+self.tail + + +cbf_goniometer_wrapper = cbfgoniometerwrapper() + + + +cbf_detector_specials = { +"cbf_get_pixel_normal":[""" +%apply double *OUTPUT {double *normal1, double *normal2, double *normal3}; + void get_pixel_normal ( double index1, double index2, + double *normal1, double *normal2, double *normal3){ + cbf_failnez(cbf_get_pixel_normal(self, + index1,index2,normal1,normal2,normal3)); + } + +""","get_pixel_normal",["double index1","double index2"] , + ["double normal1","double normal2", "double normal3" ] ], + +"cbf_get_pixel_normal_fs":[""" +%apply double *OUTPUT {double *normal1, double *normal2, double *normal3}; + void get_pixel_normal_fs ( double indexfast, double indexslow, + double *normal1, double *normal2, double *normal3){ + cbf_failnez(cbf_get_pixel_normal_fs(self, + indexfast,indexslow,normal1,normal2,normal3)); + } + +""","get_pixel_normal_fs",["double indexfast","double indexslow"] , + ["double normal1","double normal2", "double normal3" ] ], + + +"cbf_get_pixel_normal_sf":[""" +%apply double *OUTPUT {double *normal1, double *normal2, double *normal3}; + void get_pixel_normal_sf ( double indexslow, double indexfast, + double *normal1, double *normal2, double *normal3){ + cbf_failnez(cbf_get_pixel_normal_sf(self, + indexslow,indexfast,normal1,normal2,normal3)); + } + +""","get_pixel_normal_sf",["double indexslow","double indexfast"] , + ["double normal1","double normal2", "double normal3" ] ], + + +"cbf_get_detector_axis_slow":[""" +%apply double *OUTPUT {double *slowaxis1, double *slowaxis2, double *slowaxis3}; + void get_detector_axis_slow ( double *slowaxis1, double *slowaxis2, double *slowaxis3){ + cbf_failnez(cbf_get_detector_axis_slow(self, + slowaxis1,slowaxis2,slowaxis3)); + } + +""","get_detector_axis_slow", [ ], + ["double slowaxis1","double slowaxis2", "double slowaxis3" ] ], + +"cbf_get_detector_axis_fast":[""" +%apply double *OUTPUT {double *fastaxis1, double *fastaxis2, double *fastaxis3}; + void get_detector_axis_fast ( double *fastaxis1, double *fastaxis2, double *fastaxis3){ + cbf_failnez(cbf_get_detector_axis_fast(self, + fastaxis1,fastaxis2,fastaxis3)); + } + +""","get_detector_axis_fast", [ ], + ["double fastaxis1","double fastaxis2", "double fastaxis3" ] ], + +"cbf_get_detector_axes":[""" +%apply double *OUTPUT {double *slowaxis1, double *slowaxis2, double *slowaxis3, + double *fastaxis1, double *fastaxis2, double *fastaxis3}; + void get_detector_axes ( double *slowaxis1, double *slowaxis2, double *slowaxis3, + double *fastaxis1, double *fastaxis2, double *fastaxis3){ + cbf_failnez(cbf_get_detector_axes(self, + slowaxis1,slowaxis2,slowaxis3, + fastaxis1,fastaxis2,fastaxis3)); + } + +""","get_detector_axes", [ ], + ["double slowaxis1","double slowaxis2", "double slowaxis3", + "double fastaxis1","double fastaxis2", "double fastaxis3" ] ], + +"cbf_get_detector_axes_fs":[""" +%apply double *OUTPUT {double *slowaxis1, double *slowaxis2, double *slowaxis3, + double *fastaxis1, double *fastaxis2, double *fastaxis3}; + void get_detector_axes_fs ( double *fastaxis1, double *fastaxis2, double *fastaxis3, + double *slowaxis1, double *slowaxis2, double *slowaxis3){ + cbf_failnez(cbf_get_detector_axes(self, + slowaxis1,slowaxis2,slowaxis3, + fastaxis1,fastaxis2,fastaxis3)); + } + +""","get_detector_axes", [ ], + ["double fastaxis1","double fastaxis2", "double fastaxis3", + "double slowaxis1","double slowaxis2", "double slowaxis3"] ], + +"cbf_get_detector_axes_sf":[""" +%apply double *OUTPUT {double *slowaxis1, double *slowaxis2, double *slowaxis3, + double *fastaxis1, double *fastaxis2, double *fastaxis3}; + void get_detector_axes_sf ( double *slowaxis1, double *slowaxis2, double *slowaxis3, + double *fastaxis1, double *fastaxis2, double *fastaxis3){ + cbf_failnez(cbf_get_detector_axes(self, + slowaxis1,slowaxis2,slowaxis3, + fastaxis1,fastaxis2,fastaxis3)); + } + +""","get_detector_axes_sf", [ ], + ["double slowaxis1","double slowaxis2", "double slowaxis3", + "double fastaxis1","double fastaxis2", "double fastaxis3" ] ], + + +"cbf_get_detector_surface_axes":[""" + const char * get_detector_surface_axes (int index ){ + const char * axis_id1; + const char * axis_id2; + cbf_failnez(cbf_get_detector_surface_axes(self, + &axis_id1, &axis_id2)); + if (index == 0) return axis_id1; + if (index == 1) return axis_id2; + return "."; + } + + +""","cbf_get_detector_surface_axes", ["Integer index" ], + ["String" ] ], + + +"cbf_get_pixel_area":[""" +%apply double *OUTPUT{double *area,double *projected_area}; + void get_pixel_area(double index1, double index2, + double *area,double *projected_area){ + cbf_failnez(cbf_get_pixel_area (self, + index1, index2, area,projected_area)); + } +""","get_pixel_area",["double index1", "double index2"], + ["double area","double projected_area"] ], + + +"cbf_get_pixel_area_fs":[""" +%apply double *OUTPUT{double *area,double *projected_area}; + void get_pixel_area_fs(double indexfast, double indexslow, + double *area,double *projected_area){ + cbf_failnez(cbf_get_pixel_area_fs (self, + indexfast, indexslow, area,projected_area)); + } +""","get_pixel_area_fs",["double indexfast", "double indexslow"], + ["double area","double projected_area"] ], + + +"cbf_get_pixel_area_sf":[""" +%apply double *OUTPUT{double *area,double *projected_area}; + void get_pixel_area_sf(double indexslow, double indexfast, + double *area,double *projected_area){ + cbf_failnez(cbf_get_pixel_area_sf (self, + indexslow, indexfast, area,projected_area)); + } +""","get_pixel_area_sf",["double indexslow", "double indexfast"], + ["double area","double projected_area"] ], + + +"cbf_get_detector_distance":[""" +%apply double *OUTPUT {double *distance}; + void get_detector_distance (double *distance){ + cbf_failnez(cbf_get_detector_distance(self,distance)); + } +""","get_detector_distance",[],["double distance"]], + + +"cbf_get_detector_normal":[""" +%apply double *OUTPUT {double *normal1, double *normal2, double *normal3}; + void get_detector_normal(double *normal1, + double *normal2, + double *normal3){ + cbf_failnez(cbf_get_detector_normal(self, + normal1, normal2, normal3)); + } +""","get_detector_normal",[], +["double normal1", "double normal2", "double normal3"]], + + +"cbf_get_pixel_coordinates":[""" +%apply double *OUTPUT {double *coordinate1, + double *coordinate2, double *coordinate3}; + void get_pixel_coordinates(double index1, double index2, + double *coordinate1, + double *coordinate2, + double *coordinate3){ + cbf_failnez(cbf_get_pixel_coordinates(self, index1, index2, + coordinate1, coordinate2, coordinate3)); + } +""","get_pixel_coordinates",["double index1","double index2"], +["double coordinate1", "double coordinate2", "double coordinate3"] ], + + +"cbf_get_pixel_coordinates_fs":[""" +%apply double *OUTPUT {double *coordinate1, + double *coordinate2, double *coordinate3}; + void get_pixel_coordinates_fs(double indexfast, double indexslow, + double *coordinate1, + double *coordinate2, + double *coordinate3){ + cbf_failnez(cbf_get_pixel_coordinates_fs(self, indexfast, indexslow, coordinate1, coordinate2, coordinate3)); + } +""","get_pixel_coordinates_fs",["double indexfast","double indexslow"], +["double coordinate1", "double coordinate2", "double coordinate3"] ], + + +"cbf_get_pixel_coordinates_sf":[""" +%apply double *OUTPUT {double *coordinate1, + double *coordinate2, double *coordinate3}; + void get_pixel_coordinates_sf(double indexslow, double indexfast, + double *coordinate1, + double *coordinate2, + double *coordinate3){ + cbf_failnez(cbf_get_pixel_coordinates_sf(self, indexslow, indexfast, coordinate1, coordinate2, coordinate3)); + } +""","get_pixel_coordinates_sf",["double indexslow","double indexfast"], +["double coordinate1", "double coordinate2", "double coordinate3"] ], + + +"cbf_get_beam_center":[""" +%apply double *OUTPUT {double *index1, double *index2, + double *center1,double *center2}; + void get_beam_center(double *index1, double *index2, + double *center1,double *center2){ + cbf_failnez(cbf_get_beam_center(self, index1, index2, + center1, center2)); + } +""","get_beam_center",[], +["double index1", "double index2", "double center1","double center2"]], + + +"cbf_get_beam_center_fs":[""" +%apply double *OUTPUT {double *indexfast, double *indexslow, + double *centerfast,double *centerslow}; + void get_beam_center_fs(double *indexfast, double *indexslow, + double *centerfast,double *centerslow){ + cbf_failnez(cbf_get_beam_center_fs(self, indexfast, indexslow, + centerfast, centerslow)); + } +""","get_beam_center_fs",[], +["double indexfast", "double indexslow", "double centerfast","double centerslow"]], + + +"cbf_get_beam_center_sf":[""" +%apply double *OUTPUT {double *indexslow, double *indexfast, + double *centerslow,double *centerfast}; + void get_beam_center_sf(double *indexslow, double *indexfast, + double *centerslow,double *centerfast){ + cbf_failnez(cbf_get_beam_center_sf(self, indexslow, indexfast, + centerslow, centerfast)); + } +""","get_beam_center_sf",[], +["double indexslow", "double indexfast", "double centerslow","double centerfast"]], + + +"cbf_set_beam_center":[""" + void set_beam_center(double *indexslow, double *indexfast, + double *centerslow,double *centerfast){ + cbf_failnez(cbf_set_beam_center(self, indexslow, indexfast, + centerslow, centerfast)); + } +""","set_beam_center", +["double indexslow", "double indexfast", "double centerslow","double centerfast"],[]], + + +"cbf_set_beam_center_fs":[""" + void set_beam_center_fs(double *indexfast, double *indexslow, + double *centerfast,double *centerslow){ + cbf_failnez(cbf_set_beam_center_fs(self, indexfast, indexslow, + centerfast, centerslow)); + } +""","set_beam_center_fs", +["double indexfast", "double indexslow", "double centerfast","double centerslow"],[]], + + +"cbf_set_beam_center_sf":[""" + void set_beam_center_sf(double *indexslow, double *indexfast, + double *centerslow,double *centerfast){ + cbf_failnez(cbf_set_beam_center_sf(self, indexslow, indexfast, + centerslow, centerfast)); + } +""","set_beam_center_sf", +["double indexslow", "double indexfast", "double centerslow","double centerfast"],[]], + + +"cbf_set_reference_beam_center":[""" + void set_reference_beam_center(double *indexslow, double *indexfast, + double *centerslow,double *centerfast){ + cbf_failnez(cbf_set_reference_beam_center(self, indexslow, indexfast, + centerslow, centerfast)); + } +""","set_reference_beam_center", +["double indexslow", "double indexfast", "double centerslow","double centerfast"],[]], + + +"cbf_set_reference_beam_center_fs":[""" + void set_reference_beam_center_fs(double *indexfast, double *indexslow, + double *centerfast,double *centerslow){ + cbf_failnez(cbf_set_reference_beam_center_fs(self, indexfast, indexslow, + centerfast, centerslow)); + } +""","set_reference_beam_center_fs", +["double indexfast", "double indexslow", "double centerfast","double centerslow"],[]], + + +"cbf_set_reference_beam_center_sf":[""" + void set_reference_beam_center_sf(double *indexslow, double *indexfast, + double *centerslow,double *centerfast){ + cbf_failnez(cbf_set_reference_beam_center_sf(self, indexslow, indexfast, + centerslow, centerfast)); + } +""","set_reference_beam_center_sf", +["double indexslow", "double indexfast", "double centerslow","double centerfast"],[]], + + +"cbf_get_inferred_pixel_size" : [""" +%apply double *OUTPUT { double *psize } get_inferred_pixel_size; +void get_inferred_pixel_size(unsigned int axis_number, double* psize){ + cbf_failnez(cbf_get_inferred_pixel_size(self, axis_number, psize)); + } +""","get_inferred_pixel_size",["Int axis_number"],["Float pixel size"] ], + + +"cbf_get_inferred_pixel_size_fs" : [""" +%apply double *OUTPUT { double *psize } get_inferred_pixel_size; +void get_inferred_pixel_size_fs(unsigned int axis_number, double* psize){ + cbf_failnez(cbf_get_inferred_pixel_size_fs(self, axis_number, psize)); + } +""","get_inferred_pixel_size_fs",["Int axis_number"],["Float pixel size"] ], + + +"cbf_get_inferred_pixel_size_sf" : [""" +%apply double *OUTPUT { double *psize } get_inferred_pixel_size; +void get_inferred_pixel_size_sf(unsigned int axis_number, double* psize){ + cbf_failnez(cbf_get_inferred_pixel_size_sf(self, axis_number, psize)); + } +""","get_inferred_pixel_size_sf",["Int axis_number"],["Float pixel size"] ] + + +} + + +class cbfdetectorwrapper: + def __init__(self): + self.code = """ +// Tell SWIG not to make constructor for these objects +%nodefault cbf_detector_struct; +%nodefault cbf_detector; + +// Tell SWIG what the object is, so we can build the class +typedef struct +{ + cbf_positioner positioner; + + double displacement [2], increment [2]; + + size_t axes, index [2]; +} +cbf_detector_struct; + +typedef cbf_detector_struct *cbf_detector; + +%feature("autodoc","1"); + +%extend cbf_detector_struct{// Tell SWIG to attach functions to the structure + + cbf_detector_struct(){ // Constructor + // DO NOT CONSTRUCT WITHOUT A CBFHANDLE + cbf_failnez(CBF_ARGUMENT); + return NULL; /* Should never be executed */ + } + + ~cbf_detector_struct(){ // Destructor + cbf_failnez(cbf_free_detector(self)); + } +""" + self.tail = """ +}; // End of cbf_detector +""" + def wrap(self,cfunc,prototype,args,docstring): + if cfunc.find("cbf_free_detector")>-1: + return + try: + code, pyname, input, output = cbf_detector_specials[cfunc] + self.code += docstringwrite(pyname,input,output, + prototype,docstring)+ code + except KeyError: + print "TODO: Detector:",prototype + def get_code(self): + return self.code+self.tail + + +cbf_detector_wrapper = cbfdetectorwrapper() + + +class cbfpositionerwrapper: + def __init__(self): + self.code = """ +// Tell SWIG not to make constructor for these objects +%nodefault cbf_positioner_struct; +%nodefault cbf_positioner; + +// Tell SWIG what the object is, so we can build the class +typedef struct +{ + double matrix [3][4]; + + cbf_axis_struct *axis; + + size_t axes; + + int matrix_is_valid, axes_are_connected; +} +cbf_positioner_struct; + +typedef cbf_positioner_struct *cbf_positioner; + +%feature("autodoc","1"); + +%extend cbf_positioner_struct{// Tell SWIG to attach functions to the structure + + cbf_positioner_struct(){ // Constructor + // DO NOT CONSTRUCT WITHOUT A CBFHANDLE + cbf_failnez(CBF_ARGUMENT); + return NULL; /* Should never be executed */ + } + + ~cbf_positioner_struct(){ // Destructor + cbf_failnez(cbf_free_positioner(self)); + } +""" + self.tail = """ +}; // End of cbf_positioner +""" + def wrap(self,cfunc,prototype,args,docstring): + if cfunc.find("cbf_free_positioner")>-1: + return + try: + code, pyname, input, output = cbf_positioner_specials[cfunc] + self.code += docstringwrite(pyname,input,output, + prototype,docstring)+ code + except KeyError: + print "TODO: Positioner:",prototype + def get_code(self): + return self.code+self.tail + +cbf_positioner_wrapper = cbfpositionerwrapper() + + +cbfgeneric_specials = { +"cbf_get_local_integer_byte_order":[""" +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); + %inline { + void get_local_integer_byte_order(char **bo, int *bolen) { + char * byteorder; + char * bot; + error_status = cbf_get_local_integer_byte_order(&byteorder); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + } + } +""","get_local_integer_byte_order",[],["char **bo", "int *bolen"]], + + +"cbf_get_local_real_format":[""" +%cstring_output_allocate_size(char **rf, int *rflen, free(*$1)); + %inline { + void get_local_real_format(char **rf, int *rflen) { + char * real_format; + char * rft; + error_status = cbf_get_local_real_format(&real_format); + *rflen = strlen(real_format); + if (!(rft = (char *)malloc(*rflen))) {cbf_failnez(CBF_ALLOC)} + strncpy(rft,real_format,*rflen); + *rf = rft; + } + } +""","get_local_real_format",[],["char **rf", "int *rflen"]], + + +"cbf_get_local_real_byte_order":[""" +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); + %inline { + void get_local_real_byte_order(char **bo, int *bolen) { + char * byteorder; + char * bot; + error_status = cbf_get_local_real_byte_order(&byteorder); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + } + } +""","get_local_real_byte_order",[],["char **bo", "int *bolen"]], + + +"cbf_compute_cell_volume":[""" + +%apply double *OUTPUT {double *volume}; + %inline { + void compute_cell_volume(double cell[6], double *volume) { + cbf_failnez(cbf_compute_cell_volume(cell,volume)); + } + } +""","compute_cell_volume",["double cell[6]"],["Float volume"]], + + +"cbf_compute_reciprocal_cell":[""" +%apply double *OUTPUT {double *astar, double *bstar, double *cstar, + double *alphastar, double *betastar, double *gammastar}; + %inline { + void compute_reciprocal_cell(double cell[6], double *astar, double *bstar, double *cstar, + double *alphastar, double *betastar, double *gammastar) { + double rcell[6]; + cbf_failnez(cbf_compute_reciprocal_cell(cell,rcell)); + *astar = rcell[0]; + *bstar = rcell[1]; + *cstar = rcell[2]; + *alphastar = rcell[3]; + *betastar = rcell[4]; + *gammastar = rcell[5]; + } + } + +""","compute_reciprocal_cell",["double cell[6]"], +["Float astar", "Float bstar", "Float cstar", "Float alphastar", "Float betastar", "Float gammastar"] ], + +"cbf_airy_disk":[""" +%apply double *OUTPUT {double *value}; +%inline { +void airy_disk(double x, double y, double cenx, double ceny, +double volume, double fwhm, double *value) { +cbf_failnez(cbf_airy_disk(x,y,cenx,ceny,volume,fwhm,value)); +} +} + +""","airy_disk",["double x", "double y", "double cenx", "double ceny", "double volume", "double fwhm"], +["Float value"] ], + +"cbf_airy_disk_volume":[""" +%apply double *OUTPUT {double *volumeout}; +%inline { +void airy_disk_volume(double xlo, double ylo, double xhi, double yhi, +double cenx, double ceny, double volumein, double fwhm, double * volumeout) { +cbf_failnez(cbf_airy_disk_volume(xlo,ylo,xhi,yhi,cenx,ceny,volumein,fwhm,volumeout)); +} +} + +""","airy_disk_volume",["double xlo", "double ylo", "double xhi", "double yhi", "double cenx", "double ceny", "double volumein", "double fwhm"], +["Float volumeout"] ] + + +} + + + + +class genericwrapper: + def __init__(self): + self.code = """ +// Start of generic functions +%feature("autodoc","1"); +""" + self.tail = "// End of generic functions\n" + def get_code(self): + return self.code + self.tail + def wrap(self,cfunc,prototype,args,docstring): + pyfunc = cfunc.replace("cbf_","") + # Insert a comment for debugging this script + code = "\n/* cfunc %s pyfunc %s \n"%(cfunc,pyfunc) + for a in args: + code += " arg %s "%(a) + code += "*/\n\n" + self.code+=code + code = "" + not_found = 0 + try: + code, pyname, input, output = cbfgeneric_specials[cfunc] + self.code += docstringwrite(pyname,input,output, + prototype,docstring)+ code + return + except KeyError: + not_found = 1 + # print "KeyError" + except ValueError: + print "problem in generic",cfunc + for item in cbfgeneric_specials[cfunc]: + print "***",item + raise + if len(args)==1 and args[0].find("char")>-1 and \ + args[0].find("**")>-1 :# return string + # first write the c code and inline it + code += docstringwrite(pyfunc,[],["string"],prototype,docstring) + code += "%%inline %%{\n char* %s(void);\n"%(pyfunc) + code += " char* %s(void){\n"%(pyfunc) + code += " char *r;\n" + code += " error_status = %s(&r);\n"%(cfunc) + code += " return r; }\n%}\n" + # now the thing to wrap is: + code += "char* %s(void);"%(pyfunc) + self.code=self.code+code + return + +# code+= " void %s(void){\n"%(pyfunc) +# code +=" cbf_failnez(CBF_NOTIMPLEMENTED);}\n" +# self.code=self.code+code + print "Have not implemented:" + for s in [cfunc, pyfunc] + args: + print "\t",s + print + return + + +generic_wrapper = genericwrapper() + + +def generate_wrappers(name_dict): + names = name_dict.keys() + for cname in names: + prototype = name_dict[cname][0] + docstring = name_dict[cname][1] + # print "Generate wrappers: ", "::",cname,"::", prototype,"::", docstring + # Check prototype begins with "int cbf_" + if prototype.find("int cbf_")!=0: + print "problem with:",prototype + # Get arguments from prototypes + try: + args = prototype.split("(")[1].split(")")[0].split(",") + args = [ s.lstrip().rstrip() for s in args ] # strip spaces off ends + # print "Args: ", args + except: + # print cname + # print prototype + raise + if args[0].find("cbf_handle")>=0: # This is for the cbfhandle object + cbf_handle_wrapper.wrap(cname,prototype,args,docstring) + if (cname=="cbf_get_unit_cell"): + cbf_handle_wrapper.wrap("cbf_get_unit_cell_esd",prototype,args,docstring) + if (cname=="cbf_get_reciprocal_cell"): + cbf_handle_wrapper.wrap("cbf_get_reciprocal_cell_esd",prototype,args,docstring) + if (cname=="cbf_set_unit_cell"): + cbf_handle_wrapper.wrap("cbf_set_unit_cell_esd",prototype,args,docstring) + if (cname=="cbf_set_reciprocal_cell"): + cbf_handle_wrapper.wrap("cbf_set_reciprocal_cell_esd",prototype,args,docstring) + continue + if args[0].find("cbf_goniometer")>=0: # This is for the cbfgoniometer + cbf_goniometer_wrapper.wrap(cname,prototype,args,docstring) + continue + if args[0].find("cbf_detector")>=0: # This is for the cbfdetector + cbf_detector_wrapper.wrap(cname,prototype,args,docstring) + continue + if args[0].find("cbf_positioner")>=0: # This is for the cbfpositioner + cbf_positioner_wrapper.wrap(cname,prototype,args,docstring) + continue + generic_wrapper.wrap(cname,prototype,args,docstring) + + +generate_wrappers(name_dict) +open("cbfgoniometerwrappers.i","w").write(cbf_goniometer_wrapper.get_code()) +open("cbfdetectorwrappers.i","w").write(cbf_detector_wrapper.get_code()) +open("cbfpositionerwrappers.i","w").write(cbf_positioner_wrapper.get_code()) +open("cbfhandlewrappers.i","w").write(cbf_handle_wrapper.get_code()) +open("cbfgenericwrappers.i","w").write(generic_wrapper.get_code()) + +print "End of output from make_pycbf.py" +print "\\end{verbatim}" diff --git a/py2cbf/make_pycbf.w b/py2cbf/make_pycbf.w new file mode 100644 index 00000000..4272b2af --- /dev/null +++ b/py2cbf/make_pycbf.w @@ -0,0 +1,3470 @@ +% make_pycbf.w +% nuweb source file used to create +% make_pycbf.py and to document it in pycbf.w +% +% pycbf - python binding to the CBFlib library +% +% Copyright (C) 2005 Jonathan Wright +% ESRF, Grenoble, France +% email: wright@@esrf.fr +% +% Revised for CBFlib 0.9 releases, Herbert J. Bernstein, 23 Aug 2010 +% Revised for CBFlib 0.9.2.8, Herbert J. Bernstein, 12 December 2012 +% Revised for CBFlib 0.9.3.2, Herbert J. Bernstein, 4 November 2013 +% Revised for CBFlib 0.9.5.8, Herbert J. Bernstein, 5 August 2015 +% +%###################################################################### +%# # +%# YOU MAY REDISTRIBUTE THE CBFLIB PACKAGE INCLUDING PYCBF UNDER THE # +%# TERMS OF THE GPL # +%# # +%# ALTERNATIVELY YOU MAY REDISTRIBUTE THE CBFLIB API INCLUDING PYCBF # +%# UNDER THE TERMS OF THE LGPL # +%# # +%###################################################################### +% +%########################### GPL NOTICES ############################## +%# # +%# This program is free software; you can redistribute it and/or # +%# modify it under the terms of the GNU General Public License as # +%# published by the Free Software Foundation; either version 2 of # +%# (the License, or (at your option) any later version. # +%# # +%# This program is distributed in the hope that it will be useful, # +%# but WITHOUT ANY WARRANTY; without even the implied warranty of # +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +%# GNU General Public License for more details. # +%# # +%# You should have received a copy of the GNU General Public License # +%# along with this program; if not, write to the Free Software # +%# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # +%# 02111-1307 USA # +%# # +%###################################################################### +% +%######################### LGPL NOTICES ############################### +%# # +%# This library is free software; you can redistribute it and/or # +%# modify it under the terms of the GNU Lesser General Public # +%# License as published by the Free Software Foundation; either # +%# version 2.1 of the License, or (at your option) any later version. # +%# # +%# This library is distributed in the hope that it will be useful, # +%# but WITHOUT ANY WARRANTY; without even the implied warranty of # +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # +%# Lesser General Public License for more details. # +%# # +%# You should have received a copy of the GNU Lesser General Public # +%# License along with this library; if not, write to the Free # +%# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # +%# MA 02110-1301 USA # +%# # +%###################################################################### +% +\section{Wrappers} + +The program that does the conversion from CBFlib.txt to the SWIG +input files is a python script named make\_pycbf.py. + +@o make_pycbf.py -i -t +@{ +print "\\begin{verbatim}" +print "This output comes from make_pycbf.py which generates the wrappers" +print "pycbf Copyright (C) 2005 Jonathan Wright, no warranty, LGPL" + + +###################################################################### +# # +# YOU MAY REDISTRIBUTE THE CBFLIB PACKAGE INCLUDING PYCBF UNDER THE # +# TERMS OF THE GPL # +# # +# ALTERNATIVELY YOU MAY REDISTRIBUTE THE CBFLIB API INCLUDING PYCBF # +# UNDER THE TERMS OF THE LGPL # +# # +###################################################################### + + +########################### GPL NOTICES ############################## +# # +# This program is free software; you can redistribute it and/or # +# modify it under the terms of the GNU General Public License as # +# published by the Free Software Foundation; either version 2 of # +# (the License, or (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # +# 02111-1307 USA # +# # +###################################################################### + + +######################### LGPL NOTICES ############################### +# # +# This library is free software; you can redistribute it and/or # +# modify it under the terms of the GNU Lesser General Public # +# License as published by the Free Software Foundation; either # +# version 2.1 of the License, or (at your option) any later version. # +# # +# This library is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # +# Lesser General Public License for more details. # +# # +# You should have received a copy of the GNU Lesser General Public # +# License along with this library; if not, write to the Free # +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # +# MA 02110-1301 USA # +# # +###################################################################### + + +# Get the ascii text as a list of strings +lines = open("CBFlib.txt","r").readlines() + +# Variables to hold the useful things we find in the file +docstring = "\n" +name="" + +# Flag to indicate we have not read anything useful yet +on=0 + + +# Dictionary of function prototypes and documentation, keyed by name in C. +name_dict = {} +i=-1 +debug = 0 +# Parse the text +prototypes = "" +while i=0 and on==1: + on=10 # Only try for ten lines after it say PROTOTYPE + continue + if line.find("#include")>=0: # why? + continue + if line.find("int cbf_")>=0: # We found a function + # keep going up to DESCRIPTION + prototypes+=""+lines[i].rstrip()+" " + # print lines[i].rstrip() + check=0 + while lines[i+1].find("DESCRIPTION")==-1 and lines[i+1].find("int cbf_")==-1: + i=i+1 + prototypes+=lines[i].rstrip()+" " # lose the \n + # print lines[i].rstrip() + check+=1 + if check>50: + raise Exception("Runaway prototype "+prototypes) + on=1 # Keep reading docstring + continue + if on > 1: # why? + on=on-1 + if line.find("3. File format")>=0 and on==1: + # Stop processing at section 3 + i=len(lines) + if on==1: + # Docstring ends at 2.xxx for next function or see also + # We are losing the see also information for now (needed the section + # breaks in the rtf file) + if len(line.strip())==0: + docstring+="\n" + continue + else: + if docstring[-1]=="\n": + docstring += line.lstrip().rstrip() + else: + docstring =docstring+" "+line.lstrip().rstrip() + if line.strip()[0] in [str(j) for j in range(9)] or \ + line.find("SEE ALSO")>=0 or \ + line.find("________")>=0 or \ + line.find("--------")>=0: + if len(docstring)>0: + # print "Prototypes: ",prototypes + docstring = docstring.replace("\"", " \\\"") # escape the quotes + for prototype in prototypes.strip().split(";")[:-1]: + name = prototype.split("(")[0].strip() + cname = name.split()[1].strip() + prototype = prototype.strip()+";" + name_dict[cname]=[prototype,docstring] + # print "Prototype: ","::",cname,"::",name,"::", prototype + prototypes = "" + # print "Found ",prototype + docstring="\n" + prototype="" + cname="" + on=0 + else: + raise Exception("bad docstring") + +# End of CBFlib.txt file - now generate wrapper code for swig + + +def myformat(s,l,indent=0,breakon=" "): + """ + Try to pretty print lines - this is a pain... + """ + lines = s.rstrip().split("\n") + out="" + for line in lines: + if len(line)==0: + continue # skip blank lines + if len(line)>l: + words = line.split(breakon) + newline=words[0] + if len(words)>1: + for word in words[1:]: + if len(newline)+len(word)+1 < l: + newline=newline+breakon+word + else: + out = out+newline+breakon+"\n"+indent*" " + newline=word + out += newline+"\n" + else: + out += "\n" + else: + out += line+"\n" # Last one + if out == "": + return "\n" + else: + return out + + +def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): + doc = "%feature(\"autodoc\", \"\nReturns : " + returns = "" + for out in output: + returns += out+"," + if len(returns)>0: + doc += myformat(returns[:-1],70,indent = 10,breakon=",") + else: + doc += "\n" + doc += "*args : " + takes = "" + for inp in input: + takes += inp+"," + if len(takes)>0: + doc += myformat(takes[:-1],70,indent = 10,breakon=",") + else: + doc += "\n" + doc += "\nC prototype: "+myformat(prototype,65,indent=16,breakon=",") + doc += "\nCBFLib documentation:\n"+myformat(cbflibdoc,70)+"\")" + doc += pyfunc+";\n" + return doc + + +cbfhandle_specials = { + + + +"cbf_get_integerarrayparameters":[""" +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement} + get_integerarrayparameters; + + void get_integerarrayparameters(int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement){ + unsigned int comp; + size_t elsiz, elem; + cbf_failnez(cbf_get_integerarrayparameters(self, + &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, + minelement, maxelement)); + *compression = comp; /* FIXME - does this convert in C? */ + *elsize = elsiz; + *elements = elem; + } +""","get_integerarrayparameters",[],["int compression","int binary_id", + "int elsize", "int elsigned", "int elunsigned", + "int elements", "int minelement", "int maxelement"]], + + +"cbf_get_integerarrayparameters_wdims":[""" +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement, + int *dimfast, int *dimmid, int *dimslow, int *padding} + get_integerarrayparameters_wdims; + + void get_integerarrayparameters_wdims(int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement, + char **bo, int *bolen, + int *dimfast, int *dimmid, int *dimslow, int *padding + ){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + cbf_failnez(cbf_get_integerarrayparameters_wdims(self, + &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, + minelement, maxelement, &byteorder,&df,&dm,&ds,&pd )); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +""","get_integerarrayparameters_wdims",[],["int compression","int binary_id", + "int elsize", "int elsigned", "int elunsigned", + "int elements", "int minelement", "int maxelement", "char **bo", "int *bolen", + "int dimfast", "int dimmid", "int dimslow", "int padding"]], + + +"cbf_get_integerarrayparameters_wdims_fs":[""" +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement, + int *dimfast, int *dimmid, int *dimslow, int *padding} + get_integerarrayparameters_wdims_fs; + + void get_integerarrayparameters_wdims_fs(int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement, + char **bo, int *bolen, + int *dimfast, int *dimmid, int *dimslow, int *padding + ){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + cbf_failnez(cbf_get_integerarrayparameters_wdims_fs(self, + &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, + minelement, maxelement, &byteorder,&df,&dm,&ds,&pd )); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +""","get_integerarrayparameters_wdims_fs",[],["int compression","int binary_id", + "int elsize", "int elsigned", "int elunsigned", + "int elements", "int minelement", "int maxelement", "char **bo", "int *bolen", + "int dimfast", "int dimmid", "int dimslow", "int padding"]], + + +"cbf_get_integerarrayparameters_wdims_sf":[""" +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement, + int *dimslow, int *dimmid, int *dimfast, int *padding} + get_integerarrayparameters_wdims_sf; + + void get_integerarrayparameters_wdims_sf(int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement, + char **bo, int *bolen, + int *dimslow, int *dimmid, int *dimfast, int *padding + ){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + cbf_failnez(cbf_get_integerarrayparameters_wdims_sf(self, + &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, + minelement, maxelement, &byteorder,&ds,&dm,&df,&pd )); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +""","get_integerarrayparameters_wdims_sf",[],["int compression","int binary_id", + "int elsize", "int elsigned", "int elunsigned", + "int elements", "int minelement", "int maxelement", "char **bo", "int *bolen", + "int dimslow", "int dimmid", "int dimfast", "int padding"]], + + +"cbf_get_realarrayparameters":[""" +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, int *elements} get_realarrayparameters; + + + void get_realarrayparameters(int *compression,int *binary_id, + int *elsize, int *elements){ + unsigned int comp; + size_t elsiz, elem; + cbf_failnez(cbf_get_realarrayparameters(self, + &comp ,binary_id, &elsiz, &elem )); + *compression = comp; /* FIXME - does this convert in C? */ + *elsize = elsiz; + *elements = elem; + } +""","get_realarrayparameters",[],["int compression","int binary_id", + "int elsize", "int elements"]], + + +"cbf_get_realarrayparameters_wdims":[""" +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, + int *elements, + int *dimslow, int *dimmid, int *dimfast, int *padding} + get_realarrayparameters_wdims; + + void get_realarrayparameters_wdims(int *compression,int *binary_id, + int *elsize, + int *elements, + char **bo, int *bolen, + int *dimfast, int *dimmid, int *dimslow, int *padding + ){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + cbf_failnez(cbf_get_realarrayparameters_wdims(self, + &comp,binary_id, &elsiz, &elem, + &byteorder,&df,&dm,&ds,&pd )); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +""","get_realarrayparameters_wdims",[],["int compression","int binary_id", + "int elsize", + "int elements", "char **bo", "int *bolen", + "int dimfast", "int dimmid", "int dimslow", "int padding"]], + + +"cbf_get_realarrayparameters_wdims_fs":[""" +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, + int *elements, + int *dimslow, int *dimmid, int *dimfast, int *padding} + get_realarrayparameters_wdims_fs; + + void get_realarrayparameters_wdims_fs(int *compression,int *binary_id, + int *elsize, + int *elements, + char **bo, int *bolen, + int *dimfast, int *dimmid, int *dimslow, int *padding + ){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + cbf_failnez(cbf_get_realarrayparameters_wdims_fs(self, + &comp,binary_id, &elsiz, &elem, + &byteorder,&df,&dm,&ds,&pd )); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +""","get_realarrayparameters_wdims_fs",[],["int compression","int binary_id", + "int elsize", + "int elements", "char **bo", "int *bolen", + "int dimfast", "int dimmid", "int dimslow", "int padding"]], + + +"cbf_get_realarrayparameters_wdims_sf":[""" +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, + int *elements, + int *dimslow, int *dimmid, int *dimfast, int *padding} + get_realarrayparameters_wdims_sf; + + void get_realarrayparameters_wdims_sf(int *compression,int *binary_id, + int *elsize, + int *elements, + char **bo, int *bolen, + int *dimslow, int *dimmid, int *dimfast, int *padding + ){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + cbf_failnez(cbf_get_realarrayparameters_wdims_sf(self, + &comp,binary_id, &elsiz, &elem, + &byteorder,&ds,&dm,&df,&pd )); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +""","get_realarrayparameters_wdims_sf",[],["int compression","int binary_id", + "int elsize", + "int elements", "char **bo", "int *bolen", + "int dimslow", "int dimmid", "int dimfast", "int padding"]], + + +"cbf_get_integerarray":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_integerarray_as_string; + +// Get the length correct + + void get_integerarray_as_string(char **s, int *slen){ + int binary_id, elsigned, elunsigned; + size_t elements, elements_read, elsize; + int minelement, maxelement; + unsigned int compression; + void * array; + *slen = 0; /* Initialise in case of problems */ + cbf_failnez(cbf_get_integerarrayparameters(self, &compression, + &binary_id, &elsize, &elsigned, &elunsigned, + &elements, &minelement, &maxelement)); + + if ((array=malloc(elsize*elements))) { + /* cbf_failnez (cbf_select_column(cbf,colnum)) */ + cbf_failnez (cbf_get_integerarray(self, &binary_id, + (void *)array, elsize, elsigned, + elements, &elements_read)); + + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*elements; + *s = (char *) array; + } +""","get_integerarray_as_string",[],["(Binary)String"] ], + + +"cbf_get_image":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_image_as_string; + +// Get the length correct + + void get_image_as_string(int element_number, char **s, int *slen, + int elsize, int elsign, int ndimslow, int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + cbf_failnez (cbf_get_image(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } +""","get_image_as_string",["int element_number", + "int elsize", "int elsign", "int ndimslow", "int ndimfast"],["(Binary)String"] ], + + +"cbf_get_image_fs":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_image_fs_as_string; + +// Get the length correct + + void get_image_fs_as_string(int element_number, char **s, int *slen, + int elsize, int elsign, int ndimfast, int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + cbf_failnez (cbf_get_image_fs(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimfast, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } +""","get_image_fs_as_string",["int element_number", + "int elsize", "int elsign", "int ndimfast", "int ndimslow"],["(Binary)String"] ], + + +"cbf_get_image_sf":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_image_fs_as_string; + +// Get the length correct + + void get_image_sf_as_string(int element_number, char **s, int *slen, + int elsize, int elsign, int ndimslow, int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + cbf_failnez (cbf_get_image_sf(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } +""","get_image_sf_as_string",["int element_number", + "int elsize", "int elsign", "int ndimslow", "int ndimfast"],["(Binary)String"] ], + + +"cbf_get_real_image":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_real_image_as_string; + +// Get the length correct + + void get_real_image_as_string(int element_number, char **s, int *slen, + int elsize, int ndimslow, int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + cbf_failnez (cbf_get_real_image(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } +""","get_real_image_as_string",["int element_number", + "int elsize", "int ndimslow", "int ndimfast"],["(Binary)String"] ], + + +"cbf_get_real_image_fs":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_real_image_fs_as_string; + +// Get the length correct + + void get_real_image_fs_as_string(int element_number, char **s, int *slen, + int elsize, int ndimfast, int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + cbf_failnez (cbf_get_real_image_fs(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimfast, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } +""","get_real_image_fs_as_string",["int element_number", + "int elsize", "int ndimfast", "int ndimslow"],["(Binary)String"] ], + + +"cbf_get_real_image_sf":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_real_image_sf_as_string; + +// Get the length correct + + void get_real_image_sf_as_string(int element_number, char **s, int *slen, + int elsize, int ndimslow, int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + cbf_failnez (cbf_get_real_image_sf(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } +""","get_real_image_sf_as_string",["int element_number", + "int elsize", "int ndimslow", "int ndimfast"],["(Binary)String"] ], + + +"cbf_get_3d_image":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_3d_image_as_string; + +// Get the length correct + + void get_3d_image_as_string(int element_number, char **s, int *slen, + int elsize, int elsign, int ndimfast, int ndimmid, int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + cbf_failnez (cbf_get_3d_image(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } +""","get_3d_image_as_string",["int element_number", + "int elsize", "int elsign", "int ndimslow", "int ndimmid", "int ndimfast"],["(Binary)String"] ], + + +"cbf_get_3d_image_fs":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_3d_image_fs_as_string; + +// Get the length correct + + void get_3d_image_fs_as_string(int element_number, char **s, int *slen, + int elsize, int elsign, int ndimfast, int ndimmid, int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + cbf_failnez (cbf_get_3d_image_fs(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } +""","get_3d_image_fs_as_string",["int element_number", + "int elsize", "int elsign", "int ndimfast", "int ndimmid", "int ndimslow"],["(Binary)String"] ], + + +"cbf_get_3d_image_sf":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_3d_image_sf_as_string; + +// Get the length correct + + void get_3d_image_sf_as_string(int element_number, char **s, int *slen, + int elsize, int elsign, int ndimfast, int ndimmid, int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + cbf_failnez (cbf_get_3d_image_sf(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } +""","get_3d_image_sf_as_string",["int element_number", + "int elsize", "int elsign", "int ndimslow", "int ndimmid", "int ndimfast"],["(Binary)String"] ], + + +"cbf_get_real_3d_image":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_real_3d_image_as_string; + +// Get the length correct + + void get_real_3d_image_as_string(int element_number, char **s, int *slen, + int elsize, int ndimslow, int ndimmid, int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + cbf_failnez (cbf_get_real_3d_image(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } +""","get_real_3d_image_as_string",["int element_number", + "int elsize", "int ndimslow", "int ndimmid", "int ndimfast"],["(Binary)String"] ], + + +"cbf_get_real_3d_image_fs":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_real_3d_image_fs_as_string; + +// Get the length correct + + void get_real_3d_image_fs_as_string(int element_number, char **s, int *slen, + int elsize, int ndimfast, int ndimmid, int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + cbf_failnez (cbf_get_real_3d_image_fs(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } +""","get_real_3d_image_fs_as_string",["int element_number", + "int elsize", "int ndimfast", "int ndimmid", "int ndimslow"],["(Binary)String"] ], + +"cbf_get_real_3d_image_sf":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_real_3d_image_sf_as_string; + +// Get the length correct + + void get_real_3d_image_sf_as_string(int element_number, char **s, int *slen, + int elsize, int ndimslow, int ndimmid, int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + cbf_failnez (cbf_get_real_3d_image_sf(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } +""","get_real_3d_image_sf_as_string",["int element_number", + "int elsize", "int ndimslow", "int ndimmid", "int ndimfast"],["(Binary)String"] ], + + +"cbf_get_realarray":[""" +// Ensure we free the local temporary + +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_realarray_as_string; + +// Get the length correct + + void get_realarray_as_string(char **s, int *slen){ + int binary_id; + size_t elements, elements_read, elsize; + unsigned int compression; + void * array; + *slen = 0; /* Initialise in case of problems */ + cbf_failnez(cbf_get_realarrayparameters(self, &compression, + &binary_id, &elsize, + &elements)); + + if ((array=malloc(elsize*elements))) { + /* cbf_failnez (cbf_select_column(cbf,colnum)) */ + cbf_failnez (cbf_get_realarray(self, &binary_id, + (void *)array, elsize, + elements, &elements_read)); + + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*elements; + *s = (char *) array; + } +""","get_realarray_as_string",[],["(Binary)String"] ], + + +"cbf_set_integerarray":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray; + + void set_integerarray(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elsigned, int elements){ + /* safety check on args */ + size_t els, ele; + void *array; + if(len == elsize*elements){ + array = data; + els = elsize; + ele = elements; + cbf_failnez(cbf_set_integerarray (self, compression, binary_id, + (void *) data, (size_t) elsize, elsigned, (size_t) elements)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_integerarray", +[ "int compression", "int binary_id","(binary) String data", + "int elsize", "int elsigned","int elements"],[]], + + +"cbf_set_integerarray_wdims":[""" + /* CBFlib must NOT modify the data string nor the byteorder string + which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray_wdims; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_integerarray_wdims; + + void set_integerarray_wdims(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elsigned, int elements, + char *bo, int bolen, int dimfast, int dimmid, int dimslow, int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + cbf_failnez(cbf_set_integerarray_wdims (self, compression, binary_id, + (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder, + (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_integerarray_wdims", +[ "int compression", "int binary_id","(binary) String data", + "int elsize", "int elsigned", "int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]], + + +"cbf_set_integerarray_wdims_sf":[""" + /* CBFlib must NOT modify the data string nor the byteorder string + which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray_wdims_sf; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_integerarray_wdims_sf; + + void set_integerarray_wdims_sf(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elsigned, int elements, + char *bo, int bolen, int dimslow, int dimmid, int dimfast, int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + cbf_failnez(cbf_set_integerarray_wdims_sf (self, compression, binary_id, + (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder, + (size_t)dimslow, (size_t)dimmid, (size_t)dimfast, (size_t)padding)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_integerarray_wdims_sf", +[ "int compression", "int binary_id","(binary) String data", + "int elsize","int elsigned","int elements", "String byteorder", "int dimslow", "int dimmid", "int dimfast", "int padding"],[]], + +"cbf_set_integerarray_wdims_fs":[""" + /* CBFlib must NOT modify the data string nor the byteorder string + which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray_wdims_fs; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_integerarray_wdims_fs; + + void set_integerarray_wdims_fs(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elsigned, int elements, + char *bo, int bolen, int dimfast, int dimmid, int dimslow, int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + cbf_failnez(cbf_set_integerarray_wdims_fs (self, compression, binary_id, + (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder, + (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_integerarray_wdims_fs", +[ "int compression", "int binary_id","(binary) String data", + "int elsize","int elsigned","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]], + + +"cbf_set_realarray":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray; + + void set_realarray(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elements){ + /* safety check on args */ + size_t els, ele; + void *array; + if(len == elsize*elements){ + array = data; + els = elsize; + ele = elements; + cbf_failnez(cbf_set_realarray (self, compression, binary_id, + (void *) data, (size_t) elsize, (size_t) elements)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_realarray", +[ "int compression", "int binary_id","(binary) String data", + "int elsize","int elements"],[]], + + +"cbf_set_realarray_wdims":[""" + /* CBFlib must NOT modify the data string nor the byteorder string + which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray_wdims; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_realarray_wdims; + + void set_realarray_wdims(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elements, + char *bo, int bolen, int dimfast, int dimmid, int dimslow, int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + cbf_failnez(cbf_set_realarray_wdims (self, compression, binary_id, + (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder, + (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_realarray_wdims", +[ "int compression", "int binary_id","(binary) String data", + "int elsize","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]], + + +"cbf_set_realarray_wdims_sf":[""" + /* CBFlib must NOT modify the data string nor the byteorder string + which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray_wdims_sf; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_realarray_wdims_sf; + + void set_realarray_wdims_sf(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elements, + char *bo, int bolen, int dimslow, int dimmid, int dimfast, int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + cbf_failnez(cbf_set_realarray_wdims_sf (self, compression, binary_id, + (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder, + (size_t) dimslow, (size_t) dimmid, (size_t) dimfast, (size_t)padding)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_realarray_wdims_sf", +[ "int compression", "int binary_id","(binary) String data", + "int elsize","int elements", "String byteorder", "int dimslow", "int dimmid", "int dimfast", "int padding"],[]], + + +"cbf_set_realarray_wdims_fs":[""" + /* CBFlib must NOT modify the data string nor the byteorder string + which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray_wdims_fs; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_realarray_wdims_fs; + + void set_realarray_wdims_fs(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elements, + char *bo, int bolen, int dimfast, int dimmid, int dimslow, int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + cbf_failnez(cbf_set_realarray_wdims_fs (self, compression, binary_id, + (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder, + (size_t) dimfast, (size_t) dimmid, (size_t) dimslow, (size_t)padding)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_realarray_wdims_fs", +[ "int compression", "int binary_id","(binary) String data", + "int elsize","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]], + + +"cbf_set_image":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_image; + + void set_image(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int elsign, int ndimslow, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_image", +[ "int element_number","int compression","(binary) String data", + "int elsize", "int elsign", "int dimslow", "int dimfast"],[]], + + +"cbf_set_image_fs":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_image; + + void set_image_fs(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int elsign, int ndimfast, int ndimslow){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimfast, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_image_fs", +[ "int element_number","int compression","(binary) String data", + "int elsize", "int elsign", "int dimfast", "int dimslow"],[]], + + +"cbf_set_image_sf":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_image_sf; + + void set_image_sf(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int elsign, int ndimslow, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_image_sf (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_image_sf", +[ "int element_number","int compression","(binary) String data", + "int elsize", "int elsign", "int dimslow", "int dimfast"],[]], + + +"cbf_set_real_image":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_image; + + void set_real_image(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int ndimslow, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_real_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_real_image", +[ "int element_number","int compression","(binary) String data", + "int elsize", "int dimslow", "int dimfast"],[]], + + +"cbf_set_real_image_fs":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_image; + + void set_real_image_fs(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int ndimfast, int ndimslow){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_real_image_fs (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimfast, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_real_image_fs", +[ "int element_number","int compression","(binary) String data", + "int elsize", "int dimfast", "int dimslow"],[]], + + +"cbf_set_real_image_sf":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_image_sf; + + void set_real_image_sf(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int ndimslow, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_real_image_sf (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_real_image_sf", +[ "int element_number","int compression","(binary) String data", + "int elsize", "int dimslow", "int dimfast"],[]], + + +"cbf_set_3d_image":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_3d_image; + + void set_3d_image(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int elsign, int ndimslow, int ndimmid, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_3d_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t) ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_3d_image", +[ "int element_number","int compression","(binary) String data", + "int elsize", "int elsign", "int dimslow", "int dimmid", "int dimfast"],[]], + + +"cbf_set_3d_image_fs":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_3d_image; + + void set_3d_image_fs(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int elsign, int ndimfast, int ndimmid, int ndimslow){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_3d_image_fs (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimfast, (size_t) ndimmid, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_3d_image_fs", +[ "int element_number","int compression","(binary) String data", + "int elsize", "int elsign", "int dimfast", "int dimmid", "int dimslow"],[]], + + +"cbf_set_3d_image_sf":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_3d_image; + + void set_3d_image_sf(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int elsign, int ndimslow, int ndimmid, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_3d_image_sf (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t) ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_3d_image_sf", +[ "int element_number","int compression","(binary) String data", + "int elsize", "int elsign", "int dimslow", "int dimmid", "int dimfast"],[]], + + +"cbf_set_real_3d_image":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_3d_image_sf; + + void set_real_3d_image(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int ndimslow, int ndimmid, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_real_3d_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_real_3d_image", +[ "int element_number","int compression","(binary) String data", + "int elsize", "int dimslow", "int dimmid", "int dimfast"],[]], + + +"cbf_set_real_3d_image_fs":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_3d_image_fs; + + void set_real_3d_image_fs(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int ndimfast, int ndimmid, int ndimslow){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_real_3d_image_fs (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_real_3d_image_fs", +[ "int element_number","int compression","(binary) String data", + "int elsize", "int dimfast", "int dimmid", "int dimslow"],[]], + + +"cbf_set_real_3d_image_sf":[""" + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_3d_image_sf; + + void set_real_3d_image_sf(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int ndimslow, int ndimmid, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_real_3d_image_sf (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +""","set_real_3d_image_sf", +[ "int element_number","int compression","(binary) String data", + "int elsize", "int dimslow", "int dimmid", "int dimfast"],[]], + + +"cbf_get_image_size": [""" +%apply int *OUTPUT {int *ndimslow, int *ndimfast} get_image_size; + void get_image_size(unsigned int element_number, int *ndimslow, int *ndimfast){ + unsigned int reserved; + size_t inslow, infast; + reserved = 0; + cbf_failnez(cbf_get_image_size(self,reserved,element_number,&inslow,&infast)); + *ndimslow = (int)inslow; + *ndimfast = (int)infast; + } +""","get_image_size",["Integer element_number"],["size_t ndim1","size_t ndim2"]], + + +"cbf_get_image_size_fs": [""" +%apply int *OUTPUT {int *ndimfast, int *ndimslow} get_image_size_fs; + void get_image_size_fs(unsigned int element_number, int *ndimfast, int *ndimslow){ + unsigned int reserved; + size_t infast, inslow; + reserved = 0; + cbf_failnez(cbf_get_image_size_fs(self,reserved,element_number,&infast,&inslow)); + *ndimfast = (int)infast; /* FIXME - is that how to convert? */ + *ndimslow = (int)inslow; + } +""","get_image_size_fs",["Integer element_number"],["size_t ndimfast","size_t ndimslow"]], + + +"cbf_get_image_size_sf": [""" +%apply int *OUTPUT {int *ndimslow, int *ndimfast} get_image_size_sf; + void get_image_size_sf(unsigned int element_number, int *ndimslow, int *ndimfast){ + unsigned int reserved; + size_t inslow, infast; + reserved = 0; + cbf_failnez(cbf_get_image_size(self,reserved,element_number,&inslow,&infast)); + *ndimslow = (int)inslow; + *ndimfast = (int)infast; + } +""","get_image_size_sf",["Integer element_number"],["size_t ndimslow","size_t ndimfast"]], + + +"cbf_get_3d_image_size": [""" +%apply int *OUTPUT {int *ndimslow, int *ndimmid, int *ndimfast} get_3d_image_size; + void get_3d_image_size(unsigned int element_number, int *ndimslow, int *ndimmid, int *ndimfast){ + unsigned int reserved; + size_t inslow, inmid, infast; + reserved = 0; + cbf_failnez(cbf_get_3d_image_size(self,reserved,element_number,&inslow,&inmid,&infast)); + *ndimslow = (int)inslow; /* FIXME - is that how to convert? */ + *ndimmid = (int)inmid; + *ndimfast = (int)infast; + } +""","get_3d_image_size",["Integer element_number"],["size_t ndimslow","size_t ndimmid","size_t ndimfast"]], + + +"cbf_get_3d_image_size_fs": [""" +%apply int *OUTPUT {int *ndimslow, int *ndimmid, int *ndimfast} get_3d_image_size; + void get_3d_image_size_fs(unsigned int element_number, int *ndimfast, int *ndimmid, int *ndimslow){ + unsigned int reserved; + size_t inslow, inmid, infast; + reserved = 0; + cbf_failnez(cbf_get_3d_image_size_fs(self,reserved,element_number,&infast,&inmid,&inslow)); + *ndimslow = (int)inslow; /* FIXME - is that how to convert? */ + *ndimmid = (int)inmid; + *ndimfast = (int)infast; + } +""","get_3d_image_size",["Integer element_number"],["size_t ndimfast","size_t ndimmid","size_t ndimslow"]], + + +"cbf_get_3d_image_size_sf": [""" +%apply int *OUTPUT {int *ndimslow, int *ndimmid, int *ndimfast} get_3d_image_size_sf; + void get_3d_image_size_sf(unsigned int element_number, int *ndimslow, int *ndimmid, int *ndimfast){ + unsigned int reserved; + size_t inslow, inmid, infast; + reserved = 0; + cbf_failnez(cbf_get_3d_image_size_sf(self,reserved,element_number,&inslow,&inmid,&infast)); + *ndimslow = (int)inslow; /* FIXME - is that how to convert? */ + *ndimmid = (int)inmid; + *ndimfast = (int)infast; + } +""","get_3d_image_size_sf",["Integer element_number"],["size_t ndimslow","size_t ndimmid","size_t ndimfast"]], + + +"cbf_get_pixel_size" : [""" +%apply double *OUTPUT {double *psize} get_pixel_size; + void get_pixel_size(unsigned int element_number, + unsigned int axis_number, double *psize){ + cbf_failnez(cbf_get_pixel_size(self, + element_number, + axis_number, + psize)); + } +""","get_pixel_size",["Int element_number","Int axis_number"], + ["Float pixel_size"]] , + + +"cbf_get_pixel_size_fs" : [""" +%apply double *OUTPUT {double *psize} get_pixel_size; + void get_pixel_size_fs(unsigned int element_number, + unsigned int axis_number, double *psize){ + cbf_failnez(cbf_get_pixel_size_fs(self, + element_number, + axis_number, + psize)); + } +""","get_pixel_size_fs",["Int element_number","Int axis_number"], + ["Float pixel_size"]] , + + +"cbf_get_pixel_size_sf" : [""" +%apply double *OUTPUT {double *psize} get_pixel_size; + void get_pixel_size_sf(unsigned int element_number, + unsigned int axis_number, double *psize){ + cbf_failnez(cbf_get_pixel_size_sf(self, + element_number, + axis_number, + psize)); + } +""","get_pixel_size_sf",["Int element_number","Int axis_number"], + ["Float pixel_size"]] , + + +"cbf_set_pixel_size":[""" + void set_pixel_size (unsigned int element_number, + unsigned int axis_number, double psize){ + cbf_failnez(cbf_set_pixel_size(self, + element_number, + axis_number, + psize)); + } +""","set_pixel_size", + ["Int element_number","Int axis_number","Float pixel size"],[]], + + +"cbf_set_pixel_size_fs":[""" + void set_pixel_size_fs (unsigned int element_number, + unsigned int axis_number, double psize){ + cbf_failnez(cbf_set_pixel_size_fs(self, + element_number, + axis_number, + psize)); + } +""","set_pixel_size_fs", + ["Int element_number","Int axis_number","Float pixel size"],[]], + + +"cbf_set_pixel_size_sf":[""" + void set_pixel_size_sf (unsigned int element_number, + unsigned int axis_number, double psize){ + cbf_failnez(cbf_set_pixel_size_sf(self, + element_number, + axis_number, + psize)); + } +""","set_pixel_size_sf", + ["Int element_number","Int axis_number","Float pixel size"],[]], + + +"cbf_write_file" : [""" + void write_file(const char* filename, int ciforcbf, int headers, + int encoding){ + FILE *stream; + int readable; + /* Make readable false so we can close the file immediately */ + readable = 0; + if ( ! ( stream = fopen (filename, "w+b")) ){ + cbf_failnez(CBF_FILEOPEN); + } + else{ + cbf_failnez(cbf_write_file(self, stream, readable, + ciforcbf, headers, encoding)); + fclose(stream); + } + } +""","write_file",["String filename","Integer ciforcbf","Integer Headers", + "Integer encoding"],[]], + + +"cbf_write_widefile" : [""" + void write_widefile(const char* filename, int ciforcbf, int headers, + int encoding){ + FILE *stream; + int readable; + /* Make readable false so we can close the file immediately */ + readable = 0; + if ( ! ( stream = fopen (filename, "w+b")) ){ + cbf_failnez(CBF_FILEOPEN); + } + else{ + cbf_failnez(cbf_write_widefile(self, stream, readable, + ciforcbf, headers, encoding)); + fclose(stream); + + } + } +""","write_widefile",["String filename","Integer ciforcbf","Integer Headers", + "Integer encoding"],[]], + + +"cbf_read_template":[""" + void read_template(char* filename){ + /* CBFlib needs a stream that will remain open + hence DO NOT open from python */ + FILE *stream; + if ( ! ( stream = fopen (filename, "rb")) ){ + cbf_failnez(CBF_FILEOPEN); + } + else{ + cbf_failnez(cbf_read_template (self, stream)); } + } + +""","read_template",["String filename"],[]], + + +"cbf_read_file" : [""" + void read_file(char* filename, int headers){ + /* CBFlib needs a stream that will remain open + hence DO NOT open from python */ + FILE *stream; + if ( ! ( stream = fopen (filename, "rb")) ){ + cbf_failnez(CBF_FILEOPEN); + } + else{ + cbf_failnez(cbf_read_file(self, stream, headers)); + } + } +""","read_file",["String filename","Integer headers"],[]], + + + +"cbf_read_widefile" : [""" + void read_widefile(char* filename, int headers){ + /* CBFlib needs a stream that will remain open + hence DO NOT open from python */ + FILE *stream; + if ( ! ( stream = fopen (filename, "rb")) ){ + cbf_failnez(CBF_FILEOPEN); + } + else{ + cbf_failnez(cbf_read_widefile(self, stream, headers)); + } + } +""","read_widefile",["String filename","Integer headers"],[]], + + +"cbf_set_doublevalue":[""" + void set_doublevalue(const char *format, double number){ + cbf_failnez(cbf_set_doublevalue(self,format,number));} +""","set_doublevalue",["String format","Float number"],[]], + + +"cbf_require_integervalue":[""" +%apply int *OUTPUT {int *number} require_integervalue; + + void require_integervalue(int *number, int thedefault){ + + cbf_failnez(cbf_require_integervalue(self,number,thedefault)); + + } +""","require_integervalue", ["Int thedefault"],["Int number"]], + + +"cbf_require_doublevalue":[""" +%apply double *OUTPUT {double *number} require_doublevalue; +void require_doublevalue(double *number, double defaultvalue){ + cbf_failnez(cbf_require_doublevalue(self,number,defaultvalue)); +} +""","require_doublevalue",["Float Default"],["Float Number"]], + + +"cbf_require_column_value":[""" + const char* require_column_value(const char *columnname, + const char *defaultvalue){ + const char * result; + cbf_failnez(cbf_require_column_value(self,columnname, + &result,defaultvalue)); + return result; +} +""","require_column_value", + ["String columnnanme","String Default"],["String Name"]], + + +"cbf_require_column_doublevalue":[""" +%apply double *OUTPUT { double *number} require_column_doublevalue; +void require_column_doublevalue(const char *columnname, double * number, + const double defaultvalue){ + cbf_failnez(cbf_require_column_doublevalue(self, + columnname,number,defaultvalue)); + } +""","require_column_doublevalue",["String columnname","Float Value"], + ["Float defaultvalue"]], + + +"cbf_require_column_integervalue":[""" +%apply int *OUTPUT {int *number} require_column_integervalue; +void require_column_integervalue(const char *columnname, + int *number, const int defaultvalue){ + cbf_failnez(cbf_require_column_integervalue(self, + columnname, number,defaultvalue)); + } +""","require_column_integervalue",["String Columnvalue","Int default"], + ["Int Value"]], + + + + +"cbf_require_value" : [""" + + const char* require_value(const char* defaultvalue){ + const char * result; + cbf_failnez(cbf_require_value(self, &result, defaultvalue)); + return result; + } +""","require_value",["String defaultvalue"],['String Value']], + + +"cbf_require_diffrn_id":[""" + const char* require_diffrn_id(const char* defaultid){ + const char * id; + cbf_failnez(cbf_require_diffrn_id(self,&id,defaultid)); + return id; + } +""","require_diffrn_id", ["String Default_id"],["String diffrn_id"]], + + + +"cbf_get_polarization":[""" + /* Returns a pair of double values */ +%apply double *OUTPUT { double *in1, double *in2 }; + void get_polarization(double *in1,double *in2){ + cbf_failnez(cbf_get_polarization (self, in1, in2)); + } +""","get_polarization",[], + ["float polarizn_source_ratio","float polarizn_source_norm"]], + + +"cbf_set_polarization":[""" + void set_polarization (double polarizn_source_ratio, + double polarizn_source_norm){ + cbf_failnez(cbf_set_polarization(self, + polarizn_source_ratio, + polarizn_source_norm)); + } +""","set_polarization", + ["Float polarizn_source_ratio","Float polarizn_source_norm"],[]], + + +"cbf_get_divergence":[""" +%apply double *OUTPUT {double *div_x_source, double *div_y_source, + double *div_x_y_source } get_divergence; + void get_divergence(double *div_x_source, double *div_y_source, + double *div_x_y_source){ + cbf_failnez(cbf_get_divergence(self, + div_x_source, + div_y_source, + div_x_y_source)); + } +""","get_divergence",[], + ["Float div_x_source","Float div_y_source","Float div_x_y_source"]], + + +"cbf_set_divergence":[""" + void set_divergence ( double div_x_source, double div_y_source, + double div_x_y_source){ + cbf_failnez(cbf_set_divergence (self, div_x_source, + div_y_source,div_x_y_source)); + } +""","set_divergence", + ["Float div_x_source","Float div_y_source","Float div_x_y_source"],[]], + +"cbf_get_gain":[""" +%apply double *OUTPUT {double *gain, double *gain_esd} get_gain; + void get_gain (unsigned int element_number, double *gain, + double *gain_esd){ + cbf_failnez(cbf_get_gain (self, element_number, gain, gain_esd)); + } +""","get_gain", + [],["Float gain", "Float gain_esd"]], + + +"cbf_set_gain":[""" + void set_gain (unsigned int element_number, double gain, double gain_esd){ + cbf_failnez(cbf_set_gain (self, element_number, gain, gain_esd)); + } +""","set_gain",["Float gain", "Float gain_esd"],[]], + +"cbf_get_element_id":[""" + const char * get_element_id(unsigned int element_number){ + const char * result; + cbf_failnez(cbf_get_element_id (self, element_number, &result)); + return result; + } +""","get_element_id", ["Integer element_number"],["String"]], + + + +"cbf_set_axis_setting":[""" + void set_axis_setting(const char *axis_id, + double start, double increment){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_set_axis_setting(self,reserved, + axis_id,start,increment)); + } +""","set_axis_setting",["String axis_id", "Float start", "Float increment"], + []], + + + +"cbf_count_axis_ancestors":[""" +%apply int *OUTPUT {int *ancestors} count_axis_ancestors; + void count_axis_ancestors(const char *axis_id, + int *ancestors){ + unsigned int anc; + cbf_failnez(cbf_count_axis_ancestors(self,axis_id,&anc)); + *ancestors = anc; + } +""","count_axis_ancestors",["String axis_id"],["Integer"],], + + +"cbf_get_axis_ancestor":[""" + const char * get_axis_ancestor(const char *axis_id, + int ancestor_index){ + const char* anc; + cbf_failnez(cbf_get_axis_ancestor(self,axis_id, + (unsigned int)ancestor_index,&anc)); + return anc; + } +""","get_axis_ancestor",["String axis_id", "Integer ancestor_index"],["String"],], + +"cbf_get_axis_depends_on":[""" + const char * get_axis_depends_on(const char *axis_id){ + const char* dep_on; + cbf_failnez(cbf_get_axis_depends_on(self,axis_id, + &dep_on)); + return dep_on; + } +""","get_axis_depends_on",["String axis_id"],["String"],], + +"cbf_get_axis_equipment":[""" + const char * get_axis_equipment(const char *axis_id){ + const char* equip; + cbf_failnez(cbf_get_axis_equipment(self,axis_id, + &equip)); + return equip; + } +""","get_axis_equipment",["String axis_id"],["String"],], + + +"cbf_get_axis_equipment_component":[""" + const char * get_axis_equipment_component(const char *axis_id){ + const char* equip_comp; + cbf_failnez(cbf_get_axis_equipment_component(self,axis_id, + &equip_comp)); + return equip_comp; + } +""","get_axis_equipment_component",["String axis_id"],["String"],], + + +"cbf_get_axis_offset":[""" +%apply double *OUTPUT {double *offset1, double *offset2, double offset3} get_axis_offset; + void get_axis_offset(const char *axis_id, + double *offset1, double *offset2, double*offset3){ + cbf_failnez(cbf_get_axis_offset(self,axis_id, + offset1, offset2,offset3)); + } +""","get_axis_offset",["String axis_id"], + ["Float offset1", "Float offset2", "Float offset3"],], + +"cbf_get_axis_rotation":[""" +%apply double *OUTPUT {double *rotation} get_axis_rotation; + void get_axis_rotation(const char *axis_id, + double *rotation){ + cbf_failnez(cbf_get_axis_rotation(self,axis_id, + rotation)); + } +""","get_axis_rotation",["String axis_id"], + ["Float"],], + +"cbf_get_axis_rotation_axis":[""" + const char * get_axis_rotation_axis(const char *axis_id){ + const char* rot_axis; + cbf_failnez(cbf_get_axis_rotation_axis(self,axis_id, + &rot_axis)); + return rot_axis; + } +""","get_axis_rotation_axis",["String axis_id"],["String"],], + +"cbf_get_axis_type":[""" + const char * get_axis_type(const char *axis_id){ + cbf_axis_type axis_type; + cbf_failnez(cbf_get_axis_type(self,axis_id, + &axis_type)); + if (axis_type == CBF_TRANSLATION_AXIS) return "translation"; + if (axis_type == CBF_ROTATION_AXIS) return "rotation"; + return "general"; + } +""","get_axis_type",["String axis_id"],["String"],], + + +"cbf_get_axis_vector":[""" +%apply double *OUTPUT {double *vector1, double *vector2, double vector3} get_axis_vector; + void get_axis_vector(const char *axis_id, + double *vector1, double *vector2, double *vector3){ + cbf_failnez(cbf_get_axis_vector(self,axis_id, + vector1, vector2,vector3)); + } +""","get_axis_vector",["String axis_id"], + ["Float vector1", "Float vector2", "Float vector3"],], + +"cbf_get_axis_setting":[""" +%apply double *OUTPUT {double *start, double *increment} get_axis_setting; + void get_axis_setting(const char *axis_id, + double *start, double *increment){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_get_axis_setting(self,reserved,axis_id, + start,increment)); + } +""","get_axis_setting",["String axis_id"],["Float start", "Float increment"],], + + + +"cbf_get_datestamp":[""" +%apply int *OUTPUT {int *year, int *month, int *day, int *hour, + int *minute, double *second, int *timezone} get_datestamp; + void get_datestamp(int *year, int *month, int *day, int *hour, + int *minute, double *second, int *timezone){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_get_datestamp(self,reserved, + year,month,day,hour,minute,second,timezone)); + } +""","get_datestamp",[],["int year", "int month", "int day", "int hour", +"int minute", "double second", "int timezone"]], + + + +"cbf_set_datestamp":[""" + void set_datestamp(int year, int month, int day, int hour, + int minute, double second, int timezone, + double precision){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_set_datestamp(self,reserved, + year,month,day,hour,minute,second,timezone,precision)); + } +""","set_datestamp",["int year", "int month", "int day", "int hour", +"int minute", "double second", "int timezone","Float precision"],[]], + + +"cbf_get_timestamp":[""" +%apply double *OUTPUT {double *time} get_timestamp; +%apply int *OUTPUT {int *timezone} get_timestamp; + void get_timestamp(double *time, int *timezone){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_get_timestamp(self,reserved,time,timezone)); + } +""","get_timestamp",[],["Float time","Integer timezone"]], + + + +"cbf_set_timestamp":[""" + void set_timestamp(double time, int timezone, double precision){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_set_timestamp(self,reserved,time,timezone,precision)); + } +""","set_timestamp",["Float time","Integer timezone","Float precision"],[]], + + +"cbf_set_current_timestamp":[""" + void set_current_timestamp(int timezone){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_set_current_timestamp(self,reserved,timezone)); + } +""","set_current_timestamp",["Integer timezone"],[]], + + + +"cbf_get_overload":[""" +%apply double *OUTPUT {double *overload} get_overload; + void get_overload(unsigned int element_number, double *overload){ + cbf_failnez(cbf_get_overload(self,element_number,overload)); + } +""","get_overload",["Integer element_number"],["Float overload"]], + +"cbf_set_overload":[""" + void set_overload(unsigned int element_number, double overload){ + cbf_failnez(cbf_set_overload(self,element_number,overload)); + } +""","set_overload",["Integer element_number","Float overload"],[]], + + +"cbf_set_integration_time":[""" + void set_integration_time(double time){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_set_integration_time(self,reserved,time)); + } +""","set_integration_time",["Float time"],[]], + + + +"cbf_get_integration_time":[""" +%apply double *OUTPUT {double *time} get_integration_time; + void get_integration_time( double *time ){ + unsigned int reserved; + double tim; + reserved = 0; + cbf_failnez(cbf_get_integration_time(self,reserved,&tim)); + *time = tim; + } +""","get_integration_time",[],["Float time"]], + +"cbf_get_orientation_matrix":[""" +%apply double *OUTPUT {double *m0,double *m1,double *m2, +double *m3,double *m4, double *m5,double *m6, +double *m7,double *m8 } get_orientation_matrix; + void get_orientation_matrix( double *m0,double *m1, +double *m2,double *m3,double *m4,double *m5,double *m6, +double *m7,double *m8){ + double m[9]; + cbf_failnez(cbf_get_orientation_matrix(self,m)); + *m0 = m[0]; *m1=m[1] ; *m2=m[2] ; + *m3 = m[3]; *m4=m[4] ; *m5=m[5] ; + *m6 = m[6]; *m7=m[7] ; *m8=m[8] ; + } +""","get_orientation_matrix", + [],[ "Float matrix_%d"%(ind) for ind in range(9) ]], + +"cbf_get_unit_cell":[""" +%apply double *OUTPUT {double *a, double *b, double *c, + double *alpha, double *beta, double *gamma} get_unit_cell; + void get_unit_cell(double *a, double *b, double *c, + double *alpha, double *beta, double *gamma) { + double cell[6]; + cbf_failnez(cbf_get_unit_cell(self,cell,NULL)); + *a = cell[0]; + *b = cell[1]; + *c = cell[2]; + *alpha = cell[3]; + *beta = cell[4]; + *gamma = cell[5]; + } +""","get_unit_cell", + [],["Float a", "Float b", "Float c", "Float alpha", "Float beta", "Float gamma" ] ], + +"cbf_get_unit_cell_esd":[""" +%apply double *OUTPUT {double *a_esd, double *b_esd, double *c_esd, + double *alpha_esd, double *beta_esd, double *gamma_esd} get_unit_cell_esd; + void get_unit_cell_esd(double *a_esd, double *b_esd, double *c_esd, + double *alpha_esd, double *beta_esd, double *gamma_esd) { + double cell_esd[6]; + cbf_failnez(cbf_get_unit_cell(self,NULL,cell_esd)); + *a_esd = cell_esd[0]; + *b_esd = cell_esd[1]; + *c_esd = cell_esd[2]; + *alpha_esd = cell_esd[3]; + *beta_esd = cell_esd[4]; + *gamma_esd = cell_esd[5]; + } +""","get_unit_cell", + [],["doubleArray cell"] ], + + +"cbf_get_reciprocal_cell":[""" +%apply double *OUTPUT {double *astar, double *bstar, double *cstar, + double *alphastar, double *betastar, double *gammastar} get_reciprocal_cell; + void get_reciprocal_cell(double *astar, double *bstar, double *cstar, + double *alphastar, double *betastar, double *gammastar) { + double rcell[6]; + cbf_failnez(cbf_get_reciprocal_cell(self,rcell,NULL)); + *astar = rcell[0]; + *bstar = rcell[1]; + *cstar = rcell[2]; + *alphastar = rcell[3]; + *betastar = rcell[4]; + *gammastar = rcell[5]; + } +""","get_reciprocal_cell", + [],["Float astar", "Float bstar", "Float cstar", "Float alphastar", "Float betastar", "Float gammastar"] ], + +"cbf_get_reciprocal_cell_esd":[""" +%apply double *OUTPUT {double *a_esd, double *b_esd, double *c_esd, + double *alpha_esd, double *beta_esd, double *gamma_esd} get_reciprocal_cell_esd; + void get_reciprocal_cell_esd(double *a_esd, double *b_esd, double *c_esd, + double *alpha_esd, double *beta_esd, double *gamma_esd) { + double cell_esd[6]; + cbf_failnez(cbf_get_reciprocal_cell(self,NULL,cell_esd)); + *a_esd = cell_esd[0]; + *b_esd = cell_esd[1]; + *c_esd = cell_esd[2]; + *alpha_esd = cell_esd[3]; + *beta_esd = cell_esd[4]; + *gamma_esd = cell_esd[5]; + } +""","get_reciprocal_cell", + [],["doubleArray cell"] ], + + + +"cbf_set_unit_cell":[""" + void set_unit_cell(double cell[6]) { + cbf_failnez(cbf_set_unit_cell(self,cell,NULL)); + } +""","set_unit_cell", + ["double cell[6]"],[] ], + +"cbf_set_unit_cell_esd":[""" + void set_unit_cell_esd(double cell_esd[6]) { + cbf_failnez(cbf_set_unit_cell(self,NULL,cell_esd)); + } +""","set_unit_cell_esd", + ["double cell_esd[6]"],[] ], + + +"cbf_set_reciprocal_cell":[""" + void set_reciprocal_cell(double cell[6]) { + cbf_failnez(cbf_set_reciprocal_cell(self,cell,NULL)); + } +""","set_reciprocal_cell", + ["double cell[6]"],[] ], + +"cbf_set_reciprocal_cell_esd":[""" + void set_reciprocal_cell_esd(double cell_esd[6]) { + cbf_failnez(cbf_set_reciprocal_cell(self,NULL,cell_esd)); + } +""","set_reciprocal_cell_esd", + ["double cell_esd[6]"],[] ], + + +"cbf_set_tag_category":[""" + void set_tag_category(const char *tagname, const char* categoryname_in){ + cbf_failnez(cbf_set_tag_category(self,tagname, categoryname_in)); + } +""","set_tag_category",["String tagname","String categoryname_in"],[] ], + + + +"cbf_find_tag_category":[""" + + const char * find_tag_category(const char *tagname){ + const char * result; + cbf_failnez(cbf_find_tag_category(self,tagname, &result)); + return result; + } +""","find_tag_category",["String tagname"],["String categoryname"] ], + + +"cbf_require_tag_root":[""" +const char* require_tag_root(const char* tagname){ + const char* result; + cbf_failnez(cbf_require_tag_root(self,tagname,&result)); + return result; + } +""","require_tag_root",["String tagname"],["String tagroot"]], + +"cbf_find_tag_root":[""" +const char * find_tag_root(const char* tagname){ + const char* result; + cbf_failnez(cbf_find_tag_root(self,tagname,&result)); + return result; +} +""","find_tag_root",["String tagname"],["String tagroot"]], + + +"cbf_set_tag_root":[""" +void set_tag_root(const char* tagname, const char* tagroot_in){ + cbf_failnez(cbf_set_tag_root(self,tagname,tagroot_in)); +} +""","set_tag_root",["String tagname","String tagroot_in"],[]], + +"cbf_set_category_root":[""" +void set_category_root(const char* categoryname, const char* categoryroot){ + cbf_failnez(cbf_set_category_root(self,categoryname,categoryroot)); +} +""","set_category_root",["String categoryname","String categoryroot"],[]], + + +"cbf_find_category_root":[""" +const char* find_category_root(const char* categoryname){ + const char * result; + cbf_failnez(cbf_find_category_root(self,categoryname,&result)); + return result; +} +""","find_category_root",["String categoryname"],["String categoryroot"]], + + + + + + +"cbf_require_category_root":[""" +const char* require_category_root (const char* categoryname){ + const char* result; + cbf_failnez(cbf_require_category_root(self,categoryname, &result)); + return result; +} +""","cbf_require_category_root",["String Categoryname"],["String categoryroot"]], + + +"cbf_set_orientation_matrix":[""" + void set_orientation_matrix( double m0,double m1, +double m2,double m3,double m4,double m5,double m6, +double m7,double m8){ + double m[9]; + m[0] = m0; m[1]=m1 ; m[2]=m2 ; + m[3] = m3; m[4]=m4 ; m[5]=m5 ; + m[6] = m6; m[7]=m7 ; m[8]=m8 ; + cbf_failnez(cbf_get_orientation_matrix(self,m)); + } +""","set_orientation_matrix", + [ "Float matrix_%d"%(ind) for ind in range(9) ] ,[]], + +"cbf_set_bin_sizes":[""" + void set_bin_sizes( int element_number, double slowbinsize_in, double fastbinsize_in) { + cbf_failnez(cbf_set_bin_sizes(self,element_number,slowbinsize_in,fastbinsize_in)); + } +""","set_bin_sizes",["Integer element_number","Float slowbinsize_in","Float fastbinsize_in"],[] ], + + +"cbf_get_bin_sizes":[""" +%apply double *OUTPUT {double *slowbinsize,double *fastbinsize}; + void get_bin_sizes(int element_number, double *slowbinsize, double *fastbinsize) { + cbf_failnez(cbf_get_bin_sizes (self, (unsigned int)element_number, slowbinsize, fastbinsize)); + } +""","get_bin_sizes",["Integer element_number"],["Float slowbinsize","Float fastbinsize"] ], + + + +# cbfhandle dict functions UNTESTED + + +"cbf_require_dictionary":[""" +cbf_handle require_dictionary(){ + cbf_handle temp; + cbf_failnez(cbf_require_dictionary(self,&temp)); + return temp; +} +""","require_dictionary",[],["CBFHandle dictionary"]], + + +"cbf_get_dictionary":[""" +cbf_handle get_dictionary(){ + cbf_handle temp; + cbf_failnez(cbf_get_dictionary(self,&temp)); + return temp; +} +""","get_dictionary",[],["CBFHandle dictionary"]], + + + +"cbf_set_dictionary":[""" +void set_dictionary(cbf_handle other){ + cbf_failnez(cbf_set_dictionary(self,other)); +} +""","set_dictionary",["CBFHandle dictionary"],[]], + + + +"cbf_convert_dictionary":[""" +void convert_dictionary(cbf_handle other){ + cbf_failnez(cbf_convert_dictionary(self,other)); +} +""","convert_dictionary",["CBFHandle dictionary"],[]], + + +"cbf_construct_detector":[""" + cbf_detector construct_detector(unsigned int element_number){ + cbf_detector detector; + cbf_failnez(cbf_construct_detector(self,&detector,element_number)); + return detector; + } +""","construct_detector",["Integer element_number"],["pycbf detector object"]], + +"cbf_construct_reference_detector":[""" + cbf_detector construct_reference_detector(unsigned int element_number){ + cbf_detector detector; + cbf_failnez(cbf_construct_reference_detector(self,&detector,element_number)); + return detector; + } +""","construct_reference_detector",["Integer element_number"],["pycbf detector object"]], + +"cbf_require_reference_detector":[""" + cbf_detector require_reference_detector(unsigned int element_number){ + cbf_detector detector; + cbf_failnez(cbf_require_reference_detector(self,&detector,element_number)); + return detector; + } +""","require_reference_detector",["Integer element_number"],["pycbf detector object"]], + + +"cbf_construct_goniometer":[""" + cbf_goniometer construct_goniometer(){ + cbf_goniometer goniometer; + cbf_failnez(cbf_construct_goniometer(self,&goniometer)); + return goniometer; + } +""","construct_goniometer",[],["pycbf goniometer object"]], + +"cbf_construct_positioner":[""" + cbf_positioner construct_positioner(const char* axis_id){ + cbf_positioner positioner; + cbf_failnez(cbf_construct_positioner(self,&positioner,axis_id)); + return positioner; + } +""","construct_positioner",["String axis_id"],["pycbf positioner object"]], + +"cbf_construct_reference_positioner":[""" + cbf_positioner construct_reference_positioner(const char* axis_id){ + cbf_positioner positioner; + cbf_failnez(cbf_construct_reference_positioner(self,&positioner,axis_id)); + return positioner; + } +""","construct_reference_positioner",["String axis_id"],["pycbf positioner object"]], + +"cbf_get_axis_reference_poise":[""" + %apply double *OUTPUT {double *vector1, double *vector2, double *vector3, + double *offset1, double *offset2, double *offset3}; + + void get_axis_reference_poise(double *vector1, double *vector2, double *vector3, + double *offset1, double *offset2, double *offset3, + const char *axis_id){ + cbf_failnez(cbf_get_axis_reference_poise(self, + vector1, vector2, vector3, + offset1, offset2, offset3, + axis_id)); + } + +""","get_axis_reference_poise",["String axis_id"], + ["Float vector1","Float vector2","Float vector3", + "Float offset1","Float offset2","Float offset3"]], + +"cbf_get_axis_poise":[""" + %apply double *OUTPUT {double *vector1, double *vector2, double *vector3, + double *offset1, double *offset2, double *offset3, double *angle}; + + void get_axis_poise(double ratio, + double *vector1, double *vector2, double *vector3, + double *offset1, double *offset2, double *offset3, + double *angle, + const char *axis_id, const char *frame_id){ + cbf_failnez(cbf_get_axis_poise(self, ratio, + vector1, vector2, vector3, + offset1, offset2, offset3, angle, + axis_id, frame_id)); + } + +""","get_axis_poise", + ["Float ratio", "String axis_id", "String frame_id"], + ["Float vector1","Float vector2","Float vector3", + "Float offset1","Float offset2","Float offset3","Float angle"]], + +} + +cbf_positioner_specials = { + +} + +# Prelude to the next section of the nuweb doc + + +class cbfhandlewrapper: + def __init__(self): + self.code = """ +// Tell SWIG not to make constructor for these objects +%nodefault cbf_handle; +%nodefault cbf_handle_struct; +%nodefault cbf_node; + +// A couple of blockitem functions return CBF_NODETYPE +typedef enum +{ + CBF_UNDEFNODE, /* Undefined */ + CBF_LINK, /* Link */ + CBF_ROOT, /* Root */ + CBF_DATABLOCK, /* Datablock */ + CBF_SAVEFRAME, /* Saveframe */ + CBF_CATEGORY, /* Category */ + CBF_COLUMN /* Column */ +} +CBF_NODETYPE; + + +// Tell SWIG what the object is, so we can build the class + +typedef struct +{ + cbf_node *node; + + int row, search_row; +} cbf_handle_struct; + +typedef cbf_handle_struct *cbf_handle; + +typedef cbf_handle_struct handle; +%feature("autodoc","1"); + +%extend cbf_handle_struct{ // Tell SWIG to attach functions to the structure + + cbf_handle_struct(){ // Constructor + cbf_handle handle; + cbf_failnez(cbf_make_handle(&handle)); + return handle; + } + + ~cbf_handle_struct(){ // Destructor + cbf_failnez(cbf_free_handle(self)); + } +""" + self.tail = """ +}; // End of cbf_handle_struct +""" + # End of init function + def get_code(self): + return self.code+self.tail + def wrap(self,cfunc,prototype,args,docstring): + # print "cfunc: ", cfunc + pyfunc = cfunc.replace("cbf_","") + # Insert a comment for debugging this script + code = "\n/* cfunc %s pyfunc %s \n"%(cfunc,pyfunc) + for a in args: + code += " arg %s "%(a) + code += "*/\n\n" + # Make and free handle are done in the header so skip + if cfunc.find("cbf_make_handle")>-1 or cfunc.find("cbf_free_handle")>-1: + # Constructor and destructor done in headers + return + if args[0] != "cbf_handle handle": # Must be for cbfhandle + print "problem",cfunc,pyfunc,args + return + if len(args)==1: # Only takes CBFhandle arg + code+= docstringwrite(pyfunc,[],[],prototype,docstring) + code+= " void %s(void){\n"%(pyfunc) + code+= " cbf_failnez(%s(self));}\n"%(cfunc) + self.code=self.code+code + return + # Now case by case rather than writing a proper parser + # Special cases ... + not_found=0 + try: + code, pyname, input, output = cbfhandle_specials[cfunc] + self.code += docstringwrite(pyname,input,output, + prototype,docstring)+ code + return + except KeyError: + not_found = 1 + # print "KeyError" + except ValueError: + print "problem in",cfunc + for item in cbfhandle_specials[cfunc]: + print "***",item + raise + if len(args)==2: + if args[1].find("const char")>-1 and \ + args[1].find("*")>-1 and \ + args[1].find("**")==-1 : + # 1 input string + code += docstringwrite(pyfunc,[],["string"],prototype,docstring) + code += " void %s(const char* arg){\n"%(pyfunc) + code +=" cbf_failnez(%s(self,arg));}\n"%(cfunc) + self.code=self.code+code + return + if args[1].find("const char")>-1 and \ + args[1].find("**")>-1 :# return string + code += docstringwrite(pyfunc,["string"],[],prototype,docstring) + code += " const char* %s(void){\n"%(pyfunc) + code += " const char* result;\n" + code += " cbf_failnez(%s(self, &result));\n"%(cfunc) + code += " return result;}\n" + self.code=self.code+code + return + if args[1].find("unsigned int")>-1 and args[1].find("*")==-1: + # set uint + if args[1].find("reserved")>-1: + raise Exception("Setting reserved??? %s %s %s"%(pyfunc, + cfunc,str(args))) + code += docstringwrite(pyfunc,["Integer"],[],prototype,docstring) + code +=" void %s(unsigned int arg){\n"%(pyfunc) + code +=" cbf_failnez(%s(self,arg));}\n"%(cfunc) + self.code=self.code+code + return + if args[1].find("unsigned int *")>-1 and args[1].find("**")==-1: + # output uint + if args[1].find("reserved")>-1: + raise Exception("Setting reserved??? %s %s %s"%(pyfunc, + cfunc,str(args))) + code += docstringwrite(pyfunc,[],["Integer"],prototype,docstring) + code +=" unsigned int %s(void){\n"%(pyfunc) + code +=" unsigned int result;\n" + code +=" cbf_failnez(%s(self,&result));\n"%(cfunc) + code +=" return result;}\n" + self.code=self.code+code + return + # For the rest attempt to guess + if args[1].find("cbf")==-1: # but do not try the goniometer constructor + if args[1].find("*")>-1 and args[1].find("cbf")==-1: + # pointer used for returning something + type = args[1].split(" ")[0] + code += docstringwrite(pyfunc,[],[type.replace("*","")], + prototype,docstring) + code+= " "+type+" "+pyfunc+"(void){\n" + code+= " "+type+" result;\n" + code+= " cbf_failnez(%s(self,&result));\n"%(cfunc) + code+= " return result;}\n" + self.code=self.code+code + return + else: + var = args[1].split(" ")[-1] + code += docstringwrite(pyfunc,[],[args[1]],prototype,docstring) + code+= " void %s(%s){\n"%(pyfunc,args[1]) + code +=" cbf_failnez(%s(self,%s));}\n"%(cfunc,var) + self.code=self.code+code + return + if not_found: + code+= " void %s(void){\n"%(pyfunc) + code +=" cbf_failnez(CBF_NOTIMPLEMENTED);}\n" + self.code=self.code+code + print "Have not implemented: cbfhandle.%s"%(pyfunc) + print " ",cfunc + print " args:" + for a in args: + print " ",a + print + return + + + +cbf_handle_wrapper = cbfhandlewrapper() + + +cbf_goniometer_specials = { +"cbf_get_rotation_range":[""" +%apply double *OUTPUT {double *start,double *increment}; + + void get_rotation_range(double *start,double *increment){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_get_rotation_range (self,reserved, start,increment)); + } +""","get_rotation_range",[],["Float start","Float increment"]], + +"cbf_rotate_vector":[""" + +%apply double *OUTPUT {double *final1, double *final2, double *final3}; + + void rotate_vector (double ratio, double initial1, double initial2, + double initial3, double *final1, double *final2, double *final3){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_rotate_vector (self, reserved, ratio, initial1, + initial2, initial3, final1, final2, final3)); + } +""", "rotate_vector", + [ "double ratio", "double initial1","double initial2", "double initial3" ] , + [ "double final1" ,"double final2" , "double final3" ] ], + + + +"cbf_get_reciprocal":[""" +%apply double *OUTPUT {double *reciprocal1, double *reciprocal2, + double *reciprocal3}; + + void get_reciprocal (double ratio,double wavelength, + double real1, double real2, double real3, + double *reciprocal1, double *reciprocal2, + double *reciprocal3){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_get_reciprocal(self,reserved, ratio, wavelength, + real1, real2, real3,reciprocal1, + reciprocal2,reciprocal3)); + } +""", "get_reciprocal", + ["double ratio","double wavelength", + "double real1","double real2","double real3"], + ["double reciprocal1","double reciprocal2", "double reciprocal3" ]], + +"cbf_get_rotation_axis":[""" +%apply double *OUTPUT {double *vector1, double *vector2, double *vector3}; + +void get_rotation_axis (double *vector1, double *vector2, double *vector3){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_get_rotation_axis (self, reserved, + vector1, vector2, vector3)); + } +""","get_rotation_axis", [] , + ["double vector1", "double vector2", "double vector3"] ], + + "cbf_get_goniometer_poise":[""" + %apply double *OUTPUT {double * vector1, double * vector2, double * vector3, double * offset1, double * offset2, double * offset3, + double * angle}; + + void get_goniometer_poise(double ratio, + double * vector1, double * vector2, double * vector3, + double * offset1, double * offset2, double * offset3, + double * angle){ + cbf_failnez(cbf_get_goniometer_poise(self, ratio, + vector1, vector2, vector3, + offset1, offset2, offset3,angle)); + } + +""","get_goniometer_poise",["Float ratio"], + ["Float vector1","Float vector2","Float vector3", + "Float offset1","Float offset2","Float offset3", + "Float angle"]], + + +} + + +class cbfgoniometerwrapper: + def __init__(self): + self.code = """ +// Tell SWIG not to make constructor for these objects +%nodefault cbf_positioner_struct; +%nodefault cbf_goniometer; +%nodefault cbf_axis_struct; + +// Tell SWIG what the object is, so we can build the class +typedef struct +{ + double matrix [3][4]; + + cbf_axis_struct *axis; + + size_t axes; + + int matrix_is_valid; + + double matrix_ratio_used; + + size_t axis_index_limit; + +} +cbf_positioner_struct; + +typedef cbf_positioner_struct *cbf_positioner; +typedef cbf_positioner_struct *cbf_goniometer; + + +%feature("autodoc","1"); + +%extend cbf_positioner_struct{// Tell SWIG to attach functions to the structure + + cbf_positioner_struct(){ // Constructor + // DO NOT CONSTRUCT WITHOUT A CBFHANDLE + cbf_failnez(CBF_ARGUMENT); + return NULL; /* Should never be executed */ + } + + ~cbf_positioner_struct(){ // Destructor + cbf_failnez(cbf_free_positioner(self)); + } +""" + self.tail = """ +}; // End of cbf_positioner +""" + def wrap(self,cfunc,prototype,args,docstring): + if cfunc.find("cbf_free_goniometer")>-1: + return + try: + code, pyname, input, output = cbf_goniometer_specials[cfunc] + self.code += docstringwrite(pyname,input,output, + prototype,docstring)+ code + except KeyError: + print "TODO: Goniometer:",prototype + def get_code(self): + return self.code+self.tail + + +cbf_goniometer_wrapper = cbfgoniometerwrapper() + + + +cbf_detector_specials = { +"cbf_get_pixel_normal":[""" +%apply double *OUTPUT {double *normal1, double *normal2, double *normal3}; + void get_pixel_normal ( double index1, double index2, + double *normal1, double *normal2, double *normal3){ + cbf_failnez(cbf_get_pixel_normal(self, + index1,index2,normal1,normal2,normal3)); + } + +""","get_pixel_normal",["double index1","double index2"] , + ["double normal1","double normal2", "double normal3" ] ], + +"cbf_get_pixel_normal_fs":[""" +%apply double *OUTPUT {double *normal1, double *normal2, double *normal3}; + void get_pixel_normal_fs ( double indexfast, double indexslow, + double *normal1, double *normal2, double *normal3){ + cbf_failnez(cbf_get_pixel_normal_fs(self, + indexfast,indexslow,normal1,normal2,normal3)); + } + +""","get_pixel_normal_fs",["double indexfast","double indexslow"] , + ["double normal1","double normal2", "double normal3" ] ], + + +"cbf_get_pixel_normal_sf":[""" +%apply double *OUTPUT {double *normal1, double *normal2, double *normal3}; + void get_pixel_normal_sf ( double indexslow, double indexfast, + double *normal1, double *normal2, double *normal3){ + cbf_failnez(cbf_get_pixel_normal_sf(self, + indexslow,indexfast,normal1,normal2,normal3)); + } + +""","get_pixel_normal_sf",["double indexslow","double indexfast"] , + ["double normal1","double normal2", "double normal3" ] ], + + +"cbf_get_detector_axis_slow":[""" +%apply double *OUTPUT {double *slowaxis1, double *slowaxis2, double *slowaxis3}; + void get_detector_axis_slow ( double *slowaxis1, double *slowaxis2, double *slowaxis3){ + cbf_failnez(cbf_get_detector_axis_slow(self, + slowaxis1,slowaxis2,slowaxis3)); + } + +""","get_detector_axis_slow", [ ], + ["double slowaxis1","double slowaxis2", "double slowaxis3" ] ], + +"cbf_get_detector_axis_fast":[""" +%apply double *OUTPUT {double *fastaxis1, double *fastaxis2, double *fastaxis3}; + void get_detector_axis_fast ( double *fastaxis1, double *fastaxis2, double *fastaxis3){ + cbf_failnez(cbf_get_detector_axis_fast(self, + fastaxis1,fastaxis2,fastaxis3)); + } + +""","get_detector_axis_fast", [ ], + ["double fastaxis1","double fastaxis2", "double fastaxis3" ] ], + +"cbf_get_detector_axes":[""" +%apply double *OUTPUT {double *slowaxis1, double *slowaxis2, double *slowaxis3, + double *fastaxis1, double *fastaxis2, double *fastaxis3}; + void get_detector_axes ( double *slowaxis1, double *slowaxis2, double *slowaxis3, + double *fastaxis1, double *fastaxis2, double *fastaxis3){ + cbf_failnez(cbf_get_detector_axes(self, + slowaxis1,slowaxis2,slowaxis3, + fastaxis1,fastaxis2,fastaxis3)); + } + +""","get_detector_axes", [ ], + ["double slowaxis1","double slowaxis2", "double slowaxis3", + "double fastaxis1","double fastaxis2", "double fastaxis3" ] ], + +"cbf_get_detector_axes_fs":[""" +%apply double *OUTPUT {double *slowaxis1, double *slowaxis2, double *slowaxis3, + double *fastaxis1, double *fastaxis2, double *fastaxis3}; + void get_detector_axes_fs ( double *fastaxis1, double *fastaxis2, double *fastaxis3, + double *slowaxis1, double *slowaxis2, double *slowaxis3){ + cbf_failnez(cbf_get_detector_axes(self, + slowaxis1,slowaxis2,slowaxis3, + fastaxis1,fastaxis2,fastaxis3)); + } + +""","get_detector_axes", [ ], + ["double fastaxis1","double fastaxis2", "double fastaxis3", + "double slowaxis1","double slowaxis2", "double slowaxis3"] ], + +"cbf_get_detector_axes_sf":[""" +%apply double *OUTPUT {double *slowaxis1, double *slowaxis2, double *slowaxis3, + double *fastaxis1, double *fastaxis2, double *fastaxis3}; + void get_detector_axes_sf ( double *slowaxis1, double *slowaxis2, double *slowaxis3, + double *fastaxis1, double *fastaxis2, double *fastaxis3){ + cbf_failnez(cbf_get_detector_axes(self, + slowaxis1,slowaxis2,slowaxis3, + fastaxis1,fastaxis2,fastaxis3)); + } + +""","get_detector_axes_sf", [ ], + ["double slowaxis1","double slowaxis2", "double slowaxis3", + "double fastaxis1","double fastaxis2", "double fastaxis3" ] ], + + +"cbf_get_detector_surface_axes":[""" + const char * get_detector_surface_axes (int index ){ + const char * axis_id1; + const char * axis_id2; + cbf_failnez(cbf_get_detector_surface_axes(self, + &axis_id1, &axis_id2)); + if (index == 0) return axis_id1; + if (index == 1) return axis_id2; + return "."; + } + + +""","cbf_get_detector_surface_axes", ["Integer index" ], + ["String" ] ], + + +"cbf_get_pixel_area":[""" +%apply double *OUTPUT{double *area,double *projected_area}; + void get_pixel_area(double index1, double index2, + double *area,double *projected_area){ + cbf_failnez(cbf_get_pixel_area (self, + index1, index2, area,projected_area)); + } +""","get_pixel_area",["double index1", "double index2"], + ["double area","double projected_area"] ], + + +"cbf_get_pixel_area_fs":[""" +%apply double *OUTPUT{double *area,double *projected_area}; + void get_pixel_area_fs(double indexfast, double indexslow, + double *area,double *projected_area){ + cbf_failnez(cbf_get_pixel_area_fs (self, + indexfast, indexslow, area,projected_area)); + } +""","get_pixel_area_fs",["double indexfast", "double indexslow"], + ["double area","double projected_area"] ], + + +"cbf_get_pixel_area_sf":[""" +%apply double *OUTPUT{double *area,double *projected_area}; + void get_pixel_area_sf(double indexslow, double indexfast, + double *area,double *projected_area){ + cbf_failnez(cbf_get_pixel_area_sf (self, + indexslow, indexfast, area,projected_area)); + } +""","get_pixel_area_sf",["double indexslow", "double indexfast"], + ["double area","double projected_area"] ], + + +"cbf_get_detector_distance":[""" +%apply double *OUTPUT {double *distance}; + void get_detector_distance (double *distance){ + cbf_failnez(cbf_get_detector_distance(self,distance)); + } +""","get_detector_distance",[],["double distance"]], + + +"cbf_get_detector_normal":[""" +%apply double *OUTPUT {double *normal1, double *normal2, double *normal3}; + void get_detector_normal(double *normal1, + double *normal2, + double *normal3){ + cbf_failnez(cbf_get_detector_normal(self, + normal1, normal2, normal3)); + } +""","get_detector_normal",[], +["double normal1", "double normal2", "double normal3"]], + + +"cbf_get_pixel_coordinates":[""" +%apply double *OUTPUT {double *coordinate1, + double *coordinate2, double *coordinate3}; + void get_pixel_coordinates(double index1, double index2, + double *coordinate1, + double *coordinate2, + double *coordinate3){ + cbf_failnez(cbf_get_pixel_coordinates(self, index1, index2, + coordinate1, coordinate2, coordinate3)); + } +""","get_pixel_coordinates",["double index1","double index2"], +["double coordinate1", "double coordinate2", "double coordinate3"] ], + + +"cbf_get_pixel_coordinates_fs":[""" +%apply double *OUTPUT {double *coordinate1, + double *coordinate2, double *coordinate3}; + void get_pixel_coordinates_fs(double indexfast, double indexslow, + double *coordinate1, + double *coordinate2, + double *coordinate3){ + cbf_failnez(cbf_get_pixel_coordinates_fs(self, indexfast, indexslow, coordinate1, coordinate2, coordinate3)); + } +""","get_pixel_coordinates_fs",["double indexfast","double indexslow"], +["double coordinate1", "double coordinate2", "double coordinate3"] ], + + +"cbf_get_pixel_coordinates_sf":[""" +%apply double *OUTPUT {double *coordinate1, + double *coordinate2, double *coordinate3}; + void get_pixel_coordinates_sf(double indexslow, double indexfast, + double *coordinate1, + double *coordinate2, + double *coordinate3){ + cbf_failnez(cbf_get_pixel_coordinates_sf(self, indexslow, indexfast, coordinate1, coordinate2, coordinate3)); + } +""","get_pixel_coordinates_sf",["double indexslow","double indexfast"], +["double coordinate1", "double coordinate2", "double coordinate3"] ], + + +"cbf_get_beam_center":[""" +%apply double *OUTPUT {double *index1, double *index2, + double *center1,double *center2}; + void get_beam_center(double *index1, double *index2, + double *center1,double *center2){ + cbf_failnez(cbf_get_beam_center(self, index1, index2, + center1, center2)); + } +""","get_beam_center",[], +["double index1", "double index2", "double center1","double center2"]], + + +"cbf_get_beam_center_fs":[""" +%apply double *OUTPUT {double *indexfast, double *indexslow, + double *centerfast,double *centerslow}; + void get_beam_center_fs(double *indexfast, double *indexslow, + double *centerfast,double *centerslow){ + cbf_failnez(cbf_get_beam_center_fs(self, indexfast, indexslow, + centerfast, centerslow)); + } +""","get_beam_center_fs",[], +["double indexfast", "double indexslow", "double centerfast","double centerslow"]], + + +"cbf_get_beam_center_sf":[""" +%apply double *OUTPUT {double *indexslow, double *indexfast, + double *centerslow,double *centerfast}; + void get_beam_center_sf(double *indexslow, double *indexfast, + double *centerslow,double *centerfast){ + cbf_failnez(cbf_get_beam_center_sf(self, indexslow, indexfast, + centerslow, centerfast)); + } +""","get_beam_center_sf",[], +["double indexslow", "double indexfast", "double centerslow","double centerfast"]], + + +"cbf_set_beam_center":[""" + void set_beam_center(double *indexslow, double *indexfast, + double *centerslow,double *centerfast){ + cbf_failnez(cbf_set_beam_center(self, indexslow, indexfast, + centerslow, centerfast)); + } +""","set_beam_center", +["double indexslow", "double indexfast", "double centerslow","double centerfast"],[]], + + +"cbf_set_beam_center_fs":[""" + void set_beam_center_fs(double *indexfast, double *indexslow, + double *centerfast,double *centerslow){ + cbf_failnez(cbf_set_beam_center_fs(self, indexfast, indexslow, + centerfast, centerslow)); + } +""","set_beam_center_fs", +["double indexfast", "double indexslow", "double centerfast","double centerslow"],[]], + + +"cbf_set_beam_center_sf":[""" + void set_beam_center_sf(double *indexslow, double *indexfast, + double *centerslow,double *centerfast){ + cbf_failnez(cbf_set_beam_center_sf(self, indexslow, indexfast, + centerslow, centerfast)); + } +""","set_beam_center_sf", +["double indexslow", "double indexfast", "double centerslow","double centerfast"],[]], + + +"cbf_set_reference_beam_center":[""" + void set_reference_beam_center(double *indexslow, double *indexfast, + double *centerslow,double *centerfast){ + cbf_failnez(cbf_set_reference_beam_center(self, indexslow, indexfast, + centerslow, centerfast)); + } +""","set_reference_beam_center", +["double indexslow", "double indexfast", "double centerslow","double centerfast"],[]], + + +"cbf_set_reference_beam_center_fs":[""" + void set_reference_beam_center_fs(double *indexfast, double *indexslow, + double *centerfast,double *centerslow){ + cbf_failnez(cbf_set_reference_beam_center_fs(self, indexfast, indexslow, + centerfast, centerslow)); + } +""","set_reference_beam_center_fs", +["double indexfast", "double indexslow", "double centerfast","double centerslow"],[]], + + +"cbf_set_reference_beam_center_sf":[""" + void set_reference_beam_center_sf(double *indexslow, double *indexfast, + double *centerslow,double *centerfast){ + cbf_failnez(cbf_set_reference_beam_center_sf(self, indexslow, indexfast, + centerslow, centerfast)); + } +""","set_reference_beam_center_sf", +["double indexslow", "double indexfast", "double centerslow","double centerfast"],[]], + + +"cbf_get_inferred_pixel_size" : [""" +%apply double *OUTPUT { double *psize } get_inferred_pixel_size; +void get_inferred_pixel_size(unsigned int axis_number, double* psize){ + cbf_failnez(cbf_get_inferred_pixel_size(self, axis_number, psize)); + } +""","get_inferred_pixel_size",["Int axis_number"],["Float pixel size"] ], + + +"cbf_get_inferred_pixel_size_fs" : [""" +%apply double *OUTPUT { double *psize } get_inferred_pixel_size; +void get_inferred_pixel_size_fs(unsigned int axis_number, double* psize){ + cbf_failnez(cbf_get_inferred_pixel_size_fs(self, axis_number, psize)); + } +""","get_inferred_pixel_size_fs",["Int axis_number"],["Float pixel size"] ], + + +"cbf_get_inferred_pixel_size_sf" : [""" +%apply double *OUTPUT { double *psize } get_inferred_pixel_size; +void get_inferred_pixel_size_sf(unsigned int axis_number, double* psize){ + cbf_failnez(cbf_get_inferred_pixel_size_sf(self, axis_number, psize)); + } +""","get_inferred_pixel_size_sf",["Int axis_number"],["Float pixel size"] ] + + +} + + +class cbfdetectorwrapper: + def __init__(self): + self.code = """ +// Tell SWIG not to make constructor for these objects +%nodefault cbf_detector_struct; +%nodefault cbf_detector; + +// Tell SWIG what the object is, so we can build the class +typedef struct +{ + cbf_positioner positioner; + + double displacement [2], increment [2]; + + size_t axes, index [2]; +} +cbf_detector_struct; + +typedef cbf_detector_struct *cbf_detector; + +%feature("autodoc","1"); + +%extend cbf_detector_struct{// Tell SWIG to attach functions to the structure + + cbf_detector_struct(){ // Constructor + // DO NOT CONSTRUCT WITHOUT A CBFHANDLE + cbf_failnez(CBF_ARGUMENT); + return NULL; /* Should never be executed */ + } + + ~cbf_detector_struct(){ // Destructor + cbf_failnez(cbf_free_detector(self)); + } +""" + self.tail = """ +}; // End of cbf_detector +""" + def wrap(self,cfunc,prototype,args,docstring): + if cfunc.find("cbf_free_detector")>-1: + return + try: + code, pyname, input, output = cbf_detector_specials[cfunc] + self.code += docstringwrite(pyname,input,output, + prototype,docstring)+ code + except KeyError: + print "TODO: Detector:",prototype + def get_code(self): + return self.code+self.tail + + +cbf_detector_wrapper = cbfdetectorwrapper() + + +class cbfpositionerwrapper: + def __init__(self): + self.code = """ +// Tell SWIG not to make constructor for these objects +%nodefault cbf_positioner_struct; +%nodefault cbf_positioner; + +// Tell SWIG what the object is, so we can build the class +typedef struct +{ + double matrix [3][4]; + + cbf_axis_struct *axis; + + size_t axes; + + int matrix_is_valid, axes_are_connected; +} +cbf_positioner_struct; + +typedef cbf_positioner_struct *cbf_positioner; + +%feature("autodoc","1"); + +%extend cbf_positioner_struct{// Tell SWIG to attach functions to the structure + + cbf_positioner_struct(){ // Constructor + // DO NOT CONSTRUCT WITHOUT A CBFHANDLE + cbf_failnez(CBF_ARGUMENT); + return NULL; /* Should never be executed */ + } + + ~cbf_positioner_struct(){ // Destructor + cbf_failnez(cbf_free_positioner(self)); + } +""" + self.tail = """ +}; // End of cbf_positioner +""" + def wrap(self,cfunc,prototype,args,docstring): + if cfunc.find("cbf_free_positioner")>-1: + return + try: + code, pyname, input, output = cbf_positioner_specials[cfunc] + self.code += docstringwrite(pyname,input,output, + prototype,docstring)+ code + except KeyError: + print "TODO: Positioner:",prototype + def get_code(self): + return self.code+self.tail + +cbf_positioner_wrapper = cbfpositionerwrapper() + + +cbfgeneric_specials = { +"cbf_get_local_integer_byte_order":[""" +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); + %inline { + void get_local_integer_byte_order(char **bo, int *bolen) { + char * byteorder; + char * bot; + error_status = cbf_get_local_integer_byte_order(&byteorder); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + } + } +""","get_local_integer_byte_order",[],["char **bo", "int *bolen"]], + + +"cbf_get_local_real_format":[""" +%cstring_output_allocate_size(char **rf, int *rflen, free(*$1)); + %inline { + void get_local_real_format(char **rf, int *rflen) { + char * real_format; + char * rft; + error_status = cbf_get_local_real_format(&real_format); + *rflen = strlen(real_format); + if (!(rft = (char *)malloc(*rflen))) {cbf_failnez(CBF_ALLOC)} + strncpy(rft,real_format,*rflen); + *rf = rft; + } + } +""","get_local_real_format",[],["char **rf", "int *rflen"]], + + +"cbf_get_local_real_byte_order":[""" +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); + %inline { + void get_local_real_byte_order(char **bo, int *bolen) { + char * byteorder; + char * bot; + error_status = cbf_get_local_real_byte_order(&byteorder); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + } + } +""","get_local_real_byte_order",[],["char **bo", "int *bolen"]], + + +"cbf_compute_cell_volume":[""" + +%apply double *OUTPUT {double *volume}; + %inline { + void compute_cell_volume(double cell[6], double *volume) { + cbf_failnez(cbf_compute_cell_volume(cell,volume)); + } + } +""","compute_cell_volume",["double cell[6]"],["Float volume"]], + + +"cbf_compute_reciprocal_cell":[""" +%apply double *OUTPUT {double *astar, double *bstar, double *cstar, + double *alphastar, double *betastar, double *gammastar}; + %inline { + void compute_reciprocal_cell(double cell[6], double *astar, double *bstar, double *cstar, + double *alphastar, double *betastar, double *gammastar) { + double rcell[6]; + cbf_failnez(cbf_compute_reciprocal_cell(cell,rcell)); + *astar = rcell[0]; + *bstar = rcell[1]; + *cstar = rcell[2]; + *alphastar = rcell[3]; + *betastar = rcell[4]; + *gammastar = rcell[5]; + } + } + +""","compute_reciprocal_cell",["double cell[6]"], +["Float astar", "Float bstar", "Float cstar", "Float alphastar", "Float betastar", "Float gammastar"] ], + +"cbf_airy_disk":[""" +%apply double *OUTPUT {double *value}; +%inline { +void airy_disk(double x, double y, double cenx, double ceny, +double volume, double fwhm, double *value) { +cbf_failnez(cbf_airy_disk(x,y,cenx,ceny,volume,fwhm,value)); +} +} + +""","airy_disk",["double x", "double y", "double cenx", "double ceny", "double volume", "double fwhm"], +["Float value"] ], + +"cbf_airy_disk_volume":[""" +%apply double *OUTPUT {double *volumeout}; +%inline { +void airy_disk_volume(double xlo, double ylo, double xhi, double yhi, +double cenx, double ceny, double volumein, double fwhm, double * volumeout) { +cbf_failnez(cbf_airy_disk_volume(xlo,ylo,xhi,yhi,cenx,ceny,volumein,fwhm,volumeout)); +} +} + +""","airy_disk_volume",["double xlo", "double ylo", "double xhi", "double yhi", "double cenx", "double ceny", "double volumein", "double fwhm"], +["Float volumeout"] ] + + +} + + + + +class genericwrapper: + def __init__(self): + self.code = """ +// Start of generic functions +%feature("autodoc","1"); +""" + self.tail = "// End of generic functions\n" + def get_code(self): + return self.code + self.tail + def wrap(self,cfunc,prototype,args,docstring): + pyfunc = cfunc.replace("cbf_","") + # Insert a comment for debugging this script + code = "\n/* cfunc %s pyfunc %s \n"%(cfunc,pyfunc) + for a in args: + code += " arg %s "%(a) + code += "*/\n\n" + self.code+=code + code = "" + not_found = 0 + try: + code, pyname, input, output = cbfgeneric_specials[cfunc] + self.code += docstringwrite(pyname,input,output, + prototype,docstring)+ code + return + except KeyError: + not_found = 1 + # print "KeyError" + except ValueError: + print "problem in generic",cfunc + for item in cbfgeneric_specials[cfunc]: + print "***",item + raise + if len(args)==1 and args[0].find("char")>-1 and \ + args[0].find("**")>-1 :# return string + # first write the c code and inline it + code += docstringwrite(pyfunc,[],["string"],prototype,docstring) + code += "%%inline %%{\n char* %s(void);\n"%(pyfunc) + code += " char* %s(void){\n"%(pyfunc) + code += " char *r;\n" + code += " error_status = %s(&r);\n"%(cfunc) + code += " return r; }\n%}\n" + # now the thing to wrap is: + code += "char* %s(void);"%(pyfunc) + self.code=self.code+code + return + +# code+= " void %s(void){\n"%(pyfunc) +# code +=" cbf_failnez(CBF_NOTIMPLEMENTED);}\n" +# self.code=self.code+code + print "Have not implemented:" + for s in [cfunc, pyfunc] + args: + print "\t",s + print + return + + +generic_wrapper = genericwrapper() + + +def generate_wrappers(name_dict): + names = name_dict.keys() + for cname in names: + prototype = name_dict[cname][0] + docstring = name_dict[cname][1] + # print "Generate wrappers: ", "::",cname,"::", prototype,"::", docstring + # Check prototype begins with "int cbf_" + if prototype.find("int cbf_")!=0: + print "problem with:",prototype + # Get arguments from prototypes + try: + args = prototype.split("(")[1].split(")")[0].split(",") + args = [ s.lstrip().rstrip() for s in args ] # strip spaces off ends + # print "Args: ", args + except: + # print cname + # print prototype + raise + if args[0].find("cbf_handle")>=0: # This is for the cbfhandle object + cbf_handle_wrapper.wrap(cname,prototype,args,docstring) + if (cname=="cbf_get_unit_cell"): + cbf_handle_wrapper.wrap("cbf_get_unit_cell_esd",prototype,args,docstring) + if (cname=="cbf_get_reciprocal_cell"): + cbf_handle_wrapper.wrap("cbf_get_reciprocal_cell_esd",prototype,args,docstring) + if (cname=="cbf_set_unit_cell"): + cbf_handle_wrapper.wrap("cbf_set_unit_cell_esd",prototype,args,docstring) + if (cname=="cbf_set_reciprocal_cell"): + cbf_handle_wrapper.wrap("cbf_set_reciprocal_cell_esd",prototype,args,docstring) + continue + if args[0].find("cbf_goniometer")>=0: # This is for the cbfgoniometer + cbf_goniometer_wrapper.wrap(cname,prototype,args,docstring) + continue + if args[0].find("cbf_detector")>=0: # This is for the cbfdetector + cbf_detector_wrapper.wrap(cname,prototype,args,docstring) + continue + if args[0].find("cbf_positioner")>=0: # This is for the cbfpositioner + cbf_positioner_wrapper.wrap(cname,prototype,args,docstring) + continue + generic_wrapper.wrap(cname,prototype,args,docstring) + + +generate_wrappers(name_dict) +open("cbfgoniometerwrappers.i","w").write(cbf_goniometer_wrapper.get_code()) +open("cbfdetectorwrappers.i","w").write(cbf_detector_wrapper.get_code()) +open("cbfpositionerwrappers.i","w").write(cbf_positioner_wrapper.get_code()) +open("cbfhandlewrappers.i","w").write(cbf_handle_wrapper.get_code()) +open("cbfgenericwrappers.i","w").write(generic_wrapper.get_code()) + +print "End of output from make_pycbf.py" +print "\\end{verbatim}" +@} + diff --git a/py2cbf/makeflatascii.py b/py2cbf/makeflatascii.py new file mode 100644 index 00000000..10685cb1 --- /dev/null +++ b/py2cbf/makeflatascii.py @@ -0,0 +1,6 @@ + +import pydoc, pycbf, sys +f = open(sys.argv[1],"w") +pydoc.pager=lambda text: f.write(text) +pydoc.TextDoc.bold = lambda self,text : text +pydoc.help(pycbf) diff --git a/py2cbf/pycbf.aux b/py2cbf/pycbf.aux new file mode 100644 index 00000000..c76b5b37 --- /dev/null +++ b/py2cbf/pycbf.aux @@ -0,0 +1,55 @@ +\relax +\ifx\hyper@anchor\@undefined +\global \let \oldcontentsline\contentsline +\gdef \contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}} +\global \let \oldnewlabel\newlabel +\gdef \newlabel#1#2{\newlabelxx{#1}#2} +\gdef \newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} +\AtEndDocument{\let \contentsline\oldcontentsline +\let \newlabel\oldnewlabel} +\else +\global \let \hyper@last\relax +\fi + +\@writefile{toc}{\contentsline {section}{\numberline {1}Introduction}{2}{section.1}} +\@writefile{toc}{\contentsline {section}{\numberline {2}Installation prerequisites}{3}{section.2}} +\@writefile{toc}{\contentsline {section}{\numberline {3}Generating the c interface - the SWIG file}{3}{section.3}} +\newlabel{scrap1}{{3}{3}{Generating the c interface - the SWIG file\relax }{section.3}{}} +\newlabel{scrap2}{{3}{3}{Generating the c interface - the SWIG file\relax }{section.3}{}} +\newlabel{scrap3}{{3}{4}{Generating the c interface - the SWIG file\relax }{section.3}{}} +\newlabel{scrap4}{{3}{4}{Generating the c interface - the SWIG file\relax }{section.3}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Exceptions}{5}{subsection.3.1}} +\newlabel{scrap5}{{3.1}{5}{Exceptions\relax }{subsection.3.1}{}} +\newlabel{scrap6}{{3.1}{5}{Exceptions\relax }{subsection.3.1}{}} +\newlabel{scrap7}{{3.1}{9}{Exceptions\relax }{subsection.3.1}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Exceptions}{10}{subsection.3.2}} +\@writefile{toc}{\contentsline {section}{\numberline {4}Docstrings}{10}{section.4}} +\@writefile{toc}{\contentsline {section}{\numberline {5}Wrappers}{10}{section.5}} +\newlabel{scrap8}{{5}{10}{Wrappers\relax }{section.5}{}} +\@writefile{toc}{\contentsline {section}{\numberline {6}Building python extensions - the setup file}{10}{section.6}} +\newlabel{scrap9}{{6}{11}{Building python extensions - the setup file\relax }{section.6}{}} +\@writefile{toc}{\contentsline {section}{\numberline {7}Building and testing the resulting package}{11}{section.7}} +\newlabel{scrap10}{{7}{11}{Building and testing the resulting package\relax }{section.7}{}} +\newlabel{scrap11}{{7}{12}{Building and testing the resulting package\relax }{section.7}{}} +\newlabel{scrap12}{{7}{12}{Building and testing the resulting package\relax }{section.7}{}} +\@writefile{toc}{\contentsline {section}{\numberline {8}Debugging compiled extensions}{12}{section.8}} +\@writefile{toc}{\contentsline {section}{\numberline {9}Things which are currently missing}{13}{section.9}} +\@writefile{toc}{\contentsline {section}{\numberline {10}Testing}{13}{section.10}} +\@writefile{toc}{\contentsline {subsection}{\numberline {10.1}Read a file based on cif2cbf.c}{13}{subsection.10.1}} +\newlabel{scrap13}{{10.1}{14}{Read a file based on cif2cbf.c\relax }{subsection.10.1}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {10.2}Try to test the goniometer and detector}{15}{subsection.10.2}} +\newlabel{scrap14}{{10.2}{15}{Try to test the goniometer and detector\relax }{subsection.10.2}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {10.3}Test cases for the generics}{15}{subsection.10.3}} +\newlabel{scrap15}{{10.3}{15}{Test cases for the generics\relax }{subsection.10.3}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {10.4}Version of pycbf_test1 with write logic added}{17}{subsection.10.4}} +\newlabel{scrap16}{{10.4}{17}{Version of pycbf_test1 with write logic added\relax }{subsection.10.4}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {10.5}Processing of XFEL axes}{18}{subsection.10.5}} +\newlabel{scrap17}{{10.5}{18}{Processing of XFEL axes\relax }{subsection.10.5}{}} +\@writefile{toc}{\contentsline {section}{\numberline {11}Worked example 1 : xmas beamline + mar ccd detector at the ESRF}{18}{section.11}} +\@writefile{toc}{\contentsline {subsection}{\numberline {11.1}Reading marccd headers}{19}{subsection.11.1}} +\newlabel{scrap18}{{11.1}{20}{Reading marccd headers\relax }{subsection.11.1}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {11.2}Writing out cif files for fit2d/xmas}{21}{subsection.11.2}} +\newlabel{scrap19}{{11.2}{22}{Writing out cif files for fit2d/xmas\relax }{subsection.11.2}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {11.3}A template cif file for the xmas beamline}{23}{subsection.11.3}} +\newlabel{scrap20}{{11.3}{24}{A template cif file for the xmas beamline\relax }{subsection.11.3}{}} +\gdef \@abspage@last{24} diff --git a/py2cbf/pycbf.dvi b/py2cbf/pycbf.dvi new file mode 100644 index 00000000..c5301c8e Binary files /dev/null and b/py2cbf/pycbf.dvi differ diff --git a/py2cbf/pycbf.html b/py2cbf/pycbf.html new file mode 100644 index 00000000..36425829 --- /dev/null +++ b/py2cbf/pycbf.html @@ -0,0 +1,3036 @@ + + +Python: module pycbf + + + + +
 
+ 
pycbf (version still_being_written, 14 Dec 2005)
index
d:\wright\cbflib\cbflib_0.7.7\pycbf\pycbf.py
+

pycbf - python bindings to the CBFlib library

+A library for reading and writing ImageCIF and CBF files 
+which store area detector images for crystallography.

+This work is a derivative of the CBFlib version 0.7.7 library
+by  Paul J. Ellis of Stanford Synchrotron Radiation Laboratory
+and Herbert J. Bernstein of Bernstein + Sons
+See:
+  http://www.bernstein-plus-sons.com/software/CBF/

+Licensing is GPL based, see:
+  http://www.bernstein-plus-sons.com/software/CBF/doc/CBFlib_NOTICES.html

+These bindings were automatically generated by SWIG, and the
+input to SWIG was automatically generated by a python script.
+We very strongly recommend you do not attempt to edit them 
+by hand!



+Copyright (C) 2007    Jonathan Wright
+                      ESRF, Grenoble, France
+               email: wright@esrf.fr

+

+ + + + + +
 
+Modules
       
_pycbf
+
new
+

+ + + + + +
 
+Classes
       
+
__builtin__.object +
+
+
cbf_detector_struct +
cbf_handle_struct +
cbf_positioner_struct +
+
+
+

+ + + + + + + +
 
+class cbf_detector_struct(__builtin__.object)
   Proxy of C cbf_detector_struct struct
 
 Methods defined here:
+
__del__ lambda self
+ +
__getattr__ lambda self, name
+ +
__init__(self, *args)
__init__(self) -> cbf_detector_struct
+ +
__repr__ = _swig_repr(self)
+ +
__setattr__ lambda self, name, value
+ +
get_beam_center(*args)
Returns : double index1,double index2,double center1,double center2
+*args   : 

+C prototype: int cbf_get_beam_center (cbf_detector detector, double *index1,
+                 double    *index2, double *center1, double *center2);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_beam_center sets *center1 and *center2 to the displacements 
+in mm along the detector axes from pixel (0, 0) to the point at which 
+the beam intersects the detector and *index1 and *index2 to the 
+corresponding indices. cbf_set_beam_center sets the offsets in the 
+axis category for the detector element axis with precedence 1 to 
+place the beam center at the position given in mm by *center1 and 
+*center2 as the displacements in mm along the detector axes from 
+pixel (0, 0) to the point at which the beam intersects the detector 
+at the indices given *index1 and *index2.
+Any of the destination pointers may be NULL for getting the beam 
+center. For setting the beam axis, either the indices of the center 
+must not be NULL.
+The indices are non-negative for beam centers within the detector 
+surface, but the center for an axis with a negative increment will be 
+negative for a beam center within the detector surface.
+ARGUMENTS
+detector   Detector handle. index1   Pointer to the destination slow 
+index. index2   Pointer to the destination fast index. center1   
+Pointer to the destination displacement along the slow axis. center2  
+ Pointer to the destination displacement along the fast axis.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
get_detector_distance(*args)
Returns : double distance
+*args   : 

+C prototype: int cbf_get_detector_distance (cbf_detector detector,
+                 double    *distance);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_detector_distance sets *distance to the nearest distance from 
+the sample position to the detector plane.
+ARGUMENTS
+detector   Detector handle. distance   Pointer to the destination 
+distance.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
get_detector_normal(*args)
Returns : double normal1,double normal2,double normal3
+*args   : 

+C prototype: int cbf_get_detector_normal (cbf_detector detector,
+                 double *normal1,    double *normal2, double *normal3);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_detector_normal sets *normal1, *normal2, and *normal3 to the 
+3 components of the of the normal vector to the detector plane. The 
+vector is normalized.
+Any of the destination pointers may be NULL.
+ARGUMENTS
+detector   Detector handle. normal1   Pointer to the destination x 
+component of the normal vector. normal2   Pointer to the destination 
+y component of the normal vector. normal3   Pointer to the 
+destination z component of the normal vector.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
get_inferred_pixel_size(*args)
Returns : Float pixel size
+*args   : Int axis_number

+C prototype: int cbf_get_inferred_pixel_size (cbf_detector detector,
+                 unsigned int    axis_number, double *psize);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_inferred_pixel_size sets *psize to point to the double value 
+in millimeters of the pixel size for the axis axis_number value for 
+pixel at (index1, index2) on the detector surface. The slow index is 
+treated as axis 1 and the fast index is treated as axis 2.
+ARGUMENTS
+detector      Detector handle. axis_number   The number of the axis. 
+area          Pointer to the destination pizel size in mm.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
get_pixel_area(*args)
Returns : double area,double projected_area
+*args   : double index1,double index2

+C prototype: int cbf_get_pixel_area (cbf_detector detector, double index1,
+                 double    index2, double *area, double *projected_area);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_pixel_area sets *area to the area of the pixel at (index1, 
+index2) on the detector surface and *projected_area to the apparent 
+area of the pixel as viewed from the sample position.
+Either of the destination pointers may be NULL.
+ARGUMENTS
+detector         Detector handle. index1           Slow index. index2 
+          Fast index. area             Pointer to the destination 
+area in mm2. projected_area   Pointer to the destination apparent 
+area in mm2.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
get_pixel_coordinates(*args)
Returns : double coordinate1,double coordinate2,double coordinate3
+*args   : double index1,double index2

+C prototype: int cbf_get_pixel_coordinates (cbf_detector detector,
+                 double index1,    double index2, double *coordinate1,
+                 double *coordinate2, double    *coordinate3);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_pixel_coordinates sets *coordinate1, *coordinate2, and 
+*coordinate3 to the vector position of pixel (index1, index2) on the 
+detector surface. If index1 and index2 are integers then the 
+coordinates correspond to the center of a pixel.
+Any of the destination pointers may be NULL.
+ARGUMENTS
+detector      Detector handle. index1        Slow index. index2       
+ Fast index. coordinate1   Pointer to the destination x component. 
+coordinate2   Pointer to the destination y component. coordinate3   
+Pointer to the destination z component.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
get_pixel_normal(*args)
Returns : double normal1,double normal2,double normal3
+*args   : double index1,double index2

+C prototype: int cbf_get_pixel_normal (cbf_detector detector, double index1,
+                 double    index2, double *normal1, double *normal2,
+                 double *normal3);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_detector_normal sets *normal1, *normal2, and *normal3 to the 
+3 components of the of the normal vector to the pixel at (index1, 
+index2). The vector is normalized.
+Any of the destination pointers may be NULL.
+ARGUMENTS
+detector   Detector handle. index1   Slow index. index2   Fast index. 
+normal1   Pointer to the destination x component of the normal 
+vector. normal2   Pointer to the destination y component of the 
+normal vector. normal3   Pointer to the destination z component of 
+the normal vector.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
+Properties defined here:
+
axes
+
get = cbf_detector_struct_axes_get(...)
+
+
set = cbf_detector_struct_axes_set(...)
+
+
+
displacement
+
get = cbf_detector_struct_displacement_get(...)
+
+
set = cbf_detector_struct_displacement_set(...)
+
+
+
increment
+
get = cbf_detector_struct_increment_get(...)
+
+
set = cbf_detector_struct_increment_set(...)
+
+
+
index
+
get = cbf_detector_struct_index_get(...)
+
+
set = cbf_detector_struct_index_set(...)
+
+
+
positioner
+
get = cbf_detector_struct_positioner_get(...)
+
+
set = cbf_detector_struct_positioner_set(...)
+
+
+
+Data and other attributes defined here:
+
__dict__ = <dictproxy object>
dictionary for instance variables (if defined)
+ +
__swig_destroy__ = <built-in function delete_cbf_detector_struct>
+ +
__swig_getmethods__ = {'axes': <built-in function cbf_detector_struct_axes_get>, 'displacement': <built-in function cbf_detector_struct_displacement_get>, 'increment': <built-in function cbf_detector_struct_increment_get>, 'index': <built-in function cbf_detector_struct_index_get>, 'positioner': <built-in function cbf_detector_struct_positioner_get>}
+ +
__swig_setmethods__ = {'axes': <built-in function cbf_detector_struct_axes_set>, 'displacement': <built-in function cbf_detector_struct_displacement_set>, 'increment': <built-in function cbf_detector_struct_increment_set>, 'index': <built-in function cbf_detector_struct_index_set>, 'positioner': <built-in function cbf_detector_struct_positioner_set>}
+ +
__weakref__ = <attribute '__weakref__' of 'cbf_detector_struct' objects>
list of weak references to the object (if defined)
+ +

+ + + + + + + +
 
+class cbf_handle_struct(__builtin__.object)
   Proxy of C cbf_handle_struct struct
 
 Methods defined here:
+
__del__ lambda self
+ +
__getattr__ lambda self, name
+ +
__init__(self, *args)
__init__(self) -> cbf_handle_struct
+ +
__repr__ = _swig_repr(self)
+ +
__setattr__ lambda self, name, value
+ +
category_name(*args)
Returns : 
+*args   : string

+C prototype: int cbf_category_name (cbf_handle handle,
+                 const char **categoryname);

+CBFLib documentation:
+DESCRIPTION
+cbf_category_name sets *categoryname to point to the name of the 
+current category of the current data block.
+The category name will be valid as long as the category exists.
+The name must not be modified by the program in any way.
+ARGUMENTS
+handle         CBF handle. categoryname   Pointer to the destination 
+category name pointer.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
column_name(*args)
Returns : 
+*args   : string

+C prototype: int cbf_column_name (cbf_handle handle, const char **columnname);

+CBFLib documentation:
+DESCRIPTION
+cbf_column_name sets *columnname to point to the name of the current 
+column of the current category.
+The column name will be valid as long as the column exists.
+The name must not be modified by the program in any way.
+ARGUMENTS
+handle       CBF handle. columnname   Pointer to the destination 
+column name pointer.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
construct_detector(*args)
Returns : pycbf detector object
+*args   : Integer element_number

+C prototype: int cbf_construct_detector (cbf_handle handle,
+                 cbf_detector *detector,    unsigned int element_number);

+CBFLib documentation:
+DESCRIPTION
+cbf_construct_detector constructs a detector object for detector 
+element number element_number using the description in the CBF object 
+handle and initialises the detector handle *detector.
+ARGUMENTS
+handle   CBF handle. detector   Pointer to the destination detector 
+handle. element_number   The number of the detector element counting 
+from 0 by order of appearance in the "diffrn_data_frame" category.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
construct_goniometer(*args)
Returns : pycbf goniometer object
+*args   : 

+C prototype: int cbf_construct_goniometer (cbf_handle handle,
+                 cbf_goniometer    *goniometer);

+CBFLib documentation:
+DESCRIPTION
+cbf_construct_goniometer constructs a goniometer object using the 
+description in the CBF object handle and initialises the goniometer 
+handle *goniometer.
+ARGUMENTS
+handle       CBF handle. goniometer   Pointer to the destination 
+goniometer handle.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
count_categories(*args)
Returns : unsigned
+*args   : 

+C prototype: int cbf_count_categories (cbf_handle handle,
+                 unsigned int    *categories);

+CBFLib documentation:
+DESCRIPTION
+cbf_count_categories puts the number of categories in the current 
+data block in *categories.
+ARGUMENTS
+handle       CBF handle. categories   Pointer to the destination 
+category count.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
count_columns(*args)
Returns : Integer
+*args   : 

+C prototype: int cbf_count_columns (cbf_handle handle, unsigned int *columns);

+CBFLib documentation:
+DESCRIPTION
+cbf_count_columns puts the number of columns in the current category 
+in *columns.
+ARGUMENTS
+handle    CBF handle. columns   Pointer to the destination column 
+count.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
count_datablocks(*args)
Returns : unsigned
+*args   : 

+C prototype: int cbf_count_datablocks (cbf_handle handle,
+                 unsigned int    *datablocks);

+CBFLib documentation:
+DESCRIPTION
+cbf_count_datablocks puts the number of data blocks in *datablocks .
+ARGUMENTS
+handle       CBF handle. datablocks   Pointer to the destination data 
+block count.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
count_elements(*args)
Returns : Integer
+*args   : 

+C prototype: int cbf_count_elements (cbf_handle handle,
+                 unsigned int *elements);

+CBFLib documentation:
+DESCRIPTION
+cbf_count_elements sets *elements to the number of detector elements.
+ARGUMENTS
+handle     CBF handle. elements   Pointer to the destination count.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
count_rows(*args)
Returns : Integer
+*args   : 

+C prototype: int cbf_count_rows (cbf_handle handle, unsigned int *rows);

+CBFLib documentation:
+DESCRIPTION
+cbf_count_rows puts the number of rows in the current category in 
+*rows .
+ARGUMENTS
+handle   CBF handle. rows     Pointer to the destination row count.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
datablock_name(*args)
Returns : 
+*args   : string

+C prototype: int cbf_datablock_name (cbf_handle handle,
+                 const char    **datablockname);

+CBFLib documentation:
+DESCRIPTION
+cbf_datablock_name sets *datablockname to point to the name of the 
+current data block.
+The data block name will be valid as long as the data block exists 
+and has not been renamed.
+The name must not be modified by the program in any way.
+ARGUMENTS
+handle          CBF handle. datablockname   Pointer to the 
+destination data block name pointer.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
delete_row(*args)
Returns : 
+*args   : Integer

+C prototype: int cbf_delete_row (cbf_handle handle, unsigned int rownumber);

+CBFLib documentation:
+DESCRIPTION
+cbf_delete_row deletes a row from the current category. Rows starting 
+from rownumber +1 are moved down by 1. If the current row was higher 
+than rownumber, or if the current row is the last row, it will also 
+move down by 1.
+The row numbers start from 0.
+ARGUMENTS
+handle      CBF handle. rownumber   The number of the row to delete.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
find_category(*args)
Returns : string
+*args   : 

+C prototype: int cbf_find_category (cbf_handle handle,
+                 const char *categoryname);

+CBFLib documentation:
+DESCRIPTION
+cbf_find_category makes the category in the current data block with 
+name categoryname the current category.
+The comparison is case-insensitive.
+If the category does not exist, the function returns CBF_NOTFOUND.
+The current column and row become undefined.
+ARGUMENTS
+handle         CBF handle. categoryname   The name of the category to 
+find.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
find_category_root(*args)
Returns : String categoryroot
+*args   : String categoryname

+C prototype: int cbf_find_category_root (cbf_handle handle,
+                 const char*    categoryname, const char** categoryroot);

+CBFLib documentation:
+DESCRIPTION
+cbf_find_category_root sets *categoryroot to the root category of 
+which categoryname is an alias. cbf_set_category_root sets 
+categoryname_in as an alias of categoryroot in the dictionary 
+associated with handle, creating the dictionary if necessary. 
+cbf_require_category_root sets *categoryroot to the root category of 
+which categoryname is an alias, if there is one, or to the value of 
+categoryname, if categoryname is not an alias.
+A returned categoryroot string must not be modified in any way.
+ARGUMENTS
+handle            CBF handle. categoryname      category name which 
+may be an alias. categoryroot      pointer to a returned category 
+root name. categoryroot_in   input category root name.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
find_column(*args)
Returns : string
+*args   : 

+C prototype: int cbf_find_column (cbf_handle handle, const char *columnname);

+CBFLib documentation:
+DESCRIPTION
+cbf_find_column makes the columns in the current category with name 
+columnname the current column.
+The comparison is case-insensitive.
+If the column does not exist, the function returns CBF_NOTFOUND.
+The current row is not affected.
+ARGUMENTS
+handle       CBF handle. columnname   The name of column to find.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
find_datablock(*args)
Returns : string
+*args   : 

+C prototype: int cbf_find_datablock (cbf_handle handle,
+                 const char *datablockname);

+CBFLib documentation:
+DESCRIPTION
+cbf_find_datablock makes the data block with name datablockname the 
+current data block.
+The comparison is case-insensitive.
+If the data block does not exist, the function returns CBF_NOTFOUND.
+The current category becomes undefined.
+ARGUMENTS
+handle          CBF handle. datablockname   The name of the data 
+block to find.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
find_nextrow(*args)
Returns : string
+*args   : 

+C prototype: int cbf_find_nextrow (cbf_handle handle, const char *value);

+CBFLib documentation:
+DESCRIPTION
+cbf_find_nextrow makes the makes the next row in the current column 
+with value value the current row. The search starts from the row 
+following the last row found with cbf_find_row or cbf_find_nextrow, 
+or from the current row if the current row was defined using any 
+other function.
+The comparison is case-sensitive.
+If no more matching rows exist, the function returns CBF_NOTFOUND.
+The current column is not affected.
+ARGUMENTS
+handle   CBF handle. value    the value to search for.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
find_row(*args)
Returns : string
+*args   : 

+C prototype: int cbf_find_row (cbf_handle handle, const char *value);

+CBFLib documentation:
+DESCRIPTION
+cbf_find_row makes the first row in the current column with value 
+value the current row.
+The comparison is case-sensitive.
+If a matching row does not exist, the function returns CBF_NOTFOUND.
+The current column is not affected.
+ARGUMENTS
+handle   CBF handle. value    The value of the row to find.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
find_tag_category(*args)
Returns : String categoryname_in
+*args   : String tagname

+C prototype: int cbf_find_tag_category (cbf_handle handle,
+                 const char* tagname,    const char** categoryname);

+CBFLib documentation:
+DESCRIPTION
+cbf_find_tag_category sets categoryname to the category associated 
+with tagname in the dictionary associated with handle. 
+cbf_set_tag_category upddates the dictionary associated with handle 
+to indicated that tagname is in category categoryname_in.
+ARGUMENTS
+handle            CBF handle. tagname           tag name. 
+categoryname      pointer to a returned category name. 
+categoryname_in   input category name.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
find_tag_root(*args)
Returns : String tagroot
+*args   : String tagname

+C prototype: int cbf_find_tag_root (cbf_handle handle, const char* tagname,
+                 const    char** tagroot);

+CBFLib documentation:
+DESCRIPTION
+cbf_find_tag_root sets *tagroot to the root tag of which tagname is 
+an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in 
+the dictionary associated with handle, creating the dictionary if 
+necessary. cbf_require_tag_root sets *tagroot to the root tag of 
+which tagname is an alias, if there is one, or to the value of 
+tagname, if tagname is not an alias.
+A returned tagroot string must not be modified in any way.
+ARGUMENTS
+handle       CBF handle. tagname      tag name which may be an alias. 
+tagroot      pointer to a returned tag root name. tagroot_in   input 
+tag root name.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
force_new_category(*args)
Returns : string
+*args   : 

+C prototype: int cbf_force_new_category (cbf_handle handle,
+                 const char    *categoryname);

+CBFLib documentation:
+DESCRIPTION
+cbf_force_new_category creates a new category in the current data 
+block with name categoryname and makes it the current category. 
+Duplicate category names are allowed.
+Even if a category with this name already exists, a new category of 
+the same name is created and becomes the current category. The allows 
+for the creation of unlooped tag/value lists drawn from the same 
+category.
+ARGUMENTS
+handle         CBF handle. categoryname   The name of the new 
+category.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
force_new_datablock(*args)
Returns : string
+*args   : 

+C prototype: int cbf_force_new_datablock (cbf_handle handle,
+                 const char    *datablockname);

+CBFLib documentation:
+DESCRIPTION
+cbf_force_new_datablock creates a new data block with name 
+datablockname and makes it the current data block. Duplicate data 
+block names are allowed. cbf_force_new_saveframe creates a new savew 
+frame with name saveframename and makes it the current save frame. 
+Duplicate save frame names are allowed.
+Even if a save frame with this name already exists, a new save frame 
+is created and becomes the current save frame.
+ARGUMENTS
+handle          CBF handle. datablockname   The name of the new data 
+block. saveframename   The name of the new save frame.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
force_new_saveframe(*args)
Returns : string
+*args   : 

+C prototype: int cbf_force_new_saveframe (cbf_handle handle,
+                 const char    *saveframename);

+CBFLib documentation:
+DESCRIPTION
+cbf_force_new_datablock creates a new data block with name 
+datablockname and makes it the current data block. Duplicate data 
+block names are allowed. cbf_force_new_saveframe creates a new savew 
+frame with name saveframename and makes it the current save frame. 
+Duplicate save frame names are allowed.
+Even if a save frame with this name already exists, a new save frame 
+is created and becomes the current save frame.
+ARGUMENTS
+handle          CBF handle. datablockname   The name of the new data 
+block. saveframename   The name of the new save frame.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
get_3d_image(*args)
get_3d_image(self, void ?)
+ +
get_3d_image_size(*args)
get_3d_image_size(self, void ?)
+ +
get_axis_setting(*args)
Returns : Float start,Float increment
+*args   : String axis_id

+C prototype: int cbf_get_axis_setting (cbf_handle handle,
+                 unsigned int reserved,    const char *axis_id, double *start,
+                 double *increment);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_axis_setting sets *start and *increment to the corresponding 
+values of the axis axis_id.
+Either of the destination pointers may be NULL.
+The parameter reserved is presently unused and should be set to 0.
+ARGUMENTS
+handle      CBF handle. reserved    Unused. Any value other than 0 is 
+invalid. axis_id     Axis id. start       Pointer to the destination 
+start value. increment   Pointer to the destination increment value.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
get_bin_sizes(*args)
get_bin_sizes(self, void ?)
+ +
get_crystal_id(*args)
Returns : 
+*args   : string

+C prototype: int cbf_get_crystal_id (cbf_handle handle,
+                 const char **crystal_id);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_crystal_id sets *crystal_id to point to the ASCII value of 
+the "diffrn.crystal_id" entry.
+If the value is not ASCII, the function returns CBF_BINARY.
+The value will be valid as long as the item exists and has not been 
+set to a new value.
+The value must not be modified by the program in any way.
+ARGUMENTS
+handle       CBF handle. crystal_id   Pointer to the destination 
+value pointer.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
get_datestamp(*args)
Returns : int year,int month,int day,int hour,int minute,double second,
+          int timezone
+*args   : 

+C prototype: int cbf_get_datestamp (cbf_handle handle, unsigned int reserved,
+                 int    *year, int *month, int *day, int *hour, int *minute,
+                 double *second,    int *timezone);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_datestamp sets *year, *month, *day, *hour, *minute and 
+*second to the corresponding values of the collection timestamp. 
+*timezone is set to timezone difference from UTC in minutes. The 
+parameter < i>reserved is presently unused and should be set to 0.
+Any of the destination pointers may be NULL.
+ARGUMENTS
+handle   CBF handle. reserved   Unused. Any value other than 0 is 
+invalid. year   Pointer to the destination timestamp year. month   
+Pointer to the destination timestamp month (1-12). day   Pointer to 
+the destination timestamp day (1-31). hour   Pointer to the 
+destination timestamp hour (0-23). minute   Pointer to the 
+destination timestamp minute (0-59). second   Pointer to the 
+destination timestamp second (0-60.0). timezone   Pointer to the 
+destination timezone difference from UTC in minutes.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
get_dictionary(*args)
Returns : CBFHandle dictionary
+*args   : 

+C prototype: int cbf_get_dictionary (cbf_handle handle,
+                 cbf_handle * dictionary);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_dictionary sets *dictionary to the handle of a CBF which has 
+been associated with the CBF handle by cbf_set_dictionary. 
+cbf_set_dictionary associates the CBF handle dictionary_in with 
+handle as its dictionary. cbf_require_dictionary sets *dictionary to 
+the handle of a CBF which has been associated with the CBF handle by 
+cbf_set_dictionary or creates a new empty CBF and associates it with 
+handle, returning the new handle in *dictionary.
+ARGUMENTS
+handle          CBF handle. dictionary      Pointer to CBF handle of 
+dictionary. dictionary_in   CBF handle of dcitionary.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
get_diffrn_id(*args)
Returns : 
+*args   : string

+C prototype: int cbf_get_diffrn_id (cbf_handle handle,
+                 const char **diffrn_id);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_diffrn_id sets *diffrn_id to point to the ASCII value of the 
+"diffrn.id" entry. cbf_require_diffrn_id also sets *diffrn_id to 
+point to the ASCII value of the "diffrn.id" entry, but, if the 
+"diffrn.id" entry does not exist, it sets the value in the CBF and 
+in*diffrn_id to the character string given by default_id, creating 
+the category and column is necessary.
+The diffrn_id will be valid as long as the item exists and has not 
+been set to a new value.
+The diffrn_id must not be modified by the program in any way.
+ARGUMENTS
+handle       CBF handle. diffrn_id    Pointer to the destination 
+value pointer. default_id   Character string default value.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
get_divergence(*args)
Returns : Float div_x_source,Float div_y_source,Float div_x_y_source
+*args   : 

+C prototype: int cbf_get_divergence (cbf_handle handle, double *div_x_source,
+                    double *div_y_source, double *div_x_y_source);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_divergence sets *div_x_source, *div_y_source and 
+*div_x_y_source to the corresponding source divergence parameters.
+Any of the destination pointers may be NULL.
+ARGUMENTS
+handle           CBF handle. div_x_source     Pointer to the 
+destination div_x_source. div_y_source     Pointer to the destination 
+div_y_source. div_x_y_source   Pointer to the destination 
+div_x_y_source.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
get_doublevalue(*args)
Returns : double
+*args   : 

+C prototype: int cbf_get_doublevalue (cbf_handle handle, double *number);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_doublevalue sets *number to the value of the ASCII item at 
+the current column and row interpreted as a decimal floating-point 
+number. cbf_require_doublevalue sets *number to the value of the 
+ASCII item at the current column and row interpreted as a decimal 
+floating-point number, setting it to defaultvalue if necessary.
+If the value is not ASCII, the function returns CBF_BINARY.
+ARGUMENTS
+handle         CBF handle. number         Pointer to the destination 
+number. defaultvalue   default number value.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
get_element_id(*args)
Returns : String
+*args   : Integer element_number

+C prototype: int cbf_get_element_id (cbf_handle handle,
+                 unsigned int    element_number, const char **element_id);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_element_id sets *element_id to point to the ASCII value of 
+the element_number th "diffrn_data_frame.detector_element_id" 
+entry, counting from 0.
+If the detector element does not exist, the function returns 
+CBF_NOTFOUND.
+The element_id will be valid as long as the item exists and has not 
+been set to a new value.
+The element_id must not be modified by the program in any way.
+ARGUMENTS
+handle   CBF handle. element_number   The number of the detector 
+element counting from 0 by order of appearance in the 
+"diffrn_data_frame" category. element_id   Pointer to the 
+destination.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
get_gain(*args)
Returns : Float gain,Float gain_esd
+*args   : 

+C prototype: int cbf_get_gain (cbf_handle handle, unsigned int element_number,
+                    double *gain, double *gain_esd);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_gain sets *gain and *gain_esd to the corresponding gain 
+parameters for element number element_number.
+Either of the destination pointers may be NULL.
+ARGUMENTS
+handle   CBF handle. element_number   The number of the detector 
+element counting from 0 by order of appearance in the 
+"diffrn_data_frame" category. gain   Pointer to the destination 
+gain. gain_esd   Pointer to the destination gain_esd.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
get_image(*args)
get_image(self, void ?)
+ +
get_image_size(*args)
Returns : size_t ndim1,size_t ndim2
+*args   : Integer element_number

+C prototype: int cbf_get_image_size (cbf_handle handle, unsigned int reserved,
+                    unsigned int element_number, size_t *ndim1, size_t *ndim2);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_image_size sets *ndim1 and *ndim2 to the slow and fast 
+dimensions of the image array for element number element_number. If 
+the array is 1-dimensional, *ndim1 will be set to the array size and 
+*ndim2 will be set to 1. If the array is 3-dimensional an error code 
+will be returned. cbf_get_3d_image_size sets *ndim1, *ndim2 and 
+*ndim3 to the slowest, next fastest and fastest dimensions, 
+respectively, of the 3D image array for element number 
+element_number. If the array is 1-dimensional, *ndim1 will be set to 
+the array size and *ndim2 and
+ +
get_integerarray_as_string(*args)
Returns : (Binary)String
+*args   : 

+C prototype: int cbf_get_integerarray (cbf_handle handle, int *binary_id,
+                 void    *array, size_t elsize, int elsigned, size_t elements,
+                 size_t    *elements_read);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_integerarray reads the binary value of the item at the 
+current column and row into an integer array. The array consists of 
+elements elements of elsize bytes each, starting at array. The 
+elements are signed if elsigned is non-0 and unsigned otherwise. 
+*binary_id is set to the binary section identifier and *elements_read 
+to the number of elements actually read. cbf_get_realarray reads the 
+binary value of the item at the current column and row into a real 
+array. The array consists of elements elements of elsize bytes each, 
+starting at array. *binary_id is set to the binary section identifier 
+and *elements_read to the number of elements actually read.
+If any element in the integer binary data cant fit into the 
+destination element, the destination is set the nearest possible 
+value.
+If the value is not binary, the function returns CBF_ASCII.
+If the requested number of elements cant be read, the function will 
+read as many as it can and then return CBF_ENDOFDATA.
+Currently, the destination array must consist of chars, shorts or 
+ints (signed or unsigned). If elsize is not equal to sizeof (char), 
+sizeof (short) or sizeof (int), for cbf_get_integerarray, or 
+sizeof(double) or sizeof(float), for cbf_get_realarray the function 
+returns CBF_ARGUMENT.
+An additional restriction in the current version of CBFlib is that 
+values too large to fit in an int are not correctly decompressed. As 
+an example, if the machine with 32-bit ints is reading an array 
+containing a value outside the range 0 .. 2^32-1 (unsigned) or -2^31 
+.. 2^31-1 (signed), the array will not be correctly decompressed. 
+This restriction will be removed in a future release. For 
+cbf_get_realarray, only IEEE format is supported. No conversion to 
+other floating point formats is done at this time.
+ARGUMENTS
+handle   CBF handle. binary_id   Pointer to the destination integer 
+binary identifier. array   Pointer to the destination array. elsize   
+Size in bytes of each destination array element. elsigned   Set to 
+non-0 if the destination array elements are signed. elements   The 
+number of elements to read. elements_read   Pointer to the 
+destination number of elements actually read.
+RETURN VALUE
+Returns an error code on failure or 0 for success. SEE ALSO
+ +
get_integerarrayparameters(*args)
Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned,
+          int elements,int minelement,int maxelement
+*args   : 

+C prototype: int cbf_get_integerarrayparameters (cbf_handle handle,
+                 unsigned int    *compression, int *binary_id, size_t *elsize,
+                 int *elsigned, int    *elunsigned, size_t *elements,
+                 int *minelement, int *maxelement);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_integerarrayparameters sets *compression, *binary_id, 
+*elsize, *elsigned, *elunsigned, *elements, *minelement and 
+*maxelement to values read from the binary value of the item at the 
+current column and row. This provides all the arguments needed for a 
+subsequent call to cbf_set_integerarray, if a copy of the array is to 
+be made into another CIF or CBF. cbf_get_realarrayparameters sets 
+*compression, *binary_id, *elsize, *elements to values read from the 
+binary value of the item at the current column and row. This provides 
+all the arguments needed for a subsequent call to cbf_set_realarray, 
+if a copy of the arry is to be made into another CIF or CBF.
+The variants cbf_get_integerarrayparameters_wdims and 
+cbf_get_realarrayparameters_wdims set **byteorder, *dim1, *dim2, 
+*dim3, and *padding as well, providing the additional parameters 
+needed for a subsequent call to cbf_set_integerarray_wdims or 
+cbf_set_realarray_wdims.
+The value returned in *byteorder is a pointer either to the string 
+"little_endian" or to the string "big_endian". This should be the 
+byte order of the data, not necessarily of the host machine. No 
+attempt should be made to modify this string. At this time only 
+"little_endian" will be returned.
+The values returned in *dim1, *dim2 and *dim3 are the sizes of the 
+fastest changing, second fastest changing and third fastest changing 
+dimensions of the array, if specified, or zero, if not specified.
+The value returned in *padding is the size of the post-data padding, 
+if any and if specified in the data header. The value is given as a 
+count of octets.
+If the value is not binary, the function returns CBF_ASCII.
+ARGUMENTS
+handle   CBF handle. compression   Compression method used. elsize   
+Size in bytes of each array element. binary_id   Pointer to the 
+destination integer binary identifier. elsigned   Pointer to an 
+integer. Set to 1 if the elements can be read as signed integers. 
+elunsigned   Pointer to an integer. Set to 1 if the elements can be 
+read as unsigned integers. elements   Pointer to the destination 
+number of elements. minelement   Pointer to the destination smallest 
+element. maxelement   Pointer to the destination largest element. 
+byteorder   Pointer to the destination byte order. dim1   Pointer to 
+the destination fastest dimension. dim2   Pointer to the destination 
+second fastest dimension. dim3   Pointer to the destination third 
+fastest dimension. padding   Pointer to the destination padding size.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
get_integerarrayparameters_wdims(*args)
get_integerarrayparameters_wdims(self, void ?)
+ +
get_integervalue(*args)
Returns : int
+*args   : 

+C prototype: int cbf_get_integervalue (cbf_handle handle, int *number);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_integervalue sets *number to the value of the ASCII item at 
+the current column and row interpreted as a decimal integer. 
+cbf_require_integervalue sets *number to the value of the ASCII item 
+at the current column and row interpreted as a decimal integer, 
+setting it to defaultvalue if necessary.
+If the value is not ASCII, the function returns CBF_BINARY.
+ARGUMENTS
+handle         CBF handle. number         pointer to the number. 
+defaultvalue   default number value.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
get_integration_time(*args)
Returns : Float time
+*args   : 

+C prototype: int cbf_get_integration_time (cbf_handle handle,
+                 unsigned int    reserved, double *time);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_integration_time sets *time to the integration time in 
+seconds. The parameter reserved is presently unused and should be set 
+to 0.
+ARGUMENTS
+handle     CBF handle. reserved   Unused. Any value other than 0 is 
+invalid. time       Pointer to the destination time.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
get_orientation_matrix(*args)
Returns : Float matrix_0,Float matrix_1,Float matrix_2,Float matrix_3,
+          Float matrix_4,Float matrix_5,Float matrix_6,Float matrix_7,
+          Float matrix_8
+*args   : 

+C prototype: int cbf_get_orientation_matrix (cbf_handle handle,
+                 double    ub_matrix[9]);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_orientation_matrix sets ub_matrix to point to the array of 
+orientation matrix entries in the "diffrn" category in the order of 
+columns:
+"UB[1][1]" "UB[1][2]" "UB[1][3]" "UB[2][1]" "UB[2][2]" 
+"UB[2][3]" "UB[3][1]" "UB[3][2]" "UB[3][3]"
+cbf_set_orientation_matrix sets the values in the "diffrn" category 
+to the values pointed to by ub_matrix.
+ARGUMENTS
+handle   CBF handle. ubmatric   Source or destination array of 9 
+doubles giving the orientation matrix parameters.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
get_overload(*args)
Returns : Float overload
+*args   : Integer element_number

+C prototype: int cbf_get_overload (cbf_handle handle,
+                 unsigned int element_number,    double *overload);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_overload sets *overload to the overload value for element 
+number element_number.
+ARGUMENTS
+handle   CBF handle. element_number   The number of the detector 
+element counting from 0 by order of appearance in the 
+"diffrn_data_frame" category. overload   Pointer to the destination 
+overload.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
get_pixel_size(*args)
Returns : Float pixel_size
+*args   : Int element_number,Int axis_number

+C prototype: int cbf_get_pixel_size (cbf_handle handle,
+                 unsigned int    element_number, unsigned int axis_number,
+                 double *psize);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_pixel_size sets *psize to point to the double value in 
+millimeters of the axis axis_number of the detector element 
+element_number. The axis_number is numbered from 1, starting with the 
+fastest axis.
+If the pixel size is not given explcitly in the 
+"array_element_size" category, the function returns CBF_NOTFOUND.
+ARGUMENTS
+handle   CBF handle. element_number   The number of the detector 
+element counting from 0 by order of appearance in the 
+"diffrn_data_frame" category. axis_number   The number of the axis, 
+fastest first, starting from 1.
+ +
get_polarization(*args)
Returns : float polarizn_source_ratio,float polarizn_source_norm
+*args   : 

+C prototype: int cbf_get_polarization (cbf_handle handle,
+                 double    *polarizn_source_ratio,
+                 double *polarizn_source_norm);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_polarization sets *polarizn_source_ratio and 
+*polarizn_source_norm to the corresponding source polarization 
+parameters.
+Either destination pointer may be NULL.
+ARGUMENTS
+handle   CBF handle. polarizn_source_ratio   Pointer to the 
+destination polarizn_source_ratio. polarizn_source_norm   Pointer to 
+the destination polarizn_source_norm.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
get_real_3d_image(*args)
get_real_3d_image(self, void ?)
+ +
get_real_image(*args)
get_real_image(self, void ?)
+ +
get_realarray(*args)
get_realarray(self, void ?)
+ +
get_realarrayparameters(*args)
Returns : int compression,int binary_id,int elsize,int elements
+*args   : 

+C prototype: int cbf_get_realarrayparameters (cbf_handle handle,
+                 unsigned int    *compression, int *binary_id, size_t *elsize,
+                 size_t *elements);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_integerarrayparameters sets *compression, *binary_id, 
+*elsize, *elsigned, *elunsigned, *elements, *minelement and 
+*maxelement to values read from the binary value of the item at the 
+current column and row. This provides all the arguments needed for a 
+subsequent call to cbf_set_integerarray, if a copy of the array is to 
+be made into another CIF or CBF. cbf_get_realarrayparameters sets 
+*compression, *binary_id, *elsize, *elements to values read from the 
+binary value of the item at the current column and row. This provides 
+all the arguments needed for a subsequent call to cbf_set_realarray, 
+if a copy of the arry is to be made into another CIF or CBF.
+The variants cbf_get_integerarrayparameters_wdims and 
+cbf_get_realarrayparameters_wdims set **byteorder, *dim1, *dim2, 
+*dim3, and *padding as well, providing the additional parameters 
+needed for a subsequent call to cbf_set_integerarray_wdims or 
+cbf_set_realarray_wdims.
+The value returned in *byteorder is a pointer either to the string 
+"little_endian" or to the string "big_endian". This should be the 
+byte order of the data, not necessarily of the host machine. No 
+attempt should be made to modify this string. At this time only 
+"little_endian" will be returned.
+The values returned in *dim1, *dim2 and *dim3 are the sizes of the 
+fastest changing, second fastest changing and third fastest changing 
+dimensions of the array, if specified, or zero, if not specified.
+The value returned in *padding is the size of the post-data padding, 
+if any and if specified in the data header. The value is given as a 
+count of octets.
+If the value is not binary, the function returns CBF_ASCII.
+ARGUMENTS
+handle   CBF handle. compression   Compression method used. elsize   
+Size in bytes of each array element. binary_id   Pointer to the 
+destination integer binary identifier. elsigned   Pointer to an 
+integer. Set to 1 if the elements can be read as signed integers. 
+elunsigned   Pointer to an integer. Set to 1 if the elements can be 
+read as unsigned integers. elements   Pointer to the destination 
+number of elements. minelement   Pointer to the destination smallest 
+element. maxelement   Pointer to the destination largest element. 
+byteorder   Pointer to the destination byte order. dim1   Pointer to 
+the destination fastest dimension. dim2   Pointer to the destination 
+second fastest dimension. dim3   Pointer to the destination third 
+fastest dimension. padding   Pointer to the destination padding size.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
get_realarrayparameters_wdims(*args)
get_realarrayparameters_wdims(self, void ?)
+ +
get_reciprocal_cell(*args)
get_reciprocal_cell(self, void ?)
+ +
get_timestamp(*args)
Returns : Float time,Integer timezone
+*args   : 

+C prototype: int cbf_get_timestamp (cbf_handle handle, unsigned int reserved,
+                    double *time, int *timezone);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_timestamp sets *time to the collection timestamp in seconds 
+since January 1 1970. *timezone is set to timezone difference from 
+UTC in minutes. The parameter reserved is presently unused and should 
+be set to 0.
+Either of the destination pointers may be NULL.
+ARGUMENTS
+handle     CBF handle. reserved   Unused. Any value other than 0 is 
+invalid. time       Pointer to the destination collection timestamp. 
+timezone   Pointer to the destination timezone difference.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
get_typeofvalue(*args)
Returns : 
+*args   : string

+C prototype: int cbf_get_typeofvalue (cbf_handle handle,
+                 const char **typeofvalue);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_value sets *typeofvalue to point an ASCII descriptor of the 
+value of the item at the current column and row. The strings that may 
+be returned are "null" for a null value indicated by a "." or a 
+"?", "bnry" for a binary value, "word" for an unquoted string, 
+"dblq" for a double-quoted string, "sglq" for a single-quoted 
+string, and "text" for a semicolon-quoted text field. A field for 
+which no value has been set sets *typeofvalue to NULL rather than to 
+the string "null".
+The typeofvalue must not be modified by the program in any way.
+ARGUMENTS
+handle   CBF handle. typeofvalue   Pointer to the destination 
+type-of-value string pointer.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
get_unit_cell(*args)
get_unit_cell(self, void ?)
+ +
get_value(*args)
Returns : 
+*args   : string

+C prototype: int cbf_get_value (cbf_handle handle, const char **value);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_value sets *value to point to the ASCII value of the item at 
+the current column and row. cbf_set_value sets *value to point to the 
+ASCII value of the item at the current column and row, creating the 
+data item if necessary and initializing it to a copy of defaultvalue.
+If the value is not ASCII, the function returns CBF_BINARY.
+The value will be valid as long as the item exists and has not been 
+set to a new value.
+The value must not be modified by the program in any way.
+ARGUMENTS
+handle   CBF handle. value    Pointer to the destination value 
+pointer. value    Default value character string.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
get_wavelength(*args)
Returns : double
+*args   : 

+C prototype: int cbf_get_wavelength (cbf_handle handle, double *wavelength);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_wavelength sets *wavelength to the current wavelength in 
+Angstrom.
+ARGUMENTS
+handle       CBF handle. wavelength   Pointer to the destination.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
insert_row(*args)
Returns : 
+*args   : Integer

+C prototype: int cbf_insert_row (cbf_handle handle, unsigned int rownumber);

+CBFLib documentation:
+DESCRIPTION
+cbf_insert_row adds a new row to the current category. The new row is 
+inserted as row rownumber and existing rows starting from rownumber 
+are moved up by 1. The new row becomes the current row.
+If the category has fewer than rownumber rows, the function returns 
+CBF_NOTFOUND.
+The row numbers start from 0.
+ARGUMENTS
+handle      CBF handle. rownumber   The row number of the new row.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
new_category(*args)
Returns : string
+*args   : 

+C prototype: int cbf_new_category (cbf_handle handle,
+                 const char *categoryname);

+CBFLib documentation:
+DESCRIPTION
+cbf_new_category creates a new category in the current data block 
+with name categoryname and makes it the current category.
+If a category with this name already exists, the existing category 
+becomes the current category.
+ARGUMENTS
+handle         CBF handle. categoryname   The name of the new 
+category.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
new_column(*args)
Returns : string
+*args   : 

+C prototype: int cbf_new_column (cbf_handle handle, const char *columnname);

+CBFLib documentation:
+DESCRIPTION
+cbf_new_column creates a new column in the current category with name 
+columnname and makes it the current column.
+If a column with this name already exists, the existing column 
+becomes the current category.
+ARGUMENTS
+handle       CBF handle. columnname   The name of the new column.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
new_datablock(*args)
Returns : string
+*args   : 

+C prototype: int cbf_new_datablock (cbf_handle handle,
+                 const char *datablockname);

+CBFLib documentation:
+DESCRIPTION
+cbf_new_datablock creates a new data block with name datablockname 
+and makes it the current data block. cbf_new_saveframe creates a new 
+save frame with name saveframename within the current data block and 
+makes the new save frame the current save frame.
+If a data block or save frame with this name already exists, the 
+existing data block or save frame becomes the current data block or 
+save frame.
+ARGUMENTS
+handle          CBF handle. datablockname   The name of the new data 
+block. saveframename   The name of the new save frame.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
new_row(*args)
Returns : 
+*args   : 

+C prototype: int cbf_new_row (cbf_handle handle);

+CBFLib documentation:
+DESCRIPTION
+cbf_new_row adds a new row to the current category and makes it the 
+current row.
+ARGUMENTS
+handle   CBF handle.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
new_saveframe(*args)
Returns : string
+*args   : 

+C prototype: int cbf_new_saveframe (cbf_handle handle,
+                 const char *saveframename);

+CBFLib documentation:
+DESCRIPTION
+cbf_new_datablock creates a new data block with name datablockname 
+and makes it the current data block. cbf_new_saveframe creates a new 
+save frame with name saveframename within the current data block and 
+makes the new save frame the current save frame.
+If a data block or save frame with this name already exists, the 
+existing data block or save frame becomes the current data block or 
+save frame.
+ARGUMENTS
+handle          CBF handle. datablockname   The name of the new data 
+block. saveframename   The name of the new save frame.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
next_category(*args)
Returns : 
+*args   : 

+C prototype: int cbf_next_category (cbf_handle handle);

+CBFLib documentation:
+DESCRIPTION
+cbf_next_category makes the category following the current category 
+in the current data block the current category.
+If there are no more categories, the function returns CBF_NOTFOUND.
+The current column and row become undefined.
+ARGUMENTS
+handle   CBF handle.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
next_column(*args)
Returns : 
+*args   : 

+C prototype: int cbf_next_column (cbf_handle handle);

+CBFLib documentation:
+DESCRIPTION
+cbf_next_column makes the column following the current column in the 
+current category the current column.
+If there are no more columns, the function returns CBF_NOTFOUND.
+The current row is not affected.
+ARGUMENTS
+handle   CBF handle.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
next_datablock(*args)
Returns : 
+*args   : 

+C prototype: int cbf_next_datablock (cbf_handle handle);

+CBFLib documentation:
+DESCRIPTION
+cbf_next_datablock makes the data block following the current data 
+block the current data block.
+If there are no more data blocks, the function returns CBF_NOTFOUND.
+The current category becomes undefined.
+ARGUMENTS
+handle   CBF handle.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
next_row(*args)
Returns : 
+*args   : 

+C prototype: int cbf_next_row (cbf_handle handle);

+CBFLib documentation:
+DESCRIPTION
+cbf_next_row makes the row following the current row in the current 
+category the current row.
+If there are no more rows, the function returns CBF_NOTFOUND.
+The current column is not affected.
+ARGUMENTS
+handle   CBF handle.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
read_file(*args)
Returns : 
+*args   : String filename,Integer headers

+C prototype: int cbf_read_file (cbf_handle handle, FILE *file, int headers);

+CBFLib documentation:
+DESCRIPTION
+cbf_read_file reads the CBF or CIF file file into the CBF object 
+specified by handle, using the CIF 1.0 convention of 80 character 
+lines. cbf_read_widefile reads the CBF or CIF file file into the CBF 
+object specified by handle, using the CIF 1.1 convention of 2048 
+character lines. A warning is issued to stderr for ascii lines over 
+the limit. No test is performed on binary sections.
+Validation is performed in three ways levels: during the lexical 
+scan, during the parse, and, if a dictionary was converted, against 
+the value types, value enumerations, categories and parent-child 
+relationships specified in the dictionary.
+headers controls the interprestation of binary section headers of 
+imgCIF files.
+MSG_DIGEST:   Instructs CBFlib to check that the digest of the binary 
+section matches any header value. If the digests do not match, the 
+call will return CBF_FORMAT. This evaluation and comparison is 
+delayed (a "lazy" evaluation) to ensure maximal processing 
+efficiency. If an immediately evaluation is required, see 
+MSG_DIGESTNOW, below. MSG_DIGESTNOW:   Instructs CBFlib to check that 
+the digest of the binary section matches any header value. If the 
+digests do not match, the call will return CBF_FORMAT. This 
+evaluation and comparison is performed during initial parsing of the 
+section to ensure timely error reporting at the expense of processing 
+efficiency. If a more efficient delayed ("lazy") evaluation is 
+required, see MSG_DIGESTNOW, below. MSG_NODIGEST:   Do not check the 
+digest (default).
+CBFlib defers reading binary sections as long as possible. In the 
+current version of CBFlib, this means that:
+1. The file must be a random-access file opened in binary mode (fopen
+ +
read_template(*args)
Returns : 
+*args   : String filename

+C prototype: int cbf_read_template (cbf_handle handle, FILE *file);

+CBFLib documentation:
+DESCRIPTION
+cbf_read_template reads the CBF or CIF file file into the CBF object 
+specified by handle and selects the first datablock as the current 
+datablock.
+ARGUMENTS
+handle   Pointer to a CBF handle. file     Pointer to a file 
+descriptor.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
read_widefile(*args)
read_widefile(self, void ?)
+ +
remove_category(*args)
Returns : 
+*args   : 

+C prototype: int cbf_remove_category (cbf_handle handle);

+CBFLib documentation:
+DESCRIPTION
+cbf_remove_category deletes the current category.
+The current category becomes undefined.
+ARGUMENTS
+handle   CBF handle.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
remove_column(*args)
Returns : 
+*args   : 

+C prototype: int cbf_remove_column (cbf_handle handle);

+CBFLib documentation:
+DESCRIPTION
+cbf_remove_column deletes the current column.
+The current column becomes undefined.
+ARGUMENTS
+handle   CBF handle.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
remove_datablock(*args)
Returns : 
+*args   : 

+C prototype: int cbf_remove_datablock (cbf_handle handle);

+CBFLib documentation:
+DESCRIPTION
+cbf_remove_datablock deletes the current data block. 
+cbf_remove_saveframe deletes the current save frame.
+The current data block becomes undefined.
+ARGUMENTS
+handle   CBF handle.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
remove_row(*args)
Returns : 
+*args   : 

+C prototype: int cbf_remove_row (cbf_handle handle);

+CBFLib documentation:
+DESCRIPTION
+cbf_remove_row deletes the current row in the current category.
+If the current row was the last row, it will move down by 1, 
+otherwise, it will remain the same.
+ARGUMENTS
+handle   CBF handle.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
remove_saveframe(*args)
Returns : 
+*args   : 

+C prototype: int cbf_remove_saveframe (cbf_handle handle);

+CBFLib documentation:
+DESCRIPTION
+cbf_remove_datablock deletes the current data block. 
+cbf_remove_saveframe deletes the current save frame.
+The current data block becomes undefined.
+ARGUMENTS
+handle   CBF handle.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
require_category(*args)
Returns : string
+*args   : 

+C prototype: int cbf_require_category (cbf_handle handle,
+                 const char    *categoryname);

+CBFLib documentation:
+DESCRIPTION
+cbf_rewuire_category makes the category in the current data block 
+with name categoryname the current category, if it exists, or creates 
+the catagory if it does not exist.
+The comparison is case-insensitive.
+The current column and row become undefined.
+ARGUMENTS
+handle         CBF handle. categoryname   The name of the category to 
+find.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
require_category_root(*args)
require_category_root(self, char categoryname) -> char
+ +
require_column(*args)
Returns : string
+*args   : 

+C prototype: int cbf_require_column (cbf_handle handle,
+                 const char *columnname);

+CBFLib documentation:
+DESCRIPTION
+cbf_require_column makes the columns in the current category with 
+name columnname the current column, if it exists, or creates it if it 
+does not.
+The comparison is case-insensitive.
+The current row is not affected.
+ARGUMENTS
+handle       CBF handle. columnname   The name of column to find.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
require_column_doublevalue(*args)
Returns : Float defaultvalue
+*args   : String columnname,Float Value

+C prototype: int cbf_require_column_doublevalue (cbf_handle handle,
+                 const char    *columnname, double *number,
+                 const double defaultvalue);

+CBFLib documentation:
+DESCRIPTION
+cbf_require_column_doublevalue sets *number to the value of the ASCII 
+item at the current row for the column given with the name given by 
+*columnname, with the value interpreted as a decimal floating-point 
+number, or to the number given by defaultvalue if the item cannot be 
+found.
+ARGUMENTS
+handle   CBF handle. columnname   Name of the column containing the 
+number. number   pointer to the location to receive the 
+floating-point value. defaultvalue   Value to use if the requested 
+column and value cannot be found.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
require_column_integervalue(*args)
Returns : Int Value
+*args   : String Columnvalue,Int default

+C prototype: int cbf_require_column_integervalue (cbf_handle handle,
+                 const char    *columnname, int *number,
+                 const int defaultvalue);

+CBFLib documentation:
+DESCRIPTION
+cbf_require_column_doublevalue sets *number to the value of the ASCII 
+item at the current row for the column given with the name given by 
+*columnname, with the value interpreted as an integer number, or to 
+the number given by defaultvalue if the item cannot be found.
+ARGUMENTS
+handle   CBF handle. columnname   Name of the column containing the 
+number. number   pointer to the location to receive the integer 
+value. defaultvalue   Value to use if the requested column and value 
+cannot be found.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
require_column_value(*args)
Returns : String Name
+*args   : String columnnanme,String Default

+C prototype: int cbf_require_column_value (cbf_handle handle,
+                 const char    *columnname, const char **value,
+                 const char *defaultvalue);

+CBFLib documentation:
+DESCRIPTION
+cbf_require_column_doublevalue sets *value to the ASCII item at the 
+current row for the column given with the name given by *columnname, 
+or to the string given by defaultvalue if the item cannot be found.
+ARGUMENTS
+handle   CBF handle. columnname   Name of the column containing the 
+number. value   pointer to the location to receive the value. 
+defaultvalue   Value to use if the requested column and value cannot 
+be found.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
require_datablock(*args)
Returns : string
+*args   : 

+C prototype: int cbf_require_datablock (cbf_handle handle,
+                 const char    *datablockname);

+CBFLib documentation:
+DESCRIPTION
+cbf_require_datablock makes the data block with name datablockname 
+the current data block, if it exists, or creates it if it does not.
+The comparison is case-insensitive.
+The current category becomes undefined.
+ARGUMENTS
+handle          CBF handle. datablockname   The name of the data 
+block to find or create.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
require_doublevalue(*args)
Returns : Float Number
+*args   : Float Default

+C prototype: int cbf_require_doublevalue (cbf_handle handle, double *number,
+                 double    defaultvalue);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_doublevalue sets *number to the value of the ASCII item at 
+the current column and row interpreted as a decimal floating-point 
+number. cbf_require_doublevalue sets *number to the value of the 
+ASCII item at the current column and row interpreted as a decimal 
+floating-point number, setting it to defaultvalue if necessary.
+If the value is not ASCII, the function returns CBF_BINARY.
+ARGUMENTS
+handle         CBF handle. number         Pointer to the destination 
+number. defaultvalue   default number value.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
require_integervalue(*args)
Returns : Int number
+*args   : Int thedefault

+C prototype: int cbf_require_integervalue (cbf_handle handle, int *number,
+                 int    defaultvalue);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_integervalue sets *number to the value of the ASCII item at 
+the current column and row interpreted as a decimal integer. 
+cbf_require_integervalue sets *number to the value of the ASCII item 
+at the current column and row interpreted as a decimal integer, 
+setting it to defaultvalue if necessary.
+If the value is not ASCII, the function returns CBF_BINARY.
+ARGUMENTS
+handle         CBF handle. number         pointer to the number. 
+defaultvalue   default number value.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
require_tag_root(*args)
Returns : String tagroot
+*args   : String tagname

+C prototype: int cbf_require_tag_root (cbf_handle handle, const char* tagname,
+                    const char** tagroot);

+CBFLib documentation:
+DESCRIPTION
+cbf_find_tag_root sets *tagroot to the root tag of which tagname is 
+an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in 
+the dictionary associated with handle, creating the dictionary if 
+necessary. cbf_require_tag_root sets *tagroot to the root tag of 
+which tagname is an alias, if there is one, or to the value of 
+tagname, if tagname is not an alias.
+A returned tagroot string must not be modified in any way.
+ARGUMENTS
+handle       CBF handle. tagname      tag name which may be an alias. 
+tagroot      pointer to a returned tag root name. tagroot_in   input 
+tag root name.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
require_value(*args)
Returns : String Value
+*args   : String defaultvalue

+C prototype: int cbf_require_value (cbf_handle handle, const char **value,
+                 const    char *defaultvalue );

+CBFLib documentation:
+DESCRIPTION
+cbf_get_value sets *value to point to the ASCII value of the item at 
+the current column and row. cbf_set_value sets *value to point to the 
+ASCII value of the item at the current column and row, creating the 
+data item if necessary and initializing it to a copy of defaultvalue.
+If the value is not ASCII, the function returns CBF_BINARY.
+The value will be valid as long as the item exists and has not been 
+set to a new value.
+The value must not be modified by the program in any way.
+ARGUMENTS
+handle   CBF handle. value    Pointer to the destination value 
+pointer. value    Default value character string.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
reset_category(*args)
Returns : 
+*args   : 

+C prototype: int cbf_reset_category (cbf_handle handle);

+CBFLib documentation:
+DESCRIPTION
+cbf_reset_category deletes all columns and rows from current category.
+ARGUMENTS
+handle   CBF handle.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
reset_datablock(*args)
Returns : 
+*args   : 

+C prototype: int cbf_reset_datablock (cbf_handle handle);

+CBFLib documentation:
+DESCRIPTION
+cbf_reset_datablock deletes all categories from the current data 
+block. cbf_reset_saveframe deletes all categories from the current 
+save frame.
+ARGUMENTS
+handle   CBF handle.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
reset_datablocks(*args)
Returns : 
+*args   : 

+C prototype: int cbf_reset_datablocks (cbf_handle handle);

+CBFLib documentation:
+DESCRIPTION
+cbf_reset_datablocks deletes all categories from all data blocks.
+The current data block does not change.
+ARGUMENTS
+handle   CBF handle.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
reset_saveframe(*args)
Returns : 
+*args   : 

+C prototype: int cbf_reset_saveframe (cbf_handle handle);

+CBFLib documentation:
+DESCRIPTION
+cbf_reset_datablock deletes all categories from the current data 
+block. cbf_reset_saveframe deletes all categories from the current 
+save frame.
+ARGUMENTS
+handle   CBF handle.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
rewind_blockitem(*args)
Returns : CBF_NODETYPE
+*args   : 

+C prototype: int cbf_rewind_blockitem (cbf_handle handle,
+                 CBF_NODETYPE * type);

+CBFLib documentation:
+DESCRIPTION
+cbf_rewind_category makes the first category in the current data 
+block the current category. cbf_rewind_saveframe makes the first 
+saveframe in the current data block the current saveframe. 
+cbf_rewind_blockitem makes the first blockitem (category or 
+saveframe) in the current data block the current blockitem.
+If there are no categories, saveframes or blockitems the function 
+returns CBF_NOTFOUND.
+The current column and row become undefined.
+ARGUMENTS
+handle   CBF handle.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
rewind_category(*args)
Returns : 
+*args   : 

+C prototype: int cbf_rewind_category (cbf_handle handle);

+CBFLib documentation:
+DESCRIPTION
+cbf_rewind_category makes the first category in the current data 
+block the current category. cbf_rewind_saveframe makes the first 
+saveframe in the current data block the current saveframe. 
+cbf_rewind_blockitem makes the first blockitem (category or 
+saveframe) in the current data block the current blockitem.
+If there are no categories, saveframes or blockitems the function 
+returns CBF_NOTFOUND.
+The current column and row become undefined.
+ARGUMENTS
+handle   CBF handle.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
rewind_column(*args)
Returns : 
+*args   : 

+C prototype: int cbf_rewind_column (cbf_handle handle);

+CBFLib documentation:
+DESCRIPTION
+cbf_rewind_column makes the first column in the current category the 
+current column.
+If there are no columns, the function returns CBF_NOTFOUND.
+The current row is not affected.
+ARGUMENTS
+handle   CBF handle.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
rewind_datablock(*args)
Returns : 
+*args   : 

+C prototype: int cbf_rewind_datablock (cbf_handle handle);

+CBFLib documentation:
+DESCRIPTION
+cbf_rewind_datablock makes the first data block the current data 
+block.
+If there are no data blocks, the function returns CBF_NOTFOUND.
+The current category becomes undefined.
+ARGUMENTS
+handle   CBF handle.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
rewind_row(*args)
Returns : 
+*args   : 

+C prototype: int cbf_rewind_row (cbf_handle handle);

+CBFLib documentation:
+DESCRIPTION
+cbf_rewind_row makes the first row in the current category the 
+current row.
+If there are no rows, the function returns CBF_NOTFOUND.
+The current column is not affected.
+ARGUMENTS
+handle   CBF handle.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
rewind_saveframe(*args)
Returns : 
+*args   : 

+C prototype: int cbf_rewind_saveframe (cbf_handle handle);

+CBFLib documentation:
+DESCRIPTION
+cbf_rewind_category makes the first category in the current data 
+block the current category. cbf_rewind_saveframe makes the first 
+saveframe in the current data block the current saveframe. 
+cbf_rewind_blockitem makes the first blockitem (category or 
+saveframe) in the current data block the current blockitem.
+If there are no categories, saveframes or blockitems the function 
+returns CBF_NOTFOUND.
+The current column and row become undefined.
+ARGUMENTS
+handle   CBF handle.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
row_number(*args)
Returns : Integer
+*args   : 

+C prototype: int cbf_row_number (cbf_handle handle, unsigned int *row);

+CBFLib documentation:
+DESCRIPTION
+cbf_row_number sets *row to the number of the current row of the 
+current category.
+ARGUMENTS
+handle   CBF handle. row      Pointer to the destination row number.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
select_category(*args)
Returns : 
+*args   : Integer

+C prototype: int cbf_select_category (cbf_handle handle,
+                 unsigned int category);

+CBFLib documentation:
+DESCRIPTION
+cbf_select_category selects category number category in the current 
+data block as the current category.
+The first category is number 0.
+The current column and row become undefined.
+If the category does not exist, the function returns CBF_NOTFOUND.
+ARGUMENTS
+handle     CBF handle. category   Number of the category to select.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
select_column(*args)
Returns : 
+*args   : Integer

+C prototype: int cbf_select_column (cbf_handle handle, unsigned int column);

+CBFLib documentation:
+DESCRIPTION
+cbf_select_column selects column number column in the current 
+category as the current column.
+The first column is number 0.
+The current row is not affected
+If the column does not exist, the function returns CBF_NOTFOUND.
+ARGUMENTS
+handle   CBF handle. column   Number of the column to select.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
select_datablock(*args)
Returns : 
+*args   : Integer

+C prototype: int cbf_select_datablock (cbf_handle handle,
+                 unsigned int datablock);

+CBFLib documentation:
+DESCRIPTION
+cbf_select_datablock selects data block number datablock as the 
+current data block.
+The first data block is number 0.
+If the data block does not exist, the function returns CBF_NOTFOUND.
+ARGUMENTS
+handle      CBF handle. datablock   Number of the data block to 
+select.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
select_row(*args)
Returns : 
+*args   : Integer

+C prototype: int cbf_select_row (cbf_handle handle, unsigned int row);

+CBFLib documentation:
+DESCRIPTION
+cbf_select_row selects row number row in the current category as the 
+current row.
+The first row is number 0.
+The current column is not affected
+If the row does not exist, the function returns CBF_NOTFOUND.
+ARGUMENTS
+handle   CBF handle. row      Number of the row to select.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
set_3d_image(*args)
set_3d_image(self, void ?)
+ +
set_axis_setting(*args)
Returns : 
+*args   : String axis_id,Float start,Float increment

+C prototype: int cbf_set_axis_setting (cbf_handle handle,
+                 unsigned int reserved,    const char *axis_id, double start,
+                 double increment);

+CBFLib documentation:
+DESCRIPTION
+cbf_set_axis_setting sets the starting and increment values of the 
+axis axis_id to start and increment.
+The parameter reserved is presently unused and should be set to 0.
+ARGUMENTS
+handle      CBF handle. reserved    Unused. Any value other than 0 is 
+invalid. axis_id     Axis id. start       Start value. increment   
+Increment value.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
set_bin_sizes(*args)
set_bin_sizes(self, void ?)
+ +
set_category_root(*args)
Returns : 
+*args   : String categoryname,String categoryroot

+C prototype: int cbf_set_category_root (cbf_handle handle,
+                 const char*    categoryname_in, const char*categoryroot);

+CBFLib documentation:
+DESCRIPTION
+cbf_find_category_root sets *categoryroot to the root category of 
+which categoryname is an alias. cbf_set_category_root sets 
+categoryname_in as an alias of categoryroot in the dictionary 
+associated with handle, creating the dictionary if necessary. 
+cbf_require_category_root sets *categoryroot to the root category of 
+which categoryname is an alias, if there is one, or to the value of 
+categoryname, if categoryname is not an alias.
+A returned categoryroot string must not be modified in any way.
+ARGUMENTS
+handle            CBF handle. categoryname      category name which 
+may be an alias. categoryroot      pointer to a returned category 
+root name. categoryroot_in   input category root name.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
set_crystal_id(*args)
Returns : string
+*args   : 

+C prototype: int cbf_set_crystal_id (cbf_handle handle,
+                 const char *crystal_id);

+CBFLib documentation:
+DESCRIPTION
+cbf_set_crystal_id sets the "diffrn.crystal_id" entry to the ASCII 
+value crystal_id.
+ARGUMENTS
+handle       CBF handle. crystal_id   ASCII value.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
set_datablockname(*args)
Returns : string
+*args   : 

+C prototype: int cbf_set_datablockname (cbf_handle handle,
+                 const char    *datablockname);

+CBFLib documentation:
+DESCRIPTION
+cbf_set_datablockname changes the name of the current data block to 
+datablockname. cbf_set_saveframename changes the name of the current 
+save frame to saveframename.
+If a data block or save frame with this name already exists 
+(comparison is case-insensitive), the function returns CBF_IDENTICAL.
+ARGUMENTS
+handle          CBF handle. datablockname   The new data block name. 
+datablockname   The new save frame name.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
set_datestamp(*args)
Returns : 
+*args   : int year,int month,int day,int hour,int minute,double second,
+          int timezone,Float precision

+C prototype: int cbf_set_datestamp (cbf_handle handle, unsigned int reserved,
+                 int    year, int month, int day, int hour, int minute,
+                 double second, int    timezone, double precision);

+CBFLib documentation:
+DESCRIPTION
+cbf_set_datestamp sets the collection timestamp in seconds since 
+January 1 1970 to the value specified by time. The timezone 
+difference from UTC in minutes is set to timezone. If no timezone is 
+desired, timezone should be CBF_NOTIM EZONE. The parameter reserved 
+is presently unused and should be set to 0.
+The precision of the new timestamp is specified by the value 
+precision in seconds. If precision is 0, the saved timestamp is 
+assumed accurate to 1 second.
+ARGUMENTS
+handle    CBF handle. reserved  Unused. Any value other than 0 is 
+invalid. time      Timestamp in seconds since January 1 1970. 
+timezone  Timezone difference from UTC in minutes or CBF_NOTIMEZONE. 
+precision Timestamp precision in seconds.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
set_dictionary(*args)
Returns : 
+*args   : CBFHandle dictionary

+C prototype: int cbf_set_dictionary (cbf_handle handle,
+                 cbf_handle dictionary_in);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_dictionary sets *dictionary to the handle of a CBF which has 
+been associated with the CBF handle by cbf_set_dictionary. 
+cbf_set_dictionary associates the CBF handle dictionary_in with 
+handle as its dictionary. cbf_require_dictionary sets *dictionary to 
+the handle of a CBF which has been associated with the CBF handle by 
+cbf_set_dictionary or creates a new empty CBF and associates it with 
+handle, returning the new handle in *dictionary.
+ARGUMENTS
+handle          CBF handle. dictionary      Pointer to CBF handle of 
+dictionary. dictionary_in   CBF handle of dcitionary.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
set_diffrn_id(*args)
Returns : string
+*args   : 

+C prototype: int cbf_set_diffrn_id (cbf_handle handle, const char *diffrn_id);

+CBFLib documentation:
+DESCRIPTION
+cbf_set_diffrn_id sets the "diffrn.id" entry of the current 
+datablock to the ASCII value diffrn_id.
+This function also changes corresponding "diffrn_id" entries in the 
+"diffrn_source", "diffrn_radiation", "diffrn_detector" and 
+"diffrn_measurement" categories.
+ARGUMENTS
+handle      CBF handle. diffrn_id   ASCII value.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
set_divergence(*args)
Returns : 
+*args   : Float div_x_source,Float div_y_source,Float div_x_y_source

+C prototype: int cbf_set_divergence (cbf_handle handle, double div_x_source,
+                 double    div_y_source, double div_x_y_source);

+CBFLib documentation:
+DESCRIPTION
+cbf_set_divergence sets the source divergence parameters to the 
+values specified by div_x_source, div_y_source and div_x_y_source.
+ARGUMENTS
+handle           CBF handle. div_x_source     New value of 
+div_x_source. div_y_source     New value of div_y_source. 
+div_x_y_source   New value of div_x_y_source.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
set_doublevalue(*args)
Returns : 
+*args   : String format,Float number

+C prototype: int cbf_set_doublevalue (cbf_handle handle, const char *format,
+                 double    number);

+CBFLib documentation:
+DESCRIPTION
+cbf_set_doublevalue sets the item at the current column and row to 
+the floating-point value number written as an ASCII string with the 
+format specified by format as appropriate for the printf function.
+ARGUMENTS
+handle   CBF handle. format   Format for the number. number   
+Floating-point value.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
set_gain(*args)
Returns : 
+*args   : Float gain,Float gain_esd

+C prototype: int cbf_set_gain (cbf_handle handle, unsigned int element_number,
+                    double gain, double gain_esd);

+CBFLib documentation:
+DESCRIPTION
+cbf_set_gain sets the gain of element number element_number to the 
+values specified by gain and gain_esd.
+ARGUMENTS
+handle   CBF handle. element_number   The number of the detector 
+element counting from 0 by order of appearance in the 
+"diffrn_data_frame" category. gain   New gain value. gain_esd   New 
+gain_esd value.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
set_image(*args)
set_image(self, void ?)
+ +
set_integerarray(*args)
Returns : 
+*args   : int compression,int binary_id,(binary) String data,int elsize,
+          int elsigned,int elements

+C prototype: int cbf_set_integerarray (cbf_handle handle,
+                 unsigned int compression,    int binary_id, void *array,
+                 size_t elsize, int elsigned, size_t    elements);

+CBFLib documentation:
+DESCRIPTION
+cbf_set_integerarray sets the binary value of the item at the current 
+column and row to an integer array. The array consists of elements 
+elements of elsize bytes each, starting at array. The elements are 
+signed if elsigned is non-0 and unsigned otherwise. binary_id is the 
+binary section identifier. cbf_set_realarray sets the binary value of 
+the item at the current column and row to an integer array. The array 
+consists of elements elements of elsize bytes each, starting at 
+array. binary_id is the binary section identifier.
+The cbf_set_integerarray_wdims and cbf_set_realarray_wdims allow the 
+data header values of byteorder, dim1, dim2, dim3 and padding to be 
+set to the data byte order, the fastest, second fastest and third 
+fastest array dimensions and the size in byte of the post data 
+padding to be used.
+The array will be compressed using the compression scheme specifed by 
+compression. Currently, the available schemes are:
+CBF_CANONICAL   Canonical-code compression (section 3.3.1) CBF_PACKED 
+  CCP4-style packing (section 3.3.2) CBF_PACKED_V2   CCP4-style 
+packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET   Simple 
+"byte_offset" compression. CBF_NONE   No compression. NOTE: This 
+scheme is by far the slowest of the four and uses much more disk 
+space. It is intended for routine use with small arrays only. With 
+large arrays (like images) it should be used only for debugging.
+The values compressed are limited to 64 bits. If any element in the 
+array is larger than 64 bits, the value compressed is the nearest 
+64-bit value.
+ +
set_integerarray_wdims(*args)
set_integerarray_wdims(self, void ?)
+ +
set_integervalue(*args)
Returns : int number
+*args   : 

+C prototype: int cbf_set_integervalue (cbf_handle handle, int number);

+CBFLib documentation:
+DESCRIPTION
+cbf_set_integervalue sets the item at the current column and row to 
+the integer value number written as a decimal ASCII string.
+ARGUMENTS
+handle   CBF handle. number   Integer value.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
set_integration_time(*args)
Returns : 
+*args   : Float time

+C prototype: int cbf_set_integration_time (cbf_handle handle,
+                 unsigned int    reserved, double time);

+CBFLib documentation:
+DESCRIPTION
+cbf_set_integration_time sets the integration time in seconds to the 
+value specified by time. The parameter reserved is presently unused 
+and should be set to 0.
+ARGUMENTS
+handle             CBF handle. reserved           Unused. Any value 
+other than 0 is invalid. time Integration   time in seconds.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
set_orientation_matrix(*args)
Returns : 
+*args   : Float matrix_0,Float matrix_1,Float matrix_2,Float matrix_3,
+          Float matrix_4,Float matrix_5,Float matrix_6,Float matrix_7,
+          Float matrix_8

+C prototype: int cbf_set_orientation_matrix (cbf_handle handle,
+                 double    ub_matrix[9]);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_orientation_matrix sets ub_matrix to point to the array of 
+orientation matrix entries in the "diffrn" category in the order of 
+columns:
+"UB[1][1]" "UB[1][2]" "UB[1][3]" "UB[2][1]" "UB[2][2]" 
+"UB[2][3]" "UB[3][1]" "UB[3][2]" "UB[3][3]"
+cbf_set_orientation_matrix sets the values in the "diffrn" category 
+to the values pointed to by ub_matrix.
+ARGUMENTS
+handle   CBF handle. ubmatric   Source or destination array of 9 
+doubles giving the orientation matrix parameters.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
set_overload(*args)
Returns : 
+*args   : Integer element_number,Float overload

+C prototype: int cbf_set_overload (cbf_handle handle,
+                 unsigned int element_number,    double overload);

+CBFLib documentation:
+DESCRIPTION
+cbf_set_overload sets the overload value of element number 
+element_number to overload.
+ARGUMENTS
+handle   CBF handle. element_number   The number of the detector 
+element counting from 0 by order of appearance in the 
+"diffrn_data_frame" category. overload   New overload value.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
set_pixel_size(*args)
Returns : 
+*args   : Int element_number,Int axis_number,Float pixel size

+C prototype: int cbf_set_pixel_size (cbf_handle handle,
+                 unsigned int    element_number, unsigned int axis_number,
+                 double psize);

+CBFLib documentation:
+DESCRIPTION
+cbf_set_pixel_size sets the item in the &quote;size&quote; column of 
+the "array_structure_list" category at the row which matches axis 
+axis_number of the detector element element_number converting the 
+double pixel size psize from meters to millimeters in storing it in 
+the "size" column for the axis axis_number of the detector element 
+element_number. The axis_number is numbered from 1, starting with the 
+fastest axis.
+If the "array_structure_list" category does not already exist, it 
+is created.
+If the appropriate row in the "array_structure_list" catgeory does 
+not already exist, it is created.
+If the pixel size is not given explcitly in the "array_element_size 
+category", the function returns CBF_NOTFOUND.
+ARGUMENTS
+handle   CBF handle. element_number   The number of the detector 
+element counting from 0 by order of appearance in the 
+"diffrn_data_frame" category. axis_number   The number of the axis, 
+fastest first, starting from 1.
+ +
set_polarization(*args)
Returns : 
+*args   : Float polarizn_source_ratio,Float polarizn_source_norm

+C prototype: int cbf_set_polarization (cbf_handle handle,
+                 double    polarizn_source_ratio, double polarizn_source_norm);

+CBFLib documentation:
+DESCRIPTION
+cbf_set_polarization sets the source polarization to the values 
+specified by polarizn_source_ratio and polarizn_source_norm.
+ARGUMENTS
+handle                  CBF handle. polarizn_source_ratio   New value 
+of polarizn_source_ratio. polarizn_source_norm    New value of 
+polarizn_source_norm.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
set_real_3d_image(*args)
set_real_3d_image(self, void ?)
+ +
set_real_image(*args)
set_real_image(self, void ?)
+ +
set_realarray(*args)
set_realarray(self, void ?)
+ +
set_realarray_wdims(*args)
set_realarray_wdims(self, void ?)
+ +
set_reciprocal_cell(*args)
set_reciprocal_cell(self, void ?)
+ +
set_tag_category(*args)
Returns : 
+*args   : String tagname,String categoryname_in

+C prototype: int cbf_set_tag_category (cbf_handle handle, const char* tagname,
+                    const char* categoryname_in);

+CBFLib documentation:
+DESCRIPTION
+cbf_find_tag_category sets categoryname to the category associated 
+with tagname in the dictionary associated with handle. 
+cbf_set_tag_category upddates the dictionary associated with handle 
+to indicated that tagname is in category categoryname_in.
+ARGUMENTS
+handle            CBF handle. tagname           tag name. 
+categoryname      pointer to a returned category name. 
+categoryname_in   input category name.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
set_tag_root(*args)
Returns : 
+*args   : String tagname,String tagroot_in

+C prototype: int cbf_set_tag_root (cbf_handle handle, const char* tagname,
+                 const    char*tagroot_in);

+CBFLib documentation:
+DESCRIPTION
+cbf_find_tag_root sets *tagroot to the root tag of which tagname is 
+an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in 
+the dictionary associated with handle, creating the dictionary if 
+necessary. cbf_require_tag_root sets *tagroot to the root tag of 
+which tagname is an alias, if there is one, or to the value of 
+tagname, if tagname is not an alias.
+A returned tagroot string must not be modified in any way.
+ARGUMENTS
+handle       CBF handle. tagname      tag name which may be an alias. 
+tagroot      pointer to a returned tag root name. tagroot_in   input 
+tag root name.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
set_timestamp(*args)
Returns : 
+*args   : Float time,Integer timezone,Float precision

+C prototype: int cbf_set_timestamp (cbf_handle handle, unsigned int reserved,
+                    double time, int timezone, double precision);

+CBFLib documentation:
+DESCRIPTION
+cbf_set_timestamp sets the collection timestamp in seconds since 
+January 1 1970 to the value specified by time. The timezone 
+difference from UTC in minutes is set to timezone. If no timezone is 
+desired, timezone should be CBF_NOTIM EZONE. The parameter reserved 
+is presently unused and should be set to 0.
+The precision of the new timestamp is specified by the value 
+precision in seconds. If precision is 0, the saved timestamp is 
+assumed accurate to 1 second.
+ARGUMENTS
+handle   CBF handle. reserved   Unused. Any value other than 0 is 
+invalid. time   Timestamp in seconds since January 1 1970. timezone   
+Timezone difference from UTC in minutes or CBF_NOTIMEZONE. precision  
+ Timestamp precision in seconds.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
set_typeofvalue(*args)
Returns : string
+*args   : 

+C prototype: int cbf_set_typeofvalue (cbf_handle handle,
+                 const char *typeofvalue);

+CBFLib documentation:
+DESCRIPTION
+cbf_set_typeofvalue sets the type of the item at the current column 
+and row to the type specified by the ASCII character string given by 
+typeofvalue. The strings that may be used are "null" for a null 
+value indicated by a "." or a "?", "word" for an unquoted 
+string, "dblq" for a double-quoted string, "sglq" for a 
+single-quoted string, and "text" for a semicolon-quoted text field. 
+Not all types may be used for all values. No changes may be made to 
+the type of binary values. You may not set the type of a string that 
+contains a single quote followed by a blank or a tab or which 
+contains multiple lines to "sglq". You may not set the type of a 
+string that contains a double quote followed by a blank or a tab or 
+which contains multiple lines to "dblq".
+ARGUMENTS
+handle        CBF handle. typeofvalue   ASCII string for desired type 
+of value.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
set_unit_cell(*args)
set_unit_cell(self, void ?)
+ +
set_value(*args)
Returns : string
+*args   : 

+C prototype: int cbf_set_value (cbf_handle handle, const char *value);

+CBFLib documentation:
+DESCRIPTION
+cbf_set_value sets the item at the current column and row to the 
+ASCII value value.
+ARGUMENTS
+handle         CBF handle. value          ASCII value. defaultvalue   
+default ASCII value.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
set_wavelength(*args)
Returns : double wavelength
+*args   : 

+C prototype: int cbf_set_wavelength (cbf_handle handle, double wavelength);

+CBFLib documentation:
+DESCRIPTION
+cbf_set_wavelength sets the current wavelength in Angstrom to 
+wavelength.
+ARGUMENTS
+handle       CBF handle. wavelength   Wavelength in Angstrom.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
write_file(*args)
Returns : 
+*args   : String filename,Integer ciforcbf,Integer Headers,Integer encoding

+C prototype: int cbf_write_file (cbf_handle handle, FILE *file, int readable,
+                 int    ciforcbf, int headers, int encoding);

+CBFLib documentation:
+DESCRIPTION
+cbf_write_file writes the CBF object specified by handle into the 
+file file, following CIF 1.0 conventions of 80 character lines. 
+cbf_write_widefile writes the CBF object specified by handle into the 
+file file, following CIF 1.1 conventions of 2048 character lines. A 
+warning is issued to stderr for ascii lines over the limit, and an 
+attempt is made to fold lines to fit. No test is performed on binary 
+sections.
+If a dictionary has been provided, aliases will be applied on output.
+Unlike cbf_read_file, the file does not have to be random-access.
+If the file is random-access and readable, readable can be set to 
+non-0 to indicate to CBFlib that the file can be used as a buffer to 
+conserve disk space. If the file is not random-access or not 
+readable, readable must be 0.
+If readable is non-0, CBFlib will close the file when it is no longer 
+required, otherwise this is the responsibility of the program.
+ciforcbf selects the format in which the binary sections are written:
+CIF   Write an imgCIF file. CBF   Write a CBF file (default).
+headers selects the type of header used in CBF binary sections and 
+selects whether message digests are generated. The value of headers 
+can be a logical OR of any of:
+MIME_HEADERS     Use MIME-type headers (default). MIME_NOHEADERS   
+Use a simple ASCII headers. MSG_DIGEST       Generate message digests 
+for binary data validation. MSG_NODIGEST     Do not generate message 
+digests (default).
+encoding selects the type of encoding used for binary sections and 
+the type of line-termination in imgCIF files. The value can be a 
+logical OR of any of:
+ENC_BASE64   Use BASE64 encoding (default). ENC_QP   Use 
+QUOTED-PRINTABLE encoding. ENC_BASE8   Use BASE8 (octal) encoding. 
+ENC_BASE10   Use BASE10 (decimal) encoding. ENC_BASE16   Use BASE16 
+(hexadecimal) encoding. ENC_FORWARD   For BASE8, BASE10 or BASE16 
+encoding, map bytes to words forward (1234) (default on little-endian 
+machines). ENC_BACKWARD   Map bytes to words backward (4321) (default 
+on big-endian machines). ENC_CRTERM   Terminate lines with CR. 
+ENC_LFTERM   Terminate lines with LF (default).
+ARGUMENTS
+handle   CBF handle. file   Pointer to a file descriptor. readable   
+If non-0: this file is random-access and readable and can be used as 
+a buffer. ciforcbf   Selects the format in which the binary sections 
+are written (CIF/CBF). headers   Selects the type of header in CBF 
+binary sections and message digest generation. encoding   Selects the 
+type of encoding used for binary sections and the type of 
+line-termination in imgCIF files.
+RETURN VALUE
+Returns an error code on failure or 0 for success.
+SEE ALSO
+ +
write_widefile(*args)
write_widefile(self, void ?)
+ +
+Properties defined here:
+
node
+
get = cbf_handle_struct_node_get(...)
+
+
set = cbf_handle_struct_node_set(...)
+
+
+
row
+
get = cbf_handle_struct_row_get(...)
+
+
set = cbf_handle_struct_row_set(...)
+
+
+
search_row
+
get = cbf_handle_struct_search_row_get(...)
+
+
set = cbf_handle_struct_search_row_set(...)
+
+
+
+Data and other attributes defined here:
+
__dict__ = <dictproxy object>
dictionary for instance variables (if defined)
+ +
__swig_destroy__ = <built-in function delete_cbf_handle_struct>
+ +
__swig_getmethods__ = {'node': <built-in function cbf_handle_struct_node_get>, 'row': <built-in function cbf_handle_struct_row_get>, 'search_row': <built-in function cbf_handle_struct_search_row_get>}
+ +
__swig_setmethods__ = {'node': <built-in function cbf_handle_struct_node_set>, 'row': <built-in function cbf_handle_struct_row_set>, 'search_row': <built-in function cbf_handle_struct_search_row_set>}
+ +
__weakref__ = <attribute '__weakref__' of 'cbf_handle_struct' objects>
list of weak references to the object (if defined)
+ +

+ + + + + +
 
+class cbf_positioner_struct(__builtin__.object)
    Methods defined here:
+
__del__ lambda self
+ +
__getattr__ lambda self, name
+ +
__init__(self, *args)
__init__(self) -> cbf_positioner_struct
+ +
__repr__ = _swig_repr(self)
+ +
__setattr__ lambda self, name, value
+ +
get_reciprocal(*args)
Returns : double reciprocal1,double reciprocal2,double reciprocal3
+*args   : double ratio,double wavelength,double real1,double real2,double real3

+C prototype: int cbf_get_reciprocal (cbf_goniometer goniometer,
+                 unsigned int    reserved, double ratio, double wavelength,
+                 double real1, double real2,    double real3,
+                 double *reciprocal1, double *reciprocal2,
+                 double    *reciprocal3);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_reciprocal sets *reciprocal1, * reciprocal2, and * 
+reciprocal3 to the 3 components of the of the reciprocal-space vector 
+corresponding to the real-space vector (real1, real2, real3). The 
+reciprocal-space vector is oriented to correspond to the goniometer 
+setting with all axes at 0. The value wavelength is the wavlength in 
+Angstrom and the value ratio specifies the current goniometer setting 
+and varies from 0.0 at the beginning of the exposur e to 1.0 at the 
+end, irrespective of the actual rotation range.
+Any of the destination pointers may be NULL.
+The parameter reserved is presently unused and should be set to 0.
+ARGUMENTS
+goniometer   Goniometer handle. reserved   Unused. Any value other 
+than 0 is invalid. ratio   Goniometer setting. 0 = beginning of 
+exposure, 1 = end. wavelength   Wavelength in Angstrom. real1   x 
+component of the real-space vector. real2   y component of the 
+real-space vector. real3   z component of the real-space vector. 
+reciprocal1   Pointer to the destination x component of the 
+reciprocal-space vector. reciprocal2   Pointer to the destination y 
+component of the reciprocal-space vector. reciprocal3   Pointer to 
+the destination z component of the reciprocal-space vector.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
get_rotation_axis(*args)
Returns : double vector1,double vector2,double vector3
+*args   : 

+C prototype: int cbf_get_rotation_axis (cbf_goniometer goniometer,
+                 unsigned int    reserved, double *vector1, double *vector2,
+                 double vector3);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_rotation_axis sets *vector1, *vector2, and *vector3 to the 3 
+components of the goniometer rotation axis used for the exposure.
+Any of the destination pointers may be NULL.
+The parameter reserved is presently unused and should be set to 0.
+ARGUMENTS
+goniometer   Goniometer handle. reserved   Unused. Any value other 
+than 0 is invalid. vector1   Pointer to the destination x component 
+of the rotation axis. vector2   Pointer to the destination y 
+component of the rotation axis. vector3   Pointer to the destination 
+z component of the rotation axis.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
get_rotation_range(*args)
Returns : Float start,Float increment
+*args   : 

+C prototype: int cbf_get_rotation_range (cbf_goniometer goniometer,
+                 unsigned int    reserved, double *start, double *increment);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_rotation_range sets *start and *increment to the 
+corresponding values of the goniometer rotation axis used for the 
+exposure.
+Either of the destination pointers may be NULL.
+The parameter reserved is presently unused and should be set to 0.
+ARGUMENTS
+goniometer   Goniometer handle. reserved     Unused. Any value other 
+than 0 is invalid. start        Pointer to the destination start 
+value. increment    Pointer to the destination increment value.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
rotate_vector(*args)
Returns : double final1,double final2,double final3
+*args   : double ratio,double initial1,double initial2,double initial3

+C prototype: int cbf_rotate_vector (cbf_goniometer goniometer,
+                 unsigned int    reserved, double ratio, double initial1,
+                 double initial2, double    initial3, double *final1,
+                 double *final2, double *final3);

+CBFLib documentation:
+DESCRIPTION
+cbf_rotate_vector sets *final1, *final2, and *final3 to the 3 
+components of the of the vector (initial1, initial2, initial3) after 
+reorientation by applying the goniometer rotations. The value ratio 
+specif ies the goniometer setting and varies from 0.0 at the 
+beginning of the exposure to 1.0 at the end, irrespective of the 
+actual rotation range.
+Any of the destination pointers may be NULL.
+The parameter reserved is presently unused and should be set to 0.
+ARGUMENTS
+goniometer   Goniometer handle. reserved   Unused. Any value other 
+than 0 is invalid. ratio   Goniometer setting. 0 = beginning of 
+exposure, 1 = end. initial1   x component of the initial vector. 
+initial2   y component of the initial vector. initial3   z component 
+of the initial vector. vector1   Pointer to the destination x 
+component of the final vector. vector2   Pointer to the destination y 
+component of the final vector. vector3   Pointer to the destination z 
+component of the final vector.
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+ +
+Properties defined here:
+
axes
+
get = cbf_positioner_struct_axes_get(...)
+
+
set = cbf_positioner_struct_axes_set(...)
+
+
+
axes_are_connected
+
get = cbf_positioner_struct_axes_are_connected_get(...)
+
+
set = cbf_positioner_struct_axes_are_connected_set(...)
+
+
+
axis
+
get = cbf_positioner_struct_axis_get(...)
+
+
set = cbf_positioner_struct_axis_set(...)
+
+
+
matrix
+
get = cbf_positioner_struct_matrix_get(...)
+
+
set = cbf_positioner_struct_matrix_set(...)
+
+
+
matrix_is_valid
+
get = cbf_positioner_struct_matrix_is_valid_get(...)
+
+
set = cbf_positioner_struct_matrix_is_valid_set(...)
+
+
+
+Data and other attributes defined here:
+
__dict__ = <dictproxy object>
dictionary for instance variables (if defined)
+ +
__swig_destroy__ = <built-in function delete_cbf_positioner_struct>
+ +
__swig_getmethods__ = {'axes': <built-in function cbf_positioner_struct_axes_get>, 'axes_are_connected': <built-in function cbf_positioner_struct_axes_are_connected_get>, 'axis': <built-in function cbf_positioner_struct_axis_get>, 'matrix': <built-in function cbf_positioner_struct_matrix_get>, 'matrix_is_valid': <built-in function cbf_positioner_struct_matrix_is_valid_get>}
+ +
__swig_setmethods__ = {'axes': <built-in function cbf_positioner_struct_axes_set>, 'axes_are_connected': <built-in function cbf_positioner_struct_axes_are_connected_set>, 'axis': <built-in function cbf_positioner_struct_axis_set>, 'matrix': <built-in function cbf_positioner_struct_matrix_set>, 'matrix_is_valid': <built-in function cbf_positioner_struct_matrix_is_valid_set>}
+ +
__weakref__ = <attribute '__weakref__' of 'cbf_positioner_struct' objects>
list of weak references to the object (if defined)
+ +

+ + + + + +
 
+Functions
       
cbf_detector_struct_swigregister(...)
+
cbf_handle_struct_swigregister(...)
+
cbf_positioner_struct_swigregister(...)
+
get_local_integer_byte_order(*args)
Returns : string
+*args   : 

+C prototype: int cbf_get_local_integer_byte_order (char ** byte_order);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_local_integer_byte_order returns the byte order of integers 
+on the machine on which the API is being run in the form of a 
+character string returned as the value pointed to by byte_order. 
+cbf_get_local_real_byte_order returns the byte order of reals on the 
+machine on which the API is being run in the form of a character 
+string returned as the value pointed to by byte_order. 
+cbf_get_local_real_format returns the format of floats on the machine 
+on which the API is being run in the form of a character string 
+returned as the value pointed to by real_format. The strings returned 
+must not be modified in any way.
+The values returned in byte_order may be the strings 
+"little_endian" or "big-endian". The values returned in 
+real_format may be the strings "ieee 754-1985" or "other". 
+Additional values may be returned by future versions of the API.
+ARGUMENTS
+byte_order    pointer to the returned string real_format   pointer to 
+the returned string
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+
get_local_real_byte_order(*args)
Returns : string
+*args   : 

+C prototype: int cbf_get_local_real_byte_order (char ** byte_order);

+CBFLib documentation:
+DESCRIPTION
+cbf_get_local_integer_byte_order returns the byte order of integers 
+on the machine on which the API is being run in the form of a 
+character string returned as the value pointed to by byte_order. 
+cbf_get_local_real_byte_order returns the byte order of reals on the 
+machine on which the API is being run in the form of a character 
+string returned as the value pointed to by byte_order. 
+cbf_get_local_real_format returns the format of floats on the machine 
+on which the API is being run in the form of a character string 
+returned as the value pointed to by real_format. The strings returned 
+must not be modified in any way.
+The values returned in byte_order may be the strings 
+"little_endian" or "big-endian". The values returned in 
+real_format may be the strings "ieee 754-1985" or "other". 
+Additional values may be returned by future versions of the API.
+ARGUMENTS
+byte_order    pointer to the returned string real_format   pointer to 
+the returned string
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+
get_local_real_format(*args)
Returns : string
+*args   : 

+C prototype: int cbf_get_local_real_format (char ** real_format );

+CBFLib documentation:
+DESCRIPTION
+cbf_get_local_integer_byte_order returns the byte order of integers 
+on the machine on which the API is being run in the form of a 
+character string returned as the value pointed to by byte_order. 
+cbf_get_local_real_byte_order returns the byte order of reals on the 
+machine on which the API is being run in the form of a character 
+string returned as the value pointed to by byte_order. 
+cbf_get_local_real_format returns the format of floats on the machine 
+on which the API is being run in the form of a character string 
+returned as the value pointed to by real_format. The strings returned 
+must not be modified in any way.
+The values returned in byte_order may be the strings 
+"little_endian" or "big-endian". The values returned in 
+real_format may be the strings "ieee 754-1985" or "other". 
+Additional values may be returned by future versions of the API.
+ARGUMENTS
+byte_order    pointer to the returned string real_format   pointer to 
+the returned string
+RETURN VALUE
+Returns an error code on failure or 0 for success. 
+_________________________________________________________________
+

+ + + + + +
 
+Data
       CBF = 0
+CBF_BYTE_OFFSET = 112
+CBF_CANONICAL = 80
+CBF_CATEGORY = 5
+CBF_COLUMN = 6
+CBF_DATABLOCK = 3
+CBF_FLOAT = 32
+CBF_INTEGER = 16
+CBF_LINK = 1
+CBF_NONE = 64
+CBF_PACKED = 96
+CBF_PREDICTOR = 128
+CBF_ROOT = 2
+CBF_SAVEFRAME = 4
+CBF_UNDEFINED = 65536
+CBF_UNDEFNODE = 0
+CIF = 1
+ENC_BACKWARD = 128
+ENC_BASE10 = 8
+ENC_BASE16 = 16
+ENC_BASE64 = 2
+ENC_BASE8 = 32
+ENC_CRTERM = 256
+ENC_DEFAULT = 578
+ENC_FORWARD = 64
+ENC_LFTERM = 512
+ENC_NONE = 1
+ENC_QP = 4
+HDR_DEFAULT = 6
+MIME_HEADERS = 2
+MIME_NOHEADERS = 1
+MSG_DIGEST = 8
+MSG_DIGESTNOW = 16
+MSG_NODIGEST = 4
+PLAIN_HEADERS = 1
+__author__ = 'Jon Wright <wright@esrf.fr>'
+__credits__ = 'Paul Ellis and Herbert Bernstein for the excellent CBFlib!'
+__date__ = '14 Dec 2005'
+__version__ = 'still_being_written'

+ + + + + +
 
+Author
       Jon Wright <wright@esrf.fr>

+ + + + + +
 
+Credits
       Paul Ellis and Herbert Bernstein for the excellent CBFlib!
+ \ No newline at end of file diff --git a/py2cbf/pycbf.i b/py2cbf/pycbf.i new file mode 100644 index 00000000..be53f0d3 --- /dev/null +++ b/py2cbf/pycbf.i @@ -0,0 +1,357 @@ + +/* File: pycbf.i */ + +// Indicate that we want to generate a module call pycbf +%module pycbf + +%pythoncode %{ +__author__ = "Jon Wright " +__date__ = "14 Dec 2005" +__version__ = "CBFlib 0.9" +__credits__ = """Paul Ellis and Herbert Bernstein for the excellent CBFlib!""" +__doc__=""" pycbf - python bindings to the CBFlib library + + A library for reading and writing ImageCIF and CBF files + which store area detector images for crystallography. + + This work is a derivative of the CBFlib version 0.7.7 library + by Paul J. Ellis of Stanford Synchrotron Radiation Laboratory + and Herbert J. Bernstein of Bernstein + Sons + See: + http://www.bernstein-plus-sons.com/software/CBF/ + + Licensing is GPL based, see: + http://www.bernstein-plus-sons.com/software/CBF/doc/CBFlib_NOTICES.html + + These bindings were automatically generated by SWIG, and the + input to SWIG was automatically generated by a python script. + We very strongly recommend you do not attempt to edit them + by hand! + + + + Copyright (C) 2007 Jonathan Wright + ESRF, Grenoble, France + email: wright@esrf.fr + + Revised, August 2010 Herbert J. Bernstein + Add defines from CBFlib 0.9.1 + +""" +%} + + +// Used later to pass back binary data +%include "cstring.i" + +// Attempt to autogenerate what SWIG thinks the call looks like + +// Typemaps are a SWIG mechanism for many things, not least multiple +// return values +%include "typemaps.i" + +// Arrays are needed +%include "carrays.i" +%array_class(double, doubleArray) +%array_class(int, intArray) +%array_class(short, shortArray) +%array_class(long, longArray) + +// Following the SWIG 1.3 documentation at +// http://www.swig.org/Doc1.3/Python.html +// section 31.9.5, we map sequences of +// PyFloat, PyLong and PyInt to +// C arrays of double, long and int +// +// But with the strict checking of being a float +// commented out to allow automatic conversions +%{ +static int convert_darray(PyObject *input, double *ptr, int size) { + int i; + if (!PySequence_Check(input)) { + PyErr_SetString(PyExc_TypeError,"Expecting a sequence"); + return 0; + } + if (PyObject_Length(input) != size) { + PyErr_SetString(PyExc_ValueError,"Sequence size mismatch"); + return 0; + } + for (i =0; i < size; i++) { + PyObject *o = PySequence_GetItem(input,i); + /*if (!PyFloat_Check(o)) { + + Py_XDECREF(o); + PyErr_SetString(PyExc_ValueError,"Expecting a sequence of floats"); + return 0; + }*/ + ptr[i] = PyFloat_AsDouble(o); + Py_DECREF(o); + } + return 1; +} +%} + +%typemap(in) double [ANY](double temp[$1_dim0]) { + if ($input == Py_None) $1 = NULL; + else + if (!convert_darray($input,temp,$1_dim0)) { + return NULL; + } + $1 = &temp[0]; +} + +%{ + static long convert_larray(PyObject *input, long *ptr, int size) { + int i; + if (!PySequence_Check(input)) { + PyErr_SetString(PyExc_TypeError,"Expecting a sequence"); + return 0; + } + if (PyObject_Length(input) != size) { + PyErr_SetString(PyExc_ValueError,"Sequence size mismatch"); + return 0; + } + for (i =0; i < size; i++) { + PyObject *o = PySequence_GetItem(input,i); + /*if (!PyLong_Check(o)) { + Py_XDECREF(o); + PyErr_SetString(PyExc_ValueError,"Expecting a sequence of long integers"); + return 0; + }*/ + ptr[i] = PyLong_AsLong(o); + Py_DECREF(o); + } + return 1; + } +%} + +%typemap(in) long [ANY](long temp[$1_dim0]) { + if (!convert_larray($input,temp,$1_dim0)) { + return NULL; + } + $1 = &temp[0]; +} + +%{ + static int convert_iarray(PyObject *input, int *ptr, int size) { + int i; + if (!PySequence_Check(input)) { + PyErr_SetString(PyExc_TypeError,"Expecting a sequence"); + return 0; + } + if (PyObject_Length(input) != size) { + PyErr_SetString(PyExc_ValueError,"Sequence size mismatch"); + return 0; + } + for (i =0; i < size; i++) { + PyObject *o = PySequence_GetItem(input,i); + /*if (!PyInt_Check(o)) { + Py_XDECREF(o); + PyErr_SetString(PyExc_ValueError,"Expecting a sequence of long integers"); + return 0; + }*/ + ptr[i] = (int)PyInt_AsLong(o); + Py_DECREF(o); + } + return 1; + } +%} + +%typemap(in) int [ANY](int temp[$1_dim0]) { + if (!convert_iarray($input,temp,$1_dim0)) { + return NULL; + } + $1 = &temp[0]; +} + + +%{ // Here is the c code needed to compile the wrappers, but not + // to be wrapped + +#include "../include/cbf.h" +#include "../include/cbf_simple.h" + +// Helper functions to generate error message + + +static int error_status = 0; +static char error_message1[17] ; +static char error_message[1042] ; // hope that is long enough + +/* prototype */ +void get_error_message(void); + +void get_error_message(){ + sprintf(error_message1,"%s","CBFlib Error(s):"); + if (error_status & CBF_FORMAT ) + sprintf(error_message,"%s %s",error_message1,"CBF_FORMAT "); + if (error_status & CBF_ALLOC ) + sprintf(error_message,"%s %s",error_message1,"CBF_ALLOC "); + if (error_status & CBF_ARGUMENT ) + sprintf(error_message,"%s %s",error_message1,"CBF_ARGUMENT "); + if (error_status & CBF_ASCII ) + sprintf(error_message,"%s %s",error_message1,"CBF_ASCII "); + if (error_status & CBF_BINARY ) + sprintf(error_message,"%s %s",error_message1,"CBF_BINARY "); + if (error_status & CBF_BITCOUNT ) + sprintf(error_message,"%s %s",error_message1,"CBF_BITCOUNT "); + if (error_status & CBF_ENDOFDATA ) + sprintf(error_message,"%s %s",error_message1,"CBF_ENDOFDATA "); + if (error_status & CBF_FILECLOSE ) + sprintf(error_message,"%s %s",error_message1,"CBF_FILECLOSE "); + if (error_status & CBF_FILEOPEN ) + sprintf(error_message,"%s %s",error_message1,"CBF_FILEOPEN "); + if (error_status & CBF_FILEREAD ) + sprintf(error_message,"%s %s",error_message1,"CBF_FILEREAD "); + if (error_status & CBF_FILESEEK ) + sprintf(error_message,"%s %s",error_message1,"CBF_FILESEEK "); + if (error_status & CBF_FILETELL ) + sprintf(error_message,"%s %s",error_message1,"CBF_FILETELL "); + if (error_status & CBF_FILEWRITE ) + sprintf(error_message,"%s %s",error_message1,"CBF_FILEWRITE "); + if (error_status & CBF_IDENTICAL ) + sprintf(error_message,"%s %s",error_message1,"CBF_IDENTICAL "); + if (error_status & CBF_NOTFOUND ) + sprintf(error_message,"%s %s",error_message1,"CBF_NOTFOUND "); + if (error_status & CBF_OVERFLOW ) + sprintf(error_message,"%s %s",error_message1,"CBF_OVERFLOW "); + if (error_status & CBF_UNDEFINED ) + sprintf(error_message,"%s %s",error_message1,"CBF_UNDEFINED "); + if (error_status & CBF_NOTIMPLEMENTED) + sprintf(error_message,"%s %s",error_message1,"CBF_NOTIMPLEMENTED"); + if (error_status & CBF_NOCOMPRESSION) + sprintf(error_message,"%s %s",error_message1,"CBF_NOCOMPRESSION"); +} + + +%} // End of code which is not wrapped but needed to compile + + +// The actual wrappers + +// Constants needed from header files + + /* Constants used for compression */ + +#define CBF_INTEGER 0x0010 /* Uncompressed integer */ +#define CBF_FLOAT 0x0020 /* Uncompressed IEEE floating-point */ +#define CBF_CANONICAL 0x0050 /* Canonical compression */ +#define CBF_PACKED 0x0060 /* Packed compression */ +#define CBF_PACKED_V2 0x0090 /* CCP4 Packed (JPA) compression V2 */ +#define CBF_BYTE_OFFSET 0x0070 /* Byte Offset Compression */ +#define CBF_PREDICTOR 0x0080 /* Predictor_Huffman Compression */ +#define CBF_NONE 0x0040 /* No compression flag */ +#define CBF_COMPRESSION_MASK \ + 0x00FF /* Mask to separate compression + type from flags */ +#define CBF_FLAG_MASK 0x0F00 /* Mask to separate flags from + compression type */ +#define CBF_UNCORRELATED_SECTIONS \ + 0x0100 /* Flag for uncorrelated sections */ +#define CBF_FLAT_IMAGE 0x0200 /* Flag for flat (linear) images */ +#define CBF_NO_EXPAND 0x0400 /* Flag to try not to expand */ + + + + /* Constants used for headers */ + +#define PLAIN_HEADERS 0x0001 /* Use plain ASCII headers */ +#define MIME_HEADERS 0x0002 /* Use MIME headers */ +#define MSG_NODIGEST 0x0004 /* Do not check message digests */ +#define MSG_DIGEST 0x0008 /* Check message digests */ +#define MSG_DIGESTNOW 0x0010 /* Check message digests immediately */ +#define MSG_DIGESTWARN 0x0020 /* Warn on message digests immediately*/ +#define PAD_1K 0x0020 /* Pad binaries with 1023 0's */ +#define PAD_2K 0x0040 /* Pad binaries with 2047 0's */ +#define PAD_4K 0x0080 /* Pad binaries with 4095 0's */ + + + + /* Constants used to control CIF parsing */ + +#define CBF_PARSE_BRC 0x0100 /* PARSE DDLm/CIF2 brace {,...} */ +#define CBF_PARSE_PRN 0x0200 /* PARSE DDLm parens (,...) */ +#define CBF_PARSE_BKT 0x0400 /* PARSE DDLm brackets [,...] */ +#define CBF_PARSE_BRACKETS \ + 0x0700 /* PARSE ALL brackets */ +#define CBF_PARSE_TQ 0x0800 /* PARSE treble quotes """...""" and '''...''' */ +#define CBF_PARSE_CIF2_DELIMS \ + 0x1000 /* Do not scan past an unescaped close quote + do not accept {} , : " ' in non-delimited + strings'{ */ +#define CBF_PARSE_DDLm 0x0700 /* For DDLm parse (), [], {} */ +#define CBF_PARSE_CIF2 0x1F00 /* For CIF2 parse {}, treble quotes, + stop on unescaped close quotes */ +#define CBF_PARSE_DEFINES \ + 0x2000 /* Recognize DEFINE_name */ + + +#define CBF_PARSE_WIDE 0x4000 /* PARSE wide files */ + +#define CBF_PARSE_UTF8 0x10000 /* PARSE UTF-8 */ + +#define HDR_DEFAULT (MIME_HEADERS | MSG_NODIGEST) + +#define MIME_NOHEADERS PLAIN_HEADERS + + /* CBF vs CIF */ + +#define CBF 0x0000 /* Use simple binary sections */ +#define CIF 0x0001 /* Use MIME-encoded binary sections */ + + + + /* Constants used for encoding */ + +#define ENC_NONE 0x0001 /* Use BINARY encoding */ +#define ENC_BASE64 0x0002 /* Use BASE64 encoding */ +#define ENC_BASE32K 0x0004 /* Use X-BASE32K encoding */ +#define ENC_QP 0x0008 /* Use QUOTED-PRINTABLE encoding */ +#define ENC_BASE10 0x0010 /* Use BASE10 encoding */ +#define ENC_BASE16 0x0020 /* Use BASE16 encoding */ +#define ENC_BASE8 0x0040 /* Use BASE8 encoding */ +#define ENC_FORWARD 0x0080 /* Map bytes to words forward (1234) */ +#define ENC_BACKWARD 0x0100 /* Map bytes to words backward (4321) */ +#define ENC_CRTERM 0x0200 /* Terminate lines with CR */ +#define ENC_LFTERM 0x0400 /* Terminate lines with LF */ + +#define ENC_DEFAULT (ENC_BASE64 | ENC_LFTERM | ENC_FORWARD) + + + +// Exception handling + + /* Convenience definitions for functions returning error codes */ +%exception { + error_status=0; + $action + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } +} + +/* Retain notation from cbf lib but pass on as python exception */ + +#define cbf_failnez(x) {(error_status = x);} + +/* printf("Called \"x\", status %d\n",error_status);} */ + +#define cbf_onfailnez(x,c) {int err; err = (x); if (err) { fprintf (stderr, \ + "\nCBFlib error %d in \"x\"\n", err); \ + { c; } return err; }} + + +%include "cbfgenericwrappers.i" + + +// cbf_goniometer object + +%include "cbfgoniometerwrappers.i" + +%include "cbfdetectorwrappers.i" + +// cbfhandle object +%include "cbfhandlewrappers.i" + diff --git a/py2cbf/pycbf.log b/py2cbf/pycbf.log new file mode 100644 index 00000000..2d6f86f0 --- /dev/null +++ b/py2cbf/pycbf.log @@ -0,0 +1,1383 @@ +This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021) (preloaded format=latex 2021.6.28) 30 JUN 2021 18:46 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**pycbf +(./pycbf.tex +LaTeX2e <2020-10-01> patch level 4 +L3 programming layer <2021-02-18> +(/usr/local/texlive/2021/texmf-dist/tex/latex/base/article.cls +Document Class: article 2020/04/10 v1.4m Standard LaTeX document class +(/usr/local/texlive/2021/texmf-dist/tex/latex/base/size10.clo +File: size10.clo 2020/04/10 v1.4m Standard LaTeX file (size option) +) +\c@part=\count179 +\c@section=\count180 +\c@subsection=\count181 +\c@subsubsection=\count182 +\c@paragraph=\count183 +\c@subparagraph=\count184 +\c@figure=\count185 +\c@table=\count186 +\abovecaptionskip=\skip47 +\belowcaptionskip=\skip48 +\bibindent=\dimen138 +) +(/Users/yaya/Library/texmf/tex/latex/iucr/utilities/graphics/graphics.sty +Package: graphics 1999/02/16 v1.0l Standard LaTeX Graphics (DPC,SPQR) + +(/Users/yaya/Library/texmf/tex/latex/iucr/utilities/graphics/trig.sty +Package: trig 1999/03/16 v1.09 sin cos tan (DPC) +) +(/usr/local/texlive/2021/texmf-dist/tex/latex/graphics-cfg/graphics.cfg +File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration +) +Package graphics Info: Driver file: dvips.def on input line 80. + +(/Users/yaya/Library/texmf/tex/latex/iucr/utilities/graphics/dvips.def +File: dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR) +)) +(/usr/local/texlive/2021/texmf-dist/tex/latex/anysize/anysize.sty +Package: anysize 1994/08/13 setting margin sizes + +document style option `anysize' loaded +Michael Salzenberg, Thomas Esser, Dirk Hillbrecht +Version 1.0, Aug 13, 1994 +\@Leftmargin=\dimen139 +\@Rightmargin=\dimen140 +\@Topmargin=\dimen141 +\@Bottommargin=\dimen142 +) (/usr/local/texlive/2021/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty +Package: fancyhdr 2021/01/28 v4.0.1 Extensive control of page headers and foote +rs +\f@nch@headwidth=\skip49 +\f@nch@O@elh=\skip50 +\f@nch@O@erh=\skip51 +\f@nch@O@olh=\skip52 +\f@nch@O@orh=\skip53 +\f@nch@O@elf=\skip54 +\f@nch@O@erf=\skip55 +\f@nch@O@olf=\skip56 +\f@nch@O@orf=\skip57 +) +(/Users/yaya/Library/texmf/tex/latex/hyperref/hyperref.sty +Package: hyperref 2003/11/30 v6.74m Hypertext links for LaTeX + +(/Users/yaya/Library/texmf/tex/latex/iucr/utilities/graphics/keyval.sty +Package: keyval 1999/03/16 v1.13 key=value parser (DPC) +\KV@toks@=\toks15 +) +\@linkdim=\dimen143 +\Hy@linkcounter=\count187 +\Hy@pagecounter=\count188 + +(/Users/yaya/Library/texmf/tex/latex/hyperref/pd1enc.def +File: pd1enc.def 2003/11/30 v6.74m Hyperref: PDFDocEncoding definition (HO) +Now handling font encoding PD1 ... +... no UTF-8 mapping file for font encoding PD1 +LaTeX Info: Composite with undeclared \k in encoding PD1 on input line 227. +) +Package hyperref Info: Option `bookmarks' set `true' on input line 1830. +Package hyperref Info: Option `bookmarksnumbered' set `true' on input line 1830 +. +Package hyperref Info: Hyper figures OFF on input line 1880. +Package hyperref Info: Link nesting OFF on input line 1885. +Package hyperref Info: Hyper index ON on input line 1888. +Package hyperref Info: Plain pages ON on input line 1893. +Package hyperref Info: Backreferencing ON on input line 1898. + +Implicit mode ON; LaTeX internals redefined +Package hyperref Info: Bookmarks ON on input line 2004. +(/Users/yaya/Library/texmf/tex/latex/hyperref/backref.sty +Package: backref 2003/03/20 v1.23 Bibliographical back referencing +) +(/usr/local/texlive/2021/texmf-dist/tex/latex/url/url.sty +\Urlmuskip=\muskip16 +Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. +) +LaTeX Info: Redefining \url on input line 2143. +\Fld@menulength=\count189 +\Field@Width=\dimen144 +\Fld@charsize=\dimen145 +\Choice@toks=\toks16 +\Field@toks=\toks17 +Package hyperref Info: Hyper figures OFF on input line 2618. +Package hyperref Info: Link nesting OFF on input line 2623. +Package hyperref Info: Hyper index ON on input line 2626. +Package hyperref Info: backreferencing ON on input line 2631. +Package hyperref Info: Link coloring OFF on input line 2638. +\c@Item=\count190 +\c@Hfootnote=\count191 +) +*hyperref using driver hdvipdfm* +(/Users/yaya/Library/texmf/tex/latex/hyperref/hdvipdfm.def +File: hdvipdfm.def 2003/11/30 v6.74m Hyperref driver for dvipdfm +\pdfm@box=\box47 +\Fld@listcount=\count192 +\@outlinefile=\write3 +) +(/usr/local/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-dvips.def +File: l3backend-dvips.def 2021-03-18 L3 backend support: dvips +\l__pdf_internal_box=\box48 +\g__pdf_backend_object_int=\count193 +\l__pdf_backend_content_box=\box49 +\l__pdf_backend_model_box=\box50 +\g__pdf_backend_annotation_int=\count194 +\g__pdf_backend_link_int=\count195 +\g__pdf_backend_link_sf_int=\count196 +) +(./pycbf.aux) +\openout1 = `pycbf.aux'. + +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 102. +LaTeX Font Info: ... okay on input line 102. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 102. +LaTeX Font Info: ... okay on input line 102. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 102. +LaTeX Font Info: ... okay on input line 102. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 102. +LaTeX Font Info: ... okay on input line 102. +LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 102. +LaTeX Font Info: ... okay on input line 102. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 102. +LaTeX Font Info: ... okay on input line 102. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 102. +LaTeX Font Info: ... okay on input line 102. +LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 102. +LaTeX Font Info: ... okay on input line 102. +Package hyperref Info: Link coloring OFF on input line 102. + (/Users/yaya/Library/texmf/tex/latex/hyperref/nameref.sty +Package: nameref 2003/12/03 v2.21 Cross-referencing by name of section +\c@section@level=\count197 +) +LaTeX Info: Redefining \ref on input line 102. +LaTeX Info: Redefining \pageref on input line 102. +\openout3 = `pycbf.out'. + +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <12> on input line 132. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <8> on input line 132. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <6> on input line 132. + +(./pycbf.toc +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <9> on input line 4. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line 4. + +! Missing $ inserted. + + $ +l.16 ...th write logic added}{17}{subsection.10.4} + +? +! Extra }, or forgotten $. + ... pycbf_test1 with write logic added} + \hyper@linkend +l.16 ...th write logic added}{17}{subsection.10.4} + +? +! Missing $ inserted. + + $ +l.16 ...th write logic added}{17}{subsection.10.4} + +? +! Missing } inserted. + + } +l.16 ...th write logic added}{17}{subsection.10.4} + +? +) +\tf@toc=\write4 +\openout4 = `pycbf.toc'. + + [1 + +] +Overfull \hbox (10.09409pt too wide) in paragraph at lines 213--219 +[]\OT1/cmr/m/n/9 The li-brary ap-pears to de-fine (at least) three ob-jects. Th +e one we started on was the cbf[]handle[]struct + [] + +[2] [3] +Overfull \hbox (27.82617pt too wide) in paragraph at lines 415--415 +[][][][]\OT1/cmtt/m/n/9 #define CBF_PARSE_TQ 0x0800 /* PARSE treble quotes +"""...""" and '''...''' */ + [] + + +Overfull \hbox (4.20145pt too wide) in paragraph at lines 427--427 +[][][][]\OT1/cmtt/m/n/9 #define CBF_PARSE_WIDE 0x4000 /* PARSE wide files + */ + [] + + +Overfull \hbox (4.20145pt too wide) in paragraph at lines 429--429 +[][][][]\OT1/cmtt/m/n/9 #define CBF_PARSE_UTF8 0x10000 /* PARSE UTF-8 + */ + [] + +[4] [5] +Underfull \vbox (badness 10000) has occurred while \output is active [] + + [6] +Overfull \hbox (42.001pt too wide) in paragraph at lines 664--664 +[][][] []\OT1/cmtt/m/n/9 PyErr_SetString(PyExc_ValueError,"Expec +ting a sequence of long integers"); + [] + + +Underfull \vbox (badness 10000) has occurred while \output is active [] + + [7] +Overfull \hbox (42.001pt too wide) in paragraph at lines 696--696 +[][][] []\OT1/cmtt/m/n/9 PyErr_SetString(PyExc_ValueError,"Expec +ting a sequence of long integers"); + [] + + +Underfull \vbox (badness 10000) has occurred while \output is active [] + + [8] +[9] +Overfull \hbox (11.92642pt too wide) in paragraph at lines 1027--1027 +[][][] []\OT1/cmtt/m/n/9 while lines[i+1].find("DESCRIPTION")==-1 and line +s[i+1].find("int cbf_")==-1: + [] + + +Overfull \hbox (11.92642pt too wide) in paragraph at lines 1194--1194 +[][][] []\OT1/cmtt/m/n/9 "int elements", "int minelement", "int maxelement" +, "char **bo", "int *bolen", + [] + + +Overfull \hbox (11.92642pt too wide) in paragraph at lines 1234--1234 +[][][] []\OT1/cmtt/m/n/9 "int elements", "int minelement", "int maxelement" +, "char **bo", "int *bolen", + [] + + +Overfull \hbox (11.92642pt too wide) in paragraph at lines 1274--1274 +[][][] []\OT1/cmtt/m/n/9 "int elements", "int minelement", "int maxelement" +, "char **bo", "int *bolen", + [] + + +Overfull \hbox (21.37631pt too wide) in paragraph at lines 1476--1476 +[][][] []\OT1/cmtt/m/n/9 "int elsize", "int elsign", "int ndimslow", "int nd +imfast"],["(Binary)String"] ], + [] + + +Overfull \hbox (21.37631pt too wide) in paragraph at lines 1504--1504 +[][][] []\OT1/cmtt/m/n/9 "int elsize", "int elsign", "int ndimfast", "int nd +imslow"],["(Binary)String"] ], + [] + + +Overfull \hbox (21.37631pt too wide) in paragraph at lines 1532--1532 +[][][] []\OT1/cmtt/m/n/9 "int elsize", "int elsign", "int ndimslow", "int nd +imfast"],["(Binary)String"] ], + [] + + +Overfull \hbox (92.25049pt too wide) in paragraph at lines 1644--1644 +[][][] []\OT1/cmtt/m/n/9 "int elsize", "int elsign", "int ndimslow", "int nd +immid", "int ndimfast"],["(Binary)String"] ], + [] + + +Overfull \hbox (92.25049pt too wide) in paragraph at lines 1672--1672 +[][][] []\OT1/cmtt/m/n/9 "int elsize", "int elsign", "int ndimfast", "int nd +immid", "int ndimslow"],["(Binary)String"] ], + [] + + +Overfull \hbox (92.25049pt too wide) in paragraph at lines 1700--1700 +[][][] []\OT1/cmtt/m/n/9 "int elsize", "int elsign", "int ndimslow", "int nd +immid", "int ndimfast"],["(Binary)String"] ], + [] + + +Overfull \hbox (26.10126pt too wide) in paragraph at lines 1728--1728 +[][][] []\OT1/cmtt/m/n/9 "int elsize", "int ndimslow", "int ndimmid", "int n +dimfast"],["(Binary)String"] ], + [] + + +Overfull \hbox (26.10126pt too wide) in paragraph at lines 1756--1756 +[][][] []\OT1/cmtt/m/n/9 "int elsize", "int ndimfast", "int ndimmid", "int n +dimslow"],["(Binary)String"] ], + [] + + +Overfull \hbox (26.10126pt too wide) in paragraph at lines 1783--1783 +[][][] []\OT1/cmtt/m/n/9 "int elsize", "int ndimslow", "int ndimmid", "int n +dimfast"],["(Binary)String"] ], + [] + + +Overfull \hbox (11.92642pt too wide) in paragraph at lines 1850--1850 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *data, int le +n) } set_integerarray_wdims; + [] + + +Overfull \hbox (11.92642pt too wide) in paragraph at lines 1851--1851 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *bo, int bole +n) } set_integerarray_wdims; + [] + + +Overfull \hbox (21.37631pt too wide) in paragraph at lines 1855--1855 +[][][] []\OT1/cmtt/m/n/9 char *bo, int bolen, int dimfast, int dimm +id, int dimslow, int padding){ + [] + + +Overfull \hbox (78.07565pt too wide) in paragraph at lines 1867--1867 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsigned, ( +size_t) elements, (const char *)byteorder, + [] + + +Overfull \hbox (233.99884pt too wide) in paragraph at lines 1875--1875 +[][][] []\OT1/cmtt/m/n/9 "int elsize", "int elsigned", "int elements", "String +byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]], + [] + + +Overfull \hbox (26.10126pt too wide) in paragraph at lines 1883--1883 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *data, int le +n) } set_integerarray_wdims_sf; + [] + + +Overfull \hbox (26.10126pt too wide) in paragraph at lines 1884--1884 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *bo, int bole +n) } set_integerarray_wdims_sf; + [] + + +Overfull \hbox (21.37631pt too wide) in paragraph at lines 1888--1888 +[][][] []\OT1/cmtt/m/n/9 char *bo, int bolen, int dimslow, int dimm +id, int dimfast, int padding){ + [] + + +Overfull \hbox (11.92642pt too wide) in paragraph at lines 1899--1899 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_integerarray_wdims_sf (s +elf, compression, binary_id, + [] + + +Overfull \hbox (78.07565pt too wide) in paragraph at lines 1900--1900 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsigned, ( +size_t) elements, (const char *)byteorder, + [] + + +Overfull \hbox (224.54895pt too wide) in paragraph at lines 1908--1908 +[][][] []\OT1/cmtt/m/n/9 "int elsize","int elsigned","int elements", "String by +teorder", "int dimslow", "int dimmid", "int dimfast", "int padding"],[]], + [] + + +Overfull \hbox (26.10126pt too wide) in paragraph at lines 1915--1915 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *data, int le +n) } set_integerarray_wdims_fs; + [] + + +Overfull \hbox (26.10126pt too wide) in paragraph at lines 1916--1916 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *bo, int bole +n) } set_integerarray_wdims_fs; + [] + + +Overfull \hbox (21.37631pt too wide) in paragraph at lines 1920--1920 +[][][] []\OT1/cmtt/m/n/9 char *bo, int bolen, int dimfast, int dimm +id, int dimslow, int padding){ + [] + + +Overfull \hbox (11.92642pt too wide) in paragraph at lines 1931--1931 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_integerarray_wdims_fs (s +elf, compression, binary_id, + [] + + +Overfull \hbox (78.07565pt too wide) in paragraph at lines 1932--1932 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsigned, ( +size_t) elements, (const char *)byteorder, + [] + + +Overfull \hbox (224.54895pt too wide) in paragraph at lines 1940--1940 +[][][] []\OT1/cmtt/m/n/9 "int elsize","int elsigned","int elements", "String by +teorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]], + [] + + +Overfull \hbox (21.37631pt too wide) in paragraph at lines 1979--1979 +[][][] []\OT1/cmtt/m/n/9 char *bo, int bolen, int dimfast, int dimm +id, int dimslow, int padding){ + [] + + +Overfull \hbox (30.8262pt too wide) in paragraph at lines 1991--1991 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) el +ements, (const char *)byteorder, + [] + + +Overfull \hbox (153.67477pt too wide) in paragraph at lines 1999--1999 +[][][] []\OT1/cmtt/m/n/9 "int elsize","int elements", "String byteorder", "int +dimfast", "int dimmid", "int dimslow", "int padding"],[]], + [] + + +Overfull \hbox (11.92642pt too wide) in paragraph at lines 2007--2007 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *data, int le +n) } set_realarray_wdims_sf; + [] + + +Overfull \hbox (11.92642pt too wide) in paragraph at lines 2008--2008 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *bo, int bole +n) } set_realarray_wdims_sf; + [] + + +Overfull \hbox (21.37631pt too wide) in paragraph at lines 2012--2012 +[][][] []\OT1/cmtt/m/n/9 char *bo, int bolen, int dimslow, int dimm +id, int dimfast, int padding){ + [] + + +Overfull \hbox (30.8262pt too wide) in paragraph at lines 2024--2024 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) el +ements, (const char *)byteorder, + [] + + +Overfull \hbox (7.20148pt too wide) in paragraph at lines 2025--2025 +[][][] []\OT1/cmtt/m/n/9 (size_t) dimslow, (size_t) dimmid, (size_t) +dimfast, (size_t)padding)); + [] + + +Overfull \hbox (153.67477pt too wide) in paragraph at lines 2032--2032 +[][][] []\OT1/cmtt/m/n/9 "int elsize","int elements", "String byteorder", "int +dimslow", "int dimmid", "int dimfast", "int padding"],[]], + [] + + +Overfull \hbox (11.92642pt too wide) in paragraph at lines 2040--2040 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *data, int le +n) } set_realarray_wdims_fs; + [] + + +Overfull \hbox (11.92642pt too wide) in paragraph at lines 2041--2041 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *bo, int bole +n) } set_realarray_wdims_fs; + [] + + +Overfull \hbox (21.37631pt too wide) in paragraph at lines 2045--2045 +[][][] []\OT1/cmtt/m/n/9 char *bo, int bolen, int dimfast, int dimm +id, int dimslow, int padding){ + [] + + +Overfull \hbox (30.8262pt too wide) in paragraph at lines 2057--2057 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) el +ements, (const char *)byteorder, + [] + + +Overfull \hbox (7.20148pt too wide) in paragraph at lines 2058--2058 +[][][] []\OT1/cmtt/m/n/9 (size_t) dimfast, (size_t) dimmid, (size_t) +dimslow, (size_t)padding)); + [] + + +Overfull \hbox (153.67477pt too wide) in paragraph at lines 2065--2065 +[][][] []\OT1/cmtt/m/n/9 "int elsize","int elements", "String byteorder", "int +dimfast", "int dimmid", "int dimslow", "int padding"],[]], + [] + + +Overfull \hbox (26.10126pt too wide) in paragraph at lines 2076--2076 +[][][] []\OT1/cmtt/m/n/9 char *data, int len, int elsize, int elsig +n, int ndimslow, int ndimfast){ + [] + + +Overfull \hbox (7.20148pt too wide) in paragraph at lines 2085--2085 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_image (self, reserved, e +lement_number, compression, + [] + + +Overfull \hbox (45.00104pt too wide) in paragraph at lines 2086--2086 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsign, (si +ze_t) ndimslow, (size_t)ndimfast)); + [] + + +Overfull \hbox (26.10126pt too wide) in paragraph at lines 2104--2104 +[][][] []\OT1/cmtt/m/n/9 char *data, int len, int elsize, int elsig +n, int ndimfast, int ndimslow){ + [] + + +Overfull \hbox (7.20148pt too wide) in paragraph at lines 2113--2113 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_image (self, reserved, e +lement_number, compression, + [] + + +Overfull \hbox (45.00104pt too wide) in paragraph at lines 2114--2114 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsign, (si +ze_t) ndimfast, (size_t)ndimslow)); + [] + + +Overfull \hbox (26.10126pt too wide) in paragraph at lines 2132--2132 +[][][] []\OT1/cmtt/m/n/9 char *data, int len, int elsize, int elsig +n, int ndimslow, int ndimfast){ + [] + + +Overfull \hbox (21.37631pt too wide) in paragraph at lines 2141--2141 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_image_sf (self, reserved +, element_number, compression, + [] + + +Overfull \hbox (45.00104pt too wide) in paragraph at lines 2142--2142 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsign, (si +ze_t) ndimslow, (size_t)ndimfast)); + [] + + +Overfull \hbox (30.8262pt too wide) in paragraph at lines 2169--2169 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_real_image (self, reserv +ed, element_number, compression, + [] + + +Overfull \hbox (7.20148pt too wide) in paragraph at lines 2170--2170 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) nd +imslow, (size_t)ndimfast)); + [] + + +Overfull \hbox (45.00104pt too wide) in paragraph at lines 2197--2197 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_real_image_fs (self, res +erved, element_number, compression, + [] + + +Overfull \hbox (7.20148pt too wide) in paragraph at lines 2198--2198 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) nd +imfast, (size_t)ndimslow)); + [] + + +Overfull \hbox (45.00104pt too wide) in paragraph at lines 2225--2225 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_real_image_sf (self, res +erved, element_number, compression, + [] + + +Overfull \hbox (7.20148pt too wide) in paragraph at lines 2226--2226 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) nd +imslow, (size_t)ndimfast)); + [] + + +Overfull \hbox (87.52554pt too wide) in paragraph at lines 2244--2244 +[][][] []\OT1/cmtt/m/n/9 char *data, int len, int elsize, int elsig +n, int ndimslow, int ndimmid, int ndimfast){ + [] + + +Overfull \hbox (21.37631pt too wide) in paragraph at lines 2253--2253 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_3d_image (self, reserved +, element_number, compression, + [] + + +Overfull \hbox (130.05005pt too wide) in paragraph at lines 2254--2254 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsign, (si +ze_t) ndimslow, (size_t) ndimmid, (size_t)ndimfast)); + [] + + +Overfull \hbox (87.52554pt too wide) in paragraph at lines 2272--2272 +[][][] []\OT1/cmtt/m/n/9 char *data, int len, int elsize, int elsig +n, int ndimfast, int ndimmid, int ndimslow){ + [] + + +Overfull \hbox (35.55115pt too wide) in paragraph at lines 2281--2281 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_3d_image_fs (self, reser +ved, element_number, compression, + [] + + +Overfull \hbox (130.05005pt too wide) in paragraph at lines 2282--2282 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsign, (si +ze_t) ndimfast, (size_t) ndimmid, (size_t)ndimslow)); + [] + + +Overfull \hbox (87.52554pt too wide) in paragraph at lines 2300--2300 +[][][] []\OT1/cmtt/m/n/9 char *data, int len, int elsize, int elsig +n, int ndimslow, int ndimmid, int ndimfast){ + [] + + +Overfull \hbox (35.55115pt too wide) in paragraph at lines 2309--2309 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_3d_image_sf (self, reser +ved, element_number, compression, + [] + + +Overfull \hbox (130.05005pt too wide) in paragraph at lines 2310--2310 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsign, (si +ze_t) ndimslow, (size_t) ndimmid, (size_t)ndimfast)); + [] + + +Overfull \hbox (2.47653pt too wide) in paragraph at lines 2324--2324 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *data, int le +n) } set_real_3d_image_sf; + [] + + +Overfull \hbox (30.8262pt too wide) in paragraph at lines 2328--2328 +[][][] []\OT1/cmtt/m/n/9 char *data, int len, int elsize, int ndims +low, int ndimmid, int ndimfast){ + [] + + +Overfull \hbox (45.00104pt too wide) in paragraph at lines 2337--2337 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_real_3d_image (self, res +erved, element_number, compression, + [] + + +Overfull \hbox (87.52554pt too wide) in paragraph at lines 2338--2338 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) nd +imslow, (size_t)ndimmid, (size_t)ndimfast)); + [] + + +Overfull \hbox (2.47653pt too wide) in paragraph at lines 2352--2352 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *data, int le +n) } set_real_3d_image_fs; + [] + + +Overfull \hbox (30.8262pt too wide) in paragraph at lines 2356--2356 +[][][] []\OT1/cmtt/m/n/9 char *data, int len, int elsize, int ndimf +ast, int ndimmid, int ndimslow){ + [] + + +Overfull \hbox (59.17587pt too wide) in paragraph at lines 2365--2365 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_real_3d_image_fs (self, +reserved, element_number, compression, + [] + + +Overfull \hbox (87.52554pt too wide) in paragraph at lines 2366--2366 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) nd +imfast, (size_t)ndimmid, (size_t)ndimslow)); + [] + + +Overfull \hbox (2.47653pt too wide) in paragraph at lines 2380--2380 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *data, int le +n) } set_real_3d_image_sf; + [] + + +Overfull \hbox (30.8262pt too wide) in paragraph at lines 2384--2384 +[][][] []\OT1/cmtt/m/n/9 char *data, int len, int elsize, int ndims +low, int ndimmid, int ndimfast){ + [] + + +Overfull \hbox (59.17587pt too wide) in paragraph at lines 2393--2393 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_real_3d_image_sf (self, +reserved, element_number, compression, + [] + + +Overfull \hbox (87.52554pt too wide) in paragraph at lines 2394--2394 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) nd +imslow, (size_t)ndimmid, (size_t)ndimfast)); + [] + + +Overfull \hbox (16.65137pt too wide) in paragraph at lines 2406--2406 +[][][] []\OT1/cmtt/m/n/9 void get_image_size(unsigned int element_number, i +nt *ndimslow, int *ndimfast){ + [] + + +Overfull \hbox (26.10126pt too wide) in paragraph at lines 2410--2410 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_get_image_size(self,reserved,el +ement_number,&inslow,&infast)); + [] + + +Overfull \hbox (2.47653pt too wide) in paragraph at lines 2414--2414 +[][][][]\OT1/cmtt/m/n/9 ""","get_image_size",["Integer element_number"],["size_ +t ndim1","size_t ndim2"]], + [] + + +Overfull \hbox (30.8262pt too wide) in paragraph at lines 2419--2419 +[][][] []\OT1/cmtt/m/n/9 void get_image_size_fs(unsigned int element_number +, int *ndimfast, int *ndimslow){ + [] + + +Overfull \hbox (40.2761pt too wide) in paragraph at lines 2423--2423 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_get_image_size_fs(self,reserved +,element_number,&infast,&inslow)); + [] + + +Overfull \hbox (45.00104pt too wide) in paragraph at lines 2427--2427 +[][][][]\OT1/cmtt/m/n/9 ""","get_image_size_fs",["Integer element_number"],["si +ze_t ndimfast","size_t ndimslow"]], + [] + + +Overfull \hbox (30.8262pt too wide) in paragraph at lines 2432--2432 +[][][] []\OT1/cmtt/m/n/9 void get_image_size_sf(unsigned int element_number +, int *ndimslow, int *ndimfast){ + [] + + +Overfull \hbox (26.10126pt too wide) in paragraph at lines 2436--2436 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_get_image_size(self,reserved,el +ement_number,&inslow,&infast)); + [] + + +Overfull \hbox (45.00104pt too wide) in paragraph at lines 2440--2440 +[][][][]\OT1/cmtt/m/n/9 ""","get_image_size_sf",["Integer element_number"],["si +ze_t ndimslow","size_t ndimfast"]], + [] + + +Overfull \hbox (7.20148pt too wide) in paragraph at lines 2444--2444 +[][][][]\OT1/cmtt/m/n/9 %apply int *OUTPUT {int *ndimslow, int *ndimmid, int *n +dimfast} get_3d_image_size; + [] + + +Overfull \hbox (96.97543pt too wide) in paragraph at lines 2445--2445 +[][][] []\OT1/cmtt/m/n/9 void get_3d_image_size(unsigned int element_number +, int *ndimslow, int *ndimmid, int *ndimfast){ + [] + + +Overfull \hbox (73.35071pt too wide) in paragraph at lines 2449--2449 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_get_3d_image_size(self,reserved +,element_number,&inslow,&inmid,&infast)); + [] + + +Overfull \hbox (125.3251pt too wide) in paragraph at lines 2454--2454 +[][][][]\OT1/cmtt/m/n/9 ""","get_3d_image_size",["Integer element_number"],["si +ze_t ndimslow","size_t ndimmid","size_t ndimfast"]], + [] + + +Overfull \hbox (7.20148pt too wide) in paragraph at lines 2458--2458 +[][][][]\OT1/cmtt/m/n/9 %apply int *OUTPUT {int *ndimslow, int *ndimmid, int *n +dimfast} get_3d_image_size; + [] + + +Overfull \hbox (111.15027pt too wide) in paragraph at lines 2459--2459 +[][][] []\OT1/cmtt/m/n/9 void get_3d_image_size_fs(unsigned int element_num +ber, int *ndimfast, int *ndimmid, int *ndimslow){ + [] + + +Overfull \hbox (87.52554pt too wide) in paragraph at lines 2463--2463 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_get_3d_image_size_fs(self,reser +ved,element_number,&infast,&inmid,&inslow)); + [] + + +Overfull \hbox (125.3251pt too wide) in paragraph at lines 2468--2468 +[][][][]\OT1/cmtt/m/n/9 ""","get_3d_image_size",["Integer element_number"],["si +ze_t ndimfast","size_t ndimmid","size_t ndimslow"]], + [] + + +Overfull \hbox (21.37631pt too wide) in paragraph at lines 2472--2472 +[][][][]\OT1/cmtt/m/n/9 %apply int *OUTPUT {int *ndimslow, int *ndimmid, int *n +dimfast} get_3d_image_size_sf; + [] + + +Overfull \hbox (111.15027pt too wide) in paragraph at lines 2473--2473 +[][][] []\OT1/cmtt/m/n/9 void get_3d_image_size_sf(unsigned int element_num +ber, int *ndimslow, int *ndimmid, int *ndimfast){ + [] + + +Overfull \hbox (87.52554pt too wide) in paragraph at lines 2477--2477 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_get_3d_image_size_sf(self,reser +ved,element_number,&inslow,&inmid,&infast)); + [] + + +Overfull \hbox (139.49994pt too wide) in paragraph at lines 2482--2482 +[][][][]\OT1/cmtt/m/n/9 ""","get_3d_image_size_sf",["Integer element_number"],[ +"size_t ndimslow","size_t ndimmid","size_t ndimfast"]], + [] + + +Overfull \hbox (7.20148pt too wide) in paragraph at lines 2830--2830 +[][][][]\OT1/cmtt/m/n/9 ""","get_axis_ancestor",["String axis_id", "Integer anc +estor_index"],["String"],], + [] + + +Overfull \hbox (40.2761pt too wide) in paragraph at lines 2862--2862 +[][][][]\OT1/cmtt/m/n/9 %apply double *OUTPUT {double *offset1, double *offset2 +, double offset3} get_axis_offset; + [] + + +Overfull \hbox (40.2761pt too wide) in paragraph at lines 2903--2903 +[][][][]\OT1/cmtt/m/n/9 %apply double *OUTPUT {double *vector1, double *vector2 +, double vector3} get_axis_vector; + [] + + +Overfull \hbox (35.55115pt too wide) in paragraph at lines 3050--3050 +[][][] []\OT1/cmtt/m/n/9 [],["Float a", "Float b", "Float c", "Float alpha", + "Float beta", "Float gamma" ] ], + [] + + +Overfull \hbox (144.22488pt too wide) in paragraph at lines 3085--3085 +[][][] []\OT1/cmtt/m/n/9 [],["Float astar", "Float bstar", "Float cstar", "F +loat alphastar", "Float betastar", "Float gammastar"] ], + [] + + +Overfull \hbox (7.20148pt too wide) in paragraph at lines 3089--3089 +[][][] []\OT1/cmtt/m/n/9 double *alpha_esd, double *beta_esd, double *gamma_es +d} get_reciprocal_cell_esd; + [] + + +Overfull \hbox (2.47653pt too wide) in paragraph at lines 3203--3203 +[][][][]\OT1/cmtt/m/n/9 ""","cbf_require_category_root",["String Categoryname"] +,["String categoryroot"]], + [] + + +Overfull \hbox (45.00104pt too wide) in paragraph at lines 3220--3220 +[][][] []\OT1/cmtt/m/n/9 void set_bin_sizes( int element_number, double slowb +insize_in, double fastbinsize_in) { + [] + + +Overfull \hbox (30.8262pt too wide) in paragraph at lines 3221--3221 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_bin_sizes(self,element_number, +slowbinsize_in,fastbinsize_in)); + [] + + +Overfull \hbox (82.8006pt too wide) in paragraph at lines 3223--3223 +[][][][]\OT1/cmtt/m/n/9 ""","set_bin_sizes",["Integer element_number","Float sl +owbinsize_in","Float fastbinsize_in"],[] ], + [] + + +Overfull \hbox (16.65137pt too wide) in paragraph at lines 3228--3228 +[][][] []\OT1/cmtt/m/n/9 void get_bin_sizes(int element_number, double *slowbi +nsize, double *fastbinsize) { + [] + + +Overfull \hbox (82.8006pt too wide) in paragraph at lines 3229--3229 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_get_bin_sizes (self, (unsigned int) +element_number, slowbinsize, fastbinsize)); + [] + + +Overfull \hbox (49.72598pt too wide) in paragraph at lines 3231--3231 +[][][][]\OT1/cmtt/m/n/9 ""","get_bin_sizes",["Integer element_number"],["Float +slowbinsize","Float fastbinsize"] ], + [] + + +Overfull \hbox (2.47653pt too wide) in paragraph at lines 3283--3283 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_construct_reference_detector(self,& +detector,element_number)); + [] + + +Overfull \hbox (40.2761pt too wide) in paragraph at lines 3286--3286 +[][][][]\OT1/cmtt/m/n/9 ""","construct_reference_detector",["Integer element_nu +mber"],["pycbf detector object"]], + [] + + +Overfull \hbox (30.8262pt too wide) in paragraph at lines 3294--3294 +[][][][]\OT1/cmtt/m/n/9 ""","require_reference_detector",["Integer element_numb +er"],["pycbf detector object"]], + [] + + +Overfull \hbox (21.37631pt too wide) in paragraph at lines 3319--3319 +[][][][]\OT1/cmtt/m/n/9 ""","construct_reference_positioner",["String axis_id"] +,["pycbf positioner object"]], + [] + + +Overfull \hbox (7.20148pt too wide) in paragraph at lines 3325--3325 +[][][] []\OT1/cmtt/m/n/9 void get_axis_reference_poise(double *vector1, double + *vector2, double *vector3, + [] + + +Overfull \hbox (2.47653pt too wide) in paragraph at lines 3500--3500 +[][][] []\OT1/cmtt/m/n/9 if args[1].find("cbf")==-1: # but do not try +the goniometer constructor + [] + + +Overfull \hbox (243.44873pt too wide) in paragraph at lines 3596--3596 +[][][] []\OT1/cmtt/m/n/9 %apply double *OUTPUT {double * vector1, double * vec +tor2, double * vector3, double * offset1, double * offset2, double * offset3, + + [] + + +Overfull \hbox (7.20148pt too wide) in paragraph at lines 3698--3698 +[][][] []\OT1/cmtt/m/n/9 indexfast,indexslow +,normal1,normal2,normal3)); + [] + + +Overfull \hbox (7.20148pt too wide) in paragraph at lines 3710--3710 +[][][] []\OT1/cmtt/m/n/9 indexslow,indexfast +,normal1,normal2,normal3)); + [] + + +Overfull \hbox (45.00104pt too wide) in paragraph at lines 3719--3719 +[][][] []\OT1/cmtt/m/n/9 void get_detector_axis_slow ( double *slowaxis1, dou +ble *slowaxis2, double *slowaxis3){ + [] + + +Overfull \hbox (45.00104pt too wide) in paragraph at lines 3729--3729 +[][][] []\OT1/cmtt/m/n/9 void get_detector_axis_fast ( double *fastaxis1, dou +ble *fastaxis2, double *fastaxis3){ + [] + + +Overfull \hbox (16.65137pt too wide) in paragraph at lines 3740--3740 +[][][] []\OT1/cmtt/m/n/9 void get_detector_axes ( double *slowaxis1, double * +slowaxis2, double *slowaxis3, + [] + + +Overfull \hbox (21.37631pt too wide) in paragraph at lines 3741--3741 +[][][] []\OT1/cmtt/m/n/9 double *fastaxis1, double * +fastaxis2, double *fastaxis3){ + [] + + +Overfull \hbox (30.8262pt too wide) in paragraph at lines 3754--3754 +[][][] []\OT1/cmtt/m/n/9 void get_detector_axes_fs ( double *fastaxis1, doubl +e *fastaxis2, double *fastaxis3, + [] + + +Overfull \hbox (35.55115pt too wide) in paragraph at lines 3755--3755 +[][][] []\OT1/cmtt/m/n/9 double *slowaxis1, doubl +e *slowaxis2, double *slowaxis3){ + [] + + +Overfull \hbox (30.8262pt too wide) in paragraph at lines 3768--3768 +[][][] []\OT1/cmtt/m/n/9 void get_detector_axes_sf ( double *slowaxis1, doubl +e *slowaxis2, double *slowaxis3, + [] + + +Overfull \hbox (21.37631pt too wide) in paragraph at lines 3769--3769 +[][][] []\OT1/cmtt/m/n/9 double *fastaxis1, double * +fastaxis2, double *fastaxis3){ + [] + + +Overfull \hbox (11.92642pt too wide) in paragraph at lines 3812--3812 +[][][] []\OT1/cmtt/m/n/9 indexfast, index +slow, area,projected_area)); + [] + + +Overfull \hbox (11.92642pt too wide) in paragraph at lines 3823--3823 +[][][] []\OT1/cmtt/m/n/9 indexslow, index +fast, area,projected_area)); + [] + + +Overfull \hbox (163.12466pt too wide) in paragraph at lines 3870--3870 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_get_pixel_coordinates_fs(self, in +dexfast, indexslow, coordinate1, coordinate2, coordinate3)); + [] + + +Overfull \hbox (163.12466pt too wide) in paragraph at lines 3883--3883 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_get_pixel_coordinates_sf(self, in +dexslow, indexfast, coordinate1, coordinate2, coordinate3)); + [] + + +Overfull \hbox (11.92642pt too wide) in paragraph at lines 3910--3910 +[][][][]\OT1/cmtt/m/n/9 ["double indexfast", "double indexslow", "double center +fast","double centerslow"]], + [] + + +Overfull \hbox (11.92642pt too wide) in paragraph at lines 3922--3922 +[][][][]\OT1/cmtt/m/n/9 ["double indexslow", "double indexfast", "double center +slow","double centerfast"]], + [] + + +Overfull \hbox (26.10126pt too wide) in paragraph at lines 3932--3932 +[][][][]\OT1/cmtt/m/n/9 ["double indexslow", "double indexfast", "double center +slow","double centerfast"],[]], + [] + + +Overfull \hbox (26.10126pt too wide) in paragraph at lines 3942--3942 +[][][][]\OT1/cmtt/m/n/9 ["double indexfast", "double indexslow", "double center +fast","double centerslow"],[]], + [] + + +Overfull \hbox (26.10126pt too wide) in paragraph at lines 3952--3952 +[][][][]\OT1/cmtt/m/n/9 ["double indexslow", "double indexfast", "double center +slow","double centerfast"],[]], + [] + + +Overfull \hbox (26.10126pt too wide) in paragraph at lines 3962--3962 +[][][][]\OT1/cmtt/m/n/9 ["double indexslow", "double indexfast", "double center +slow","double centerfast"],[]], + [] + + +Overfull \hbox (26.10126pt too wide) in paragraph at lines 3972--3972 +[][][][]\OT1/cmtt/m/n/9 ["double indexfast", "double indexslow", "double center +fast","double centerslow"],[]], + [] + + +Overfull \hbox (26.10126pt too wide) in paragraph at lines 3982--3982 +[][][][]\OT1/cmtt/m/n/9 ["double indexslow", "double indexfast", "double center +slow","double centerfast"],[]], + [] + + +Overfull \hbox (49.72598pt too wide) in paragraph at lines 4183--4183 +[][][] []\OT1/cmtt/m/n/9 void compute_reciprocal_cell(double cell[6], double * +astar, double *bstar, double *cstar, + [] + + +Overfull \hbox (111.15027pt too wide) in paragraph at lines 4197--4197 +[][][][]\OT1/cmtt/m/n/9 ["Float astar", "Float bstar", "Float cstar", "Float al +phastar", "Float betastar", "Float gammastar"] ], + [] + + +Overfull \hbox (106.42532pt too wide) in paragraph at lines 4208--4208 +[][][][]\OT1/cmtt/m/n/9 ""","airy_disk",["double x", "double y", "double cenx", + "double ceny", "double volume", "double fwhm"], + [] + + +Overfull \hbox (21.37631pt too wide) in paragraph at lines 4216--4216 +[][][][]\OT1/cmtt/m/n/9 cbf_failnez(cbf_airy_disk_volume(xlo,ylo,xhi,yhi,cenx,c +eny,volumein,fwhm,volumeout)); + [] + + +Overfull \hbox (300.14807pt too wide) in paragraph at lines 4220--4220 +[][][][]\OT1/cmtt/m/n/9 ""","airy_disk_volume",["double xlo", "double ylo", "do +uble xhi", "double yhi", "double cenx", "double ceny", "double volumein", "doub +le fwhm"], + [] + + +Overfull \hbox (16.65137pt too wide) in paragraph at lines 4309--4309 +[][][] []\OT1/cmtt/m/n/9 cbf_handle_wrapper.wrap("cbf_get_unit_cell_e +sd",prototype,args,docstring) + [] + + +Overfull \hbox (45.00104pt too wide) in paragraph at lines 4311--4311 +[][][] []\OT1/cmtt/m/n/9 cbf_handle_wrapper.wrap("cbf_get_reciprocal_ +cell_esd",prototype,args,docstring) + [] + + +Overfull \hbox (16.65137pt too wide) in paragraph at lines 4313--4313 +[][][] []\OT1/cmtt/m/n/9 cbf_handle_wrapper.wrap("cbf_set_unit_cell_e +sd",prototype,args,docstring) + [] + + +Overfull \hbox (45.00104pt too wide) in paragraph at lines 4315--4315 +[][][] []\OT1/cmtt/m/n/9 cbf_handle_wrapper.wrap("cbf_set_reciprocal_ +cell_esd",prototype,args,docstring) + [] + +! Dimension too large. +\height ->\ht \@tempboxa + +l.4346 \end{minipage} + \vspace{4ex} +? + +Overfull \hbox (304.87302pt too wide) in paragraph at lines 4375--4375 +[][][] []\OT1/cmtt/m/n/9 'm4_ifelse(regexlibdir,`NOREGEXLIBDIR',`librar +y_dirs=["../solib/","../lib/"],',`library_dirs=["../solib/","../lib/","'regexli +bdir`"],')` + [] + + +Overfull \hbox (399.37192pt too wide) in paragraph at lines 4376--4376 +[][][] []\OT1/cmtt/m/n/9 'm4_ifelse(regexlib,`',`libraries=["cbf"],', ` +m4_ifelse(regexlib2,`',`libraries=["cbf","'regexlib`"],',`libraries=["cbf","'re +gexlib`","'regexlib2`"],')' )` + [] + + +Underfull \vbox (badness 1248) has occurred while \output is active [] + + [10] +Underfull \vbox (badness 10000) has occurred while \output is active [] + + [11] +[12] (./TODO.txt) +Underfull \vbox (badness 10000) has occurred while \output is active [] + + [13] +Overfull \vbox (57.62393pt too high) has occurred while \output is active [] + + +[14] +! Missing $ inserted. + + $ +l.4719 ...n of pycbf_test1 with write logic added} + +? +! Missing $ inserted. + + $ +l.4719 ...n of pycbf_test1 with write logic added} + +? + +Package hyperref Warning: Token not allowed in a PDFDocEncoded string, +(hyperref) removing `subscript' on input line 4719. + + +Underfull \vbox (badness 10000) has occurred while \output is active [] + + [15] +Underfull \vbox (badness 10000) has occurred while \output is active [] + + [16] +Overfull \vbox (472.76971pt too high) has occurred while \output is active [] + + +! Missing $ inserted. + + $ +l.4837 \end{flushleft} + +? +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <7> on input line 4837. +! Missing $ inserted. + + $ +l.4837 \end{flushleft} + +? +[17] +Overfull \hbox (63.90082pt too wide) in paragraph at lines 4864--4864 +[][][] []\OT1/cmtt/m/n/9 print '(0, 0) v00 [ %.9f %.9f %.9f ]' %(round(v00[0 +],9), round(v00[1],9), round(v00[2],9)) + [] + + +Overfull \hbox (63.90082pt too wide) in paragraph at lines 4865--4865 +[][][] []\OT1/cmtt/m/n/9 print '(0, 1) v01 [ %.9g %.9g %.9g ]' %(round(v01[0 +],9), round(v01[1],9), round(v01[2],9)) + [] + + +Overfull \hbox (63.90082pt too wide) in paragraph at lines 4866--4866 +[][][] []\OT1/cmtt/m/n/9 print '(1, 0) v10 [ %.9g %.9g %.9g ]' %(round(v10[0 +],9), round(v10[1],9), round(v10[2],9)) + [] + + +Overfull \hbox (63.90082pt too wide) in paragraph at lines 4867--4867 +[][][] []\OT1/cmtt/m/n/9 print '(1, 1) v11 [ %.9g %.9g %.9g ]' %(round(v11[0 +],9), round(v11[1],9), round(v11[2],9)) + [] + + +Overfull \hbox (45.00104pt too wide) in paragraph at lines 4869--4869 +[][][] []\OT1/cmtt/m/n/9 print "surface axes:", d.get_detector_surface_axes +(0), d.get_detector_surface_axes(1) + [] + + +Overfull \hbox (177.2995pt too wide) in paragraph at lines 4871--4871 +[][][] []\OT1/cmtt/m/n/9 print d.get_detector_surface_axes(0), "has", cbf.co +unt_axis_ancestors(d.get_detector_surface_axes(0)), "ancestors" + [] + + +Overfull \hbox (177.2995pt too wide) in paragraph at lines 4872--4872 +[][][] []\OT1/cmtt/m/n/9 print d.get_detector_surface_axes(1), "has", cbf.co +unt_axis_ancestors(d.get_detector_surface_axes(1)), "ancestors" + [] + + +Overfull \hbox (11.92642pt too wide) in paragraph at lines 4881--4881 +[][][] []\OT1/cmtt/m/n/9 print " equipment_component", cbf.get_axis_e +quipment_component(cur_axis) + [] + + +Overfull \hbox (130.05005pt too wide) in paragraph at lines 4883--4883 +[][][] []\OT1/cmtt/m/n/9 print " vector [ %.8g %.8g %.8g ]" % (round( +vector[0],7), round(vector[1],7), round(vector[2],7)) + [] + + +Overfull \hbox (130.05005pt too wide) in paragraph at lines 4885--4885 +[][][] []\OT1/cmtt/m/n/9 print " offset [ %.8g %.8g %.8g ]" % (round( +offset[0],7), round(offset[1],7), round(offset[2],7)) + [] + + +Underfull \vbox (badness 6675) has occurred while \output is active [] + + [18] +Overfull \hbox (2.47653pt too wide) in paragraph at lines 5030--5030 +[][][] []\OT1/cmtt/m/n/9 UINT32 header_major_version; /* hea +der_major_version (n.) */ + [] + + +Overfull \hbox (2.47653pt too wide) in paragraph at lines 5031--5031 +[][][] []\OT1/cmtt/m/n/9 UINT32 header_minor_version; /* hea +der_minor_version (.n) */ + [] + + +Overfull \hbox (2.47653pt too wide) in paragraph at lines 5068--5068 +[][][] []\OT1/cmtt/m/n/9 UINT32 background_applied; /* flags cor +rection has been applied - + [] + + +Overfull \hbox (2.47653pt too wide) in paragraph at lines 5070--5070 +[][][] []\OT1/cmtt/m/n/9 UINT32 bias_applied; /* flags cor +rection has been applied - + [] + + +Overfull \hbox (2.47653pt too wide) in paragraph at lines 5072--5072 +[][][] []\OT1/cmtt/m/n/9 UINT32 flatfield_applied; /* flags cor +rection has been applied - + [] + + +Overfull \hbox (2.47653pt too wide) in paragraph at lines 5074--5074 +[][][] []\OT1/cmtt/m/n/9 UINT32 distortion_applied; /* flags cor +rection has been applied - + [] + + +Overfull \hbox (2.47653pt too wide) in paragraph at lines 5093--5093 +[][][] []\OT1/cmtt/m/n/9 UINT32 pixel_noise[MAXIMAGES]; /* 1000* +base noise value (ADUs) */ + [] + + +Overfull \hbox (2.47653pt too wide) in paragraph at lines 5137--5137 +[][][] []\OT1/cmtt/m/n/9 INT32 measured_bias[MAXIMAGES]; /* 1000*mean b +ias value for each image*/ + [] + + +Underfull \vbox (badness 10000) has occurred while \output is active [] + + [19] +Overfull \vbox (3050.37395pt too high) has occurred while \output is active [] + + +[20] +Underfull \vbox (badness 10000) has occurred while \output is active [] + + [21] +Overfull \vbox (2159.37395pt too high) has occurred while \output is active [] + + +[22] +Underfull \vbox (badness 10000) has occurred while \output is active [] + + [23] +Overfull \vbox (1752.37395pt too high) has occurred while \output is active [] + + +[24] (./pycbf.aux) ) +Here is how much of TeX's memory you used: + 2545 strings out of 478995 + 37127 string characters out of 5858210 + 1496958 words of memory out of 5000000 + 20043 multiletter control sequences out of 15000+600000 + 410047 words of font info for 49 fonts, out of 8000000 for 9000 + 1141 hyphenation exceptions out of 8191 + 53i,11n,60p,220b,378s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on pycbf.dvi (24 pages, 219384 bytes). diff --git a/py2cbf/pycbf.out b/py2cbf/pycbf.out new file mode 100644 index 00000000..be00d166 --- /dev/null +++ b/py2cbf/pycbf.out @@ -0,0 +1,21 @@ +\BOOKMARK [1][-]{section.1}{1 Introduction}{} +\BOOKMARK [1][-]{section.2}{2 Installation prerequisites}{} +\BOOKMARK [1][-]{section.3}{3 Generating the c interface - the SWIG file}{} +\BOOKMARK [2][-]{subsection.3.1}{3.1 Exceptions}{section.3} +\BOOKMARK [2][-]{subsection.3.2}{3.2 Exceptions}{section.3} +\BOOKMARK [1][-]{section.4}{4 Docstrings}{} +\BOOKMARK [1][-]{section.5}{5 Wrappers}{} +\BOOKMARK [1][-]{section.6}{6 Building python extensions - the setup file}{} +\BOOKMARK [1][-]{section.7}{7 Building and testing the resulting package}{} +\BOOKMARK [1][-]{section.8}{8 Debugging compiled extensions}{} +\BOOKMARK [1][-]{section.9}{9 Things which are currently missing}{} +\BOOKMARK [1][-]{section.10}{10 Testing}{} +\BOOKMARK [2][-]{subsection.10.1}{10.1 Read a file based on cif2cbf.c}{section.10} +\BOOKMARK [2][-]{subsection.10.2}{10.2 Try to test the goniometer and detector}{section.10} +\BOOKMARK [2][-]{subsection.10.3}{10.3 Test cases for the generics}{section.10} +\BOOKMARK [2][-]{subsection.10.4}{10.4 Version of pycbftest1 with write logic added}{section.10} +\BOOKMARK [2][-]{subsection.10.5}{10.5 Processing of XFEL axes}{section.10} +\BOOKMARK [1][-]{section.11}{11 Worked example 1 : xmas beamline + mar ccd detector at the ESRF}{} +\BOOKMARK [2][-]{subsection.11.1}{11.1 Reading marccd headers}{section.11} +\BOOKMARK [2][-]{subsection.11.2}{11.2 Writing out cif files for fit2d/xmas}{section.11} +\BOOKMARK [2][-]{subsection.11.3}{11.3 A template cif file for the xmas beamline}{section.11} diff --git a/py2cbf/pycbf.pdf b/py2cbf/pycbf.pdf new file mode 100644 index 00000000..adc1bb18 Binary files /dev/null and b/py2cbf/pycbf.pdf differ diff --git a/py2cbf/pycbf.py b/py2cbf/pycbf.py new file mode 100644 index 00000000..e90c30fe --- /dev/null +++ b/py2cbf/pycbf.py @@ -0,0 +1,8980 @@ +# coding=utf-8 +# coding=utf-8 +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.2 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError("Python 2.7 or later required") + +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _py2cbf +else: + import _py2cbf + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +__author__ = "Jon Wright " +__date__ = "14 Dec 2005" +__version__ = "CBFlib 0.9" +__credits__ = """Paul Ellis and Herbert Bernstein for the excellent CBFlib!""" +__doc__=""" pycbf - python bindings to the CBFlib library + + A library for reading and writing ImageCIF and CBF files + which store area detector images for crystallography. + + This work is a derivative of the CBFlib version 0.7.7 library + by Paul J. Ellis of Stanford Synchrotron Radiation Laboratory + and Herbert J. Bernstein of Bernstein + Sons + See: + http://www.bernstein-plus-sons.com/software/CBF/ + + Licensing is GPL based, see: + http://www.bernstein-plus-sons.com/software/CBF/doc/CBFlib_NOTICES.html + + These bindings were automatically generated by SWIG, and the + input to SWIG was automatically generated by a python script. + We very strongly recommend you do not attempt to edit them + by hand! + + + + Copyright (C) 2007 Jonathan Wright + ESRF, Grenoble, France + email: wright@esrf.fr + + Revised, August 2010 Herbert J. Bernstein + Add defines from CBFlib 0.9.1 + +""" + +class doubleArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, nelements): + _py2cbf.doubleArray_swiginit(self, _py2cbf.new_doubleArray(nelements)) + __swig_destroy__ = _py2cbf.delete_doubleArray + + def __getitem__(self, index): + return _py2cbf.doubleArray___getitem__(self, index) + + def __setitem__(self, index, value): + return _py2cbf.doubleArray___setitem__(self, index, value) + + def cast(self): + return _py2cbf.doubleArray_cast(self) + + @staticmethod + def frompointer(t): + return _py2cbf.doubleArray_frompointer(t) + +# Register doubleArray in _pycbf: +_py2cbf.doubleArray_swigregister(doubleArray) + +def doubleArray_frompointer(t): + return _py2cbf.doubleArray_frompointer(t) + +class intArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, nelements): + _py2cbf.intArray_swiginit(self, _py2cbf.new_intArray(nelements)) + __swig_destroy__ = _py2cbf.delete_intArray + + def __getitem__(self, index): + return _py2cbf.intArray___getitem__(self, index) + + def __setitem__(self, index, value): + return _py2cbf.intArray___setitem__(self, index, value) + + def cast(self): + return _py2cbf.intArray_cast(self) + + @staticmethod + def frompointer(t): + return _py2cbf.intArray_frompointer(t) + +# Register intArray in _pycbf: +_py2cbf.intArray_swigregister(intArray) + +def intArray_frompointer(t): + return _py2cbf.intArray_frompointer(t) + +class shortArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, nelements): + _py2cbf.shortArray_swiginit(self, _py2cbf.new_shortArray(nelements)) + __swig_destroy__ = _py2cbf.delete_shortArray + + def __getitem__(self, index): + return _py2cbf.shortArray___getitem__(self, index) + + def __setitem__(self, index, value): + return _py2cbf.shortArray___setitem__(self, index, value) + + def cast(self): + return _py2cbf.shortArray_cast(self) + + @staticmethod + def frompointer(t): + return _py2cbf.shortArray_frompointer(t) + +# Register shortArray in _pycbf: +_py2cbf.shortArray_swigregister(shortArray) + +def shortArray_frompointer(t): + return _py2cbf.shortArray_frompointer(t) + +class longArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, nelements): + _py2cbf.longArray_swiginit(self, _py2cbf.new_longArray(nelements)) + __swig_destroy__ = _py2cbf.delete_longArray + + def __getitem__(self, index): + return _py2cbf.longArray___getitem__(self, index) + + def __setitem__(self, index, value): + return _py2cbf.longArray___setitem__(self, index, value) + + def cast(self): + return _py2cbf.longArray_cast(self) + + @staticmethod + def frompointer(t): + return _py2cbf.longArray_frompointer(t) + +# Register longArray in _pycbf: +_py2cbf.longArray_swigregister(longArray) + +def longArray_frompointer(t): + return _py2cbf.longArray_frompointer(t) + +CBF_INTEGER = _py2cbf.CBF_INTEGER +CBF_FLOAT = _py2cbf.CBF_FLOAT +CBF_CANONICAL = _py2cbf.CBF_CANONICAL +CBF_PACKED = _py2cbf.CBF_PACKED +CBF_PACKED_V2 = _py2cbf.CBF_PACKED_V2 +CBF_BYTE_OFFSET = _py2cbf.CBF_BYTE_OFFSET +CBF_PREDICTOR = _py2cbf.CBF_PREDICTOR +CBF_NONE = _py2cbf.CBF_NONE +CBF_COMPRESSION_MASK = _py2cbf.CBF_COMPRESSION_MASK +CBF_FLAG_MASK = _py2cbf.CBF_FLAG_MASK +CBF_UNCORRELATED_SECTIONS = _py2cbf.CBF_UNCORRELATED_SECTIONS +CBF_FLAT_IMAGE = _py2cbf.CBF_FLAT_IMAGE +CBF_NO_EXPAND = _py2cbf.CBF_NO_EXPAND +PLAIN_HEADERS = _py2cbf.PLAIN_HEADERS +MIME_HEADERS = _py2cbf.MIME_HEADERS +MSG_NODIGEST = _py2cbf.MSG_NODIGEST +MSG_DIGEST = _py2cbf.MSG_DIGEST +MSG_DIGESTNOW = _py2cbf.MSG_DIGESTNOW +MSG_DIGESTWARN = _py2cbf.MSG_DIGESTWARN +PAD_1K = _py2cbf.PAD_1K +PAD_2K = _py2cbf.PAD_2K +PAD_4K = _py2cbf.PAD_4K +CBF_PARSE_BRC = _py2cbf.CBF_PARSE_BRC +CBF_PARSE_PRN = _py2cbf.CBF_PARSE_PRN +CBF_PARSE_BKT = _py2cbf.CBF_PARSE_BKT +CBF_PARSE_BRACKETS = _py2cbf.CBF_PARSE_BRACKETS +CBF_PARSE_TQ = _py2cbf.CBF_PARSE_TQ +CBF_PARSE_CIF2_DELIMS = _py2cbf.CBF_PARSE_CIF2_DELIMS +CBF_PARSE_DDLm = _py2cbf.CBF_PARSE_DDLm +CBF_PARSE_CIF2 = _py2cbf.CBF_PARSE_CIF2 +CBF_PARSE_DEFINES = _py2cbf.CBF_PARSE_DEFINES +CBF_PARSE_WIDE = _py2cbf.CBF_PARSE_WIDE +CBF_PARSE_UTF8 = _py2cbf.CBF_PARSE_UTF8 +HDR_DEFAULT = _py2cbf.HDR_DEFAULT +MIME_NOHEADERS = _py2cbf.MIME_NOHEADERS +CBF = _py2cbf.CBF +CIF = _py2cbf.CIF +ENC_NONE = _py2cbf.ENC_NONE +ENC_BASE64 = _py2cbf.ENC_BASE64 +ENC_BASE32K = _py2cbf.ENC_BASE32K +ENC_QP = _py2cbf.ENC_QP +ENC_BASE10 = _py2cbf.ENC_BASE10 +ENC_BASE16 = _py2cbf.ENC_BASE16 +ENC_BASE8 = _py2cbf.ENC_BASE8 +ENC_FORWARD = _py2cbf.ENC_FORWARD +ENC_BACKWARD = _py2cbf.ENC_BACKWARD +ENC_CRTERM = _py2cbf.ENC_CRTERM +ENC_LFTERM = _py2cbf.ENC_LFTERM +ENC_DEFAULT = _py2cbf.ENC_DEFAULT + +def get_local_integer_byte_order(): + r""" + + Returns : char **bo,int *bolen + *args : + + C prototype: int cbf_get_local_integer_byte_order (char ** byte_order); + + CBFLib documentation: + DESCRIPTION + cbf_get_local_integer_byte_order returns the byte order of integers + on the machine on which the API is being run in the form of a + character string returned as the value pointed to by byte_order. + cbf_get_local_real_byte_order returns the byte order of reals on the + machine on which the API is being run in the form of a character + string returned as the value pointed to by byte_order. + cbf_get_local_real_format returns the format of floats on the machine + on which the API is being run in the form of a character string + returned as the value pointed to by real_format. The strings returned + must not be modified in any way. + The values returned in byte_order may be the strings "little_endian + " or "big-endian ". The values returned in real_format may be the + strings "ieee 754-1985 " or "other ". Additional values may be + returned by future versions of the API. + ARGUMENTS + byte_order pointer to the returned string real_format pointer to + the returned string + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.get_local_integer_byte_order() + +def compute_cell_volume(cell): + r""" + + Returns : Float volume + *args : double cell[6] + + C prototype: int cbf_compute_cell_volume ( double cell[6], double *volume ); + + CBFLib documentation: + DESCRIPTION + cbf_compute_cell_volume sets *volume to point to the volume of the + unit cell computed from the double values in cell[0:2] for the cell + edge lengths a, b and c in Ångstroms and the double values given in + cell[3:5] for the cell angles α, β and γ in degrees. + ARGUMENTS + cell Pointer to the array of 6 doubles giving the cell + parameters. volume Pointer to the doubles for cell volume. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.compute_cell_volume(cell) + +def get_local_real_format(): + r""" + + Returns : char **rf,int *rflen + *args : + + C prototype: int cbf_get_local_real_format (char ** real_format ); + + CBFLib documentation: + DESCRIPTION + cbf_get_local_integer_byte_order returns the byte order of integers + on the machine on which the API is being run in the form of a + character string returned as the value pointed to by byte_order. + cbf_get_local_real_byte_order returns the byte order of reals on the + machine on which the API is being run in the form of a character + string returned as the value pointed to by byte_order. + cbf_get_local_real_format returns the format of floats on the machine + on which the API is being run in the form of a character string + returned as the value pointed to by real_format. The strings returned + must not be modified in any way. + The values returned in byte_order may be the strings "little_endian + " or "big-endian ". The values returned in real_format may be the + strings "ieee 754-1985 " or "other ". Additional values may be + returned by future versions of the API. + ARGUMENTS + byte_order pointer to the returned string real_format pointer to + the returned string + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.get_local_real_format() + +def airy_disk(x, y, cenx, ceny, volume, fwhm): + r""" + + Returns : Float value + *args : double x,double y,double cenx,double ceny,double volume,double fwhm + + C prototype: int cbf_airy_disk(double x, double y, double cenx, double ceny, + double volume, double fwhm, double * value); + + CBFLib documentation: + DESCRIPTION + cbf_airy_disk sets value to point to the value taken at (x,y) of an + truncated Airy function approximation to a point-spread function of + total included volume volume and full width at half max fwhm centered + on (cenx, ceny). + cbf_airy_disk_volume sets to point to the integral in the box with + diagonal corners (xlo, ylo) and of (xhi, yhi) of a truncated Airy + function approximation to a point-spread function of total included + volume volume and full width at half max fwhm centered on (cenx, + ceny). + The Airy function used is an 8-digit approximation up to the first + minimum, after which it is forced to zero, so it cannot be used to + simulate diffraction rings. + ARGUMENTS + x the x-coordinate of a point in the real plane y + the y-coordinate of a point in the real plane xlo the + x-coordinate of a point in the real plane marking the left bound of + integration ylo the y-coordinate of a point in the real plane + marking the bottom bound of integration xhi the x-coordinate + of a point in the real plane marking the right bound of integration + yhi the y-coordinate of a point in the real plane marking the + top bound of integration cenx the x-coordinate of a point in + the real plane marking the PSF center ceny the y-coordinate of + a point in the real plane marking the PSF center volume the + total volume of the PSF fwhm the full-width at half max of the + PSF value Pointer to the value of the Airy function volumeout + Pointer to the value of the integral/TR> + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.airy_disk(x, y, cenx, ceny, volume, fwhm) + +def get_local_real_byte_order(): + r""" + + Returns : char **bo,int *bolen + *args : + + C prototype: int cbf_get_local_real_byte_order (char ** byte_order); + + CBFLib documentation: + DESCRIPTION + cbf_get_local_integer_byte_order returns the byte order of integers + on the machine on which the API is being run in the form of a + character string returned as the value pointed to by byte_order. + cbf_get_local_real_byte_order returns the byte order of reals on the + machine on which the API is being run in the form of a character + string returned as the value pointed to by byte_order. + cbf_get_local_real_format returns the format of floats on the machine + on which the API is being run in the form of a character string + returned as the value pointed to by real_format. The strings returned + must not be modified in any way. + The values returned in byte_order may be the strings "little_endian + " or "big-endian ". The values returned in real_format may be the + strings "ieee 754-1985 " or "other ". Additional values may be + returned by future versions of the API. + ARGUMENTS + byte_order pointer to the returned string real_format pointer to + the returned string + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.get_local_real_byte_order() + +def compute_reciprocal_cell(cell): + r""" + + Returns : Float astar,Float bstar,Float cstar,Float alphastar,Float betastar, + Float gammastar + *args : double cell[6] + + C prototype: int cbf_compute_reciprocal_cell ( double cell[6], + double rcell[6] ); + + CBFLib documentation: + DESCRIPTION + cbf_compute_reciprocal_cell sets rcell to point to the array of + reciprocal cell parameters computed from the double values cell[0:2] + giving the cell edge lengths a, b and c in Ångstroms, and the double + values cell[3:5] giving the cell angles α, β and γ in degrees. The + double values rcell[0:2] will be set to the reciprocal cell lengths + a^*, b^* and c^* in Ångstroms^-1 and the double values rcell[3:5] + will be set to the reciprocal cell angles α^*, β^* and γ^* in + degrees. + ARGUMENTS + cell Pointer to the array of 6 doubles giving the cell + parameters. rcell Pointer to the destination array of 6 doubles + giving the reciprocal cell parameters. volume Pointer to the + doubles for cell volume. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.compute_reciprocal_cell(cell) + +def airy_disk_volume(xlo, ylo, xhi, yhi, cenx, ceny, volumein, fwhm): + r""" + + Returns : Float volumeout + *args : double xlo,double ylo,double xhi,double yhi,double cenx,double ceny, + double volumein,double fwhm + + C prototype: int cbf_airy_disk_volume(double xlo, double ylo, double xhi, + double yhi, double cenx, double ceny, double volume, + double fwhm, double * volumeout); + + CBFLib documentation: + DESCRIPTION + cbf_airy_disk sets value to point to the value taken at (x,y) of an + truncated Airy function approximation to a point-spread function of + total included volume volume and full width at half max fwhm centered + on (cenx, ceny). + cbf_airy_disk_volume sets to point to the integral in the box with + diagonal corners (xlo, ylo) and of (xhi, yhi) of a truncated Airy + function approximation to a point-spread function of total included + volume volume and full width at half max fwhm centered on (cenx, + ceny). + The Airy function used is an 8-digit approximation up to the first + minimum, after which it is forced to zero, so it cannot be used to + simulate diffraction rings. + ARGUMENTS + x the x-coordinate of a point in the real plane y + the y-coordinate of a point in the real plane xlo the + x-coordinate of a point in the real plane marking the left bound of + integration ylo the y-coordinate of a point in the real plane + marking the bottom bound of integration xhi the x-coordinate + of a point in the real plane marking the right bound of integration + yhi the y-coordinate of a point in the real plane marking the + top bound of integration cenx the x-coordinate of a point in + the real plane marking the PSF center ceny the y-coordinate of + a point in the real plane marking the PSF center volume the + total volume of the PSF fwhm the full-width at half max of the + PSF value Pointer to the value of the Airy function volumeout + Pointer to the value of the integral/TR> + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.airy_disk_volume(xlo, ylo, xhi, yhi, cenx, ceny, volumein, fwhm) +class cbf_positioner_struct(object): + r"""Proxy of C cbf_positioner_struct struct.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + matrix = property(_py2cbf.cbf_positioner_struct_matrix_get, _py2cbf.cbf_positioner_struct_matrix_set, doc=r"""matrix : a(3).a(4).double""") + axis = property(_py2cbf.cbf_positioner_struct_axis_get, _py2cbf.cbf_positioner_struct_axis_set, doc=r"""axis : p.cbf_axis_struct""") + axes = property(_py2cbf.cbf_positioner_struct_axes_get, _py2cbf.cbf_positioner_struct_axes_set, doc=r"""axes : size_t""") + matrix_is_valid = property(_py2cbf.cbf_positioner_struct_matrix_is_valid_get, _py2cbf.cbf_positioner_struct_matrix_is_valid_set, doc=r"""matrix_is_valid : int""") + matrix_ratio_used = property(_py2cbf.cbf_positioner_struct_matrix_ratio_used_get, _py2cbf.cbf_positioner_struct_matrix_ratio_used_set, doc=r"""matrix_ratio_used : double""") + axis_index_limit = property(_py2cbf.cbf_positioner_struct_axis_index_limit_get, _py2cbf.cbf_positioner_struct_axis_index_limit_set, doc=r"""axis_index_limit : size_t""") + + def __init__(self): + r"""__init__(cbf_positioner_struct self) -> cbf_positioner_struct""" + _py2cbf.cbf_positioner_struct_swiginit(self, _py2cbf.new_cbf_positioner_struct()) + __swig_destroy__ = _py2cbf.delete_cbf_positioner_struct + + def get_rotation_range(self): + r""" + + Returns : Float start,Float increment + *args : + + C prototype: int cbf_get_rotation_range (cbf_goniometer goniometer, + unsigned int reserved, double *start, double *increment); + + CBFLib documentation: + DESCRIPTION + cbf_get_rotation_range sets *start and *increment to the + corresponding values of the goniometer rotation axis used for the + exposure. + Either of the destination pointers may be NULL. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + goniometer Goniometer handle. reserved Unused. Any value other + than 0 is invalid. start Pointer to the destination start + value. increment Pointer to the destination increment value. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_positioner_struct_get_rotation_range(self) + + def rotate_vector(self, ratio, initial1, initial2, initial3): + r""" + + Returns : double final1,double final2,double final3 + *args : double ratio,double initial1,double initial2,double initial3 + + C prototype: int cbf_rotate_vector (cbf_goniometer goniometer, + unsigned int reserved, double ratio, double initial1, + double initial2, double initial3, double *final1, + double *final2, double *final3); + + CBFLib documentation: + DESCRIPTION + cbf_rotate_vector sets *final1, *final2, and *final3 to the 3 + components of the of the vector (initial1, initial2, initial3) after + reorientation by applying the goniometer rotations. The value ratio + specif ies the goniometer setting and varies from 0.0 at the + beginning of the exposure to 1.0 at the end, irrespective of the + actual rotation range. + Any of the destination pointers may be NULL. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + goniometer Goniometer handle. reserved Unused. Any value other + than 0 is invalid. ratio Goniometer setting. 0 = beginning of + exposure, 1 = end. initial1 x component of the initial vector. + initial2 y component of the initial vector. initial3 z + component of the initial vector. final1 Pointer to the + destination x component of the final vector. final2 Pointer to + the destination y component of the final vector. final3 Pointer + to the destination z component of the final vector. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_positioner_struct_rotate_vector(self, ratio, initial1, initial2, initial3) + + def get_goniometer_poise(self, ratio): + r""" + + Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2, + Float offset3,Float angle + *args : Float ratio + + C prototype: int cbf_get_goniometer_poise(cbf_goniometer goniometer, + double ratio, double * vector1, double * vector2, + double * vector3, double * offset1, double * offset2, + double * offset3, double * angle); + + CBFLib documentation: + DESCRIPTION + cbf_get_axis_poise sets vector1, vector2, vector3 to point to the + components of the axis vector for axis axis_id, offset1, offset2, + offset3 to point to the components of the axis base offset vector for + axis axis_id, and angle to point to the angle of rotation of axis + axis_id after application of the axis settings for frame frame_id, + using ratio, a value between 0 and 1, indicating how far into the + internal motion in the frame to go. If frame_id is the string ". + ", the first frame found is used. If there is more than one frame, + which frame will be found is indeterminate. If frame_id is NULL, the + overall setting for the scan are used, rather than those for any + particular frame. The vector and offset reported are the reference + vector and offset of the axis axis_id transformed by application of + all motions of the axes on which axis_id depends. + cbf_get_goniometer_poise vector1, vector2, vector3 to point to the + components of the axis vector for the goniometer axis, offset1, + offset2, offset3 to point to the components of the axis base offset + vector for the goniometer axis, and angle to point to the angle of + rotation of the goniometer axis after application of all axis + settings in the goniometer deriving the vector, offset and angle from + the resulting matrix. Calculation of the vector is indeterminate if + the angle is zero. + cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point + to the components of the axis vector for axis axis_id, offset1, + offset2, offset3 to point to the components of the axis base offset + vector for axis axis_id unmodified by axis rotations. Any of the + pointers may be specified as NULL. + ARGUMENTS + handle CBF handle. ratio A number between 0 and 1 + indication how far into the frame to go vector1 Pointer to the + first component of the axis vector vector2 Pointer to the second + component of the axis vector vector3 Pointer to the third + component of the axis vector offset1 Pointer to the first + component of the axis offset offset2 Pointer to the second + component of the axis offset offset3 Pointer to the third + component of the axis offset angle Pointer to the rotation + angle axis_id The specified axis frame_id The specified + frame positioner CBF goniometer + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_positioner_struct_get_goniometer_poise(self, ratio) + + def get_reciprocal(self, ratio, wavelength, real1, real2, real3): + r""" + + Returns : double reciprocal1,double reciprocal2,double reciprocal3 + *args : double ratio,double wavelength,double real1,double real2,double real3 + + C prototype: int cbf_get_reciprocal (cbf_goniometer goniometer, + unsigned int reserved, double ratio, double wavelength, + double real1, double real2, double real3, + double *reciprocal1, double *reciprocal2, + double *reciprocal3); + + CBFLib documentation: + DESCRIPTION + cbf_get_reciprocal sets *reciprocal1, * reciprocal2, and * + reciprocal3 to the 3 components of the of the reciprocal-space vector + corresponding to the real-space vector (real1, real2, real3). The + reciprocal-space vector is oriented to correspond to the goniometer + setting with all axes at 0. The value wavelength is the wavlength in + Å and the value ratio specifies the current goniometer setting and + varies from 0.0 at the beginning of the exposur e to 1.0 at the end, + irrespective of the actual rotation range. + Any of the destination pointers may be NULL. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + goniometer Goniometer handle. reserved Unused. Any value + other than 0 is invalid. ratio Goniometer setting. 0 = + beginning of exposure, 1 = end. wavelength Wavelength in Å. real1 + x component of the real-space vector. real2 y + component of the real-space vector. real3 z component of the + real-space vector. reciprocal1 Pointer to the destination x + component of the reciprocal-space vector. reciprocal2 Pointer to + the destination y component of the reciprocal-space vector. + reciprocal3 Pointer to the destination z component of the + reciprocal-space vector. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_positioner_struct_get_reciprocal(self, ratio, wavelength, real1, real2, real3) + + def get_rotation_axis(self): + r""" + + Returns : double vector1,double vector2,double vector3 + *args : + + C prototype: int cbf_get_rotation_axis (cbf_goniometer goniometer, + unsigned int reserved, double *vector1, double *vector2, + double *vector3); + + CBFLib documentation: + DESCRIPTION + cbf_get_rotation_axis sets *vector1, *vector2, and *vector3 to the 3 + components of the goniometer rotation axis used for the exposure. + Any of the destination pointers may be NULL. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + goniometer Goniometer handle. reserved Unused. Any value other + than 0 is invalid. vector1 Pointer to the destination x + component of the rotation axis. vector2 Pointer to the + destination y component of the rotation axis. vector3 Pointer to + the destination z component of the rotation axis. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_positioner_struct_get_rotation_axis(self) + +# Register cbf_positioner_struct in _pycbf: +_py2cbf.cbf_positioner_struct_swigregister(cbf_positioner_struct) + +class cbf_detector_struct(object): + r"""Proxy of C cbf_detector_struct struct.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + positioner = property(_py2cbf.cbf_detector_struct_positioner_get, _py2cbf.cbf_detector_struct_positioner_set, doc=r"""positioner : cbf_positioner""") + displacement = property(_py2cbf.cbf_detector_struct_displacement_get, _py2cbf.cbf_detector_struct_displacement_set, doc=r"""displacement : a(2).double""") + increment = property(_py2cbf.cbf_detector_struct_increment_get, _py2cbf.cbf_detector_struct_increment_set, doc=r"""increment : a(2).double""") + axes = property(_py2cbf.cbf_detector_struct_axes_get, _py2cbf.cbf_detector_struct_axes_set, doc=r"""axes : size_t""") + index = property(_py2cbf.cbf_detector_struct_index_get, _py2cbf.cbf_detector_struct_index_set, doc=r"""index : a(2).size_t""") + + def __init__(self): + r"""__init__(cbf_detector_struct self) -> cbf_detector_struct""" + _py2cbf.cbf_detector_struct_swiginit(self, _py2cbf.new_cbf_detector_struct()) + __swig_destroy__ = _py2cbf.delete_cbf_detector_struct + + def set_beam_center_fs(self, indexfast, indexslow, centerfast, centerslow): + r""" + + Returns : + *args : double indexfast,double indexslow,double centerfast,double centerslow + + C prototype: int cbf_set_beam_center_fs (cbf_detector detector, + double *indexfast, double *indexslow, double *centerfast, + double *centerslow); + + CBFLib documentation: + DESCRIPTION + cbf_get_beam_center sets *centerfast and *centerslow to the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector and *indexfast and + *indexslow to the corresponding indices. cbf_set_beam_center sets the + offsets in the axis category for the detector element axis with + precedence 1 to place the beam center at the position given in mm by + *centerfast and *centerslow as the displacements in mm along the + detector axes from pixel (0, 0) to the point at which the beam + intersects the detector at the indices given *indexfast and + *indexslow. cbf_set_reference_beam_center sets the displacments in + the array_structure_list_axis category to place the beam center at + the position given in mm by *centerfast and *centerslow as the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector at the indices given + by *indexfast and *indexslow. In order to achieve consistent results, + a reference detector should be used for detector to have all axes at + their reference settings. + Note that the precedence 1 axis is the fastest axis, so that + *centerfast and *indexfast are the fast axis components of the center + and *centerslow and *indexslow are the slow axis components of the + center. + The _fs calls give the displacments in a fast-to-slow order. The + calls with no suffix and the calls _sf calls give the displacements + in slow-to-fast order + Any of the destination pointers may be NULL for getting the beam + center. For setting the beam axis, either the indices of the center + must not be NULL. + The indices are non-negative for beam centers within the detector + surface, but the center for an axis with a negative increment will be + negative for a beam center within the detector surface. + For cbf_set_beam_center if the diffrn_data_frame category exists with + a row for the corresponding element id, the values will be set for + _diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in + millimetres and the value of _diffrn_data_frame.center_units will be + set to 'mm'. + For cbf_set_reference_beam_center if the diffrn_detector_element + category exists with a row for the corresponding element id, the + values will be set for _diffrn_detector_element.reference_center_fast + and _diffrn_detector_element.reference_center_slow in millimetres and + the value of _diffrn_detector_element.reference_units will be set to + 'mm'. + ARGUMENTS + detector Detector handle. indexfast Pointer to the destination + fast index. indexslow Pointer to the destination slow index. + centerfast Pointer to the destination displacement along the fast + axis. centerslow Pointer to the destination displacement along the + slow axis. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_set_beam_center_fs(self, indexfast, indexslow, centerfast, centerslow) + + def set_reference_beam_center_fs(self, indexfast, indexslow, centerfast, centerslow): + r""" + + Returns : + *args : double indexfast,double indexslow,double centerfast,double centerslow + + C prototype: int cbf_set_reference_beam_center_fs (cbf_detector detector, + double *indexfast, double *indexslow, double *centerfast, + double *centerslow); + + CBFLib documentation: + DESCRIPTION + cbf_get_beam_center sets *centerfast and *centerslow to the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector and *indexfast and + *indexslow to the corresponding indices. cbf_set_beam_center sets the + offsets in the axis category for the detector element axis with + precedence 1 to place the beam center at the position given in mm by + *centerfast and *centerslow as the displacements in mm along the + detector axes from pixel (0, 0) to the point at which the beam + intersects the detector at the indices given *indexfast and + *indexslow. cbf_set_reference_beam_center sets the displacments in + the array_structure_list_axis category to place the beam center at + the position given in mm by *centerfast and *centerslow as the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector at the indices given + by *indexfast and *indexslow. In order to achieve consistent results, + a reference detector should be used for detector to have all axes at + their reference settings. + Note that the precedence 1 axis is the fastest axis, so that + *centerfast and *indexfast are the fast axis components of the center + and *centerslow and *indexslow are the slow axis components of the + center. + The _fs calls give the displacments in a fast-to-slow order. The + calls with no suffix and the calls _sf calls give the displacements + in slow-to-fast order + Any of the destination pointers may be NULL for getting the beam + center. For setting the beam axis, either the indices of the center + must not be NULL. + The indices are non-negative for beam centers within the detector + surface, but the center for an axis with a negative increment will be + negative for a beam center within the detector surface. + For cbf_set_beam_center if the diffrn_data_frame category exists with + a row for the corresponding element id, the values will be set for + _diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in + millimetres and the value of _diffrn_data_frame.center_units will be + set to 'mm'. + For cbf_set_reference_beam_center if the diffrn_detector_element + category exists with a row for the corresponding element id, the + values will be set for _diffrn_detector_element.reference_center_fast + and _diffrn_detector_element.reference_center_slow in millimetres and + the value of _diffrn_detector_element.reference_units will be set to + 'mm'. + ARGUMENTS + detector Detector handle. indexfast Pointer to the destination + fast index. indexslow Pointer to the destination slow index. + centerfast Pointer to the destination displacement along the fast + axis. centerslow Pointer to the destination displacement along the + slow axis. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_set_reference_beam_center_fs(self, indexfast, indexslow, centerfast, centerslow) + + def get_beam_center(self): + r""" + + Returns : double index1,double index2,double center1,double center2 + *args : + + C prototype: int cbf_get_beam_center (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, + double *centerfast); + + CBFLib documentation: + DESCRIPTION + cbf_get_beam_center sets *centerfast and *centerslow to the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector and *indexfast and + *indexslow to the corresponding indices. cbf_set_beam_center sets the + offsets in the axis category for the detector element axis with + precedence 1 to place the beam center at the position given in mm by + *centerfast and *centerslow as the displacements in mm along the + detector axes from pixel (0, 0) to the point at which the beam + intersects the detector at the indices given *indexfast and + *indexslow. cbf_set_reference_beam_center sets the displacments in + the array_structure_list_axis category to place the beam center at + the position given in mm by *centerfast and *centerslow as the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector at the indices given + by *indexfast and *indexslow. In order to achieve consistent results, + a reference detector should be used for detector to have all axes at + their reference settings. + Note that the precedence 1 axis is the fastest axis, so that + *centerfast and *indexfast are the fast axis components of the center + and *centerslow and *indexslow are the slow axis components of the + center. + The _fs calls give the displacments in a fast-to-slow order. The + calls with no suffix and the calls _sf calls give the displacements + in slow-to-fast order + Any of the destination pointers may be NULL for getting the beam + center. For setting the beam axis, either the indices of the center + must not be NULL. + The indices are non-negative for beam centers within the detector + surface, but the center for an axis with a negative increment will be + negative for a beam center within the detector surface. + For cbf_set_beam_center if the diffrn_data_frame category exists with + a row for the corresponding element id, the values will be set for + _diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in + millimetres and the value of _diffrn_data_frame.center_units will be + set to 'mm'. + For cbf_set_reference_beam_center if the diffrn_detector_element + category exists with a row for the corresponding element id, the + values will be set for _diffrn_detector_element.reference_center_fast + and _diffrn_detector_element.reference_center_slow in millimetres and + the value of _diffrn_detector_element.reference_units will be set to + 'mm'. + ARGUMENTS + detector Detector handle. indexfast Pointer to the destination + fast index. indexslow Pointer to the destination slow index. + centerfast Pointer to the destination displacement along the fast + axis. centerslow Pointer to the destination displacement along the + slow axis. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_get_beam_center(self) + + def get_pixel_coordinates_fs(self, indexfast, indexslow): + r""" + + Returns : double coordinate1,double coordinate2,double coordinate3 + *args : double indexfast,double indexslow + + C prototype: int cbf_get_pixel_coordinates_fs (cbf_detector detector, + double indexfast, double indexslow, double *coordinate1, + double *coordinate2, double *coordinate3); + + CBFLib documentation: + DESCRIPTION + cbf_get_pixel_coordinates, cbf_get_pixel_coordinates_fs and + cbf_get_pixel_coordinates_sf ses *coordinate1, *coordinate2, and + *coordinate3 to the vector position of pixel (indexfast, indexslow) + on the detector surface. If indexslow and indexfast are integers then + the coordinates correspond to the center of a pixel. + Any of the destination pointers may be NULL. + ARGUMENTS + detector Detector handle. indexslow Slow index. indexfast + Fast index. coordinate1 Pointer to the destination x component. + coordinate2 Pointer to the destination y component. coordinate3 + Pointer to the destination z component. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_get_pixel_coordinates_fs(self, indexfast, indexslow) + + def get_inferred_pixel_size(self, axis_number): + r""" + + Returns : Float pixel size + *args : Int axis_number + + C prototype: int cbf_get_inferred_pixel_size (cbf_detector detector, + int axis_number, double *psize); + + CBFLib documentation: + DESCRIPTION + cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_sf set + *psize to point to the double value in millimeters of the pixel size + for the axis axis_number value. The slow index is treated as axis 1 + and the next faster index is treated as axis 2. + cbf_get_inferred_pixel_size_fs sets *psize to point to the double + value in millimeters of the pixel size for the axis axis_number + value. The fast index is treated as axis 1 and the next slower index + is treated as axis 2. + If the axis number is negative, the axes are used in the reverse + order so that an axis_number of -1 indicates the fast axes in a call + to cbf_get_inferred_pixel_size or cbf_get_inferred_pixel_size_sf and + indicates the fast axis in a call to cbf_get_inferred_pixel_size_fs. + ARGUMENTS + detector Detector handle. axis_number The number of the axis. + psize Pointer to the destination pizel size in mm. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_get_inferred_pixel_size(self, axis_number) + + def get_pixel_area(self, index1, index2): + r""" + + Returns : double area,double projected_area + *args : double index1,double index2 + + C prototype: int cbf_get_pixel_area (cbf_detector detector, double indexslow, + double indexfast, double *area, double *projected_area); + + CBFLib documentation: + DESCRIPTION + cbf_get_pixel_area, cbf_get_pixel_area_fs and cbf_get_pixel_area_sf + set *area to the area of the pixel at (indexfast, indexslow) on the + detector surface and *projected_area to the apparent area of the + pixel as viewed from the sample position, with indexslow being the + slow axis and indexfast being the fast axis. + Either of the destination pointers may be NULL. + ARGUMENTS + detector Detector handle. indexfast Fast index. + indexslow Slow index. area Pointer to the + destination area in mm2. projected_area Pointer to the destination + apparent area in mm2. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_get_pixel_area(self, index1, index2) + + def get_pixel_normal_fs(self, indexfast, indexslow): + r""" + + Returns : double normal1,double normal2,double normal3 + *args : double indexfast,double indexslow + + C prototype: int cbf_get_pixel_normal_fs (cbf_detector detector, + double indexfast, double indexslow, double *normal1, + double *normal2, double *normal3); + + CBFLib documentation: + DESCRIPTION + cbf_get_detector_normal, cbf_get_pixel_normal_fs and + cbf_get_pixel_normal_sf set *normal1, *normal2, and *normal3 to the 3 + components of the of the normal vector to the pixel at (indexfast, + indexslow). The vector is normalized. + Any of the destination pointers may be NULL. + ARGUMENTS + detector Detector handle. indexslow Slow index. indexfast Fast + index. normal1 Pointer to the destination x component of the + normal vector. normal2 Pointer to the destination y component of + the normal vector. normal3 Pointer to the destination z component + of the normal vector. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_get_pixel_normal_fs(self, indexfast, indexslow) + + def get_detector_surface_axes(self, index): + r"""get_detector_surface_axes(cbf_detector_struct self, int index) -> char const *""" + return _py2cbf.cbf_detector_struct_get_detector_surface_axes(self, index) + + def get_detector_axes(self): + r""" + + Returns : double slowaxis1,double slowaxis2,double slowaxis3,double fastaxis1, + double fastaxis2,double fastaxis3 + *args : + + C prototype: int cbf_get_detector_axes (cbf_detector detector, + double *slowaxis1, double *slowaxis2, double *slowaxis3, + double *fastaxis1, double *fastaxis2, double *fastaxis3); + + CBFLib documentation: + DESCRIPTION + cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and + *slowaxis3 to the 3 components of the slow axis of the specified + detector at the current settings of all axes. + cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and + *fastaxis3 to the 3 components of the fast axis of the specified + detector at the current settings of all axes. cbf_get_detector_axes, + cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set + *slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the + slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 + components of the fast axis of the specified detector at the current + settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 + and *axis_id2 to the names of the two surface axes of the detector or + ". ", + Any of the destination pointers may be NULL. + ARGUMENTS + detector Detector handle. slowaxis1 Pointer to the destination x + component of the slow axis vector. slowaxis2 Pointer to the + destination y component of the slow axis vector. slowaxis3 Pointer + to the destination z component of the slow axis vector. fastaxis1 + Pointer to the destination x component of the fast axis vector. + fastaxis2 Pointer to the destination y component of the fast axis + vector. fastaxis3 Pointer to the destination z component of the + fast axis vector. axis_id1 Pointer to the destination first + surface axis name. axis_id2 Pointer to the destination second + surface axis name. axis_id3 Pointer to the destination third + surface axis name. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_get_detector_axes(self) + + def set_reference_beam_center(self, indexslow, indexfast, centerslow, centerfast): + r""" + + Returns : + *args : double indexslow,double indexfast,double centerslow,double centerfast + + C prototype: int cbf_set_reference_beam_center (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, + double *centerfast); + + CBFLib documentation: + DESCRIPTION + cbf_get_beam_center sets *centerfast and *centerslow to the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector and *indexfast and + *indexslow to the corresponding indices. cbf_set_beam_center sets the + offsets in the axis category for the detector element axis with + precedence 1 to place the beam center at the position given in mm by + *centerfast and *centerslow as the displacements in mm along the + detector axes from pixel (0, 0) to the point at which the beam + intersects the detector at the indices given *indexfast and + *indexslow. cbf_set_reference_beam_center sets the displacments in + the array_structure_list_axis category to place the beam center at + the position given in mm by *centerfast and *centerslow as the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector at the indices given + by *indexfast and *indexslow. In order to achieve consistent results, + a reference detector should be used for detector to have all axes at + their reference settings. + Note that the precedence 1 axis is the fastest axis, so that + *centerfast and *indexfast are the fast axis components of the center + and *centerslow and *indexslow are the slow axis components of the + center. + The _fs calls give the displacments in a fast-to-slow order. The + calls with no suffix and the calls _sf calls give the displacements + in slow-to-fast order + Any of the destination pointers may be NULL for getting the beam + center. For setting the beam axis, either the indices of the center + must not be NULL. + The indices are non-negative for beam centers within the detector + surface, but the center for an axis with a negative increment will be + negative for a beam center within the detector surface. + For cbf_set_beam_center if the diffrn_data_frame category exists with + a row for the corresponding element id, the values will be set for + _diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in + millimetres and the value of _diffrn_data_frame.center_units will be + set to 'mm'. + For cbf_set_reference_beam_center if the diffrn_detector_element + category exists with a row for the corresponding element id, the + values will be set for _diffrn_detector_element.reference_center_fast + and _diffrn_detector_element.reference_center_slow in millimetres and + the value of _diffrn_detector_element.reference_units will be set to + 'mm'. + ARGUMENTS + detector Detector handle. indexfast Pointer to the destination + fast index. indexslow Pointer to the destination slow index. + centerfast Pointer to the destination displacement along the fast + axis. centerslow Pointer to the destination displacement along the + slow axis. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_set_reference_beam_center(self, indexslow, indexfast, centerslow, centerfast) + + def get_detector_axis_slow(self): + r""" + + Returns : double slowaxis1,double slowaxis2,double slowaxis3 + *args : + + C prototype: int cbf_get_detector_axis_slow (cbf_detector detector, + double *slowaxis1, double *slowaxis2, double *slowaxis3); + + CBFLib documentation: + DESCRIPTION + cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and + *slowaxis3 to the 3 components of the slow axis of the specified + detector at the current settings of all axes. + cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and + *fastaxis3 to the 3 components of the fast axis of the specified + detector at the current settings of all axes. cbf_get_detector_axes, + cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set + *slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the + slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 + components of the fast axis of the specified detector at the current + settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 + and *axis_id2 to the names of the two surface axes of the detector or + ". ", + Any of the destination pointers may be NULL. + ARGUMENTS + detector Detector handle. slowaxis1 Pointer to the destination x + component of the slow axis vector. slowaxis2 Pointer to the + destination y component of the slow axis vector. slowaxis3 Pointer + to the destination z component of the slow axis vector. fastaxis1 + Pointer to the destination x component of the fast axis vector. + fastaxis2 Pointer to the destination y component of the fast axis + vector. fastaxis3 Pointer to the destination z component of the + fast axis vector. axis_id1 Pointer to the destination first + surface axis name. axis_id2 Pointer to the destination second + surface axis name. axis_id3 Pointer to the destination third + surface axis name. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_get_detector_axis_slow(self) + + def get_detector_distance(self): + r""" + + Returns : double distance + *args : + + C prototype: int cbf_get_detector_distance (cbf_detector detector, + double *distance); + + CBFLib documentation: + DESCRIPTION + cbf_get_detector_distance sets *distance to the nearest distance from + the sample position to the detector plane. + ARGUMENTS + detector Detector handle. distance Pointer to the destination + distance. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_get_detector_distance(self) + + def get_inferred_pixel_size_fs(self, axis_number): + r""" + + Returns : Float pixel size + *args : Int axis_number + + C prototype: int cbf_get_inferred_pixel_size_fs(cbf_detector detector, + int axis_number, double *psize); + + CBFLib documentation: + DESCRIPTION + cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_sf set + *psize to point to the double value in millimeters of the pixel size + for the axis axis_number value. The slow index is treated as axis 1 + and the next faster index is treated as axis 2. + cbf_get_inferred_pixel_size_fs sets *psize to point to the double + value in millimeters of the pixel size for the axis axis_number + value. The fast index is treated as axis 1 and the next slower index + is treated as axis 2. + If the axis number is negative, the axes are used in the reverse + order so that an axis_number of -1 indicates the fast axes in a call + to cbf_get_inferred_pixel_size or cbf_get_inferred_pixel_size_sf and + indicates the fast axis in a call to cbf_get_inferred_pixel_size_fs. + ARGUMENTS + detector Detector handle. axis_number The number of the axis. + psize Pointer to the destination pizel size in mm. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_get_inferred_pixel_size_fs(self, axis_number) + + def get_detector_normal(self): + r""" + + Returns : double normal1,double normal2,double normal3 + *args : + + C prototype: int cbf_get_detector_normal (cbf_detector detector, + double *normal1, double *normal2, double *normal3); + + CBFLib documentation: + DESCRIPTION + cbf_get_detector_normal sets *normal1, *normal2, and *normal3 to the + 3 components of the of the normal vector to the detector plane. The + vector is normalized. + Any of the destination pointers may be NULL. + ARGUMENTS + detector Detector handle. normal1 Pointer to the destination x + component of the normal vector. normal2 Pointer to the destination + y component of the normal vector. normal3 Pointer to the + destination z component of the normal vector. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_get_detector_normal(self) + + def get_detector_axis_fast(self): + r""" + + Returns : double fastaxis1,double fastaxis2,double fastaxis3 + *args : + + C prototype: int cbf_get_detector_axis_fast (cbf_detector detector, + double *fastaxis1, double *fastaxis2, double *fastaxis3); + + CBFLib documentation: + DESCRIPTION + cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and + *slowaxis3 to the 3 components of the slow axis of the specified + detector at the current settings of all axes. + cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and + *fastaxis3 to the 3 components of the fast axis of the specified + detector at the current settings of all axes. cbf_get_detector_axes, + cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set + *slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the + slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 + components of the fast axis of the specified detector at the current + settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 + and *axis_id2 to the names of the two surface axes of the detector or + ". ", + Any of the destination pointers may be NULL. + ARGUMENTS + detector Detector handle. slowaxis1 Pointer to the destination x + component of the slow axis vector. slowaxis2 Pointer to the + destination y component of the slow axis vector. slowaxis3 Pointer + to the destination z component of the slow axis vector. fastaxis1 + Pointer to the destination x component of the fast axis vector. + fastaxis2 Pointer to the destination y component of the fast axis + vector. fastaxis3 Pointer to the destination z component of the + fast axis vector. axis_id1 Pointer to the destination first + surface axis name. axis_id2 Pointer to the destination second + surface axis name. axis_id3 Pointer to the destination third + surface axis name. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_get_detector_axis_fast(self) + + def get_detector_axes_fs(self): + r"""get_detector_axes_fs(cbf_detector_struct self)""" + return _py2cbf.cbf_detector_struct_get_detector_axes_fs(self) + + def get_detector_axes_sf(self): + r""" + + Returns : double slowaxis1,double slowaxis2,double slowaxis3,double fastaxis1, + double fastaxis2,double fastaxis3 + *args : + + C prototype: int cbf_get_detector_axes_sf (cbf_detector detector, + double *slowaxis1, double *slowaxis2, double *slowaxis3, + double *fastaxis1, double *fastaxis2, double *fastaxis3); + + CBFLib documentation: + DESCRIPTION + cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and + *slowaxis3 to the 3 components of the slow axis of the specified + detector at the current settings of all axes. + cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and + *fastaxis3 to the 3 components of the fast axis of the specified + detector at the current settings of all axes. cbf_get_detector_axes, + cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set + *slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the + slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 + components of the fast axis of the specified detector at the current + settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 + and *axis_id2 to the names of the two surface axes of the detector or + ". ", + Any of the destination pointers may be NULL. + ARGUMENTS + detector Detector handle. slowaxis1 Pointer to the destination x + component of the slow axis vector. slowaxis2 Pointer to the + destination y component of the slow axis vector. slowaxis3 Pointer + to the destination z component of the slow axis vector. fastaxis1 + Pointer to the destination x component of the fast axis vector. + fastaxis2 Pointer to the destination y component of the fast axis + vector. fastaxis3 Pointer to the destination z component of the + fast axis vector. axis_id1 Pointer to the destination first + surface axis name. axis_id2 Pointer to the destination second + surface axis name. axis_id3 Pointer to the destination third + surface axis name. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_get_detector_axes_sf(self) + + def get_pixel_coordinates_sf(self, indexslow, indexfast): + r""" + + Returns : double coordinate1,double coordinate2,double coordinate3 + *args : double indexslow,double indexfast + + C prototype: int cbf_get_pixel_coordinates_sf (cbf_detector detector, + double indexslow, double indexfast, double *coordinate1, + double *coordinate2, double *coordinate3); + + CBFLib documentation: + DESCRIPTION + cbf_get_pixel_coordinates, cbf_get_pixel_coordinates_fs and + cbf_get_pixel_coordinates_sf ses *coordinate1, *coordinate2, and + *coordinate3 to the vector position of pixel (indexfast, indexslow) + on the detector surface. If indexslow and indexfast are integers then + the coordinates correspond to the center of a pixel. + Any of the destination pointers may be NULL. + ARGUMENTS + detector Detector handle. indexslow Slow index. indexfast + Fast index. coordinate1 Pointer to the destination x component. + coordinate2 Pointer to the destination y component. coordinate3 + Pointer to the destination z component. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_get_pixel_coordinates_sf(self, indexslow, indexfast) + + def set_beam_center(self, indexslow, indexfast, centerslow, centerfast): + r""" + + Returns : + *args : double indexslow,double indexfast,double centerslow,double centerfast + + C prototype: int cbf_set_beam_center (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, + double *centerfast); + + CBFLib documentation: + DESCRIPTION + cbf_get_beam_center sets *centerfast and *centerslow to the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector and *indexfast and + *indexslow to the corresponding indices. cbf_set_beam_center sets the + offsets in the axis category for the detector element axis with + precedence 1 to place the beam center at the position given in mm by + *centerfast and *centerslow as the displacements in mm along the + detector axes from pixel (0, 0) to the point at which the beam + intersects the detector at the indices given *indexfast and + *indexslow. cbf_set_reference_beam_center sets the displacments in + the array_structure_list_axis category to place the beam center at + the position given in mm by *centerfast and *centerslow as the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector at the indices given + by *indexfast and *indexslow. In order to achieve consistent results, + a reference detector should be used for detector to have all axes at + their reference settings. + Note that the precedence 1 axis is the fastest axis, so that + *centerfast and *indexfast are the fast axis components of the center + and *centerslow and *indexslow are the slow axis components of the + center. + The _fs calls give the displacments in a fast-to-slow order. The + calls with no suffix and the calls _sf calls give the displacements + in slow-to-fast order + Any of the destination pointers may be NULL for getting the beam + center. For setting the beam axis, either the indices of the center + must not be NULL. + The indices are non-negative for beam centers within the detector + surface, but the center for an axis with a negative increment will be + negative for a beam center within the detector surface. + For cbf_set_beam_center if the diffrn_data_frame category exists with + a row for the corresponding element id, the values will be set for + _diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in + millimetres and the value of _diffrn_data_frame.center_units will be + set to 'mm'. + For cbf_set_reference_beam_center if the diffrn_detector_element + category exists with a row for the corresponding element id, the + values will be set for _diffrn_detector_element.reference_center_fast + and _diffrn_detector_element.reference_center_slow in millimetres and + the value of _diffrn_detector_element.reference_units will be set to + 'mm'. + ARGUMENTS + detector Detector handle. indexfast Pointer to the destination + fast index. indexslow Pointer to the destination slow index. + centerfast Pointer to the destination displacement along the fast + axis. centerslow Pointer to the destination displacement along the + slow axis. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_set_beam_center(self, indexslow, indexfast, centerslow, centerfast) + + def get_pixel_area_fs(self, indexfast, indexslow): + r""" + + Returns : double area,double projected_area + *args : double indexfast,double indexslow + + C prototype: int cbf_get_pixel_area_fs(cbf_detector detector, + double indexfast, double indexslow, double *area, + double *projected_area); + + CBFLib documentation: + DESCRIPTION + cbf_get_pixel_area, cbf_get_pixel_area_fs and cbf_get_pixel_area_sf + set *area to the area of the pixel at (indexfast, indexslow) on the + detector surface and *projected_area to the apparent area of the + pixel as viewed from the sample position, with indexslow being the + slow axis and indexfast being the fast axis. + Either of the destination pointers may be NULL. + ARGUMENTS + detector Detector handle. indexfast Fast index. + indexslow Slow index. area Pointer to the + destination area in mm2. projected_area Pointer to the destination + apparent area in mm2. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_get_pixel_area_fs(self, indexfast, indexslow) + + def get_beam_center_fs(self): + r""" + + Returns : double indexfast,double indexslow,double centerfast,double centerslow + *args : + + C prototype: int cbf_get_beam_center_fs (cbf_detector detector, + double *indexfast, double *indexslow, double *centerfast, + double *centerslow); + + CBFLib documentation: + DESCRIPTION + cbf_get_beam_center sets *centerfast and *centerslow to the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector and *indexfast and + *indexslow to the corresponding indices. cbf_set_beam_center sets the + offsets in the axis category for the detector element axis with + precedence 1 to place the beam center at the position given in mm by + *centerfast and *centerslow as the displacements in mm along the + detector axes from pixel (0, 0) to the point at which the beam + intersects the detector at the indices given *indexfast and + *indexslow. cbf_set_reference_beam_center sets the displacments in + the array_structure_list_axis category to place the beam center at + the position given in mm by *centerfast and *centerslow as the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector at the indices given + by *indexfast and *indexslow. In order to achieve consistent results, + a reference detector should be used for detector to have all axes at + their reference settings. + Note that the precedence 1 axis is the fastest axis, so that + *centerfast and *indexfast are the fast axis components of the center + and *centerslow and *indexslow are the slow axis components of the + center. + The _fs calls give the displacments in a fast-to-slow order. The + calls with no suffix and the calls _sf calls give the displacements + in slow-to-fast order + Any of the destination pointers may be NULL for getting the beam + center. For setting the beam axis, either the indices of the center + must not be NULL. + The indices are non-negative for beam centers within the detector + surface, but the center for an axis with a negative increment will be + negative for a beam center within the detector surface. + For cbf_set_beam_center if the diffrn_data_frame category exists with + a row for the corresponding element id, the values will be set for + _diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in + millimetres and the value of _diffrn_data_frame.center_units will be + set to 'mm'. + For cbf_set_reference_beam_center if the diffrn_detector_element + category exists with a row for the corresponding element id, the + values will be set for _diffrn_detector_element.reference_center_fast + and _diffrn_detector_element.reference_center_slow in millimetres and + the value of _diffrn_detector_element.reference_units will be set to + 'mm'. + ARGUMENTS + detector Detector handle. indexfast Pointer to the destination + fast index. indexslow Pointer to the destination slow index. + centerfast Pointer to the destination displacement along the fast + axis. centerslow Pointer to the destination displacement along the + slow axis. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_get_beam_center_fs(self) + + def get_inferred_pixel_size_sf(self, axis_number): + r""" + + Returns : Float pixel size + *args : Int axis_number + + C prototype: int cbf_get_inferred_pixel_size_sf(cbf_detector detector, + int axis_number, double *psize); + + CBFLib documentation: + DESCRIPTION + cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_sf set + *psize to point to the double value in millimeters of the pixel size + for the axis axis_number value. The slow index is treated as axis 1 + and the next faster index is treated as axis 2. + cbf_get_inferred_pixel_size_fs sets *psize to point to the double + value in millimeters of the pixel size for the axis axis_number + value. The fast index is treated as axis 1 and the next slower index + is treated as axis 2. + If the axis number is negative, the axes are used in the reverse + order so that an axis_number of -1 indicates the fast axes in a call + to cbf_get_inferred_pixel_size or cbf_get_inferred_pixel_size_sf and + indicates the fast axis in a call to cbf_get_inferred_pixel_size_fs. + ARGUMENTS + detector Detector handle. axis_number The number of the axis. + psize Pointer to the destination pizel size in mm. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_get_inferred_pixel_size_sf(self, axis_number) + + def get_pixel_coordinates(self, index1, index2): + r""" + + Returns : double coordinate1,double coordinate2,double coordinate3 + *args : double index1,double index2 + + C prototype: int cbf_get_pixel_coordinates (cbf_detector detector, + double indexslow, double indexfast, double *coordinate1, + double *coordinate2, double *coordinate3); + + CBFLib documentation: + DESCRIPTION + cbf_get_pixel_coordinates, cbf_get_pixel_coordinates_fs and + cbf_get_pixel_coordinates_sf ses *coordinate1, *coordinate2, and + *coordinate3 to the vector position of pixel (indexfast, indexslow) + on the detector surface. If indexslow and indexfast are integers then + the coordinates correspond to the center of a pixel. + Any of the destination pointers may be NULL. + ARGUMENTS + detector Detector handle. indexslow Slow index. indexfast + Fast index. coordinate1 Pointer to the destination x component. + coordinate2 Pointer to the destination y component. coordinate3 + Pointer to the destination z component. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_get_pixel_coordinates(self, index1, index2) + + def get_beam_center_sf(self): + r""" + + Returns : double indexslow,double indexfast,double centerslow,double centerfast + *args : + + C prototype: int cbf_get_beam_center_sf (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, + double *centerfast); + + CBFLib documentation: + DESCRIPTION + cbf_get_beam_center sets *centerfast and *centerslow to the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector and *indexfast and + *indexslow to the corresponding indices. cbf_set_beam_center sets the + offsets in the axis category for the detector element axis with + precedence 1 to place the beam center at the position given in mm by + *centerfast and *centerslow as the displacements in mm along the + detector axes from pixel (0, 0) to the point at which the beam + intersects the detector at the indices given *indexfast and + *indexslow. cbf_set_reference_beam_center sets the displacments in + the array_structure_list_axis category to place the beam center at + the position given in mm by *centerfast and *centerslow as the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector at the indices given + by *indexfast and *indexslow. In order to achieve consistent results, + a reference detector should be used for detector to have all axes at + their reference settings. + Note that the precedence 1 axis is the fastest axis, so that + *centerfast and *indexfast are the fast axis components of the center + and *centerslow and *indexslow are the slow axis components of the + center. + The _fs calls give the displacments in a fast-to-slow order. The + calls with no suffix and the calls _sf calls give the displacements + in slow-to-fast order + Any of the destination pointers may be NULL for getting the beam + center. For setting the beam axis, either the indices of the center + must not be NULL. + The indices are non-negative for beam centers within the detector + surface, but the center for an axis with a negative increment will be + negative for a beam center within the detector surface. + For cbf_set_beam_center if the diffrn_data_frame category exists with + a row for the corresponding element id, the values will be set for + _diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in + millimetres and the value of _diffrn_data_frame.center_units will be + set to 'mm'. + For cbf_set_reference_beam_center if the diffrn_detector_element + category exists with a row for the corresponding element id, the + values will be set for _diffrn_detector_element.reference_center_fast + and _diffrn_detector_element.reference_center_slow in millimetres and + the value of _diffrn_detector_element.reference_units will be set to + 'mm'. + ARGUMENTS + detector Detector handle. indexfast Pointer to the destination + fast index. indexslow Pointer to the destination slow index. + centerfast Pointer to the destination displacement along the fast + axis. centerslow Pointer to the destination displacement along the + slow axis. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_get_beam_center_sf(self) + + def get_pixel_area_sf(self, indexslow, indexfast): + r""" + + Returns : double area,double projected_area + *args : double indexslow,double indexfast + + C prototype: int cbf_get_pixel_area_sf(cbf_detector detector, + double indexslow, double indexfast, double *area, + double *projected_area); + + CBFLib documentation: + DESCRIPTION + cbf_get_pixel_area, cbf_get_pixel_area_fs and cbf_get_pixel_area_sf + set *area to the area of the pixel at (indexfast, indexslow) on the + detector surface and *projected_area to the apparent area of the + pixel as viewed from the sample position, with indexslow being the + slow axis and indexfast being the fast axis. + Either of the destination pointers may be NULL. + ARGUMENTS + detector Detector handle. indexfast Fast index. + indexslow Slow index. area Pointer to the + destination area in mm2. projected_area Pointer to the destination + apparent area in mm2. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_get_pixel_area_sf(self, indexslow, indexfast) + + def set_reference_beam_center_sf(self): + r""" + + Returns : + *args : double indexslow,double indexfast,double centerslow,double centerfast + + C prototype: int cbf_set_reference_beam_center_sf (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, + double *centerfast); + + CBFLib documentation: + DESCRIPTION + cbf_get_beam_center sets *centerfast and *centerslow to the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector and *indexfast and + *indexslow to the corresponding indices. cbf_set_beam_center sets the + offsets in the axis category for the detector element axis with + precedence 1 to place the beam center at the position given in mm by + *centerfast and *centerslow as the displacements in mm along the + detector axes from pixel (0, 0) to the point at which the beam + intersects the detector at the indices given *indexfast and + *indexslow. cbf_set_reference_beam_center sets the displacments in + the array_structure_list_axis category to place the beam center at + the position given in mm by *centerfast and *centerslow as the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector at the indices given + by *indexfast and *indexslow. In order to achieve consistent results, + a reference detector should be used for detector to have all axes at + their reference settings. + Note that the precedence 1 axis is the fastest axis, so that + *centerfast and *indexfast are the fast axis components of the center + and *centerslow and *indexslow are the slow axis components of the + center. + The _fs calls give the displacments in a fast-to-slow order. The + calls with no suffix and the calls _sf calls give the displacements + in slow-to-fast order + Any of the destination pointers may be NULL for getting the beam + center. For setting the beam axis, either the indices of the center + must not be NULL. + The indices are non-negative for beam centers within the detector + surface, but the center for an axis with a negative increment will be + negative for a beam center within the detector surface. + For cbf_set_beam_center if the diffrn_data_frame category exists with + a row for the corresponding element id, the values will be set for + _diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in + millimetres and the value of _diffrn_data_frame.center_units will be + set to 'mm'. + For cbf_set_reference_beam_center if the diffrn_detector_element + category exists with a row for the corresponding element id, the + values will be set for _diffrn_detector_element.reference_center_fast + and _diffrn_detector_element.reference_center_slow in millimetres and + the value of _diffrn_detector_element.reference_units will be set to + 'mm'. + ARGUMENTS + detector Detector handle. indexfast Pointer to the destination + fast index. indexslow Pointer to the destination slow index. + centerfast Pointer to the destination displacement along the fast + axis. centerslow Pointer to the destination displacement along the + slow axis. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_set_reference_beam_center_sf(self) + + def set_beam_center_sf(self): + r""" + + Returns : + *args : double indexslow,double indexfast,double centerslow,double centerfast + + C prototype: int cbf_set_beam_center_sf (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, + double *centerfast); + + CBFLib documentation: + DESCRIPTION + cbf_get_beam_center sets *centerfast and *centerslow to the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector and *indexfast and + *indexslow to the corresponding indices. cbf_set_beam_center sets the + offsets in the axis category for the detector element axis with + precedence 1 to place the beam center at the position given in mm by + *centerfast and *centerslow as the displacements in mm along the + detector axes from pixel (0, 0) to the point at which the beam + intersects the detector at the indices given *indexfast and + *indexslow. cbf_set_reference_beam_center sets the displacments in + the array_structure_list_axis category to place the beam center at + the position given in mm by *centerfast and *centerslow as the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector at the indices given + by *indexfast and *indexslow. In order to achieve consistent results, + a reference detector should be used for detector to have all axes at + their reference settings. + Note that the precedence 1 axis is the fastest axis, so that + *centerfast and *indexfast are the fast axis components of the center + and *centerslow and *indexslow are the slow axis components of the + center. + The _fs calls give the displacments in a fast-to-slow order. The + calls with no suffix and the calls _sf calls give the displacements + in slow-to-fast order + Any of the destination pointers may be NULL for getting the beam + center. For setting the beam axis, either the indices of the center + must not be NULL. + The indices are non-negative for beam centers within the detector + surface, but the center for an axis with a negative increment will be + negative for a beam center within the detector surface. + For cbf_set_beam_center if the diffrn_data_frame category exists with + a row for the corresponding element id, the values will be set for + _diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in + millimetres and the value of _diffrn_data_frame.center_units will be + set to 'mm'. + For cbf_set_reference_beam_center if the diffrn_detector_element + category exists with a row for the corresponding element id, the + values will be set for _diffrn_detector_element.reference_center_fast + and _diffrn_detector_element.reference_center_slow in millimetres and + the value of _diffrn_detector_element.reference_units will be set to + 'mm'. + ARGUMENTS + detector Detector handle. indexfast Pointer to the destination + fast index. indexslow Pointer to the destination slow index. + centerfast Pointer to the destination displacement along the fast + axis. centerslow Pointer to the destination displacement along the + slow axis. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_set_beam_center_sf(self) + + def get_pixel_normal(self, index1, index2): + r""" + + Returns : double normal1,double normal2,double normal3 + *args : double index1,double index2 + + C prototype: int cbf_get_pixel_normal (cbf_detector detector, + double indexslow, double indexfast, double *normal1, + double *normal2, double *normal3); + + CBFLib documentation: + DESCRIPTION + cbf_get_detector_normal, cbf_get_pixel_normal_fs and + cbf_get_pixel_normal_sf set *normal1, *normal2, and *normal3 to the 3 + components of the of the normal vector to the pixel at (indexfast, + indexslow). The vector is normalized. + Any of the destination pointers may be NULL. + ARGUMENTS + detector Detector handle. indexslow Slow index. indexfast Fast + index. normal1 Pointer to the destination x component of the + normal vector. normal2 Pointer to the destination y component of + the normal vector. normal3 Pointer to the destination z component + of the normal vector. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_detector_struct_get_pixel_normal(self, index1, index2) + +# Register cbf_detector_struct in _pycbf: +_py2cbf.cbf_detector_struct_swigregister(cbf_detector_struct) + +CBF_UNDEFNODE = _py2cbf.CBF_UNDEFNODE + +CBF_LINK = _py2cbf.CBF_LINK + +CBF_ROOT = _py2cbf.CBF_ROOT + +CBF_DATABLOCK = _py2cbf.CBF_DATABLOCK + +CBF_SAVEFRAME = _py2cbf.CBF_SAVEFRAME + +CBF_CATEGORY = _py2cbf.CBF_CATEGORY + +CBF_COLUMN = _py2cbf.CBF_COLUMN + +class cbf_handle_struct(object): + r"""Proxy of C cbf_handle_struct struct.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + node = property(_py2cbf.cbf_handle_struct_node_get, _py2cbf.cbf_handle_struct_node_set, doc=r"""node : p.cbf_node""") + row = property(_py2cbf.cbf_handle_struct_row_get, _py2cbf.cbf_handle_struct_row_set, doc=r"""row : int""") + search_row = property(_py2cbf.cbf_handle_struct_search_row_get, _py2cbf.cbf_handle_struct_search_row_set, doc=r"""search_row : int""") + + def __init__(self): + r"""__init__(cbf_handle_struct self) -> cbf_handle_struct""" + _py2cbf.cbf_handle_struct_swiginit(self, _py2cbf.new_cbf_handle_struct()) + __swig_destroy__ = _py2cbf.delete_cbf_handle_struct + + def select_datablock(self, arg): + r""" + + Returns : + *args : Integer + + C prototype: int cbf_select_datablock (cbf_handle handle, + unsigned int datablock); + + CBFLib documentation: + DESCRIPTION + cbf_select_datablock selects data block number datablock as the + current data block. + The first data block is number 0. + If the data block does not exist, the function returns CBF_NOTFOUND. + ARGUMENTS + handle CBF handle. datablock Number of the data block to + select. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_select_datablock(self, arg) + + def force_new_datablock(self, arg): + r""" + + Returns : string + *args : + + C prototype: int cbf_force_new_datablock (cbf_handle handle, + const char *datablockname); + + CBFLib documentation: + DESCRIPTION + cbf_force_new_datablock creates a new data block with name + datablockname and makes it the current data block. Duplicate data + block names are allowed. cbf_force_new_saveframe creates a new savew + frame with name saveframename and makes it the current save frame. + Duplicate save frame names are allowed. + Even if a save frame with this name already exists, a new save frame + is created and becomes the current save frame. + ARGUMENTS + handle CBF handle. datablockname The name of the new data + block. saveframename The name of the new save frame. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_force_new_datablock(self, arg) + + def get_3d_image_fs_as_string(self, element_number, elsize, elsign, ndimfast, ndimmid, ndimslow): + r""" + + Returns : (Binary)String + *args : int element_number,int elsize,int elsign,int ndimfast,int ndimmid, + int ndimslow + + C prototype: int cbf_get_3d_image_fs (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + void *array, size_t elsize, int elsign, size_t ndimfast, + size_t ndimmid, size_t ndimslow); + + CBFLib documentation: + DESCRIPTION + cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image + array for element number element_number into an array. The array + consists of ndimslow×ndimfast elements of elsize bytes each, + starting at array. The elements are signed if elsign is non-0 and + unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and + cbf_get_real_image_sf read the image array of IEEE doubles or floats + for element number element_number into an array. A real array is + always signed. cbf_get_3d_image, cbf_get_3d_image_fs and + cbf_get_3d_image_sf read the 3D image array for element number + element_number into an array. The array consists of + ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting + at array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or + floats for element number element_number into an array. A real array + is always signed. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + The structure of the array as a 1-, 2- or 3-dimensional array should + agree with the structure of the array given in the + ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, + ndimslow should be the array size and ndimfast and, for the 3D calls, + ndimmid, should be set to 1 both in the call and in the imgCIF data + being processed. If the array is 2-dimensional and a 3D call is used, + ndimslow and ndimmid should be the + + """ + return _py2cbf.cbf_handle_struct_get_3d_image_fs_as_string(self, element_number, elsize, elsign, ndimfast, ndimmid, ndimslow) + + def reset_datablocks(self): + r""" + + Returns : + *args : + + C prototype: int cbf_reset_datablocks (cbf_handle handle); + + CBFLib documentation: + DESCRIPTION + cbf_reset_datablocks deletes all categories from all data blocks. + The current data block does not change. + ARGUMENTS + handle CBF handle. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_reset_datablocks(self) + + def set_tag_category(self, tagname, categoryname_in): + r""" + + Returns : + *args : String tagname,String categoryname_in + + C prototype: int cbf_set_tag_category (cbf_handle handle, const char* tagname, + const char* categoryname_in); + + CBFLib documentation: + DESCRIPTION + cbf_find_tag_category sets categoryname to the category associated + with tagname in the dictionary associated with handle. + cbf_set_tag_category upddates the dictionary associated with handle + to indicated that tagname is in category categoryname_in. + ARGUMENTS + handle CBF handle. tagname tag name. + categoryname pointer to a returned category name. + categoryname_in input category name. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_tag_category(self, tagname, categoryname_in) + + def require_tag_root(self, tagname): + r""" + + Returns : String tagroot + *args : String tagname + + C prototype: int cbf_require_tag_root (cbf_handle handle, const char* tagname, + const char** tagroot); + + CBFLib documentation: + DESCRIPTION + cbf_find_tag_root sets *tagroot to the root tag of which tagname is + an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in + the dictionary associated with handle, creating the dictionary if + necessary. cbf_require_tag_root sets *tagroot to the root tag of + which tagname is an alias, if there is one, or to the value of + tagname, if tagname is not an alias. + A returned tagroot string must not be modified in any way. + ARGUMENTS + handle CBF handle. tagname tag name which may be an alias. + tagroot pointer to a returned tag root name. tagroot_in input + tag root name. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_require_tag_root(self, tagname) + + def row_number(self): + r""" + + Returns : Integer + *args : + + C prototype: int cbf_row_number (cbf_handle handle, unsigned int *row); + + CBFLib documentation: + DESCRIPTION + cbf_row_number sets *row to the number of the current row of the + current category. + ARGUMENTS + handle CBF handle. row Pointer to the destination row number. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_row_number(self) + + def set_image(self, element_number, compression, data, elsize, elsign, ndimslow, ndimfast): + r""" + + Returns : + *args : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimslow,int dimfast + + C prototype: int cbf_set_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array, size_t elsize, int elsign, size_t ndimslow, + size_t ndimfast); + + CBFLib documentation: + DESCRIPTION + cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image + array for element number element_number. The array consists of + ndimfast×ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-zero and unsigned otherwise. + cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf + write the image array for element number element_number. The array + consists of ndimfast×ndimslow IEEE double or float elements of + elsize bytes each, starting at array. cbf_set_3d_image, + cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array + for element number element_number. The array consists of + ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting + at array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and + cbf_set_real_3d_image_sf writes the 3D image array for element number + element_number. The array consists of ndimfast×ndimmid×ndimslow + IEEE double or float elements of elsize bytes each, starting at + array. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + If the array is 1-dimensional, ndimslow should be the array size and + ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the + array is 2-dimensional and the 3D calls are used, ndimslow and + ndimmid should be used for the array dimensions and ndimfast should + be set to 1. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for + cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof + (int), sizeof(double) or sizeof(float), the function returns + CBF_ARGUMENT. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any value other + than 0 is invalid. element_number The number of the detector + element counting from 0 by order of appearance in the + "diffrn_data_frame " category. compression Compression type. + array Pointer to the image array. elsize Size in + bytes of each image array element. elsigned Set to non-0 if + the image array elements are signed. ndimslow Slowest array + dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_image(self, element_number, compression, data, elsize, elsign, ndimslow, ndimfast) + + def set_bin_sizes(self, element_number, slowbinsize_in, fastbinsize_in): + r""" + + Returns : + *args : Integer element_number,Float slowbinsize_in,Float fastbinsize_in + + C prototype: int cbf_set_bin_sizes(cbf_handle handle, + unsigned int element_number, double slowbinsize_in, + double fastbinsize_in); + + CBFLib documentation: + DESCRIPTION + cbf_get_bin_sizes sets slowbinsize to point to the value of the + number of pixels composing one array element in the dimension that + changes at the second-fastest rate and fastbinsize to point to the + value of the number of pixels composing one array element in the + dimension that changes at the fastest rate for the dectector element + with the ordinal element_number. cbf_set_bin_sizes sets the the pixel + bin sizes in the "array_intensities " category to the values of + slowbinsize_in for the number of pixels composing one array element + in the dimension that changes at the second-fastest rate and + fastbinsize_in for the number of pixels composing one array element + in the dimension that changes at the fastest rate for the dectector + element with the ordinal element_number. + In order to allow for software binning involving fractions of pixels, + the bin sizes are doubles rather than ints. + ARGUMENTS + handle CBF handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. slowbinsize Pointer to the + returned number of pixels composing one array element in the + dimension that changes at the second-fastest rate. fastbinsize + Pointer to the returned number of pixels composing one array element + in the dimension that changes at the fastest rate. slowbinsize_in + The number of pixels composing one array element in the dimension + that changes at the second-fastest rate. fastbinsize_in The number + of pixels composing one array element in the dimension that changes + at the fastest rate. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_bin_sizes(self, element_number, slowbinsize_in, fastbinsize_in) + + def new_row(self): + r""" + + Returns : + *args : + + C prototype: int cbf_new_row (cbf_handle handle); + + CBFLib documentation: + DESCRIPTION + cbf_new_row adds a new row to the current category and makes it the + current row. + ARGUMENTS + handle CBF handle. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_new_row(self) + + def rewind_saveframe(self): + r""" + + Returns : + *args : + + C prototype: int cbf_rewind_saveframe (cbf_handle handle); + + CBFLib documentation: + DESCRIPTION + cbf_rewind_category makes the first category in the current data + block the current category. cbf_rewind_saveframe makes the first + saveframe in the current data block the current saveframe. + cbf_rewind_blockitem makes the first blockitem (category or + saveframe) in the current data block the current blockitem. The type + of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type. + If there are no categories, saveframes or blockitems the function + returns CBF_NOTFOUND. + The current column and row become undefined. + ARGUMENTS + handle CBF handle. type CBF handle. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_rewind_saveframe(self) + + def get_realarrayparameters(self): + r""" + + Returns : int compression,int binary_id,int elsize,int elements + *args : + + C prototype: int cbf_get_realarrayparameters (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + size_t *elements); + + CBFLib documentation: + DESCRIPTION + cbf_get_integerarrayparameters sets *compression, *binary_id, + *elsize, *elsigned, *elunsigned, *elements, *minelement and + *maxelement to values read from the binary value of the item at the + current column and row. This provides all the arguments needed for a + subsequent call to cbf_set_integerarray, if a copy of the array is to + be made into another CIF or CBF. cbf_get_realarrayparameters sets + *compression, *binary_id, *elsize, *elements to values read from the + binary value of the item at the current column and row. This provides + all the arguments needed for a subsequent call to cbf_set_realarray, + if a copy of the arry is to be made into another CIF or CBF. + The variants cbf_get_integerarrayparameters_wdims, + cbf_get_integerarrayparameters_wdims_fs, + cbf_get_integerarrayparameters_wdims_sf, + cbf_get_realarrayparameters_wdims, + cbf_get_realarrayparameters_wdims_fs, + cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, + *dimmid, *dimslow, and *padding as well, providing the additional + parameters needed for a subsequent call to cbf_set_integerarray_wdims + or cbf_set_realarray_wdims. + The value returned in *byteorder is a pointer either to the string + "little_endian " or to the string "big_endian ". This should be + the byte order of the data, not necessarily of the host machine. No + attempt should be made to modify this string. At this time only + "little_endian " will be returned. + The values returned in *dimfast, *dimmid and *dimslow are the sizes + of the fastest changing, second fastest changing and third fastest + changing dimensions of the array, if specified, or zero, if not + specified. + The value returned in *padding is the size of the post-data padding, + if any and if specified in the data header. The value is given as a + count of octets. + If the value is not binary, the function returns CBF_ASCII. + ARGUMENTS + handle CBF handle. compression Compression method used. + elsize Size in bytes of each array element. binary_id + Pointer to the destination integer binary identifier. elsigned + Pointer to an integer. Set to 1 if the elements can be read as signed + integers. elunsigned Pointer to an integer. Set to 1 if the + elements can be read as unsigned integers. elements Pointer to + the destination number of elements. minelement Pointer to the + destination smallest element. maxelement Pointer to the + destination largest element. byteorder Pointer to the destination + byte order. dimfast Pointer to the destination fastest + dimension. dimmid Pointer to the destination second fastest + dimension. dimslow Pointer to the destination third fastest + dimension. padding Pointer to the destination padding size. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_get_realarrayparameters(self) + + def get_pixel_size_sf(self, element_number, axis_number): + r""" + + Returns : Float pixel_size + *args : Int element_number,Int axis_number + + C prototype: int cbf_get_pixel_size_sf(cbf_handle handle, + unsigned int element_number, int axis_number, + double *psize); + + CBFLib documentation: + DESCRIPTION + cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to + the double value in millimeters of the axis axis_number of the + detector element element_number. The axis_number is numbered from 1, + starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to + point to the double value in millimeters of the axis axis_number of + the detector element element_number. The axis_number is numbered from + 1, starting with the fastest axis. + If a negative axis number is given, the order of axes is reversed, so + that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the + fastest axis for cbf_get_pixel_size_sf. + If the pixel size is not given explcitly in the "array_element_size + " category, the function returns CBF_NOTFOUND. + ARGUMENTS + handle CBF handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. axis_number The number of the + axis, starting from 1 for the fastest for cbf_get_pixel_size and + cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. + psize Pointer to the destination pixel size. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_pixel_size_sf(self, element_number, axis_number) + + def force_new_category(self, arg): + r""" + + Returns : string + *args : + + C prototype: int cbf_force_new_category (cbf_handle handle, + const char *categoryname); + + CBFLib documentation: + DESCRIPTION + cbf_force_new_category creates a new category in the current data + block with name categoryname and makes it the current category. + Duplicate category names are allowed. + Even if a category with this name already exists, a new category of + the same name is created and becomes the current category. The allows + for the creation of unlooped tag/value lists drawn from the same + category. + ARGUMENTS + handle CBF handle. categoryname The name of the new + category. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_force_new_category(self, arg) + + def force_new_saveframe(self, arg): + r""" + + Returns : string + *args : + + C prototype: int cbf_force_new_saveframe (cbf_handle handle, + const char *saveframename); + + CBFLib documentation: + DESCRIPTION + cbf_force_new_datablock creates a new data block with name + datablockname and makes it the current data block. Duplicate data + block names are allowed. cbf_force_new_saveframe creates a new savew + frame with name saveframename and makes it the current save frame. + Duplicate save frame names are allowed. + Even if a save frame with this name already exists, a new save frame + is created and becomes the current save frame. + ARGUMENTS + handle CBF handle. datablockname The name of the new data + block. saveframename The name of the new save frame. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_force_new_saveframe(self, arg) + + def count_datablocks(self): + r""" + + Returns : Integer + *args : + + C prototype: int cbf_count_datablocks (cbf_handle handle, + unsigned int *datablocks); + + CBFLib documentation: + DESCRIPTION + cbf_count_datablocks puts the number of data blocks in *datablocks . + ARGUMENTS + handle CBF handle. datablocks Pointer to the destination data + block count. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_count_datablocks(self) + + def find_row(self, arg): + r""" + + Returns : string + *args : + + C prototype: int cbf_find_row (cbf_handle handle, const char *value); + + CBFLib documentation: + DESCRIPTION + cbf_find_row makes the first row in the current column with value + value the current row. + The comparison is case-sensitive. + If a matching row does not exist, the function returns CBF_NOTFOUND. + The current column is not affected. + ARGUMENTS + handle CBF handle. value The value of the row to find. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_find_row(self, arg) + + def select_column(self, arg): + r""" + + Returns : + *args : Integer + + C prototype: int cbf_select_column (cbf_handle handle, unsigned int column); + + CBFLib documentation: + DESCRIPTION + cbf_select_column selects column number column in the current + category as the current column. + The first column is number 0. + The current row is not affected + If the column does not exist, the function returns CBF_NOTFOUND. + ARGUMENTS + handle CBF handle. column Number of the column to select. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_select_column(self, arg) + + def construct_detector(self, element_number): + r""" + + Returns : pycbf detector object + *args : Integer element_number + + C prototype: int cbf_construct_detector (cbf_handle handle, + cbf_detector *detector, unsigned int element_number); + + CBFLib documentation: + DESCRIPTION + cbf_construct_detector constructs a detector object for detector + element number element_number using the description in the CBF object + handle and initialises the detector handle *detector. + cbf_construct_reference_detector constructs a detector object for + detector element number element_number using the description in the + CBF object handle and initialises the detector handle *detector using + the reference settings of the axes. cbf_require_reference_detector is + similar, but try to force the creations of missing intermediate + categories needed to construct a detector object. + ARGUMENTS + handle CBF handle. detector Pointer to the + destination detector handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_construct_detector(self, element_number) + + def get_axis_depends_on(self, axis_id): + r""" + + Returns : String + *args : String axis_id + + C prototype: int cbf_get_axis_depends_on (cbf_handle handle, + const char *axis_id, const char * *depends_on); + + CBFLib documentation: + DESCRIPTION + cbf_count_axis_ancestors sets ancestors to the number of ancestors of + axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor + axis of index ancestor_index of axis axis_id, starting with axis_id + for ancestor_index 0. + cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of + axis_id or to ". " if there is no such ancestor. + cbf_get_axis_equipment sets *equipment to the equipment of axis_id or + to ". " if there is no such equipment. + cbf_get_axis_equipment_component sets *equipment_component to the + equipment_component of axis_id or to ". " if there is no such + equipment_component. + cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the + components of the ofset of axis_id. + cbf_get_axis_rotation sets rotation to the rotation of axis_id or to + 0 if there is no such rotation. cbf_get_axis_rotation_axis sets + *rotation_axis to the rotation_axis of axis_id or to ". " if there + is no such rotation_axis. + cbf_get_axis_setting sets *start and *increment to the corresponding + values of the axis axis_id. Any of the destination pointers may be + NULL. + cbf_get_axis_type sets axis_type to the type of axis_id. + cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the + components of the vector of axis_id. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any + value other than 0 is invalid. axis_id Axis id. + ancestor_index Integer index of the desired ancestor, starting + with 0 for the current axis_id. ancestor Pointer to + destination ancestor name pointer. depends_on Pointer to + destination depends_on name pointer. equipment Pointer to + destination equipment name pointer. equipment_component Pointer to + destination equipment_component name pointer. offset1 + Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. + rotation Pointer to destination rotation value. + rotation_axis Pointer to destination rotation_axisn name + pointer. start Pointer to the destination start + value. increment Pointer to the destination increment + value. type Pointer to destination axis type of type + . vector1 Pointer to destination first vector component + value. vector2 Pointer to destination second vector + component value. vector3 Pointer to destination third + vector component value. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_axis_depends_on(self, axis_id) + + def rewind_column(self): + r""" + + Returns : + *args : + + C prototype: int cbf_rewind_column (cbf_handle handle); + + CBFLib documentation: + DESCRIPTION + cbf_rewind_column makes the first column in the current category the + current column. + If there are no columns, the function returns CBF_NOTFOUND. + The current row is not affected. + ARGUMENTS + handle CBF handle. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_rewind_column(self) + + def construct_reference_positioner(self, axis_id): + r""" + + Returns : pycbf positioner object + *args : String axis_id + + C prototype: int cbf_construct_reference_positioner (cbf_handle handle, + cbf_positioner *positioner, const char *axis_id); + + CBFLib documentation: + DESCRIPTION + cbf_construct_positioner constructs a positioner object for the axis + given by axis_id using the description in the CBF object handle and + initialises the positioner handle *positioner. + cbf_construct_reference positioner constructs a positioner object for + the axis given by axis_id using the description in the CBF object + handle and initialises the detector handle *detector using the + reference settings of the axes. + ARGUMENTS + handle CBF handle. positioner Pointer to the destination + positioner handle. axis_id The identifier of the axis in the + "axis " category. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_construct_reference_positioner(self, axis_id) + + def require_column_doublevalue(self, columnname, defaultvalue): + r""" + + Returns : Float defaultvalue + *args : String columnname,Float Value + + C prototype: int cbf_require_column_doublevalue (cbf_handle handle, + const char *columnname, double *number, + const double defaultvalue); + + CBFLib documentation: + DESCRIPTION + cbf_require_column_doublevalue sets *number to the value of the ASCII + item at the current row for the column given with the name given by + *columnname, with the value interpreted as a decimal floating-point + number, or to the number given by defaultvalue if the item cannot be + found. + ARGUMENTS + handle CBF handle. columnname Name of the column + containing the number. number pointer to the location to + receive the floating-point value. defaultvalue Value to use if the + requested column and value cannot be found. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_require_column_doublevalue(self, columnname, defaultvalue) + + def get_datestamp(self): + r""" + + Returns : int year,int month,int day,int hour,int minute,double second, + int timezone + *args : + + C prototype: int cbf_get_datestamp (cbf_handle handle, unsigned int reserved, + int *year, int *month, int *day, int *hour, int *minute, + double *second, int *timezone); + + CBFLib documentation: + DESCRIPTION + cbf_get_datestamp sets *year, *month, *day, *hour, *minute and + *second to the corresponding values of the collection timestamp. + *timezone is set to timezone difference from UTC in minutes. The + parameter < i>reserved is presently unused and should be set to 0. + Any of the destination pointers may be NULL. + ARGUMENTS + handle CBF handle. reserved Unused. Any value other than 0 is + invalid. year Pointer to the destination timestamp year. month + Pointer to the destination timestamp month (1-12). day + Pointer to the destination timestamp day (1-31). hour Pointer + to the destination timestamp hour (0-23). minute Pointer to the + destination timestamp minute (0-59). second Pointer to the + destination timestamp second (0-60.0). timezone Pointer to the + destination timezone difference from UTC in minutes. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_datestamp(self) + + def get_integervalue(self): + r""" + + Returns : int + *args : + + C prototype: int cbf_get_integervalue (cbf_handle handle, int *number); + + CBFLib documentation: + DESCRIPTION + cbf_get_integervalue sets *number to the value of the ASCII item at + the current column and row interpreted as a decimal integer. + cbf_require_integervalue sets *number to the value of the ASCII item + at the current column and row interpreted as a decimal integer, + setting it to defaultvalue if necessary. + If the value is not ASCII, the function returns CBF_BINARY. + ARGUMENTS + handle CBF handle. number pointer to the number. + defaultvalue default number value. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_get_integervalue(self) + + def get_crystal_id(self): + r""" + + Returns : + *args : string + + C prototype: int cbf_get_crystal_id (cbf_handle handle, + const char **crystal_id); + + CBFLib documentation: + DESCRIPTION + cbf_get_crystal_id sets *crystal_id to point to the ASCII value of + the "diffrn.crystal_id " entry. + If the value is not ASCII, the function returns CBF_BINARY. + The value will be valid as long as the item exists and has not been + set to a new value. + The value must not be modified by the program in any way. + ARGUMENTS + handle CBF handle. crystal_id Pointer to the destination + value pointer. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_crystal_id(self) + + def get_doublevalue(self): + r""" + + Returns : double + *args : + + C prototype: int cbf_get_doublevalue (cbf_handle handle, double *number); + + CBFLib documentation: + DESCRIPTION + cbf_get_doublevalue sets *number to the value of the ASCII item at + the current column and row interpreted as a decimal floating-point + number. cbf_require_doublevalue sets *number to the value of the + ASCII item at the current column and row interpreted as a decimal + floating-point number, setting it to defaultvalue if necessary. + If the value is not ASCII, the function returns CBF_BINARY. + ARGUMENTS + handle CBF handle. number Pointer to the destination + number. defaultvalue default number value. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_get_doublevalue(self) + + def get_unit_cell(self): + r""" + + Returns : Float a,Float b,Float c,Float alpha,Float beta,Float gamma + *args : + + C prototype: int cbf_get_unit_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); + + CBFLib documentation: + DESCRIPTION + cbf_get_unit_cell sets cell[0:2] to the double values of the cell + edge lengths a, b and c in Ångstroms, cell[3:5] to the double values + of the cell angles α, β and γ in degrees, cell_esd[0:2] to the + double values of the estimated strandard deviations of the cell edge + lengths a, b and c in Ångstroms, cell_esd[3:5] to the double values + of the estimated standard deviations of the the cell angles α, β + and γ in degrees. + The values returned are retrieved from the first row of the "cell + " category. The value of "_cell.entry_id " is ignored. + cell or cell_esd may be NULL. + If cell is NULL, the cell parameters are not retrieved. + If cell_esd is NULL, the cell parameter esds are not retrieved. + If the "cell " category is present, but some of the values are + missing, zeros are returned for the missing values. + ARGUMENTS + handle CBF handle. cell Pointer to the destination array of + 6 doubles for the cell parameters. cell_esd Pointer to the + destination array of 6 doubles for the cell parameter esds. + RETURN VALUE + Returns an error code on failure or 0 for success. No errors is + returned for missing values if the "cell " category exists. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_get_unit_cell(self) + + def get_unit_cell_esd(self): + r"""get_unit_cell_esd(cbf_handle_struct self)""" + return _py2cbf.cbf_handle_struct_get_unit_cell_esd(self) + + def get_axis_type(self, axis_id): + r""" + + Returns : String + *args : String axis_id + + C prototype: int cbf_get_axis_type (cbf_handle handle, const char *axis_id, + cbf_axis_type *axis_type); + + CBFLib documentation: + DESCRIPTION + cbf_count_axis_ancestors sets ancestors to the number of ancestors of + axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor + axis of index ancestor_index of axis axis_id, starting with axis_id + for ancestor_index 0. + cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of + axis_id or to ". " if there is no such ancestor. + cbf_get_axis_equipment sets *equipment to the equipment of axis_id or + to ". " if there is no such equipment. + cbf_get_axis_equipment_component sets *equipment_component to the + equipment_component of axis_id or to ". " if there is no such + equipment_component. + cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the + components of the ofset of axis_id. + cbf_get_axis_rotation sets rotation to the rotation of axis_id or to + 0 if there is no such rotation. cbf_get_axis_rotation_axis sets + *rotation_axis to the rotation_axis of axis_id or to ". " if there + is no such rotation_axis. + cbf_get_axis_setting sets *start and *increment to the corresponding + values of the axis axis_id. Any of the destination pointers may be + NULL. + cbf_get_axis_type sets axis_type to the type of axis_id. + cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the + components of the vector of axis_id. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any + value other than 0 is invalid. axis_id Axis id. + ancestor_index Integer index of the desired ancestor, starting + with 0 for the current axis_id. ancestor Pointer to + destination ancestor name pointer. depends_on Pointer to + destination depends_on name pointer. equipment Pointer to + destination equipment name pointer. equipment_component Pointer to + destination equipment_component name pointer. offset1 + Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. + rotation Pointer to destination rotation value. + rotation_axis Pointer to destination rotation_axisn name + pointer. start Pointer to the destination start + value. increment Pointer to the destination increment + value. type Pointer to destination axis type of type + . vector1 Pointer to destination first vector component + value. vector2 Pointer to destination second vector + component value. vector3 Pointer to destination third + vector component value. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_axis_type(self, axis_id) + + def remove_column(self): + r""" + + Returns : + *args : + + C prototype: int cbf_remove_column (cbf_handle handle); + + CBFLib documentation: + DESCRIPTION + cbf_remove_column deletes the current column. + The current column becomes undefined. + ARGUMENTS + handle CBF handle. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_remove_column(self) + + def rewind_blockitem(self): + r""" + + Returns : CBF_NODETYPE + *args : + + C prototype: int cbf_rewind_blockitem (cbf_handle handle, + CBF_NODETYPE * type); + + CBFLib documentation: + DESCRIPTION + cbf_rewind_category makes the first category in the current data + block the current category. cbf_rewind_saveframe makes the first + saveframe in the current data block the current saveframe. + cbf_rewind_blockitem makes the first blockitem (category or + saveframe) in the current data block the current blockitem. The type + of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type. + If there are no categories, saveframes or blockitems the function + returns CBF_NOTFOUND. + The current column and row become undefined. + ARGUMENTS + handle CBF handle. type CBF handle. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_rewind_blockitem(self) + + def get_value(self): + r""" + + Returns : + *args : string + + C prototype: int cbf_get_value (cbf_handle handle, const char **value); + + CBFLib documentation: + DESCRIPTION + cbf_get_value sets *value to point to the ASCII value of the item at + the current column and row. cbf_require_value sets *value to point to + the ASCII value of the item at the current column and row, creating + the data item if necessary and initializing it to a copy of + defaultvalue. + If the value is not ASCII, the function returns CBF_BINARY. + The value will be valid as long as the item exists and has not been + set to a new value. + The value must not be modified by the program in any way. + ARGUMENTS + handle CBF handle. value Pointer to the destination + value pointer. defaultvalue Default value character string. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_get_value(self) + + def count_categories(self): + r""" + + Returns : Integer + *args : + + C prototype: int cbf_count_categories (cbf_handle handle, + unsigned int *categories); + + CBFLib documentation: + DESCRIPTION + cbf_count_categories puts the number of categories in the current + data block in *categories. + ARGUMENTS + handle CBF handle. categories Pointer to the destination + category count. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_count_categories(self) + + def read_widefile(self, filename, headers): + r""" + + Returns : + *args : String filename,Integer headers + + C prototype: int cbf_read_widefile (cbf_handle handle, FILE *file, int flags); + + CBFLib documentation: + DESCRIPTION + cbf_read_file reads the CBF or CIF file file into the CBF object + specified by handle, using the CIF 1.0 convention of 80 character + lines. cbf_read_widefile reads the CBF or CIF file file into the CBF + object specified by handle, using the CIF 1.1 convention of 2048 + character lines. A warning is issued to stderr for ascii lines over + the limit. No test is performed on binary sections. + Validation is performed in three ways levels: during the lexical + scan, during the parse, and, if a dictionary was converted, against + the value types, value enumerations, categories and parent-child + relationships specified in the dictionary. + flags controls the interpretation of binary section headers, the + parsing of brackets constructs and the parsing of treble-quoted + strings. + MSG_DIGEST: Instructs CBFlib to check that the digest + of the binary section matches any header digest value. If the digests + do not match, the call will return CBF_FORMAT. This evaluation and + comparison is delayed (a "lazy " evaluation) to ensure maximal + processing efficiency. If an immediately evaluation is required, see + MSG_DIGESTNOW, below. MSG_DIGESTNOW: Instructs CBFlib to + check that the digest of the binary section matches any header + digeste value. If the digests do not match, the call will return + CBF_FORMAT. This evaluation and comparison is performed during + initial parsing of the section to ensure timely error reporting at + the expense of processing efficiency. If a more efficient delayed ( + "lazy ") evaluation is required, see MSG_DIGEST, above. + MSG_DIGESTWARN: Instructs CBFlib to check that the digest + of the binary section matches any header digeste value. If the + digests do not match, a warning message will be sent to stderr, but + processing will attempt to continue. This evaluation and comparison + is first performed during initial parsing of the section to ensure + timely error reporting at the expense of processing efficiency. An + mismatch of the message digest usually indicates a serious error, but + it is sometimes worth continuing processing to try to isolate the + cause of the error. Use this option with caution. MSG_NODIGEST: + Do not check the digest (default). PARSE_BRACKETS: + Accept DDLm bracket-delimited [item,item,...item] or + {item,item,...item} or (item,item,...item) constructs as valid, + stripping non-quoted embedded whitespace and comments. These + constructs may span multiple lines. PARSE_LIBERAL_BRACKETS: Accept + DDLm bracket-delimited [item,item,...item] or {item,item,...item} or + (item,item,...item) constructs as valid, stripping embedded + non-quoted, non-separating whitespace and comments. These constructs + may span multiple lines. In this case, whitespace may be used as an + alternative to the comma. PARSE_TRIPLE_QUOTES: Accept DDLm + triple-quoted " " "item,item,...item " " " or + '''item,item,...item''' constructs as valid, stripping embedded + whitespace and comments. These constructs may span multiple lines. If + this flag is set, then ''' will not be interpreted as a quoted + apoptrophe and " " " will not be interpreted as a quoted double + quote mark and PARSE_NOBRACKETS: Do not accept DDLm + bracket-delimited [item,item,...item] or {item,item,...item} or + (item,item,...item) constructs as valid, stripping non-quoted + embedded whitespace and comments. These constructs may span multiple + lines. PARSE_NOTRIPLE_QUOTES: No not accept DDLm triple-quoted " + " "item,item,...item " " " or '''item,item,...item''' constructs + as valid, stripping embedded whitespace and comments. These + constructs may span multiple lines. If this flag is set, then ''' + will be interpreted as a quoted apostrophe and " " " will be + interpreted as a quoted double quote mark. + CBFlib defers reading binary sections as long as possible. In the + current version of CBFlib, this means that: + 1. The file must be a random-access file opened in binary mode (fopen + ( , + + """ + return _py2cbf.cbf_handle_struct_read_widefile(self, filename, headers) + + def set_wavelength(self, wavelength): + r""" + + Returns : double wavelength + *args : + + C prototype: int cbf_set_wavelength (cbf_handle handle, double wavelength); + + CBFLib documentation: + DESCRIPTION + cbf_set_wavelength sets the current wavelength in Å to wavelength. + ARGUMENTS + handle CBF handle. wavelength Wavelength in Å. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_wavelength(self, wavelength) + + def get_axis_vector(self, axis_id): + r""" + + Returns : Float vector1,Float vector2,Float vector3 + *args : String axis_id + + C prototype: int cbf_get_axis_vector (cbf_handle handle, const char *axis_id, + double *vector1, double *vector2, double *vector3); + + CBFLib documentation: + DESCRIPTION + cbf_count_axis_ancestors sets ancestors to the number of ancestors of + axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor + axis of index ancestor_index of axis axis_id, starting with axis_id + for ancestor_index 0. + cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of + axis_id or to ". " if there is no such ancestor. + cbf_get_axis_equipment sets *equipment to the equipment of axis_id or + to ". " if there is no such equipment. + cbf_get_axis_equipment_component sets *equipment_component to the + equipment_component of axis_id or to ". " if there is no such + equipment_component. + cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the + components of the ofset of axis_id. + cbf_get_axis_rotation sets rotation to the rotation of axis_id or to + 0 if there is no such rotation. cbf_get_axis_rotation_axis sets + *rotation_axis to the rotation_axis of axis_id or to ". " if there + is no such rotation_axis. + cbf_get_axis_setting sets *start and *increment to the corresponding + values of the axis axis_id. Any of the destination pointers may be + NULL. + cbf_get_axis_type sets axis_type to the type of axis_id. + cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the + components of the vector of axis_id. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any + value other than 0 is invalid. axis_id Axis id. + ancestor_index Integer index of the desired ancestor, starting + with 0 for the current axis_id. ancestor Pointer to + destination ancestor name pointer. depends_on Pointer to + destination depends_on name pointer. equipment Pointer to + destination equipment name pointer. equipment_component Pointer to + destination equipment_component name pointer. offset1 + Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. + rotation Pointer to destination rotation value. + rotation_axis Pointer to destination rotation_axisn name + pointer. start Pointer to the destination start + value. increment Pointer to the destination increment + value. type Pointer to destination axis type of type + . vector1 Pointer to destination first vector component + value. vector2 Pointer to destination second vector + component value. vector3 Pointer to destination third + vector component value. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_axis_vector(self, axis_id) + + def set_pixel_size_sf(self, element_number, axis_number, psize): + r""" + + Returns : + *args : Int element_number,Int axis_number,Float pixel size + + C prototype: int cbf_set_pixel_size_sf(cbf_handle handle, + unsigned int element_number, int axis_number, + double psize); + + CBFLib documentation: + DESCRIPTION + cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the + "size " column of the "array_structure_list " category at the + row which matches axis axis_number of the detector element + element_number converting the double pixel size psize from meters to + millimeters in storing it in the "size " column for the axis + axis_number of the detector element element_number. The axis_number + is numbered from 1, starting with the slowest axis. + cbf_set_pixel_size_fs sets the item in the "size " column of the + "array_structure_list " category at the row which matches axis + axis_number of the detector element element_number converting the + double pixel size psize from meters to millimeters in storing it in + the "size " column for the axis axis_number of the detector + element element_number. The axis_number is numbered from 1, starting + with the fastest axis. + If a negative axis number is given, the order of axes is reversed, so + that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the + fastest axis for cbf_get_pixel_size_sf. + If the "array_structure_list " category does not already exist, it + is created. + If the appropriate row in the "array_structure_list " catgeory + does not already exist, it is created. + If the pixel size is not given explcitly in the "array_element_size + category ", the function returns CBF_NOTFOUND. + ARGUMENTS + handle CBF handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. axis_number The number of the + axis, fastest first, starting from 1. + + """ + return _py2cbf.cbf_handle_struct_set_pixel_size_sf(self, element_number, axis_number, psize) + + def get_diffrn_id(self): + r""" + + Returns : + *args : string + + C prototype: int cbf_get_diffrn_id (cbf_handle handle, + const char **diffrn_id); + + CBFLib documentation: + DESCRIPTION + cbf_get_diffrn_id sets *diffrn_id to point to the ASCII value of the + "diffrn.id " entry. cbf_require_diffrn_id also sets *diffrn_id to + point to the ASCII value of the "diffrn.id " entry, but, if the + "diffrn.id " entry does not exist, it sets the value in the CBF and + in*diffrn_id to the character string given by default_id, creating + the category and column is necessary. + The diffrn_id will be valid as long as the item exists and has not + been set to a new value. + The diffrn_id must not be modified by the program in any way. + ARGUMENTS + handle CBF handle. diffrn_id Pointer to the destination + value pointer. default_id Character string default value. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_diffrn_id(self) + + def get_axis_rotation(self, axis_id): + r""" + + Returns : Float + *args : String axis_id + + C prototype: int cbf_get_axis_rotation (cbf_handle handle, + const char *axis_id, double *rotation); + + CBFLib documentation: + DESCRIPTION + cbf_count_axis_ancestors sets ancestors to the number of ancestors of + axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor + axis of index ancestor_index of axis axis_id, starting with axis_id + for ancestor_index 0. + cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of + axis_id or to ". " if there is no such ancestor. + cbf_get_axis_equipment sets *equipment to the equipment of axis_id or + to ". " if there is no such equipment. + cbf_get_axis_equipment_component sets *equipment_component to the + equipment_component of axis_id or to ". " if there is no such + equipment_component. + cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the + components of the ofset of axis_id. + cbf_get_axis_rotation sets rotation to the rotation of axis_id or to + 0 if there is no such rotation. cbf_get_axis_rotation_axis sets + *rotation_axis to the rotation_axis of axis_id or to ". " if there + is no such rotation_axis. + cbf_get_axis_setting sets *start and *increment to the corresponding + values of the axis axis_id. Any of the destination pointers may be + NULL. + cbf_get_axis_type sets axis_type to the type of axis_id. + cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the + components of the vector of axis_id. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any + value other than 0 is invalid. axis_id Axis id. + ancestor_index Integer index of the desired ancestor, starting + with 0 for the current axis_id. ancestor Pointer to + destination ancestor name pointer. depends_on Pointer to + destination depends_on name pointer. equipment Pointer to + destination equipment name pointer. equipment_component Pointer to + destination equipment_component name pointer. offset1 + Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. + rotation Pointer to destination rotation value. + rotation_axis Pointer to destination rotation_axisn name + pointer. start Pointer to the destination start + value. increment Pointer to the destination increment + value. type Pointer to destination axis type of type + . vector1 Pointer to destination first vector component + value. vector2 Pointer to destination second vector + component value. vector3 Pointer to destination third + vector component value. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_axis_rotation(self, axis_id) + + def find_datablock(self, arg): + r""" + + Returns : string + *args : + + C prototype: int cbf_find_datablock (cbf_handle handle, + const char *datablockname); + + CBFLib documentation: + DESCRIPTION + cbf_find_datablock makes the data block with name datablockname the + current data block. + The comparison is case-insensitive. + If the data block does not exist, the function returns CBF_NOTFOUND. + The current category becomes undefined. + ARGUMENTS + handle CBF handle. datablockname The name of the data + block to find. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_find_datablock(self, arg) + + def get_polarization(self): + r""" + + Returns : float polarizn_source_ratio,float polarizn_source_norm + *args : + + C prototype: int cbf_get_polarization (cbf_handle handle, + double *polarizn_source_ratio, + double *polarizn_source_norm); + + CBFLib documentation: + DESCRIPTION + cbf_get_polarization sets *polarizn_source_ratio and + *polarizn_source_norm to the corresponding source polarization + parameters. + Either destination pointer may be NULL. + ARGUMENTS + handle CBF handle. polarizn_source_ratio Pointer + to the destination polarizn_source_ratio. polarizn_source_norm + Pointer to the destination polarizn_source_norm. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_polarization(self) + + def select_category(self, arg): + r""" + + Returns : + *args : Integer + + C prototype: int cbf_select_category (cbf_handle handle, + unsigned int category); + + CBFLib documentation: + DESCRIPTION + cbf_select_category selects category number category in the current + data block as the current category. + The first category is number 0. + The current column and row become undefined. + If the category does not exist, the function returns CBF_NOTFOUND. + ARGUMENTS + handle CBF handle. category Number of the category to select. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_select_category(self, arg) + + def get_pixel_size_fs(self, element_number, axis_number): + r""" + + Returns : Float pixel_size + *args : Int element_number,Int axis_number + + C prototype: int cbf_get_pixel_size_fs(cbf_handle handle, + unsigned int element_number, int axis_number, + double *psize); + + CBFLib documentation: + DESCRIPTION + cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to + the double value in millimeters of the axis axis_number of the + detector element element_number. The axis_number is numbered from 1, + starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to + point to the double value in millimeters of the axis axis_number of + the detector element element_number. The axis_number is numbered from + 1, starting with the fastest axis. + If a negative axis number is given, the order of axes is reversed, so + that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the + fastest axis for cbf_get_pixel_size_sf. + If the pixel size is not given explcitly in the "array_element_size + " category, the function returns CBF_NOTFOUND. + ARGUMENTS + handle CBF handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. axis_number The number of the + axis, starting from 1 for the fastest for cbf_get_pixel_size and + cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. + psize Pointer to the destination pixel size. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_pixel_size_fs(self, element_number, axis_number) + + def get_axis_poise(self, ratio, axis_id, frame_id): + r""" + + Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2, + Float offset3,Float angle + *args : Float ratio,String axis_id,String frame_id + + C prototype: int cbf_get_axis_poise(cbf_handle handle, double ratio, + double * vector1, double * vector2, double * vector3, + double * offset1, double * offset2, double * offset3, + double * angle, const char * axis_id, + const char * frame_id); + + CBFLib documentation: + DESCRIPTION + cbf_get_axis_poise sets vector1, vector2, vector3 to point to the + components of the axis vector for axis axis_id, offset1, offset2, + offset3 to point to the components of the axis base offset vector for + axis axis_id, and angle to point to the angle of rotation of axis + axis_id after application of the axis settings for frame frame_id, + using ratio, a value between 0 and 1, indicating how far into the + internal motion in the frame to go. If frame_id is the string ". + ", the first frame found is used. If there is more than one frame, + which frame will be found is indeterminate. If frame_id is NULL, the + overall setting for the scan are used, rather than those for any + particular frame. The vector and offset reported are the reference + vector and offset of the axis axis_id transformed by application of + all motions of the axes on which axis_id depends. + cbf_get_goniometer_poise vector1, vector2, vector3 to point to the + components of the axis vector for the goniometer axis, offset1, + offset2, offset3 to point to the components of the axis base offset + vector for the goniometer axis, and angle to point to the angle of + rotation of the goniometer axis after application of all axis + settings in the goniometer deriving the vector, offset and angle from + the resulting matrix. Calculation of the vector is indeterminate if + the angle is zero. + cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point + to the components of the axis vector for axis axis_id, offset1, + offset2, offset3 to point to the components of the axis base offset + vector for axis axis_id unmodified by axis rotations. Any of the + pointers may be specified as NULL. + ARGUMENTS + handle CBF handle. ratio A number between 0 and 1 + indication how far into the frame to go vector1 Pointer to the + first component of the axis vector vector2 Pointer to the second + component of the axis vector vector3 Pointer to the third + component of the axis vector offset1 Pointer to the first + component of the axis offset offset2 Pointer to the second + component of the axis offset offset3 Pointer to the third + component of the axis offset angle Pointer to the rotation + angle axis_id The specified axis frame_id The specified + frame positioner CBF goniometer + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_axis_poise(self, ratio, axis_id, frame_id) + + def read_file(self, filename, headers): + r""" + + Returns : + *args : String filename,Integer headers + + C prototype: int cbf_read_file (cbf_handle handle, FILE *file, int flags); + + CBFLib documentation: + DESCRIPTION + cbf_read_file reads the CBF or CIF file file into the CBF object + specified by handle, using the CIF 1.0 convention of 80 character + lines. cbf_read_widefile reads the CBF or CIF file file into the CBF + object specified by handle, using the CIF 1.1 convention of 2048 + character lines. A warning is issued to stderr for ascii lines over + the limit. No test is performed on binary sections. + Validation is performed in three ways levels: during the lexical + scan, during the parse, and, if a dictionary was converted, against + the value types, value enumerations, categories and parent-child + relationships specified in the dictionary. + flags controls the interpretation of binary section headers, the + parsing of brackets constructs and the parsing of treble-quoted + strings. + MSG_DIGEST: Instructs CBFlib to check that the digest + of the binary section matches any header digest value. If the digests + do not match, the call will return CBF_FORMAT. This evaluation and + comparison is delayed (a "lazy " evaluation) to ensure maximal + processing efficiency. If an immediately evaluation is required, see + MSG_DIGESTNOW, below. MSG_DIGESTNOW: Instructs CBFlib to + check that the digest of the binary section matches any header + digeste value. If the digests do not match, the call will return + CBF_FORMAT. This evaluation and comparison is performed during + initial parsing of the section to ensure timely error reporting at + the expense of processing efficiency. If a more efficient delayed ( + "lazy ") evaluation is required, see MSG_DIGEST, above. + MSG_DIGESTWARN: Instructs CBFlib to check that the digest + of the binary section matches any header digeste value. If the + digests do not match, a warning message will be sent to stderr, but + processing will attempt to continue. This evaluation and comparison + is first performed during initial parsing of the section to ensure + timely error reporting at the expense of processing efficiency. An + mismatch of the message digest usually indicates a serious error, but + it is sometimes worth continuing processing to try to isolate the + cause of the error. Use this option with caution. MSG_NODIGEST: + Do not check the digest (default). PARSE_BRACKETS: + Accept DDLm bracket-delimited [item,item,...item] or + {item,item,...item} or (item,item,...item) constructs as valid, + stripping non-quoted embedded whitespace and comments. These + constructs may span multiple lines. PARSE_LIBERAL_BRACKETS: Accept + DDLm bracket-delimited [item,item,...item] or {item,item,...item} or + (item,item,...item) constructs as valid, stripping embedded + non-quoted, non-separating whitespace and comments. These constructs + may span multiple lines. In this case, whitespace may be used as an + alternative to the comma. PARSE_TRIPLE_QUOTES: Accept DDLm + triple-quoted " " "item,item,...item " " " or + '''item,item,...item''' constructs as valid, stripping embedded + whitespace and comments. These constructs may span multiple lines. If + this flag is set, then ''' will not be interpreted as a quoted + apoptrophe and " " " will not be interpreted as a quoted double + quote mark and PARSE_NOBRACKETS: Do not accept DDLm + bracket-delimited [item,item,...item] or {item,item,...item} or + (item,item,...item) constructs as valid, stripping non-quoted + embedded whitespace and comments. These constructs may span multiple + lines. PARSE_NOTRIPLE_QUOTES: No not accept DDLm triple-quoted " + " "item,item,...item " " " or '''item,item,...item''' constructs + as valid, stripping embedded whitespace and comments. These + constructs may span multiple lines. If this flag is set, then ''' + will be interpreted as a quoted apostrophe and " " " will be + interpreted as a quoted double quote mark. + CBFlib defers reading binary sections as long as possible. In the + current version of CBFlib, this means that: + 1. The file must be a random-access file opened in binary mode (fopen + ( , + + """ + return _py2cbf.cbf_handle_struct_read_file(self, filename, headers) + + def datablock_name(self): + r""" + + Returns : + *args : string + + C prototype: int cbf_datablock_name (cbf_handle handle, + const char **datablockname); + + CBFLib documentation: + DESCRIPTION + cbf_datablock_name sets *datablockname to point to the name of the + current data block. + The data block name will be valid as long as the data block exists + and has not been renamed. + The name must not be modified by the program in any way. + ARGUMENTS + handle CBF handle. datablockname Pointer to the + destination data block name pointer. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_datablock_name(self) + + def set_realarray_wdims(self, compression, binary_id, data, elsize, elements, bo, dimfast, dimmid, dimslow, padding): + r""" + + Returns : + *args : int compression,int binary_id,(binary) String data,int elsize, + int elements,String byteorder,int dimfast,int dimmid,int dimslow, + int padding + + C prototype: int cbf_set_realarray_wdims (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, size_t elements, const char *byteorder, + size_t dimfast, size_t dimmid, size_t dimslow, + size_t padding); + + CBFLib documentation: + DESCRIPTION + cbf_set_integerarray sets the binary value of the item at the current + column and row to an integer array. The array consists of elements + elements of elsize bytes each, starting at array. The elements are + signed if elsigned is non-0 and unsigned otherwise. binary_id is the + binary section identifier. cbf_set_realarray sets the binary value of + the item at the current column and row to an integer array. The array + consists of elements elements of elsize bytes each, starting at + array. binary_id is the binary section identifier. + The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, + cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, + cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants + allow the data header values of byteorder, dimfast, dimmid, dimslow + and padding to be set to the data byte order, the fastest, second + fastest and third fastest array dimensions and the size in byte of + the post data padding to be used. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + NOTE: This scheme is by far the slowest of the four and uses much + more disk space. It is intended for routine use with small arrays + only. With large arrays (like images) it should be used only for + debugging. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned), for cbf_set_integerarray, or IEEE doubles or + floats for cbf_set_realarray. If elsize is not equal to sizeof + (char), sizeof (short) or sizeof (int), the function returns + CBF_ARGUMENT. + ARGUMENTS + handle CBF handle. compression Compression method to use. + binary_id Integer binary identifier. array Pointer to the + source array. elsize Size in bytes of each source array + element. elsigned Set to non-0 if the source array elements are + signed. elements The number of elements in the array + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_set_realarray_wdims(self, compression, binary_id, data, elsize, elements, bo, dimfast, dimmid, dimslow, padding) + + def construct_reference_detector(self, element_number): + r""" + + Returns : pycbf detector object + *args : Integer element_number + + C prototype: int cbf_construct_reference_detector (cbf_handle handle, + cbf_detector *detector, unsigned int element_number); + + CBFLib documentation: + DESCRIPTION + cbf_construct_detector constructs a detector object for detector + element number element_number using the description in the CBF object + handle and initialises the detector handle *detector. + cbf_construct_reference_detector constructs a detector object for + detector element number element_number using the description in the + CBF object handle and initialises the detector handle *detector using + the reference settings of the axes. cbf_require_reference_detector is + similar, but try to force the creations of missing intermediate + categories needed to construct a detector object. + ARGUMENTS + handle CBF handle. detector Pointer to the + destination detector handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_construct_reference_detector(self, element_number) + + def get_real_3d_image_fs_as_string(self, element_number, elsize, ndimfast, ndimmid, ndimslow): + r""" + + Returns : (Binary)String + *args : int element_number,int elsize,int ndimfast,int ndimmid,int ndimslow + + C prototype: int cbf_get_real_3d_image_fs (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + void *array, size_t elsize, size_t ndimfast, + size_t ndimmid, size_t ndimslow); + + CBFLib documentation: + DESCRIPTION + cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image + array for element number element_number into an array. The array + consists of ndimslow×ndimfast elements of elsize bytes each, + starting at array. The elements are signed if elsign is non-0 and + unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and + cbf_get_real_image_sf read the image array of IEEE doubles or floats + for element number element_number into an array. A real array is + always signed. cbf_get_3d_image, cbf_get_3d_image_fs and + cbf_get_3d_image_sf read the 3D image array for element number + element_number into an array. The array consists of + ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting + at array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or + floats for element number element_number into an array. A real array + is always signed. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + The structure of the array as a 1-, 2- or 3-dimensional array should + agree with the structure of the array given in the + ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, + ndimslow should be the array size and ndimfast and, for the 3D calls, + ndimmid, should be set to 1 both in the call and in the imgCIF data + being processed. If the array is 2-dimensional and a 3D call is used, + ndimslow and ndimmid should be the + + """ + return _py2cbf.cbf_handle_struct_get_real_3d_image_fs_as_string(self, element_number, elsize, ndimfast, ndimmid, ndimslow) + + def rewind_row(self): + r""" + + Returns : + *args : + + C prototype: int cbf_rewind_row (cbf_handle handle); + + CBFLib documentation: + DESCRIPTION + cbf_rewind_row makes the first row in the current category the + current row. + If there are no rows, the function returns CBF_NOTFOUND. + The current column is not affected. + ARGUMENTS + handle CBF handle. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_rewind_row(self) + + def get_axis_setting(self, axis_id): + r""" + + Returns : Float start,Float increment + *args : String axis_id + + C prototype: int cbf_get_axis_setting (cbf_handle handle, + unsigned int reserved, const char *axis_id, double *start, + double *increment); + + CBFLib documentation: + DESCRIPTION + cbf_count_axis_ancestors sets ancestors to the number of ancestors of + axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor + axis of index ancestor_index of axis axis_id, starting with axis_id + for ancestor_index 0. + cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of + axis_id or to ". " if there is no such ancestor. + cbf_get_axis_equipment sets *equipment to the equipment of axis_id or + to ". " if there is no such equipment. + cbf_get_axis_equipment_component sets *equipment_component to the + equipment_component of axis_id or to ". " if there is no such + equipment_component. + cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the + components of the ofset of axis_id. + cbf_get_axis_rotation sets rotation to the rotation of axis_id or to + 0 if there is no such rotation. cbf_get_axis_rotation_axis sets + *rotation_axis to the rotation_axis of axis_id or to ". " if there + is no such rotation_axis. + cbf_get_axis_setting sets *start and *increment to the corresponding + values of the axis axis_id. Any of the destination pointers may be + NULL. + cbf_get_axis_type sets axis_type to the type of axis_id. + cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the + components of the vector of axis_id. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any + value other than 0 is invalid. axis_id Axis id. + ancestor_index Integer index of the desired ancestor, starting + with 0 for the current axis_id. ancestor Pointer to + destination ancestor name pointer. depends_on Pointer to + destination depends_on name pointer. equipment Pointer to + destination equipment name pointer. equipment_component Pointer to + destination equipment_component name pointer. offset1 + Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. + rotation Pointer to destination rotation value. + rotation_axis Pointer to destination rotation_axisn name + pointer. start Pointer to the destination start + value. increment Pointer to the destination increment + value. type Pointer to destination axis type of type + . vector1 Pointer to destination first vector component + value. vector2 Pointer to destination second vector + component value. vector3 Pointer to destination third + vector component value. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_axis_setting(self, axis_id) + + def require_column(self, arg): + r""" + + Returns : string + *args : + + C prototype: int cbf_require_column (cbf_handle handle, + const char *columnname); + + CBFLib documentation: + DESCRIPTION + cbf_require_column makes the columns in the current category with + name columnname the current column, if it exists, or creates it if it + does not. + The comparison is case-insensitive. + The current row is not affected. + ARGUMENTS + handle CBF handle. columnname The name of column to find. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_require_column(self, arg) + + def get_timestamp(self): + r""" + + Returns : Float time,Integer timezone + *args : + + C prototype: int cbf_get_timestamp (cbf_handle handle, unsigned int reserved, + double *time, int *timezone); + + CBFLib documentation: + DESCRIPTION + cbf_get_timestamp sets *time to the collection timestamp in seconds + since January 1 1970. *timezone is set to timezone difference from + UTC in minutes. The parameter reserved is presently unused and should + be set to 0. + Either of the destination pointers may be NULL. + ARGUMENTS + handle CBF handle. reserved Unused. Any value other than 0 is + invalid. time Pointer to the destination collection timestamp. + timezone Pointer to the destination timezone difference. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_timestamp(self) + + def find_nextrow(self, arg): + r""" + + Returns : string + *args : + + C prototype: int cbf_find_nextrow (cbf_handle handle, const char *value); + + CBFLib documentation: + DESCRIPTION + cbf_find_nextrow makes the makes the next row in the current column + with value value the current row. The search starts from the row + following the last row found with cbf_find_row or cbf_find_nextrow, + or from the current row if the current row was defined using any + other function. + The comparison is case-sensitive. + If no more matching rows exist, the function returns CBF_NOTFOUND. + The current column is not affected. + ARGUMENTS + handle CBF handle. value the value to search for. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_find_nextrow(self, arg) + + def get_axis_equipment_component(self, axis_id): + r""" + + Returns : String + *args : String axis_id + + C prototype: int cbf_get_axis_equipment_component (cbf_handle handle, + const char *axis_id, const char * *equipment_component); + + CBFLib documentation: + DESCRIPTION + cbf_count_axis_ancestors sets ancestors to the number of ancestors of + axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor + axis of index ancestor_index of axis axis_id, starting with axis_id + for ancestor_index 0. + cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of + axis_id or to ". " if there is no such ancestor. + cbf_get_axis_equipment sets *equipment to the equipment of axis_id or + to ". " if there is no such equipment. + cbf_get_axis_equipment_component sets *equipment_component to the + equipment_component of axis_id or to ". " if there is no such + equipment_component. + cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the + components of the ofset of axis_id. + cbf_get_axis_rotation sets rotation to the rotation of axis_id or to + 0 if there is no such rotation. cbf_get_axis_rotation_axis sets + *rotation_axis to the rotation_axis of axis_id or to ". " if there + is no such rotation_axis. + cbf_get_axis_setting sets *start and *increment to the corresponding + values of the axis axis_id. Any of the destination pointers may be + NULL. + cbf_get_axis_type sets axis_type to the type of axis_id. + cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the + components of the vector of axis_id. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any + value other than 0 is invalid. axis_id Axis id. + ancestor_index Integer index of the desired ancestor, starting + with 0 for the current axis_id. ancestor Pointer to + destination ancestor name pointer. depends_on Pointer to + destination depends_on name pointer. equipment Pointer to + destination equipment name pointer. equipment_component Pointer to + destination equipment_component name pointer. offset1 + Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. + rotation Pointer to destination rotation value. + rotation_axis Pointer to destination rotation_axisn name + pointer. start Pointer to the destination start + value. increment Pointer to the destination increment + value. type Pointer to destination axis type of type + . vector1 Pointer to destination first vector component + value. vector2 Pointer to destination second vector + component value. vector3 Pointer to destination third + vector component value. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_axis_equipment_component(self, axis_id) + + def get_realarrayparameters_wdims_sf(self): + r""" + + Returns : int compression,int binary_id,int elsize,int elements,char **bo, + int *bolen,int dimslow,int dimmid,int dimfast,int padding + *args : + + C prototype: int cbf_get_realarrayparameters_wdims_sf (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + size_t *elements, const char **byteorder, size_t *dimslow, + size_t *dimmid, size_t *dimfast, size_t *padding); + + CBFLib documentation: + DESCRIPTION + cbf_get_integerarrayparameters sets *compression, *binary_id, + *elsize, *elsigned, *elunsigned, *elements, *minelement and + *maxelement to values read from the binary value of the item at the + current column and row. This provides all the arguments needed for a + subsequent call to cbf_set_integerarray, if a copy of the array is to + be made into another CIF or CBF. cbf_get_realarrayparameters sets + *compression, *binary_id, *elsize, *elements to values read from the + binary value of the item at the current column and row. This provides + all the arguments needed for a subsequent call to cbf_set_realarray, + if a copy of the arry is to be made into another CIF or CBF. + The variants cbf_get_integerarrayparameters_wdims, + cbf_get_integerarrayparameters_wdims_fs, + cbf_get_integerarrayparameters_wdims_sf, + cbf_get_realarrayparameters_wdims, + cbf_get_realarrayparameters_wdims_fs, + cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, + *dimmid, *dimslow, and *padding as well, providing the additional + parameters needed for a subsequent call to cbf_set_integerarray_wdims + or cbf_set_realarray_wdims. + The value returned in *byteorder is a pointer either to the string + "little_endian " or to the string "big_endian ". This should be + the byte order of the data, not necessarily of the host machine. No + attempt should be made to modify this string. At this time only + "little_endian " will be returned. + The values returned in *dimfast, *dimmid and *dimslow are the sizes + of the fastest changing, second fastest changing and third fastest + changing dimensions of the array, if specified, or zero, if not + specified. + The value returned in *padding is the size of the post-data padding, + if any and if specified in the data header. The value is given as a + count of octets. + If the value is not binary, the function returns CBF_ASCII. + ARGUMENTS + handle CBF handle. compression Compression method used. + elsize Size in bytes of each array element. binary_id + Pointer to the destination integer binary identifier. elsigned + Pointer to an integer. Set to 1 if the elements can be read as signed + integers. elunsigned Pointer to an integer. Set to 1 if the + elements can be read as unsigned integers. elements Pointer to + the destination number of elements. minelement Pointer to the + destination smallest element. maxelement Pointer to the + destination largest element. byteorder Pointer to the destination + byte order. dimfast Pointer to the destination fastest + dimension. dimmid Pointer to the destination second fastest + dimension. dimslow Pointer to the destination third fastest + dimension. padding Pointer to the destination padding size. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_get_realarrayparameters_wdims_sf(self) + + def reset_datablock(self): + r""" + + Returns : + *args : + + C prototype: int cbf_reset_datablock (cbf_handle handle); + + CBFLib documentation: + DESCRIPTION + cbf_reset_datablock deletes all categories from the current data + block. cbf_reset_saveframe deletes all categories from the current + save frame. + ARGUMENTS + handle CBF handle. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_reset_datablock(self) + + def set_3d_image_fs(self, element_number, compression, data, elsize, elsign, ndimfast, ndimmid, ndimslow): + r""" + + Returns : + *args : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimfast,int dimmid,int dimslow + + C prototype: int cbf_set_3d_image_fs(cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array, size_t elsize, int elsign, size_t ndimfast, + size_t ndimmid, size_t ndimslow); + + CBFLib documentation: + DESCRIPTION + cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image + array for element number element_number. The array consists of + ndimfast×ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-zero and unsigned otherwise. + cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf + write the image array for element number element_number. The array + consists of ndimfast×ndimslow IEEE double or float elements of + elsize bytes each, starting at array. cbf_set_3d_image, + cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array + for element number element_number. The array consists of + ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting + at array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and + cbf_set_real_3d_image_sf writes the 3D image array for element number + element_number. The array consists of ndimfast×ndimmid×ndimslow + IEEE double or float elements of elsize bytes each, starting at + array. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + If the array is 1-dimensional, ndimslow should be the array size and + ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the + array is 2-dimensional and the 3D calls are used, ndimslow and + ndimmid should be used for the array dimensions and ndimfast should + be set to 1. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for + cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof + (int), sizeof(double) or sizeof(float), the function returns + CBF_ARGUMENT. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any value other + than 0 is invalid. element_number The number of the detector + element counting from 0 by order of appearance in the + "diffrn_data_frame " category. compression Compression type. + array Pointer to the image array. elsize Size in + bytes of each image array element. elsigned Set to non-0 if + the image array elements are signed. ndimslow Slowest array + dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_3d_image_fs(self, element_number, compression, data, elsize, elsign, ndimfast, ndimmid, ndimslow) + + def set_saveframename(self, arg): + r""" + + Returns : string + *args : + + C prototype: int cbf_set_saveframename (cbf_handle handle, + const char *saveframename); + + CBFLib documentation: + DESCRIPTION + cbf_set_datablockname changes the name of the current data block to + datablockname. cbf_set_saveframename changes the name of the current + save frame to saveframename. + If a data block or save frame with this name already exists + (comparison is case-insensitive), the function returns CBF_IDENTICAL. + ARGUMENTS + handle CBF handle. datablockname The new data block name. + saveframename The new save frame name. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_set_saveframename(self, arg) + + def require_integervalue(self, thedefault): + r""" + + Returns : Int number + *args : Int thedefault + + C prototype: int cbf_require_integervalue (cbf_handle handle, int *number, + int defaultvalue); + + CBFLib documentation: + DESCRIPTION + cbf_get_integervalue sets *number to the value of the ASCII item at + the current column and row interpreted as a decimal integer. + cbf_require_integervalue sets *number to the value of the ASCII item + at the current column and row interpreted as a decimal integer, + setting it to defaultvalue if necessary. + If the value is not ASCII, the function returns CBF_BINARY. + ARGUMENTS + handle CBF handle. number pointer to the number. + defaultvalue default number value. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_require_integervalue(self, thedefault) + + def get_integerarrayparameters(self): + r""" + + Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, + int elements,int minelement,int maxelement + *args : + + C prototype: int cbf_get_integerarrayparameters (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + int *elsigned, int *elunsigned, size_t *elements, + int *minelement, int *maxelement); + + CBFLib documentation: + DESCRIPTION + cbf_get_integerarrayparameters sets *compression, *binary_id, + *elsize, *elsigned, *elunsigned, *elements, *minelement and + *maxelement to values read from the binary value of the item at the + current column and row. This provides all the arguments needed for a + subsequent call to cbf_set_integerarray, if a copy of the array is to + be made into another CIF or CBF. cbf_get_realarrayparameters sets + *compression, *binary_id, *elsize, *elements to values read from the + binary value of the item at the current column and row. This provides + all the arguments needed for a subsequent call to cbf_set_realarray, + if a copy of the arry is to be made into another CIF or CBF. + The variants cbf_get_integerarrayparameters_wdims, + cbf_get_integerarrayparameters_wdims_fs, + cbf_get_integerarrayparameters_wdims_sf, + cbf_get_realarrayparameters_wdims, + cbf_get_realarrayparameters_wdims_fs, + cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, + *dimmid, *dimslow, and *padding as well, providing the additional + parameters needed for a subsequent call to cbf_set_integerarray_wdims + or cbf_set_realarray_wdims. + The value returned in *byteorder is a pointer either to the string + "little_endian " or to the string "big_endian ". This should be + the byte order of the data, not necessarily of the host machine. No + attempt should be made to modify this string. At this time only + "little_endian " will be returned. + The values returned in *dimfast, *dimmid and *dimslow are the sizes + of the fastest changing, second fastest changing and third fastest + changing dimensions of the array, if specified, or zero, if not + specified. + The value returned in *padding is the size of the post-data padding, + if any and if specified in the data header. The value is given as a + count of octets. + If the value is not binary, the function returns CBF_ASCII. + ARGUMENTS + handle CBF handle. compression Compression method used. + elsize Size in bytes of each array element. binary_id + Pointer to the destination integer binary identifier. elsigned + Pointer to an integer. Set to 1 if the elements can be read as signed + integers. elunsigned Pointer to an integer. Set to 1 if the + elements can be read as unsigned integers. elements Pointer to + the destination number of elements. minelement Pointer to the + destination smallest element. maxelement Pointer to the + destination largest element. byteorder Pointer to the destination + byte order. dimfast Pointer to the destination fastest + dimension. dimmid Pointer to the destination second fastest + dimension. dimslow Pointer to the destination third fastest + dimension. padding Pointer to the destination padding size. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_get_integerarrayparameters(self) + + def set_real_3d_image_sf(self, element_number, compression, data, elsize, ndimslow, ndimmid, ndimfast): + r""" + + Returns : + *args : int element_number,int compression,(binary) String data,int elsize, + int dimslow,int dimmid,int dimfast + + C prototype: int cbf_set_real_3d_image_sf(cbf_handle handle, + unsigned int reserved, unsigned int element_number, + unsigned int compression, void *array,size_t elsize, + size_t ndimslow, size_t ndimmid, size_t ndimfast); + + CBFLib documentation: + DESCRIPTION + cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image + array for element number element_number. The array consists of + ndimfast×ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-zero and unsigned otherwise. + cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf + write the image array for element number element_number. The array + consists of ndimfast×ndimslow IEEE double or float elements of + elsize bytes each, starting at array. cbf_set_3d_image, + cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array + for element number element_number. The array consists of + ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting + at array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and + cbf_set_real_3d_image_sf writes the 3D image array for element number + element_number. The array consists of ndimfast×ndimmid×ndimslow + IEEE double or float elements of elsize bytes each, starting at + array. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + If the array is 1-dimensional, ndimslow should be the array size and + ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the + array is 2-dimensional and the 3D calls are used, ndimslow and + ndimmid should be used for the array dimensions and ndimfast should + be set to 1. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for + cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof + (int), sizeof(double) or sizeof(float), the function returns + CBF_ARGUMENT. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any value other + than 0 is invalid. element_number The number of the detector + element counting from 0 by order of appearance in the + "diffrn_data_frame " category. compression Compression type. + array Pointer to the image array. elsize Size in + bytes of each image array element. elsigned Set to non-0 if + the image array elements are signed. ndimslow Slowest array + dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_real_3d_image_sf(self, element_number, compression, data, elsize, ndimslow, ndimmid, ndimfast) + + def write_file(self, filename, ciforcbf, headers, encoding): + r""" + + Returns : + *args : String filename,Integer ciforcbf,Integer Headers,Integer encoding + + C prototype: int cbf_write_file (cbf_handle handle, FILE *file, int readable, + int ciforcbf, int flags, int encoding); + + CBFLib documentation: + DESCRIPTION + cbf_write_file writes the CBF object specified by handle into the + file file, following CIF 1.0 conventions of 80 character lines. + cbf_write_widefile writes the CBF object specified by handle into the + file file, following CIF 1.1 conventions of 2048 character lines. A + warning is issued to stderr for ascii lines over the limit, and an + attempt is made to fold lines to fit. No test is performed on binary + sections. + If a dictionary has been provided, aliases will be applied on output. + Unlike cbf_read_file, the file does not have to be random-access. + If the file is random-access and readable, readable can be set to + non-0 to indicate to CBFlib that the file can be used as a buffer to + conserve disk space. If the file is not random-access or not + readable, readable must be 0. + + """ + return _py2cbf.cbf_handle_struct_write_file(self, filename, ciforcbf, headers, encoding) + + def set_divergence(self, div_x_source, div_y_source, div_x_y_source): + r""" + + Returns : + *args : Float div_x_source,Float div_y_source,Float div_x_y_source + + C prototype: int cbf_set_divergence (cbf_handle handle, double div_x_source, + double div_y_source, double div_x_y_source); + + CBFLib documentation: + DESCRIPTION + cbf_set_divergence sets the source divergence parameters to the + values specified by div_x_source, div_y_source and div_x_y_source. + ARGUMENTS + handle CBF handle. div_x_source New value of + div_x_source. div_y_source New value of div_y_source. + div_x_y_source New value of div_x_y_source. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_divergence(self, div_x_source, div_y_source, div_x_y_source) + + def remove_datablock(self): + r""" + + Returns : + *args : + + C prototype: int cbf_remove_datablock (cbf_handle handle); + + CBFLib documentation: + DESCRIPTION + cbf_remove_datablock deletes the current data block. + cbf_remove_saveframe deletes the current save frame. + The current data block becomes undefined. + ARGUMENTS + handle CBF handle. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_remove_datablock(self) + + def count_elements(self): + r""" + + Returns : Integer + *args : + + C prototype: int cbf_count_elements (cbf_handle handle, + unsigned int *elements); + + CBFLib documentation: + DESCRIPTION + cbf_count_elements sets *elements to the number of detector elements. + ARGUMENTS + handle CBF handle. elements Pointer to the destination count. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_count_elements(self) + + def set_image_fs(self, element_number, compression, data, elsize, elsign, ndimfast, ndimslow): + r""" + + Returns : + *args : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimfast,int dimslow + + C prototype: int cbf_set_image_fs(cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array, size_t elsize, int elsign, size_t ndimfast, + size_t ndimslow); + + CBFLib documentation: + DESCRIPTION + cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image + array for element number element_number. The array consists of + ndimfast×ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-zero and unsigned otherwise. + cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf + write the image array for element number element_number. The array + consists of ndimfast×ndimslow IEEE double or float elements of + elsize bytes each, starting at array. cbf_set_3d_image, + cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array + for element number element_number. The array consists of + ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting + at array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and + cbf_set_real_3d_image_sf writes the 3D image array for element number + element_number. The array consists of ndimfast×ndimmid×ndimslow + IEEE double or float elements of elsize bytes each, starting at + array. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + If the array is 1-dimensional, ndimslow should be the array size and + ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the + array is 2-dimensional and the 3D calls are used, ndimslow and + ndimmid should be used for the array dimensions and ndimfast should + be set to 1. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for + cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof + (int), sizeof(double) or sizeof(float), the function returns + CBF_ARGUMENT. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any value other + than 0 is invalid. element_number The number of the detector + element counting from 0 by order of appearance in the + "diffrn_data_frame " category. compression Compression type. + array Pointer to the image array. elsize Size in + bytes of each image array element. elsigned Set to non-0 if + the image array elements are signed. ndimslow Slowest array + dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_image_fs(self, element_number, compression, data, elsize, elsign, ndimfast, ndimslow) + + def require_reference_detector(self, element_number): + r""" + + Returns : pycbf detector object + *args : Integer element_number + + C prototype: int cbf_require_reference_detector (cbf_handle handle, + cbf_detector *detector, unsigned int element_number); + + CBFLib documentation: + DESCRIPTION + cbf_construct_detector constructs a detector object for detector + element number element_number using the description in the CBF object + handle and initialises the detector handle *detector. + cbf_construct_reference_detector constructs a detector object for + detector element number element_number using the description in the + CBF object handle and initialises the detector handle *detector using + the reference settings of the axes. cbf_require_reference_detector is + similar, but try to force the creations of missing intermediate + categories needed to construct a detector object. + ARGUMENTS + handle CBF handle. detector Pointer to the + destination detector handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_require_reference_detector(self, element_number) + + def next_category(self): + r""" + + Returns : + *args : + + C prototype: int cbf_next_category (cbf_handle handle); + + CBFLib documentation: + DESCRIPTION + cbf_next_category makes the category following the current category + in the current data block the current category. + If there are no more categories, the function returns CBF_NOTFOUND. + The current column and row become undefined. + ARGUMENTS + handle CBF handle. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_next_category(self) + + def set_diffrn_id(self, arg): + r""" + + Returns : string + *args : + + C prototype: int cbf_set_diffrn_id (cbf_handle handle, const char *diffrn_id); + + CBFLib documentation: + DESCRIPTION + cbf_set_diffrn_id sets the "diffrn.id " entry of the current + datablock to the ASCII value diffrn_id. + This function also changes corresponding "diffrn_id " entries in + the "diffrn_source ", "diffrn_radiation ", "diffrn_detector + " and "diffrn_measurement " categories. + ARGUMENTS + handle CBF handle. diffrn_id ASCII value. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_diffrn_id(self, arg) + + def set_timestamp(self, time, timezone, precision): + r""" + + Returns : + *args : Float time,Integer timezone,Float precision + + C prototype: int cbf_set_timestamp (cbf_handle handle, unsigned int reserved, + double time, int timezone, double precision); + + CBFLib documentation: + DESCRIPTION + cbf_set_timestamp sets the collection timestamp in seconds since + January 1 1970 to the value specified by time. The timezone + difference from UTC + + """ + return _py2cbf.cbf_handle_struct_set_timestamp(self, time, timezone, precision) + + def get_orientation_matrix(self): + r""" + + Returns : Float matrix_0,Float matrix_1,Float matrix_2,Float matrix_3, + Float matrix_4,Float matrix_5,Float matrix_6,Float matrix_7, + Float matrix_8 + *args : + + C prototype: int cbf_get_orientation_matrix (cbf_handle handle, + double ub_matrix[9]); + + CBFLib documentation: + DESCRIPTION + cbf_get_orientation_matrix sets ub_matrix to point to the array of + orientation matrix entries in the "diffrn " category in the order + of columns: + "UB[1][1] " "UB[1][2] " "UB[1][3] " "UB[2][1] " + "UB[2][2] " "UB[2][3] " "UB[3][1] " "UB[3][2] " + "UB[3][3] " + cbf_set_orientation_matrix sets the values in the "diffrn " + category to the values pointed to by ub_matrix. + ARGUMENTS + handle CBF handle. ub_matrix Source or destination array of 9 + doubles giving the orientation matrix parameters. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_orientation_matrix(self) + + def get_image_size_fs(self, element_number): + r""" + + Returns : size_t ndimfast,size_t ndimslow + *args : Integer element_number + + C prototype: int cbf_get_image_size_fs (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + size_t *ndimfast, size_t *ndimslow); + + CBFLib documentation: + DESCRIPTION + cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf + set *ndimslow and *ndimfast to the slow and fast dimensions of the + image array for element number element_number. If the array is + 1-dimensional, *ndimslow will be set to the array size and *ndimfast + will be set to 1. If the array is 3-dimensional an error code will be + returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and + cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the + slowest, next fastest and fastest dimensions, respectively, of the 3D + image array for element number element_number. If the array is + 1-dimensional, *ndimslow will be set to the array size and *ndimmid + and + + """ + return _py2cbf.cbf_handle_struct_get_image_size_fs(self, element_number) + + def get_divergence(self): + r""" + + Returns : Float div_x_source,Float div_y_source,Float div_x_y_source + *args : + + C prototype: int cbf_get_divergence (cbf_handle handle, double *div_x_source, + double *div_y_source, double *div_x_y_source); + + CBFLib documentation: + DESCRIPTION + cbf_get_divergence sets *div_x_source, *div_y_source and + *div_x_y_source to the corresponding source divergence parameters. + Any of the destination pointers may be NULL. + ARGUMENTS + handle CBF handle. div_x_source Pointer to the + destination div_x_source. div_y_source Pointer to the destination + div_y_source. div_x_y_source Pointer to the destination + div_x_y_source. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_divergence(self) + + def rewind_category(self): + r""" + + Returns : + *args : + + C prototype: int cbf_rewind_category (cbf_handle handle); + + CBFLib documentation: + DESCRIPTION + cbf_rewind_category makes the first category in the current data + block the current category. cbf_rewind_saveframe makes the first + saveframe in the current data block the current saveframe. + cbf_rewind_blockitem makes the first blockitem (category or + saveframe) in the current data block the current blockitem. The type + of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type. + If there are no categories, saveframes or blockitems the function + returns CBF_NOTFOUND. + The current column and row become undefined. + ARGUMENTS + handle CBF handle. type CBF handle. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_rewind_category(self) + + def read_template(self, filename): + r""" + + Returns : + *args : String filename + + C prototype: int cbf_read_template (cbf_handle handle, FILE *file); + + CBFLib documentation: + DESCRIPTION + cbf_read_template reads the CBF or CIF file file into the CBF object + specified by handle and selects the first datablock as the current + datablock. + ARGUMENTS + handle Pointer to a CBF handle. file Pointer to a file + descriptor. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_read_template(self, filename) + + def select_row(self, arg): + r""" + + Returns : + *args : Integer + + C prototype: int cbf_select_row (cbf_handle handle, unsigned int row); + + CBFLib documentation: + DESCRIPTION + cbf_select_row selects row number row in the current category as the + current row. + The first row is number 0. + The current column is not affected + If the row does not exist, the function returns CBF_NOTFOUND. + ARGUMENTS + handle CBF handle. row Number of the row to select. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_select_row(self, arg) + + def get_image_fs_as_string(self, element_number, elsize, elsign, ndimfast, ndimslow): + r""" + + Returns : (Binary)String + *args : int element_number,int elsize,int elsign,int ndimfast,int ndimslow + + C prototype: int cbf_get_image_fs (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, + int elsign, size_t ndimfast, size_t ndimslow); + + CBFLib documentation: + DESCRIPTION + cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image + array for element number element_number into an array. The array + consists of ndimslow×ndimfast elements of elsize bytes each, + starting at array. The elements are signed if elsign is non-0 and + unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and + cbf_get_real_image_sf read the image array of IEEE doubles or floats + for element number element_number into an array. A real array is + always signed. cbf_get_3d_image, cbf_get_3d_image_fs and + cbf_get_3d_image_sf read the 3D image array for element number + element_number into an array. The array consists of + ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting + at array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or + floats for element number element_number into an array. A real array + is always signed. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + The structure of the array as a 1-, 2- or 3-dimensional array should + agree with the structure of the array given in the + ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, + ndimslow should be the array size and ndimfast and, for the 3D calls, + ndimmid, should be set to 1 both in the call and in the imgCIF data + being processed. If the array is 2-dimensional and a 3D call is used, + ndimslow and ndimmid should be the + + """ + return _py2cbf.cbf_handle_struct_get_image_fs_as_string(self, element_number, elsize, elsign, ndimfast, ndimslow) + + def get_image_size_sf(self, element_number): + r""" + + Returns : size_t ndimslow,size_t ndimfast + *args : Integer element_number + + C prototype: int cbf_get_image_size_sf (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + size_t *ndimslow, size_t *ndimfast); + + CBFLib documentation: + DESCRIPTION + cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf + set *ndimslow and *ndimfast to the slow and fast dimensions of the + image array for element number element_number. If the array is + 1-dimensional, *ndimslow will be set to the array size and *ndimfast + will be set to 1. If the array is 3-dimensional an error code will be + returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and + cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the + slowest, next fastest and fastest dimensions, respectively, of the 3D + image array for element number element_number. If the array is + 1-dimensional, *ndimslow will be set to the array size and *ndimmid + and + + """ + return _py2cbf.cbf_handle_struct_get_image_size_sf(self, element_number) + + def get_real_image_fs_as_string(self, element_number, elsize, ndimfast, ndimslow): + r""" + + Returns : (Binary)String + *args : int element_number,int elsize,int ndimfast,int ndimslow + + C prototype: int cbf_get_real_image_fs (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + void *array, size_t elsize, size_t ndimfast, + size_t ndimslow); + + CBFLib documentation: + DESCRIPTION + cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image + array for element number element_number into an array. The array + consists of ndimslow×ndimfast elements of elsize bytes each, + starting at array. The elements are signed if elsign is non-0 and + unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and + cbf_get_real_image_sf read the image array of IEEE doubles or floats + for element number element_number into an array. A real array is + always signed. cbf_get_3d_image, cbf_get_3d_image_fs and + cbf_get_3d_image_sf read the 3D image array for element number + element_number into an array. The array consists of + ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting + at array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or + floats for element number element_number into an array. A real array + is always signed. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + The structure of the array as a 1-, 2- or 3-dimensional array should + agree with the structure of the array given in the + ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, + ndimslow should be the array size and ndimfast and, for the 3D calls, + ndimmid, should be set to 1 both in the call and in the imgCIF data + being processed. If the array is 2-dimensional and a 3D call is used, + ndimslow and ndimmid should be the + + """ + return _py2cbf.cbf_handle_struct_get_real_image_fs_as_string(self, element_number, elsize, ndimfast, ndimslow) + + def count_columns(self): + r""" + + Returns : Integer + *args : + + C prototype: int cbf_count_columns (cbf_handle handle, unsigned int *columns); + + CBFLib documentation: + DESCRIPTION + cbf_count_columns puts the number of columns in the current category + in *columns. + ARGUMENTS + handle CBF handle. columns Pointer to the destination column + count. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_count_columns(self) + + def get_integerarrayparameters_wdims(self): + r""" + + Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, + int elements,int minelement,int maxelement,char **bo,int *bolen, + int dimfast,int dimmid,int dimslow,int padding + *args : + + C prototype: int cbf_get_integerarrayparameters_wdims (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + int *elsigned, int *elunsigned, size_t *elements, + int *minelement, int *maxelement, const char **byteorder, + size_t *dimfast, size_t *dimmid, size_t *dimslow, + size_t *padding); + + CBFLib documentation: + DESCRIPTION + cbf_get_integerarrayparameters sets *compression, *binary_id, + *elsize, *elsigned, *elunsigned, *elements, *minelement and + *maxelement to values read from the binary value of the item at the + current column and row. This provides all the arguments needed for a + subsequent call to cbf_set_integerarray, if a copy of the array is to + be made into another CIF or CBF. cbf_get_realarrayparameters sets + *compression, *binary_id, *elsize, *elements to values read from the + binary value of the item at the current column and row. This provides + all the arguments needed for a subsequent call to cbf_set_realarray, + if a copy of the arry is to be made into another CIF or CBF. + The variants cbf_get_integerarrayparameters_wdims, + cbf_get_integerarrayparameters_wdims_fs, + cbf_get_integerarrayparameters_wdims_sf, + cbf_get_realarrayparameters_wdims, + cbf_get_realarrayparameters_wdims_fs, + cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, + *dimmid, *dimslow, and *padding as well, providing the additional + parameters needed for a subsequent call to cbf_set_integerarray_wdims + or cbf_set_realarray_wdims. + The value returned in *byteorder is a pointer either to the string + "little_endian " or to the string "big_endian ". This should be + the byte order of the data, not necessarily of the host machine. No + attempt should be made to modify this string. At this time only + "little_endian " will be returned. + The values returned in *dimfast, *dimmid and *dimslow are the sizes + of the fastest changing, second fastest changing and third fastest + changing dimensions of the array, if specified, or zero, if not + specified. + The value returned in *padding is the size of the post-data padding, + if any and if specified in the data header. The value is given as a + count of octets. + If the value is not binary, the function returns CBF_ASCII. + ARGUMENTS + handle CBF handle. compression Compression method used. + elsize Size in bytes of each array element. binary_id + Pointer to the destination integer binary identifier. elsigned + Pointer to an integer. Set to 1 if the elements can be read as signed + integers. elunsigned Pointer to an integer. Set to 1 if the + elements can be read as unsigned integers. elements Pointer to + the destination number of elements. minelement Pointer to the + destination smallest element. maxelement Pointer to the + destination largest element. byteorder Pointer to the destination + byte order. dimfast Pointer to the destination fastest + dimension. dimmid Pointer to the destination second fastest + dimension. dimslow Pointer to the destination third fastest + dimension. padding Pointer to the destination padding size. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_get_integerarrayparameters_wdims(self) + + def get_gain(self, element_number): + r""" + + Returns : Float gain,Float gain_esd + *args : + + C prototype: int cbf_get_gain (cbf_handle handle, unsigned int element_number, + double *gain, double *gain_esd); + + CBFLib documentation: + DESCRIPTION + cbf_get_gain sets *gain and *gain_esd to the corresponding gain + parameters for element number element_number. + Either of the destination pointers may be NULL. + ARGUMENTS + handle CBF handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. gain Pointer to the + destination gain. gain_esd Pointer to the destination + gain_esd. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_gain(self, element_number) + + def new_saveframe(self, arg): + r""" + + Returns : string + *args : + + C prototype: int cbf_new_saveframe (cbf_handle handle, + const char *saveframename); + + CBFLib documentation: + DESCRIPTION + cbf_new_datablock creates a new data block with name datablockname + and makes it the current data block. cbf_new_saveframe creates a new + save frame with name saveframename within the current data block and + makes the new save frame the current save frame. + If a data block or save frame with this name already exists, the + existing data block or save frame becomes the current data block or + save frame. + ARGUMENTS + handle CBF handle. datablockname The name of the new data + block. saveframename The name of the new save frame. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_new_saveframe(self, arg) + + def set_polarization(self, polarizn_source_ratio, polarizn_source_norm): + r""" + + Returns : + *args : Float polarizn_source_ratio,Float polarizn_source_norm + + C prototype: int cbf_set_polarization (cbf_handle handle, + double polarizn_source_ratio, + double polarizn_source_norm); + + CBFLib documentation: + DESCRIPTION + cbf_set_polarization sets the source polarization to the values + specified by polarizn_source_ratio and polarizn_source_norm. + ARGUMENTS + handle CBF handle. polarizn_source_ratio New value + of polarizn_source_ratio. polarizn_source_norm New value of + polarizn_source_norm. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_polarization(self, polarizn_source_ratio, polarizn_source_norm) + + def set_real_3d_image(self, element_number, compression, data, elsize, ndimslow, ndimmid, ndimfast): + r""" + + Returns : + *args : int element_number,int compression,(binary) String data,int elsize, + int dimslow,int dimmid,int dimfast + + C prototype: int cbf_set_real_3d_image (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + unsigned int compression, void *array,size_t elsize, + size_t ndimslow, size_t ndimmid, size_t ndimfast); + + CBFLib documentation: + DESCRIPTION + cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image + array for element number element_number. The array consists of + ndimfast×ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-zero and unsigned otherwise. + cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf + write the image array for element number element_number. The array + consists of ndimfast×ndimslow IEEE double or float elements of + elsize bytes each, starting at array. cbf_set_3d_image, + cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array + for element number element_number. The array consists of + ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting + at array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and + cbf_set_real_3d_image_sf writes the 3D image array for element number + element_number. The array consists of ndimfast×ndimmid×ndimslow + IEEE double or float elements of elsize bytes each, starting at + array. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + If the array is 1-dimensional, ndimslow should be the array size and + ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the + array is 2-dimensional and the 3D calls are used, ndimslow and + ndimmid should be used for the array dimensions and ndimfast should + be set to 1. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for + cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof + (int), sizeof(double) or sizeof(float), the function returns + CBF_ARGUMENT. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any value other + than 0 is invalid. element_number The number of the detector + element counting from 0 by order of appearance in the + "diffrn_data_frame " category. compression Compression type. + array Pointer to the image array. elsize Size in + bytes of each image array element. elsigned Set to non-0 if + the image array elements are signed. ndimslow Slowest array + dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_real_3d_image(self, element_number, compression, data, elsize, ndimslow, ndimmid, ndimfast) + + def delete_row(self, arg): + r""" + + Returns : + *args : Integer + + C prototype: int cbf_delete_row (cbf_handle handle, unsigned int rownumber); + + CBFLib documentation: + DESCRIPTION + cbf_delete_row deletes a row from the current category. Rows starting + from rownumber +1 are moved down by 1. If the current row was higher + than rownumber, or if the current row is the last row, it will also + move down by 1. + The row numbers start from 0. + ARGUMENTS + handle CBF handle. rownumber The number of the row to delete. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_delete_row(self, arg) + + def column_name(self): + r""" + + Returns : + *args : string + + C prototype: int cbf_column_name (cbf_handle handle, const char **columnname); + + CBFLib documentation: + DESCRIPTION + cbf_column_name sets *columnname to point to the name of the current + column of the current category. + The column name will be valid as long as the column exists. + The name must not be modified by the program in any way. + cbf_set_column_name sets the name of the current column to + newcolumnname + ARGUMENTS + handle CBF handle. columnname Pointer to the + destination column name pointer. newcolumnname New column name + pointer. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_column_name(self) + + def remove_saveframe(self): + r""" + + Returns : + *args : + + C prototype: int cbf_remove_saveframe (cbf_handle handle); + + CBFLib documentation: + DESCRIPTION + cbf_remove_datablock deletes the current data block. + cbf_remove_saveframe deletes the current save frame. + The current data block becomes undefined. + ARGUMENTS + handle CBF handle. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_remove_saveframe(self) + + def set_integerarray_wdims_sf(self, compression, binary_id, data, elsize, elsigned, elements, bo, dimslow, dimmid, dimfast, padding): + r""" + + Returns : + *args : int compression,int binary_id,(binary) String data,int elsize, + int elsigned,int elements,String byteorder,int dimslow,int dimmid, + int dimfast,int padding + + C prototype: int cbf_set_integerarray_wdims_sf (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, int elsigned, size_t elements, + const char *byteorder, size_t dimslow, size_t dimmid, + size_t dimfast, size_t padding); + + CBFLib documentation: + DESCRIPTION + cbf_set_integerarray sets the binary value of the item at the current + column and row to an integer array. The array consists of elements + elements of elsize bytes each, starting at array. The elements are + signed if elsigned is non-0 and unsigned otherwise. binary_id is the + binary section identifier. cbf_set_realarray sets the binary value of + the item at the current column and row to an integer array. The array + consists of elements elements of elsize bytes each, starting at + array. binary_id is the binary section identifier. + The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, + cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, + cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants + allow the data header values of byteorder, dimfast, dimmid, dimslow + and padding to be set to the data byte order, the fastest, second + fastest and third fastest array dimensions and the size in byte of + the post data padding to be used. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + NOTE: This scheme is by far the slowest of the four and uses much + more disk space. It is intended for routine use with small arrays + only. With large arrays (like images) it should be used only for + debugging. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned), for cbf_set_integerarray, or IEEE doubles or + floats for cbf_set_realarray. If elsize is not equal to sizeof + (char), sizeof (short) or sizeof (int), the function returns + CBF_ARGUMENT. + ARGUMENTS + handle CBF handle. compression Compression method to use. + binary_id Integer binary identifier. array Pointer to the + source array. elsize Size in bytes of each source array + element. elsigned Set to non-0 if the source array elements are + signed. elements The number of elements in the array + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_set_integerarray_wdims_sf(self, compression, binary_id, data, elsize, elsigned, elements, bo, dimslow, dimmid, dimfast, padding) + + def require_value(self, defaultvalue): + r""" + + Returns : String Value + *args : String defaultvalue + + C prototype: int cbf_require_value (cbf_handle handle, const char **value, + const char *defaultvalue ); + + CBFLib documentation: + DESCRIPTION + cbf_get_value sets *value to point to the ASCII value of the item at + the current column and row. cbf_require_value sets *value to point to + the ASCII value of the item at the current column and row, creating + the data item if necessary and initializing it to a copy of + defaultvalue. + If the value is not ASCII, the function returns CBF_BINARY. + The value will be valid as long as the item exists and has not been + set to a new value. + The value must not be modified by the program in any way. + ARGUMENTS + handle CBF handle. value Pointer to the destination + value pointer. defaultvalue Default value character string. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_require_value(self, defaultvalue) + + def require_column_integervalue(self, columnname, defaultvalue): + r""" + + Returns : Int Value + *args : String Columnvalue,Int default + + C prototype: int cbf_require_column_integervalue (cbf_handle handle, + const char *columnname, int *number, + const int defaultvalue); + + CBFLib documentation: + DESCRIPTION + cbf_require_column_doublevalue sets *number to the value of the ASCII + item at the current row for the column given with the name given by + *columnname, with the value interpreted as an integer number, or to + the number given by defaultvalue if the item cannot be found. + ARGUMENTS + handle CBF handle. columnname Name of the column + containing the number. number pointer to the location to + receive the integer value. defaultvalue Value to use if the + requested column and value cannot be found. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_require_column_integervalue(self, columnname, defaultvalue) + + def set_pixel_size(self, element_number, axis_number, psize): + r""" + + Returns : + *args : Int element_number,Int axis_number,Float pixel size + + C prototype: int cbf_set_pixel_size (cbf_handle handle, + unsigned int element_number, int axis_number, + double psize); + + CBFLib documentation: + DESCRIPTION + cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the + "size " column of the "array_structure_list " category at the + row which matches axis axis_number of the detector element + element_number converting the double pixel size psize from meters to + millimeters in storing it in the "size " column for the axis + axis_number of the detector element element_number. The axis_number + is numbered from 1, starting with the slowest axis. + cbf_set_pixel_size_fs sets the item in the "size " column of the + "array_structure_list " category at the row which matches axis + axis_number of the detector element element_number converting the + double pixel size psize from meters to millimeters in storing it in + the "size " column for the axis axis_number of the detector + element element_number. The axis_number is numbered from 1, starting + with the fastest axis. + If a negative axis number is given, the order of axes is reversed, so + that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the + fastest axis for cbf_get_pixel_size_sf. + If the "array_structure_list " category does not already exist, it + is created. + If the appropriate row in the "array_structure_list " catgeory + does not already exist, it is created. + If the pixel size is not given explcitly in the "array_element_size + category ", the function returns CBF_NOTFOUND. + ARGUMENTS + handle CBF handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. axis_number The number of the + axis, fastest first, starting from 1. + + """ + return _py2cbf.cbf_handle_struct_set_pixel_size(self, element_number, axis_number, psize) + + def next_column(self): + r""" + + Returns : + *args : + + C prototype: int cbf_next_column (cbf_handle handle); + + CBFLib documentation: + DESCRIPTION + cbf_next_column makes the column following the current column in the + current category the current column. + If there are no more columns, the function returns CBF_NOTFOUND. + The current row is not affected. + ARGUMENTS + handle CBF handle. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_next_column(self) + + def get_3d_image_size_sf(self, element_number): + r""" + + Returns : size_t ndimslow,size_t ndimmid,size_t ndimfast + *args : Integer element_number + + C prototype: int cbf_get_3d_image_size_sf (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + size_t *ndimslow, size_t *ndimmid, size_t *ndimfast); + + CBFLib documentation: + DESCRIPTION + cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf + set *ndimslow and *ndimfast to the slow and fast dimensions of the + image array for element number element_number. If the array is + 1-dimensional, *ndimslow will be set to the array size and *ndimfast + will be set to 1. If the array is 3-dimensional an error code will be + returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and + cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the + slowest, next fastest and fastest dimensions, respectively, of the 3D + image array for element number element_number. If the array is + 1-dimensional, *ndimslow will be set to the array size and *ndimmid + and + + """ + return _py2cbf.cbf_handle_struct_get_3d_image_size_sf(self, element_number) + + def get_realarrayparameters_wdims_fs(self): + r""" + + Returns : int compression,int binary_id,int elsize,int elements,char **bo, + int *bolen,int dimfast,int dimmid,int dimslow,int padding + *args : + + C prototype: int cbf_get_realarrayparameters_wdims_fs (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + size_t *elements, const char **byteorder, size_t *dimfast, + size_t *dimmid, size_t *dimslow, size_t *padding); + + CBFLib documentation: + DESCRIPTION + cbf_get_integerarrayparameters sets *compression, *binary_id, + *elsize, *elsigned, *elunsigned, *elements, *minelement and + *maxelement to values read from the binary value of the item at the + current column and row. This provides all the arguments needed for a + subsequent call to cbf_set_integerarray, if a copy of the array is to + be made into another CIF or CBF. cbf_get_realarrayparameters sets + *compression, *binary_id, *elsize, *elements to values read from the + binary value of the item at the current column and row. This provides + all the arguments needed for a subsequent call to cbf_set_realarray, + if a copy of the arry is to be made into another CIF or CBF. + The variants cbf_get_integerarrayparameters_wdims, + cbf_get_integerarrayparameters_wdims_fs, + cbf_get_integerarrayparameters_wdims_sf, + cbf_get_realarrayparameters_wdims, + cbf_get_realarrayparameters_wdims_fs, + cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, + *dimmid, *dimslow, and *padding as well, providing the additional + parameters needed for a subsequent call to cbf_set_integerarray_wdims + or cbf_set_realarray_wdims. + The value returned in *byteorder is a pointer either to the string + "little_endian " or to the string "big_endian ". This should be + the byte order of the data, not necessarily of the host machine. No + attempt should be made to modify this string. At this time only + "little_endian " will be returned. + The values returned in *dimfast, *dimmid and *dimslow are the sizes + of the fastest changing, second fastest changing and third fastest + changing dimensions of the array, if specified, or zero, if not + specified. + The value returned in *padding is the size of the post-data padding, + if any and if specified in the data header. The value is given as a + count of octets. + If the value is not binary, the function returns CBF_ASCII. + ARGUMENTS + handle CBF handle. compression Compression method used. + elsize Size in bytes of each array element. binary_id + Pointer to the destination integer binary identifier. elsigned + Pointer to an integer. Set to 1 if the elements can be read as signed + integers. elunsigned Pointer to an integer. Set to 1 if the + elements can be read as unsigned integers. elements Pointer to + the destination number of elements. minelement Pointer to the + destination smallest element. maxelement Pointer to the + destination largest element. byteorder Pointer to the destination + byte order. dimfast Pointer to the destination fastest + dimension. dimmid Pointer to the destination second fastest + dimension. dimslow Pointer to the destination third fastest + dimension. padding Pointer to the destination padding size. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_get_realarrayparameters_wdims_fs(self) + + def get_realarray_as_string(self): + r""" + + Returns : (Binary)String + *args : + + C prototype: int cbf_get_realarray (cbf_handle handle, int *binary_id, + void *array, size_t elsize, size_t elements, + size_t *elements_read); + + CBFLib documentation: + DESCRIPTION + cbf_get_integerarray reads the binary value of the item at the + current column and row into an integer array. The array consists of + elements elements of elsize bytes each, starting at array. The + elements are signed if elsigned is non-0 and unsigned otherwise. + *binary_id is set to the binary section identifier and *elements_read + to the number of elements actually read. cbf_get_realarray reads the + binary value of the item at the current column and row into a real + array. The array consists of elements elements of elsize bytes each, + starting at array. *binary_id is set to the binary section identifier + and *elements_read to the number of elements actually read. + If any element in the integer binary data cant fit into the + destination element, the destination is set the nearest possible + value. + If the value is not binary, the function returns CBF_ASCII. + If the requested number of elements cant be read, the function will + read as many as it can and then return CBF_ENDOFDATA. + Currently, the destination array must consist of chars, shorts or + ints (signed or unsigned). If elsize is not equal to sizeof (char), + sizeof (short) or sizeof (int), for cbf_get_integerarray, or + sizeof(double) or sizeof(float), for cbf_get_realarray the function + returns CBF_ARGUMENT. + An additional restriction in the current version of CBFlib is that + values too large to fit in an int are not correctly decompressed. As + an example, if the machine with 32-bit ints is reading an array + containing a value outside the range 0 .. 2^^32-1 (unsigned) or + -2^^31 .. 2^^31-1 (signed), the array will not be correctly + decompressed. This restriction will be removed in a future release. + For cbf_get_realarray, only IEEE format is supported. No conversion + to other floating point formats is done at this time. + ARGUMENTS + handle CBF handle. binary_id Pointer to the + destination integer binary identifier. array Pointer to the + destination array. elsize Size in bytes of each destination + array element. elsigned Set to non-0 if the destination array + elements are signed. elements The number of elements to read. + elements_read Pointer to the destination number of elements + actually read. + RETURN VALUE + Returns an error code on failure or 0 for success. SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_get_realarray_as_string(self) + + def get_bin_sizes(self, element_number): + r""" + + Returns : Float slowbinsize,Float fastbinsize + *args : Integer element_number + + C prototype: int cbf_get_bin_sizes(cbf_handle handle, + unsigned int element_number, double * slowbinsize, + double * fastbinsize); + + CBFLib documentation: + DESCRIPTION + cbf_get_bin_sizes sets slowbinsize to point to the value of the + number of pixels composing one array element in the dimension that + changes at the second-fastest rate and fastbinsize to point to the + value of the number of pixels composing one array element in the + dimension that changes at the fastest rate for the dectector element + with the ordinal element_number. cbf_set_bin_sizes sets the the pixel + bin sizes in the "array_intensities " category to the values of + slowbinsize_in for the number of pixels composing one array element + in the dimension that changes at the second-fastest rate and + fastbinsize_in for the number of pixels composing one array element + in the dimension that changes at the fastest rate for the dectector + element with the ordinal element_number. + In order to allow for software binning involving fractions of pixels, + the bin sizes are doubles rather than ints. + ARGUMENTS + handle CBF handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. slowbinsize Pointer to the + returned number of pixels composing one array element in the + dimension that changes at the second-fastest rate. fastbinsize + Pointer to the returned number of pixels composing one array element + in the dimension that changes at the fastest rate. slowbinsize_in + The number of pixels composing one array element in the dimension + that changes at the second-fastest rate. fastbinsize_in The number + of pixels composing one array element in the dimension that changes + at the fastest rate. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_bin_sizes(self, element_number) + + def reset_category(self): + r""" + + Returns : + *args : + + C prototype: int cbf_reset_category (cbf_handle handle); + + CBFLib documentation: + DESCRIPTION + cbf_reset_category deletes all columns and rows from current category. + ARGUMENTS + handle CBF handle. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_reset_category(self) + + def count_axis_ancestors(self, axis_id): + r""" + + Returns : Integer + *args : String axis_id + + C prototype: int cbf_count_axis_ancestors (cbf_handle handle, + const char *axis_id, unsigned int *ancestors); + + CBFLib documentation: + DESCRIPTION + cbf_count_axis_ancestors sets ancestors to the number of ancestors of + axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor + axis of index ancestor_index of axis axis_id, starting with axis_id + for ancestor_index 0. + cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of + axis_id or to ". " if there is no such ancestor. + cbf_get_axis_equipment sets *equipment to the equipment of axis_id or + to ". " if there is no such equipment. + cbf_get_axis_equipment_component sets *equipment_component to the + equipment_component of axis_id or to ". " if there is no such + equipment_component. + cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the + components of the ofset of axis_id. + cbf_get_axis_rotation sets rotation to the rotation of axis_id or to + 0 if there is no such rotation. cbf_get_axis_rotation_axis sets + *rotation_axis to the rotation_axis of axis_id or to ". " if there + is no such rotation_axis. + cbf_get_axis_setting sets *start and *increment to the corresponding + values of the axis axis_id. Any of the destination pointers may be + NULL. + cbf_get_axis_type sets axis_type to the type of axis_id. + cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the + components of the vector of axis_id. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any + value other than 0 is invalid. axis_id Axis id. + ancestor_index Integer index of the desired ancestor, starting + with 0 for the current axis_id. ancestor Pointer to + destination ancestor name pointer. depends_on Pointer to + destination depends_on name pointer. equipment Pointer to + destination equipment name pointer. equipment_component Pointer to + destination equipment_component name pointer. offset1 + Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. + rotation Pointer to destination rotation value. + rotation_axis Pointer to destination rotation_axisn name + pointer. start Pointer to the destination start + value. increment Pointer to the destination increment + value. type Pointer to destination axis type of type + . vector1 Pointer to destination first vector component + value. vector2 Pointer to destination second vector + component value. vector3 Pointer to destination third + vector component value. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_count_axis_ancestors(self, axis_id) + + def construct_goniometer(self): + r""" + + Returns : pycbf goniometer object + *args : + + C prototype: int cbf_construct_goniometer (cbf_handle handle, + cbf_goniometer *goniometer); + + CBFLib documentation: + DESCRIPTION + cbf_construct_goniometer constructs a goniometer object using the + description in the CBF object handle and initialises the goniometer + handle *goniometer. + ARGUMENTS + handle CBF handle. goniometer Pointer to the destination + goniometer handle. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_construct_goniometer(self) + + def set_datablockname(self, arg): + r""" + + Returns : string + *args : + + C prototype: int cbf_set_datablockname (cbf_handle handle, + const char *datablockname); + + CBFLib documentation: + DESCRIPTION + cbf_set_datablockname changes the name of the current data block to + datablockname. cbf_set_saveframename changes the name of the current + save frame to saveframename. + If a data block or save frame with this name already exists + (comparison is case-insensitive), the function returns CBF_IDENTICAL. + ARGUMENTS + handle CBF handle. datablockname The new data block name. + saveframename The new save frame name. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_set_datablockname(self, arg) + + def get_element_number(self): + r"""get_element_number(cbf_handle_struct self)""" + return _py2cbf.cbf_handle_struct_get_element_number(self) + + def set_crystal_id(self, arg): + r""" + + Returns : string + *args : + + C prototype: int cbf_set_crystal_id (cbf_handle handle, + const char *crystal_id); + + CBFLib documentation: + DESCRIPTION + cbf_set_crystal_id sets the "diffrn.crystal_id " entry to the + ASCII value crystal_id. + ARGUMENTS + handle CBF handle. crystal_id ASCII value. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_crystal_id(self, arg) + + def get_integerarray_as_string(self): + r""" + + Returns : (Binary)String + *args : + + C prototype: int cbf_get_integerarray (cbf_handle handle, int *binary_id, + void *array, size_t elsize, int elsigned, size_t elements, + size_t *elements_read); + + CBFLib documentation: + DESCRIPTION + cbf_get_integerarray reads the binary value of the item at the + current column and row into an integer array. The array consists of + elements elements of elsize bytes each, starting at array. The + elements are signed if elsigned is non-0 and unsigned otherwise. + *binary_id is set to the binary section identifier and *elements_read + to the number of elements actually read. cbf_get_realarray reads the + binary value of the item at the current column and row into a real + array. The array consists of elements elements of elsize bytes each, + starting at array. *binary_id is set to the binary section identifier + and *elements_read to the number of elements actually read. + If any element in the integer binary data cant fit into the + destination element, the destination is set the nearest possible + value. + If the value is not binary, the function returns CBF_ASCII. + If the requested number of elements cant be read, the function will + read as many as it can and then return CBF_ENDOFDATA. + Currently, the destination array must consist of chars, shorts or + ints (signed or unsigned). If elsize is not equal to sizeof (char), + sizeof (short) or sizeof (int), for cbf_get_integerarray, or + sizeof(double) or sizeof(float), for cbf_get_realarray the function + returns CBF_ARGUMENT. + An additional restriction in the current version of CBFlib is that + values too large to fit in an int are not correctly decompressed. As + an example, if the machine with 32-bit ints is reading an array + containing a value outside the range 0 .. 2^^32-1 (unsigned) or + -2^^31 .. 2^^31-1 (signed), the array will not be correctly + decompressed. This restriction will be removed in a future release. + For cbf_get_realarray, only IEEE format is supported. No conversion + to other floating point formats is done at this time. + ARGUMENTS + handle CBF handle. binary_id Pointer to the + destination integer binary identifier. array Pointer to the + destination array. elsize Size in bytes of each destination + array element. elsigned Set to non-0 if the destination array + elements are signed. elements The number of elements to read. + elements_read Pointer to the destination number of elements + actually read. + RETURN VALUE + Returns an error code on failure or 0 for success. SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_get_integerarray_as_string(self) + + def set_3d_image(self, element_number, compression, data, elsize, elsign, ndimslow, ndimmid, ndimfast): + r""" + + Returns : + *args : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimslow,int dimmid,int dimfast + + C prototype: int cbf_set_3d_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array, size_t elsize, int elsign, size_t ndimslow, + size_t ndimmid, size_t ndimfast); + + CBFLib documentation: + DESCRIPTION + cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image + array for element number element_number. The array consists of + ndimfast×ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-zero and unsigned otherwise. + cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf + write the image array for element number element_number. The array + consists of ndimfast×ndimslow IEEE double or float elements of + elsize bytes each, starting at array. cbf_set_3d_image, + cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array + for element number element_number. The array consists of + ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting + at array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and + cbf_set_real_3d_image_sf writes the 3D image array for element number + element_number. The array consists of ndimfast×ndimmid×ndimslow + IEEE double or float elements of elsize bytes each, starting at + array. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + If the array is 1-dimensional, ndimslow should be the array size and + ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the + array is 2-dimensional and the 3D calls are used, ndimslow and + ndimmid should be used for the array dimensions and ndimfast should + be set to 1. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for + cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof + (int), sizeof(double) or sizeof(float), the function returns + CBF_ARGUMENT. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any value other + than 0 is invalid. element_number The number of the detector + element counting from 0 by order of appearance in the + "diffrn_data_frame " category. compression Compression type. + array Pointer to the image array. elsize Size in + bytes of each image array element. elsigned Set to non-0 if + the image array elements are signed. ndimslow Slowest array + dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_3d_image(self, element_number, compression, data, elsize, elsign, ndimslow, ndimmid, ndimfast) + + def set_dictionary(self, other): + r""" + + Returns : + *args : CBFHandle dictionary + + C prototype: int cbf_set_dictionary (cbf_handle handle, + cbf_handle dictionary_in); + + CBFLib documentation: + DESCRIPTION + cbf_get_dictionary sets *dictionary to the handle of a CBF which has + been associated with the CBF handle by cbf_set_dictionary. + cbf_set_dictionary associates the CBF handle dictionary_in with + handle as its dictionary. cbf_require_dictionary sets *dictionary to + the handle of a CBF which has been associated with the CBF handle by + cbf_set_dictionary or creates a new empty CBF and associates it with + handle, returning the new handle in *dictionary. + ARGUMENTS + handle CBF handle. dictionary Pointer to CBF handle of + dictionary. dictionary_in CBF handle of dcitionary. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_dictionary(self, other) + + def find_tag_category(self, tagname): + r""" + + Returns : String categoryname + *args : String tagname + + C prototype: int cbf_find_tag_category (cbf_handle handle, + const char* tagname, const char** categoryname); + + CBFLib documentation: + DESCRIPTION + cbf_find_tag_category sets categoryname to the category associated + with tagname in the dictionary associated with handle. + cbf_set_tag_category upddates the dictionary associated with handle + to indicated that tagname is in category categoryname_in. + ARGUMENTS + handle CBF handle. tagname tag name. + categoryname pointer to a returned category name. + categoryname_in input category name. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_find_tag_category(self, tagname) + + def get_real_3d_image_sf_as_string(self, element_number, elsize, ndimslow, ndimmid, ndimfast): + r""" + + Returns : (Binary)String + *args : int element_number,int elsize,int ndimslow,int ndimmid,int ndimfast + + C prototype: int cbf_get_real_3d_image_sf (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + void *array, size_t elsize, size_t ndimslow, + size_t ndimmid, size_t ndimfast); + + CBFLib documentation: + DESCRIPTION + cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image + array for element number element_number into an array. The array + consists of ndimslow×ndimfast elements of elsize bytes each, + starting at array. The elements are signed if elsign is non-0 and + unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and + cbf_get_real_image_sf read the image array of IEEE doubles or floats + for element number element_number into an array. A real array is + always signed. cbf_get_3d_image, cbf_get_3d_image_fs and + cbf_get_3d_image_sf read the 3D image array for element number + element_number into an array. The array consists of + ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting + at array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or + floats for element number element_number into an array. A real array + is always signed. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + The structure of the array as a 1-, 2- or 3-dimensional array should + agree with the structure of the array given in the + ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, + ndimslow should be the array size and ndimfast and, for the 3D calls, + ndimmid, should be set to 1 both in the call and in the imgCIF data + being processed. If the array is 2-dimensional and a 3D call is used, + ndimslow and ndimmid should be the + + """ + return _py2cbf.cbf_handle_struct_get_real_3d_image_sf_as_string(self, element_number, elsize, ndimslow, ndimmid, ndimfast) + + def set_typeofvalue(self, arg): + r""" + + Returns : string + *args : + + C prototype: int cbf_set_typeofvalue (cbf_handle handle, + const char *typeofvalue); + + CBFLib documentation: + DESCRIPTION + cbf_set_typeofvalue sets the type of the item at the current column + and row to the type specified by the ASCII character string given by + typeofvalue. The strings that may be used are: + "null " for a null value indicated by a ". " or a "? " + "bnry " for a binary value "word " for an unquoted string + "dblq " for a double-quoted string "sglq " for a single-quoted + string "text " for a semicolon-quoted string (multiline text + field) "prns " for a parenthesis-bracketed string (multiline text + field) "brcs " for a brace-bracketed string (multiline text field) + "bkts " for a square-bracket-bracketed string (multiline text + field) "tsqs " for a treble-single-quote quoted string (multiline + text field) "tdqs " for a treble-double-quote quoted string + (multiline text field) + Not all types may be used for all values. Not all types are valid for + all type of CIF files. In partcular the types "prns ", "brcs ", + "bkts " were introduced with DDLm and are not valid in DDL1 or + DDL2 CIFS. The types "tsqs " and "tdqs " are not formally part + of the CIF syntax. No changes may be made to the type of binary + values. You may not set the type of a string that contains a single + quote followed by a blank or a tab or which contains multiple lines + to "sglq ". You may not set the type of a string that contains a + double quote followed by a blank or a tab or which contains multiple + lines to "dblq ". + ARGUMENTS + handle CBF handle. typeofvalue ASCII string for desired type + of value. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_set_typeofvalue(self, arg) + + def get_axis_rotation_axis(self, axis_id): + r""" + + Returns : String + *args : String axis_id + + C prototype: int cbf_get_axis_rotation_axis (cbf_handle handle, + const char *axis_id, const char * *rotation_axis); + + CBFLib documentation: + DESCRIPTION + cbf_count_axis_ancestors sets ancestors to the number of ancestors of + axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor + axis of index ancestor_index of axis axis_id, starting with axis_id + for ancestor_index 0. + cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of + axis_id or to ". " if there is no such ancestor. + cbf_get_axis_equipment sets *equipment to the equipment of axis_id or + to ". " if there is no such equipment. + cbf_get_axis_equipment_component sets *equipment_component to the + equipment_component of axis_id or to ". " if there is no such + equipment_component. + cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the + components of the ofset of axis_id. + cbf_get_axis_rotation sets rotation to the rotation of axis_id or to + 0 if there is no such rotation. cbf_get_axis_rotation_axis sets + *rotation_axis to the rotation_axis of axis_id or to ". " if there + is no such rotation_axis. + cbf_get_axis_setting sets *start and *increment to the corresponding + values of the axis axis_id. Any of the destination pointers may be + NULL. + cbf_get_axis_type sets axis_type to the type of axis_id. + cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the + components of the vector of axis_id. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any + value other than 0 is invalid. axis_id Axis id. + ancestor_index Integer index of the desired ancestor, starting + with 0 for the current axis_id. ancestor Pointer to + destination ancestor name pointer. depends_on Pointer to + destination depends_on name pointer. equipment Pointer to + destination equipment name pointer. equipment_component Pointer to + destination equipment_component name pointer. offset1 + Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. + rotation Pointer to destination rotation value. + rotation_axis Pointer to destination rotation_axisn name + pointer. start Pointer to the destination start + value. increment Pointer to the destination increment + value. type Pointer to destination axis type of type + . vector1 Pointer to destination first vector component + value. vector2 Pointer to destination second vector + component value. vector3 Pointer to destination third + vector component value. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_axis_rotation_axis(self, axis_id) + + def set_integerarray_wdims(self, compression, binary_id, data, elsize, elsigned, elements, bo, dimfast, dimmid, dimslow, padding): + r""" + + Returns : + *args : int compression,int binary_id,(binary) String data,int elsize, + int elsigned,int elements,String byteorder,int dimfast,int dimmid, + int dimslow,int padding + + C prototype: int cbf_set_integerarray_wdims (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, int elsigned, size_t elements, + const char *byteorder, size_t dimfast, size_t dimmid, + size_t dimslow, size_t padding); + + CBFLib documentation: + DESCRIPTION + cbf_set_integerarray sets the binary value of the item at the current + column and row to an integer array. The array consists of elements + elements of elsize bytes each, starting at array. The elements are + signed if elsigned is non-0 and unsigned otherwise. binary_id is the + binary section identifier. cbf_set_realarray sets the binary value of + the item at the current column and row to an integer array. The array + consists of elements elements of elsize bytes each, starting at + array. binary_id is the binary section identifier. + The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, + cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, + cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants + allow the data header values of byteorder, dimfast, dimmid, dimslow + and padding to be set to the data byte order, the fastest, second + fastest and third fastest array dimensions and the size in byte of + the post data padding to be used. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + NOTE: This scheme is by far the slowest of the four and uses much + more disk space. It is intended for routine use with small arrays + only. With large arrays (like images) it should be used only for + debugging. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned), for cbf_set_integerarray, or IEEE doubles or + floats for cbf_set_realarray. If elsize is not equal to sizeof + (char), sizeof (short) or sizeof (int), the function returns + CBF_ARGUMENT. + ARGUMENTS + handle CBF handle. compression Compression method to use. + binary_id Integer binary identifier. array Pointer to the + source array. elsize Size in bytes of each source array + element. elsigned Set to non-0 if the source array elements are + signed. elements The number of elements in the array + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_set_integerarray_wdims(self, compression, binary_id, data, elsize, elsigned, elements, bo, dimfast, dimmid, dimslow, padding) + + def set_integration_time(self, time): + r""" + + Returns : + *args : Float time + + C prototype: int cbf_set_integration_time (cbf_handle handle, + unsigned int reserved, double time); + + CBFLib documentation: + DESCRIPTION + cbf_set_integration_time sets the integration time in seconds to the + value specified by time. The parameter reserved is presently unused + and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any value other than 0 is + invalid. time Integration time in seconds. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_integration_time(self, time) + + def set_axis_setting(self, axis_id, start, increment): + r""" + + Returns : + *args : String axis_id,Float start,Float increment + + C prototype: int cbf_set_axis_setting (cbf_handle handle, + unsigned int reserved, const char *axis_id, double start, + double increment); + + CBFLib documentation: + DESCRIPTION + cbf_set_axis_setting sets the starting and increment values of the + axis axis_id to start and increment. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any value other than 0 is + invalid. axis_id Axis id. start Start value. increment + Increment value. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_axis_setting(self, axis_id, start, increment) + + def get_real_image_as_string(self, element_number, elsize, ndimslow, ndimfast): + r""" + + Returns : (Binary)String + *args : int element_number,int elsize,int ndimslow,int ndimfast + + C prototype: int cbf_get_real_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, + size_t ndimslow, size_t ndimfast); + + CBFLib documentation: + DESCRIPTION + cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image + array for element number element_number into an array. The array + consists of ndimslow×ndimfast elements of elsize bytes each, + starting at array. The elements are signed if elsign is non-0 and + unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and + cbf_get_real_image_sf read the image array of IEEE doubles or floats + for element number element_number into an array. A real array is + always signed. cbf_get_3d_image, cbf_get_3d_image_fs and + cbf_get_3d_image_sf read the 3D image array for element number + element_number into an array. The array consists of + ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting + at array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or + floats for element number element_number into an array. A real array + is always signed. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + The structure of the array as a 1-, 2- or 3-dimensional array should + agree with the structure of the array given in the + ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, + ndimslow should be the array size and ndimfast and, for the 3D calls, + ndimmid, should be set to 1 both in the call and in the imgCIF data + being processed. If the array is 2-dimensional and a 3D call is used, + ndimslow and ndimmid should be the + + """ + return _py2cbf.cbf_handle_struct_get_real_image_as_string(self, element_number, elsize, ndimslow, ndimfast) + + def get_axis_ancestor(self, axis_id, ancestor_index): + r""" + + Returns : String + *args : String axis_id,Integer ancestor_index + + C prototype: int cbf_get_axis_ancestor (cbf_handle handle, + const char *axis_id, const unsigned int ancestor_index, + const char * *ancestor); + + CBFLib documentation: + DESCRIPTION + cbf_count_axis_ancestors sets ancestors to the number of ancestors of + axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor + axis of index ancestor_index of axis axis_id, starting with axis_id + for ancestor_index 0. + cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of + axis_id or to ". " if there is no such ancestor. + cbf_get_axis_equipment sets *equipment to the equipment of axis_id or + to ". " if there is no such equipment. + cbf_get_axis_equipment_component sets *equipment_component to the + equipment_component of axis_id or to ". " if there is no such + equipment_component. + cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the + components of the ofset of axis_id. + cbf_get_axis_rotation sets rotation to the rotation of axis_id or to + 0 if there is no such rotation. cbf_get_axis_rotation_axis sets + *rotation_axis to the rotation_axis of axis_id or to ". " if there + is no such rotation_axis. + cbf_get_axis_setting sets *start and *increment to the corresponding + values of the axis axis_id. Any of the destination pointers may be + NULL. + cbf_get_axis_type sets axis_type to the type of axis_id. + cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the + components of the vector of axis_id. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any + value other than 0 is invalid. axis_id Axis id. + ancestor_index Integer index of the desired ancestor, starting + with 0 for the current axis_id. ancestor Pointer to + destination ancestor name pointer. depends_on Pointer to + destination depends_on name pointer. equipment Pointer to + destination equipment name pointer. equipment_component Pointer to + destination equipment_component name pointer. offset1 + Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. + rotation Pointer to destination rotation value. + rotation_axis Pointer to destination rotation_axisn name + pointer. start Pointer to the destination start + value. increment Pointer to the destination increment + value. type Pointer to destination axis type of type + . vector1 Pointer to destination first vector component + value. vector2 Pointer to destination second vector + component value. vector3 Pointer to destination third + vector component value. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_axis_ancestor(self, axis_id, ancestor_index) + + def get_3d_image_sf_as_string(self, element_number, elsize, elsign, ndimfast, ndimmid, ndimslow): + r""" + + Returns : (Binary)String + *args : int element_number,int elsize,int elsign,int ndimslow,int ndimmid, + int ndimfast + + C prototype: int cbf_get_3d_image_sf (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + void *array, size_t elsize, int elsign, size_t ndimslow, + size_t ndimmid, size_t ndimfast); + + CBFLib documentation: + DESCRIPTION + cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image + array for element number element_number into an array. The array + consists of ndimslow×ndimfast elements of elsize bytes each, + starting at array. The elements are signed if elsign is non-0 and + unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and + cbf_get_real_image_sf read the image array of IEEE doubles or floats + for element number element_number into an array. A real array is + always signed. cbf_get_3d_image, cbf_get_3d_image_fs and + cbf_get_3d_image_sf read the 3D image array for element number + element_number into an array. The array consists of + ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting + at array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or + floats for element number element_number into an array. A real array + is always signed. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + The structure of the array as a 1-, 2- or 3-dimensional array should + agree with the structure of the array given in the + ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, + ndimslow should be the array size and ndimfast and, for the 3D calls, + ndimmid, should be set to 1 both in the call and in the imgCIF data + being processed. If the array is 2-dimensional and a 3D call is used, + ndimslow and ndimmid should be the + + """ + return _py2cbf.cbf_handle_struct_get_3d_image_sf_as_string(self, element_number, elsize, elsign, ndimfast, ndimmid, ndimslow) + + def set_real_image_fs(self, element_number, compression, data, elsize, ndimfast, ndimslow): + r""" + + Returns : + *args : int element_number,int compression,(binary) String data,int elsize, + int dimfast,int dimslow + + C prototype: int cbf_set_real_image_fs(cbf_handle handle, + unsigned int reserved, unsigned int element_number, + unsigned int compression, void *array,size_t elsize, + size_t ndimfast, size_t ndimslow); + + CBFLib documentation: + DESCRIPTION + cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image + array for element number element_number. The array consists of + ndimfast×ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-zero and unsigned otherwise. + cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf + write the image array for element number element_number. The array + consists of ndimfast×ndimslow IEEE double or float elements of + elsize bytes each, starting at array. cbf_set_3d_image, + cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array + for element number element_number. The array consists of + ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting + at array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and + cbf_set_real_3d_image_sf writes the 3D image array for element number + element_number. The array consists of ndimfast×ndimmid×ndimslow + IEEE double or float elements of elsize bytes each, starting at + array. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + If the array is 1-dimensional, ndimslow should be the array size and + ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the + array is 2-dimensional and the 3D calls are used, ndimslow and + ndimmid should be used for the array dimensions and ndimfast should + be set to 1. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for + cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof + (int), sizeof(double) or sizeof(float), the function returns + CBF_ARGUMENT. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any value other + than 0 is invalid. element_number The number of the detector + element counting from 0 by order of appearance in the + "diffrn_data_frame " category. compression Compression type. + array Pointer to the image array. elsize Size in + bytes of each image array element. elsigned Set to non-0 if + the image array elements are signed. ndimslow Slowest array + dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_real_image_fs(self, element_number, compression, data, elsize, ndimfast, ndimslow) + + def get_overload(self, element_number): + r""" + + Returns : Float overload + *args : Integer element_number + + C prototype: int cbf_get_overload (cbf_handle handle, + unsigned int element_number, double *overload); + + CBFLib documentation: + DESCRIPTION + cbf_get_overload sets *overload to the overload value for element + number element_number. + ARGUMENTS + handle CBF handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. overload Pointer to the + destination overload. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_overload(self, element_number) + + def get_wavelength(self): + r""" + + Returns : double + *args : + + C prototype: int cbf_get_wavelength (cbf_handle handle, double *wavelength); + + CBFLib documentation: + DESCRIPTION + cbf_get_wavelength sets *wavelength to the current wavelength in Å. + ARGUMENTS + handle CBF handle. wavelength Pointer to the destination. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_wavelength(self) + + def next_datablock(self): + r""" + + Returns : + *args : + + C prototype: int cbf_next_datablock (cbf_handle handle); + + CBFLib documentation: + DESCRIPTION + cbf_next_datablock makes the data block following the current data + block the current data block. + If there are no more data blocks, the function returns CBF_NOTFOUND. + The current category becomes undefined. + ARGUMENTS + handle CBF handle. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_next_datablock(self) + + def get_realarrayparameters_wdims(self): + r""" + + Returns : int compression,int binary_id,int elsize,int elements,char **bo, + int *bolen,int dimfast,int dimmid,int dimslow,int padding + *args : + + C prototype: int cbf_get_realarrayparameters_wdims (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + size_t *elements, const char **byteorder, size_t *dimfast, + size_t *dimmid, size_t *dimslow, size_t *padding); + + CBFLib documentation: + DESCRIPTION + cbf_get_integerarrayparameters sets *compression, *binary_id, + *elsize, *elsigned, *elunsigned, *elements, *minelement and + *maxelement to values read from the binary value of the item at the + current column and row. This provides all the arguments needed for a + subsequent call to cbf_set_integerarray, if a copy of the array is to + be made into another CIF or CBF. cbf_get_realarrayparameters sets + *compression, *binary_id, *elsize, *elements to values read from the + binary value of the item at the current column and row. This provides + all the arguments needed for a subsequent call to cbf_set_realarray, + if a copy of the arry is to be made into another CIF or CBF. + The variants cbf_get_integerarrayparameters_wdims, + cbf_get_integerarrayparameters_wdims_fs, + cbf_get_integerarrayparameters_wdims_sf, + cbf_get_realarrayparameters_wdims, + cbf_get_realarrayparameters_wdims_fs, + cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, + *dimmid, *dimslow, and *padding as well, providing the additional + parameters needed for a subsequent call to cbf_set_integerarray_wdims + or cbf_set_realarray_wdims. + The value returned in *byteorder is a pointer either to the string + "little_endian " or to the string "big_endian ". This should be + the byte order of the data, not necessarily of the host machine. No + attempt should be made to modify this string. At this time only + "little_endian " will be returned. + The values returned in *dimfast, *dimmid and *dimslow are the sizes + of the fastest changing, second fastest changing and third fastest + changing dimensions of the array, if specified, or zero, if not + specified. + The value returned in *padding is the size of the post-data padding, + if any and if specified in the data header. The value is given as a + count of octets. + If the value is not binary, the function returns CBF_ASCII. + ARGUMENTS + handle CBF handle. compression Compression method used. + elsize Size in bytes of each array element. binary_id + Pointer to the destination integer binary identifier. elsigned + Pointer to an integer. Set to 1 if the elements can be read as signed + integers. elunsigned Pointer to an integer. Set to 1 if the + elements can be read as unsigned integers. elements Pointer to + the destination number of elements. minelement Pointer to the + destination smallest element. maxelement Pointer to the + destination largest element. byteorder Pointer to the destination + byte order. dimfast Pointer to the destination fastest + dimension. dimmid Pointer to the destination second fastest + dimension. dimslow Pointer to the destination third fastest + dimension. padding Pointer to the destination padding size. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_get_realarrayparameters_wdims(self) + + def set_orientation_matrix(self, m0, m1, m2, m3, m4, m5, m6, m7, m8): + r""" + + Returns : + *args : Float matrix_0,Float matrix_1,Float matrix_2,Float matrix_3, + Float matrix_4,Float matrix_5,Float matrix_6,Float matrix_7, + Float matrix_8 + + C prototype: int cbf_set_orientation_matrix (cbf_handle handle, + double ub_matrix[9]); + + CBFLib documentation: + DESCRIPTION + cbf_get_orientation_matrix sets ub_matrix to point to the array of + orientation matrix entries in the "diffrn " category in the order + of columns: + "UB[1][1] " "UB[1][2] " "UB[1][3] " "UB[2][1] " + "UB[2][2] " "UB[2][3] " "UB[3][1] " "UB[3][2] " + "UB[3][3] " + cbf_set_orientation_matrix sets the values in the "diffrn " + category to the values pointed to by ub_matrix. + ARGUMENTS + handle CBF handle. ub_matrix Source or destination array of 9 + doubles giving the orientation matrix parameters. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_orientation_matrix(self, m0, m1, m2, m3, m4, m5, m6, m7, m8) + + def new_category(self, arg): + r""" + + Returns : string + *args : + + C prototype: int cbf_new_category (cbf_handle handle, + const char *categoryname); + + CBFLib documentation: + DESCRIPTION + cbf_new_category creates a new category in the current data block + with name categoryname and makes it the current category. + If a category with this name already exists, the existing category + becomes the current category. + ARGUMENTS + handle CBF handle. categoryname The name of the new + category. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_new_category(self, arg) + + def set_gain(self, element_number, gain, gain_esd): + r""" + + Returns : + *args : Float gain,Float gain_esd + + C prototype: int cbf_set_gain (cbf_handle handle, unsigned int element_number, + double gain, double gain_esd); + + CBFLib documentation: + DESCRIPTION + cbf_set_gain sets the gain of element number element_number to the + values specified by gain and gain_esd. + ARGUMENTS + handle CBF handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. gain New gain value. + gain_esd New gain_esd value. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_gain(self, element_number, gain, gain_esd) + + def find_column(self, arg): + r""" + + Returns : string + *args : + + C prototype: int cbf_find_column (cbf_handle handle, const char *columnname); + + CBFLib documentation: + DESCRIPTION + cbf_find_column makes the columns in the current category with name + columnname the current column. + The comparison is case-insensitive. + If the column does not exist, the function returns CBF_NOTFOUND. + The current row is not affected. + ARGUMENTS + handle CBF handle. columnname The name of column to find. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_find_column(self, arg) + + def remove_category(self): + r""" + + Returns : + *args : + + C prototype: int cbf_remove_category (cbf_handle handle); + + CBFLib documentation: + DESCRIPTION + cbf_remove_category deletes the current category. + The current category becomes undefined. + ARGUMENTS + handle CBF handle. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_remove_category(self) + + def get_integerarrayparameters_wdims_sf(self): + r""" + + Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, + int elements,int minelement,int maxelement,char **bo,int *bolen, + int dimslow,int dimmid,int dimfast,int padding + *args : + + C prototype: int cbf_get_integerarrayparameters_wdims_sf (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + int *elsigned, int *elunsigned, size_t *elements, + int *minelement, int *maxelement, const char **byteorder, + size_t *dimslow, size_t *dimmid, size_t *dimfast, + size_t *padding); + + CBFLib documentation: + DESCRIPTION + cbf_get_integerarrayparameters sets *compression, *binary_id, + *elsize, *elsigned, *elunsigned, *elements, *minelement and + *maxelement to values read from the binary value of the item at the + current column and row. This provides all the arguments needed for a + subsequent call to cbf_set_integerarray, if a copy of the array is to + be made into another CIF or CBF. cbf_get_realarrayparameters sets + *compression, *binary_id, *elsize, *elements to values read from the + binary value of the item at the current column and row. This provides + all the arguments needed for a subsequent call to cbf_set_realarray, + if a copy of the arry is to be made into another CIF or CBF. + The variants cbf_get_integerarrayparameters_wdims, + cbf_get_integerarrayparameters_wdims_fs, + cbf_get_integerarrayparameters_wdims_sf, + cbf_get_realarrayparameters_wdims, + cbf_get_realarrayparameters_wdims_fs, + cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, + *dimmid, *dimslow, and *padding as well, providing the additional + parameters needed for a subsequent call to cbf_set_integerarray_wdims + or cbf_set_realarray_wdims. + The value returned in *byteorder is a pointer either to the string + "little_endian " or to the string "big_endian ". This should be + the byte order of the data, not necessarily of the host machine. No + attempt should be made to modify this string. At this time only + "little_endian " will be returned. + The values returned in *dimfast, *dimmid and *dimslow are the sizes + of the fastest changing, second fastest changing and third fastest + changing dimensions of the array, if specified, or zero, if not + specified. + The value returned in *padding is the size of the post-data padding, + if any and if specified in the data header. The value is given as a + count of octets. + If the value is not binary, the function returns CBF_ASCII. + ARGUMENTS + handle CBF handle. compression Compression method used. + elsize Size in bytes of each array element. binary_id + Pointer to the destination integer binary identifier. elsigned + Pointer to an integer. Set to 1 if the elements can be read as signed + integers. elunsigned Pointer to an integer. Set to 1 if the + elements can be read as unsigned integers. elements Pointer to + the destination number of elements. minelement Pointer to the + destination smallest element. maxelement Pointer to the + destination largest element. byteorder Pointer to the destination + byte order. dimfast Pointer to the destination fastest + dimension. dimmid Pointer to the destination second fastest + dimension. dimslow Pointer to the destination third fastest + dimension. padding Pointer to the destination padding size. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_get_integerarrayparameters_wdims_sf(self) + + def get_pixel_size(self, element_number, axis_number): + r""" + + Returns : Float pixel_size + *args : Int element_number,Int axis_number + + C prototype: int cbf_get_pixel_size (cbf_handle handle, + unsigned int element_number, int axis_number, + double *psize); + + CBFLib documentation: + DESCRIPTION + cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to + the double value in millimeters of the axis axis_number of the + detector element element_number. The axis_number is numbered from 1, + starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to + point to the double value in millimeters of the axis axis_number of + the detector element element_number. The axis_number is numbered from + 1, starting with the fastest axis. + If a negative axis number is given, the order of axes is reversed, so + that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the + fastest axis for cbf_get_pixel_size_sf. + If the pixel size is not given explcitly in the "array_element_size + " category, the function returns CBF_NOTFOUND. + ARGUMENTS + handle CBF handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. axis_number The number of the + axis, starting from 1 for the fastest for cbf_get_pixel_size and + cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. + psize Pointer to the destination pixel size. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_pixel_size(self, element_number, axis_number) + + def set_real_image_sf(self, element_number, compression, data, elsize, ndimslow, ndimfast): + r""" + + Returns : + *args : int element_number,int compression,(binary) String data,int elsize, + int dimslow,int dimfast + + C prototype: int cbf_set_real_image_sf(cbf_handle handle, + unsigned int reserved, unsigned int element_number, + unsigned int compression, void *array,size_t elsize, + size_t ndimslow, size_t ndimfast); + + CBFLib documentation: + DESCRIPTION + cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image + array for element number element_number. The array consists of + ndimfast×ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-zero and unsigned otherwise. + cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf + write the image array for element number element_number. The array + consists of ndimfast×ndimslow IEEE double or float elements of + elsize bytes each, starting at array. cbf_set_3d_image, + cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array + for element number element_number. The array consists of + ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting + at array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and + cbf_set_real_3d_image_sf writes the 3D image array for element number + element_number. The array consists of ndimfast×ndimmid×ndimslow + IEEE double or float elements of elsize bytes each, starting at + array. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + If the array is 1-dimensional, ndimslow should be the array size and + ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the + array is 2-dimensional and the 3D calls are used, ndimslow and + ndimmid should be used for the array dimensions and ndimfast should + be set to 1. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for + cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof + (int), sizeof(double) or sizeof(float), the function returns + CBF_ARGUMENT. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any value other + than 0 is invalid. element_number The number of the detector + element counting from 0 by order of appearance in the + "diffrn_data_frame " category. compression Compression type. + array Pointer to the image array. elsize Size in + bytes of each image array element. elsigned Set to non-0 if + the image array elements are signed. ndimslow Slowest array + dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_real_image_sf(self, element_number, compression, data, elsize, ndimslow, ndimfast) + + def require_category(self, arg): + r""" + + Returns : string + *args : + + C prototype: int cbf_require_category (cbf_handle handle, + const char *categoryname); + + CBFLib documentation: + DESCRIPTION + cbf_rewuire_category makes the category in the current data block + with name categoryname the current category, if it exists, or creates + the catagory if it does not exist. + The comparison is case-insensitive. + The current column and row become undefined. + ARGUMENTS + handle CBF handle. categoryname The name of the category to + find. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_require_category(self, arg) + + def get_reciprocal_cell(self): + r""" + + Returns : Float astar,Float bstar,Float cstar,Float alphastar,Float betastar, + Float gammastar + *args : + + C prototype: int cbf_get_reciprocal_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); + + CBFLib documentation: + DESCRIPTION + cbf_get_reciprocal_cell sets cell[0:2] to the double values of the + reciprocal cell edge lengths a^*, b^* and c^* in Ångstroms^-1, + cell[3:5] to the double values of the reciprocal cell angles α^*, + β^* and γ^* in degrees, cell_esd[0:2] to the double values of the + estimated strandard deviations of the reciprocal cell edge lengths + a^*, b^* and c^* in Ångstroms^-1, cell_esd[3:5] to the double values + of the estimated standard deviations of the the reciprocal cell + angles α^*, β^* and γ^* in degrees. + The values returned are retrieved from the first row of the "cell + " category. The value of "_cell.entry_id " is ignored. + cell or cell_esd may be NULL. + If cell is NULL, the reciprocal cell parameters are not retrieved. + If cell_esd is NULL, the reciprocal cell parameter esds are not + retrieved. + If the "cell " category is present, but some of the values are + missing, zeros are returned for the missing values. + ARGUMENTS + handle CBF handle. cell Pointer to the destination array of + 6 doubles for the reciprocal cell parameters. cell_esd Pointer to + the destination array of 6 doubles for the reciprocal cell parameter + esds. + RETURN VALUE + Returns an error code on failure or 0 for success. No errors is + returned for missing values if the "cell " category exists. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_get_reciprocal_cell(self) + + def get_reciprocal_cell_esd(self): + r"""get_reciprocal_cell_esd(cbf_handle_struct self)""" + return _py2cbf.cbf_handle_struct_get_reciprocal_cell_esd(self) + + def get_3d_image_size(self, element_number): + r""" + + Returns : size_t ndimslow,size_t ndimmid,size_t ndimfast + *args : Integer element_number + + C prototype: int cbf_get_3d_image_size (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + size_t *ndimslow, size_t *ndimmid, size_t *ndimfast); + + CBFLib documentation: + DESCRIPTION + cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf + set *ndimslow and *ndimfast to the slow and fast dimensions of the + image array for element number element_number. If the array is + 1-dimensional, *ndimslow will be set to the array size and *ndimfast + will be set to 1. If the array is 3-dimensional an error code will be + returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and + cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the + slowest, next fastest and fastest dimensions, respectively, of the 3D + image array for element number element_number. If the array is + 1-dimensional, *ndimslow will be set to the array size and *ndimmid + and + + """ + return _py2cbf.cbf_handle_struct_get_3d_image_size(self, element_number) + + def find_tag_root(self, tagname): + r""" + + Returns : String tagroot + *args : String tagname + + C prototype: int cbf_find_tag_root (cbf_handle handle, const char* tagname, + const char** tagroot); + + CBFLib documentation: + DESCRIPTION + cbf_find_tag_root sets *tagroot to the root tag of which tagname is + an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in + the dictionary associated with handle, creating the dictionary if + necessary. cbf_require_tag_root sets *tagroot to the root tag of + which tagname is an alias, if there is one, or to the value of + tagname, if tagname is not an alias. + A returned tagroot string must not be modified in any way. + ARGUMENTS + handle CBF handle. tagname tag name which may be an alias. + tagroot pointer to a returned tag root name. tagroot_in input + tag root name. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_find_tag_root(self, tagname) + + def require_category_root(self, categoryname): + r"""require_category_root(cbf_handle_struct self, char const * categoryname) -> char const *""" + return _py2cbf.cbf_handle_struct_require_category_root(self, categoryname) + + def set_realarray_wdims_sf(self, compression, binary_id, data, elsize, elements, bo, dimslow, dimmid, dimfast, padding): + r""" + + Returns : + *args : int compression,int binary_id,(binary) String data,int elsize, + int elements,String byteorder,int dimslow,int dimmid,int dimfast, + int padding + + C prototype: int cbf_set_realarray_wdims_sf (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, size_t elements, const char *byteorder, + size_t dimslow, size_t dimmid, size_t dimfast, + size_t padding); + + CBFLib documentation: + DESCRIPTION + cbf_set_integerarray sets the binary value of the item at the current + column and row to an integer array. The array consists of elements + elements of elsize bytes each, starting at array. The elements are + signed if elsigned is non-0 and unsigned otherwise. binary_id is the + binary section identifier. cbf_set_realarray sets the binary value of + the item at the current column and row to an integer array. The array + consists of elements elements of elsize bytes each, starting at + array. binary_id is the binary section identifier. + The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, + cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, + cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants + allow the data header values of byteorder, dimfast, dimmid, dimslow + and padding to be set to the data byte order, the fastest, second + fastest and third fastest array dimensions and the size in byte of + the post data padding to be used. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + NOTE: This scheme is by far the slowest of the four and uses much + more disk space. It is intended for routine use with small arrays + only. With large arrays (like images) it should be used only for + debugging. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned), for cbf_set_integerarray, or IEEE doubles or + floats for cbf_set_realarray. If elsize is not equal to sizeof + (char), sizeof (short) or sizeof (int), the function returns + CBF_ARGUMENT. + ARGUMENTS + handle CBF handle. compression Compression method to use. + binary_id Integer binary identifier. array Pointer to the + source array. elsize Size in bytes of each source array + element. elsigned Set to non-0 if the source array elements are + signed. elements The number of elements in the array + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_set_realarray_wdims_sf(self, compression, binary_id, data, elsize, elements, bo, dimslow, dimmid, dimfast, padding) + + def set_integervalue(self, number): + r""" + + Returns : int number + *args : + + C prototype: int cbf_set_integervalue (cbf_handle handle, int number); + + CBFLib documentation: + DESCRIPTION + cbf_set_integervalue sets the item at the current column and row to + the integer value number written as a decimal ASCII string. + ARGUMENTS + handle CBF handle. number Integer value. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_set_integervalue(self, number) + + def category_name(self): + r""" + + Returns : + *args : string + + C prototype: int cbf_category_name (cbf_handle handle, + const char **categoryname); + + CBFLib documentation: + DESCRIPTION + cbf_category_name sets *categoryname to point to the name of the + current category of the current data block. + The category name will be valid as long as the category exists. + The name must not be modified by the program in any way. + ARGUMENTS + handle CBF handle. categoryname Pointer to the destination + category name pointer. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_category_name(self) + + def get_typeofvalue(self): + r""" + + Returns : + *args : string + + C prototype: int cbf_get_typeofvalue (cbf_handle handle, + const char **typeofvalue); + + CBFLib documentation: + DESCRIPTION + cbf_get_value sets *typeofvalue to point an ASCII descriptor of the + value of the item at the current column and row. The strings that may + be returned are: + "null " for a null value indicated by a ". " or a "? " + "bnry " for a binary value "word " for an unquoted string + "dblq " for a double-quoted string "sglq " for a single-quoted + string "text " for a semicolon-quoted string (multiline text + field) "prns " for a parenthesis-bracketed string (multiline text + field) "brcs " for a brace-bracketed string (multiline text field) + "bkts " for a square-bracket-bracketed string (multiline text + field) "tsqs " for a treble-single-quote quoted string (multiline + text field) "tdqs " for a treble-double-quote quoted string + (multiline text field) + Not all types are valid for all type of CIF files. In partcular the + types "prns ", "brcs ", "bkts " were introduced with DDLm + and are not valid in DDL1 or DDL2 CIFS. The types "tsqs " and + "tdqs " are not formally part of the CIF syntax. A field for which + no value has been set sets *typeofvalue to NULL rather than to the + string "null ". + The typeofvalue must not be modified by the program in any way. + ARGUMENTS + handle CBF handle. typeofvalue Pointer to the destination + type-of-value string pointer. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_get_typeofvalue(self) + + def set_real_image(self, element_number, compression, data, elsize, ndimslow, ndimfast): + r""" + + Returns : + *args : int element_number,int compression,(binary) String data,int elsize, + int dimslow,int dimfast + + C prototype: int cbf_set_real_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array,size_t elsize, size_t ndimslow, + size_t ndimfast); + + CBFLib documentation: + DESCRIPTION + cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image + array for element number element_number. The array consists of + ndimfast×ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-zero and unsigned otherwise. + cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf + write the image array for element number element_number. The array + consists of ndimfast×ndimslow IEEE double or float elements of + elsize bytes each, starting at array. cbf_set_3d_image, + cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array + for element number element_number. The array consists of + ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting + at array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and + cbf_set_real_3d_image_sf writes the 3D image array for element number + element_number. The array consists of ndimfast×ndimmid×ndimslow + IEEE double or float elements of elsize bytes each, starting at + array. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + If the array is 1-dimensional, ndimslow should be the array size and + ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the + array is 2-dimensional and the 3D calls are used, ndimslow and + ndimmid should be used for the array dimensions and ndimfast should + be set to 1. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for + cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof + (int), sizeof(double) or sizeof(float), the function returns + CBF_ARGUMENT. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any value other + than 0 is invalid. element_number The number of the detector + element counting from 0 by order of appearance in the + "diffrn_data_frame " category. compression Compression type. + array Pointer to the image array. elsize Size in + bytes of each image array element. elsigned Set to non-0 if + the image array elements are signed. ndimslow Slowest array + dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_real_image(self, element_number, compression, data, elsize, ndimslow, ndimfast) + + def get_3d_image_as_string(self, element_number, elsize, elsign, ndimfast, ndimmid, ndimslow): + r""" + + Returns : (Binary)String + *args : int element_number,int elsize,int elsign,int ndimslow,int ndimmid, + int ndimfast + + C prototype: int cbf_get_3d_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, + int elsign, size_t ndimslow, size_t ndimmid, + size_t ndimfast); + + CBFLib documentation: + DESCRIPTION + cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image + array for element number element_number into an array. The array + consists of ndimslow×ndimfast elements of elsize bytes each, + starting at array. The elements are signed if elsign is non-0 and + unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and + cbf_get_real_image_sf read the image array of IEEE doubles or floats + for element number element_number into an array. A real array is + always signed. cbf_get_3d_image, cbf_get_3d_image_fs and + cbf_get_3d_image_sf read the 3D image array for element number + element_number into an array. The array consists of + ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting + at array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or + floats for element number element_number into an array. A real array + is always signed. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + The structure of the array as a 1-, 2- or 3-dimensional array should + agree with the structure of the array given in the + ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, + ndimslow should be the array size and ndimfast and, for the 3D calls, + ndimmid, should be set to 1 both in the call and in the imgCIF data + being processed. If the array is 2-dimensional and a 3D call is used, + ndimslow and ndimmid should be the + + """ + return _py2cbf.cbf_handle_struct_get_3d_image_as_string(self, element_number, elsize, elsign, ndimfast, ndimmid, ndimslow) + + def get_axis_reference_poise(self, axis_id): + r""" + + Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2, + Float offset3 + *args : String axis_id + + C prototype: int cbf_get_axis_reference_poise(cbf_handle handle, + double * vector1, double * vector2, double * vector3, + double * offset1, double * offset2, double * offset3, + const char * axis_id); + + CBFLib documentation: + DESCRIPTION + cbf_get_axis_poise sets vector1, vector2, vector3 to point to the + components of the axis vector for axis axis_id, offset1, offset2, + offset3 to point to the components of the axis base offset vector for + axis axis_id, and angle to point to the angle of rotation of axis + axis_id after application of the axis settings for frame frame_id, + using ratio, a value between 0 and 1, indicating how far into the + internal motion in the frame to go. If frame_id is the string ". + ", the first frame found is used. If there is more than one frame, + which frame will be found is indeterminate. If frame_id is NULL, the + overall setting for the scan are used, rather than those for any + particular frame. The vector and offset reported are the reference + vector and offset of the axis axis_id transformed by application of + all motions of the axes on which axis_id depends. + cbf_get_goniometer_poise vector1, vector2, vector3 to point to the + components of the axis vector for the goniometer axis, offset1, + offset2, offset3 to point to the components of the axis base offset + vector for the goniometer axis, and angle to point to the angle of + rotation of the goniometer axis after application of all axis + settings in the goniometer deriving the vector, offset and angle from + the resulting matrix. Calculation of the vector is indeterminate if + the angle is zero. + cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point + to the components of the axis vector for axis axis_id, offset1, + offset2, offset3 to point to the components of the axis base offset + vector for axis axis_id unmodified by axis rotations. Any of the + pointers may be specified as NULL. + ARGUMENTS + handle CBF handle. ratio A number between 0 and 1 + indication how far into the frame to go vector1 Pointer to the + first component of the axis vector vector2 Pointer to the second + component of the axis vector vector3 Pointer to the third + component of the axis vector offset1 Pointer to the first + component of the axis offset offset2 Pointer to the second + component of the axis offset offset3 Pointer to the third + component of the axis offset angle Pointer to the rotation + angle axis_id The specified axis frame_id The specified + frame positioner CBF goniometer + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_axis_reference_poise(self, axis_id) + + def remove_row(self): + r""" + + Returns : + *args : + + C prototype: int cbf_remove_row (cbf_handle handle); + + CBFLib documentation: + DESCRIPTION + cbf_remove_row deletes the current row in the current category. + If the current row was the last row, it will move down by 1, + otherwise, it will remain the same. + ARGUMENTS + handle CBF handle. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_remove_row(self) + + def set_overload(self, element_number, overload): + r""" + + Returns : + *args : Integer element_number,Float overload + + C prototype: int cbf_set_overload (cbf_handle handle, + unsigned int element_number, double overload); + + CBFLib documentation: + DESCRIPTION + cbf_set_overload sets the overload value of element number + element_number to overload. + ARGUMENTS + handle CBF handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. overload New overload value. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_overload(self, element_number, overload) + + def get_image_size(self, element_number): + r""" + + Returns : size_t ndim1,size_t ndim2 + *args : Integer element_number + + C prototype: int cbf_get_image_size (cbf_handle handle, unsigned int reserved, + unsigned int element_number, size_t *ndimslow, + size_t *ndimfast); + + CBFLib documentation: + DESCRIPTION + cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf + set *ndimslow and *ndimfast to the slow and fast dimensions of the + image array for element number element_number. If the array is + 1-dimensional, *ndimslow will be set to the array size and *ndimfast + will be set to 1. If the array is 3-dimensional an error code will be + returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and + cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the + slowest, next fastest and fastest dimensions, respectively, of the 3D + image array for element number element_number. If the array is + 1-dimensional, *ndimslow will be set to the array size and *ndimmid + and + + """ + return _py2cbf.cbf_handle_struct_get_image_size(self, element_number) + + def set_3d_image_sf(self, element_number, compression, data, elsize, elsign, ndimslow, ndimmid, ndimfast): + r""" + + Returns : + *args : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimslow,int dimmid,int dimfast + + C prototype: int cbf_set_3d_image_sf(cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array, size_t elsize, int elsign, size_t ndimslow, + size_t ndimmid, size_t ndimfast); + + CBFLib documentation: + DESCRIPTION + cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image + array for element number element_number. The array consists of + ndimfast×ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-zero and unsigned otherwise. + cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf + write the image array for element number element_number. The array + consists of ndimfast×ndimslow IEEE double or float elements of + elsize bytes each, starting at array. cbf_set_3d_image, + cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array + for element number element_number. The array consists of + ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting + at array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and + cbf_set_real_3d_image_sf writes the 3D image array for element number + element_number. The array consists of ndimfast×ndimmid×ndimslow + IEEE double or float elements of elsize bytes each, starting at + array. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + If the array is 1-dimensional, ndimslow should be the array size and + ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the + array is 2-dimensional and the 3D calls are used, ndimslow and + ndimmid should be used for the array dimensions and ndimfast should + be set to 1. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for + cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof + (int), sizeof(double) or sizeof(float), the function returns + CBF_ARGUMENT. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any value other + than 0 is invalid. element_number The number of the detector + element counting from 0 by order of appearance in the + "diffrn_data_frame " category. compression Compression type. + array Pointer to the image array. elsize Size in + bytes of each image array element. elsigned Set to non-0 if + the image array elements are signed. ndimslow Slowest array + dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_3d_image_sf(self, element_number, compression, data, elsize, elsign, ndimslow, ndimmid, ndimfast) + + def get_real_image_sf_as_string(self, element_number, elsize, ndimslow, ndimfast): + r""" + + Returns : (Binary)String + *args : int element_number,int elsize,int ndimslow,int ndimfast + + C prototype: int cbf_get_real_image_sf (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + void *array, size_t elsize, size_t ndimslow, + size_t ndimfast); + + CBFLib documentation: + DESCRIPTION + cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image + array for element number element_number into an array. The array + consists of ndimslow×ndimfast elements of elsize bytes each, + starting at array. The elements are signed if elsign is non-0 and + unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and + cbf_get_real_image_sf read the image array of IEEE doubles or floats + for element number element_number into an array. A real array is + always signed. cbf_get_3d_image, cbf_get_3d_image_fs and + cbf_get_3d_image_sf read the 3D image array for element number + element_number into an array. The array consists of + ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting + at array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or + floats for element number element_number into an array. A real array + is always signed. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + The structure of the array as a 1-, 2- or 3-dimensional array should + agree with the structure of the array given in the + ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, + ndimslow should be the array size and ndimfast and, for the 3D calls, + ndimmid, should be set to 1 both in the call and in the imgCIF data + being processed. If the array is 2-dimensional and a 3D call is used, + ndimslow and ndimmid should be the + + """ + return _py2cbf.cbf_handle_struct_get_real_image_sf_as_string(self, element_number, elsize, ndimslow, ndimfast) + + def get_image_as_string(self, element_number, elsize, elsign, ndimslow, ndimfast): + r""" + + Returns : (Binary)String + *args : int element_number,int elsize,int elsign,int ndimslow,int ndimfast + + C prototype: int cbf_get_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, + int elsign, size_t ndimslow, size_t ndimfast); + + CBFLib documentation: + DESCRIPTION + cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image + array for element number element_number into an array. The array + consists of ndimslow×ndimfast elements of elsize bytes each, + starting at array. The elements are signed if elsign is non-0 and + unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and + cbf_get_real_image_sf read the image array of IEEE doubles or floats + for element number element_number into an array. A real array is + always signed. cbf_get_3d_image, cbf_get_3d_image_fs and + cbf_get_3d_image_sf read the 3D image array for element number + element_number into an array. The array consists of + ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting + at array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or + floats for element number element_number into an array. A real array + is always signed. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + The structure of the array as a 1-, 2- or 3-dimensional array should + agree with the structure of the array given in the + ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, + ndimslow should be the array size and ndimfast and, for the 3D calls, + ndimmid, should be set to 1 both in the call and in the imgCIF data + being processed. If the array is 2-dimensional and a 3D call is used, + ndimslow and ndimmid should be the + + """ + return _py2cbf.cbf_handle_struct_get_image_as_string(self, element_number, elsize, elsign, ndimslow, ndimfast) + + def set_tag_root(self, tagname, tagroot_in): + r""" + + Returns : + *args : String tagname,String tagroot_in + + C prototype: int cbf_set_tag_root (cbf_handle handle, const char* tagname, + const char*tagroot_in); + + CBFLib documentation: + DESCRIPTION + cbf_find_tag_root sets *tagroot to the root tag of which tagname is + an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in + the dictionary associated with handle, creating the dictionary if + necessary. cbf_require_tag_root sets *tagroot to the root tag of + which tagname is an alias, if there is one, or to the value of + tagname, if tagname is not an alias. + A returned tagroot string must not be modified in any way. + ARGUMENTS + handle CBF handle. tagname tag name which may be an alias. + tagroot pointer to a returned tag root name. tagroot_in input + tag root name. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_tag_root(self, tagname, tagroot_in) + + def write_widefile(self, filename, ciforcbf, headers, encoding): + r""" + + Returns : + *args : String filename,Integer ciforcbf,Integer Headers,Integer encoding + + C prototype: int cbf_write_widefile (cbf_handle handle, FILE *file, + int readable, int ciforcbf, int flags, int encoding); + + CBFLib documentation: + DESCRIPTION + cbf_write_file writes the CBF object specified by handle into the + file file, following CIF 1.0 conventions of 80 character lines. + cbf_write_widefile writes the CBF object specified by handle into the + file file, following CIF 1.1 conventions of 2048 character lines. A + warning is issued to stderr for ascii lines over the limit, and an + attempt is made to fold lines to fit. No test is performed on binary + sections. + If a dictionary has been provided, aliases will be applied on output. + Unlike cbf_read_file, the file does not have to be random-access. + If the file is random-access and readable, readable can be set to + non-0 to indicate to CBFlib that the file can be used as a buffer to + conserve disk space. If the file is not random-access or not + readable, readable must be 0. + + """ + return _py2cbf.cbf_handle_struct_write_widefile(self, filename, ciforcbf, headers, encoding) + + def count_rows(self): + r""" + + Returns : Integer + *args : + + C prototype: int cbf_count_rows (cbf_handle handle, unsigned int *rows); + + CBFLib documentation: + DESCRIPTION + cbf_count_rows puts the number of rows in the current category in + *rows . + ARGUMENTS + handle CBF handle. rows Pointer to the destination row count. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_count_rows(self) + + def require_datablock(self, arg): + r""" + + Returns : string + *args : + + C prototype: int cbf_require_datablock (cbf_handle handle, + const char *datablockname); + + CBFLib documentation: + DESCRIPTION + cbf_require_datablock makes the data block with name datablockname + the current data block, if it exists, or creates it if it does not. + The comparison is case-insensitive. + The current category becomes undefined. + ARGUMENTS + handle CBF handle. datablockname The name of the data + block to find or create. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_require_datablock(self, arg) + + def set_integerarray(self, compression, binary_id, data, elsize, elsigned, elements): + r""" + + Returns : + *args : int compression,int binary_id,(binary) String data,int elsize, + int elsigned,int elements + + C prototype: int cbf_set_integerarray (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, int elsigned, size_t elements); + + CBFLib documentation: + DESCRIPTION + cbf_set_integerarray sets the binary value of the item at the current + column and row to an integer array. The array consists of elements + elements of elsize bytes each, starting at array. The elements are + signed if elsigned is non-0 and unsigned otherwise. binary_id is the + binary section identifier. cbf_set_realarray sets the binary value of + the item at the current column and row to an integer array. The array + consists of elements elements of elsize bytes each, starting at + array. binary_id is the binary section identifier. + The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, + cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, + cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants + allow the data header values of byteorder, dimfast, dimmid, dimslow + and padding to be set to the data byte order, the fastest, second + fastest and third fastest array dimensions and the size in byte of + the post data padding to be used. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + NOTE: This scheme is by far the slowest of the four and uses much + more disk space. It is intended for routine use with small arrays + only. With large arrays (like images) it should be used only for + debugging. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned), for cbf_set_integerarray, or IEEE doubles or + floats for cbf_set_realarray. If elsize is not equal to sizeof + (char), sizeof (short) or sizeof (int), the function returns + CBF_ARGUMENT. + ARGUMENTS + handle CBF handle. compression Compression method to use. + binary_id Integer binary identifier. array Pointer to the + source array. elsize Size in bytes of each source array + element. elsigned Set to non-0 if the source array elements are + signed. elements The number of elements in the array + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_set_integerarray(self, compression, binary_id, data, elsize, elsigned, elements) + + def new_datablock(self, arg): + r""" + + Returns : string + *args : + + C prototype: int cbf_new_datablock (cbf_handle handle, + const char *datablockname); + + CBFLib documentation: + DESCRIPTION + cbf_new_datablock creates a new data block with name datablockname + and makes it the current data block. cbf_new_saveframe creates a new + save frame with name saveframename within the current data block and + makes the new save frame the current save frame. + If a data block or save frame with this name already exists, the + existing data block or save frame becomes the current data block or + save frame. + ARGUMENTS + handle CBF handle. datablockname The name of the new data + block. saveframename The name of the new save frame. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_new_datablock(self, arg) + + def set_datestamp(self, year, month, day, hour, minute, second, timezone, precision): + r""" + + Returns : + *args : int year,int month,int day,int hour,int minute,double second, + int timezone,Float precision + + C prototype: int cbf_set_datestamp (cbf_handle handle, unsigned int reserved, + int year, int month, int day, int hour, int minute, + double second, int timezone, double precision); + + CBFLib documentation: + DESCRIPTION + cbf_set_datestamp sets the collection timestamp in seconds since + January 1 1970 to the value specified by time. The timezone + difference from UTC + + """ + return _py2cbf.cbf_handle_struct_set_datestamp(self, year, month, day, hour, minute, second, timezone, precision) + + def next_row(self): + r""" + + Returns : + *args : + + C prototype: int cbf_next_row (cbf_handle handle); + + CBFLib documentation: + DESCRIPTION + cbf_next_row makes the row following the current row in the current + category the current row. + If there are no more rows, the function returns CBF_NOTFOUND. + The current column is not affected. + ARGUMENTS + handle CBF handle. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_next_row(self) + + def set_category_root(self, categoryname, categoryroot): + r""" + + Returns : + *args : String categoryname,String categoryroot + + C prototype: int cbf_set_category_root (cbf_handle handle, + const char* categoryname_in, const char*categoryroot); + + CBFLib documentation: + DESCRIPTION + cbf_find_category_root sets *categoryroot to the root category of + which categoryname is an alias. cbf_set_category_root sets + categoryname_in as an alias of categoryroot in the dictionary + associated with handle, creating the dictionary if necessary. + cbf_require_category_root sets *categoryroot to the root category of + which categoryname is an alias, if there is one, or to the value of + categoryname, if categoryname is not an alias. + A returned categoryroot string must not be modified in any way. + ARGUMENTS + handle CBF handle. categoryname category name which + may be an alias. categoryroot pointer to a returned category + root name. categoryroot_in input category root name. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_category_root(self, categoryname, categoryroot) + + def get_axis_offset(self, axis_id): + r""" + + Returns : Float offset1,Float offset2,Float offset3 + *args : String axis_id + + C prototype: int cbf_get_axis_offset (cbf_handle handle, const char *axis_id, + double *offset1, double *offset2, double *offset3); + + CBFLib documentation: + DESCRIPTION + cbf_count_axis_ancestors sets ancestors to the number of ancestors of + axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor + axis of index ancestor_index of axis axis_id, starting with axis_id + for ancestor_index 0. + cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of + axis_id or to ". " if there is no such ancestor. + cbf_get_axis_equipment sets *equipment to the equipment of axis_id or + to ". " if there is no such equipment. + cbf_get_axis_equipment_component sets *equipment_component to the + equipment_component of axis_id or to ". " if there is no such + equipment_component. + cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the + components of the ofset of axis_id. + cbf_get_axis_rotation sets rotation to the rotation of axis_id or to + 0 if there is no such rotation. cbf_get_axis_rotation_axis sets + *rotation_axis to the rotation_axis of axis_id or to ". " if there + is no such rotation_axis. + cbf_get_axis_setting sets *start and *increment to the corresponding + values of the axis axis_id. Any of the destination pointers may be + NULL. + cbf_get_axis_type sets axis_type to the type of axis_id. + cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the + components of the vector of axis_id. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any + value other than 0 is invalid. axis_id Axis id. + ancestor_index Integer index of the desired ancestor, starting + with 0 for the current axis_id. ancestor Pointer to + destination ancestor name pointer. depends_on Pointer to + destination depends_on name pointer. equipment Pointer to + destination equipment name pointer. equipment_component Pointer to + destination equipment_component name pointer. offset1 + Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. + rotation Pointer to destination rotation value. + rotation_axis Pointer to destination rotation_axisn name + pointer. start Pointer to the destination start + value. increment Pointer to the destination increment + value. type Pointer to destination axis type of type + . vector1 Pointer to destination first vector component + value. vector2 Pointer to destination second vector + component value. vector3 Pointer to destination third + vector component value. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_axis_offset(self, axis_id) + + def set_pixel_size_fs(self, element_number, axis_number, psize): + r""" + + Returns : + *args : Int element_number,Int axis_number,Float pixel size + + C prototype: int cbf_set_pixel_size_fs(cbf_handle handle, + unsigned int element_number, int axis_number, + double psize); + + CBFLib documentation: + DESCRIPTION + cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the + "size " column of the "array_structure_list " category at the + row which matches axis axis_number of the detector element + element_number converting the double pixel size psize from meters to + millimeters in storing it in the "size " column for the axis + axis_number of the detector element element_number. The axis_number + is numbered from 1, starting with the slowest axis. + cbf_set_pixel_size_fs sets the item in the "size " column of the + "array_structure_list " category at the row which matches axis + axis_number of the detector element element_number converting the + double pixel size psize from meters to millimeters in storing it in + the "size " column for the axis axis_number of the detector + element element_number. The axis_number is numbered from 1, starting + with the fastest axis. + If a negative axis number is given, the order of axes is reversed, so + that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the + fastest axis for cbf_get_pixel_size_sf. + If the "array_structure_list " category does not already exist, it + is created. + If the appropriate row in the "array_structure_list " catgeory + does not already exist, it is created. + If the pixel size is not given explcitly in the "array_element_size + category ", the function returns CBF_NOTFOUND. + ARGUMENTS + handle CBF handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. axis_number The number of the + axis, fastest first, starting from 1. + + """ + return _py2cbf.cbf_handle_struct_set_pixel_size_fs(self, element_number, axis_number, psize) + + def insert_row(self, arg): + r""" + + Returns : + *args : Integer + + C prototype: int cbf_insert_row (cbf_handle handle, unsigned int rownumber); + + CBFLib documentation: + DESCRIPTION + cbf_insert_row adds a new row to the current category. The new row is + inserted as row rownumber and existing rows starting from rownumber + are moved up by 1. The new row becomes the current row. + If the category has fewer than rownumber rows, the function returns + CBF_NOTFOUND. + The row numbers start from 0. + ARGUMENTS + handle CBF handle. rownumber The row number of the new row. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_insert_row(self, arg) + + def new_column(self, arg): + r""" + + Returns : string + *args : + + C prototype: int cbf_new_column (cbf_handle handle, const char *columnname); + + CBFLib documentation: + DESCRIPTION + cbf_new_column creates a new column in the current category with name + columnname and makes it the current column. + If a column with this name already exists, the existing column + becomes the current category. + ARGUMENTS + handle CBF handle. columnname The name of the new column. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_new_column(self, arg) + + def get_real_3d_image_as_string(self, element_number, elsize, ndimslow, ndimmid, ndimfast): + r""" + + Returns : (Binary)String + *args : int element_number,int elsize,int ndimslow,int ndimmid,int ndimfast + + C prototype: int cbf_get_real_3d_image (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + void *array, size_t elsize, size_t ndimslow, + size_t ndimmid, size_t ndimfast); + + CBFLib documentation: + DESCRIPTION + cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image + array for element number element_number into an array. The array + consists of ndimslow×ndimfast elements of elsize bytes each, + starting at array. The elements are signed if elsign is non-0 and + unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and + cbf_get_real_image_sf read the image array of IEEE doubles or floats + for element number element_number into an array. A real array is + always signed. cbf_get_3d_image, cbf_get_3d_image_fs and + cbf_get_3d_image_sf read the 3D image array for element number + element_number into an array. The array consists of + ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting + at array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or + floats for element number element_number into an array. A real array + is always signed. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + The structure of the array as a 1-, 2- or 3-dimensional array should + agree with the structure of the array given in the + ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, + ndimslow should be the array size and ndimfast and, for the 3D calls, + ndimmid, should be set to 1 both in the call and in the imgCIF data + being processed. If the array is 2-dimensional and a 3D call is used, + ndimslow and ndimmid should be the + + """ + return _py2cbf.cbf_handle_struct_get_real_3d_image_as_string(self, element_number, elsize, ndimslow, ndimmid, ndimfast) + + def get_integration_time(self): + r""" + + Returns : Float time + *args : + + C prototype: int cbf_get_integration_time (cbf_handle handle, + unsigned int reserved, double *time); + + CBFLib documentation: + DESCRIPTION + cbf_get_integration_time sets *time to the integration time in + seconds. The parameter reserved is presently unused and should be set + to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any value other than 0 is + invalid. time Pointer to the destination time. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_integration_time(self) + + def set_realarray(self, compression, binary_id, data, elsize, elements): + r""" + + Returns : + *args : int compression,int binary_id,(binary) String data,int elsize, + int elements + + C prototype: int cbf_set_realarray (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, size_t elements); + + CBFLib documentation: + DESCRIPTION + cbf_set_integerarray sets the binary value of the item at the current + column and row to an integer array. The array consists of elements + elements of elsize bytes each, starting at array. The elements are + signed if elsigned is non-0 and unsigned otherwise. binary_id is the + binary section identifier. cbf_set_realarray sets the binary value of + the item at the current column and row to an integer array. The array + consists of elements elements of elsize bytes each, starting at + array. binary_id is the binary section identifier. + The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, + cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, + cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants + allow the data header values of byteorder, dimfast, dimmid, dimslow + and padding to be set to the data byte order, the fastest, second + fastest and third fastest array dimensions and the size in byte of + the post data padding to be used. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + NOTE: This scheme is by far the slowest of the four and uses much + more disk space. It is intended for routine use with small arrays + only. With large arrays (like images) it should be used only for + debugging. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned), for cbf_set_integerarray, or IEEE doubles or + floats for cbf_set_realarray. If elsize is not equal to sizeof + (char), sizeof (short) or sizeof (int), the function returns + CBF_ARGUMENT. + ARGUMENTS + handle CBF handle. compression Compression method to use. + binary_id Integer binary identifier. array Pointer to the + source array. elsize Size in bytes of each source array + element. elsigned Set to non-0 if the source array elements are + signed. elements The number of elements in the array + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_set_realarray(self, compression, binary_id, data, elsize, elements) + + def get_element_id(self, element_number): + r""" + + Returns : String + *args : Integer element_number + + C prototype: int cbf_get_element_id (cbf_handle handle, + unsigned int element_number, const char **element_id); + + CBFLib documentation: + DESCRIPTION + cbf_get_element_number sets element_number to a number that can be + used in other cbf_simple calls to identify the detector element + element_id and optionally the specific array_id> and + array_section_id. cbf_get_element_id sets *element_id to point to the + ASCII value of the element_number'th + "diffrn_data_frame.detector_element_id " entry, counting from 0. + The element_number is the ordinal of the detector element in the + DIFFRN_DETECTOR_ELEMENT category. If an array_section_id is specified + (i.e. is not NULL), the element_number is the sum of the ordinal of + the detector element plus the number of detector elements multiplied + by the ordinal of array_section_id for the specified array_id> in the + ARRAY_STRUCTURE_LIST_SECTION category. + If the detector element does not exist, the function returns + CBF_NOTFOUND. + The element_id will be valid as long as the item exists and has not + been set to a new value. + The element_id must not be modified by the program in any way. + ARGUMENTS + handle CBF handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. element_id Pointer to the + destination string for cbf_get_element_id, but the string itself for + cbf_get_element_number. array_id The optional array id or + NULL. array_section_id The optional array_section_id or NULL. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_element_id(self, element_number) + + def get_image_sf_as_string(self, element_number, elsize, elsign, ndimslow, ndimfast): + r""" + + Returns : (Binary)String + *args : int element_number,int elsize,int elsign,int ndimslow,int ndimfast + + C prototype: int cbf_get_image_sf (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, + int elsign, size_t ndimslow, size_t ndimfast); + + CBFLib documentation: + DESCRIPTION + cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image + array for element number element_number into an array. The array + consists of ndimslow×ndimfast elements of elsize bytes each, + starting at array. The elements are signed if elsign is non-0 and + unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and + cbf_get_real_image_sf read the image array of IEEE doubles or floats + for element number element_number into an array. A real array is + always signed. cbf_get_3d_image, cbf_get_3d_image_fs and + cbf_get_3d_image_sf read the 3D image array for element number + element_number into an array. The array consists of + ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting + at array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or + floats for element number element_number into an array. A real array + is always signed. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + The structure of the array as a 1-, 2- or 3-dimensional array should + agree with the structure of the array given in the + ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, + ndimslow should be the array size and ndimfast and, for the 3D calls, + ndimmid, should be set to 1 both in the call and in the imgCIF data + being processed. If the array is 2-dimensional and a 3D call is used, + ndimslow and ndimmid should be the + + """ + return _py2cbf.cbf_handle_struct_get_image_sf_as_string(self, element_number, elsize, elsign, ndimslow, ndimfast) + + def construct_positioner(self, axis_id): + r""" + + Returns : pycbf positioner object + *args : String axis_id + + C prototype: int cbf_construct_positioner (cbf_handle handle, + cbf_positioner *positioner, const char *axis_id); + + CBFLib documentation: + DESCRIPTION + cbf_construct_positioner constructs a positioner object for the axis + given by axis_id using the description in the CBF object handle and + initialises the positioner handle *positioner. + cbf_construct_reference positioner constructs a positioner object for + the axis given by axis_id using the description in the CBF object + handle and initialises the detector handle *detector using the + reference settings of the axes. + ARGUMENTS + handle CBF handle. positioner Pointer to the destination + positioner handle. axis_id The identifier of the axis in the + "axis " category. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_construct_positioner(self, axis_id) + + def get_3d_image_size_fs(self, element_number): + r"""get_3d_image_size_fs(cbf_handle_struct self, unsigned int element_number)""" + return _py2cbf.cbf_handle_struct_get_3d_image_size_fs(self, element_number) + + def set_value(self, arg): + r""" + + Returns : string + *args : + + C prototype: int cbf_set_value (cbf_handle handle, const char *value); + + CBFLib documentation: + DESCRIPTION + cbf_set_value sets the item at the current column and row to the + ASCII value value. + ARGUMENTS + handle CBF handle. value ASCII value. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_set_value(self, arg) + + def set_current_timestamp(self, timezone): + r""" + + Returns : + *args : Integer timezone + + C prototype: int cbf_set_current_timestamp (cbf_handle handle, + unsigned int reserved, int timezone); + + CBFLib documentation: + DESCRIPTION + cbf_set_current_timestamp sets the collection timestamp to the + current time. The timezone difference from UTC in minutes is set to + timezone. If no timezone is desired, timezone should be + CBF_NOTIMEZONE. If no timezone is used, the timest amp will be UTC. + The parameter reserved is presently unused and should be set to 0. + The new timestamp will have a precision of 1 second. + ARGUMENTS + handle CBF handle. reserved Unused. Any value other than 0 is + invalid. timezone Timezone difference from UTC in minutes or + CBF_NOTIMEZONE. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_current_timestamp(self, timezone) + + def require_doublevalue(self, defaultvalue): + r""" + + Returns : Float Number + *args : Float Default + + C prototype: int cbf_require_doublevalue (cbf_handle handle, double *number, + double defaultvalue); + + CBFLib documentation: + DESCRIPTION + cbf_get_doublevalue sets *number to the value of the ASCII item at + the current column and row interpreted as a decimal floating-point + number. cbf_require_doublevalue sets *number to the value of the + ASCII item at the current column and row interpreted as a decimal + floating-point number, setting it to defaultvalue if necessary. + If the value is not ASCII, the function returns CBF_BINARY. + ARGUMENTS + handle CBF handle. number Pointer to the destination + number. defaultvalue default number value. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_require_doublevalue(self, defaultvalue) + + def rewind_datablock(self): + r""" + + Returns : + *args : + + C prototype: int cbf_rewind_datablock (cbf_handle handle); + + CBFLib documentation: + DESCRIPTION + cbf_rewind_datablock makes the first data block the current data + block. + If there are no data blocks, the function returns CBF_NOTFOUND. + The current category becomes undefined. + ARGUMENTS + handle CBF handle. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_rewind_datablock(self) + + def require_column_value(self, columnname, defaultvalue): + r""" + + Returns : String Name + *args : String columnnanme,String Default + + C prototype: int cbf_require_column_value (cbf_handle handle, + const char *columnname, const char **value, + const char *defaultvalue); + + CBFLib documentation: + DESCRIPTION + cbf_require_column_doublevalue sets *value to the ASCII item at the + current row for the column given with the name given by *columnname, + or to the string given by defaultvalue if the item cannot be found. + ARGUMENTS + handle CBF handle. columnname Name of the column + containing the number. value pointer to the location to + receive the value. defaultvalue Value to use if the requested + column and value cannot be found. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_require_column_value(self, columnname, defaultvalue) + + def get_dictionary(self): + r""" + + Returns : CBFHandle dictionary + *args : + + C prototype: int cbf_get_dictionary (cbf_handle handle, + cbf_handle * dictionary); + + CBFLib documentation: + DESCRIPTION + cbf_get_dictionary sets *dictionary to the handle of a CBF which has + been associated with the CBF handle by cbf_set_dictionary. + cbf_set_dictionary associates the CBF handle dictionary_in with + handle as its dictionary. cbf_require_dictionary sets *dictionary to + the handle of a CBF which has been associated with the CBF handle by + cbf_set_dictionary or creates a new empty CBF and associates it with + handle, returning the new handle in *dictionary. + ARGUMENTS + handle CBF handle. dictionary Pointer to CBF handle of + dictionary. dictionary_in CBF handle of dcitionary. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_dictionary(self) + + def reset_saveframe(self): + r""" + + Returns : + *args : + + C prototype: int cbf_reset_saveframe (cbf_handle handle); + + CBFLib documentation: + DESCRIPTION + cbf_reset_datablock deletes all categories from the current data + block. cbf_reset_saveframe deletes all categories from the current + save frame. + ARGUMENTS + handle CBF handle. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_reset_saveframe(self) + + def set_reciprocal_cell(self, cell): + r""" + + Returns : + *args : double cell[6] + + C prototype: int cbf_set_reciprocal_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); + + CBFLib documentation: + DESCRIPTION + cbf_set_reciprocal_cell sets the reciprocal cell parameters to the + double values given in cell[0:2] for the reciprocal cell edge lengths + a^*, b^* and c^* in Ångstroms^-1, the double values given in + cell[3:5] for the reciprocal cell angles α^*, β^* and γ^* in + degrees, the double values given in cell_esd[0:2] for the estimated + strandard deviations of the reciprocal cell edge lengths a^*, b^* and + c^* in Ångstroms, and the double values given in cell_esd[3:5] for + the estimated standard deviations of the reciprocal cell angles α^*, + β^* and γ^* in degrees. + The values are placed in the first row of the "cell " category. If + no value has been given for "_cell.entry_id ", it is set to the + value of the "diffrn.id " entry of the current data block. + cell or cell_esd may be NULL. + If cell is NULL, the reciprocal cell parameters are not set. + If cell_esd is NULL, the reciprocal cell parameter esds are not set. + If the "cell " category is not present, it is created. If any of + the necessary columns are not present, they are created. + ARGUMENTS + handle CBF handle. cell Pointer to the array of 6 doubles + for the reciprocal cell parameters. cell_esd Pointer to the array + of 6 doubles for the reciprocal cell parameter esds. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_set_reciprocal_cell(self, cell) + + def set_reciprocal_cell_esd(self, cell_esd): + r""" + + Returns : + *args : double cell_esd[6] + + C prototype: int cbf_set_reciprocal_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); + + CBFLib documentation: + DESCRIPTION + cbf_set_reciprocal_cell sets the reciprocal cell parameters to the + double values given in cell[0:2] for the reciprocal cell edge lengths + a^*, b^* and c^* in Ångstroms^-1, the double values given in + cell[3:5] for the reciprocal cell angles α^*, β^* and γ^* in + degrees, the double values given in cell_esd[0:2] for the estimated + strandard deviations of the reciprocal cell edge lengths a^*, b^* and + c^* in Ångstroms, and the double values given in cell_esd[3:5] for + the estimated standard deviations of the reciprocal cell angles α^*, + β^* and γ^* in degrees. + The values are placed in the first row of the "cell " category. If + no value has been given for "_cell.entry_id ", it is set to the + value of the "diffrn.id " entry of the current data block. + cell or cell_esd may be NULL. + If cell is NULL, the reciprocal cell parameters are not set. + If cell_esd is NULL, the reciprocal cell parameter esds are not set. + If the "cell " category is not present, it is created. If any of + the necessary columns are not present, they are created. + ARGUMENTS + handle CBF handle. cell Pointer to the array of 6 doubles + for the reciprocal cell parameters. cell_esd Pointer to the array + of 6 doubles for the reciprocal cell parameter esds. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_set_reciprocal_cell_esd(self, cell_esd) + + def set_real_3d_image_fs(self, element_number, compression, data, elsize, ndimfast, ndimmid, ndimslow): + r""" + + Returns : + *args : int element_number,int compression,(binary) String data,int elsize, + int dimfast,int dimmid,int dimslow + + C prototype: int cbf_set_real_3d_image_fs(cbf_handle handle, + unsigned int reserved, unsigned int element_number, + unsigned int compression, void *array,size_t elsize, + size_t ndimfast, size_t ndimmid, size_t ndimslow); + + CBFLib documentation: + DESCRIPTION + cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image + array for element number element_number. The array consists of + ndimfast×ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-zero and unsigned otherwise. + cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf + write the image array for element number element_number. The array + consists of ndimfast×ndimslow IEEE double or float elements of + elsize bytes each, starting at array. cbf_set_3d_image, + cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array + for element number element_number. The array consists of + ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting + at array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and + cbf_set_real_3d_image_sf writes the 3D image array for element number + element_number. The array consists of ndimfast×ndimmid×ndimslow + IEEE double or float elements of elsize bytes each, starting at + array. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + If the array is 1-dimensional, ndimslow should be the array size and + ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the + array is 2-dimensional and the 3D calls are used, ndimslow and + ndimmid should be used for the array dimensions and ndimfast should + be set to 1. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for + cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof + (int), sizeof(double) or sizeof(float), the function returns + CBF_ARGUMENT. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any value other + than 0 is invalid. element_number The number of the detector + element counting from 0 by order of appearance in the + "diffrn_data_frame " category. compression Compression type. + array Pointer to the image array. elsize Size in + bytes of each image array element. elsigned Set to non-0 if + the image array elements are signed. ndimslow Slowest array + dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_real_3d_image_fs(self, element_number, compression, data, elsize, ndimfast, ndimmid, ndimslow) + + def set_doublevalue(self, format, number): + r""" + + Returns : + *args : String format,Float number + + C prototype: int cbf_set_doublevalue (cbf_handle handle, const char *format, + double number); + + CBFLib documentation: + DESCRIPTION + cbf_set_doublevalue sets the item at the current column and row to + the floating-point value number written as an ASCII string with the + format specified by format as appropriate for the printf function. + ARGUMENTS + handle CBF handle. format Format for the number. number + Floating-point value. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_set_doublevalue(self, format, number) + + def find_category(self, arg): + r""" + + Returns : string + *args : + + C prototype: int cbf_find_category (cbf_handle handle, + const char *categoryname); + + CBFLib documentation: + DESCRIPTION + cbf_find_category makes the category in the current data block with + name categoryname the current category. + The comparison is case-insensitive. + If the category does not exist, the function returns CBF_NOTFOUND. + The current column and row become undefined. + ARGUMENTS + handle CBF handle. categoryname The name of the category to + find. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_find_category(self, arg) + + def get_integerarrayparameters_wdims_fs(self): + r""" + + Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, + int elements,int minelement,int maxelement,char **bo,int *bolen, + int dimfast,int dimmid,int dimslow,int padding + *args : + + C prototype: int cbf_get_integerarrayparameters_wdims_fs (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + int *elsigned, int *elunsigned, size_t *elements, + int *minelement, int *maxelement, const char **byteorder, + size_t *dimfast, size_t *dimmid, size_t *dimslow, + size_t *padding); + + CBFLib documentation: + DESCRIPTION + cbf_get_integerarrayparameters sets *compression, *binary_id, + *elsize, *elsigned, *elunsigned, *elements, *minelement and + *maxelement to values read from the binary value of the item at the + current column and row. This provides all the arguments needed for a + subsequent call to cbf_set_integerarray, if a copy of the array is to + be made into another CIF or CBF. cbf_get_realarrayparameters sets + *compression, *binary_id, *elsize, *elements to values read from the + binary value of the item at the current column and row. This provides + all the arguments needed for a subsequent call to cbf_set_realarray, + if a copy of the arry is to be made into another CIF or CBF. + The variants cbf_get_integerarrayparameters_wdims, + cbf_get_integerarrayparameters_wdims_fs, + cbf_get_integerarrayparameters_wdims_sf, + cbf_get_realarrayparameters_wdims, + cbf_get_realarrayparameters_wdims_fs, + cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, + *dimmid, *dimslow, and *padding as well, providing the additional + parameters needed for a subsequent call to cbf_set_integerarray_wdims + or cbf_set_realarray_wdims. + The value returned in *byteorder is a pointer either to the string + "little_endian " or to the string "big_endian ". This should be + the byte order of the data, not necessarily of the host machine. No + attempt should be made to modify this string. At this time only + "little_endian " will be returned. + The values returned in *dimfast, *dimmid and *dimslow are the sizes + of the fastest changing, second fastest changing and third fastest + changing dimensions of the array, if specified, or zero, if not + specified. + The value returned in *padding is the size of the post-data padding, + if any and if specified in the data header. The value is given as a + count of octets. + If the value is not binary, the function returns CBF_ASCII. + ARGUMENTS + handle CBF handle. compression Compression method used. + elsize Size in bytes of each array element. binary_id + Pointer to the destination integer binary identifier. elsigned + Pointer to an integer. Set to 1 if the elements can be read as signed + integers. elunsigned Pointer to an integer. Set to 1 if the + elements can be read as unsigned integers. elements Pointer to + the destination number of elements. minelement Pointer to the + destination smallest element. maxelement Pointer to the + destination largest element. byteorder Pointer to the destination + byte order. dimfast Pointer to the destination fastest + dimension. dimmid Pointer to the destination second fastest + dimension. dimslow Pointer to the destination third fastest + dimension. padding Pointer to the destination padding size. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_get_integerarrayparameters_wdims_fs(self) + + def set_realarray_wdims_fs(self, compression, binary_id, data, elsize, elements, bo, dimfast, dimmid, dimslow, padding): + r""" + + Returns : + *args : int compression,int binary_id,(binary) String data,int elsize, + int elements,String byteorder,int dimfast,int dimmid,int dimslow, + int padding + + C prototype: int cbf_set_realarray_wdims_fs (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, size_t elements, const char *byteorder, + size_t dimfast, size_t dimmid, size_t dimslow, + size_t padding); + + CBFLib documentation: + DESCRIPTION + cbf_set_integerarray sets the binary value of the item at the current + column and row to an integer array. The array consists of elements + elements of elsize bytes each, starting at array. The elements are + signed if elsigned is non-0 and unsigned otherwise. binary_id is the + binary section identifier. cbf_set_realarray sets the binary value of + the item at the current column and row to an integer array. The array + consists of elements elements of elsize bytes each, starting at + array. binary_id is the binary section identifier. + The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, + cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, + cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants + allow the data header values of byteorder, dimfast, dimmid, dimslow + and padding to be set to the data byte order, the fastest, second + fastest and third fastest array dimensions and the size in byte of + the post data padding to be used. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + NOTE: This scheme is by far the slowest of the four and uses much + more disk space. It is intended for routine use with small arrays + only. With large arrays (like images) it should be used only for + debugging. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned), for cbf_set_integerarray, or IEEE doubles or + floats for cbf_set_realarray. If elsize is not equal to sizeof + (char), sizeof (short) or sizeof (int), the function returns + CBF_ARGUMENT. + ARGUMENTS + handle CBF handle. compression Compression method to use. + binary_id Integer binary identifier. array Pointer to the + source array. elsize Size in bytes of each source array + element. elsigned Set to non-0 if the source array elements are + signed. elements The number of elements in the array + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_set_realarray_wdims_fs(self, compression, binary_id, data, elsize, elements, bo, dimfast, dimmid, dimslow, padding) + + def find_category_root(self, categoryname): + r""" + + Returns : String categoryroot + *args : String categoryname + + C prototype: int cbf_find_category_root (cbf_handle handle, + const char* categoryname, const char** categoryroot); + + CBFLib documentation: + DESCRIPTION + cbf_find_category_root sets *categoryroot to the root category of + which categoryname is an alias. cbf_set_category_root sets + categoryname_in as an alias of categoryroot in the dictionary + associated with handle, creating the dictionary if necessary. + cbf_require_category_root sets *categoryroot to the root category of + which categoryname is an alias, if there is one, or to the value of + categoryname, if categoryname is not an alias. + A returned categoryroot string must not be modified in any way. + ARGUMENTS + handle CBF handle. categoryname category name which + may be an alias. categoryroot pointer to a returned category + root name. categoryroot_in input category root name. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_find_category_root(self, categoryname) + + def set_integerarray_wdims_fs(self, compression, binary_id, data, elsize, elsigned, elements, bo, dimfast, dimmid, dimslow, padding): + r""" + + Returns : + *args : int compression,int binary_id,(binary) String data,int elsize, + int elsigned,int elements,String byteorder,int dimfast,int dimmid, + int dimslow,int padding + + C prototype: int cbf_set_integerarray_wdims_fs (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, int elsigned, size_t elements, + const char *byteorder, size_t dimfast, size_t dimmid, + size_t dimslow, size_t padding); + + CBFLib documentation: + DESCRIPTION + cbf_set_integerarray sets the binary value of the item at the current + column and row to an integer array. The array consists of elements + elements of elsize bytes each, starting at array. The elements are + signed if elsigned is non-0 and unsigned otherwise. binary_id is the + binary section identifier. cbf_set_realarray sets the binary value of + the item at the current column and row to an integer array. The array + consists of elements elements of elsize bytes each, starting at + array. binary_id is the binary section identifier. + The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, + cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, + cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants + allow the data header values of byteorder, dimfast, dimmid, dimslow + and padding to be set to the data byte order, the fastest, second + fastest and third fastest array dimensions and the size in byte of + the post data padding to be used. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + NOTE: This scheme is by far the slowest of the four and uses much + more disk space. It is intended for routine use with small arrays + only. With large arrays (like images) it should be used only for + debugging. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned), for cbf_set_integerarray, or IEEE doubles or + floats for cbf_set_realarray. If elsize is not equal to sizeof + (char), sizeof (short) or sizeof (int), the function returns + CBF_ARGUMENT. + ARGUMENTS + handle CBF handle. compression Compression method to use. + binary_id Integer binary identifier. array Pointer to the + source array. elsize Size in bytes of each source array + element. elsigned Set to non-0 if the source array elements are + signed. elements The number of elements in the array + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_set_integerarray_wdims_fs(self, compression, binary_id, data, elsize, elsigned, elements, bo, dimfast, dimmid, dimslow, padding) + + def set_image_sf(self, element_number, compression, data, elsize, elsign, ndimslow, ndimfast): + r""" + + Returns : + *args : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimslow,int dimfast + + C prototype: int cbf_set_image_sf(cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array, size_t elsize, int elsign, size_t ndimslow, + size_t ndimfast); + + CBFLib documentation: + DESCRIPTION + cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image + array for element number element_number. The array consists of + ndimfast×ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-zero and unsigned otherwise. + cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf + write the image array for element number element_number. The array + consists of ndimfast×ndimslow IEEE double or float elements of + elsize bytes each, starting at array. cbf_set_3d_image, + cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array + for element number element_number. The array consists of + ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting + at array. The elements are signed if elsign is non-0 and unsigned + otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and + cbf_set_real_3d_image_sf writes the 3D image array for element number + element_number. The array consists of ndimfast×ndimmid×ndimslow + IEEE double or float elements of elsize bytes each, starting at + array. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + If the array is 1-dimensional, ndimslow should be the array size and + ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the + array is 2-dimensional and the 3D calls are used, ndimslow and + ndimmid should be used for the array dimensions and ndimfast should + be set to 1. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for + cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof + (int), sizeof(double) or sizeof(float), the function returns + CBF_ARGUMENT. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any value other + than 0 is invalid. element_number The number of the detector + element counting from 0 by order of appearance in the + "diffrn_data_frame " category. compression Compression type. + array Pointer to the image array. elsize Size in + bytes of each image array element. elsigned Set to non-0 if + the image array elements are signed. ndimslow Slowest array + dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_set_image_sf(self, element_number, compression, data, elsize, elsign, ndimslow, ndimfast) + + def get_axis_equipment(self, axis_id): + r""" + + Returns : String + *args : String axis_id + + C prototype: int cbf_get_axis_equipment (cbf_handle handle, + const char *axis_id, const char * *equipment); + + CBFLib documentation: + DESCRIPTION + cbf_count_axis_ancestors sets ancestors to the number of ancestors of + axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor + axis of index ancestor_index of axis axis_id, starting with axis_id + for ancestor_index 0. + cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of + axis_id or to ". " if there is no such ancestor. + cbf_get_axis_equipment sets *equipment to the equipment of axis_id or + to ". " if there is no such equipment. + cbf_get_axis_equipment_component sets *equipment_component to the + equipment_component of axis_id or to ". " if there is no such + equipment_component. + cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the + components of the ofset of axis_id. + cbf_get_axis_rotation sets rotation to the rotation of axis_id or to + 0 if there is no such rotation. cbf_get_axis_rotation_axis sets + *rotation_axis to the rotation_axis of axis_id or to ". " if there + is no such rotation_axis. + cbf_get_axis_setting sets *start and *increment to the corresponding + values of the axis axis_id. Any of the destination pointers may be + NULL. + cbf_get_axis_type sets axis_type to the type of axis_id. + cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the + components of the vector of axis_id. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any + value other than 0 is invalid. axis_id Axis id. + ancestor_index Integer index of the desired ancestor, starting + with 0 for the current axis_id. ancestor Pointer to + destination ancestor name pointer. depends_on Pointer to + destination depends_on name pointer. equipment Pointer to + destination equipment name pointer. equipment_component Pointer to + destination equipment_component name pointer. offset1 + Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. + rotation Pointer to destination rotation value. + rotation_axis Pointer to destination rotation_axisn name + pointer. start Pointer to the destination start + value. increment Pointer to the destination increment + value. type Pointer to destination axis type of type + . vector1 Pointer to destination first vector component + value. vector2 Pointer to destination second vector + component value. vector3 Pointer to destination third + vector component value. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _py2cbf.cbf_handle_struct_get_axis_equipment(self, axis_id) + + def set_unit_cell(self, cell): + r""" + + Returns : + *args : double cell[6] + + C prototype: int cbf_set_unit_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); + + CBFLib documentation: + DESCRIPTION + cbf_set_unit_cell sets the cell parameters to the double values given + in cell[0:2] for the cell edge lengths a, b and c in Ångstroms, the + double values given in cell[3:5] for the cell angles α, β and γ in + degrees, the double values given in cell_esd[0:2] for the estimated + strandard deviations of the cell edge lengths a, b and c in + Ångstroms, and the double values given in cell_esd[3:5] for the + estimated standard deviations of the the cell angles α, β and γ in + degrees. + The values are placed in the first row of the "cell " category. If + no value has been given for "_cell.entry_id ", it is set to the + value of the "diffrn.id " entry of the current data block. + cell or cell_esd may be NULL. + If cell is NULL, the cell parameters are not set. + If cell_esd is NULL, the cell parameter esds are not set. + If the "cell " category is not present, it is created. If any of + the necessary columns are not present, they are created. + ARGUMENTS + handle CBF handle. cell Pointer to the array of 6 doubles + for the cell parameters. cell_esd Pointer to the array of 6 doubles + for the cell parameter esds. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_set_unit_cell(self, cell) + + def set_unit_cell_esd(self, cell_esd): + r""" + + Returns : + *args : double cell_esd[6] + + C prototype: int cbf_set_unit_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); + + CBFLib documentation: + DESCRIPTION + cbf_set_unit_cell sets the cell parameters to the double values given + in cell[0:2] for the cell edge lengths a, b and c in Ångstroms, the + double values given in cell[3:5] for the cell angles α, β and γ in + degrees, the double values given in cell_esd[0:2] for the estimated + strandard deviations of the cell edge lengths a, b and c in + Ångstroms, and the double values given in cell_esd[3:5] for the + estimated standard deviations of the the cell angles α, β and γ in + degrees. + The values are placed in the first row of the "cell " category. If + no value has been given for "_cell.entry_id ", it is set to the + value of the "diffrn.id " entry of the current data block. + cell or cell_esd may be NULL. + If cell is NULL, the cell parameters are not set. + If cell_esd is NULL, the cell parameter esds are not set. + If the "cell " category is not present, it is created. If any of + the necessary columns are not present, they are created. + ARGUMENTS + handle CBF handle. cell Pointer to the array of 6 doubles + for the cell parameters. cell_esd Pointer to the array of 6 doubles + for the cell parameter esds. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO + + """ + return _py2cbf.cbf_handle_struct_set_unit_cell_esd(self, cell_esd) + +# Register cbf_handle_struct in _pycbf: +_py2cbf.cbf_handle_struct_swigregister(cbf_handle_struct) + + + diff --git a/py2cbf/pycbf.tex b/py2cbf/pycbf.tex new file mode 100644 index 00000000..40c38eeb --- /dev/null +++ b/py2cbf/pycbf.tex @@ -0,0 +1,5787 @@ +\newcommand{\NWtarget}[2]{#2} +\newcommand{\NWlink}[2]{#2} +\newcommand{\NWtxtMacroDefBy}{Fragment defined by} +\newcommand{\NWtxtMacroRefIn}{Fragment referenced in} +\newcommand{\NWtxtMacroNoRef}{Fragment never referenced} +\newcommand{\NWtxtDefBy}{Defined by} +\newcommand{\NWtxtRefIn}{Referenced in} +\newcommand{\NWtxtNoRef}{Not referenced} +\newcommand{\NWtxtFileDefBy}{File defined by} +\newcommand{\NWtxtIdentsUsed}{Uses:} +\newcommand{\NWtxtIdentsNotUsed}{Never used} +\newcommand{\NWtxtIdentsDefed}{Defines:} +\newcommand{\NWsep}{${\diamond}$} +\newcommand{\NWnotglobal}{(not defined globally)} +\newcommand{\NWuseHyperlinks}{} +% pycbf.w +% nuweb source file used to create pycbf documentation +% +% pycbf - python binding to the CBFlib library +% +% Copyright (C) 2005 Jonathan Wright +% ESRF, Grenoble, France +% email: wright@esrf.fr +% +% Revised for CBFlib 0.9 releases, Herbert J. Bernstein, 23 Aug 2010 +% +%###################################################################### +%# # +%# YOU MAY REDISTRIBUTE THE CBFLIB PACKAGE INCLUDING PYCBF UNDER THE # +%# TERMS OF THE GPL # +%# # +%# ALTERNATIVELY YOU MAY REDISTRIBUTE THE CBFLIB API INCLUDING PYCBF # +%# UNDER THE TERMS OF THE LGPL # +%# # +%###################################################################### +% +%########################### GPL NOTICES ############################## +%# # +%# This program is free software; you can redistribute it and/or # +%# modify it under the terms of the GNU General Public License as # +%# published by the Free Software Foundation; either version 2 of # +%# (the License, or (at your option) any later version. # +%# # +%# This program is distributed in the hope that it will be useful, # +%# but WITHOUT ANY WARRANTY; without even the implied warranty of # +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +%# GNU General Public License for more details. # +%# # +%# You should have received a copy of the GNU General Public License # +%# along with this program; if not, write to the Free Software # +%# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # +%# 02111-1307 USA # +%# # +%###################################################################### +% +%######################### LGPL NOTICES ############################### +%# # +%# This library is free software; you can redistribute it and/or # +%# modify it under the terms of the GNU Lesser General Public # +%# License as published by the Free Software Foundation; either # +%# version 2.1 of the License, or (at your option) any later version. # +%# # +%# This library is distributed in the hope that it will be useful, # +%# but WITHOUT ANY WARRANTY; without even the implied warranty of # +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # +%# Lesser General Public License for more details. # +%# # +%# You should have received a copy of the GNU Lesser General Public # +%# License along with this library; if not, write to the Free # +%# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # +%# MA 02110-1301 USA # +%# # +%###################################################################### +% +% Nuweb formatted latex file +% Most of this is standard latex with code rolled in +% Anything to do with @ characters is probably specific to nuweb +% +% +% The word FIXME anywhere in this document indicates +% an area where more attention is still needed. +% +% Note that this file (pycbf.w) does not copy and paste from CBFlib +% (or anywhere) except in the hand wrapped function prototypes. +% +% +% + +\documentclass[10pt,a4paper,twoside,notitlepage]{article} + +\usepackage{graphics} % For the pictures +\usepackage{anysize} % Try to circumvent Latex default margins +\usepackage{fancyhdr} +\usepackage[dvipdfm,bookmarks=true,backref,bookmarksnumbered=true, + bookmarkstype=toc]{hyperref} +\newcommand{\var}[1]{\textbf{\textsf{#1}}} % highlight variables in text +\newcommand{\code}[1]{\textbf{\textsf{#1}}} % highlight code in text +\newcommand{\param}[1]{\textbf{\textsf{#1}}} % ... parameters ... +\newcommand{\mb} [1] {\mathbf{#1}} + + +\begin{document} + +\marginsize{1.5cm}{1.5cm}{1.5cm}{1.5cm} % Needs anysize +%\pagestyle{headings} % These are ugly - fix them somehow? + +\pagestyle{fancy} +%$\renewcommand{\chaptermark}[1]{ +%$ \markboth{\chaptername +%$ \ \thechapter.\ #1} {} } + +\renewcommand{\sectionmark}[1]{ + \markright { + \ \thesection.\ #1} {} } + +\fancyhead[LE,RO]{\rightmark} +\fancyhead[LO,RE]{\leftmark} +\fancyfoot[C]{\today} +\fancyfoot[LE,RO]{\thepage} +\fancyfoot[LO,RE]{J. P. Wright} +\renewcommand{\footrulewidth}{0.4pt} + +\pagenumbering{arabic} % Page numbers + + + +\title{\textbf{\textsf{PyCBF}} \\ A python binding to the CBFlib library} +\author{Jon P. Wright \\ Anyone who wishes to contribute, please do!} +\date{Started Dec 12, 2005, already it is \today} + +\maketitle + +\abstract{ +Area detectors at synchrotron facilities can result in huge amounts of data +being generated very rapidly. +The IUCr (International Union of Crystallography) has devised a standard file +format for storing and annotating such data, in order that it might be more +easily interchanged and exploited. +A c library which gives access to this file format has been developed +by Paul Ellis and Herbert Bernstein (Version 0.7.4, +http://www.bernstein-plus-sons.com/software/CBF/). +In this document a python interface is developed using the SWIG + (http://www.swig.org) +package in order to give the author easy access to binary cif files. +} + +\tableofcontents +\markboth{}{} + +\section*{Index of file names} + +{\small\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} +\item \verb@"linux.sh"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb12a}{12a}.} +\item \verb@"makeflatascii.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb12b}{12b}.} +\item \verb@"make_pycbf.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb10}{10}.} +\item \verb@"py2setup_py.m4"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb11a}{11a}.} +\item \verb@"pycbf.i"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb5b}{5b}\NWlink{nuweb9}{, 9}. +} +\item \verb@"pycbf_test1.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb14}{14}.} +\item \verb@"pycbf_test2.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb15a}{15a}.} +\item \verb@"pycbf_test3.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb15b}{15b}.} +\item \verb@"pycbf_test4.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb17}{17}.} +\item \verb@"pycbf_testfelaxes.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb18}{18}.} +\item \verb@"win32.bat"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb11b}{11b}.} +\item \verb@"xmas/readmarheader.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb20}{20}.} +\item \verb@"xmas/xmasheaders.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb22}{22}.} +\item \verb@"xmas/xmas_cif_template.cif"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb24}{24}.} +\end{list}} + + +\section*{Index of macro names} + +{\small\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} +\item $\langle\,$Constants used for compression\nobreak\ {\footnotesize \NWlink{nuweb3a}{3a}}$\,\rangle$ {\footnotesize {\NWtxtRefIn} \NWlink{nuweb9}{9}.} +\item $\langle\,$Constants used for encoding\nobreak\ {\footnotesize \NWlink{nuweb4b}{4b}}$\,\rangle$ {\footnotesize {\NWtxtRefIn} \NWlink{nuweb9}{9}.} +\item $\langle\,$Constants used for headers\nobreak\ {\footnotesize \NWlink{nuweb3b}{3b}}$\,\rangle$ {\footnotesize {\NWtxtRefIn} \NWlink{nuweb9}{9}.} +\item $\langle\,$Constants used to control CIF parsing\nobreak\ {\footnotesize \NWlink{nuweb4a}{4a}}$\,\rangle$ {\footnotesize {\NWtxtRefIn} \NWlink{nuweb9}{9}.} +\item $\langle\,$Exception handling\nobreak\ {\footnotesize \NWlink{nuweb5a}{5a}}$\,\rangle$ {\footnotesize {\NWtxtRefIn} \NWlink{nuweb9}{9}.} +\end{list}} + +\section*{Things to do} + +\begin{itemize} +\item Write test code to test each and every function for good and bad args etc +\end{itemize} +\section{Introduction} + +The CBFlib library (version 0.7.4) is written in the C language, offering C + (and C++) +programmers a convenient interface to such files. +The current author uses a different language (python) from day to day and +so a python interface was desired. +After a short attempt to make a quick and dirty SWIG interface it was decided +that in the long run it would be better to write a proper interface for python. + +All of the functions in the library return an integer reflecting error status. +Usually these integers seem to be zero, and a non-zero return value appears +to mean an error occurred. +Actual return values are returned via pointers in argument lists. +In order to simplify the authors life (as a user) all of those integers have +been made to disappear if they are zero, and cause an ``exception'' to +be generated if they are not zero. +This solution might not be the best thing to do, and it can always be changed +where the return value is intended to normally be used. + +Actual return values which were passed back via pointer arguments are now +just passed back as (perhaps multiple) return values. +We must look out for INOUT arguments, none seem to have been found yet, but there +might be exceptions. +The author has a vague suspicion that python functions generally do not modify their +arguments, but this might be wrong. + +The library appears to define (at least) three objects. The one we started on +was the cbf\_handle\_struct defined in cbf.h. +Many of the functions have their first argument as a pointer to one +of these structures. Therefore we make this structure an object and then +everything which uses it as first argument is a member function for that +object. + +In order to pass image data back and forth there is a difficulty that python +seems to lack a good way to represent large arrays. +The standard library offers an "array" object which claims to efficiently +hold homogenous numerical data. +Sadly this seems to be limited to one-dimensional arrays. +The builtin string object can hold binary data and this was chosen as +the way to pass the actual binary back and forth between python and CBFlib. +Unfortunately this means the binary data are pretty useless when they arrive +on the python side, so helper functions are provided to convert the data +to a python (standard library) 1D array and also to a "Numeric" array or a +"Numarray" array. +The latter two are popular extension modules for manipulating large arrays. + +\section{Installation prerequisites} + +The document you are reading was generated from a nuweb source file. This +is something very similar to latex with a few extensions for writing out +source code files. As such it keeps together the whole package in a single file +and makes it easier to write documentation. You will need a to obtain the +preprocessing tool nuweb (perhaps from http://nuweb.sourceforge.net) in +order to build from scratch with the file pycbf.w. Preproccessed output +is hopefully also available to you. +We do not recommend editing the SWIG generated wrappers!! + +Only python version 2.4 has been targetted originally (other versions?) so +that you will probably want to have that version of python installed. + +We are building binary extensions, so you also need a working c compiler. +The compiler used by the author was gcc (for both windows and unix) with +the mingw version under windows. + +Finally, you need a copy of swig (from www.swig.org) in order to (re)generate +the c wrappers. + +In case all that sounds scary, then fear not, it is likely that a single download +for windows will just work with the right version of python. Unix systems +come with many of those things available anyway. + +% pycbf_i.w +% nuweb source file used to create +% pycbf.i and to document it in pycbf.w +% +% pycbf - python binding to the CBFlib library +% +% Copyright (C) 2005 Jonathan Wright +% ESRF, Grenoble, France +% email: wright@esrf.fr +% +% Revised for CBFlib 0.9 releases, Herbert J. Bernstein, 23 Aug 2010 +% +%###################################################################### +%# # +%# YOU MAY REDISTRIBUTE THE CBFLIB PACKAGE INCLUDING PYCBF UNDER THE # +%# TERMS OF THE GPL # +%# # +%# ALTERNATIVELY YOU MAY REDISTRIBUTE THE CBFLIB API INCLUDING PYCBF # +%# UNDER THE TERMS OF THE LGPL # +%# # +%###################################################################### +% +%########################### GPL NOTICES ############################## +%# # +%# This program is free software; you can redistribute it and/or # +%# modify it under the terms of the GNU General Public License as # +%# published by the Free Software Foundation; either version 2 of # +%# (the License, or (at your option) any later version. # +%# # +%# This program is distributed in the hope that it will be useful, # +%# but WITHOUT ANY WARRANTY; without even the implied warranty of # +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +%# GNU General Public License for more details. # +%# # +%# You should have received a copy of the GNU General Public License # +%# along with this program; if not, write to the Free Software # +%# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # +%# 02111-1307 USA # +%# # +%###################################################################### +% +%######################### LGPL NOTICES ############################### +%# # +%# This library is free software; you can redistribute it and/or # +%# modify it under the terms of the GNU Lesser General Public # +%# License as published by the Free Software Foundation; either # +%# version 2.1 of the License, or (at your option) any later version. # +%# # +%# This library is distributed in the hope that it will be useful, # +%# but WITHOUT ANY WARRANTY; without even the implied warranty of # +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # +%# Lesser General Public License for more details. # +%# # +%# You should have received a copy of the GNU Lesser General Public # +%# License along with this library; if not, write to the Free # +%# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # +%# MA 02110-1301 USA # +%# # +%###################################################################### +% +\section{Generating the c interface - the SWIG file} + +Essentially the swig file starts by saying what to include to build the wrappers, +and then goes on to define the python interface for each function we want to call. + +The library appears to define at least three ``objects''; a CBF handle, a cbf\_goniometer and +a cbf\_detector. We will attempt to map these onto python classes. + +FIXME - decide whether introduce a "binary array" class with converters to +more common representations? + +All of the functions in the library appear to return 0 on success and a +meaningful error code on failure. +We try to propagate that error code across the language barrier via exceptions. + +So the SWIG file will start off by including the header files needed +for compilation. Note the defintion of constants to be passed as +arguments in calls in the form pycbf.CONSTANTNAME + +\begin{flushleft} \small\label{scrap1}\raggedright\small +\NWtarget{nuweb3a}{} $\langle\,${\itshape Constants used for compression}\nobreak\ {\footnotesize {3a}}$\,\rangle\equiv$ +\vspace{-1ex} +\begin{list}{}{} \item +\mbox{}\verb@@\\ +\mbox{}\verb@// The actual wrappers @\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Constants needed from header files@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ /* Constants used for compression */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@#define CBF_INTEGER 0x0010 /* Uncompressed integer */@\\ +\mbox{}\verb@#define CBF_FLOAT 0x0020 /* Uncompressed IEEE floating-point */@\\ +\mbox{}\verb@#define CBF_CANONICAL 0x0050 /* Canonical compression */@\\ +\mbox{}\verb@#define CBF_PACKED 0x0060 /* Packed compression */@\\ +\mbox{}\verb@#define CBF_PACKED_V2 0x0090 /* CCP4 Packed (JPA) compression V2 */@\\ +\mbox{}\verb@#define CBF_BYTE_OFFSET 0x0070 /* Byte Offset Compression */@\\ +\mbox{}\verb@#define CBF_PREDICTOR 0x0080 /* Predictor_Huffman Compression */@\\ +\mbox{}\verb@#define CBF_NONE 0x0040 /* No compression flag */@\\ +\mbox{}\verb@#define CBF_COMPRESSION_MASK \@\\ +\mbox{}\verb@ 0x00FF /* Mask to separate compression@\\ +\mbox{}\verb@ type from flags */@\\ +\mbox{}\verb@#define CBF_FLAG_MASK 0x0F00 /* Mask to separate flags from@\\ +\mbox{}\verb@ compression type */@\\ +\mbox{}\verb@#define CBF_UNCORRELATED_SECTIONS \@\\ +\mbox{}\verb@ 0x0100 /* Flag for uncorrelated sections */@\\ +\mbox{}\verb@#define CBF_FLAT_IMAGE 0x0200 /* Flag for flat (linear) images */@\\ +\mbox{}\verb@#define CBF_NO_EXPAND 0x0400 /* Flag to try not to expand */@\\ +\mbox{}\verb@@{\NWsep} +\end{list} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} +\item \NWtxtMacroRefIn\ \NWlink{nuweb9}{9}. + +\item{} +\end{list} +\vspace{4ex} +\end{flushleft} +\begin{flushleft} \small\label{scrap2}\raggedright\small +\NWtarget{nuweb3b}{} $\langle\,${\itshape Constants used for headers}\nobreak\ {\footnotesize {3b}}$\,\rangle\equiv$ +\vspace{-1ex} +\begin{list}{}{} \item +\mbox{}\verb@@\\ +\mbox{}\verb@ /* Constants used for headers */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@#define PLAIN_HEADERS 0x0001 /* Use plain ASCII headers */@\\ +\mbox{}\verb@#define MIME_HEADERS 0x0002 /* Use MIME headers */@\\ +\mbox{}\verb@#define MSG_NODIGEST 0x0004 /* Do not check message digests */@\\ +\mbox{}\verb@#define MSG_DIGEST 0x0008 /* Check message digests */@\\ +\mbox{}\verb@#define MSG_DIGESTNOW 0x0010 /* Check message digests immediately */@\\ +\mbox{}\verb@#define MSG_DIGESTWARN 0x0020 /* Warn on message digests immediately*/@\\ +\mbox{}\verb@#define PAD_1K 0x0020 /* Pad binaries with 1023 0's */@\\ +\mbox{}\verb@#define PAD_2K 0x0040 /* Pad binaries with 2047 0's */@\\ +\mbox{}\verb@#define PAD_4K 0x0080 /* Pad binaries with 4095 0's */@\\ +\mbox{}\verb@@{\NWsep} +\end{list} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} +\item \NWtxtMacroRefIn\ \NWlink{nuweb9}{9}. + +\item{} +\end{list} +\vspace{4ex} +\end{flushleft} +\begin{flushleft} \small\label{scrap3}\raggedright\small +\NWtarget{nuweb4a}{} $\langle\,${\itshape Constants used to control CIF parsing}\nobreak\ {\footnotesize {4a}}$\,\rangle\equiv$ +\vspace{-1ex} +\begin{list}{}{} \item +\mbox{}\verb@@\\ +\mbox{}\verb@ /* Constants used to control CIF parsing */@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@#define CBF_PARSE_BRC 0x0100 /* PARSE DDLm/CIF2 brace {,...} */@\\ +\mbox{}\verb@#define CBF_PARSE_PRN 0x0200 /* PARSE DDLm parens (,...) */@\\ +\mbox{}\verb@#define CBF_PARSE_BKT 0x0400 /* PARSE DDLm brackets [,...] */@\\ +\mbox{}\verb@#define CBF_PARSE_BRACKETS \@\\ +\mbox{}\verb@ 0x0700 /* PARSE ALL brackets */@\\ +\mbox{}\verb@#define CBF_PARSE_TQ 0x0800 /* PARSE treble quotes """...""" and '''...''' */@\\ +\mbox{}\verb@#define CBF_PARSE_CIF2_DELIMS \@\\ +\mbox{}\verb@ 0x1000 /* Do not scan past an unescaped close quote@\\ +\mbox{}\verb@ do not accept {} , : " ' in non-delimited@\\ +\mbox{}\verb@ strings'{ */ @\\ +\mbox{}\verb@#define CBF_PARSE_DDLm 0x0700 /* For DDLm parse (), [], {} */@\\ +\mbox{}\verb@#define CBF_PARSE_CIF2 0x1F00 /* For CIF2 parse {}, treble quotes,@\\ +\mbox{}\verb@ stop on unescaped close quotes */@\\ +\mbox{}\verb@#define CBF_PARSE_DEFINES \@\\ +\mbox{}\verb@ 0x2000 /* Recognize DEFINE_name */ @\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@#define CBF_PARSE_WIDE 0x4000 /* PARSE wide files */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@#define CBF_PARSE_UTF8 0x10000 /* PARSE UTF-8 */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@#define HDR_DEFAULT (MIME_HEADERS | MSG_NODIGEST)@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@#define MIME_NOHEADERS PLAIN_HEADERS@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ /* CBF vs CIF */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@#define CBF 0x0000 /* Use simple binary sections */@\\ +\mbox{}\verb@#define CIF 0x0001 /* Use MIME-encoded binary sections */@\\ +\mbox{}\verb@@{\NWsep} +\end{list} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} +\item \NWtxtMacroRefIn\ \NWlink{nuweb9}{9}. + +\item{} +\end{list} +\vspace{4ex} +\end{flushleft} +\begin{flushleft} \small\label{scrap4}\raggedright\small +\NWtarget{nuweb4b}{} $\langle\,${\itshape Constants used for encoding}\nobreak\ {\footnotesize {4b}}$\,\rangle\equiv$ +\vspace{-1ex} +\begin{list}{}{} \item +\mbox{}\verb@@\\ +\mbox{}\verb@ /* Constants used for encoding */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@#define ENC_NONE 0x0001 /* Use BINARY encoding */@\\ +\mbox{}\verb@#define ENC_BASE64 0x0002 /* Use BASE64 encoding */@\\ +\mbox{}\verb@#define ENC_BASE32K 0x0004 /* Use X-BASE32K encoding */@\\ +\mbox{}\verb@#define ENC_QP 0x0008 /* Use QUOTED-PRINTABLE encoding */@\\ +\mbox{}\verb@#define ENC_BASE10 0x0010 /* Use BASE10 encoding */@\\ +\mbox{}\verb@#define ENC_BASE16 0x0020 /* Use BASE16 encoding */@\\ +\mbox{}\verb@#define ENC_BASE8 0x0040 /* Use BASE8 encoding */@\\ +\mbox{}\verb@#define ENC_FORWARD 0x0080 /* Map bytes to words forward (1234) */@\\ +\mbox{}\verb@#define ENC_BACKWARD 0x0100 /* Map bytes to words backward (4321) */@\\ +\mbox{}\verb@#define ENC_CRTERM 0x0200 /* Terminate lines with CR */@\\ +\mbox{}\verb@#define ENC_LFTERM 0x0400 /* Terminate lines with LF */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@#define ENC_DEFAULT (ENC_BASE64 | ENC_LFTERM | ENC_FORWARD)@\\ +\mbox{}\verb@@{\NWsep} +\end{list} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} +\item \NWtxtMacroRefIn\ \NWlink{nuweb9}{9}. + +\item{} +\end{list} +\vspace{4ex} +\end{flushleft} +\subsection{Exceptions} + +We attempt to catch the errors and pass them back to python as +exceptions. This could still do with a little work to propagage +back the calls causing the errors. + +Currently there are two global constants defined, called error\_message +and error\_status. +These are filled out when an error occurred, converting the numerical +error value into something the author can read. + +There is an implicit assumption that if the library is used +correctly you will not normally get exceptions. +This should be addressed further in areas like file opening, +proper python exceptions should be returned. + +See the section on exception handling in pycbf.i, above. + +Currently you get a meaningful string back. Should perhaps look into +defining these as python exception classes? +In any case - the SWIG exception handling is defined via the following. +It could have retained the old style if(status = action) but then +harder to see what to return... + +\begin{flushleft} \small\label{scrap5}\raggedright\small +\NWtarget{nuweb5a}{} $\langle\,${\itshape Exception handling}\nobreak\ {\footnotesize {5a}}$\,\rangle\equiv$ +\vspace{-1ex} +\begin{list}{}{} \item +\mbox{}\verb@@\\ +\mbox{}\verb@// Exception handling@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ /* Convenience definitions for functions returning error codes */@\\ +\mbox{}\verb@%exception {@\\ +\mbox{}\verb@ error_status=0;@\\ +\mbox{}\verb@ $action@\\ +\mbox{}\verb@ if (error_status){@\\ +\mbox{}\verb@ get_error_message();@\\ +\mbox{}\verb@ PyErr_SetString(PyExc_Exception,error_message);@\\ +\mbox{}\verb@ return NULL;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@/* Retain notation from cbf lib but pass on as python exception */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@#define cbf_failnez(x) {(error_status = x);} @\\ +\mbox{}\verb@@\\ +\mbox{}\verb@/* printf("Called \"x\", status %d\n",error_status);} */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@#define cbf_onfailnez(x,c) {int err; err = (x); if (err) { fprintf (stderr, \@\\ +\mbox{}\verb@ "\nCBFlib error %d in \"x\"\n", err); \@\\ +\mbox{}\verb@ { c; } return err; }}@\\ +\mbox{}\verb@@{\NWsep} +\end{list} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} +\item \NWtxtMacroRefIn\ \NWlink{nuweb9}{9}. + +\item{} +\end{list} +\vspace{4ex} +\end{flushleft} +\begin{flushleft} \small\label{scrap6}\raggedright\small +\NWtarget{nuweb5b}{} \verb@"pycbf.i"@\nobreak\ {\footnotesize {5b}}$\equiv$ +\vspace{-1ex} +\begin{list}{}{} \item +\mbox{}\verb@@\\ +\mbox{}\verb@/* File: pycbf.i */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Indicate that we want to generate a module call pycbf@\\ +\mbox{}\verb@%module pycbf@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%pythoncode %{@\\ +\mbox{}\verb@__author__ = "Jon Wright "@\\ +\mbox{}\verb@__date__ = "14 Dec 2005"@\\ +\mbox{}\verb@__version__ = "CBFlib 0.9"@\\ +\mbox{}\verb@__credits__ = """Paul Ellis and Herbert Bernstein for the excellent CBFlib!"""@\\ +\mbox{}\verb@__doc__=""" pycbf - python bindings to the CBFlib library@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ A library for reading and writing ImageCIF and CBF files @\\ +\mbox{}\verb@ which store area detector images for crystallography.@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ This work is a derivative of the CBFlib version 0.7.7 library@\\ +\mbox{}\verb@ by Paul J. Ellis of Stanford Synchrotron Radiation Laboratory@\\ +\mbox{}\verb@ and Herbert J. Bernstein of Bernstein + Sons@\\ +\mbox{}\verb@ See:@\\ +\mbox{}\verb@ http://www.bernstein-plus-sons.com/software/CBF/@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ Licensing is GPL based, see:@\\ +\mbox{}\verb@ http://www.bernstein-plus-sons.com/software/CBF/doc/CBFlib_NOTICES.html@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ These bindings were automatically generated by SWIG, and the@\\ +\mbox{}\verb@ input to SWIG was automatically generated by a python script.@\\ +\mbox{}\verb@ We very strongly recommend you do not attempt to edit them @\\ +\mbox{}\verb@ by hand!@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ Copyright (C) 2007 Jonathan Wright@\\ +\mbox{}\verb@ ESRF, Grenoble, France@\\ +\mbox{}\verb@ email: wright@{\tt @}\verb@esrf.fr@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ Revised, August 2010 Herbert J. Bernstein@\\ +\mbox{}\verb@ Add defines from CBFlib 0.9.1@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@"""@\\ +\mbox{}\verb@%}@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Used later to pass back binary data@\\ +\mbox{}\verb@%include "cstring.i"@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Attempt to autogenerate what SWIG thinks the call looks like@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Typemaps are a SWIG mechanism for many things, not least multiple @\\ +\mbox{}\verb@// return values@\\ +\mbox{}\verb@%include "typemaps.i"@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Arrays are needed@\\ +\mbox{}\verb@%include "carrays.i"@\\ +\mbox{}\verb@%array_class(double, doubleArray)@\\ +\mbox{}\verb@%array_class(int, intArray)@\\ +\mbox{}\verb@%array_class(short, shortArray)@\\ +\mbox{}\verb@%array_class(long, longArray)@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Following the SWIG 1.3 documentation at@\\ +\mbox{}\verb@// http://www.swig.org/Doc1.3/Python.html@\\ +\mbox{}\verb@// section 31.9.5, we map sequences of@\\ +\mbox{}\verb@// PyFloat, PyLong and PyInt to@\\ +\mbox{}\verb@// C arrays of double, long and int@\\ +\mbox{}\verb@//@\\ +\mbox{}\verb@// But with the strict checking of being a float@\\ +\mbox{}\verb@// commented out to allow automatic conversions@\\ +\mbox{}\verb@%{@\\ +\mbox{}\verb@static int convert_darray(PyObject *input, double *ptr, int size) {@\\ +\mbox{}\verb@ int i;@\\ +\mbox{}\verb@ if (!PySequence_Check(input)) {@\\ +\mbox{}\verb@ PyErr_SetString(PyExc_TypeError,"Expecting a sequence");@\\ +\mbox{}\verb@ return 0;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ if (PyObject_Length(input) != size) {@\\ +\mbox{}\verb@ PyErr_SetString(PyExc_ValueError,"Sequence size mismatch");@\\ +\mbox{}\verb@ return 0;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ for (i =0; i < size; i++) {@\\ +\mbox{}\verb@ PyObject *o = PySequence_GetItem(input,i);@\\ +\mbox{}\verb@ /*if (!PyFloat_Check(o)) {@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ Py_XDECREF(o);@\\ +\mbox{}\verb@ PyErr_SetString(PyExc_ValueError,"Expecting a sequence of floats");@\\ +\mbox{}\verb@ return 0;@\\ +\mbox{}\verb@ }*/@\\ +\mbox{}\verb@ ptr[i] = PyFloat_AsDouble(o);@\\ +\mbox{}\verb@ Py_DECREF(o);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ return 1;@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@%}@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%typemap(in) double [ANY](double temp[$1_dim0]) {@\\ +\mbox{}\verb@ if ($input == Py_None) $1 = NULL;@\\ +\mbox{}\verb@ else @\\ +\mbox{}\verb@ if (!convert_darray($input,temp,$1_dim0)) {@\\ +\mbox{}\verb@ return NULL;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ $1 = &temp[0];@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%{@\\ +\mbox{}\verb@ static long convert_larray(PyObject *input, long *ptr, int size) {@\\ +\mbox{}\verb@ int i;@\\ +\mbox{}\verb@ if (!PySequence_Check(input)) {@\\ +\mbox{}\verb@ PyErr_SetString(PyExc_TypeError,"Expecting a sequence");@\\ +\mbox{}\verb@ return 0;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ if (PyObject_Length(input) != size) {@\\ +\mbox{}\verb@ PyErr_SetString(PyExc_ValueError,"Sequence size mismatch");@\\ +\mbox{}\verb@ return 0;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ for (i =0; i < size; i++) {@\\ +\mbox{}\verb@ PyObject *o = PySequence_GetItem(input,i);@\\ +\mbox{}\verb@ /*if (!PyLong_Check(o)) {@\\ +\mbox{}\verb@ Py_XDECREF(o);@\\ +\mbox{}\verb@ PyErr_SetString(PyExc_ValueError,"Expecting a sequence of long integers");@\\ +\mbox{}\verb@ return 0;@\\ +\mbox{}\verb@ }*/@\\ +\mbox{}\verb@ ptr[i] = PyLong_AsLong(o);@\\ +\mbox{}\verb@ Py_DECREF(o);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ return 1;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@%}@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%typemap(in) long [ANY](long temp[$1_dim0]) {@\\ +\mbox{}\verb@ if (!convert_larray($input,temp,$1_dim0)) {@\\ +\mbox{}\verb@ return NULL;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ $1 = &temp[0];@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%{@\\ +\mbox{}\verb@ static int convert_iarray(PyObject *input, int *ptr, int size) {@\\ +\mbox{}\verb@ int i;@\\ +\mbox{}\verb@ if (!PySequence_Check(input)) {@\\ +\mbox{}\verb@ PyErr_SetString(PyExc_TypeError,"Expecting a sequence");@\\ +\mbox{}\verb@ return 0;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ if (PyObject_Length(input) != size) {@\\ +\mbox{}\verb@ PyErr_SetString(PyExc_ValueError,"Sequence size mismatch");@\\ +\mbox{}\verb@ return 0;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ for (i =0; i < size; i++) {@\\ +\mbox{}\verb@ PyObject *o = PySequence_GetItem(input,i);@\\ +\mbox{}\verb@ /*if (!PyInt_Check(o)) {@\\ +\mbox{}\verb@ Py_XDECREF(o);@\\ +\mbox{}\verb@ PyErr_SetString(PyExc_ValueError,"Expecting a sequence of long integers");@\\ +\mbox{}\verb@ return 0;@\\ +\mbox{}\verb@ }*/@\\ +\mbox{}\verb@ ptr[i] = (int)PyInt_AsLong(o);@\\ +\mbox{}\verb@ Py_DECREF(o);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ return 1;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@%}@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%typemap(in) int [ANY](int temp[$1_dim0]) {@\\ +\mbox{}\verb@ if (!convert_iarray($input,temp,$1_dim0)) {@\\ +\mbox{}\verb@ return NULL;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ $1 = &temp[0];@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%{ // Here is the c code needed to compile the wrappers, but not @\\ +\mbox{}\verb@ // to be wrapped @\\ +\mbox{}\verb@@\\ +\mbox{}\verb@#include "../include/cbf.h" @\\ +\mbox{}\verb@#include "../include/cbf_simple.h"@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Helper functions to generate error message@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@@\\ +\mbox{}\verb@static int error_status = 0;@\\ +\mbox{}\verb@static char error_message1[17] ;@\\ +\mbox{}\verb@static char error_message[1042] ; // hope that is long enough@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@/* prototype */@\\ +\mbox{}\verb@void get_error_message(void);@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@void get_error_message(){@\\ +\mbox{}\verb@ sprintf(error_message1,"%s","CBFlib Error(s):");@\\ +\mbox{}\verb@ if (error_status & CBF_FORMAT )@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_FORMAT "); @\\ +\mbox{}\verb@ if (error_status & CBF_ALLOC )@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_ALLOC ");@\\ +\mbox{}\verb@ if (error_status & CBF_ARGUMENT )@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_ARGUMENT ");@\\ +\mbox{}\verb@ if (error_status & CBF_ASCII )@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_ASCII ");@\\ +\mbox{}\verb@ if (error_status & CBF_BINARY )@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_BINARY ");@\\ +\mbox{}\verb@ if (error_status & CBF_BITCOUNT )@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_BITCOUNT ");@\\ +\mbox{}\verb@ if (error_status & CBF_ENDOFDATA )@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_ENDOFDATA ");@\\ +\mbox{}\verb@ if (error_status & CBF_FILECLOSE )@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_FILECLOSE ");@\\ +\mbox{}\verb@ if (error_status & CBF_FILEOPEN )@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_FILEOPEN ");@\\ +\mbox{}\verb@ if (error_status & CBF_FILEREAD )@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_FILEREAD ");@\\ +\mbox{}\verb@ if (error_status & CBF_FILESEEK )@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_FILESEEK ");@\\ +\mbox{}\verb@ if (error_status & CBF_FILETELL )@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_FILETELL ");@\\ +\mbox{}\verb@ if (error_status & CBF_FILEWRITE )@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_FILEWRITE ");@\\ +\mbox{}\verb@ if (error_status & CBF_IDENTICAL )@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_IDENTICAL ");@\\ +\mbox{}\verb@ if (error_status & CBF_NOTFOUND )@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_NOTFOUND ");@\\ +\mbox{}\verb@ if (error_status & CBF_OVERFLOW )@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_OVERFLOW ");@\\ +\mbox{}\verb@ if (error_status & CBF_UNDEFINED )@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_UNDEFINED ");@\\ +\mbox{}\verb@ if (error_status & CBF_NOTIMPLEMENTED)@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_NOTIMPLEMENTED");@\\ +\mbox{}\verb@ if (error_status & CBF_NOCOMPRESSION)@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_NOCOMPRESSION");@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%} // End of code which is not wrapped but needed to compile@\\ +\mbox{}\verb@@{\NWsep} +\end{list} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} +\item \NWtxtFileDefBy\ \NWlink{nuweb5b}{5b}\NWlink{nuweb9}{, 9}. + +\item{} +\end{list} +\vspace{4ex} +\end{flushleft} +\begin{flushleft} \small\label{scrap7}\raggedright\small +\NWtarget{nuweb9}{} \verb@"pycbf.i"@\nobreak\ {\footnotesize {9}}$\equiv$ +\vspace{-1ex} +\begin{list}{}{} \item +\mbox{}\verb@@\\ +\mbox{}\verb@@\hbox{$\langle\,${\itshape Constants used for compression}\nobreak\ {\footnotesize \NWlink{nuweb3a}{3a}}$\,\rangle$}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\hbox{$\langle\,${\itshape Constants used for headers}\nobreak\ {\footnotesize \NWlink{nuweb3b}{3b}}$\,\rangle$}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\hbox{$\langle\,${\itshape Constants used to control CIF parsing}\nobreak\ {\footnotesize \NWlink{nuweb4a}{4a}}$\,\rangle$}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\hbox{$\langle\,${\itshape Constants used for encoding}\nobreak\ {\footnotesize \NWlink{nuweb4b}{4b}}$\,\rangle$}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\hbox{$\langle\,${\itshape Exception handling}\nobreak\ {\footnotesize \NWlink{nuweb5a}{5a}}$\,\rangle$}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%include "cbfgenericwrappers.i"@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// cbf_goniometer object@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%include "cbfgoniometerwrappers.i"@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%include "cbfdetectorwrappers.i"@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// cbfhandle object@\\ +\mbox{}\verb@%include "cbfhandlewrappers.i"@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@{\NWsep} +\end{list} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} +\item \NWtxtFileDefBy\ \NWlink{nuweb5b}{5b}\NWlink{nuweb9}{, 9}. + +\item{} +\end{list} +\vspace{4ex} +\end{flushleft} +Despite the temptation to just throw everything from the c header files +into the interface, a short experience suggested we are better off to pull +out only the parts we want and make the calls more pythonic + +The input files "CBFhandlewrappers.i", etc. are created by the make\_pycbf.py +script. + +\subsection{Exceptions} + +We attempt to catch the errors and pass them back to python as +exceptions. This could still do with a little work to propagage +back the calls causing the errors. + +Currently there are two global constants defined, called error\_message +and error\_status. +These are filled out when an error occurred, converting the numerical +error value into something the author can read. + +There is an implicit assumption that if the library is used +correctly you will not normally get exceptions. +This should be addressed further in areas like file opening, +proper python exceptions should be returned. + +See the section on exception handling in pycbf.i, above. + +Currently you get a meaningful string back. Should perhaps look into +defining these as python exception classes? +In any case - the SWIG exception handling is defined via the following. +It could have retained the old style if(status = action) but then +harder to see what to return... + + +\section{Docstrings} + +The file doc/CBFlib.html is converted to a file CBFlib.txt to generate the +docstrings and many of the wrappers. The conversion was done by the +text-based browser, links. + +This text document is then parsed by a python script called make\_pycbf.py +to generate the .i files which are included by the swig wrapper generator. +Unfortunately this more complicated for non-python users but seemed less +error prone and involved less typing for the author. + +% make_pycbf.w +% nuweb source file used to create +% make_pycbf.py and to document it in pycbf.w +% +% pycbf - python binding to the CBFlib library +% +% Copyright (C) 2005 Jonathan Wright +% ESRF, Grenoble, France +% email: wright@esrf.fr +% +% Revised for CBFlib 0.9 releases, Herbert J. Bernstein, 23 Aug 2010 +% Revised for CBFlib 0.9.2.8, Herbert J. Bernstein, 12 December 2012 +% Revised for CBFlib 0.9.3.2, Herbert J. Bernstein, 4 November 2013 +% Revised for CBFlib 0.9.5.8, Herbert J. Bernstein, 5 August 2015 +% +%###################################################################### +%# # +%# YOU MAY REDISTRIBUTE THE CBFLIB PACKAGE INCLUDING PYCBF UNDER THE # +%# TERMS OF THE GPL # +%# # +%# ALTERNATIVELY YOU MAY REDISTRIBUTE THE CBFLIB API INCLUDING PYCBF # +%# UNDER THE TERMS OF THE LGPL # +%# # +%###################################################################### +% +%########################### GPL NOTICES ############################## +%# # +%# This program is free software; you can redistribute it and/or # +%# modify it under the terms of the GNU General Public License as # +%# published by the Free Software Foundation; either version 2 of # +%# (the License, or (at your option) any later version. # +%# # +%# This program is distributed in the hope that it will be useful, # +%# but WITHOUT ANY WARRANTY; without even the implied warranty of # +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +%# GNU General Public License for more details. # +%# # +%# You should have received a copy of the GNU General Public License # +%# along with this program; if not, write to the Free Software # +%# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # +%# 02111-1307 USA # +%# # +%###################################################################### +% +%######################### LGPL NOTICES ############################### +%# # +%# This library is free software; you can redistribute it and/or # +%# modify it under the terms of the GNU Lesser General Public # +%# License as published by the Free Software Foundation; either # +%# version 2.1 of the License, or (at your option) any later version. # +%# # +%# This library is distributed in the hope that it will be useful, # +%# but WITHOUT ANY WARRANTY; without even the implied warranty of # +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # +%# Lesser General Public License for more details. # +%# # +%# You should have received a copy of the GNU Lesser General Public # +%# License along with this library; if not, write to the Free # +%# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # +%# MA 02110-1301 USA # +%# # +%###################################################################### +% +\section{Wrappers} + +The program that does the conversion from CBFlib.txt to the SWIG +input files is a python script named make\_pycbf.py. + +\begin{flushleft} \small +\begin{minipage}{\linewidth}\label{scrap8}\raggedright\small +\NWtarget{nuweb10}{} \verb@"make_pycbf.py"@\nobreak\ {\footnotesize {10}}$\equiv$ +\vspace{-1ex} +\begin{list}{}{} \item +\mbox{}\verb@@\\ +\mbox{}\verb@print "\\begin{verbatim}"@\\ +\mbox{}\verb@print "This output comes from make_pycbf.py which generates the wrappers"@\\ +\mbox{}\verb@print "pycbf Copyright (C) 2005 Jonathan Wright, no warranty, LGPL"@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@######################################################################@\\ +\mbox{}\verb@# #@\\ +\mbox{}\verb@# YOU MAY REDISTRIBUTE THE CBFLIB PACKAGE INCLUDING PYCBF UNDER THE #@\\ +\mbox{}\verb@# TERMS OF THE GPL #@\\ +\mbox{}\verb@# #@\\ +\mbox{}\verb@# ALTERNATIVELY YOU MAY REDISTRIBUTE THE CBFLIB API INCLUDING PYCBF #@\\ +\mbox{}\verb@# UNDER THE TERMS OF THE LGPL #@\\ +\mbox{}\verb@# #@\\ +\mbox{}\verb@######################################################################@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@########################### GPL NOTICES ##############################@\\ +\mbox{}\verb@# #@\\ +\mbox{}\verb@# This program is free software; you can redistribute it and/or #@\\ +\mbox{}\verb@# modify it under the terms of the GNU General Public License as #@\\ +\mbox{}\verb@# published by the Free Software Foundation; either version 2 of #@\\ +\mbox{}\verb@# (the License, or (at your option) any later version. #@\\ +\mbox{}\verb@# #@\\ +\mbox{}\verb@# This program is distributed in the hope that it will be useful, #@\\ +\mbox{}\verb@# but WITHOUT ANY WARRANTY; without even the implied warranty of #@\\ +\mbox{}\verb@# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #@\\ +\mbox{}\verb@# GNU General Public License for more details. #@\\ +\mbox{}\verb@# #@\\ +\mbox{}\verb@# You should have received a copy of the GNU General Public License #@\\ +\mbox{}\verb@# along with this program; if not, write to the Free Software #@\\ +\mbox{}\verb@# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA #@\\ +\mbox{}\verb@# 02111-1307 USA #@\\ +\mbox{}\verb@# #@\\ +\mbox{}\verb@######################################################################@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@######################### LGPL NOTICES ###############################@\\ +\mbox{}\verb@# #@\\ +\mbox{}\verb@# This library is free software; you can redistribute it and/or #@\\ +\mbox{}\verb@# modify it under the terms of the GNU Lesser General Public #@\\ +\mbox{}\verb@# License as published by the Free Software Foundation; either #@\\ +\mbox{}\verb@# version 2.1 of the License, or (at your option) any later version. #@\\ +\mbox{}\verb@# #@\\ +\mbox{}\verb@# This library is distributed in the hope that it will be useful, #@\\ +\mbox{}\verb@# but WITHOUT ANY WARRANTY; without even the implied warranty of #@\\ +\mbox{}\verb@# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU #@\\ +\mbox{}\verb@# Lesser General Public License for more details. #@\\ +\mbox{}\verb@# #@\\ +\mbox{}\verb@# You should have received a copy of the GNU Lesser General Public #@\\ +\mbox{}\verb@# License along with this library; if not, write to the Free #@\\ +\mbox{}\verb@# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, #@\\ +\mbox{}\verb@# MA 02110-1301 USA #@\\ +\mbox{}\verb@# #@\\ +\mbox{}\verb@######################################################################@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@# Get the ascii text as a list of strings @\\ +\mbox{}\verb@lines = open("CBFlib.txt","r").readlines()@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@# Variables to hold the useful things we find in the file@\\ +\mbox{}\verb@docstring = "\n"@\\ +\mbox{}\verb@name=""@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@# Flag to indicate we have not read anything useful yet@\\ +\mbox{}\verb@on=0@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@# Dictionary of function prototypes and documentation, keyed by name in C.@\\ +\mbox{}\verb@name_dict = {}@\\ +\mbox{}\verb@i=-1@\\ +\mbox{}\verb@debug = 0@\\ +\mbox{}\verb@# Parse the text@\\ +\mbox{}\verb@prototypes = ""@\\ +\mbox{}\verb@while i=0 and on==1:@\\ +\mbox{}\verb@ on=10 # Only try for ten lines after it say PROTOTYPE@\\ +\mbox{}\verb@ continue@\\ +\mbox{}\verb@ if line.find("#include")>=0: # why?@\\ +\mbox{}\verb@ continue @\\ +\mbox{}\verb@ if line.find("int cbf_")>=0: # We found a function@\\ +\mbox{}\verb@ # keep going up to DESCRIPTION@\\ +\mbox{}\verb@ prototypes+=""+lines[i].rstrip()+" "@\\ +\mbox{}\verb@ # print lines[i].rstrip()@\\ +\mbox{}\verb@ check=0@\\ +\mbox{}\verb@ while lines[i+1].find("DESCRIPTION")==-1 and lines[i+1].find("int cbf_")==-1:@\\ +\mbox{}\verb@ i=i+1@\\ +\mbox{}\verb@ prototypes+=lines[i].rstrip()+" " # lose the \n@\\ +\mbox{}\verb@ # print lines[i].rstrip()@\\ +\mbox{}\verb@ check+=1@\\ +\mbox{}\verb@ if check>50:@\\ +\mbox{}\verb@ raise Exception("Runaway prototype "+prototypes)@\\ +\mbox{}\verb@ on=1 # Keep reading docstring@\\ +\mbox{}\verb@ continue@\\ +\mbox{}\verb@ if on > 1: # why?@\\ +\mbox{}\verb@ on=on-1@\\ +\mbox{}\verb@ if line.find("3. File format")>=0 and on==1:@\\ +\mbox{}\verb@ # Stop processing at section 3@\\ +\mbox{}\verb@ i=len(lines)@\\ +\mbox{}\verb@ if on==1:@\\ +\mbox{}\verb@ # Docstring ends at 2.xxx for next function or see also@\\ +\mbox{}\verb@ # We are losing the see also information for now (needed the section@\\ +\mbox{}\verb@ # breaks in the rtf file)@\\ +\mbox{}\verb@ if len(line.strip())==0:@\\ +\mbox{}\verb@ docstring+="\n"@\\ +\mbox{}\verb@ continue@\\ +\mbox{}\verb@ else:@\\ +\mbox{}\verb@ if docstring[-1]=="\n":@\\ +\mbox{}\verb@ docstring += line.lstrip().rstrip()@\\ +\mbox{}\verb@ else:@\\ +\mbox{}\verb@ docstring =docstring+" "+line.lstrip().rstrip()@\\ +\mbox{}\verb@ if line.strip()[0] in [str(j) for j in range(9)] or \@\\ +\mbox{}\verb@ line.find("SEE ALSO")>=0 or \@\\ +\mbox{}\verb@ line.find("________")>=0 or \@\\ +\mbox{}\verb@ line.find("--------")>=0:@\\ +\mbox{}\verb@ if len(docstring)>0:@\\ +\mbox{}\verb@ # print "Prototypes: ",prototypes@\\ +\mbox{}\verb@ docstring = docstring.replace("\"", " \\\"") # escape the quotes@\\ +\mbox{}\verb@ for prototype in prototypes.strip().split(";")[:-1]:@\\ +\mbox{}\verb@ name = prototype.split("(")[0].strip()@\\ +\mbox{}\verb@ cname = name.split()[1].strip()@\\ +\mbox{}\verb@ prototype = prototype.strip()+";"@\\ +\mbox{}\verb@ name_dict[cname]=[prototype,docstring]@\\ +\mbox{}\verb@ # print "Prototype: ","::",cname,"::",name,"::", prototype@\\ +\mbox{}\verb@ prototypes = ""@\\ +\mbox{}\verb@ # print "Found ",prototype@\\ +\mbox{}\verb@ docstring="\n"@\\ +\mbox{}\verb@ prototype=""@\\ +\mbox{}\verb@ cname=""@\\ +\mbox{}\verb@ on=0@\\ +\mbox{}\verb@ else:@\\ +\mbox{}\verb@ raise Exception("bad docstring")@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@# End of CBFlib.txt file - now generate wrapper code for swig@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@def myformat(s,l,indent=0,breakon=" "):@\\ +\mbox{}\verb@ """@\\ +\mbox{}\verb@ Try to pretty print lines - this is a pain...@\\ +\mbox{}\verb@ """@\\ +\mbox{}\verb@ lines = s.rstrip().split("\n")@\\ +\mbox{}\verb@ out=""@\\ +\mbox{}\verb@ for line in lines:@\\ +\mbox{}\verb@ if len(line)==0:@\\ +\mbox{}\verb@ continue # skip blank lines@\\ +\mbox{}\verb@ if len(line)>l:@\\ +\mbox{}\verb@ words = line.split(breakon)@\\ +\mbox{}\verb@ newline=words[0]@\\ +\mbox{}\verb@ if len(words)>1:@\\ +\mbox{}\verb@ for word in words[1:]:@\\ +\mbox{}\verb@ if len(newline)+len(word)+1 < l:@\\ +\mbox{}\verb@ newline=newline+breakon+word@\\ +\mbox{}\verb@ else:@\\ +\mbox{}\verb@ out = out+newline+breakon+"\n"+indent*" "@\\ +\mbox{}\verb@ newline=word @\\ +\mbox{}\verb@ out += newline+"\n"@\\ +\mbox{}\verb@ else:@\\ +\mbox{}\verb@ out += "\n"@\\ +\mbox{}\verb@ else:@\\ +\mbox{}\verb@ out += line+"\n" # Last one@\\ +\mbox{}\verb@ if out == "":@\\ +\mbox{}\verb@ return "\n"@\\ +\mbox{}\verb@ else:@\\ +\mbox{}\verb@ return out@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@def docstringwrite(pyfunc,input,output,prototype,cbflibdoc):@\\ +\mbox{}\verb@ doc = "%feature(\"autodoc\", \"\nReturns : "@\\ +\mbox{}\verb@ returns = ""@\\ +\mbox{}\verb@ for out in output:@\\ +\mbox{}\verb@ returns += out+","@\\ +\mbox{}\verb@ if len(returns)>0:@\\ +\mbox{}\verb@ doc += myformat(returns[:-1],70,indent = 10,breakon=",")@\\ +\mbox{}\verb@ else:@\\ +\mbox{}\verb@ doc += "\n"@\\ +\mbox{}\verb@ doc += "*args : "@\\ +\mbox{}\verb@ takes = ""@\\ +\mbox{}\verb@ for inp in input:@\\ +\mbox{}\verb@ takes += inp+","@\\ +\mbox{}\verb@ if len(takes)>0:@\\ +\mbox{}\verb@ doc += myformat(takes[:-1],70,indent = 10,breakon=",") @\\ +\mbox{}\verb@ else:@\\ +\mbox{}\verb@ doc += "\n"@\\ +\mbox{}\verb@ doc += "\nC prototype: "+myformat(prototype,65,indent=16,breakon=",")@\\ +\mbox{}\verb@ doc += "\nCBFLib documentation:\n"+myformat(cbflibdoc,70)+"\")"@\\ +\mbox{}\verb@ doc += pyfunc+";\n"@\\ +\mbox{}\verb@ return doc@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@cbfhandle_specials = {@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_integerarrayparameters":["""@\\ +\mbox{}\verb@%apply int *OUTPUT {int *compression,int *binary_id, @\\ +\mbox{}\verb@ int *elsize, int *elsigned, int *elunsigned, @\\ +\mbox{}\verb@ int *elements, int *minelement, int *maxelement} @\\ +\mbox{}\verb@ get_integerarrayparameters;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void get_integerarrayparameters(int *compression,int *binary_id, @\\ +\mbox{}\verb@ int *elsize, int *elsigned, int *elunsigned, @\\ +\mbox{}\verb@ int *elements, int *minelement, int *maxelement){@\\ +\mbox{}\verb@ unsigned int comp;@\\ +\mbox{}\verb@ size_t elsiz, elem;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_integerarrayparameters(self, @\\ +\mbox{}\verb@ &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, @\\ +\mbox{}\verb@ minelement, maxelement));@\\ +\mbox{}\verb@ *compression = comp; /* FIXME - does this convert in C? */@\\ +\mbox{}\verb@ *elsize = elsiz;@\\ +\mbox{}\verb@ *elements = elem;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_integerarrayparameters",[],["int compression","int binary_id", @\\ +\mbox{}\verb@ "int elsize", "int elsigned", "int elunsigned", @\\ +\mbox{}\verb@ "int elements", "int minelement", "int maxelement"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_integerarrayparameters_wdims":["""@\\ +\mbox{}\verb@%cstring_output_allocate_size(char **bo, int *bolen, free(*$1));@\\ +\mbox{}\verb@%apply int *OUTPUT {int *compression,int *binary_id, @\\ +\mbox{}\verb@ int *elsize, int *elsigned, int *elunsigned, @\\ +\mbox{}\verb@ int *elements, int *minelement, int *maxelement,@\\ +\mbox{}\verb@ int *dimfast, int *dimmid, int *dimslow, int *padding} @\\ +\mbox{}\verb@ get_integerarrayparameters_wdims;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void get_integerarrayparameters_wdims(int *compression,int *binary_id, @\\ +\mbox{}\verb@ int *elsize, int *elsigned, int *elunsigned, @\\ +\mbox{}\verb@ int *elements, int *minelement, int *maxelement,@\\ +\mbox{}\verb@ char **bo, int *bolen,@\\ +\mbox{}\verb@ int *dimfast, int *dimmid, int *dimslow, int *padding@\\ +\mbox{}\verb@ ){@\\ +\mbox{}\verb@ unsigned int comp;@\\ +\mbox{}\verb@ size_t elsiz, elem, df,dm,ds,pd;@\\ +\mbox{}\verb@ const char * byteorder;@\\ +\mbox{}\verb@ char * bot;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_integerarrayparameters_wdims(self, @\\ +\mbox{}\verb@ &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, @\\ +\mbox{}\verb@ minelement, maxelement, &byteorder,&df,&dm,&ds,&pd ));@\\ +\mbox{}\verb@ *bolen = strlen(byteorder);@\\ +\mbox{}\verb@ if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)}@\\ +\mbox{}\verb@ strncpy(bot,byteorder,*bolen);@\\ +\mbox{}\verb@ *bo = bot;@\\ +\mbox{}\verb@ *compression = comp;@\\ +\mbox{}\verb@ *elsize = elsiz;@\\ +\mbox{}\verb@ *elements = elem;@\\ +\mbox{}\verb@ *dimfast = df;@\\ +\mbox{}\verb@ *dimmid = dm;@\\ +\mbox{}\verb@ *dimslow = ds;@\\ +\mbox{}\verb@ *padding = pd;@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_integerarrayparameters_wdims",[],["int compression","int binary_id", @\\ +\mbox{}\verb@ "int elsize", "int elsigned", "int elunsigned", @\\ +\mbox{}\verb@ "int elements", "int minelement", "int maxelement", "char **bo", "int *bolen",@\\ +\mbox{}\verb@ "int dimfast", "int dimmid", "int dimslow", "int padding"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_integerarrayparameters_wdims_fs":["""@\\ +\mbox{}\verb@%cstring_output_allocate_size(char **bo, int *bolen, free(*$1));@\\ +\mbox{}\verb@%apply int *OUTPUT {int *compression,int *binary_id, @\\ +\mbox{}\verb@ int *elsize, int *elsigned, int *elunsigned, @\\ +\mbox{}\verb@ int *elements, int *minelement, int *maxelement,@\\ +\mbox{}\verb@ int *dimfast, int *dimmid, int *dimslow, int *padding} @\\ +\mbox{}\verb@ get_integerarrayparameters_wdims_fs;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void get_integerarrayparameters_wdims_fs(int *compression,int *binary_id, @\\ +\mbox{}\verb@ int *elsize, int *elsigned, int *elunsigned, @\\ +\mbox{}\verb@ int *elements, int *minelement, int *maxelement,@\\ +\mbox{}\verb@ char **bo, int *bolen,@\\ +\mbox{}\verb@ int *dimfast, int *dimmid, int *dimslow, int *padding@\\ +\mbox{}\verb@ ){@\\ +\mbox{}\verb@ unsigned int comp;@\\ +\mbox{}\verb@ size_t elsiz, elem, df,dm,ds,pd;@\\ +\mbox{}\verb@ const char * byteorder;@\\ +\mbox{}\verb@ char * bot;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_integerarrayparameters_wdims_fs(self, @\\ +\mbox{}\verb@ &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, @\\ +\mbox{}\verb@ minelement, maxelement, &byteorder,&df,&dm,&ds,&pd ));@\\ +\mbox{}\verb@ *bolen = strlen(byteorder);@\\ +\mbox{}\verb@ if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)}@\\ +\mbox{}\verb@ strncpy(bot,byteorder,*bolen);@\\ +\mbox{}\verb@ *bo = bot;@\\ +\mbox{}\verb@ *compression = comp; @\\ +\mbox{}\verb@ *elsize = elsiz;@\\ +\mbox{}\verb@ *elements = elem;@\\ +\mbox{}\verb@ *dimfast = df;@\\ +\mbox{}\verb@ *dimmid = dm;@\\ +\mbox{}\verb@ *dimslow = ds;@\\ +\mbox{}\verb@ *padding = pd;@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_integerarrayparameters_wdims_fs",[],["int compression","int binary_id", @\\ +\mbox{}\verb@ "int elsize", "int elsigned", "int elunsigned", @\\ +\mbox{}\verb@ "int elements", "int minelement", "int maxelement", "char **bo", "int *bolen",@\\ +\mbox{}\verb@ "int dimfast", "int dimmid", "int dimslow", "int padding"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_integerarrayparameters_wdims_sf":["""@\\ +\mbox{}\verb@%cstring_output_allocate_size(char **bo, int *bolen, free(*$1));@\\ +\mbox{}\verb@%apply int *OUTPUT {int *compression,int *binary_id, @\\ +\mbox{}\verb@ int *elsize, int *elsigned, int *elunsigned, @\\ +\mbox{}\verb@ int *elements, int *minelement, int *maxelement,@\\ +\mbox{}\verb@ int *dimslow, int *dimmid, int *dimfast, int *padding} @\\ +\mbox{}\verb@ get_integerarrayparameters_wdims_sf;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void get_integerarrayparameters_wdims_sf(int *compression,int *binary_id, @\\ +\mbox{}\verb@ int *elsize, int *elsigned, int *elunsigned, @\\ +\mbox{}\verb@ int *elements, int *minelement, int *maxelement,@\\ +\mbox{}\verb@ char **bo, int *bolen,@\\ +\mbox{}\verb@ int *dimslow, int *dimmid, int *dimfast, int *padding@\\ +\mbox{}\verb@ ){@\\ +\mbox{}\verb@ unsigned int comp;@\\ +\mbox{}\verb@ size_t elsiz, elem, df,dm,ds,pd;@\\ +\mbox{}\verb@ const char * byteorder;@\\ +\mbox{}\verb@ char * bot;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_integerarrayparameters_wdims_sf(self, @\\ +\mbox{}\verb@ &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, @\\ +\mbox{}\verb@ minelement, maxelement, &byteorder,&ds,&dm,&df,&pd ));@\\ +\mbox{}\verb@ *bolen = strlen(byteorder);@\\ +\mbox{}\verb@ if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)}@\\ +\mbox{}\verb@ strncpy(bot,byteorder,*bolen);@\\ +\mbox{}\verb@ *bo = bot;@\\ +\mbox{}\verb@ *compression = comp;@\\ +\mbox{}\verb@ *elsize = elsiz;@\\ +\mbox{}\verb@ *elements = elem;@\\ +\mbox{}\verb@ *dimfast = df;@\\ +\mbox{}\verb@ *dimmid = dm;@\\ +\mbox{}\verb@ *dimslow = ds;@\\ +\mbox{}\verb@ *padding = pd;@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_integerarrayparameters_wdims_sf",[],["int compression","int binary_id", @\\ +\mbox{}\verb@ "int elsize", "int elsigned", "int elunsigned", @\\ +\mbox{}\verb@ "int elements", "int minelement", "int maxelement", "char **bo", "int *bolen",@\\ +\mbox{}\verb@ "int dimslow", "int dimmid", "int dimfast", "int padding"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_realarrayparameters":["""@\\ +\mbox{}\verb@%apply int *OUTPUT {int *compression,int *binary_id, @\\ +\mbox{}\verb@ int *elsize, int *elements} get_realarrayparameters;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void get_realarrayparameters(int *compression,int *binary_id, @\\ +\mbox{}\verb@ int *elsize, int *elements){@\\ +\mbox{}\verb@ unsigned int comp;@\\ +\mbox{}\verb@ size_t elsiz, elem;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_realarrayparameters(self, @\\ +\mbox{}\verb@ &comp ,binary_id, &elsiz, &elem ));@\\ +\mbox{}\verb@ *compression = comp; /* FIXME - does this convert in C? */@\\ +\mbox{}\verb@ *elsize = elsiz;@\\ +\mbox{}\verb@ *elements = elem;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_realarrayparameters",[],["int compression","int binary_id", @\\ +\mbox{}\verb@ "int elsize", "int elements"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_realarrayparameters_wdims":["""@\\ +\mbox{}\verb@%cstring_output_allocate_size(char **bo, int *bolen, free(*$1));@\\ +\mbox{}\verb@%apply int *OUTPUT {int *compression,int *binary_id, @\\ +\mbox{}\verb@ int *elsize, @\\ +\mbox{}\verb@ int *elements,@\\ +\mbox{}\verb@ int *dimslow, int *dimmid, int *dimfast, int *padding} @\\ +\mbox{}\verb@ get_realarrayparameters_wdims;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void get_realarrayparameters_wdims(int *compression,int *binary_id, @\\ +\mbox{}\verb@ int *elsize, @\\ +\mbox{}\verb@ int *elements, @\\ +\mbox{}\verb@ char **bo, int *bolen,@\\ +\mbox{}\verb@ int *dimfast, int *dimmid, int *dimslow, int *padding@\\ +\mbox{}\verb@ ){@\\ +\mbox{}\verb@ unsigned int comp;@\\ +\mbox{}\verb@ size_t elsiz, elem, df,dm,ds,pd;@\\ +\mbox{}\verb@ const char * byteorder;@\\ +\mbox{}\verb@ char * bot;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_realarrayparameters_wdims(self, @\\ +\mbox{}\verb@ &comp,binary_id, &elsiz, &elem, @\\ +\mbox{}\verb@ &byteorder,&df,&dm,&ds,&pd ));@\\ +\mbox{}\verb@ *bolen = strlen(byteorder);@\\ +\mbox{}\verb@ if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)}@\\ +\mbox{}\verb@ strncpy(bot,byteorder,*bolen);@\\ +\mbox{}\verb@ *bo = bot;@\\ +\mbox{}\verb@ *compression = comp;@\\ +\mbox{}\verb@ *elsize = elsiz;@\\ +\mbox{}\verb@ *elements = elem;@\\ +\mbox{}\verb@ *dimfast = df;@\\ +\mbox{}\verb@ *dimmid = dm;@\\ +\mbox{}\verb@ *dimslow = ds;@\\ +\mbox{}\verb@ *padding = pd;@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_realarrayparameters_wdims",[],["int compression","int binary_id", @\\ +\mbox{}\verb@ "int elsize", @\\ +\mbox{}\verb@ "int elements", "char **bo", "int *bolen",@\\ +\mbox{}\verb@ "int dimfast", "int dimmid", "int dimslow", "int padding"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_realarrayparameters_wdims_fs":["""@\\ +\mbox{}\verb@%cstring_output_allocate_size(char **bo, int *bolen, free(*$1));@\\ +\mbox{}\verb@%apply int *OUTPUT {int *compression,int *binary_id, @\\ +\mbox{}\verb@ int *elsize, @\\ +\mbox{}\verb@ int *elements,@\\ +\mbox{}\verb@ int *dimslow, int *dimmid, int *dimfast, int *padding} @\\ +\mbox{}\verb@ get_realarrayparameters_wdims_fs;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void get_realarrayparameters_wdims_fs(int *compression,int *binary_id, @\\ +\mbox{}\verb@ int *elsize, @\\ +\mbox{}\verb@ int *elements, @\\ +\mbox{}\verb@ char **bo, int *bolen,@\\ +\mbox{}\verb@ int *dimfast, int *dimmid, int *dimslow, int *padding@\\ +\mbox{}\verb@ ){@\\ +\mbox{}\verb@ unsigned int comp;@\\ +\mbox{}\verb@ size_t elsiz, elem, df,dm,ds,pd;@\\ +\mbox{}\verb@ const char * byteorder;@\\ +\mbox{}\verb@ char * bot;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_realarrayparameters_wdims_fs(self, @\\ +\mbox{}\verb@ &comp,binary_id, &elsiz, &elem, @\\ +\mbox{}\verb@ &byteorder,&df,&dm,&ds,&pd ));@\\ +\mbox{}\verb@ *bolen = strlen(byteorder);@\\ +\mbox{}\verb@ if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)}@\\ +\mbox{}\verb@ strncpy(bot,byteorder,*bolen);@\\ +\mbox{}\verb@ *bo = bot;@\\ +\mbox{}\verb@ *compression = comp;@\\ +\mbox{}\verb@ *elsize = elsiz;@\\ +\mbox{}\verb@ *elements = elem;@\\ +\mbox{}\verb@ *dimfast = df;@\\ +\mbox{}\verb@ *dimmid = dm;@\\ +\mbox{}\verb@ *dimslow = ds;@\\ +\mbox{}\verb@ *padding = pd;@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_realarrayparameters_wdims_fs",[],["int compression","int binary_id", @\\ +\mbox{}\verb@ "int elsize", @\\ +\mbox{}\verb@ "int elements", "char **bo", "int *bolen",@\\ +\mbox{}\verb@ "int dimfast", "int dimmid", "int dimslow", "int padding"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_realarrayparameters_wdims_sf":["""@\\ +\mbox{}\verb@%cstring_output_allocate_size(char **bo, int *bolen, free(*$1));@\\ +\mbox{}\verb@%apply int *OUTPUT {int *compression,int *binary_id, @\\ +\mbox{}\verb@ int *elsize, @\\ +\mbox{}\verb@ int *elements,@\\ +\mbox{}\verb@ int *dimslow, int *dimmid, int *dimfast, int *padding} @\\ +\mbox{}\verb@ get_realarrayparameters_wdims_sf;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void get_realarrayparameters_wdims_sf(int *compression,int *binary_id, @\\ +\mbox{}\verb@ int *elsize, @\\ +\mbox{}\verb@ int *elements, @\\ +\mbox{}\verb@ char **bo, int *bolen,@\\ +\mbox{}\verb@ int *dimslow, int *dimmid, int *dimfast, int *padding@\\ +\mbox{}\verb@ ){@\\ +\mbox{}\verb@ unsigned int comp;@\\ +\mbox{}\verb@ size_t elsiz, elem, df,dm,ds,pd;@\\ +\mbox{}\verb@ const char * byteorder;@\\ +\mbox{}\verb@ char * bot;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_realarrayparameters_wdims_sf(self, @\\ +\mbox{}\verb@ &comp,binary_id, &elsiz, &elem, @\\ +\mbox{}\verb@ &byteorder,&ds,&dm,&df,&pd ));@\\ +\mbox{}\verb@ *bolen = strlen(byteorder);@\\ +\mbox{}\verb@ if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)}@\\ +\mbox{}\verb@ strncpy(bot,byteorder,*bolen);@\\ +\mbox{}\verb@ *bo = bot;@\\ +\mbox{}\verb@ *compression = comp;@\\ +\mbox{}\verb@ *elsize = elsiz;@\\ +\mbox{}\verb@ *elements = elem;@\\ +\mbox{}\verb@ *dimfast = df;@\\ +\mbox{}\verb@ *dimmid = dm;@\\ +\mbox{}\verb@ *dimslow = ds;@\\ +\mbox{}\verb@ *padding = pd;@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_realarrayparameters_wdims_sf",[],["int compression","int binary_id", @\\ +\mbox{}\verb@ "int elsize", @\\ +\mbox{}\verb@ "int elements", "char **bo", "int *bolen",@\\ +\mbox{}\verb@ "int dimslow", "int dimmid", "int dimfast", "int padding"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_integerarray":["""@\\ +\mbox{}\verb@// Ensure we free the local temporary@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ +\mbox{}\verb@ get_integerarray_as_string;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Get the length correct@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void get_integerarray_as_string(char **s, int *slen){@\\ +\mbox{}\verb@ int binary_id, elsigned, elunsigned;@\\ +\mbox{}\verb@ size_t elements, elements_read, elsize;@\\ +\mbox{}\verb@ int minelement, maxelement;@\\ +\mbox{}\verb@ unsigned int compression;@\\ +\mbox{}\verb@ void * array;@\\ +\mbox{}\verb@ *slen = 0; /* Initialise in case of problems */@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_integerarrayparameters(self, &compression,@\\ +\mbox{}\verb@ &binary_id, &elsize, &elsigned, &elunsigned,@\\ +\mbox{}\verb@ &elements, &minelement, &maxelement));@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ if ((array=malloc(elsize*elements))) {@\\ +\mbox{}\verb@ /* cbf_failnez (cbf_select_column(cbf,colnum)) */@\\ +\mbox{}\verb@ cbf_failnez (cbf_get_integerarray(self, &binary_id, @\\ +\mbox{}\verb@ (void *)array, elsize, elsigned,@\\ +\mbox{}\verb@ elements, &elements_read));@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ALLOC);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ *slen = elsize*elements;@\\ +\mbox{}\verb@ *s = (char *) array;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_integerarray_as_string",[],["(Binary)String"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_image":["""@\\ +\mbox{}\verb@// Ensure we free the local temporary@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ +\mbox{}\verb@ get_image_as_string;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Get the length correct@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void get_image_as_string(int element_number, char **s, int *slen,@\\ +\mbox{}\verb@ int elsize, int elsign, int ndimslow, int ndimfast){@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ int reserved = 0;@\\ +\mbox{}\verb@ *slen = 0; /* Initialise in case of problems */@\\ +\mbox{}\verb@ if ((array=malloc(elsize*ndimfast*ndimslow))) {@\\ +\mbox{}\verb@ cbf_failnez (cbf_get_image(self, @\\ +\mbox{}\verb@ reserved, (unsigned int)element_number,@\\ +\mbox{}\verb@ (void *)array, (size_t)elsize, elsign,@\\ +\mbox{}\verb@ (size_t) ndimslow, (size_t)ndimfast));@\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ALLOC);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ *slen = elsize*ndimfast*ndimslow;@\\ +\mbox{}\verb@ *s = (char *) array;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_image_as_string",["int element_number", @\\ +\mbox{}\verb@ "int elsize", "int elsign", "int ndimslow", "int ndimfast"],["(Binary)String"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_image_fs":["""@\\ +\mbox{}\verb@// Ensure we free the local temporary@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ +\mbox{}\verb@ get_image_fs_as_string;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Get the length correct@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void get_image_fs_as_string(int element_number, char **s, int *slen,@\\ +\mbox{}\verb@ int elsize, int elsign, int ndimfast, int ndimslow){@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ int reserved = 0;@\\ +\mbox{}\verb@ *slen = 0; /* Initialise in case of problems */@\\ +\mbox{}\verb@ if ((array=malloc(elsize*ndimfast*ndimslow))) {@\\ +\mbox{}\verb@ cbf_failnez (cbf_get_image_fs(self, @\\ +\mbox{}\verb@ reserved, (unsigned int)element_number,@\\ +\mbox{}\verb@ (void *)array, (size_t)elsize, elsign,@\\ +\mbox{}\verb@ (size_t) ndimfast, (size_t)ndimslow));@\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ALLOC);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ *slen = elsize*ndimfast*ndimslow;@\\ +\mbox{}\verb@ *s = (char *) array;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_image_fs_as_string",["int element_number", @\\ +\mbox{}\verb@ "int elsize", "int elsign", "int ndimfast", "int ndimslow"],["(Binary)String"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_image_sf":["""@\\ +\mbox{}\verb@// Ensure we free the local temporary@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ +\mbox{}\verb@ get_image_fs_as_string;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Get the length correct@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void get_image_sf_as_string(int element_number, char **s, int *slen,@\\ +\mbox{}\verb@ int elsize, int elsign, int ndimslow, int ndimfast){@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ int reserved = 0;@\\ +\mbox{}\verb@ *slen = 0; /* Initialise in case of problems */@\\ +\mbox{}\verb@ if ((array=malloc(elsize*ndimfast*ndimslow))) {@\\ +\mbox{}\verb@ cbf_failnez (cbf_get_image_sf(self, @\\ +\mbox{}\verb@ reserved, (unsigned int)element_number,@\\ +\mbox{}\verb@ (void *)array, (size_t)elsize, elsign,@\\ +\mbox{}\verb@ (size_t) ndimslow, (size_t)ndimfast));@\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ALLOC);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ *slen = elsize*ndimfast*ndimslow;@\\ +\mbox{}\verb@ *s = (char *) array;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_image_sf_as_string",["int element_number", @\\ +\mbox{}\verb@ "int elsize", "int elsign", "int ndimslow", "int ndimfast"],["(Binary)String"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_real_image":["""@\\ +\mbox{}\verb@// Ensure we free the local temporary@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ +\mbox{}\verb@ get_real_image_as_string;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Get the length correct@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void get_real_image_as_string(int element_number, char **s, int *slen,@\\ +\mbox{}\verb@ int elsize, int ndimslow, int ndimfast){@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ int reserved = 0;@\\ +\mbox{}\verb@ *slen = 0; /* Initialise in case of problems */@\\ +\mbox{}\verb@ if ((array=malloc(elsize*ndimfast*ndimslow))) {@\\ +\mbox{}\verb@ cbf_failnez (cbf_get_real_image(self, @\\ +\mbox{}\verb@ reserved, (unsigned int)element_number,@\\ +\mbox{}\verb@ (void *)array, (size_t)elsize,@\\ +\mbox{}\verb@ (size_t) ndimslow, (size_t)ndimfast));@\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ALLOC);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ *slen = elsize*ndimfast*ndimslow;@\\ +\mbox{}\verb@ *s = (char *) array;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_real_image_as_string",["int element_number", @\\ +\mbox{}\verb@ "int elsize", "int ndimslow", "int ndimfast"],["(Binary)String"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_real_image_fs":["""@\\ +\mbox{}\verb@// Ensure we free the local temporary@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ +\mbox{}\verb@ get_real_image_fs_as_string;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Get the length correct@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void get_real_image_fs_as_string(int element_number, char **s, int *slen,@\\ +\mbox{}\verb@ int elsize, int ndimfast, int ndimslow){@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ int reserved = 0;@\\ +\mbox{}\verb@ *slen = 0; /* Initialise in case of problems */@\\ +\mbox{}\verb@ if ((array=malloc(elsize*ndimfast*ndimslow))) {@\\ +\mbox{}\verb@ cbf_failnez (cbf_get_real_image_fs(self, @\\ +\mbox{}\verb@ reserved, (unsigned int)element_number,@\\ +\mbox{}\verb@ (void *)array, (size_t)elsize,@\\ +\mbox{}\verb@ (size_t) ndimfast, (size_t)ndimslow));@\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ALLOC);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ *slen = elsize*ndimfast*ndimslow;@\\ +\mbox{}\verb@ *s = (char *) array;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_real_image_fs_as_string",["int element_number", @\\ +\mbox{}\verb@ "int elsize", "int ndimfast", "int ndimslow"],["(Binary)String"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_real_image_sf":["""@\\ +\mbox{}\verb@// Ensure we free the local temporary@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ +\mbox{}\verb@ get_real_image_sf_as_string;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Get the length correct@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void get_real_image_sf_as_string(int element_number, char **s, int *slen,@\\ +\mbox{}\verb@ int elsize, int ndimslow, int ndimfast){@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ int reserved = 0;@\\ +\mbox{}\verb@ *slen = 0; /* Initialise in case of problems */@\\ +\mbox{}\verb@ if ((array=malloc(elsize*ndimfast*ndimslow))) {@\\ +\mbox{}\verb@ cbf_failnez (cbf_get_real_image_sf(self, @\\ +\mbox{}\verb@ reserved, (unsigned int)element_number,@\\ +\mbox{}\verb@ (void *)array, (size_t)elsize,@\\ +\mbox{}\verb@ (size_t) ndimslow, (size_t)ndimfast));@\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ALLOC);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ *slen = elsize*ndimfast*ndimslow;@\\ +\mbox{}\verb@ *s = (char *) array;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_real_image_sf_as_string",["int element_number", @\\ +\mbox{}\verb@ "int elsize", "int ndimslow", "int ndimfast"],["(Binary)String"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_3d_image":["""@\\ +\mbox{}\verb@// Ensure we free the local temporary@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ +\mbox{}\verb@ get_3d_image_as_string;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Get the length correct@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void get_3d_image_as_string(int element_number, char **s, int *slen,@\\ +\mbox{}\verb@ int elsize, int elsign, int ndimfast, int ndimmid, int ndimslow){@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ int reserved = 0;@\\ +\mbox{}\verb@ *slen = 0; /* Initialise in case of problems */@\\ +\mbox{}\verb@ if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) {@\\ +\mbox{}\verb@ cbf_failnez (cbf_get_3d_image(self, @\\ +\mbox{}\verb@ reserved, (unsigned int)element_number,@\\ +\mbox{}\verb@ (void *)array, (size_t)elsize, elsign,@\\ +\mbox{}\verb@ (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast));@\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ALLOC);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ *slen = elsize*ndimfast*ndimmid*ndimslow;@\\ +\mbox{}\verb@ *s = (char *) array;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_3d_image_as_string",["int element_number", @\\ +\mbox{}\verb@ "int elsize", "int elsign", "int ndimslow", "int ndimmid", "int ndimfast"],["(Binary)String"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_3d_image_fs":["""@\\ +\mbox{}\verb@// Ensure we free the local temporary@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ +\mbox{}\verb@ get_3d_image_fs_as_string;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Get the length correct@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void get_3d_image_fs_as_string(int element_number, char **s, int *slen,@\\ +\mbox{}\verb@ int elsize, int elsign, int ndimfast, int ndimmid, int ndimslow){@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ int reserved = 0;@\\ +\mbox{}\verb@ *slen = 0; /* Initialise in case of problems */@\\ +\mbox{}\verb@ if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) {@\\ +\mbox{}\verb@ cbf_failnez (cbf_get_3d_image_fs(self, @\\ +\mbox{}\verb@ reserved, (unsigned int)element_number,@\\ +\mbox{}\verb@ (void *)array, (size_t)elsize, elsign,@\\ +\mbox{}\verb@ (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow));@\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ALLOC);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ *slen = elsize*ndimfast*ndimmid*ndimslow;@\\ +\mbox{}\verb@ *s = (char *) array;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_3d_image_fs_as_string",["int element_number", @\\ +\mbox{}\verb@ "int elsize", "int elsign", "int ndimfast", "int ndimmid", "int ndimslow"],["(Binary)String"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_3d_image_sf":["""@\\ +\mbox{}\verb@// Ensure we free the local temporary@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ +\mbox{}\verb@ get_3d_image_sf_as_string;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Get the length correct@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void get_3d_image_sf_as_string(int element_number, char **s, int *slen,@\\ +\mbox{}\verb@ int elsize, int elsign, int ndimfast, int ndimmid, int ndimslow){@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ int reserved = 0;@\\ +\mbox{}\verb@ *slen = 0; /* Initialise in case of problems */@\\ +\mbox{}\verb@ if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) {@\\ +\mbox{}\verb@ cbf_failnez (cbf_get_3d_image_sf(self, @\\ +\mbox{}\verb@ reserved, (unsigned int)element_number,@\\ +\mbox{}\verb@ (void *)array, (size_t)elsize, elsign,@\\ +\mbox{}\verb@ (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast));@\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ALLOC);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ *slen = elsize*ndimfast*ndimmid*ndimslow;@\\ +\mbox{}\verb@ *s = (char *) array;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_3d_image_sf_as_string",["int element_number", @\\ +\mbox{}\verb@ "int elsize", "int elsign", "int ndimslow", "int ndimmid", "int ndimfast"],["(Binary)String"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_real_3d_image":["""@\\ +\mbox{}\verb@// Ensure we free the local temporary@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ +\mbox{}\verb@ get_real_3d_image_as_string;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Get the length correct@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void get_real_3d_image_as_string(int element_number, char **s, int *slen,@\\ +\mbox{}\verb@ int elsize, int ndimslow, int ndimmid, int ndimfast){@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ int reserved = 0;@\\ +\mbox{}\verb@ *slen = 0; /* Initialise in case of problems */@\\ +\mbox{}\verb@ if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) {@\\ +\mbox{}\verb@ cbf_failnez (cbf_get_real_3d_image(self, @\\ +\mbox{}\verb@ reserved, (unsigned int)element_number,@\\ +\mbox{}\verb@ (void *)array, (size_t)elsize,@\\ +\mbox{}\verb@ (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast));@\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ALLOC);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ *slen = elsize*ndimfast*ndimmid*ndimslow;@\\ +\mbox{}\verb@ *s = (char *) array;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_real_3d_image_as_string",["int element_number", @\\ +\mbox{}\verb@ "int elsize", "int ndimslow", "int ndimmid", "int ndimfast"],["(Binary)String"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_real_3d_image_fs":["""@\\ +\mbox{}\verb@// Ensure we free the local temporary@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ +\mbox{}\verb@ get_real_3d_image_fs_as_string;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Get the length correct@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void get_real_3d_image_fs_as_string(int element_number, char **s, int *slen,@\\ +\mbox{}\verb@ int elsize, int ndimfast, int ndimmid, int ndimslow){@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ int reserved = 0;@\\ +\mbox{}\verb@ *slen = 0; /* Initialise in case of problems */@\\ +\mbox{}\verb@ if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) {@\\ +\mbox{}\verb@ cbf_failnez (cbf_get_real_3d_image_fs(self, @\\ +\mbox{}\verb@ reserved, (unsigned int)element_number,@\\ +\mbox{}\verb@ (void *)array, (size_t)elsize,@\\ +\mbox{}\verb@ (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow));@\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ALLOC);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ *slen = elsize*ndimfast*ndimmid*ndimslow;@\\ +\mbox{}\verb@ *s = (char *) array;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_real_3d_image_fs_as_string",["int element_number", @\\ +\mbox{}\verb@ "int elsize", "int ndimfast", "int ndimmid", "int ndimslow"],["(Binary)String"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_real_3d_image_sf":["""@\\ +\mbox{}\verb@// Ensure we free the local temporary@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ +\mbox{}\verb@ get_real_3d_image_sf_as_string;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Get the length correct@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void get_real_3d_image_sf_as_string(int element_number, char **s, int *slen,@\\ +\mbox{}\verb@ int elsize, int ndimslow, int ndimmid, int ndimfast){@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ int reserved = 0;@\\ +\mbox{}\verb@ *slen = 0; /* Initialise in case of problems */@\\ +\mbox{}\verb@ if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) {@\\ +\mbox{}\verb@ cbf_failnez (cbf_get_real_3d_image_sf(self, @\\ +\mbox{}\verb@ reserved, (unsigned int)element_number,@\\ +\mbox{}\verb@ (void *)array, (size_t)elsize,@\\ +\mbox{}\verb@ (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast));@\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ALLOC);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ *slen = elsize*ndimfast*ndimmid*ndimslow;@\\ +\mbox{}\verb@ *s = (char *) array;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_real_3d_image_sf_as_string",["int element_number", @\\ +\mbox{}\verb@ "int elsize", "int ndimslow", "int ndimmid", "int ndimfast"],["(Binary)String"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_realarray":["""@\\ +\mbox{}\verb@// Ensure we free the local temporary@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ +\mbox{}\verb@ get_realarray_as_string;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Get the length correct@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void get_realarray_as_string(char **s, int *slen){@\\ +\mbox{}\verb@ int binary_id;@\\ +\mbox{}\verb@ size_t elements, elements_read, elsize;@\\ +\mbox{}\verb@ unsigned int compression;@\\ +\mbox{}\verb@ void * array;@\\ +\mbox{}\verb@ *slen = 0; /* Initialise in case of problems */@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_realarrayparameters(self, &compression,@\\ +\mbox{}\verb@ &binary_id, &elsize,@\\ +\mbox{}\verb@ &elements));@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ if ((array=malloc(elsize*elements))) {@\\ +\mbox{}\verb@ /* cbf_failnez (cbf_select_column(cbf,colnum)) */@\\ +\mbox{}\verb@ cbf_failnez (cbf_get_realarray(self, &binary_id, @\\ +\mbox{}\verb@ (void *)array, elsize,@\\ +\mbox{}\verb@ elements, &elements_read));@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ALLOC);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ *slen = elsize*elements;@\\ +\mbox{}\verb@ *s = (char *) array;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_realarray_as_string",[],["(Binary)String"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_integerarray":["""@\\ +\mbox{}\verb@ /* CBFlib must NOT modify the data string which belongs to the scripting @\\ +\mbox{}\verb@ language we will get and check the length via a typemap */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void set_integerarray(unsigned int compression, int binary_id, @\\ +\mbox{}\verb@ char *data, int len, int elsize, int elsigned, int elements){@\\ +\mbox{}\verb@ /* safety check on args */@\\ +\mbox{}\verb@ size_t els, ele;@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ if(len == elsize*elements){@\\ +\mbox{}\verb@ array = data;@\\ +\mbox{}\verb@ els = elsize;@\\ +\mbox{}\verb@ ele = elements;@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_integerarray (self, compression, binary_id, @\\ +\mbox{}\verb@ (void *) data, (size_t) elsize, elsigned, (size_t) elements)); @\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ARGUMENT);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_integerarray",@\\ +\mbox{}\verb@[ "int compression", "int binary_id","(binary) String data", @\\ +\mbox{}\verb@ "int elsize", "int elsigned","int elements"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_integerarray_wdims":["""@\\ +\mbox{}\verb@ /* CBFlib must NOT modify the data string nor the byteorder string@\\ +\mbox{}\verb@ which belongs to the scripting @\\ +\mbox{}\verb@ language we will get and check the length via a typemap */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray_wdims;@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_integerarray_wdims;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void set_integerarray_wdims(unsigned int compression, int binary_id, @\\ +\mbox{}\verb@ char *data, int len, int elsize, int elsigned, int elements,@\\ +\mbox{}\verb@ char *bo, int bolen, int dimfast, int dimmid, int dimslow, int padding){@\\ +\mbox{}\verb@ /* safety check on args */@\\ +\mbox{}\verb@ size_t els, ele;@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ char byteorder[15];@\\ +\mbox{}\verb@ if(len == elsize*elements && elements==dimfast*dimmid*dimslow){@\\ +\mbox{}\verb@ array = data;@\\ +\mbox{}\verb@ els = elsize;@\\ +\mbox{}\verb@ ele = elements;@\\ +\mbox{}\verb@ strncpy(byteorder,bo,bolen<15?bolen:14);@\\ +\mbox{}\verb@ byteorder[bolen<15?bolen:14] = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_integerarray_wdims (self, compression, binary_id, @\\ +\mbox{}\verb@ (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder,@\\ +\mbox{}\verb@ (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding)); @\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ARGUMENT);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_integerarray_wdims",@\\ +\mbox{}\verb@[ "int compression", "int binary_id","(binary) String data", @\\ +\mbox{}\verb@ "int elsize", "int elsigned", "int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_integerarray_wdims_sf":["""@\\ +\mbox{}\verb@ /* CBFlib must NOT modify the data string nor the byteorder string@\\ +\mbox{}\verb@ which belongs to the scripting @\\ +\mbox{}\verb@ language we will get and check the length via a typemap */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray_wdims_sf;@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_integerarray_wdims_sf;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void set_integerarray_wdims_sf(unsigned int compression, int binary_id, @\\ +\mbox{}\verb@ char *data, int len, int elsize, int elsigned, int elements,@\\ +\mbox{}\verb@ char *bo, int bolen, int dimslow, int dimmid, int dimfast, int padding){@\\ +\mbox{}\verb@ /* safety check on args */@\\ +\mbox{}\verb@ size_t els, ele;@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ char byteorder[15];@\\ +\mbox{}\verb@ if(len == elsize*elements && elements==dimfast*dimmid*dimslow){@\\ +\mbox{}\verb@ array = data;@\\ +\mbox{}\verb@ els = elsize;@\\ +\mbox{}\verb@ ele = elements;@\\ +\mbox{}\verb@ strncpy(byteorder,bo,bolen<15?bolen:14);@\\ +\mbox{}\verb@ byteorder[bolen<15?bolen:14] = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_integerarray_wdims_sf (self, compression, binary_id, @\\ +\mbox{}\verb@ (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder,@\\ +\mbox{}\verb@ (size_t)dimslow, (size_t)dimmid, (size_t)dimfast, (size_t)padding)); @\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ARGUMENT);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_integerarray_wdims_sf",@\\ +\mbox{}\verb@[ "int compression", "int binary_id","(binary) String data", @\\ +\mbox{}\verb@ "int elsize","int elsigned","int elements", "String byteorder", "int dimslow", "int dimmid", "int dimfast", "int padding"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_integerarray_wdims_fs":["""@\\ +\mbox{}\verb@ /* CBFlib must NOT modify the data string nor the byteorder string@\\ +\mbox{}\verb@ which belongs to the scripting @\\ +\mbox{}\verb@ language we will get and check the length via a typemap */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray_wdims_fs;@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_integerarray_wdims_fs;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void set_integerarray_wdims_fs(unsigned int compression, int binary_id, @\\ +\mbox{}\verb@ char *data, int len, int elsize, int elsigned, int elements,@\\ +\mbox{}\verb@ char *bo, int bolen, int dimfast, int dimmid, int dimslow, int padding){@\\ +\mbox{}\verb@ /* safety check on args */@\\ +\mbox{}\verb@ size_t els, ele;@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ char byteorder[15];@\\ +\mbox{}\verb@ if(len == elsize*elements && elements==dimfast*dimmid*dimslow){@\\ +\mbox{}\verb@ array = data;@\\ +\mbox{}\verb@ els = elsize;@\\ +\mbox{}\verb@ ele = elements;@\\ +\mbox{}\verb@ strncpy(byteorder,bo,bolen<15?bolen:14);@\\ +\mbox{}\verb@ byteorder[bolen<15?bolen:14] = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_integerarray_wdims_fs (self, compression, binary_id, @\\ +\mbox{}\verb@ (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder,@\\ +\mbox{}\verb@ (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding)); @\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ARGUMENT);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_integerarray_wdims_fs",@\\ +\mbox{}\verb@[ "int compression", "int binary_id","(binary) String data", @\\ +\mbox{}\verb@ "int elsize","int elsigned","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_realarray":["""@\\ +\mbox{}\verb@ /* CBFlib must NOT modify the data string which belongs to the scripting @\\ +\mbox{}\verb@ language we will get and check the length via a typemap */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void set_realarray(unsigned int compression, int binary_id, @\\ +\mbox{}\verb@ char *data, int len, int elsize, int elements){@\\ +\mbox{}\verb@ /* safety check on args */@\\ +\mbox{}\verb@ size_t els, ele;@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ if(len == elsize*elements){@\\ +\mbox{}\verb@ array = data;@\\ +\mbox{}\verb@ els = elsize;@\\ +\mbox{}\verb@ ele = elements;@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_realarray (self, compression, binary_id, @\\ +\mbox{}\verb@ (void *) data, (size_t) elsize, (size_t) elements)); @\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ARGUMENT);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_realarray",@\\ +\mbox{}\verb@[ "int compression", "int binary_id","(binary) String data", @\\ +\mbox{}\verb@ "int elsize","int elements"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_realarray_wdims":["""@\\ +\mbox{}\verb@ /* CBFlib must NOT modify the data string nor the byteorder string@\\ +\mbox{}\verb@ which belongs to the scripting @\\ +\mbox{}\verb@ language we will get and check the length via a typemap */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray_wdims;@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_realarray_wdims;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void set_realarray_wdims(unsigned int compression, int binary_id, @\\ +\mbox{}\verb@ char *data, int len, int elsize, int elements,@\\ +\mbox{}\verb@ char *bo, int bolen, int dimfast, int dimmid, int dimslow, int padding){@\\ +\mbox{}\verb@ /* safety check on args */@\\ +\mbox{}\verb@ size_t els, ele;@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ char byteorder[15];@\\ +\mbox{}\verb@ if(len == elsize*elements && elements==dimfast*dimmid*dimslow){@\\ +\mbox{}\verb@ array = data;@\\ +\mbox{}\verb@ els = elsize;@\\ +\mbox{}\verb@ ele = elements;@\\ +\mbox{}\verb@ strncpy(byteorder,bo,bolen<15?bolen:14);@\\ +\mbox{}\verb@ byteorder[bolen<15?bolen:14] = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_realarray_wdims (self, compression, binary_id, @\\ +\mbox{}\verb@ (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder,@\\ +\mbox{}\verb@ (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding)); @\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ARGUMENT);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_realarray_wdims",@\\ +\mbox{}\verb@[ "int compression", "int binary_id","(binary) String data", @\\ +\mbox{}\verb@ "int elsize","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_realarray_wdims_sf":["""@\\ +\mbox{}\verb@ /* CBFlib must NOT modify the data string nor the byteorder string@\\ +\mbox{}\verb@ which belongs to the scripting @\\ +\mbox{}\verb@ language we will get and check the length via a typemap */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray_wdims_sf;@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_realarray_wdims_sf;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void set_realarray_wdims_sf(unsigned int compression, int binary_id, @\\ +\mbox{}\verb@ char *data, int len, int elsize, int elements,@\\ +\mbox{}\verb@ char *bo, int bolen, int dimslow, int dimmid, int dimfast, int padding){@\\ +\mbox{}\verb@ /* safety check on args */@\\ +\mbox{}\verb@ size_t els, ele;@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ char byteorder[15];@\\ +\mbox{}\verb@ if(len == elsize*elements && elements==dimfast*dimmid*dimslow){@\\ +\mbox{}\verb@ array = data;@\\ +\mbox{}\verb@ els = elsize;@\\ +\mbox{}\verb@ ele = elements;@\\ +\mbox{}\verb@ strncpy(byteorder,bo,bolen<15?bolen:14);@\\ +\mbox{}\verb@ byteorder[bolen<15?bolen:14] = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_realarray_wdims_sf (self, compression, binary_id, @\\ +\mbox{}\verb@ (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder,@\\ +\mbox{}\verb@ (size_t) dimslow, (size_t) dimmid, (size_t) dimfast, (size_t)padding)); @\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ARGUMENT);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_realarray_wdims_sf",@\\ +\mbox{}\verb@[ "int compression", "int binary_id","(binary) String data", @\\ +\mbox{}\verb@ "int elsize","int elements", "String byteorder", "int dimslow", "int dimmid", "int dimfast", "int padding"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_realarray_wdims_fs":["""@\\ +\mbox{}\verb@ /* CBFlib must NOT modify the data string nor the byteorder string@\\ +\mbox{}\verb@ which belongs to the scripting @\\ +\mbox{}\verb@ language we will get and check the length via a typemap */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray_wdims_fs;@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_realarray_wdims_fs;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void set_realarray_wdims_fs(unsigned int compression, int binary_id, @\\ +\mbox{}\verb@ char *data, int len, int elsize, int elements,@\\ +\mbox{}\verb@ char *bo, int bolen, int dimfast, int dimmid, int dimslow, int padding){@\\ +\mbox{}\verb@ /* safety check on args */@\\ +\mbox{}\verb@ size_t els, ele;@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ char byteorder[15];@\\ +\mbox{}\verb@ if(len == elsize*elements && elements==dimfast*dimmid*dimslow){@\\ +\mbox{}\verb@ array = data;@\\ +\mbox{}\verb@ els = elsize;@\\ +\mbox{}\verb@ ele = elements;@\\ +\mbox{}\verb@ strncpy(byteorder,bo,bolen<15?bolen:14);@\\ +\mbox{}\verb@ byteorder[bolen<15?bolen:14] = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_realarray_wdims_fs (self, compression, binary_id, @\\ +\mbox{}\verb@ (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder,@\\ +\mbox{}\verb@ (size_t) dimfast, (size_t) dimmid, (size_t) dimslow, (size_t)padding)); @\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ARGUMENT);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_realarray_wdims_fs",@\\ +\mbox{}\verb@[ "int compression", "int binary_id","(binary) String data", @\\ +\mbox{}\verb@ "int elsize","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_image":["""@\\ +\mbox{}\verb@ /* CBFlib must NOT modify the data string which belongs to the scripting @\\ +\mbox{}\verb@ language we will get and check the length via a typemap */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *data, int len) } set_image;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void set_image(unsigned int element_number,@\\ +\mbox{}\verb@ unsigned int compression, @\\ +\mbox{}\verb@ char *data, int len, int elsize, int elsign, int ndimslow, int ndimfast){@\\ +\mbox{}\verb@ /* safety check on args */@\\ +\mbox{}\verb@ size_t els;@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ if(len == elsize*ndimslow*ndimfast){@\\ +\mbox{}\verb@ array = data;@\\ +\mbox{}\verb@ els = elsize;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_image (self, reserved, element_number, compression,@\\ +\mbox{}\verb@ (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t)ndimfast)); @\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ARGUMENT);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_image",@\\ +\mbox{}\verb@[ "int element_number","int compression","(binary) String data", @\\ +\mbox{}\verb@ "int elsize", "int elsign", "int dimslow", "int dimfast"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_image_fs":["""@\\ +\mbox{}\verb@ /* CBFlib must NOT modify the data string which belongs to the scripting @\\ +\mbox{}\verb@ language we will get and check the length via a typemap */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *data, int len) } set_image;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void set_image_fs(unsigned int element_number,@\\ +\mbox{}\verb@ unsigned int compression, @\\ +\mbox{}\verb@ char *data, int len, int elsize, int elsign, int ndimfast, int ndimslow){@\\ +\mbox{}\verb@ /* safety check on args */@\\ +\mbox{}\verb@ size_t els;@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ if(len == elsize*ndimslow*ndimfast){@\\ +\mbox{}\verb@ array = data;@\\ +\mbox{}\verb@ els = elsize;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_image (self, reserved, element_number, compression,@\\ +\mbox{}\verb@ (void *) data, (size_t) elsize, elsign, (size_t) ndimfast, (size_t)ndimslow)); @\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ARGUMENT);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_image_fs",@\\ +\mbox{}\verb@[ "int element_number","int compression","(binary) String data", @\\ +\mbox{}\verb@ "int elsize", "int elsign", "int dimfast", "int dimslow"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_image_sf":["""@\\ +\mbox{}\verb@ /* CBFlib must NOT modify the data string which belongs to the scripting @\\ +\mbox{}\verb@ language we will get and check the length via a typemap */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *data, int len) } set_image_sf;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void set_image_sf(unsigned int element_number,@\\ +\mbox{}\verb@ unsigned int compression, @\\ +\mbox{}\verb@ char *data, int len, int elsize, int elsign, int ndimslow, int ndimfast){@\\ +\mbox{}\verb@ /* safety check on args */@\\ +\mbox{}\verb@ size_t els;@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ if(len == elsize*ndimslow*ndimfast){@\\ +\mbox{}\verb@ array = data;@\\ +\mbox{}\verb@ els = elsize;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_image_sf (self, reserved, element_number, compression,@\\ +\mbox{}\verb@ (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t)ndimfast)); @\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ARGUMENT);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_image_sf",@\\ +\mbox{}\verb@[ "int element_number","int compression","(binary) String data", @\\ +\mbox{}\verb@ "int elsize", "int elsign", "int dimslow", "int dimfast"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_real_image":["""@\\ +\mbox{}\verb@ /* CBFlib must NOT modify the data string which belongs to the scripting @\\ +\mbox{}\verb@ language we will get and check the length via a typemap */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_image;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void set_real_image(unsigned int element_number,@\\ +\mbox{}\verb@ unsigned int compression, @\\ +\mbox{}\verb@ char *data, int len, int elsize, int ndimslow, int ndimfast){@\\ +\mbox{}\verb@ /* safety check on args */@\\ +\mbox{}\verb@ size_t els;@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ if(len == elsize*ndimslow*ndimfast){@\\ +\mbox{}\verb@ array = data;@\\ +\mbox{}\verb@ els = elsize;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_real_image (self, reserved, element_number, compression,@\\ +\mbox{}\verb@ (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimfast)); @\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ARGUMENT);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_real_image",@\\ +\mbox{}\verb@[ "int element_number","int compression","(binary) String data", @\\ +\mbox{}\verb@ "int elsize", "int dimslow", "int dimfast"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_real_image_fs":["""@\\ +\mbox{}\verb@ /* CBFlib must NOT modify the data string which belongs to the scripting @\\ +\mbox{}\verb@ language we will get and check the length via a typemap */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_image;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void set_real_image_fs(unsigned int element_number,@\\ +\mbox{}\verb@ unsigned int compression, @\\ +\mbox{}\verb@ char *data, int len, int elsize, int ndimfast, int ndimslow){@\\ +\mbox{}\verb@ /* safety check on args */@\\ +\mbox{}\verb@ size_t els;@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ if(len == elsize*ndimslow*ndimfast){@\\ +\mbox{}\verb@ array = data;@\\ +\mbox{}\verb@ els = elsize;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_real_image_fs (self, reserved, element_number, compression,@\\ +\mbox{}\verb@ (void *) data, (size_t) elsize, (size_t) ndimfast, (size_t)ndimslow)); @\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ARGUMENT);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_real_image_fs",@\\ +\mbox{}\verb@[ "int element_number","int compression","(binary) String data", @\\ +\mbox{}\verb@ "int elsize", "int dimfast", "int dimslow"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_real_image_sf":["""@\\ +\mbox{}\verb@ /* CBFlib must NOT modify the data string which belongs to the scripting @\\ +\mbox{}\verb@ language we will get and check the length via a typemap */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_image_sf;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void set_real_image_sf(unsigned int element_number,@\\ +\mbox{}\verb@ unsigned int compression, @\\ +\mbox{}\verb@ char *data, int len, int elsize, int ndimslow, int ndimfast){@\\ +\mbox{}\verb@ /* safety check on args */@\\ +\mbox{}\verb@ size_t els;@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ if(len == elsize*ndimslow*ndimfast){@\\ +\mbox{}\verb@ array = data;@\\ +\mbox{}\verb@ els = elsize;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_real_image_sf (self, reserved, element_number, compression,@\\ +\mbox{}\verb@ (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimfast)); @\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ARGUMENT);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_real_image_sf",@\\ +\mbox{}\verb@[ "int element_number","int compression","(binary) String data", @\\ +\mbox{}\verb@ "int elsize", "int dimslow", "int dimfast"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_3d_image":["""@\\ +\mbox{}\verb@ /* CBFlib must NOT modify the data string which belongs to the scripting @\\ +\mbox{}\verb@ language we will get and check the length via a typemap */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *data, int len) } set_3d_image;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void set_3d_image(unsigned int element_number,@\\ +\mbox{}\verb@ unsigned int compression, @\\ +\mbox{}\verb@ char *data, int len, int elsize, int elsign, int ndimslow, int ndimmid, int ndimfast){@\\ +\mbox{}\verb@ /* safety check on args */@\\ +\mbox{}\verb@ size_t els;@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ if(len == elsize*ndimslow*ndimmid*ndimfast){@\\ +\mbox{}\verb@ array = data;@\\ +\mbox{}\verb@ els = elsize;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_3d_image (self, reserved, element_number, compression,@\\ +\mbox{}\verb@ (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t) ndimmid, (size_t)ndimfast)); @\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ARGUMENT);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_3d_image",@\\ +\mbox{}\verb@[ "int element_number","int compression","(binary) String data", @\\ +\mbox{}\verb@ "int elsize", "int elsign", "int dimslow", "int dimmid", "int dimfast"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_3d_image_fs":["""@\\ +\mbox{}\verb@ /* CBFlib must NOT modify the data string which belongs to the scripting @\\ +\mbox{}\verb@ language we will get and check the length via a typemap */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *data, int len) } set_3d_image;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void set_3d_image_fs(unsigned int element_number,@\\ +\mbox{}\verb@ unsigned int compression, @\\ +\mbox{}\verb@ char *data, int len, int elsize, int elsign, int ndimfast, int ndimmid, int ndimslow){@\\ +\mbox{}\verb@ /* safety check on args */@\\ +\mbox{}\verb@ size_t els;@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ if(len == elsize*ndimslow*ndimmid*ndimfast){@\\ +\mbox{}\verb@ array = data;@\\ +\mbox{}\verb@ els = elsize;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_3d_image_fs (self, reserved, element_number, compression,@\\ +\mbox{}\verb@ (void *) data, (size_t) elsize, elsign, (size_t) ndimfast, (size_t) ndimmid, (size_t)ndimslow)); @\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ARGUMENT);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_3d_image_fs",@\\ +\mbox{}\verb@[ "int element_number","int compression","(binary) String data", @\\ +\mbox{}\verb@ "int elsize", "int elsign", "int dimfast", "int dimmid", "int dimslow"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_3d_image_sf":["""@\\ +\mbox{}\verb@ /* CBFlib must NOT modify the data string which belongs to the scripting @\\ +\mbox{}\verb@ language we will get and check the length via a typemap */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *data, int len) } set_3d_image;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void set_3d_image_sf(unsigned int element_number,@\\ +\mbox{}\verb@ unsigned int compression, @\\ +\mbox{}\verb@ char *data, int len, int elsize, int elsign, int ndimslow, int ndimmid, int ndimfast){@\\ +\mbox{}\verb@ /* safety check on args */@\\ +\mbox{}\verb@ size_t els;@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ if(len == elsize*ndimslow*ndimmid*ndimfast){@\\ +\mbox{}\verb@ array = data;@\\ +\mbox{}\verb@ els = elsize;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_3d_image_sf (self, reserved, element_number, compression,@\\ +\mbox{}\verb@ (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t) ndimmid, (size_t)ndimfast)); @\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ARGUMENT);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_3d_image_sf",@\\ +\mbox{}\verb@[ "int element_number","int compression","(binary) String data", @\\ +\mbox{}\verb@ "int elsize", "int elsign", "int dimslow", "int dimmid", "int dimfast"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_real_3d_image":["""@\\ +\mbox{}\verb@ /* CBFlib must NOT modify the data string which belongs to the scripting @\\ +\mbox{}\verb@ language we will get and check the length via a typemap */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_3d_image_sf;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void set_real_3d_image(unsigned int element_number,@\\ +\mbox{}\verb@ unsigned int compression, @\\ +\mbox{}\verb@ char *data, int len, int elsize, int ndimslow, int ndimmid, int ndimfast){@\\ +\mbox{}\verb@ /* safety check on args */@\\ +\mbox{}\verb@ size_t els;@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ if(len == elsize*ndimslow*ndimmid*ndimfast){@\\ +\mbox{}\verb@ array = data;@\\ +\mbox{}\verb@ els = elsize;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_real_3d_image (self, reserved, element_number, compression,@\\ +\mbox{}\verb@ (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); @\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ARGUMENT);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_real_3d_image",@\\ +\mbox{}\verb@[ "int element_number","int compression","(binary) String data", @\\ +\mbox{}\verb@ "int elsize", "int dimslow", "int dimmid", "int dimfast"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_real_3d_image_fs":["""@\\ +\mbox{}\verb@ /* CBFlib must NOT modify the data string which belongs to the scripting @\\ +\mbox{}\verb@ language we will get and check the length via a typemap */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_3d_image_fs;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void set_real_3d_image_fs(unsigned int element_number,@\\ +\mbox{}\verb@ unsigned int compression, @\\ +\mbox{}\verb@ char *data, int len, int elsize, int ndimfast, int ndimmid, int ndimslow){@\\ +\mbox{}\verb@ /* safety check on args */@\\ +\mbox{}\verb@ size_t els;@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ if(len == elsize*ndimslow*ndimmid*ndimfast){@\\ +\mbox{}\verb@ array = data;@\\ +\mbox{}\verb@ els = elsize;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_real_3d_image_fs (self, reserved, element_number, compression,@\\ +\mbox{}\verb@ (void *) data, (size_t) elsize, (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow)); @\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ARGUMENT);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_real_3d_image_fs",@\\ +\mbox{}\verb@[ "int element_number","int compression","(binary) String data", @\\ +\mbox{}\verb@ "int elsize", "int dimfast", "int dimmid", "int dimslow"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_real_3d_image_sf":["""@\\ +\mbox{}\verb@ /* CBFlib must NOT modify the data string which belongs to the scripting @\\ +\mbox{}\verb@ language we will get and check the length via a typemap */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_3d_image_sf;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void set_real_3d_image_sf(unsigned int element_number,@\\ +\mbox{}\verb@ unsigned int compression, @\\ +\mbox{}\verb@ char *data, int len, int elsize, int ndimslow, int ndimmid, int ndimfast){@\\ +\mbox{}\verb@ /* safety check on args */@\\ +\mbox{}\verb@ size_t els;@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ void *array;@\\ +\mbox{}\verb@ if(len == elsize*ndimslow*ndimmid*ndimfast){@\\ +\mbox{}\verb@ array = data;@\\ +\mbox{}\verb@ els = elsize;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_real_3d_image_sf (self, reserved, element_number, compression,@\\ +\mbox{}\verb@ (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); @\\ +\mbox{}\verb@ }else{@\\ +\mbox{}\verb@ cbf_failnez(CBF_ARGUMENT);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_real_3d_image_sf",@\\ +\mbox{}\verb@[ "int element_number","int compression","(binary) String data", @\\ +\mbox{}\verb@ "int elsize", "int dimslow", "int dimmid", "int dimfast"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_image_size": ["""@\\ +\mbox{}\verb@%apply int *OUTPUT {int *ndimslow, int *ndimfast} get_image_size;@\\ +\mbox{}\verb@ void get_image_size(unsigned int element_number, int *ndimslow, int *ndimfast){@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ size_t inslow, infast;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_image_size(self,reserved,element_number,&inslow,&infast));@\\ +\mbox{}\verb@ *ndimslow = (int)inslow;@\\ +\mbox{}\verb@ *ndimfast = (int)infast; @\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_image_size",["Integer element_number"],["size_t ndim1","size_t ndim2"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_image_size_fs": ["""@\\ +\mbox{}\verb@%apply int *OUTPUT {int *ndimfast, int *ndimslow} get_image_size_fs;@\\ +\mbox{}\verb@ void get_image_size_fs(unsigned int element_number, int *ndimfast, int *ndimslow){@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ size_t infast, inslow;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_image_size_fs(self,reserved,element_number,&infast,&inslow));@\\ +\mbox{}\verb@ *ndimfast = (int)infast; /* FIXME - is that how to convert? */@\\ +\mbox{}\verb@ *ndimslow = (int)inslow; @\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_image_size_fs",["Integer element_number"],["size_t ndimfast","size_t ndimslow"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_image_size_sf": ["""@\\ +\mbox{}\verb@%apply int *OUTPUT {int *ndimslow, int *ndimfast} get_image_size_sf;@\\ +\mbox{}\verb@ void get_image_size_sf(unsigned int element_number, int *ndimslow, int *ndimfast){@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ size_t inslow, infast;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_image_size(self,reserved,element_number,&inslow,&infast));@\\ +\mbox{}\verb@ *ndimslow = (int)inslow;@\\ +\mbox{}\verb@ *ndimfast = (int)infast; @\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_image_size_sf",["Integer element_number"],["size_t ndimslow","size_t ndimfast"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_3d_image_size": ["""@\\ +\mbox{}\verb@%apply int *OUTPUT {int *ndimslow, int *ndimmid, int *ndimfast} get_3d_image_size;@\\ +\mbox{}\verb@ void get_3d_image_size(unsigned int element_number, int *ndimslow, int *ndimmid, int *ndimfast){@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ size_t inslow, inmid, infast;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_3d_image_size(self,reserved,element_number,&inslow,&inmid,&infast));@\\ +\mbox{}\verb@ *ndimslow = (int)inslow; /* FIXME - is that how to convert? */@\\ +\mbox{}\verb@ *ndimmid = (int)inmid; @\\ +\mbox{}\verb@ *ndimfast = (int)infast;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_3d_image_size",["Integer element_number"],["size_t ndimslow","size_t ndimmid","size_t ndimfast"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_3d_image_size_fs": ["""@\\ +\mbox{}\verb@%apply int *OUTPUT {int *ndimslow, int *ndimmid, int *ndimfast} get_3d_image_size;@\\ +\mbox{}\verb@ void get_3d_image_size_fs(unsigned int element_number, int *ndimfast, int *ndimmid, int *ndimslow){@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ size_t inslow, inmid, infast;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_3d_image_size_fs(self,reserved,element_number,&infast,&inmid,&inslow));@\\ +\mbox{}\verb@ *ndimslow = (int)inslow; /* FIXME - is that how to convert? */@\\ +\mbox{}\verb@ *ndimmid = (int)inmid; @\\ +\mbox{}\verb@ *ndimfast = (int)infast;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_3d_image_size",["Integer element_number"],["size_t ndimfast","size_t ndimmid","size_t ndimslow"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_3d_image_size_sf": ["""@\\ +\mbox{}\verb@%apply int *OUTPUT {int *ndimslow, int *ndimmid, int *ndimfast} get_3d_image_size_sf;@\\ +\mbox{}\verb@ void get_3d_image_size_sf(unsigned int element_number, int *ndimslow, int *ndimmid, int *ndimfast){@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ size_t inslow, inmid, infast;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_3d_image_size_sf(self,reserved,element_number,&inslow,&inmid,&infast));@\\ +\mbox{}\verb@ *ndimslow = (int)inslow; /* FIXME - is that how to convert? */@\\ +\mbox{}\verb@ *ndimmid = (int)inmid; @\\ +\mbox{}\verb@ *ndimfast = (int)infast;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_3d_image_size_sf",["Integer element_number"],["size_t ndimslow","size_t ndimmid","size_t ndimfast"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_pixel_size" : ["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *psize} get_pixel_size;@\\ +\mbox{}\verb@ void get_pixel_size(unsigned int element_number, @\\ +\mbox{}\verb@ unsigned int axis_number, double *psize){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_pixel_size(self, @\\ +\mbox{}\verb@ element_number, @\\ +\mbox{}\verb@ axis_number, @\\ +\mbox{}\verb@ psize));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_pixel_size",["Int element_number","Int axis_number"],@\\ +\mbox{}\verb@ ["Float pixel_size"]] ,@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_pixel_size_fs" : ["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *psize} get_pixel_size;@\\ +\mbox{}\verb@ void get_pixel_size_fs(unsigned int element_number, @\\ +\mbox{}\verb@ unsigned int axis_number, double *psize){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_pixel_size_fs(self, @\\ +\mbox{}\verb@ element_number, @\\ +\mbox{}\verb@ axis_number, @\\ +\mbox{}\verb@ psize));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_pixel_size_fs",["Int element_number","Int axis_number"],@\\ +\mbox{}\verb@ ["Float pixel_size"]] ,@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_pixel_size_sf" : ["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *psize} get_pixel_size;@\\ +\mbox{}\verb@ void get_pixel_size_sf(unsigned int element_number, @\\ +\mbox{}\verb@ unsigned int axis_number, double *psize){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_pixel_size_sf(self, @\\ +\mbox{}\verb@ element_number, @\\ +\mbox{}\verb@ axis_number, @\\ +\mbox{}\verb@ psize));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_pixel_size_sf",["Int element_number","Int axis_number"],@\\ +\mbox{}\verb@ ["Float pixel_size"]] ,@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_pixel_size":["""@\\ +\mbox{}\verb@ void set_pixel_size (unsigned int element_number, @\\ +\mbox{}\verb@ unsigned int axis_number, double psize){@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_pixel_size(self, @\\ +\mbox{}\verb@ element_number, @\\ +\mbox{}\verb@ axis_number, @\\ +\mbox{}\verb@ psize));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_pixel_size",@\\ +\mbox{}\verb@ ["Int element_number","Int axis_number","Float pixel size"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_pixel_size_fs":["""@\\ +\mbox{}\verb@ void set_pixel_size_fs (unsigned int element_number, @\\ +\mbox{}\verb@ unsigned int axis_number, double psize){@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_pixel_size_fs(self, @\\ +\mbox{}\verb@ element_number, @\\ +\mbox{}\verb@ axis_number, @\\ +\mbox{}\verb@ psize));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_pixel_size_fs",@\\ +\mbox{}\verb@ ["Int element_number","Int axis_number","Float pixel size"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_pixel_size_sf":["""@\\ +\mbox{}\verb@ void set_pixel_size_sf (unsigned int element_number, @\\ +\mbox{}\verb@ unsigned int axis_number, double psize){@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_pixel_size_sf(self, @\\ +\mbox{}\verb@ element_number, @\\ +\mbox{}\verb@ axis_number, @\\ +\mbox{}\verb@ psize));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_pixel_size_sf",@\\ +\mbox{}\verb@ ["Int element_number","Int axis_number","Float pixel size"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_write_file" : ["""@\\ +\mbox{}\verb@ void write_file(const char* filename, int ciforcbf, int headers, @\\ +\mbox{}\verb@ int encoding){@\\ +\mbox{}\verb@ FILE *stream;@\\ +\mbox{}\verb@ int readable;@\\ +\mbox{}\verb@ /* Make readable false so we can close the file immediately */@\\ +\mbox{}\verb@ readable = 0;@\\ +\mbox{}\verb@ if ( ! ( stream = fopen (filename, "w+b")) ){@\\ +\mbox{}\verb@ cbf_failnez(CBF_FILEOPEN);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ else{@\\ +\mbox{}\verb@ cbf_failnez(cbf_write_file(self, stream, readable, @\\ +\mbox{}\verb@ ciforcbf, headers, encoding));@\\ +\mbox{}\verb@ fclose(stream);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","write_file",["String filename","Integer ciforcbf","Integer Headers", @\\ +\mbox{}\verb@ "Integer encoding"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_write_widefile" : ["""@\\ +\mbox{}\verb@ void write_widefile(const char* filename, int ciforcbf, int headers, @\\ +\mbox{}\verb@ int encoding){@\\ +\mbox{}\verb@ FILE *stream;@\\ +\mbox{}\verb@ int readable;@\\ +\mbox{}\verb@ /* Make readable false so we can close the file immediately */@\\ +\mbox{}\verb@ readable = 0;@\\ +\mbox{}\verb@ if ( ! ( stream = fopen (filename, "w+b")) ){@\\ +\mbox{}\verb@ cbf_failnez(CBF_FILEOPEN);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ else{@\\ +\mbox{}\verb@ cbf_failnez(cbf_write_widefile(self, stream, readable, @\\ +\mbox{}\verb@ ciforcbf, headers, encoding));@\\ +\mbox{}\verb@ fclose(stream);@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","write_widefile",["String filename","Integer ciforcbf","Integer Headers", @\\ +\mbox{}\verb@ "Integer encoding"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_read_template":["""@\\ +\mbox{}\verb@ void read_template(char* filename){@\\ +\mbox{}\verb@ /* CBFlib needs a stream that will remain open @\\ +\mbox{}\verb@ hence DO NOT open from python */@\\ +\mbox{}\verb@ FILE *stream;@\\ +\mbox{}\verb@ if ( ! ( stream = fopen (filename, "rb")) ){@\\ +\mbox{}\verb@ cbf_failnez(CBF_FILEOPEN);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ else{@\\ +\mbox{}\verb@ cbf_failnez(cbf_read_template (self, stream)); }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@""","read_template",["String filename"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_read_file" : ["""@\\ +\mbox{}\verb@ void read_file(char* filename, int headers){@\\ +\mbox{}\verb@ /* CBFlib needs a stream that will remain open @\\ +\mbox{}\verb@ hence DO NOT open from python */@\\ +\mbox{}\verb@ FILE *stream;@\\ +\mbox{}\verb@ if ( ! ( stream = fopen (filename, "rb")) ){@\\ +\mbox{}\verb@ cbf_failnez(CBF_FILEOPEN);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ else{@\\ +\mbox{}\verb@ cbf_failnez(cbf_read_file(self, stream, headers)); @\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","read_file",["String filename","Integer headers"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_read_widefile" : ["""@\\ +\mbox{}\verb@ void read_widefile(char* filename, int headers){@\\ +\mbox{}\verb@ /* CBFlib needs a stream that will remain open @\\ +\mbox{}\verb@ hence DO NOT open from python */@\\ +\mbox{}\verb@ FILE *stream;@\\ +\mbox{}\verb@ if ( ! ( stream = fopen (filename, "rb")) ){@\\ +\mbox{}\verb@ cbf_failnez(CBF_FILEOPEN);@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ else{@\\ +\mbox{}\verb@ cbf_failnez(cbf_read_widefile(self, stream, headers)); @\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","read_widefile",["String filename","Integer headers"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_doublevalue":["""@\\ +\mbox{}\verb@ void set_doublevalue(const char *format, double number){@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_doublevalue(self,format,number));}@\\ +\mbox{}\verb@""","set_doublevalue",["String format","Float number"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_require_integervalue":["""@\\ +\mbox{}\verb@%apply int *OUTPUT {int *number} require_integervalue;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void require_integervalue(int *number, int thedefault){@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ cbf_failnez(cbf_require_integervalue(self,number,thedefault));@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","require_integervalue", ["Int thedefault"],["Int number"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_require_doublevalue":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *number} require_doublevalue;@\\ +\mbox{}\verb@void require_doublevalue(double *number, double defaultvalue){@\\ +\mbox{}\verb@ cbf_failnez(cbf_require_doublevalue(self,number,defaultvalue));@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@""","require_doublevalue",["Float Default"],["Float Number"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_require_column_value":["""@\\ +\mbox{}\verb@ const char* require_column_value(const char *columnname,@\\ +\mbox{}\verb@ const char *defaultvalue){@\\ +\mbox{}\verb@ const char * result;@\\ +\mbox{}\verb@ cbf_failnez(cbf_require_column_value(self,columnname,@\\ +\mbox{}\verb@ &result,defaultvalue));@\\ +\mbox{}\verb@ return result;@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@""","require_column_value",@\\ +\mbox{}\verb@ ["String columnnanme","String Default"],["String Name"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_require_column_doublevalue":["""@\\ +\mbox{}\verb@%apply double *OUTPUT { double *number} require_column_doublevalue;@\\ +\mbox{}\verb@void require_column_doublevalue(const char *columnname, double * number,@\\ +\mbox{}\verb@ const double defaultvalue){@\\ +\mbox{}\verb@ cbf_failnez(cbf_require_column_doublevalue(self,@\\ +\mbox{}\verb@ columnname,number,defaultvalue));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","require_column_doublevalue",["String columnname","Float Value"],@\\ +\mbox{}\verb@ ["Float defaultvalue"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_require_column_integervalue":["""@\\ +\mbox{}\verb@%apply int *OUTPUT {int *number} require_column_integervalue;@\\ +\mbox{}\verb@void require_column_integervalue(const char *columnname, @\\ +\mbox{}\verb@ int *number, const int defaultvalue){@\\ +\mbox{}\verb@ cbf_failnez(cbf_require_column_integervalue(self,@\\ +\mbox{}\verb@ columnname, number,defaultvalue));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","require_column_integervalue",["String Columnvalue","Int default"],@\\ +\mbox{}\verb@ ["Int Value"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_require_value" : ["""@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ const char* require_value(const char* defaultvalue){@\\ +\mbox{}\verb@ const char * result;@\\ +\mbox{}\verb@ cbf_failnez(cbf_require_value(self, &result, defaultvalue));@\\ +\mbox{}\verb@ return result;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","require_value",["String defaultvalue"],['String Value']],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_require_diffrn_id":["""@\\ +\mbox{}\verb@ const char* require_diffrn_id(const char* defaultid){@\\ +\mbox{}\verb@ const char * id;@\\ +\mbox{}\verb@ cbf_failnez(cbf_require_diffrn_id(self,&id,defaultid));@\\ +\mbox{}\verb@ return id;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","require_diffrn_id", ["String Default_id"],["String diffrn_id"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_polarization":["""@\\ +\mbox{}\verb@ /* Returns a pair of double values */@\\ +\mbox{}\verb@%apply double *OUTPUT { double *in1, double *in2 };@\\ +\mbox{}\verb@ void get_polarization(double *in1,double *in2){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_polarization (self, in1, in2));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_polarization",[],@\\ +\mbox{}\verb@ ["float polarizn_source_ratio","float polarizn_source_norm"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_polarization":["""@\\ +\mbox{}\verb@ void set_polarization (double polarizn_source_ratio,@\\ +\mbox{}\verb@ double polarizn_source_norm){@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_polarization(self,@\\ +\mbox{}\verb@ polarizn_source_ratio,@\\ +\mbox{}\verb@ polarizn_source_norm));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_polarization",@\\ +\mbox{}\verb@ ["Float polarizn_source_ratio","Float polarizn_source_norm"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_divergence":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *div_x_source, double *div_y_source,@\\ +\mbox{}\verb@ double *div_x_y_source } get_divergence;@\\ +\mbox{}\verb@ void get_divergence(double *div_x_source, double *div_y_source,@\\ +\mbox{}\verb@ double *div_x_y_source){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_divergence(self, @\\ +\mbox{}\verb@ div_x_source, @\\ +\mbox{}\verb@ div_y_source,@\\ +\mbox{}\verb@ div_x_y_source)); @\\ +\mbox{}\verb@ } @\\ +\mbox{}\verb@""","get_divergence",[],@\\ +\mbox{}\verb@ ["Float div_x_source","Float div_y_source","Float div_x_y_source"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_divergence":["""@\\ +\mbox{}\verb@ void set_divergence ( double div_x_source, double div_y_source,@\\ +\mbox{}\verb@ double div_x_y_source){@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_divergence (self, div_x_source, @\\ +\mbox{}\verb@ div_y_source,div_x_y_source));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_divergence",@\\ +\mbox{}\verb@ ["Float div_x_source","Float div_y_source","Float div_x_y_source"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_gain":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *gain, double *gain_esd} get_gain;@\\ +\mbox{}\verb@ void get_gain (unsigned int element_number, double *gain, @\\ +\mbox{}\verb@ double *gain_esd){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_gain (self, element_number, gain, gain_esd));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_gain",@\\ +\mbox{}\verb@ [],["Float gain", "Float gain_esd"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_gain":["""@\\ +\mbox{}\verb@ void set_gain (unsigned int element_number, double gain, double gain_esd){@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_gain (self, element_number, gain, gain_esd));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_gain",["Float gain", "Float gain_esd"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_element_id":["""@\\ +\mbox{}\verb@ const char * get_element_id(unsigned int element_number){@\\ +\mbox{}\verb@ const char * result;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_element_id (self, element_number, &result));@\\ +\mbox{}\verb@ return result;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_element_id", ["Integer element_number"],["String"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_axis_setting":["""@\\ +\mbox{}\verb@ void set_axis_setting(const char *axis_id,@\\ +\mbox{}\verb@ double start, double increment){@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_axis_setting(self,reserved,@\\ +\mbox{}\verb@ axis_id,start,increment));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_axis_setting",["String axis_id", "Float start", "Float increment"],@\\ +\mbox{}\verb@ []],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_count_axis_ancestors":["""@\\ +\mbox{}\verb@%apply int *OUTPUT {int *ancestors} count_axis_ancestors;@\\ +\mbox{}\verb@ void count_axis_ancestors(const char *axis_id,@\\ +\mbox{}\verb@ int *ancestors){@\\ +\mbox{}\verb@ unsigned int anc;@\\ +\mbox{}\verb@ cbf_failnez(cbf_count_axis_ancestors(self,axis_id,&anc));@\\ +\mbox{}\verb@ *ancestors = anc;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","count_axis_ancestors",["String axis_id"],["Integer"],],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_axis_ancestor":["""@\\ +\mbox{}\verb@ const char * get_axis_ancestor(const char *axis_id,@\\ +\mbox{}\verb@ int ancestor_index){@\\ +\mbox{}\verb@ const char* anc;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_axis_ancestor(self,axis_id,@\\ +\mbox{}\verb@ (unsigned int)ancestor_index,&anc));@\\ +\mbox{}\verb@ return anc;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_axis_ancestor",["String axis_id", "Integer ancestor_index"],["String"],],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_axis_depends_on":["""@\\ +\mbox{}\verb@ const char * get_axis_depends_on(const char *axis_id){@\\ +\mbox{}\verb@ const char* dep_on;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_axis_depends_on(self,axis_id,@\\ +\mbox{}\verb@ &dep_on));@\\ +\mbox{}\verb@ return dep_on;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_axis_depends_on",["String axis_id"],["String"],],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_axis_equipment":["""@\\ +\mbox{}\verb@ const char * get_axis_equipment(const char *axis_id){@\\ +\mbox{}\verb@ const char* equip;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_axis_equipment(self,axis_id,@\\ +\mbox{}\verb@ &equip));@\\ +\mbox{}\verb@ return equip;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_axis_equipment",["String axis_id"],["String"],],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_axis_equipment_component":["""@\\ +\mbox{}\verb@ const char * get_axis_equipment_component(const char *axis_id){@\\ +\mbox{}\verb@ const char* equip_comp;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_axis_equipment_component(self,axis_id,@\\ +\mbox{}\verb@ &equip_comp));@\\ +\mbox{}\verb@ return equip_comp;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_axis_equipment_component",["String axis_id"],["String"],],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_axis_offset":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *offset1, double *offset2, double offset3} get_axis_offset;@\\ +\mbox{}\verb@ void get_axis_offset(const char *axis_id,@\\ +\mbox{}\verb@ double *offset1, double *offset2, double*offset3){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_axis_offset(self,axis_id,@\\ +\mbox{}\verb@ offset1, offset2,offset3));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_axis_offset",["String axis_id"],@\\ +\mbox{}\verb@ ["Float offset1", "Float offset2", "Float offset3"],],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_axis_rotation":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *rotation} get_axis_rotation;@\\ +\mbox{}\verb@ void get_axis_rotation(const char *axis_id,@\\ +\mbox{}\verb@ double *rotation){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_axis_rotation(self,axis_id,@\\ +\mbox{}\verb@ rotation));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_axis_rotation",["String axis_id"],@\\ +\mbox{}\verb@ ["Float"],],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_axis_rotation_axis":["""@\\ +\mbox{}\verb@ const char * get_axis_rotation_axis(const char *axis_id){@\\ +\mbox{}\verb@ const char* rot_axis;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_axis_rotation_axis(self,axis_id,@\\ +\mbox{}\verb@ &rot_axis));@\\ +\mbox{}\verb@ return rot_axis;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_axis_rotation_axis",["String axis_id"],["String"],],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_axis_type":["""@\\ +\mbox{}\verb@ const char * get_axis_type(const char *axis_id){@\\ +\mbox{}\verb@ cbf_axis_type axis_type;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_axis_type(self,axis_id,@\\ +\mbox{}\verb@ &axis_type));@\\ +\mbox{}\verb@ if (axis_type == CBF_TRANSLATION_AXIS) return "translation";@\\ +\mbox{}\verb@ if (axis_type == CBF_ROTATION_AXIS) return "rotation";@\\ +\mbox{}\verb@ return "general";@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_axis_type",["String axis_id"],["String"],],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_axis_vector":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *vector1, double *vector2, double vector3} get_axis_vector;@\\ +\mbox{}\verb@ void get_axis_vector(const char *axis_id,@\\ +\mbox{}\verb@ double *vector1, double *vector2, double *vector3){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_axis_vector(self,axis_id,@\\ +\mbox{}\verb@ vector1, vector2,vector3));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_axis_vector",["String axis_id"],@\\ +\mbox{}\verb@ ["Float vector1", "Float vector2", "Float vector3"],],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_axis_setting":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *start, double *increment} get_axis_setting;@\\ +\mbox{}\verb@ void get_axis_setting(const char *axis_id,@\\ +\mbox{}\verb@ double *start, double *increment){@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_axis_setting(self,reserved,axis_id,@\\ +\mbox{}\verb@ start,increment));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_axis_setting",["String axis_id"],["Float start", "Float increment"],],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_datestamp":["""@\\ +\mbox{}\verb@%apply int *OUTPUT {int *year, int *month, int *day, int *hour, @\\ +\mbox{}\verb@ int *minute, double *second, int *timezone} get_datestamp;@\\ +\mbox{}\verb@ void get_datestamp(int *year, int *month, int *day, int *hour, @\\ +\mbox{}\verb@ int *minute, double *second, int *timezone){@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_datestamp(self,reserved,@\\ +\mbox{}\verb@ year,month,day,hour,minute,second,timezone));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_datestamp",[],["int year", "int month", "int day", "int hour", @\\ +\mbox{}\verb@"int minute", "double second", "int timezone"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_datestamp":["""@\\ +\mbox{}\verb@ void set_datestamp(int year, int month, int day, int hour, @\\ +\mbox{}\verb@ int minute, double second, int timezone, @\\ +\mbox{}\verb@ double precision){@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ reserved = 0; @\\ +\mbox{}\verb@ cbf_failnez(cbf_set_datestamp(self,reserved, @\\ +\mbox{}\verb@ year,month,day,hour,minute,second,timezone,precision));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_datestamp",["int year", "int month", "int day", "int hour", @\\ +\mbox{}\verb@"int minute", "double second", "int timezone","Float precision"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_timestamp":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *time} get_timestamp;@\\ +\mbox{}\verb@%apply int *OUTPUT {int *timezone} get_timestamp;@\\ +\mbox{}\verb@ void get_timestamp(double *time, int *timezone){@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ reserved = 0; @\\ +\mbox{}\verb@ cbf_failnez(cbf_get_timestamp(self,reserved,time,timezone));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_timestamp",[],["Float time","Integer timezone"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_timestamp":["""@\\ +\mbox{}\verb@ void set_timestamp(double time, int timezone, double precision){@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ reserved = 0; @\\ +\mbox{}\verb@ cbf_failnez(cbf_set_timestamp(self,reserved,time,timezone,precision));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_timestamp",["Float time","Integer timezone","Float precision"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_current_timestamp":["""@\\ +\mbox{}\verb@ void set_current_timestamp(int timezone){@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ reserved = 0; @\\ +\mbox{}\verb@ cbf_failnez(cbf_set_current_timestamp(self,reserved,timezone));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_current_timestamp",["Integer timezone"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_overload":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *overload} get_overload;@\\ +\mbox{}\verb@ void get_overload(unsigned int element_number, double *overload){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_overload(self,element_number,overload));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_overload",["Integer element_number"],["Float overload"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_overload":["""@\\ +\mbox{}\verb@ void set_overload(unsigned int element_number, double overload){@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_overload(self,element_number,overload));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_overload",["Integer element_number","Float overload"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_integration_time":["""@\\ +\mbox{}\verb@ void set_integration_time(double time){@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_integration_time(self,reserved,time));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_integration_time",["Float time"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_integration_time":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *time} get_integration_time;@\\ +\mbox{}\verb@ void get_integration_time( double *time ){@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ double tim;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_integration_time(self,reserved,&tim));@\\ +\mbox{}\verb@ *time = tim;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_integration_time",[],["Float time"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_orientation_matrix":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *m0,double *m1,double *m2,@\\ +\mbox{}\verb@double *m3,double *m4, double *m5,double *m6,@\\ +\mbox{}\verb@double *m7,double *m8 } get_orientation_matrix;@\\ +\mbox{}\verb@ void get_orientation_matrix( double *m0,double *m1,@\\ +\mbox{}\verb@double *m2,double *m3,double *m4,double *m5,double *m6,@\\ +\mbox{}\verb@double *m7,double *m8){@\\ +\mbox{}\verb@ double m[9];@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_orientation_matrix(self,m));@\\ +\mbox{}\verb@ *m0 = m[0]; *m1=m[1] ; *m2=m[2] ;@\\ +\mbox{}\verb@ *m3 = m[3]; *m4=m[4] ; *m5=m[5] ;@\\ +\mbox{}\verb@ *m6 = m[6]; *m7=m[7] ; *m8=m[8] ;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_orientation_matrix",@\\ +\mbox{}\verb@ [],[ "Float matrix_%d"%(ind) for ind in range(9) ]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_unit_cell":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *a, double *b, double *c,@\\ +\mbox{}\verb@ double *alpha, double *beta, double *gamma} get_unit_cell;@\\ +\mbox{}\verb@ void get_unit_cell(double *a, double *b, double *c,@\\ +\mbox{}\verb@ double *alpha, double *beta, double *gamma) {@\\ +\mbox{}\verb@ double cell[6];@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_unit_cell(self,cell,NULL));@\\ +\mbox{}\verb@ *a = cell[0];@\\ +\mbox{}\verb@ *b = cell[1];@\\ +\mbox{}\verb@ *c = cell[2];@\\ +\mbox{}\verb@ *alpha = cell[3];@\\ +\mbox{}\verb@ *beta = cell[4];@\\ +\mbox{}\verb@ *gamma = cell[5];@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_unit_cell",@\\ +\mbox{}\verb@ [],["Float a", "Float b", "Float c", "Float alpha", "Float beta", "Float gamma" ] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_unit_cell_esd":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *a_esd, double *b_esd, double *c_esd,@\\ +\mbox{}\verb@ double *alpha_esd, double *beta_esd, double *gamma_esd} get_unit_cell_esd;@\\ +\mbox{}\verb@ void get_unit_cell_esd(double *a_esd, double *b_esd, double *c_esd,@\\ +\mbox{}\verb@ double *alpha_esd, double *beta_esd, double *gamma_esd) {@\\ +\mbox{}\verb@ double cell_esd[6];@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_unit_cell(self,NULL,cell_esd));@\\ +\mbox{}\verb@ *a_esd = cell_esd[0];@\\ +\mbox{}\verb@ *b_esd = cell_esd[1];@\\ +\mbox{}\verb@ *c_esd = cell_esd[2];@\\ +\mbox{}\verb@ *alpha_esd = cell_esd[3];@\\ +\mbox{}\verb@ *beta_esd = cell_esd[4];@\\ +\mbox{}\verb@ *gamma_esd = cell_esd[5];@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_unit_cell",@\\ +\mbox{}\verb@ [],["doubleArray cell"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_reciprocal_cell":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *astar, double *bstar, double *cstar,@\\ +\mbox{}\verb@ double *alphastar, double *betastar, double *gammastar} get_reciprocal_cell;@\\ +\mbox{}\verb@ void get_reciprocal_cell(double *astar, double *bstar, double *cstar,@\\ +\mbox{}\verb@ double *alphastar, double *betastar, double *gammastar) {@\\ +\mbox{}\verb@ double rcell[6];@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_reciprocal_cell(self,rcell,NULL));@\\ +\mbox{}\verb@ *astar = rcell[0];@\\ +\mbox{}\verb@ *bstar = rcell[1];@\\ +\mbox{}\verb@ *cstar = rcell[2];@\\ +\mbox{}\verb@ *alphastar = rcell[3];@\\ +\mbox{}\verb@ *betastar = rcell[4];@\\ +\mbox{}\verb@ *gammastar = rcell[5];@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_reciprocal_cell",@\\ +\mbox{}\verb@ [],["Float astar", "Float bstar", "Float cstar", "Float alphastar", "Float betastar", "Float gammastar"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_reciprocal_cell_esd":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *a_esd, double *b_esd, double *c_esd,@\\ +\mbox{}\verb@ double *alpha_esd, double *beta_esd, double *gamma_esd} get_reciprocal_cell_esd;@\\ +\mbox{}\verb@ void get_reciprocal_cell_esd(double *a_esd, double *b_esd, double *c_esd,@\\ +\mbox{}\verb@ double *alpha_esd, double *beta_esd, double *gamma_esd) {@\\ +\mbox{}\verb@ double cell_esd[6];@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_reciprocal_cell(self,NULL,cell_esd));@\\ +\mbox{}\verb@ *a_esd = cell_esd[0];@\\ +\mbox{}\verb@ *b_esd = cell_esd[1];@\\ +\mbox{}\verb@ *c_esd = cell_esd[2];@\\ +\mbox{}\verb@ *alpha_esd = cell_esd[3];@\\ +\mbox{}\verb@ *beta_esd = cell_esd[4];@\\ +\mbox{}\verb@ *gamma_esd = cell_esd[5];@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_reciprocal_cell",@\\ +\mbox{}\verb@ [],["doubleArray cell"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_unit_cell":["""@\\ +\mbox{}\verb@ void set_unit_cell(double cell[6]) {@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_unit_cell(self,cell,NULL));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_unit_cell",@\\ +\mbox{}\verb@ ["double cell[6]"],[] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_unit_cell_esd":["""@\\ +\mbox{}\verb@ void set_unit_cell_esd(double cell_esd[6]) {@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_unit_cell(self,NULL,cell_esd));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_unit_cell_esd",@\\ +\mbox{}\verb@ ["double cell_esd[6]"],[] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_reciprocal_cell":["""@\\ +\mbox{}\verb@ void set_reciprocal_cell(double cell[6]) {@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_reciprocal_cell(self,cell,NULL));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_reciprocal_cell",@\\ +\mbox{}\verb@ ["double cell[6]"],[] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_reciprocal_cell_esd":["""@\\ +\mbox{}\verb@ void set_reciprocal_cell_esd(double cell_esd[6]) {@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_reciprocal_cell(self,NULL,cell_esd));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_reciprocal_cell_esd",@\\ +\mbox{}\verb@ ["double cell_esd[6]"],[] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_tag_category":["""@\\ +\mbox{}\verb@ void set_tag_category(const char *tagname, const char* categoryname_in){@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_tag_category(self,tagname, categoryname_in));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_tag_category",["String tagname","String categoryname_in"],[] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_find_tag_category":["""@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ const char * find_tag_category(const char *tagname){@\\ +\mbox{}\verb@ const char * result;@\\ +\mbox{}\verb@ cbf_failnez(cbf_find_tag_category(self,tagname, &result));@\\ +\mbox{}\verb@ return result;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","find_tag_category",["String tagname"],["String categoryname"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_require_tag_root":["""@\\ +\mbox{}\verb@const char* require_tag_root(const char* tagname){@\\ +\mbox{}\verb@ const char* result;@\\ +\mbox{}\verb@ cbf_failnez(cbf_require_tag_root(self,tagname,&result));@\\ +\mbox{}\verb@ return result;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","require_tag_root",["String tagname"],["String tagroot"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_find_tag_root":["""@\\ +\mbox{}\verb@const char * find_tag_root(const char* tagname){@\\ +\mbox{}\verb@ const char* result;@\\ +\mbox{}\verb@ cbf_failnez(cbf_find_tag_root(self,tagname,&result));@\\ +\mbox{}\verb@ return result;@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@""","find_tag_root",["String tagname"],["String tagroot"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_tag_root":["""@\\ +\mbox{}\verb@void set_tag_root(const char* tagname, const char* tagroot_in){@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_tag_root(self,tagname,tagroot_in));@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@""","set_tag_root",["String tagname","String tagroot_in"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_category_root":["""@\\ +\mbox{}\verb@void set_category_root(const char* categoryname, const char* categoryroot){@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_category_root(self,categoryname,categoryroot));@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@""","set_category_root",["String categoryname","String categoryroot"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_find_category_root":["""@\\ +\mbox{}\verb@const char* find_category_root(const char* categoryname){@\\ +\mbox{}\verb@ const char * result;@\\ +\mbox{}\verb@ cbf_failnez(cbf_find_category_root(self,categoryname,&result));@\\ +\mbox{}\verb@ return result;@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@""","find_category_root",["String categoryname"],["String categoryroot"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_require_category_root":["""@\\ +\mbox{}\verb@const char* require_category_root (const char* categoryname){@\\ +\mbox{}\verb@ const char* result;@\\ +\mbox{}\verb@ cbf_failnez(cbf_require_category_root(self,categoryname, &result));@\\ +\mbox{}\verb@ return result;@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@""","cbf_require_category_root",["String Categoryname"],["String categoryroot"]],@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_orientation_matrix":["""@\\ +\mbox{}\verb@ void set_orientation_matrix( double m0,double m1,@\\ +\mbox{}\verb@double m2,double m3,double m4,double m5,double m6,@\\ +\mbox{}\verb@double m7,double m8){@\\ +\mbox{}\verb@ double m[9];@\\ +\mbox{}\verb@ m[0] = m0; m[1]=m1 ; m[2]=m2 ;@\\ +\mbox{}\verb@ m[3] = m3; m[4]=m4 ; m[5]=m5 ;@\\ +\mbox{}\verb@ m[6] = m6; m[7]=m7 ; m[8]=m8 ;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_orientation_matrix(self,m));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_orientation_matrix",@\\ +\mbox{}\verb@ [ "Float matrix_%d"%(ind) for ind in range(9) ] ,[]],@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@"cbf_set_bin_sizes":["""@\\ +\mbox{}\verb@ void set_bin_sizes( int element_number, double slowbinsize_in, double fastbinsize_in) {@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_bin_sizes(self,element_number,slowbinsize_in,fastbinsize_in));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_bin_sizes",["Integer element_number","Float slowbinsize_in","Float fastbinsize_in"],[] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_bin_sizes":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *slowbinsize,double *fastbinsize};@\\ +\mbox{}\verb@ void get_bin_sizes(int element_number, double *slowbinsize, double *fastbinsize) {@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_bin_sizes (self, (unsigned int)element_number, slowbinsize, fastbinsize));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_bin_sizes",["Integer element_number"],["Float slowbinsize","Float fastbinsize"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@# cbfhandle dict functions UNTESTED@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_require_dictionary":["""@\\ +\mbox{}\verb@cbf_handle require_dictionary(){@\\ +\mbox{}\verb@ cbf_handle temp;@\\ +\mbox{}\verb@ cbf_failnez(cbf_require_dictionary(self,&temp));@\\ +\mbox{}\verb@ return temp;@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@""","require_dictionary",[],["CBFHandle dictionary"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_dictionary":["""@\\ +\mbox{}\verb@cbf_handle get_dictionary(){@\\ +\mbox{}\verb@ cbf_handle temp;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_dictionary(self,&temp));@\\ +\mbox{}\verb@ return temp;@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@""","get_dictionary",[],["CBFHandle dictionary"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_dictionary":["""@\\ +\mbox{}\verb@void set_dictionary(cbf_handle other){@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_dictionary(self,other));@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@""","set_dictionary",["CBFHandle dictionary"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_convert_dictionary":["""@\\ +\mbox{}\verb@void convert_dictionary(cbf_handle other){@\\ +\mbox{}\verb@ cbf_failnez(cbf_convert_dictionary(self,other));@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@""","convert_dictionary",["CBFHandle dictionary"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_construct_detector":["""@\\ +\mbox{}\verb@ cbf_detector construct_detector(unsigned int element_number){@\\ +\mbox{}\verb@ cbf_detector detector;@\\ +\mbox{}\verb@ cbf_failnez(cbf_construct_detector(self,&detector,element_number));@\\ +\mbox{}\verb@ return detector;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","construct_detector",["Integer element_number"],["pycbf detector object"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_construct_reference_detector":["""@\\ +\mbox{}\verb@ cbf_detector construct_reference_detector(unsigned int element_number){@\\ +\mbox{}\verb@ cbf_detector detector;@\\ +\mbox{}\verb@ cbf_failnez(cbf_construct_reference_detector(self,&detector,element_number));@\\ +\mbox{}\verb@ return detector;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","construct_reference_detector",["Integer element_number"],["pycbf detector object"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_require_reference_detector":["""@\\ +\mbox{}\verb@ cbf_detector require_reference_detector(unsigned int element_number){@\\ +\mbox{}\verb@ cbf_detector detector;@\\ +\mbox{}\verb@ cbf_failnez(cbf_require_reference_detector(self,&detector,element_number));@\\ +\mbox{}\verb@ return detector;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","require_reference_detector",["Integer element_number"],["pycbf detector object"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_construct_goniometer":["""@\\ +\mbox{}\verb@ cbf_goniometer construct_goniometer(){@\\ +\mbox{}\verb@ cbf_goniometer goniometer;@\\ +\mbox{}\verb@ cbf_failnez(cbf_construct_goniometer(self,&goniometer));@\\ +\mbox{}\verb@ return goniometer;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","construct_goniometer",[],["pycbf goniometer object"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_construct_positioner":["""@\\ +\mbox{}\verb@ cbf_positioner construct_positioner(const char* axis_id){@\\ +\mbox{}\verb@ cbf_positioner positioner;@\\ +\mbox{}\verb@ cbf_failnez(cbf_construct_positioner(self,&positioner,axis_id));@\\ +\mbox{}\verb@ return positioner;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","construct_positioner",["String axis_id"],["pycbf positioner object"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_construct_reference_positioner":["""@\\ +\mbox{}\verb@ cbf_positioner construct_reference_positioner(const char* axis_id){@\\ +\mbox{}\verb@ cbf_positioner positioner;@\\ +\mbox{}\verb@ cbf_failnez(cbf_construct_reference_positioner(self,&positioner,axis_id));@\\ +\mbox{}\verb@ return positioner;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","construct_reference_positioner",["String axis_id"],["pycbf positioner object"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_axis_reference_poise":["""@\\ +\mbox{}\verb@ %apply double *OUTPUT {double *vector1, double *vector2, double *vector3, @\\ +\mbox{}\verb@ double *offset1, double *offset2, double *offset3};@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ void get_axis_reference_poise(double *vector1, double *vector2, double *vector3,@\\ +\mbox{}\verb@ double *offset1, double *offset2, double *offset3,@\\ +\mbox{}\verb@ const char *axis_id){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_axis_reference_poise(self,@\\ +\mbox{}\verb@ vector1, vector2, vector3,@\\ +\mbox{}\verb@ offset1, offset2, offset3,@\\ +\mbox{}\verb@ axis_id));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@""","get_axis_reference_poise",["String axis_id"],@\\ +\mbox{}\verb@ ["Float vector1","Float vector2","Float vector3",@\\ +\mbox{}\verb@ "Float offset1","Float offset2","Float offset3"]],@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@"cbf_get_axis_poise":["""@\\ +\mbox{}\verb@ %apply double *OUTPUT {double *vector1, double *vector2, double *vector3, @\\ +\mbox{}\verb@ double *offset1, double *offset2, double *offset3, double *angle};@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ void get_axis_poise(double ratio, @\\ +\mbox{}\verb@ double *vector1, double *vector2, double *vector3,@\\ +\mbox{}\verb@ double *offset1, double *offset2, double *offset3,@\\ +\mbox{}\verb@ double *angle,@\\ +\mbox{}\verb@ const char *axis_id, const char *frame_id){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_axis_poise(self, ratio,@\\ +\mbox{}\verb@ vector1, vector2, vector3,@\\ +\mbox{}\verb@ offset1, offset2, offset3, angle,@\\ +\mbox{}\verb@ axis_id, frame_id));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@""","get_axis_poise",@\\ +\mbox{}\verb@ ["Float ratio", "String axis_id", "String frame_id"],@\\ +\mbox{}\verb@ ["Float vector1","Float vector2","Float vector3",@\\ +\mbox{}\verb@ "Float offset1","Float offset2","Float offset3","Float angle"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@cbf_positioner_specials = {@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@# Prelude to the next section of the nuweb doc@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@class cbfhandlewrapper:@\\ +\mbox{}\verb@ def __init__(self):@\\ +\mbox{}\verb@ self.code = """@\\ +\mbox{}\verb@// Tell SWIG not to make constructor for these objects@\\ +\mbox{}\verb@%nodefault cbf_handle;@\\ +\mbox{}\verb@%nodefault cbf_handle_struct;@\\ +\mbox{}\verb@%nodefault cbf_node;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// A couple of blockitem functions return CBF_NODETYPE@\\ +\mbox{}\verb@typedef enum@\\ +\mbox{}\verb@{@\\ +\mbox{}\verb@ CBF_UNDEFNODE, /* Undefined */@\\ +\mbox{}\verb@ CBF_LINK, /* Link */@\\ +\mbox{}\verb@ CBF_ROOT, /* Root */@\\ +\mbox{}\verb@ CBF_DATABLOCK, /* Datablock */@\\ +\mbox{}\verb@ CBF_SAVEFRAME, /* Saveframe */@\\ +\mbox{}\verb@ CBF_CATEGORY, /* Category */@\\ +\mbox{}\verb@ CBF_COLUMN /* Column */@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@CBF_NODETYPE;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Tell SWIG what the object is, so we can build the class@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@typedef struct@\\ +\mbox{}\verb@{@\\ +\mbox{}\verb@ cbf_node *node;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ int row, search_row;@\\ +\mbox{}\verb@} cbf_handle_struct;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@typedef cbf_handle_struct *cbf_handle;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@typedef cbf_handle_struct handle;@\\ +\mbox{}\verb@%feature("autodoc","1");@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%extend cbf_handle_struct{ // Tell SWIG to attach functions to the structure@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ cbf_handle_struct(){ // Constructor@\\ +\mbox{}\verb@ cbf_handle handle;@\\ +\mbox{}\verb@ cbf_failnez(cbf_make_handle(&handle));@\\ +\mbox{}\verb@ return handle;@\\ +\mbox{}\verb@ } @\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ ~cbf_handle_struct(){ // Destructor@\\ +\mbox{}\verb@ cbf_failnez(cbf_free_handle(self));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@"""@\\ +\mbox{}\verb@ self.tail = """@\\ +\mbox{}\verb@}; // End of cbf_handle_struct@\\ +\mbox{}\verb@"""@\\ +\mbox{}\verb@ # End of init function@\\ +\mbox{}\verb@ def get_code(self):@\\ +\mbox{}\verb@ return self.code+self.tail@\\ +\mbox{}\verb@ def wrap(self,cfunc,prototype,args,docstring):@\\ +\mbox{}\verb@ # print "cfunc: ", cfunc@\\ +\mbox{}\verb@ pyfunc = cfunc.replace("cbf_","")@\\ +\mbox{}\verb@ # Insert a comment for debugging this script@\\ +\mbox{}\verb@ code = "\n/* cfunc %s pyfunc %s \n"%(cfunc,pyfunc)@\\ +\mbox{}\verb@ for a in args:@\\ +\mbox{}\verb@ code += " arg %s "%(a)@\\ +\mbox{}\verb@ code += "*/\n\n"@\\ +\mbox{}\verb@ # Make and free handle are done in the header so skip@\\ +\mbox{}\verb@ if cfunc.find("cbf_make_handle")>-1 or cfunc.find("cbf_free_handle")>-1:@\\ +\mbox{}\verb@ # Constructor and destructor done in headers@\\ +\mbox{}\verb@ return@\\ +\mbox{}\verb@ if args[0] != "cbf_handle handle": # Must be for cbfhandle@\\ +\mbox{}\verb@ print "problem",cfunc,pyfunc,args@\\ +\mbox{}\verb@ return@\\ +\mbox{}\verb@ if len(args)==1: # Only takes CBFhandle arg@\\ +\mbox{}\verb@ code+= docstringwrite(pyfunc,[],[],prototype,docstring)@\\ +\mbox{}\verb@ code+= " void %s(void){\n"%(pyfunc)@\\ +\mbox{}\verb@ code+= " cbf_failnez(%s(self));}\n"%(cfunc) @\\ +\mbox{}\verb@ self.code=self.code+code@\\ +\mbox{}\verb@ return@\\ +\mbox{}\verb@ # Now case by case rather than writing a proper parser@\\ +\mbox{}\verb@ # Special cases ...@\\ +\mbox{}\verb@ not_found=0@\\ +\mbox{}\verb@ try:@\\ +\mbox{}\verb@ code, pyname, input, output = cbfhandle_specials[cfunc]@\\ +\mbox{}\verb@ self.code += docstringwrite(pyname,input,output,@\\ +\mbox{}\verb@ prototype,docstring)+ code@\\ +\mbox{}\verb@ return@\\ +\mbox{}\verb@ except KeyError:@\\ +\mbox{}\verb@ not_found = 1@\\ +\mbox{}\verb@ # print "KeyError"@\\ +\mbox{}\verb@ except ValueError:@\\ +\mbox{}\verb@ print "problem in",cfunc@\\ +\mbox{}\verb@ for item in cbfhandle_specials[cfunc]:@\\ +\mbox{}\verb@ print "***",item@\\ +\mbox{}\verb@ raise@\\ +\mbox{}\verb@ if len(args)==2:@\\ +\mbox{}\verb@ if args[1].find("const char")>-1 and \@\\ +\mbox{}\verb@ args[1].find("*")>-1 and \@\\ +\mbox{}\verb@ args[1].find("**")==-1 :@\\ +\mbox{}\verb@ # 1 input string@\\ +\mbox{}\verb@ code += docstringwrite(pyfunc,[],["string"],prototype,docstring)@\\ +\mbox{}\verb@ code += " void %s(const char* arg){\n"%(pyfunc)@\\ +\mbox{}\verb@ code +=" cbf_failnez(%s(self,arg));}\n"%(cfunc)@\\ +\mbox{}\verb@ self.code=self.code+code@\\ +\mbox{}\verb@ return@\\ +\mbox{}\verb@ if args[1].find("const char")>-1 and \@\\ +\mbox{}\verb@ args[1].find("**")>-1 :# return string@\\ +\mbox{}\verb@ code += docstringwrite(pyfunc,["string"],[],prototype,docstring)@\\ +\mbox{}\verb@ code += " const char* %s(void){\n"%(pyfunc)@\\ +\mbox{}\verb@ code += " const char* result;\n"@\\ +\mbox{}\verb@ code += " cbf_failnez(%s(self, &result));\n"%(cfunc)@\\ +\mbox{}\verb@ code += " return result;}\n"@\\ +\mbox{}\verb@ self.code=self.code+code@\\ +\mbox{}\verb@ return@\\ +\mbox{}\verb@ if args[1].find("unsigned int")>-1 and args[1].find("*")==-1:@\\ +\mbox{}\verb@ # set uint@\\ +\mbox{}\verb@ if args[1].find("reserved")>-1:@\\ +\mbox{}\verb@ raise Exception("Setting reserved??? %s %s %s"%(pyfunc,@\\ +\mbox{}\verb@ cfunc,str(args)))@\\ +\mbox{}\verb@ code += docstringwrite(pyfunc,["Integer"],[],prototype,docstring)@\\ +\mbox{}\verb@ code +=" void %s(unsigned int arg){\n"%(pyfunc)@\\ +\mbox{}\verb@ code +=" cbf_failnez(%s(self,arg));}\n"%(cfunc)@\\ +\mbox{}\verb@ self.code=self.code+code@\\ +\mbox{}\verb@ return@\\ +\mbox{}\verb@ if args[1].find("unsigned int *")>-1 and args[1].find("**")==-1:@\\ +\mbox{}\verb@ # output uint@\\ +\mbox{}\verb@ if args[1].find("reserved")>-1:@\\ +\mbox{}\verb@ raise Exception("Setting reserved??? %s %s %s"%(pyfunc,@\\ +\mbox{}\verb@ cfunc,str(args)))@\\ +\mbox{}\verb@ code += docstringwrite(pyfunc,[],["Integer"],prototype,docstring)@\\ +\mbox{}\verb@ code +=" unsigned int %s(void){\n"%(pyfunc)@\\ +\mbox{}\verb@ code +=" unsigned int result;\n"@\\ +\mbox{}\verb@ code +=" cbf_failnez(%s(self,&result));\n"%(cfunc)@\\ +\mbox{}\verb@ code +=" return result;}\n"@\\ +\mbox{}\verb@ self.code=self.code+code@\\ +\mbox{}\verb@ return@\\ +\mbox{}\verb@ # For the rest attempt to guess@\\ +\mbox{}\verb@ if args[1].find("cbf")==-1: # but do not try the goniometer constructor@\\ +\mbox{}\verb@ if args[1].find("*")>-1 and args[1].find("cbf")==-1:@\\ +\mbox{}\verb@ # pointer used for returning something@\\ +\mbox{}\verb@ type = args[1].split(" ")[0]@\\ +\mbox{}\verb@ code += docstringwrite(pyfunc,[],[type.replace("*","")],@\\ +\mbox{}\verb@ prototype,docstring)@\\ +\mbox{}\verb@ code+= " "+type+" "+pyfunc+"(void){\n"@\\ +\mbox{}\verb@ code+= " "+type+" result;\n"@\\ +\mbox{}\verb@ code+= " cbf_failnez(%s(self,&result));\n"%(cfunc)@\\ +\mbox{}\verb@ code+= " return result;}\n"@\\ +\mbox{}\verb@ self.code=self.code+code@\\ +\mbox{}\verb@ return@\\ +\mbox{}\verb@ else:@\\ +\mbox{}\verb@ var = args[1].split(" ")[-1]@\\ +\mbox{}\verb@ code += docstringwrite(pyfunc,[],[args[1]],prototype,docstring)@\\ +\mbox{}\verb@ code+= " void %s(%s){\n"%(pyfunc,args[1])@\\ +\mbox{}\verb@ code +=" cbf_failnez(%s(self,%s));}\n"%(cfunc,var)@\\ +\mbox{}\verb@ self.code=self.code+code@\\ +\mbox{}\verb@ return@\\ +\mbox{}\verb@ if not_found:@\\ +\mbox{}\verb@ code+= " void %s(void){\n"%(pyfunc)@\\ +\mbox{}\verb@ code +=" cbf_failnez(CBF_NOTIMPLEMENTED);}\n"@\\ +\mbox{}\verb@ self.code=self.code+code@\\ +\mbox{}\verb@ print "Have not implemented: cbfhandle.%s"%(pyfunc)@\\ +\mbox{}\verb@ print " ",cfunc@\\ +\mbox{}\verb@ print " args:"@\\ +\mbox{}\verb@ for a in args:@\\ +\mbox{}\verb@ print " ",a @\\ +\mbox{}\verb@ print@\\ +\mbox{}\verb@ return@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@cbf_handle_wrapper = cbfhandlewrapper()@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@cbf_goniometer_specials = {@\\ +\mbox{}\verb@"cbf_get_rotation_range":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *start,double *increment};@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void get_rotation_range(double *start,double *increment){@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_rotation_range (self,reserved, start,increment));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_rotation_range",[],["Float start","Float increment"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_rotate_vector":["""@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%apply double *OUTPUT {double *final1, double *final2, double *final3};@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void rotate_vector (double ratio, double initial1, double initial2, @\\ +\mbox{}\verb@ double initial3, double *final1, double *final2, double *final3){@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_rotate_vector (self, reserved, ratio, initial1,@\\ +\mbox{}\verb@ initial2, initial3, final1, final2, final3));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""", "rotate_vector",@\\ +\mbox{}\verb@ [ "double ratio", "double initial1","double initial2", "double initial3" ] , @\\ +\mbox{}\verb@ [ "double final1" ,"double final2" , "double final3" ] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_reciprocal":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *reciprocal1, double *reciprocal2, @\\ +\mbox{}\verb@ double *reciprocal3};@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ void get_reciprocal (double ratio,double wavelength, @\\ +\mbox{}\verb@ double real1, double real2, double real3, @\\ +\mbox{}\verb@ double *reciprocal1, double *reciprocal2, @\\ +\mbox{}\verb@ double *reciprocal3){@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_reciprocal(self,reserved, ratio, wavelength, @\\ +\mbox{}\verb@ real1, real2, real3,reciprocal1,@\\ +\mbox{}\verb@ reciprocal2,reciprocal3));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""", "get_reciprocal",@\\ +\mbox{}\verb@ ["double ratio","double wavelength",@\\ +\mbox{}\verb@ "double real1","double real2","double real3"],@\\ +\mbox{}\verb@ ["double reciprocal1","double reciprocal2", "double reciprocal3" ]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_rotation_axis":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *vector1, double *vector2, double *vector3};@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@void get_rotation_axis (double *vector1, double *vector2, double *vector3){@\\ +\mbox{}\verb@ unsigned int reserved;@\\ +\mbox{}\verb@ reserved = 0;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_rotation_axis (self, reserved, @\\ +\mbox{}\verb@ vector1, vector2, vector3));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_rotation_axis", [] , @\\ +\mbox{}\verb@ ["double vector1", "double vector2", "double vector3"] ],@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ "cbf_get_goniometer_poise":["""@\\ +\mbox{}\verb@ %apply double *OUTPUT {double * vector1, double * vector2, double * vector3, double * offset1, double * offset2, double * offset3, @\\ +\mbox{}\verb@ double * angle};@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ void get_goniometer_poise(double ratio, @\\ +\mbox{}\verb@ double * vector1, double * vector2, double * vector3, @\\ +\mbox{}\verb@ double * offset1, double * offset2, double * offset3, @\\ +\mbox{}\verb@ double * angle){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_goniometer_poise(self, ratio,@\\ +\mbox{}\verb@ vector1, vector2, vector3, @\\ +\mbox{}\verb@ offset1, offset2, offset3,angle));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@""","get_goniometer_poise",["Float ratio"],@\\ +\mbox{}\verb@ ["Float vector1","Float vector2","Float vector3",@\\ +\mbox{}\verb@ "Float offset1","Float offset2","Float offset3",@\\ +\mbox{}\verb@ "Float angle"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@class cbfgoniometerwrapper:@\\ +\mbox{}\verb@ def __init__(self):@\\ +\mbox{}\verb@ self.code = """@\\ +\mbox{}\verb@// Tell SWIG not to make constructor for these objects@\\ +\mbox{}\verb@%nodefault cbf_positioner_struct;@\\ +\mbox{}\verb@%nodefault cbf_goniometer;@\\ +\mbox{}\verb@%nodefault cbf_axis_struct;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Tell SWIG what the object is, so we can build the class@\\ +\mbox{}\verb@typedef struct@\\ +\mbox{}\verb@{@\\ +\mbox{}\verb@ double matrix [3][4];@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ cbf_axis_struct *axis;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ size_t axes;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ int matrix_is_valid;@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ double matrix_ratio_used;@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ size_t axis_index_limit;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@cbf_positioner_struct;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@typedef cbf_positioner_struct *cbf_positioner;@\\ +\mbox{}\verb@typedef cbf_positioner_struct *cbf_goniometer;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%feature("autodoc","1");@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%extend cbf_positioner_struct{// Tell SWIG to attach functions to the structure@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ cbf_positioner_struct(){ // Constructor@\\ +\mbox{}\verb@ // DO NOT CONSTRUCT WITHOUT A CBFHANDLE@\\ +\mbox{}\verb@ cbf_failnez(CBF_ARGUMENT);@\\ +\mbox{}\verb@ return NULL; /* Should never be executed */@\\ +\mbox{}\verb@ } @\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ ~cbf_positioner_struct(){ // Destructor@\\ +\mbox{}\verb@ cbf_failnez(cbf_free_positioner(self));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@"""@\\ +\mbox{}\verb@ self.tail = """@\\ +\mbox{}\verb@}; // End of cbf_positioner@\\ +\mbox{}\verb@"""@\\ +\mbox{}\verb@ def wrap(self,cfunc,prototype,args,docstring):@\\ +\mbox{}\verb@ if cfunc.find("cbf_free_goniometer")>-1:@\\ +\mbox{}\verb@ return @\\ +\mbox{}\verb@ try:@\\ +\mbox{}\verb@ code, pyname, input, output = cbf_goniometer_specials[cfunc]@\\ +\mbox{}\verb@ self.code += docstringwrite(pyname,input,output,@\\ +\mbox{}\verb@ prototype,docstring)+ code@\\ +\mbox{}\verb@ except KeyError:@\\ +\mbox{}\verb@ print "TODO: Goniometer:",prototype@\\ +\mbox{}\verb@ def get_code(self):@\\ +\mbox{}\verb@ return self.code+self.tail@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@cbf_goniometer_wrapper = cbfgoniometerwrapper()@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@cbf_detector_specials = {@\\ +\mbox{}\verb@"cbf_get_pixel_normal":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *normal1, double *normal2, double *normal3};@\\ +\mbox{}\verb@ void get_pixel_normal ( double index1, double index2, @\\ +\mbox{}\verb@ double *normal1, double *normal2, double *normal3){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_pixel_normal(self,@\\ +\mbox{}\verb@ index1,index2,normal1,normal2,normal3));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@""","get_pixel_normal",["double index1","double index2"] ,@\\ +\mbox{}\verb@ ["double normal1","double normal2", "double normal3" ] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_pixel_normal_fs":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *normal1, double *normal2, double *normal3};@\\ +\mbox{}\verb@ void get_pixel_normal_fs ( double indexfast, double indexslow, @\\ +\mbox{}\verb@ double *normal1, double *normal2, double *normal3){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_pixel_normal_fs(self,@\\ +\mbox{}\verb@ indexfast,indexslow,normal1,normal2,normal3));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@""","get_pixel_normal_fs",["double indexfast","double indexslow"] ,@\\ +\mbox{}\verb@ ["double normal1","double normal2", "double normal3" ] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_pixel_normal_sf":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *normal1, double *normal2, double *normal3};@\\ +\mbox{}\verb@ void get_pixel_normal_sf ( double indexslow, double indexfast, @\\ +\mbox{}\verb@ double *normal1, double *normal2, double *normal3){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_pixel_normal_sf(self,@\\ +\mbox{}\verb@ indexslow,indexfast,normal1,normal2,normal3));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@""","get_pixel_normal_sf",["double indexslow","double indexfast"] ,@\\ +\mbox{}\verb@ ["double normal1","double normal2", "double normal3" ] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_detector_axis_slow":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *slowaxis1, double *slowaxis2, double *slowaxis3};@\\ +\mbox{}\verb@ void get_detector_axis_slow ( double *slowaxis1, double *slowaxis2, double *slowaxis3){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_detector_axis_slow(self,@\\ +\mbox{}\verb@ slowaxis1,slowaxis2,slowaxis3));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@""","get_detector_axis_slow", [ ],@\\ +\mbox{}\verb@ ["double slowaxis1","double slowaxis2", "double slowaxis3" ] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_detector_axis_fast":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *fastaxis1, double *fastaxis2, double *fastaxis3};@\\ +\mbox{}\verb@ void get_detector_axis_fast ( double *fastaxis1, double *fastaxis2, double *fastaxis3){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_detector_axis_fast(self,@\\ +\mbox{}\verb@ fastaxis1,fastaxis2,fastaxis3));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@""","get_detector_axis_fast", [ ],@\\ +\mbox{}\verb@ ["double fastaxis1","double fastaxis2", "double fastaxis3" ] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_detector_axes":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *slowaxis1, double *slowaxis2, double *slowaxis3,@\\ +\mbox{}\verb@ double *fastaxis1, double *fastaxis2, double *fastaxis3};@\\ +\mbox{}\verb@ void get_detector_axes ( double *slowaxis1, double *slowaxis2, double *slowaxis3,@\\ +\mbox{}\verb@ double *fastaxis1, double *fastaxis2, double *fastaxis3){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_detector_axes(self,@\\ +\mbox{}\verb@ slowaxis1,slowaxis2,slowaxis3,@\\ +\mbox{}\verb@ fastaxis1,fastaxis2,fastaxis3));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@""","get_detector_axes", [ ],@\\ +\mbox{}\verb@ ["double slowaxis1","double slowaxis2", "double slowaxis3",@\\ +\mbox{}\verb@ "double fastaxis1","double fastaxis2", "double fastaxis3" ] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_detector_axes_fs":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *slowaxis1, double *slowaxis2, double *slowaxis3,@\\ +\mbox{}\verb@ double *fastaxis1, double *fastaxis2, double *fastaxis3};@\\ +\mbox{}\verb@ void get_detector_axes_fs ( double *fastaxis1, double *fastaxis2, double *fastaxis3,@\\ +\mbox{}\verb@ double *slowaxis1, double *slowaxis2, double *slowaxis3){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_detector_axes(self,@\\ +\mbox{}\verb@ slowaxis1,slowaxis2,slowaxis3,@\\ +\mbox{}\verb@ fastaxis1,fastaxis2,fastaxis3));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@""","get_detector_axes", [ ],@\\ +\mbox{}\verb@ ["double fastaxis1","double fastaxis2", "double fastaxis3",@\\ +\mbox{}\verb@ "double slowaxis1","double slowaxis2", "double slowaxis3"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_detector_axes_sf":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *slowaxis1, double *slowaxis2, double *slowaxis3,@\\ +\mbox{}\verb@ double *fastaxis1, double *fastaxis2, double *fastaxis3};@\\ +\mbox{}\verb@ void get_detector_axes_sf ( double *slowaxis1, double *slowaxis2, double *slowaxis3,@\\ +\mbox{}\verb@ double *fastaxis1, double *fastaxis2, double *fastaxis3){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_detector_axes(self,@\\ +\mbox{}\verb@ slowaxis1,slowaxis2,slowaxis3,@\\ +\mbox{}\verb@ fastaxis1,fastaxis2,fastaxis3));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@""","get_detector_axes_sf", [ ],@\\ +\mbox{}\verb@ ["double slowaxis1","double slowaxis2", "double slowaxis3",@\\ +\mbox{}\verb@ "double fastaxis1","double fastaxis2", "double fastaxis3" ] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_detector_surface_axes":["""@\\ +\mbox{}\verb@ const char * get_detector_surface_axes (int index ){@\\ +\mbox{}\verb@ const char * axis_id1;@\\ +\mbox{}\verb@ const char * axis_id2;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_detector_surface_axes(self,@\\ +\mbox{}\verb@ &axis_id1, &axis_id2));@\\ +\mbox{}\verb@ if (index == 0) return axis_id1;@\\ +\mbox{}\verb@ if (index == 1) return axis_id2;@\\ +\mbox{}\verb@ return ".";@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@""","cbf_get_detector_surface_axes", ["Integer index" ],@\\ +\mbox{}\verb@ ["String" ] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_pixel_area":["""@\\ +\mbox{}\verb@%apply double *OUTPUT{double *area,double *projected_area};@\\ +\mbox{}\verb@ void get_pixel_area(double index1, double index2,@\\ +\mbox{}\verb@ double *area,double *projected_area){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_pixel_area (self,@\\ +\mbox{}\verb@ index1, index2, area,projected_area));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_pixel_area",["double index1", "double index2"],@\\ +\mbox{}\verb@ ["double area","double projected_area"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_pixel_area_fs":["""@\\ +\mbox{}\verb@%apply double *OUTPUT{double *area,double *projected_area};@\\ +\mbox{}\verb@ void get_pixel_area_fs(double indexfast, double indexslow,@\\ +\mbox{}\verb@ double *area,double *projected_area){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_pixel_area_fs (self,@\\ +\mbox{}\verb@ indexfast, indexslow, area,projected_area));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_pixel_area_fs",["double indexfast", "double indexslow"],@\\ +\mbox{}\verb@ ["double area","double projected_area"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_pixel_area_sf":["""@\\ +\mbox{}\verb@%apply double *OUTPUT{double *area,double *projected_area};@\\ +\mbox{}\verb@ void get_pixel_area_sf(double indexslow, double indexfast,@\\ +\mbox{}\verb@ double *area,double *projected_area){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_pixel_area_sf (self,@\\ +\mbox{}\verb@ indexslow, indexfast, area,projected_area));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_pixel_area_sf",["double indexslow", "double indexfast"],@\\ +\mbox{}\verb@ ["double area","double projected_area"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_detector_distance":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *distance};@\\ +\mbox{}\verb@ void get_detector_distance (double *distance){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_detector_distance(self,distance));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_detector_distance",[],["double distance"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_detector_normal":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *normal1, double *normal2, double *normal3};@\\ +\mbox{}\verb@ void get_detector_normal(double *normal1, @\\ +\mbox{}\verb@ double *normal2,@\\ +\mbox{}\verb@ double *normal3){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_detector_normal(self,@\\ +\mbox{}\verb@ normal1, normal2, normal3));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_detector_normal",[],@\\ +\mbox{}\verb@["double normal1", "double normal2", "double normal3"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_pixel_coordinates":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *coordinate1, @\\ +\mbox{}\verb@ double *coordinate2, double *coordinate3};@\\ +\mbox{}\verb@ void get_pixel_coordinates(double index1, double index2, @\\ +\mbox{}\verb@ double *coordinate1, @\\ +\mbox{}\verb@ double *coordinate2, @\\ +\mbox{}\verb@ double *coordinate3){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_pixel_coordinates(self, index1, index2,@\\ +\mbox{}\verb@ coordinate1, coordinate2, coordinate3));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_pixel_coordinates",["double index1","double index2"],@\\ +\mbox{}\verb@["double coordinate1", "double coordinate2", "double coordinate3"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_pixel_coordinates_fs":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *coordinate1, @\\ +\mbox{}\verb@ double *coordinate2, double *coordinate3};@\\ +\mbox{}\verb@ void get_pixel_coordinates_fs(double indexfast, double indexslow, @\\ +\mbox{}\verb@ double *coordinate1, @\\ +\mbox{}\verb@ double *coordinate2, @\\ +\mbox{}\verb@ double *coordinate3){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_pixel_coordinates_fs(self, indexfast, indexslow, coordinate1, coordinate2, coordinate3));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_pixel_coordinates_fs",["double indexfast","double indexslow"],@\\ +\mbox{}\verb@["double coordinate1", "double coordinate2", "double coordinate3"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_pixel_coordinates_sf":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *coordinate1, @\\ +\mbox{}\verb@ double *coordinate2, double *coordinate3};@\\ +\mbox{}\verb@ void get_pixel_coordinates_sf(double indexslow, double indexfast, @\\ +\mbox{}\verb@ double *coordinate1, @\\ +\mbox{}\verb@ double *coordinate2, @\\ +\mbox{}\verb@ double *coordinate3){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_pixel_coordinates_sf(self, indexslow, indexfast, coordinate1, coordinate2, coordinate3));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_pixel_coordinates_sf",["double indexslow","double indexfast"],@\\ +\mbox{}\verb@["double coordinate1", "double coordinate2", "double coordinate3"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_beam_center":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *index1, double *index2, @\\ +\mbox{}\verb@ double *center1,double *center2};@\\ +\mbox{}\verb@ void get_beam_center(double *index1, double *index2, @\\ +\mbox{}\verb@ double *center1,double *center2){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_beam_center(self, index1, index2, @\\ +\mbox{}\verb@ center1, center2));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_beam_center",[],@\\ +\mbox{}\verb@["double index1", "double index2", "double center1","double center2"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_beam_center_fs":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *indexfast, double *indexslow, @\\ +\mbox{}\verb@ double *centerfast,double *centerslow};@\\ +\mbox{}\verb@ void get_beam_center_fs(double *indexfast, double *indexslow, @\\ +\mbox{}\verb@ double *centerfast,double *centerslow){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_beam_center_fs(self, indexfast, indexslow, @\\ +\mbox{}\verb@ centerfast, centerslow));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_beam_center_fs",[],@\\ +\mbox{}\verb@["double indexfast", "double indexslow", "double centerfast","double centerslow"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_beam_center_sf":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *indexslow, double *indexfast, @\\ +\mbox{}\verb@ double *centerslow,double *centerfast};@\\ +\mbox{}\verb@ void get_beam_center_sf(double *indexslow, double *indexfast, @\\ +\mbox{}\verb@ double *centerslow,double *centerfast){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_beam_center_sf(self, indexslow, indexfast, @\\ +\mbox{}\verb@ centerslow, centerfast));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_beam_center_sf",[],@\\ +\mbox{}\verb@["double indexslow", "double indexfast", "double centerslow","double centerfast"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_beam_center":["""@\\ +\mbox{}\verb@ void set_beam_center(double *indexslow, double *indexfast, @\\ +\mbox{}\verb@ double *centerslow,double *centerfast){@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_beam_center(self, indexslow, indexfast, @\\ +\mbox{}\verb@ centerslow, centerfast));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_beam_center",@\\ +\mbox{}\verb@["double indexslow", "double indexfast", "double centerslow","double centerfast"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_beam_center_fs":["""@\\ +\mbox{}\verb@ void set_beam_center_fs(double *indexfast, double *indexslow, @\\ +\mbox{}\verb@ double *centerfast,double *centerslow){@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_beam_center_fs(self, indexfast, indexslow, @\\ +\mbox{}\verb@ centerfast, centerslow));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_beam_center_fs",@\\ +\mbox{}\verb@["double indexfast", "double indexslow", "double centerfast","double centerslow"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_beam_center_sf":["""@\\ +\mbox{}\verb@ void set_beam_center_sf(double *indexslow, double *indexfast, @\\ +\mbox{}\verb@ double *centerslow,double *centerfast){@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_beam_center_sf(self, indexslow, indexfast, @\\ +\mbox{}\verb@ centerslow, centerfast));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_beam_center_sf",@\\ +\mbox{}\verb@["double indexslow", "double indexfast", "double centerslow","double centerfast"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_reference_beam_center":["""@\\ +\mbox{}\verb@ void set_reference_beam_center(double *indexslow, double *indexfast, @\\ +\mbox{}\verb@ double *centerslow,double *centerfast){@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_reference_beam_center(self, indexslow, indexfast, @\\ +\mbox{}\verb@ centerslow, centerfast));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_reference_beam_center",@\\ +\mbox{}\verb@["double indexslow", "double indexfast", "double centerslow","double centerfast"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_reference_beam_center_fs":["""@\\ +\mbox{}\verb@ void set_reference_beam_center_fs(double *indexfast, double *indexslow, @\\ +\mbox{}\verb@ double *centerfast,double *centerslow){@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_reference_beam_center_fs(self, indexfast, indexslow, @\\ +\mbox{}\verb@ centerfast, centerslow));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_reference_beam_center_fs",@\\ +\mbox{}\verb@["double indexfast", "double indexslow", "double centerfast","double centerslow"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_set_reference_beam_center_sf":["""@\\ +\mbox{}\verb@ void set_reference_beam_center_sf(double *indexslow, double *indexfast, @\\ +\mbox{}\verb@ double *centerslow,double *centerfast){@\\ +\mbox{}\verb@ cbf_failnez(cbf_set_reference_beam_center_sf(self, indexslow, indexfast, @\\ +\mbox{}\verb@ centerslow, centerfast));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","set_reference_beam_center_sf",@\\ +\mbox{}\verb@["double indexslow", "double indexfast", "double centerslow","double centerfast"],[]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_inferred_pixel_size" : ["""@\\ +\mbox{}\verb@%apply double *OUTPUT { double *psize } get_inferred_pixel_size;@\\ +\mbox{}\verb@void get_inferred_pixel_size(unsigned int axis_number, double* psize){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_inferred_pixel_size(self, axis_number, psize));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_inferred_pixel_size",["Int axis_number"],["Float pixel size"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_inferred_pixel_size_fs" : ["""@\\ +\mbox{}\verb@%apply double *OUTPUT { double *psize } get_inferred_pixel_size;@\\ +\mbox{}\verb@void get_inferred_pixel_size_fs(unsigned int axis_number, double* psize){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_inferred_pixel_size_fs(self, axis_number, psize));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_inferred_pixel_size_fs",["Int axis_number"],["Float pixel size"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_inferred_pixel_size_sf" : ["""@\\ +\mbox{}\verb@%apply double *OUTPUT { double *psize } get_inferred_pixel_size;@\\ +\mbox{}\verb@void get_inferred_pixel_size_sf(unsigned int axis_number, double* psize){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_inferred_pixel_size_sf(self, axis_number, psize));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_inferred_pixel_size_sf",["Int axis_number"],["Float pixel size"] ]@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@class cbfdetectorwrapper:@\\ +\mbox{}\verb@ def __init__(self):@\\ +\mbox{}\verb@ self.code = """@\\ +\mbox{}\verb@// Tell SWIG not to make constructor for these objects@\\ +\mbox{}\verb@%nodefault cbf_detector_struct;@\\ +\mbox{}\verb@%nodefault cbf_detector;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Tell SWIG what the object is, so we can build the class@\\ +\mbox{}\verb@typedef struct@\\ +\mbox{}\verb@{@\\ +\mbox{}\verb@ cbf_positioner positioner;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ double displacement [2], increment [2];@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ size_t axes, index [2];@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@cbf_detector_struct;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@typedef cbf_detector_struct *cbf_detector;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%feature("autodoc","1");@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%extend cbf_detector_struct{// Tell SWIG to attach functions to the structure@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ cbf_detector_struct(){ // Constructor@\\ +\mbox{}\verb@ // DO NOT CONSTRUCT WITHOUT A CBFHANDLE@\\ +\mbox{}\verb@ cbf_failnez(CBF_ARGUMENT);@\\ +\mbox{}\verb@ return NULL; /* Should never be executed */@\\ +\mbox{}\verb@ } @\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ ~cbf_detector_struct(){ // Destructor@\\ +\mbox{}\verb@ cbf_failnez(cbf_free_detector(self));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@"""@\\ +\mbox{}\verb@ self.tail = """@\\ +\mbox{}\verb@}; // End of cbf_detector@\\ +\mbox{}\verb@"""@\\ +\mbox{}\verb@ def wrap(self,cfunc,prototype,args,docstring):@\\ +\mbox{}\verb@ if cfunc.find("cbf_free_detector")>-1:@\\ +\mbox{}\verb@ return @\\ +\mbox{}\verb@ try:@\\ +\mbox{}\verb@ code, pyname, input, output = cbf_detector_specials[cfunc]@\\ +\mbox{}\verb@ self.code += docstringwrite(pyname,input,output,@\\ +\mbox{}\verb@ prototype,docstring)+ code@\\ +\mbox{}\verb@ except KeyError:@\\ +\mbox{}\verb@ print "TODO: Detector:",prototype@\\ +\mbox{}\verb@ def get_code(self):@\\ +\mbox{}\verb@ return self.code+self.tail@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@cbf_detector_wrapper = cbfdetectorwrapper()@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@class cbfpositionerwrapper:@\\ +\mbox{}\verb@ def __init__(self):@\\ +\mbox{}\verb@ self.code = """@\\ +\mbox{}\verb@// Tell SWIG not to make constructor for these objects@\\ +\mbox{}\verb@%nodefault cbf_positioner_struct;@\\ +\mbox{}\verb@%nodefault cbf_positioner;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@// Tell SWIG what the object is, so we can build the class@\\ +\mbox{}\verb@typedef struct@\\ +\mbox{}\verb@{@\\ +\mbox{}\verb@ double matrix [3][4];@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ cbf_axis_struct *axis;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ size_t axes;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ int matrix_is_valid, axes_are_connected;@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@cbf_positioner_struct;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@typedef cbf_positioner_struct *cbf_positioner;@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%feature("autodoc","1");@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%extend cbf_positioner_struct{// Tell SWIG to attach functions to the structure@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ cbf_positioner_struct(){ // Constructor@\\ +\mbox{}\verb@ // DO NOT CONSTRUCT WITHOUT A CBFHANDLE@\\ +\mbox{}\verb@ cbf_failnez(CBF_ARGUMENT);@\\ +\mbox{}\verb@ return NULL; /* Should never be executed */@\\ +\mbox{}\verb@ } @\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ ~cbf_positioner_struct(){ // Destructor@\\ +\mbox{}\verb@ cbf_failnez(cbf_free_positioner(self));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@"""@\\ +\mbox{}\verb@ self.tail = """@\\ +\mbox{}\verb@}; // End of cbf_positioner@\\ +\mbox{}\verb@"""@\\ +\mbox{}\verb@ def wrap(self,cfunc,prototype,args,docstring):@\\ +\mbox{}\verb@ if cfunc.find("cbf_free_positioner")>-1:@\\ +\mbox{}\verb@ return @\\ +\mbox{}\verb@ try:@\\ +\mbox{}\verb@ code, pyname, input, output = cbf_positioner_specials[cfunc]@\\ +\mbox{}\verb@ self.code += docstringwrite(pyname,input,output,@\\ +\mbox{}\verb@ prototype,docstring)+ code@\\ +\mbox{}\verb@ except KeyError:@\\ +\mbox{}\verb@ print "TODO: Positioner:",prototype@\\ +\mbox{}\verb@ def get_code(self):@\\ +\mbox{}\verb@ return self.code+self.tail@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@cbf_positioner_wrapper = cbfpositionerwrapper()@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@cbfgeneric_specials = {@\\ +\mbox{}\verb@"cbf_get_local_integer_byte_order":["""@\\ +\mbox{}\verb@%cstring_output_allocate_size(char **bo, int *bolen, free(*$1));@\\ +\mbox{}\verb@ %inline {@\\ +\mbox{}\verb@ void get_local_integer_byte_order(char **bo, int *bolen) {@\\ +\mbox{}\verb@ char * byteorder;@\\ +\mbox{}\verb@ char * bot;@\\ +\mbox{}\verb@ error_status = cbf_get_local_integer_byte_order(&byteorder);@\\ +\mbox{}\verb@ *bolen = strlen(byteorder);@\\ +\mbox{}\verb@ if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)}@\\ +\mbox{}\verb@ strncpy(bot,byteorder,*bolen);@\\ +\mbox{}\verb@ *bo = bot;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_local_integer_byte_order",[],["char **bo", "int *bolen"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_local_real_format":["""@\\ +\mbox{}\verb@%cstring_output_allocate_size(char **rf, int *rflen, free(*$1));@\\ +\mbox{}\verb@ %inline {@\\ +\mbox{}\verb@ void get_local_real_format(char **rf, int *rflen) {@\\ +\mbox{}\verb@ char * real_format;@\\ +\mbox{}\verb@ char * rft;@\\ +\mbox{}\verb@ error_status = cbf_get_local_real_format(&real_format);@\\ +\mbox{}\verb@ *rflen = strlen(real_format);@\\ +\mbox{}\verb@ if (!(rft = (char *)malloc(*rflen))) {cbf_failnez(CBF_ALLOC)}@\\ +\mbox{}\verb@ strncpy(rft,real_format,*rflen);@\\ +\mbox{}\verb@ *rf = rft;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_local_real_format",[],["char **rf", "int *rflen"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_local_real_byte_order":["""@\\ +\mbox{}\verb@%cstring_output_allocate_size(char **bo, int *bolen, free(*$1));@\\ +\mbox{}\verb@ %inline {@\\ +\mbox{}\verb@ void get_local_real_byte_order(char **bo, int *bolen) {@\\ +\mbox{}\verb@ char * byteorder;@\\ +\mbox{}\verb@ char * bot;@\\ +\mbox{}\verb@ error_status = cbf_get_local_real_byte_order(&byteorder);@\\ +\mbox{}\verb@ *bolen = strlen(byteorder);@\\ +\mbox{}\verb@ if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)}@\\ +\mbox{}\verb@ strncpy(bot,byteorder,*bolen);@\\ +\mbox{}\verb@ *bo = bot;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_local_real_byte_order",[],["char **bo", "int *bolen"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_compute_cell_volume":["""@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@%apply double *OUTPUT {double *volume};@\\ +\mbox{}\verb@ %inline {@\\ +\mbox{}\verb@ void compute_cell_volume(double cell[6], double *volume) {@\\ +\mbox{}\verb@ cbf_failnez(cbf_compute_cell_volume(cell,volume));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","compute_cell_volume",["double cell[6]"],["Float volume"]],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_compute_reciprocal_cell":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *astar, double *bstar, double *cstar,@\\ +\mbox{}\verb@ double *alphastar, double *betastar, double *gammastar};@\\ +\mbox{}\verb@ %inline {@\\ +\mbox{}\verb@ void compute_reciprocal_cell(double cell[6], double *astar, double *bstar, double *cstar,@\\ +\mbox{}\verb@ double *alphastar, double *betastar, double *gammastar) {@\\ +\mbox{}\verb@ double rcell[6];@\\ +\mbox{}\verb@ cbf_failnez(cbf_compute_reciprocal_cell(cell,rcell));@\\ +\mbox{}\verb@ *astar = rcell[0];@\\ +\mbox{}\verb@ *bstar = rcell[1];@\\ +\mbox{}\verb@ *cstar = rcell[2];@\\ +\mbox{}\verb@ *alphastar = rcell[3];@\\ +\mbox{}\verb@ *betastar = rcell[4];@\\ +\mbox{}\verb@ *gammastar = rcell[5];@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@""","compute_reciprocal_cell",["double cell[6]"],@\\ +\mbox{}\verb@["Float astar", "Float bstar", "Float cstar", "Float alphastar", "Float betastar", "Float gammastar"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_airy_disk":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *value};@\\ +\mbox{}\verb@%inline {@\\ +\mbox{}\verb@void airy_disk(double x, double y, double cenx, double ceny,@\\ +\mbox{}\verb@double volume, double fwhm, double *value) {@\\ +\mbox{}\verb@cbf_failnez(cbf_airy_disk(x,y,cenx,ceny,volume,fwhm,value));@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@""","airy_disk",["double x", "double y", "double cenx", "double ceny", "double volume", "double fwhm"],@\\ +\mbox{}\verb@["Float value"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_airy_disk_volume":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *volumeout};@\\ +\mbox{}\verb@%inline {@\\ +\mbox{}\verb@void airy_disk_volume(double xlo, double ylo, double xhi, double yhi,@\\ +\mbox{}\verb@double cenx, double ceny, double volumein, double fwhm, double * volumeout) {@\\ +\mbox{}\verb@cbf_failnez(cbf_airy_disk_volume(xlo,ylo,xhi,yhi,cenx,ceny,volumein,fwhm,volumeout));@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@""","airy_disk_volume",["double xlo", "double ylo", "double xhi", "double yhi", "double cenx", "double ceny", "double volumein", "double fwhm"],@\\ +\mbox{}\verb@["Float volumeout"] ]@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@class genericwrapper:@\\ +\mbox{}\verb@ def __init__(self):@\\ +\mbox{}\verb@ self.code = """@\\ +\mbox{}\verb@// Start of generic functions@\\ +\mbox{}\verb@%feature("autodoc","1");@\\ +\mbox{}\verb@"""@\\ +\mbox{}\verb@ self.tail = "// End of generic functions\n"@\\ +\mbox{}\verb@ def get_code(self):@\\ +\mbox{}\verb@ return self.code + self.tail@\\ +\mbox{}\verb@ def wrap(self,cfunc,prototype,args,docstring):@\\ +\mbox{}\verb@ pyfunc = cfunc.replace("cbf_","")@\\ +\mbox{}\verb@ # Insert a comment for debugging this script@\\ +\mbox{}\verb@ code = "\n/* cfunc %s pyfunc %s \n"%(cfunc,pyfunc)@\\ +\mbox{}\verb@ for a in args:@\\ +\mbox{}\verb@ code += " arg %s "%(a)@\\ +\mbox{}\verb@ code += "*/\n\n"@\\ +\mbox{}\verb@ self.code+=code@\\ +\mbox{}\verb@ code = ""@\\ +\mbox{}\verb@ not_found = 0@\\ +\mbox{}\verb@ try:@\\ +\mbox{}\verb@ code, pyname, input, output = cbfgeneric_specials[cfunc]@\\ +\mbox{}\verb@ self.code += docstringwrite(pyname,input,output,@\\ +\mbox{}\verb@ prototype,docstring)+ code@\\ +\mbox{}\verb@ return@\\ +\mbox{}\verb@ except KeyError:@\\ +\mbox{}\verb@ not_found = 1@\\ +\mbox{}\verb@ # print "KeyError"@\\ +\mbox{}\verb@ except ValueError:@\\ +\mbox{}\verb@ print "problem in generic",cfunc@\\ +\mbox{}\verb@ for item in cbfgeneric_specials[cfunc]:@\\ +\mbox{}\verb@ print "***",item@\\ +\mbox{}\verb@ raise@\\ +\mbox{}\verb@ if len(args)==1 and args[0].find("char")>-1 and \@\\ +\mbox{}\verb@ args[0].find("**")>-1 :# return string@\\ +\mbox{}\verb@ # first write the c code and inline it@\\ +\mbox{}\verb@ code += docstringwrite(pyfunc,[],["string"],prototype,docstring)@\\ +\mbox{}\verb@ code += "%%inline %%{\n char* %s(void);\n"%(pyfunc)@\\ +\mbox{}\verb@ code += " char* %s(void){\n"%(pyfunc)@\\ +\mbox{}\verb@ code += " char *r;\n"@\\ +\mbox{}\verb@ code += " error_status = %s(&r);\n"%(cfunc)@\\ +\mbox{}\verb@ code += " return r; }\n%}\n"@\\ +\mbox{}\verb@ # now the thing to wrap is:@\\ +\mbox{}\verb@ code += "char* %s(void);"%(pyfunc)@\\ +\mbox{}\verb@ self.code=self.code+code@\\ +\mbox{}\verb@ return@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@# code+= " void %s(void){\n"%(pyfunc)@\\ +\mbox{}\verb@# code +=" cbf_failnez(CBF_NOTIMPLEMENTED);}\n"@\\ +\mbox{}\verb@# self.code=self.code+code@\\ +\mbox{}\verb@ print "Have not implemented:"@\\ +\mbox{}\verb@ for s in [cfunc, pyfunc] + args:@\\ +\mbox{}\verb@ print "\t",s @\\ +\mbox{}\verb@ print@\\ +\mbox{}\verb@ return@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@generic_wrapper = genericwrapper()@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@def generate_wrappers(name_dict):@\\ +\mbox{}\verb@ names = name_dict.keys()@\\ +\mbox{}\verb@ for cname in names:@\\ +\mbox{}\verb@ prototype = name_dict[cname][0]@\\ +\mbox{}\verb@ docstring = name_dict[cname][1]@\\ +\mbox{}\verb@ # print "Generate wrappers: ", "::",cname,"::", prototype,"::", docstring@\\ +\mbox{}\verb@ # Check prototype begins with "int cbf_"@\\ +\mbox{}\verb@ if prototype.find("int cbf_")!=0:@\\ +\mbox{}\verb@ print "problem with:",prototype@\\ +\mbox{}\verb@ # Get arguments from prototypes@\\ +\mbox{}\verb@ try:@\\ +\mbox{}\verb@ args = prototype.split("(")[1].split(")")[0].split(",")@\\ +\mbox{}\verb@ args = [ s.lstrip().rstrip() for s in args ] # strip spaces off ends@\\ +\mbox{}\verb@ # print "Args: ", args@\\ +\mbox{}\verb@ except:@\\ +\mbox{}\verb@ # print cname@\\ +\mbox{}\verb@ # print prototype@\\ +\mbox{}\verb@ raise@\\ +\mbox{}\verb@ if args[0].find("cbf_handle")>=0: # This is for the cbfhandle object@\\ +\mbox{}\verb@ cbf_handle_wrapper.wrap(cname,prototype,args,docstring)@\\ +\mbox{}\verb@ if (cname=="cbf_get_unit_cell"):@\\ +\mbox{}\verb@ cbf_handle_wrapper.wrap("cbf_get_unit_cell_esd",prototype,args,docstring)@\\ +\mbox{}\verb@ if (cname=="cbf_get_reciprocal_cell"):@\\ +\mbox{}\verb@ cbf_handle_wrapper.wrap("cbf_get_reciprocal_cell_esd",prototype,args,docstring)@\\ +\mbox{}\verb@ if (cname=="cbf_set_unit_cell"):@\\ +\mbox{}\verb@ cbf_handle_wrapper.wrap("cbf_set_unit_cell_esd",prototype,args,docstring)@\\ +\mbox{}\verb@ if (cname=="cbf_set_reciprocal_cell"):@\\ +\mbox{}\verb@ cbf_handle_wrapper.wrap("cbf_set_reciprocal_cell_esd",prototype,args,docstring)@\\ +\mbox{}\verb@ continue@\\ +\mbox{}\verb@ if args[0].find("cbf_goniometer")>=0: # This is for the cbfgoniometer@\\ +\mbox{}\verb@ cbf_goniometer_wrapper.wrap(cname,prototype,args,docstring)@\\ +\mbox{}\verb@ continue@\\ +\mbox{}\verb@ if args[0].find("cbf_detector")>=0: # This is for the cbfdetector@\\ +\mbox{}\verb@ cbf_detector_wrapper.wrap(cname,prototype,args,docstring)@\\ +\mbox{}\verb@ continue@\\ +\mbox{}\verb@ if args[0].find("cbf_positioner")>=0: # This is for the cbfpositioner@\\ +\mbox{}\verb@ cbf_positioner_wrapper.wrap(cname,prototype,args,docstring)@\\ +\mbox{}\verb@ continue@\\ +\mbox{}\verb@ generic_wrapper.wrap(cname,prototype,args,docstring)@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@generate_wrappers(name_dict)@\\ +\mbox{}\verb@open("cbfgoniometerwrappers.i","w").write(cbf_goniometer_wrapper.get_code())@\\ +\mbox{}\verb@open("cbfdetectorwrappers.i","w").write(cbf_detector_wrapper.get_code())@\\ +\mbox{}\verb@open("cbfpositionerwrappers.i","w").write(cbf_positioner_wrapper.get_code())@\\ +\mbox{}\verb@open("cbfhandlewrappers.i","w").write(cbf_handle_wrapper.get_code())@\\ +\mbox{}\verb@open("cbfgenericwrappers.i","w").write(generic_wrapper.get_code())@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@print "End of output from make_pycbf.py"@\\ +\mbox{}\verb@print "\\end{verbatim}"@\\ +\mbox{}\verb@@{\NWsep} +\end{list} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} +\end{flushleft} +\section{Building python extensions - the setup file} + + +Based on the contents of the makefile for CBFlib we will just +pull in all of the library for now. We use the distutils approach. + + + +\begin{flushleft} \small +\begin{minipage}{\linewidth}\label{scrap9}\raggedright\small +\NWtarget{nuweb11a}{} \verb@"py2setup_py.m4"@\nobreak\ {\footnotesize {11a}}$\equiv$ +\vspace{-1ex} +\begin{list}{}{} \item +\mbox{}\verb@@\\ +\mbox{}\verb@#@\\ +\mbox{}\verb@# py2setup_py.m4@\\ +\mbox{}\verb@#@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@`# Import the things to build python binary extensions@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@from distutils.core import setup, Extension@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@# Make our extension module@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@e = Extension(''`_py2cbf''`,@\\ +\mbox{}\verb@ sources = ["pycbf_wrap.c","../src/cbf_simple.c"],@\\ +\mbox{}\verb@ extra_compile_args=["-g"],@\\ +\mbox{}\verb@ 'm4_ifelse(regexlibdir,`NOREGEXLIBDIR',`library_dirs=["../solib/","../lib/"],',`library_dirs=["../solib/","../lib/","'regexlibdir`"],')`@\\ +\mbox{}\verb@ 'm4_ifelse(regexlib,`',`libraries=["cbf"],', `m4_ifelse(regexlib2,`',`libraries=["cbf","'regexlib`"],',`libraries=["cbf","'regexlib`","'regexlib2`"],')' )`@\\ +\mbox{}\verb@ include_dirs = ["../include","'hdf5_prefix`/include"] )@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@# Build it@\\ +\mbox{}\verb@setup(name="_py2cbf",ext_modules=[e],)'@\\ +\mbox{}\verb@@{\NWsep} +\end{list} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} +\end{flushleft} +\section{Building and testing the resulting package} + +Aim to build and test in one go (so that the source and the binary match!!) + +\begin{flushleft} \small +\begin{minipage}{\linewidth}\label{scrap10}\raggedright\small +\NWtarget{nuweb11b}{} \verb@"win32.bat"@\nobreak\ {\footnotesize {11b}}$\equiv$ +\vspace{-1ex} +\begin{list}{}{} \item +\mbox{}\verb@@\\ +\mbox{}\verb@nuweb pycbf@\\ +\mbox{}\verb@latex pycbf@\\ +\mbox{}\verb@nuweb pycbf@\\ +\mbox{}\verb@latex pycbf@\\ +\mbox{}\verb@dvipdfm pycbf@\\ +\mbox{}\verb@nuweb pycbf@\\ +\mbox{}\verb@C:\python24\python make_pycbf.py > TODO.txt@\\ +\mbox{}\verb@"C:\program files\swigwin-1.3.31\swig.exe" -python pycbf.i@\\ +\mbox{}\verb@C:\python24\python setup.py build --compiler=mingw32@\\ +\mbox{}\verb@copy build\lib.win32-2.4\_py2cbf.pyd .@\\ +\mbox{}\verb@REM C:\python24\python pycbf_test1.py@\\ +\mbox{}\verb@C:\python24\python pycbf_test2.py@\\ +\mbox{}\verb@C:\python24\python pycbf_test3.py@\\ +\mbox{}\verb@C:\python24\lib\pydoc.py -w pycbf@\\ +\mbox{}\verb@C:\python24\python makeflatascii.py pycbf_ascii_help.txt@\\ +\mbox{}\verb@@{\NWsep} +\end{list} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} +\end{flushleft} +\begin{flushleft} \small +\begin{minipage}{\linewidth}\label{scrap11}\raggedright\small +\NWtarget{nuweb12a}{} \verb@"linux.sh"@\nobreak\ {\footnotesize {12a}}$\equiv$ +\vspace{-1ex} +\begin{list}{}{} \item +\mbox{}\verb@@\\ +\mbox{}\verb@nuweb pycbf@\\ +\mbox{}\verb@latex pycbf@\\ +\mbox{}\verb@nuweb pycbf@\\ +\mbox{}\verb@latex pycbf@\\ +\mbox{}\verb@dvipdfm pycbf@\\ +\mbox{}\verb@nuweb pycbf@\\ +\mbox{}\verb@lynx -dump CBFlib.html > CBFlib.txt@\\ +\mbox{}\verb@python make_pycbf.py @\\ +\mbox{}\verb@swig -python pycbf.i@\\ +\mbox{}\verb@python setup.py build @\\ +\mbox{}\verb@rm _py2cbf.so@\\ +\mbox{}\verb@cp build/lib.linux-i686-2.4/_py2cbf.so .@\\ +\mbox{}\verb@python pycbf_test1.py@\\ +\mbox{}\verb@python pycbf_test2.py@\\ +\mbox{}\verb@pydoc -w pycbf@\\ +\mbox{}\verb@python makeflatascii.py pycbf_ascii_help.txt@\\ +\mbox{}\verb@@{\NWsep} +\end{list} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} +\end{flushleft} +This still gives bold in the ascii (=sucks) + +\begin{flushleft} \small +\begin{minipage}{\linewidth}\label{scrap12}\raggedright\small +\NWtarget{nuweb12b}{} \verb@"makeflatascii.py"@\nobreak\ {\footnotesize {12b}}$\equiv$ +\vspace{-1ex} +\begin{list}{}{} \item +\mbox{}\verb@@\\ +\mbox{}\verb@import pydoc, pycbf, sys@\\ +\mbox{}\verb@f = open(sys.argv[1],"w")@\\ +\mbox{}\verb@pydoc.pager=lambda text: f.write(text)@\\ +\mbox{}\verb@pydoc.TextDoc.bold = lambda self,text : text@\\ +\mbox{}\verb@pydoc.help(pycbf)@\\ +\mbox{}\verb@@{\NWsep} +\end{list} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} +\end{flushleft} +\section{Debugging compiled extensions} + +Since it can be a bit of a pain to see where things go wrong here is a +quick recipe for poking around with a debugger: + +\begin{verbatim} +amber $> gdb /bliss/users//blissadm/python/bliss_python/suse82/bin/python +GNU gdb 5.3 +Copyright 2002 Free Software Foundation, Inc. +GDB is free software, covered by the GNU General Public License, and you are +welcome to change it and/or distribute copies of it under certain conditions. +Type "show copying" to see the conditions. +There is absolutely no warranty for GDB. Type "show warranty" for details. +This GDB was configured as "i586-suse-linux"... +(gdb) br _PyImport_LoadDynamicModule +Breakpoint 1 at 0x80e4199: file Python/importdl.c, line 28. +\end{verbatim} + +This is how to get a breakpoint when loading the module +\begin{verbatim} +(gdb) run +Starting program: /mntdirect/_bliss/users/blissadm/python/bliss_python/suse82/bin/python +[New Thread 16384 (LWP 18191)] +Python 2.4.2 (#3, Feb 17 2006, 09:12:13) +[GCC 3.3 20030226 (prerelease) (SuSE Linux)] on linux2 +Type "help", "copyright", "credits" or "license" for more information. +>>> import pycbf +[Switching to Thread 16384 (LWP 18191)] + +Breakpoint 1, _PyImport_LoadDynamicModule (name=0xbfffd280 "_py2cbf.so", + pathname=0xbfffd280 "_py2cbf.so", fp=0x819e208) at Python/importdl.c:28 +28 if ((m = _PyImport_FindExtension(name, pathname)) != NULL) { +(gdb) finish +Run till exit from #0 _PyImport_LoadDynamicModule ( + name=0xbfffd280 "_py2cbf.so", pathname=0xbfffd280 "_py2cbf.so", fp=0x819e208) + at Python/importdl.c:28 +load_module (name=0xbfffd710 "_py2cbf", fp=0x819e208, + buf=0xbfffd280 "_py2cbf.so", type=3, loader=0x405b44f4) + at Python/import.c:1678 +1678 break; +Value returned is $1 = (PyObject *) 0x405662fc +(gdb) break cbf_read_file +Breakpoint 2 at 0x407f0508: file ../src/cbf.c, line 221. +(gdb) cont +Continuing. +\end{verbatim} + +We now have a breakpoint where we wanted inside the dynamically loaded file. +\begin{verbatim} +>>> o=pycbf.cbf_handle_struct() +>>> o.read_file("../img2cif_packed.cif",pycbf.MSG_DIGEST) + +Breakpoint 2, cbf_read_file (handle=0x81f7c08, stream=0x8174f58, + headers=136281096) at ../src/cbf.c:221 +221 if (!handle) +(gdb) +\end{verbatim} + +Now you can step through the c... + +\section{Things which are currently missing} + +This is the to do list. Obviously we could benefit a lot from more +extensive testing and checking of the docstrings etc. + +\input "TODO.txt" + +\section{Testing} + +Some test programs to see if anything appears to work. Eventually +it would be good to write a proper unit test suite. + +\subsection{Read a file based on cif2cbf.c} + +This is a pretty ugly translation of the program cif2cbf.c skipping +all of the writing parts. +It appeared to work with the file img2cif\_packed.cif which is built +when you build CBFlib, hence that file is hardwired in. + +\begin{flushleft} \small +\begin{minipage}{\linewidth}\label{scrap13}\raggedright\small +\NWtarget{nuweb14}{} \verb@"pycbf_test1.py"@\nobreak\ {\footnotesize {14}}$\equiv$ +\vspace{-1ex} +\begin{list}{}{} \item +\mbox{}\verb@@\\ +\mbox{}\verb@import pycbf@\\ +\mbox{}\verb@object = pycbf.cbf_handle_struct() # FIXME@\\ +\mbox{}\verb@object.read_file("../img2cif_packed.cif",pycbf.MSG_DIGEST)@\\ +\mbox{}\verb@object.rewind_datablock()@\\ +\mbox{}\verb@print "Found",object.count_datablocks(),"blocks"@\\ +\mbox{}\verb@object.select_datablock(0)@\\ +\mbox{}\verb@print "Zeroth is named",object.datablock_name()@\\ +\mbox{}\verb@object.rewind_category()@\\ +\mbox{}\verb@categories = object.count_categories()@\\ +\mbox{}\verb@for i in range(categories):@\\ +\mbox{}\verb@ print "Category:",i,@\\ +\mbox{}\verb@ object.select_category(i)@\\ +\mbox{}\verb@ category_name = object.category_name()@\\ +\mbox{}\verb@ print "Name:",category_name,@\\ +\mbox{}\verb@ rows=object.count_rows()@\\ +\mbox{}\verb@ print "Rows:",rows,@\\ +\mbox{}\verb@ cols = object.count_columns()@\\ +\mbox{}\verb@ print "Cols:",cols@\\ +\mbox{}\verb@ loop=1@\\ +\mbox{}\verb@ object.rewind_column()@\\ +\mbox{}\verb@ while loop is not 0:@\\ +\mbox{}\verb@ column_name = object.column_name()@\\ +\mbox{}\verb@ print "column name \"",column_name,"\"",@\\ +\mbox{}\verb@ try:@\\ +\mbox{}\verb@ object.next_column()@\\ +\mbox{}\verb@ except:@\\ +\mbox{}\verb@ break@\\ +\mbox{}\verb@ print@\\ +\mbox{}\verb@ for j in range(rows):@\\ +\mbox{}\verb@ object.select_row(j)@\\ +\mbox{}\verb@ object.rewind_column()@\\ +\mbox{}\verb@ print "row:",j@\\ +\mbox{}\verb@ for k in range(cols):@\\ +\mbox{}\verb@ name=object.column_name()@\\ +\mbox{}\verb@ print "col:",name,@\\ +\mbox{}\verb@ object.select_column(k)@\\ +\mbox{}\verb@ typeofvalue=object.get_typeofvalue()@\\ +\mbox{}\verb@ print "type:",typeofvalue@\\ +\mbox{}\verb@ if typeofvalue.find("bnry") > -1:@\\ +\mbox{}\verb@ print "Found the binary!!",@\\ +\mbox{}\verb@ s=object.get_integerarray_as_string()@\\ +\mbox{}\verb@ print type(s)@\\ +\mbox{}\verb@ print dir(s)@\\ +\mbox{}\verb@ print len(s)@\\ +\mbox{}\verb@ try:@\\ +\mbox{}\verb@ import numpy @\\ +\mbox{}\verb@ d = numpy.frombuffer(s,numpy.uint32)@\\ +\mbox{}\verb@ # Hard wired Unsigned Int32@\\ +\mbox{}\verb@ print d.shape@\\ +\mbox{}\verb@ print d[0:10],d[d.shape[0]/2],d[-1]@\\ +\mbox{}\verb@ print d[d.shape[0]/3:d.shape[0]/3+20]@\\ +\mbox{}\verb@ d=numpy.reshape(d,(2300,2300))@\\ +\mbox{}\verb@# from matplotlib import pylab@\\ +\mbox{}\verb@# pylab.imshow(d,vmin=0,vmax=1000)@\\ +\mbox{}\verb@# pylab.show()@\\ +\mbox{}\verb@ except ImportError:@\\ +\mbox{}\verb@ print "You need to get numpy and matplotlib to see the data"@\\ +\mbox{}\verb@ else:@\\ +\mbox{}\verb@ value=object.get_value()@\\ +\mbox{}\verb@ print "Val:",value,i@\\ +\mbox{}\verb@ print@\\ +\mbox{}\verb@del(object)@\\ +\mbox{}\verb@#@\\ +\mbox{}\verb@print dir()@\\ +\mbox{}\verb@#object.free_handle(handle)@\\ +\mbox{}\verb@@{\NWsep} +\end{list} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} +\end{flushleft} +\subsection{Try to test the goniometer and detector} + +Had some initial difficulties but then downloaded an input cbf file which defines +a goniometer and detector. +The file was found in the example data which comes with CBFlib. + +This test is clearly minimalistic for now - it only checks the objects +for apparent existence of +a single member function. + +\begin{flushleft} \small +\begin{minipage}{\linewidth}\label{scrap14}\raggedright\small +\NWtarget{nuweb15a}{} \verb@"pycbf_test2.py"@\nobreak\ {\footnotesize {15a}}$\equiv$ +\vspace{-1ex} +\begin{list}{}{} \item +\mbox{}\verb@@\\ +\mbox{}\verb@import pycbf@\\ +\mbox{}\verb@obj = pycbf.cbf_handle_struct()@\\ +\mbox{}\verb@obj.read_file("../adscconverted.cbf",0)@\\ +\mbox{}\verb@obj.select_datablock(0)@\\ +\mbox{}\verb@g = obj.construct_goniometer()@\\ +\mbox{}\verb@print "Rotation axis is",g.get_rotation_axis()@\\ +\mbox{}\verb@d = obj.construct_detector(0)@\\ +\mbox{}\verb@print "Beam center is",d.get_beam_center()@\\ +\mbox{}\verb@print "Detector slow axis is", d.get_detector_axis_slow()@\\ +\mbox{}\verb@print "Detector fast axis is", d.get_detector_axis_fast()@\\ +\mbox{}\verb@print "Detector axes (fast, slow) are", d.get_detector_axes_fs()@\\ +\mbox{}\verb@@{\NWsep} +\end{list} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} +\end{flushleft} +It appears to work - eventually. Surprising + +\subsection{Test cases for the generics} + +\begin{flushleft} \small +\begin{minipage}{\linewidth}\label{scrap15}\raggedright\small +\NWtarget{nuweb15b}{} \verb@"pycbf_test3.py"@\nobreak\ {\footnotesize {15b}}$\equiv$ +\vspace{-1ex} +\begin{list}{}{} \item +\mbox{}\verb@@\\ +\mbox{}\verb@import pycbf, unittest@\\ +\mbox{}\verb@class GenericTests(unittest.TestCase):@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ def test_get_local_integer_byte_order(self):@\\ +\mbox{}\verb@ self.assertEqual( pycbf.get_local_integer_byte_order(),@\\ +\mbox{}\verb@ 'little_endian')@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ def test_get_local_real_byte_order(self):@\\ +\mbox{}\verb@ self.assertEqual( pycbf.get_local_real_byte_order() ,@\\ +\mbox{}\verb@ 'little_endian')@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ def test_get_local_real_format(self):@\\ +\mbox{}\verb@ self.assertEqual( pycbf.get_local_real_format(), @\\ +\mbox{}\verb@ 'ieee 754-1985')@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ def test_compute_cell_volume(self):@\\ +\mbox{}\verb@ self.assertEqual( pycbf.compute_cell_volume((2.,3.,4.,90.,90.,90.)),@\\ +\mbox{}\verb@ 24.0)@\\ +\mbox{}\verb@if __name__=="__main__":@\\ +\mbox{}\verb@ unittest.main()@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@{\NWsep} +\end{list} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} +\end{flushleft} +\subsection{Version of pycbf_test1 with write logic added} + +\begin{flushleft} \small +\begin{minipage}{\linewidth}\label{scrap16}\raggedright\small +\NWtarget{nuweb17}{} \verb@"pycbf_test4.py"@\nobreak\ {\footnotesize {17}}$\equiv$ +\vspace{-1ex} +\begin{list}{}{} \item +\mbox{}\verb@@\\ +\mbox{}\verb@# version of pycbf_test1 with write logic added@\\ +\mbox{}\verb@import pycbf@\\ +\mbox{}\verb@object = pycbf.cbf_handle_struct()@\\ +\mbox{}\verb@newobject = pycbf.cbf_handle_struct()@\\ +\mbox{}\verb@object.read_file("../img2cif_packed.cif",pycbf.MSG_DIGEST)@\\ +\mbox{}\verb@object.rewind_datablock()@\\ +\mbox{}\verb@print "Found",object.count_datablocks(),"blocks"@\\ +\mbox{}\verb@object.select_datablock(0)@\\ +\mbox{}\verb@print "Zeroth is named",object.datablock_name()@\\ +\mbox{}\verb@newobject.force_new_datablock(object.datablock_name());@\\ +\mbox{}\verb@object.rewind_category()@\\ +\mbox{}\verb@categories = object.count_categories()@\\ +\mbox{}\verb@for i in range(categories):@\\ +\mbox{}\verb@ print "Category:",i,@\\ +\mbox{}\verb@ object.select_category(i)@\\ +\mbox{}\verb@ category_name = object.category_name()@\\ +\mbox{}\verb@ print "Name:",category_name,@\\ +\mbox{}\verb@ newobject.new_category(category_name)@\\ +\mbox{}\verb@ rows=object.count_rows()@\\ +\mbox{}\verb@ print "Rows:",rows,@\\ +\mbox{}\verb@ cols = object.count_columns()@\\ +\mbox{}\verb@ print "Cols:",cols@\\ +\mbox{}\verb@ loop=1@\\ +\mbox{}\verb@ object.rewind_column()@\\ +\mbox{}\verb@ while loop is not 0:@\\ +\mbox{}\verb@ column_name = object.column_name()@\\ +\mbox{}\verb@ print "column name \"",column_name,"\"",@\\ +\mbox{}\verb@ newobject.new_column(column_name)@\\ +\mbox{}\verb@ try:@\\ +\mbox{}\verb@ object.next_column()@\\ +\mbox{}\verb@ except:@\\ +\mbox{}\verb@ break@\\ +\mbox{}\verb@ print@\\ +\mbox{}\verb@ for j in range(rows):@\\ +\mbox{}\verb@ object.select_row(j)@\\ +\mbox{}\verb@ newobject.new_row()@\\ +\mbox{}\verb@ object.rewind_column()@\\ +\mbox{}\verb@ print "row:",j@\\ +\mbox{}\verb@ for k in range(cols):@\\ +\mbox{}\verb@ name=object.column_name()@\\ +\mbox{}\verb@ print "col:",name,@\\ +\mbox{}\verb@ object.select_column(k)@\\ +\mbox{}\verb@ newobject.select_column(k)@\\ +\mbox{}\verb@ typeofvalue=object.get_typeofvalue()@\\ +\mbox{}\verb@ print "type:",typeofvalue@\\ +\mbox{}\verb@ if typeofvalue.find("bnry") > -1:@\\ +\mbox{}\verb@ print "Found the binary!!",@\\ +\mbox{}\verb@ s=object.get_integerarray_as_string()@\\ +\mbox{}\verb@ print type(s)@\\ +\mbox{}\verb@ print dir(s)@\\ +\mbox{}\verb@ print len(s)@\\ +\mbox{}\verb@ (compression, binaryid, elsize, elsigned, \@\\ +\mbox{}\verb@ elunsigned, elements, minelement, maxelement, \@\\ +\mbox{}\verb@ byteorder,dimfast,dimmid,dimslow,padding) = \@\\ +\mbox{}\verb@ object.get_integerarrayparameters_wdims_fs()@\\ +\mbox{}\verb@ if dimfast==0:@\\ +\mbox{}\verb@ dimfast = 1@\\ +\mbox{}\verb@ if dimmid==0:@\\ +\mbox{}\verb@ dimmid = 1@\\ +\mbox{}\verb@ if dimslow == 0:@\\ +\mbox{}\verb@ dimslow = 1@\\ +\mbox{}\verb@ print "compression: ",compression@\\ +\mbox{}\verb@ print "binaryid", binaryid@\\ +\mbox{}\verb@ print "elsize", elsize@\\ +\mbox{}\verb@ print "elsigned", elsigned@\\ +\mbox{}\verb@ print "elunsigned",elunsigned@\\ +\mbox{}\verb@ print "elements", elements@\\ +\mbox{}\verb@ print "minelement", minelement@\\ +\mbox{}\verb@ print "maxelement", maxelement@\\ +\mbox{}\verb@ print "byteorder", byteorder@\\ +\mbox{}\verb@ print "dimfast", dimfast@\\ +\mbox{}\verb@ print "dimmid", dimmid@\\ +\mbox{}\verb@ print "dimslow",dimslow@\\ +\mbox{}\verb@ print "padding", padding@\\ +\mbox{}\verb@ newobject.set_integerarray_wdims_fs(\@\\ +\mbox{}\verb@ pycbf.CBF_BYTE_OFFSET,binaryid,s,elsize,elsigned,\@\\ +\mbox{}\verb@ elements,byteorder,dimfast,dimmid,dimslow,padding)@\\ +\mbox{}\verb@ try:@\\ +\mbox{}\verb@ import numpy@\\ +\mbox{}\verb@ d = numpy.frombuffer(s,numpy.uint32)@\\ +\mbox{}\verb@ # Hard wired Unsigned Int32@\\ +\mbox{}\verb@ print d.shape@\\ +\mbox{}\verb@ print d[0:10],d[d.shape[0]/2],d[-1]@\\ +\mbox{}\verb@ print d[d.shape[0]/3:d.shape[0]/3+20]@\\ +\mbox{}\verb@ d=numpy.reshape(d,(2300,2300))@\\ +\mbox{}\verb@# from matplotlib import pylab@\\ +\mbox{}\verb@# pylab.imshow(d,vmin=0,vmax=1000)@\\ +\mbox{}\verb@# pylab.show()@\\ +\mbox{}\verb@ except ImportError:@\\ +\mbox{}\verb@ print "You need to get numpy and matplotlib to see the data"@\\ +\mbox{}\verb@ else:@\\ +\mbox{}\verb@ value=object.get_value()@\\ +\mbox{}\verb@ newobject.set_value(value)@\\ +\mbox{}\verb@ print "Val:",value,i@\\ +\mbox{}\verb@ print@\\ +\mbox{}\verb@del(object)@\\ +\mbox{}\verb@newobject.write_widefile("newtest1.cbf",pycbf.CBF,\@\\ +\mbox{}\verb@ pycbf.MIME_HEADERS|pycbf.MSG_DIGEST|pycbf.PAD_4K,0)@\\ +\mbox{}\verb@#@\\ +\mbox{}\verb@print dir()@\\ +\mbox{}\verb@#object.free_handle(handle)@\\ +\mbox{}\verb@@{\NWsep} +\end{list} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} +\end{flushleft} +\subsection{Processing of XFEL axes} + +\begin{flushleft} \small +\begin{minipage}{\linewidth}\label{scrap17}\raggedright\small +\NWtarget{nuweb18}{} \verb@"pycbf_testfelaxes.py"@\nobreak\ {\footnotesize {18}}$\equiv$ +\vspace{-1ex} +\begin{list}{}{} \item +\mbox{}\verb@@\\ +\mbox{}\verb@import pycbf, sys@\\ +\mbox{}\verb@from decimal import Decimal, ROUND_HALF_UP@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@image_file = sys.argv[1]@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@cbf = pycbf.cbf_handle_struct()@\\ +\mbox{}\verb@cbf.read_widefile(image_file, pycbf.MSG_DIGEST)@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@for element in range(64):@\\ +\mbox{}\verb@ d = cbf.construct_detector(element)@\\ +\mbox{}\verb@ print "element:", element@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ v00 = d.get_pixel_coordinates(0, 0)@\\ +\mbox{}\verb@ v01 = d.get_pixel_coordinates(0, 1)@\\ +\mbox{}\verb@ v10 = d.get_pixel_coordinates(1, 0)@\\ +\mbox{}\verb@ v11 = d.get_pixel_coordinates(1, 1)@\\ +\mbox{}\verb@ prec = Decimal('1.000000000')@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ print '(0, 0) v00 [ %.9f %.9f %.9f ]' %(round(v00[0],9), round(v00[1],9), round(v00[2],9))@\\ +\mbox{}\verb@ print '(0, 1) v01 [ %.9g %.9g %.9g ]' %(round(v01[0],9), round(v01[1],9), round(v01[2],9))@\\ +\mbox{}\verb@ print '(1, 0) v10 [ %.9g %.9g %.9g ]' %(round(v10[0],9), round(v10[1],9), round(v10[2],9))@\\ +\mbox{}\verb@ print '(1, 1) v11 [ %.9g %.9g %.9g ]' %(round(v11[0],9), round(v11[1],9), round(v11[2],9))@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ print "surface axes:", d.get_detector_surface_axes(0), d.get_detector_surface_axes(1)@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ print d.get_detector_surface_axes(0), "has", cbf.count_axis_ancestors(d.get_detector_surface_axes(0)), "ancestors"@\\ +\mbox{}\verb@ print d.get_detector_surface_axes(1), "has", cbf.count_axis_ancestors(d.get_detector_surface_axes(1)), "ancestors"@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ cur_axis = d.get_detector_surface_axes(0)@\\ +\mbox{}\verb@ count = cbf.count_axis_ancestors(cur_axis)@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ for index in range(count):@\\ +\mbox{}\verb@ print "axis", cur_axis, "index: ", index@\\ +\mbox{}\verb@ print " equipment", cbf.get_axis_equipment(cur_axis)@\\ +\mbox{}\verb@ print " depends_on", cbf.get_axis_depends_on(cur_axis)@\\ +\mbox{}\verb@ print " equipment_component", cbf.get_axis_equipment_component(cur_axis)@\\ +\mbox{}\verb@ vector = cbf.get_axis_vector(cur_axis)@\\ +\mbox{}\verb@ print " vector [ %.8g %.8g %.8g ]" % (round(vector[0],7), round(vector[1],7), round(vector[2],7))@\\ +\mbox{}\verb@ offset = cbf.get_axis_offset(cur_axis)@\\ +\mbox{}\verb@ print " offset [ %.8g %.8g %.8g ]" % (round(offset[0],7), round(offset[1],7), round(offset[2],7))@\\ +\mbox{}\verb@ print " rotation", cbf.get_axis_rotation(cur_axis)@\\ +\mbox{}\verb@ print " rotation_axis", cbf.get_axis_rotation_axis(cur_axis)@\\ +\mbox{}\verb@ cur_axis = cbf.get_axis_depends_on(cur_axis)@\\ +\mbox{}\verb@@{\NWsep} +\end{list} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} +\end{flushleft} +\section{Worked example 1 : xmas beamline + mar ccd detector at the ESRF} + +Now for the interesting part. We will attempt to actually use pycbf for a real +dataprocessing task. Crazy you might think. + +The idea is the following - we want to take the header information from some +mar ccd files (and eventually also the user or the spec control system) and +pass this information into cif headers which can be read by fit2d (etc). + +\subsection{Reading marccd headers} + +Some relatively ugly code which parses a c header and then tries to interpret +the mar ccd header format. + +FIXME : byteswapping and ends??? + +\begin{flushleft} \small +\begin{minipage}{\linewidth}\label{scrap18}\raggedright\small +\NWtarget{nuweb20}{} \verb@"xmas/readmarheader.py"@\nobreak\ {\footnotesize {20}}$\equiv$ +\vspace{-1ex} +\begin{list}{}{} \item +\mbox{}\verb@#!/usr/bin/env python@\\ +\mbox{}\verb@import struct@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@# Convert mar c header file types to python struct module types@\\ +\mbox{}\verb@mar_c_to_python_struct = {@\\ +\mbox{}\verb@ "INT32" : "i",@\\ +\mbox{}\verb@ "UINT32" : "I",@\\ +\mbox{}\verb@ "char" : "c",@\\ +\mbox{}\verb@ "UINT16" : "H"@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@# Sizes (bytes) of mar c header objects@\\ +\mbox{}\verb@mar_c_sizes = {@\\ +\mbox{}\verb@ "INT32" : 4,@\\ +\mbox{}\verb@ "UINT32" : 4,@\\ +\mbox{}\verb@ "char" : 1,@\\ +\mbox{}\verb@ "UINT16" : 2@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@# This was worked out by trial and error from a trial image I think@\\ +\mbox{}\verb@MAXIMAGES=9@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@def make_format(cdefinition):@\\ +\mbox{}\verb@ """@\\ +\mbox{}\verb@ Reads the header definition in c and makes the format @\\ +\mbox{}\verb@ string to pass to struct.unpack@\\ +\mbox{}\verb@ """@\\ +\mbox{}\verb@ lines = cdefinition.split("\n")@\\ +\mbox{}\verb@ fmt = ""@\\ +\mbox{}\verb@ names = []@\\ +\mbox{}\verb@ expected = 0@\\ +\mbox{}\verb@ for line in lines:@\\ +\mbox{}\verb@ if line.find(";")==-1:@\\ +\mbox{}\verb@ continue@\\ +\mbox{}\verb@ decl = line.split(";")[0].lstrip().rstrip()@\\ +\mbox{}\verb@ try:@\\ +\mbox{}\verb@ [type, name] = decl.split()@\\ +\mbox{}\verb@ except:@\\ +\mbox{}\verb@ #print "skipping:",line@\\ +\mbox{}\verb@ continue@\\ +\mbox{}\verb@ # print "type:",type," name:",name@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ if name.find("[")>-1:@\\ +\mbox{}\verb@ # repeated ... times@\\ +\mbox{}\verb@ try:@\\ +\mbox{}\verb@ num = name.split("[")[1].split("]")[0]@\\ +\mbox{}\verb@ num = num.replace("MAXIMAGES",str(MAXIMAGES))@\\ +\mbox{}\verb@ num = num.replace("sizeof(INT32)","4")@\\ +\mbox{}\verb@ times = eval(num)@\\ +\mbox{}\verb@ except:@\\ +\mbox{}\verb@ print "Please decode",decl@\\ +\mbox{}\verb@ raise@\\ +\mbox{}\verb@ else:@\\ +\mbox{}\verb@ times=1@\\ +\mbox{}\verb@ try:@\\ +\mbox{}\verb@ fmt += mar_c_to_python_struct[type]*times@\\ +\mbox{}\verb@ names += [name]*times@\\ +\mbox{}\verb@ expected += mar_c_sizes[type]*times@\\ +\mbox{}\verb@ except:@\\ +\mbox{}\verb@ #print "skipping",line@\\ +\mbox{}\verb@ continue@\\ +\mbox{}\verb@ #print "%4d %4d"%(mar_c_sizes[type]*times,expected),name,":",times,line@\\ +\mbox{}\verb@ #print struct.calcsize(fmt),expected@\\ +\mbox{}\verb@ return names, fmt@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@def read_mar_header(filename):@\\ +\mbox{}\verb@ """@\\ +\mbox{}\verb@ Get the header from a binary file@\\ +\mbox{}\verb@ """@\\ +\mbox{}\verb@ f = open(filename,"rb")@\\ +\mbox{}\verb@ f.seek(1024)@\\ +\mbox{}\verb@ header=f.read(3072)@\\ +\mbox{}\verb@ f.close()@\\ +\mbox{}\verb@ return header@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@def interpret_header(header, fmt, names):@\\ +\mbox{}\verb@ """@\\ +\mbox{}\verb@ given a format and header interpret it@\\ +\mbox{}\verb@ """@\\ +\mbox{}\verb@ values = struct.unpack(fmt,header)@\\ +\mbox{}\verb@ dict = {}@\\ +\mbox{}\verb@ i=0@\\ +\mbox{}\verb@ for name in names:@\\ +\mbox{}\verb@ if dict.has_key(name):@\\ +\mbox{}\verb@ if type(values[i]) == type("string"): @\\ +\mbox{}\verb@ dict[name] = dict[name]+values[i]@\\ +\mbox{}\verb@ else:@\\ +\mbox{}\verb@ try:@\\ +\mbox{}\verb@ dict[name].append(values[i])@\\ +\mbox{}\verb@ except:@\\ +\mbox{}\verb@ dict[name] = [dict[name],values[i]]@\\ +\mbox{}\verb@ else:@\\ +\mbox{}\verb@ dict[name] = values[i]@\\ +\mbox{}\verb@ i=i+1@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ return dict@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@# Now for the c definition (found on mar webpage)@\\ +\mbox{}\verb@# The following string is therefore copyrighted by Mar I guess@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@cdefinition = """@\\ +\mbox{}\verb@typedef struct frame_header_type {@\\ +\mbox{}\verb@ /* File/header format parameters (256 bytes) */@\\ +\mbox{}\verb@ UINT32 header_type; /* flag for header type @\\ +\mbox{}\verb@ (can be used as magic number) */@\\ +\mbox{}\verb@ char header_name[16]; /* header name (MMX) */@\\ +\mbox{}\verb@ UINT32 header_major_version; /* header_major_version (n.) */@\\ +\mbox{}\verb@ UINT32 header_minor_version; /* header_minor_version (.n) */@\\ +\mbox{}\verb@ UINT32 header_byte_order;/* BIG_ENDIAN (Motorola,MIPS); @\\ +\mbox{}\verb@ LITTLE_ENDIAN (DEC, Intel) */@\\ +\mbox{}\verb@ UINT32 data_byte_order; /* BIG_ENDIAN (Motorola,MIPS); @\\ +\mbox{}\verb@ LITTLE_ENDIAN (DEC, Intel) */@\\ +\mbox{}\verb@ UINT32 header_size; /* in bytes */@\\ +\mbox{}\verb@ UINT32 frame_type; /* flag for frame type */@\\ +\mbox{}\verb@ UINT32 magic_number; /* to be used as a flag - @\\ +\mbox{}\verb@ usually to indicate new file */@\\ +\mbox{}\verb@ UINT32 compression_type; /* type of image compression */@\\ +\mbox{}\verb@ UINT32 compression1; /* compression parameter 1 */@\\ +\mbox{}\verb@ UINT32 compression2; /* compression parameter 2 */@\\ +\mbox{}\verb@ UINT32 compression3; /* compression parameter 3 */@\\ +\mbox{}\verb@ UINT32 compression4; /* compression parameter 4 */@\\ +\mbox{}\verb@ UINT32 compression5; /* compression parameter 4 */@\\ +\mbox{}\verb@ UINT32 compression6; /* compression parameter 4 */@\\ +\mbox{}\verb@ UINT32 nheaders; /* total number of headers */@\\ +\mbox{}\verb@ UINT32 nfast; /* number of pixels in one line */@\\ +\mbox{}\verb@ UINT32 nslow; /* number of lines in image */@\\ +\mbox{}\verb@ UINT32 depth; /* number of bytes per pixel */@\\ +\mbox{}\verb@ UINT32 record_length; /* number of pixels between @\\ +\mbox{}\verb@ succesive rows */@\\ +\mbox{}\verb@ UINT32 signif_bits; /* true depth of data, in bits */@\\ +\mbox{}\verb@ UINT32 data_type; /* (signed,unsigned,float...) */@\\ +\mbox{}\verb@ UINT32 saturated_value; /* value marks pixel as saturated */@\\ +\mbox{}\verb@ UINT32 sequence; /* TRUE or FALSE */@\\ +\mbox{}\verb@ UINT32 nimages; /* total number of images - size of @\\ +\mbox{}\verb@ each is nfast*(nslow/nimages) */@\\ +\mbox{}\verb@ UINT32 origin; /* corner of origin */@\\ +\mbox{}\verb@ UINT32 orientation; /* direction of fast axis */@\\ +\mbox{}\verb@ UINT32 view_direction; /* direction to view frame */@\\ +\mbox{}\verb@ UINT32 overflow_location;/* FOLLOWING_HEADER, FOLLOWING_DATA */@\\ +\mbox{}\verb@ UINT32 over_8_bits; /* # of pixels with counts 255 */@\\ +\mbox{}\verb@ UINT32 over_16_bits; /* # of pixels with count 65535 */@\\ +\mbox{}\verb@ UINT32 multiplexed; /* multiplex flag */@\\ +\mbox{}\verb@ UINT32 nfastimages; /* # of images in fast direction */@\\ +\mbox{}\verb@ UINT32 nslowimages; /* # of images in slow direction */@\\ +\mbox{}\verb@ UINT32 background_applied; /* flags correction has been applied - @\\ +\mbox{}\verb@ hold magic number ? */@\\ +\mbox{}\verb@ UINT32 bias_applied; /* flags correction has been applied - @\\ +\mbox{}\verb@ hold magic number ? */@\\ +\mbox{}\verb@ UINT32 flatfield_applied; /* flags correction has been applied - @\\ +\mbox{}\verb@ hold magic number ? */@\\ +\mbox{}\verb@ UINT32 distortion_applied; /* flags correction has been applied - @\\ +\mbox{}\verb@ hold magic number ? */@\\ +\mbox{}\verb@ UINT32 original_header_type; /* Header/frame type from file @\\ +\mbox{}\verb@ that frame is read from */@\\ +\mbox{}\verb@ UINT32 file_saved; /* Flag that file has been saved, @\\ +\mbox{}\verb@ should be zeroed if modified */@\\ +\mbox{}\verb@ char reserve1[(64-40)*sizeof(INT32)-16];@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ /* Data statistics (128) */@\\ +\mbox{}\verb@ UINT32 total_counts[2]; /* 64 bit integer range = 1.85E19*/@\\ +\mbox{}\verb@ UINT32 special_counts1[2];@\\ +\mbox{}\verb@ UINT32 special_counts2[2];@\\ +\mbox{}\verb@ UINT32 min;@\\ +\mbox{}\verb@ UINT32 max;@\\ +\mbox{}\verb@ UINT32 mean;@\\ +\mbox{}\verb@ UINT32 rms;@\\ +\mbox{}\verb@ UINT32 p10;@\\ +\mbox{}\verb@ UINT32 p90;@\\ +\mbox{}\verb@ UINT32 stats_uptodate;@\\ +\mbox{}\verb@ UINT32 pixel_noise[MAXIMAGES]; /* 1000*base noise value (ADUs) */@\\ +\mbox{}\verb@ char reserve2[(32-13-MAXIMAGES)*sizeof(INT32)];@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ /* More statistics (256) */@\\ +\mbox{}\verb@ UINT16 percentile[128];@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ /* Goniostat parameters (128 bytes) */@\\ +\mbox{}\verb@ INT32 xtal_to_detector; /* 1000*distance in millimeters */@\\ +\mbox{}\verb@ INT32 beam_x; /* 1000*x beam position (pixels) */@\\ +\mbox{}\verb@ INT32 beam_y; /* 1000*y beam position (pixels) */@\\ +\mbox{}\verb@ INT32 integration_time; /* integration time in milliseconds */@\\ +\mbox{}\verb@ INT32 exposure_time; /* exposure time in milliseconds */@\\ +\mbox{}\verb@ INT32 readout_time; /* readout time in milliseconds */@\\ +\mbox{}\verb@ INT32 nreads; /* number of readouts to get this image */@\\ +\mbox{}\verb@ INT32 start_twotheta; /* 1000*two_theta angle */@\\ +\mbox{}\verb@ INT32 start_omega; /* 1000*omega angle */@\\ +\mbox{}\verb@ INT32 start_chi; /* 1000*chi angle */@\\ +\mbox{}\verb@ INT32 start_kappa; /* 1000*kappa angle */@\\ +\mbox{}\verb@ INT32 start_phi; /* 1000*phi angle */@\\ +\mbox{}\verb@ INT32 start_delta; /* 1000*delta angle */@\\ +\mbox{}\verb@ INT32 start_gamma; /* 1000*gamma angle */@\\ +\mbox{}\verb@ INT32 start_xtal_to_detector; /* 1000*distance in mm (dist in um)*/@\\ +\mbox{}\verb@ INT32 end_twotheta; /* 1000*two_theta angle */@\\ +\mbox{}\verb@ INT32 end_omega; /* 1000*omega angle */@\\ +\mbox{}\verb@ INT32 end_chi; /* 1000*chi angle */@\\ +\mbox{}\verb@ INT32 end_kappa; /* 1000*kappa angle */@\\ +\mbox{}\verb@ INT32 end_phi; /* 1000*phi angle */@\\ +\mbox{}\verb@ INT32 end_delta; /* 1000*delta angle */@\\ +\mbox{}\verb@ INT32 end_gamma; /* 1000*gamma angle */@\\ +\mbox{}\verb@ INT32 end_xtal_to_detector; /* 1000*distance in mm (dist in um)*/@\\ +\mbox{}\verb@ INT32 rotation_axis; /* active rotation axis */@\\ +\mbox{}\verb@ INT32 rotation_range; /* 1000*rotation angle */@\\ +\mbox{}\verb@ INT32 detector_rotx; /* 1000*rotation of detector around X */@\\ +\mbox{}\verb@ INT32 detector_roty; /* 1000*rotation of detector around Y */@\\ +\mbox{}\verb@ INT32 detector_rotz; /* 1000*rotation of detector around Z */@\\ +\mbox{}\verb@ char reserve3[(32-28)*sizeof(INT32)];@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ /* Detector parameters (128 bytes) */@\\ +\mbox{}\verb@ INT32 detector_type; /* detector type */@\\ +\mbox{}\verb@ INT32 pixelsize_x; /* pixel size (nanometers) */@\\ +\mbox{}\verb@ INT32 pixelsize_y; /* pixel size (nanometers) */@\\ +\mbox{}\verb@ INT32 mean_bias; /* 1000*mean bias value */@\\ +\mbox{}\verb@ INT32 photons_per_100adu; /* photons / 100 ADUs */@\\ +\mbox{}\verb@ INT32 measured_bias[MAXIMAGES]; /* 1000*mean bias value for each image*/@\\ +\mbox{}\verb@ INT32 measured_temperature[MAXIMAGES]; /* Temperature of each @\\ +\mbox{}\verb@ detector in milliKelvins */@\\ +\mbox{}\verb@ INT32 measured_pressure[MAXIMAGES]; /* Pressure of each chamber @\\ +\mbox{}\verb@ in microTorr */@\\ +\mbox{}\verb@ /* Retired reserve4 when MAXIMAGES set to 9 from 16 and @\\ +\mbox{}\verb@ two fields removed, and temp and pressure added@\\ +\mbox{}\verb@ char reserve4[(32-(5+3*MAXIMAGES))*sizeof(INT32)]@\\ +\mbox{}\verb@ */@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ /* X-ray source and optics parameters (128 bytes) */@\\ +\mbox{}\verb@ /* X-ray source parameters (8*4 bytes) */@\\ +\mbox{}\verb@ INT32 source_type; /* (code) - target, synch. etc */@\\ +\mbox{}\verb@ INT32 source_dx; /* Optics param. - (size microns) */@\\ +\mbox{}\verb@ INT32 source_dy; /* Optics param. - (size microns) */@\\ +\mbox{}\verb@ INT32 source_wavelength; /* wavelength (femtoMeters) */@\\ +\mbox{}\verb@ INT32 source_power; /* (Watts) */@\\ +\mbox{}\verb@ INT32 source_voltage; /* (Volts) */@\\ +\mbox{}\verb@ INT32 source_current; /* (microAmps) */@\\ +\mbox{}\verb@ INT32 source_bias; /* (Volts) */@\\ +\mbox{}\verb@ INT32 source_polarization_x; /* () */@\\ +\mbox{}\verb@ INT32 source_polarization_y; /* () */@\\ +\mbox{}\verb@ char reserve_source[4*sizeof(INT32)];@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ /* X-ray optics_parameters (8*4 bytes) */@\\ +\mbox{}\verb@ INT32 optics_type; /* Optics type (code)*/@\\ +\mbox{}\verb@ INT32 optics_dx; /* Optics param. - (size microns) */@\\ +\mbox{}\verb@ INT32 optics_dy; /* Optics param. - (size microns) */@\\ +\mbox{}\verb@ INT32 optics_wavelength; /* Optics param. - (size microns) */@\\ +\mbox{}\verb@ INT32 optics_dispersion; /* Optics param. - (*10E6) */@\\ +\mbox{}\verb@ INT32 optics_crossfire_x; /* Optics param. - (microRadians) */@\\ +\mbox{}\verb@ INT32 optics_crossfire_y; /* Optics param. - (microRadians) */@\\ +\mbox{}\verb@ INT32 optics_angle; /* Optics param. - (monoch. @\\ +\mbox{}\verb@ 2theta - microradians) */@\\ +\mbox{}\verb@ INT32 optics_polarization_x; /* () */@\\ +\mbox{}\verb@ INT32 optics_polarization_y; /* () */@\\ +\mbox{}\verb@ char reserve_optics[4*sizeof(INT32)];@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ char reserve5[((32-28)*sizeof(INT32))];@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ /* File parameters (1024 bytes) */@\\ +\mbox{}\verb@ char filetitle[128]; /* Title */@\\ +\mbox{}\verb@ char filepath[128]; /* path name for data file */@\\ +\mbox{}\verb@ char filename[64]; /* name of data file */@\\ +\mbox{}\verb@ char acquire_timestamp[32]; /* date and time of acquisition */@\\ +\mbox{}\verb@ char header_timestamp[32]; /* date and time of header update */@\\ +\mbox{}\verb@ char save_timestamp[32]; /* date and time file saved */@\\ +\mbox{}\verb@ char file_comments[512]; /* comments, use as desired */@\\ +\mbox{}\verb@ char reserve6[1024-(128+128+64+(3*32)+512)];@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ /* Dataset parameters (512 bytes) */@\\ +\mbox{}\verb@ char dataset_comments[512]; /* comments, used as desired */@\\ +\mbox{}\verb@ /* pad out to 3072 bytes */@\\ +\mbox{}\verb@ char pad[3072-(256+128+256+(3*128)+1024+512)]; @\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ } frame_header;@\\ +\mbox{}\verb@"""@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@class marheaderreader:@\\ +\mbox{}\verb@ """@\\ +\mbox{}\verb@ Class to sit and read a series of images (makes format etc only once)@\\ +\mbox{}\verb@ """@\\ +\mbox{}\verb@ def __init__(self):@\\ +\mbox{}\verb@ """@\\ +\mbox{}\verb@ Initialise internal stuff@\\ +\mbox{}\verb@ """@\\ +\mbox{}\verb@ self.names , self.fmt = make_format(cdefinition)@\\ +\mbox{}\verb@ def get_header(self,filename):@\\ +\mbox{}\verb@ """@\\ +\mbox{}\verb@ Reads a header from file filename@\\ +\mbox{}\verb@ """@\\ +\mbox{}\verb@ h=read_mar_header(filename)@\\ +\mbox{}\verb@ dict = interpret_header(h,self.fmt,self.names)@\\ +\mbox{}\verb@ # Append ESRF formatted stuff@\\ +\mbox{}\verb@ items = self.readesrfstring(dict["dataset_comments[512]"])@\\ +\mbox{}\verb@ for pair in items:@\\ +\mbox{}\verb@ dict[pair[0]]=pair[1]@\\ +\mbox{}\verb@ items = self.readesrfstring(dict["file_comments[512]"])@\\ +\mbox{}\verb@ for pair in items:@\\ +\mbox{}\verb@ dict[pair[0]]=pair[1]@\\ +\mbox{}\verb@ dict["pixelsize_x_mm"]= str(float(dict["pixelsize_x"])/1e6)@\\ +\mbox{}\verb@ dict["pixelsize_y_mm"]= str(float(dict["pixelsize_y"])/1e6)@\\ +\mbox{}\verb@ dict["integration_time_sec"]= str(float(dict["integration_time"])/1e3)@\\ +\mbox{}\verb@ dict["beam_y_mm"]= str(float(dict["pixelsize_y_mm"])*@\\ +\mbox{}\verb@ float(dict["beam_y"])/1000.)@\\ +\mbox{}\verb@ dict["beam_x_mm"]= str(float(dict["pixelsize_x_mm"])*@\\ +\mbox{}\verb@ float(dict["beam_x"])/1000.)@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ return dict@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ def readesrfstring(self,s):@\\ +\mbox{}\verb@ """@\\ +\mbox{}\verb@ Interpret the so called "esrf format" header lines @\\ +\mbox{}\verb@ which are in comment sections@\\ +\mbox{}\verb@ """@\\ +\mbox{}\verb@ s=s.replace("\000","")@\\ +\mbox{}\verb@ items = filter(None, [len(x)>1 and x or None for x in [@\\ +\mbox{}\verb@ item.split("=") for item in s.split(";")]])@\\ +\mbox{}\verb@ return items@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@if __name__=="__main__":@\\ +\mbox{}\verb@ """@\\ +\mbox{}\verb@ Make a little program to process files@\\ +\mbox{}\verb@ """@\\ +\mbox{}\verb@ import sys@\\ +\mbox{}\verb@ print "Starting"@\\ +\mbox{}\verb@ names,fmt = make_format(cdefinition)@\\ +\mbox{}\verb@ print "Names and format made"@\\ +\mbox{}\verb@ h = read_mar_header(sys.argv[1])@\\ +\mbox{}\verb@ print "Read header, interpreting"@\\ +\mbox{}\verb@ d = interpret_header(h,fmt,names)@\\ +\mbox{}\verb@ printed = {}@\\ +\mbox{}\verb@ for name in names:@\\ +\mbox{}\verb@ if printed.has_key(name):@\\ +\mbox{}\verb@ continue@\\ +\mbox{}\verb@ print name,":",d[name]@\\ +\mbox{}\verb@ printed[name]=1@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@{\NWsep} +\end{list} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} +\end{flushleft} +\subsection{Writing out cif files for fit2d/xmas} + +A script which is supposed to pick up some header information from the mar images, +some more infomation from the user and the create cif files. + +This relies on a "template" cif file to get it started (avoids me programming everything). + +\begin{flushleft} \small +\begin{minipage}{\linewidth}\label{scrap19}\raggedright\small +\NWtarget{nuweb22}{} \verb@"xmas/xmasheaders.py"@\nobreak\ {\footnotesize {22}}$\equiv$ +\vspace{-1ex} +\begin{list}{}{} \item +\mbox{}\verb@#!/usr/bin/env python@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@import pycbf@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@# Some cbf helper functions - obj would be a cbf_handle_struct object@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@def writewavelength(obj,wavelength):@\\ +\mbox{}\verb@ obj.set_wavelength(float(wavelength))@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@def writecellpar(obj,cifname,value):@\\ +\mbox{}\verb@ obj.find_category("cell")@\\ +\mbox{}\verb@ obj.find_column(cifname)@\\ +\mbox{}\verb@ obj.set_value(value)@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@def writecell(obj,cell):@\\ +\mbox{}\verb@ """@\\ +\mbox{}\verb@ call with cell = (a,b,c,alpha,beta,gamma)@\\ +\mbox{}\verb@ """@\\ +\mbox{}\verb@ obj.find_category("cell")@\\ +\mbox{}\verb@ obj.find_column("length_a")@\\ +\mbox{}\verb@ obj.set_value(str(cell[0]))@\\ +\mbox{}\verb@ obj.find_column("length_b")@\\ +\mbox{}\verb@ obj.set_value(str(cell[1]))@\\ +\mbox{}\verb@ obj.find_column("length_c")@\\ +\mbox{}\verb@ obj.set_value(str(cell[2]))@\\ +\mbox{}\verb@ obj.find_column("angle_alpha")@\\ +\mbox{}\verb@ obj.set_value(str(cell[3]))@\\ +\mbox{}\verb@ obj.find_column("angle_beta")@\\ +\mbox{}\verb@ obj.set_value(str(cell[4]))@\\ +\mbox{}\verb@ obj.find_column("angle_gamma")@\\ +\mbox{}\verb@ obj.set_value(str(cell[5]))@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@def writeUB(obj,ub):@\\ +\mbox{}\verb@ """@\\ +\mbox{}\verb@ call with ub that can be indexed ub[i][j]@\\ +\mbox{}\verb@ """@\\ +\mbox{}\verb@ obj.find_category("diffrn_orient_matrix")@\\ +\mbox{}\verb@ for i in (1,2,3):@\\ +\mbox{}\verb@ for j in (1,2,3):@\\ +\mbox{}\verb@ obj.find_column("UB[%d][%d]"%(i,j))@\\ +\mbox{}\verb@ obj.set_value(str(ub[i-1][j-1]))@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@def writedistance(obj,distance):@\\ +\mbox{}\verb@ obj.set_axis_setting("DETECTOR_Z",float(distance),0.)@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@@\\ +\mbox{}\verb@def writebeam_x_mm(obj,cen):@\\ +\mbox{}\verb@ obj.set_axis_setting("DETECTOR_X",float(cen),0.)@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@def writebeam_y_mm(obj,cen):@\\ +\mbox{}\verb@ obj.set_axis_setting("DETECTOR_Y",float(cen),0.)@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@def writeSPECcmd(obj,s):@\\ +\mbox{}\verb@ obj.find_category("diffrn_measurement")@\\ +\mbox{}\verb@ obj.find_column("details")@\\ +\mbox{}\verb@ obj.set_value(s)@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@def writeSPECscan(obj,s):@\\ +\mbox{}\verb@ obj.find_category("diffrn_scan")@\\ +\mbox{}\verb@ obj.find_column("id")@\\ +\mbox{}\verb@ obj.set_value("SCAN%s"%(s))@\\ +\mbox{}\verb@ obj.find_category("diffrn_scan_axis")@\\ +\mbox{}\verb@ obj.find_column("scan_id")@\\ +\mbox{}\verb@ obj.rewind_row()@\\ +\mbox{}\verb@ for i in range(obj.count_rows()):@\\ +\mbox{}\verb@ obj.select_row(i)@\\ +\mbox{}\verb@ obj.set_value("SCAN%s"%(s))@\\ +\mbox{}\verb@ obj.find_category("diffrn_scan_frame")@\\ +\mbox{}\verb@ obj.find_column("scan_id")@\\ +\mbox{}\verb@ obj.rewind_row()@\\ +\mbox{}\verb@ obj.set_value("SCAN%s"%(s))@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@def writepixelsize_y_mm(obj,s):@\\ +\mbox{}\verb@ """@\\ +\mbox{}\verb@ Units are mm for cif@\\ +\mbox{}\verb@ """@\\ +\mbox{}\verb@ # element number = assume this is first and only detector@\\ +\mbox{}\verb@ element_number = 0@\\ +\mbox{}\verb@ # axis number = faster or slower... ? Need to check precedence ideally...@\\ +\mbox{}\verb@ obj.find_category("array_structure_list")@\\ +\mbox{}\verb@ obj.find_column("axis_set_id")@\\ +\mbox{}\verb@ obj.find_row("ELEMENT_Y")@\\ +\mbox{}\verb@ obj.find_column("precedence")@\\ +\mbox{}\verb@ axis_number = obj.get_integervalue()@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ obj.set_pixel_size(element_number, axis_number, float(s) )@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ obj.find_category("array_structure_list_axis")@\\ +\mbox{}\verb@ obj.find_column("axis_id")@\\ +\mbox{}\verb@ obj.find_row("ELEMENT_Y")@\\ +\mbox{}\verb@ obj.find_column("displacement")@\\ +\mbox{}\verb@ obj.set_doublevalue("%.6g",float(s)/2.0)@\\ +\mbox{}\verb@ obj.find_column("displacement_increment")@\\ +\mbox{}\verb@ obj.set_doublevalue("%.6g",float(s))@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@def writepixelsize_x_mm(obj,s):@\\ +\mbox{}\verb@ # element number = assume this is first and only detector@\\ +\mbox{}\verb@ element_number = 0@\\ +\mbox{}\verb@ # axis number = faster or slower... ? Need to check precedence ideally...@\\ +\mbox{}\verb@ obj.find_category("array_structure_list")@\\ +\mbox{}\verb@ obj.find_column("axis_set_id")@\\ +\mbox{}\verb@ obj.find_row("ELEMENT_X")@\\ +\mbox{}\verb@ obj.find_column("precedence")@\\ +\mbox{}\verb@ axis_number = obj.get_integervalue()@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ obj.set_pixel_size(element_number, axis_number, float(s) )@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ obj.find_category("array_structure_list_axis")@\\ +\mbox{}\verb@ obj.find_column("axis_id")@\\ +\mbox{}\verb@ obj.find_row("ELEMENT_X")@\\ +\mbox{}\verb@ obj.find_column("displacement")@\\ +\mbox{}\verb@ obj.set_doublevalue("%.6g",float(s)/2.0)@\\ +\mbox{}\verb@ obj.find_column("displacement_increment")@\\ +\mbox{}\verb@ obj.set_doublevalue("%.6g",float(s))@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@def writeintegrationtime(obj,s):@\\ +\mbox{}\verb@ obj.find_category("diffrn_scan_frame")@\\ +\mbox{}\verb@ obj.find_column("integration_time")@\\ +\mbox{}\verb@ obj.set_value(str(s).replace("\000",""))@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@def writenfast(obj,s):@\\ +\mbox{}\verb@ obj.find_category("array_structure_list")@\\ +\mbox{}\verb@ obj.find_column("index")@\\ +\mbox{}\verb@ obj.find_row("1")@\\ +\mbox{}\verb@ obj.find_column("dimension")@\\ +\mbox{}\verb@ obj.set_value(str(s))@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@def writenslow(obj,s):@\\ +\mbox{}\verb@ obj.find_category("array_structure_list")@\\ +\mbox{}\verb@ obj.find_column("index")@\\ +\mbox{}\verb@ obj.find_row("2")@\\ +\mbox{}\verb@ obj.find_column("dimension")@\\ +\mbox{}\verb@ obj.set_value(str(s))@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@functiondict = {@\\ +\mbox{}\verb@ "lambda" : writewavelength,@\\ +\mbox{}\verb@ "beam_x_mm" : writebeam_x_mm,@\\ +\mbox{}\verb@ "beam_y_mm" : writebeam_y_mm,@\\ +\mbox{}\verb@ "distance" : writedistance,@\\ +\mbox{}\verb@ "UB" : writeUB,@\\ +\mbox{}\verb@ "cell" : writecell,@\\ +\mbox{}\verb@ "cmd" : writeSPECcmd,@\\ +\mbox{}\verb@ "scan" : writeSPECscan,@\\ +\mbox{}\verb@ "nfast" : writenfast,@\\ +\mbox{}\verb@ "nslow" : writenslow,@\\ +\mbox{}\verb@ "pixelsize_y_mm" : writepixelsize_y_mm,@\\ +\mbox{}\verb@ "pixelsize_x_mm" : writepixelsize_x_mm,@\\ +\mbox{}\verb@ "integration_time_sec" : writeintegrationtime,@\\ +\mbox{}\verb@ "tth" : lambda obj,value : obj.set_axis_setting(@\\ +\mbox{}\verb@ "DETECTOR_TWO_THETA_VERTICAL",float(value),0.),@\\ +\mbox{}\verb@ "chi" : lambda obj,value : obj.set_axis_setting(@\\ +\mbox{}\verb@ "GONIOMETER_CHI",float(value),0.),@\\ +\mbox{}\verb@ "th" : lambda obj,value : obj.set_axis_setting(@\\ +\mbox{}\verb@ "GONIOMETER_THETA",float(value),0.),@\\ +\mbox{}\verb@ "phi" : lambda obj,value : obj.set_axis_setting(@\\ +\mbox{}\verb@ "GONIOMETER_PHI",float(value),0.),@\\ +\mbox{}\verb@ "lc_a" : lambda obj,value : writecellpar(obj,"length_a",value),@\\ +\mbox{}\verb@ "lc_b" : lambda obj,value : writecellpar(obj,"length_b",value),@\\ +\mbox{}\verb@ "lc_c" : lambda obj,value : writecellpar(obj,"length_c",value),@\\ +\mbox{}\verb@ "lc_al" : lambda obj,value : writecellpar(obj,"angle_alpha",value),@\\ +\mbox{}\verb@ "lc_be" : lambda obj,value : writecellpar(obj,"angle_beta",value),@\\ +\mbox{}\verb@ "lc_ga" : lambda obj,value : writecellpar(obj,"angle_gamma",value)@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"""@\\ +\mbox{}\verb@ #@\\ +\mbox{}\verb@ # Not implementing these for now@\\ +\mbox{}\verb@ lc_ra@\\ +\mbox{}\verb@ lc_rc 0.4742@\\ +\mbox{}\verb@ lc_rb 1.16@\\ +\mbox{}\verb@ energy 13@\\ +\mbox{}\verb@ cp_phi -180@\\ +\mbox{}\verb@ alpha 7.3716@\\ +\mbox{}\verb@ lc_ral 90@\\ +\mbox{}\verb@ cp_tth -180@\\ +\mbox{}\verb@ lc_rga 90@\\ +\mbox{}\verb@ beta 17.572@\\ +\mbox{}\verb@ omega -2.185@\\ +\mbox{}\verb@ h 0.21539@\\ +\mbox{}\verb@ k 0.01957@\\ +\mbox{}\verb@ l 5.9763@\\ +\mbox{}\verb@ cp_chi -180@\\ +\mbox{}\verb@ lc_rbe 90@\\ +\mbox{}\verb@ cp_th -180@\\ +\mbox{}\verb@ azimuth 0@\\ +\mbox{}\verb@"""@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@# Finally a class for creating header files.@\\ +\mbox{}\verb@# It reads a template and then offers a processfile command @\\ +\mbox{}\verb@# for running over a file series@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@class cifheader:@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ def __init__(self,templatefile):@\\ +\mbox{}\verb@ self.cbf=pycbf.cbf_handle_struct()@\\ +\mbox{}\verb@ self.cbf.read_template(templatefile)@\\ +\mbox{}\verb@ from readmarheader import marheaderreader@\\ +\mbox{}\verb@ self.marheaderreader = marheaderreader()@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ def processfile(self,filename, outfile=None,@\\ +\mbox{}\verb@ format="mccd",@\\ +\mbox{}\verb@ **kwds):@\\ +\mbox{}\verb@ outfile=outfile.replace(format,"cif")@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ if format == "mccd":@\\ +\mbox{}\verb@ items = self.marheaderreader.get_header(filename)@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ if format == "bruker":@\\ +\mbox{}\verb@ pass@\\ +\mbox{}\verb@ if format == "edf":@\\ +\mbox{}\verb@ pass@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ self.items=items@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ # Take the image header items as default@\\ +\mbox{}\verb@ self.updateitems(items)@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ # Allow them to be overridden@\\ +\mbox{}\verb@ self.updateitems(kwds)@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ # Write the file@\\ +\mbox{}\verb@ self.writefile(outfile)@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ def writefile(self,filename):@\\ +\mbox{}\verb@ self.cbf.write_file(filename,pycbf.CIF,pycbf.MIME_HEADERS,@\\ +\mbox{}\verb@ pycbf.ENC_BASE64)@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ def updateitems(self,dict):@\\ +\mbox{}\verb@ names = dict.keys()@\\ +\mbox{}\verb@ for name in names:@\\ +\mbox{}\verb@ value = dict[name]@\\ +\mbox{}\verb@ # use a dictionary of functions@\\ +\mbox{}\verb@ if functiondict.has_key(name):@\\ +\mbox{}\verb@ # print "calling",functiondict[name],value@\\ +\mbox{}\verb@ apply(functiondict[name],(self.cbf,value))@\\ +\mbox{}\verb@ else:@\\ +\mbox{}\verb@ #print "ignoring",name,value@\\ +\mbox{}\verb@ pass@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@if __name__=="__main__":@\\ +\mbox{}\verb@ import sys@\\ +\mbox{}\verb@ @\\ +\mbox{}\verb@ obj=cifheader("xmas_cif_template.cif")@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ ub = [[0.11, 0.12, 0.13] , [0.21, 0.22, 0.23], [0.31, 0.32, 0.33]]@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ for filename in sys.argv[1:]:@\\ +\mbox{}\verb@ fileout = filename.split("/")[-1]@\\ +\mbox{}\verb@ obj.processfile(filename, outfile=fileout, UB=ub, distance=123.456)@\\ +\mbox{}\verb@@{\NWsep} +\end{list} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} +\end{flushleft} +\subsection{A template cif file for the xmas beamline} + +This was sort of copied and modified from an example file. It has NOT been checked. +Hopefully the four circle geometry at least vaguely matches what is at the beamline. + +\begin{flushleft} \small +\begin{minipage}{\linewidth}\label{scrap20}\raggedright\small +\NWtarget{nuweb24}{} \verb@"xmas/xmas_cif_template.cif"@\nobreak\ {\footnotesize {24}}$\equiv$ +\vspace{-1ex} +\begin{list}{}{} \item +\mbox{}\verb@@\\ +\mbox{}\verb@###CBF: VERSION 0.6@\\ +\mbox{}\verb@# CBF file written by cbflib v0.6@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@data_image_1@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@loop_@\\ +\mbox{}\verb@_diffrn.id@\\ +\mbox{}\verb@_diffrn.crystal_id@\\ +\mbox{}\verb@ DS1 DIFFRN_CRYSTAL_ID@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@loop_@\\ +\mbox{}\verb@_cell.length_a 5.959(1)@\\ +\mbox{}\verb@_cell.length_b 14.956(1)@\\ +\mbox{}\verb@_cell.length_c 19.737(3)@\\ +\mbox{}\verb@_cell.angle_alpha 90@\\ +\mbox{}\verb@_cell.angle_beta 90@\\ +\mbox{}\verb@_cell.angle_gamma 90@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@loop_@\\ +\mbox{}\verb@_diffrn_orient_matrix.id 'DS1'@\\ +\mbox{}\verb@_diffrn_orient_matrix.type @\\ +\mbox{}\verb@; reciprocal axis matrix, multiplies hkl vector to generate@\\ +\mbox{}\verb@ diffractometer xyz vector and diffractometer angles@\\ +\mbox{}\verb@;@\\ +\mbox{}\verb@_diffrn_orient_matrix.UB[1][1] 0.11@\\ +\mbox{}\verb@_diffrn_orient_matrix.UB[1][2] 0.12@\\ +\mbox{}\verb@_diffrn_orient_matrix.UB[1][3] 0.13@\\ +\mbox{}\verb@_diffrn_orient_matrix.UB[2][1] 0.21@\\ +\mbox{}\verb@_diffrn_orient_matrix.UB[2][2] 0.22@\\ +\mbox{}\verb@_diffrn_orient_matrix.UB[2][3] 0.23@\\ +\mbox{}\verb@_diffrn_orient_matrix.UB[3][1] 0.31@\\ +\mbox{}\verb@_diffrn_orient_matrix.UB[3][2] 0.32@\\ +\mbox{}\verb@_diffrn_orient_matrix.UB[3][3] 0.33@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@loop_@\\ +\mbox{}\verb@_diffrn_source.diffrn_id@\\ +\mbox{}\verb@_diffrn_source.source@\\ +\mbox{}\verb@_diffrn_source.current@\\ +\mbox{}\verb@_diffrn_source.type@\\ +\mbox{}\verb@ DS1 synchrotron 200.0 'XMAS beamline bm28 ESRF'@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@loop_@\\ +\mbox{}\verb@_diffrn_radiation.diffrn_id@\\ +\mbox{}\verb@_diffrn_radiation.wavelength_id@\\ +\mbox{}\verb@_diffrn_radiation.probe@\\ +\mbox{}\verb@_diffrn_radiation.monochromator@\\ +\mbox{}\verb@_diffrn_radiation.polarizn_source_ratio@\\ +\mbox{}\verb@_diffrn_radiation.polarizn_source_norm@\\ +\mbox{}\verb@_diffrn_radiation.div_x_source@\\ +\mbox{}\verb@_diffrn_radiation.div_y_source@\\ +\mbox{}\verb@_diffrn_radiation.div_x_y_source@\\ +\mbox{}\verb@_diffrn_radiation.collimation@\\ +\mbox{}\verb@ DS1 WAVELENGTH1 x-ray 'Si 111' 0.8 0.0 0.08 0.01 0.00 '0.20 mm x 0.20 mm'@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@loop_@\\ +\mbox{}\verb@_diffrn_radiation_wavelength.id@\\ +\mbox{}\verb@_diffrn_radiation_wavelength.wavelength@\\ +\mbox{}\verb@_diffrn_radiation_wavelength.wt@\\ +\mbox{}\verb@ WAVELENGTH1 1.73862 1.0@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@loop_@\\ +\mbox{}\verb@_diffrn_detector.diffrn_id@\\ +\mbox{}\verb@_diffrn_detector.id@\\ +\mbox{}\verb@_diffrn_detector.type@\\ +\mbox{}\verb@_diffrn_detector.details@\\ +\mbox{}\verb@_diffrn_detector.number_of_axes@\\ +\mbox{}\verb@ DS1 MAR 'MAR XMAS' 'slow mode' 5@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@loop_@\\ +\mbox{}\verb@_diffrn_detector_axis.detector_id@\\ +\mbox{}\verb@_diffrn_detector_axis.axis_id@\\ +\mbox{}\verb@ MAR DETECTOR_TWO_THETA_VERTICAL@\\ +\mbox{}\verb@ MAR DETECTOR_X@\\ +\mbox{}\verb@ MAR DETECTOR_Y@\\ +\mbox{}\verb@ MAR DETECTOR_Z@\\ +\mbox{}\verb@ MAR DETECTOR_PITCH@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@loop_@\\ +\mbox{}\verb@_diffrn_detector_element.id@\\ +\mbox{}\verb@_diffrn_detector_element.detector_id@\\ +\mbox{}\verb@ ELEMENT1 MAR@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@loop_@\\ +\mbox{}\verb@_diffrn_data_frame.id@\\ +\mbox{}\verb@_diffrn_data_frame.detector_element_id@\\ +\mbox{}\verb@_diffrn_data_frame.array_id@\\ +\mbox{}\verb@_diffrn_data_frame.binary_id@\\ +\mbox{}\verb@ FRAME1 ELEMENT1 ARRAY1 1@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@loop_@\\ +\mbox{}\verb@_diffrn_measurement.diffrn_id@\\ +\mbox{}\verb@_diffrn_measurement.id@\\ +\mbox{}\verb@_diffrn_measurement.number_of_axes@\\ +\mbox{}\verb@_diffrn_measurement.method@\\ +\mbox{}\verb@_diffrn_measurement.details@\\ +\mbox{}\verb@ DS1 GONIOMETER 3 rotation@\\ +\mbox{}\verb@ 'i0=1.000 i1=1.000 i2=1.000 ib=1.000 beamstop=20 mm 0% attenuation'@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@loop_@\\ +\mbox{}\verb@_diffrn_measurement_axis.measurement_id@\\ +\mbox{}\verb@_diffrn_measurement_axis.axis_id@\\ +\mbox{}\verb@ GONIOMETER GONIOMETER_PHI@\\ +\mbox{}\verb@ GONIOMETER GONIOMETER_CHI@\\ +\mbox{}\verb@ GONIOMETER GONIOMETER_THETA@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@loop_@\\ +\mbox{}\verb@_diffrn_scan.id@\\ +\mbox{}\verb@_diffrn_scan.frame_id_start@\\ +\mbox{}\verb@_diffrn_scan.frame_id_end@\\ +\mbox{}\verb@_diffrn_scan.frames@\\ +\mbox{}\verb@ SCAN1 FRAME1 FRAME1 1@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@loop_@\\ +\mbox{}\verb@_diffrn_scan_axis.scan_id@\\ +\mbox{}\verb@_diffrn_scan_axis.axis_id@\\ +\mbox{}\verb@_diffrn_scan_axis.angle_start@\\ +\mbox{}\verb@_diffrn_scan_axis.angle_range@\\ +\mbox{}\verb@_diffrn_scan_axis.angle_increment@\\ +\mbox{}\verb@_diffrn_scan_axis.displacement_start@\\ +\mbox{}\verb@_diffrn_scan_axis.displacement_range@\\ +\mbox{}\verb@_diffrn_scan_axis.displacement_increment@\\ +\mbox{}\verb@ SCAN1 GONIOMETER_THETA 0.0 0.0 0.0 0.0 0.0 0.0@\\ +\mbox{}\verb@ SCAN1 GONIOMETER_CHI 0.0 0.0 0.0 0.0 0.0 0.0@\\ +\mbox{}\verb@ SCAN1 GONIOMETER_PHI 185 1 1 0.0 0.0 0.0@\\ +\mbox{}\verb@ SCAN1 DETECTOR_TWO_THETA_VERTICAL 0.0 0.0 0.0 0.0 0.0 0.0@\\ +\mbox{}\verb@ SCAN1 DETECTOR_Z 0.0 0.0 0.0 103.750 0 0@\\ +\mbox{}\verb@ SCAN1 DETECTOR_Y 0.0 0.0 0.0 0.0 0.0 0.0@\\ +\mbox{}\verb@ SCAN1 DETECTOR_X 0.0 0.0 0.0 0.0 0.0 0.0@\\ +\mbox{}\verb@ SCAN1 DETECTOR_PITCH 0.0 0.0 0.0 0.0 0.0 0.0@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@loop_@\\ +\mbox{}\verb@_diffrn_scan_frame.frame_id@\\ +\mbox{}\verb@_diffrn_scan_frame.frame_number@\\ +\mbox{}\verb@_diffrn_scan_frame.integration_time@\\ +\mbox{}\verb@_diffrn_scan_frame.scan_id@\\ +\mbox{}\verb@_diffrn_scan_frame.date@\\ +\mbox{}\verb@ FRAME1 1 360 SCAN1 1997-12-04T10:23:48@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@loop_@\\ +\mbox{}\verb@_diffrn_scan_frame_axis.frame_id@\\ +\mbox{}\verb@_diffrn_scan_frame_axis.axis_id@\\ +\mbox{}\verb@_diffrn_scan_frame_axis.angle@\\ +\mbox{}\verb@_diffrn_scan_frame_axis.displacement@\\ +\mbox{}\verb@ FRAME1 GONIOMETER_THETA 0.0 0.0@\\ +\mbox{}\verb@ FRAME1 GONIOMETER_CHI 0.0 0.0@\\ +\mbox{}\verb@ FRAME1 GONIOMETER_PHI 185 0.0@\\ +\mbox{}\verb@ FRAME1 DETECTOR_TWO_THETA_VERTICAL 185 0.0@\\ +\mbox{}\verb@ FRAME1 DETECTOR_Z 0.0 103.750@\\ +\mbox{}\verb@ FRAME1 DETECTOR_Y 0.0 0.0@\\ +\mbox{}\verb@ FRAME1 DETECTOR_X 0.0 0.0@\\ +\mbox{}\verb@ FRAME1 DETECTOR_PITCH 0.0 0.0@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@loop_@\\ +\mbox{}\verb@_axis.id@\\ +\mbox{}\verb@_axis.type@\\ +\mbox{}\verb@_axis.equipment@\\ +\mbox{}\verb@_axis.depends_on@\\ +\mbox{}\verb@_axis.vector[1]@\\ +\mbox{}\verb@_axis.vector[2]@\\ +\mbox{}\verb@_axis.vector[3]@\\ +\mbox{}\verb@_axis.offset[1]@\\ +\mbox{}\verb@_axis.offset[2]@\\ +\mbox{}\verb@_axis.offset[3]@\\ +\mbox{}\verb@ GONIOMETER_THETA rotation goniometer . 1 0 0 . . .@\\ +\mbox{}\verb@ GONIOMETER_CHI rotation goniometer GONIOMETER_THETA 0 0 1 . . .@\\ +\mbox{}\verb@ GONIOMETER_PHI rotation goniometer GONIOMETER_PHI 1 0 0 . . .@\\ +\mbox{}\verb@ SOURCE general source . 0 0 1 . . .@\\ +\mbox{}\verb@ GRAVITY general gravity . 0 -1 0 . . .@\\ +\mbox{}\verb@ DETECTOR_TWO_THETA_VERTICAL rotation goniometer . 1 0 0 . . .@\\ +\mbox{}\verb@ DETECTOR_Z translation detector DETECTOR_TWO_THETA_VERTICAL 0 0 -1 0 0 0@\\ +\mbox{}\verb@ DETECTOR_Y translation detector DETECTOR_Z 0 1 0 0 0 0@\\ +\mbox{}\verb@ DETECTOR_X translation detector DETECTOR_Y 1 0 0 0 0 0@\\ +\mbox{}\verb@ DETECTOR_PITCH rotation detector DETECTOR_X 0 1 0 0 0 0@\\ +\mbox{}\verb@ ELEMENT_X translation detector DETECTOR_PITCH 1 0 0 -94.0032 94.0032 0@\\ +\mbox{}\verb@ ELEMENT_Y translation detector ELEMENT_X 0 1 0 0 0 0@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@loop_@\\ +\mbox{}\verb@_array_structure_list.array_id@\\ +\mbox{}\verb@_array_structure_list.index@\\ +\mbox{}\verb@_array_structure_list.dimension@\\ +\mbox{}\verb@_array_structure_list.precedence@\\ +\mbox{}\verb@_array_structure_list.direction@\\ +\mbox{}\verb@_array_structure_list.axis_set_id@\\ +\mbox{}\verb@ ARRAY1 1 2049 1 increasing ELEMENT_X@\\ +\mbox{}\verb@ ARRAY1 2 2049 2 increasing ELEMENT_Y@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@loop_@\\ +\mbox{}\verb@_array_structure_list_axis.axis_set_id@\\ +\mbox{}\verb@_array_structure_list_axis.axis_id@\\ +\mbox{}\verb@_array_structure_list_axis.displacement@\\ +\mbox{}\verb@_array_structure_list_axis.displacement_increment@\\ +\mbox{}\verb@ ELEMENT_X ELEMENT_X 0.0408 0.0816@\\ +\mbox{}\verb@ ELEMENT_Y ELEMENT_Y -0.0408 -0.0816@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@loop_@\\ +\mbox{}\verb@_array_intensities.array_id@\\ +\mbox{}\verb@_array_intensities.binary_id@\\ +\mbox{}\verb@_array_intensities.linearity@\\ +\mbox{}\verb@_array_intensities.gain@\\ +\mbox{}\verb@_array_intensities.gain_esd@\\ +\mbox{}\verb@_array_intensities.overload@\\ +\mbox{}\verb@_array_intensities.undefined_value@\\ +\mbox{}\verb@ ARRAY1 1 linear 0.30 0.03 65000 0@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@loop_@\\ +\mbox{}\verb@_array_structure.id@\\ +\mbox{}\verb@_array_structure.encoding_type@\\ +\mbox{}\verb@_array_structure.compression_type@\\ +\mbox{}\verb@_array_structure.byte_order@\\ +\mbox{}\verb@ ARRAY1 "signed 32-bit integer" packed little_endian@\\ +\mbox{}\verb@@{\NWsep} +\end{list} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} +\end{flushleft} +\end{document} diff --git a/py2cbf/pycbf.toc b/py2cbf/pycbf.toc new file mode 100644 index 00000000..8e06acbc --- /dev/null +++ b/py2cbf/pycbf.toc @@ -0,0 +1,21 @@ +\contentsline {section}{\numberline {1}Introduction}{2}{section.1} +\contentsline {section}{\numberline {2}Installation prerequisites}{3}{section.2} +\contentsline {section}{\numberline {3}Generating the c interface - the SWIG file}{3}{section.3} +\contentsline {subsection}{\numberline {3.1}Exceptions}{5}{subsection.3.1} +\contentsline {subsection}{\numberline {3.2}Exceptions}{10}{subsection.3.2} +\contentsline {section}{\numberline {4}Docstrings}{10}{section.4} +\contentsline {section}{\numberline {5}Wrappers}{10}{section.5} +\contentsline {section}{\numberline {6}Building python extensions - the setup file}{10}{section.6} +\contentsline {section}{\numberline {7}Building and testing the resulting package}{11}{section.7} +\contentsline {section}{\numberline {8}Debugging compiled extensions}{12}{section.8} +\contentsline {section}{\numberline {9}Things which are currently missing}{13}{section.9} +\contentsline {section}{\numberline {10}Testing}{13}{section.10} +\contentsline {subsection}{\numberline {10.1}Read a file based on cif2cbf.c}{13}{subsection.10.1} +\contentsline {subsection}{\numberline {10.2}Try to test the goniometer and detector}{15}{subsection.10.2} +\contentsline {subsection}{\numberline {10.3}Test cases for the generics}{15}{subsection.10.3} +\contentsline {subsection}{\numberline {10.4}Version of pycbf_test1 with write logic added}{17}{subsection.10.4} +\contentsline {subsection}{\numberline {10.5}Processing of XFEL axes}{18}{subsection.10.5} +\contentsline {section}{\numberline {11}Worked example 1 : xmas beamline + mar ccd detector at the ESRF}{18}{section.11} +\contentsline {subsection}{\numberline {11.1}Reading marccd headers}{19}{subsection.11.1} +\contentsline {subsection}{\numberline {11.2}Writing out cif files for fit2d/xmas}{21}{subsection.11.2} +\contentsline {subsection}{\numberline {11.3}A template cif file for the xmas beamline}{23}{subsection.11.3} diff --git a/py2cbf/pycbf.w b/py2cbf/pycbf.w new file mode 100644 index 00000000..ce4b6bdc --- /dev/null +++ b/py2cbf/pycbf.w @@ -0,0 +1,1572 @@ +% pycbf.w +% nuweb source file used to create pycbf documentation +% +% pycbf - python binding to the CBFlib library +% +% Copyright (C) 2005 Jonathan Wright +% ESRF, Grenoble, France +% email: wright@@esrf.fr +% +% Revised for CBFlib 0.9 releases, Herbert J. Bernstein, 23 Aug 2010 +% +%###################################################################### +%# # +%# YOU MAY REDISTRIBUTE THE CBFLIB PACKAGE INCLUDING PYCBF UNDER THE # +%# TERMS OF THE GPL # +%# # +%# ALTERNATIVELY YOU MAY REDISTRIBUTE THE CBFLIB API INCLUDING PYCBF # +%# UNDER THE TERMS OF THE LGPL # +%# # +%###################################################################### +% +%########################### GPL NOTICES ############################## +%# # +%# This program is free software; you can redistribute it and/or # +%# modify it under the terms of the GNU General Public License as # +%# published by the Free Software Foundation; either version 2 of # +%# (the License, or (at your option) any later version. # +%# # +%# This program is distributed in the hope that it will be useful, # +%# but WITHOUT ANY WARRANTY; without even the implied warranty of # +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +%# GNU General Public License for more details. # +%# # +%# You should have received a copy of the GNU General Public License # +%# along with this program; if not, write to the Free Software # +%# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # +%# 02111-1307 USA # +%# # +%###################################################################### +% +%######################### LGPL NOTICES ############################### +%# # +%# This library is free software; you can redistribute it and/or # +%# modify it under the terms of the GNU Lesser General Public # +%# License as published by the Free Software Foundation; either # +%# version 2.1 of the License, or (at your option) any later version. # +%# # +%# This library is distributed in the hope that it will be useful, # +%# but WITHOUT ANY WARRANTY; without even the implied warranty of # +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # +%# Lesser General Public License for more details. # +%# # +%# You should have received a copy of the GNU Lesser General Public # +%# License along with this library; if not, write to the Free # +%# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # +%# MA 02110-1301 USA # +%# # +%###################################################################### +% +% Nuweb formatted latex file +% Most of this is standard latex with code rolled in +% Anything to do with @@ characters is probably specific to nuweb +% +% +% The word FIXME anywhere in this document indicates +% an area where more attention is still needed. +% +% Note that this file (pycbf.w) does not copy and paste from CBFlib +% (or anywhere) except in the hand wrapped function prototypes. +% +% +% + +\documentclass[10pt,a4paper,twoside,notitlepage]{article} + +\usepackage{graphics} % For the pictures +\usepackage{anysize} % Try to circumvent Latex default margins +\usepackage{fancyhdr} +\usepackage[dvipdfm,bookmarks=true,backref,bookmarksnumbered=true, + bookmarkstype=toc]{hyperref} +\newcommand{\var}[1]{\textbf{\textsf{#1}}} % highlight variables in text +\newcommand{\code}[1]{\textbf{\textsf{#1}}} % highlight code in text +\newcommand{\param}[1]{\textbf{\textsf{#1}}} % ... parameters ... +\newcommand{\mb} [1] {\mathbf{#1}} + + +\begin{document} + +\marginsize{1.5cm}{1.5cm}{1.5cm}{1.5cm} % Needs anysize +%\pagestyle{headings} % These are ugly - fix them somehow? + +\pagestyle{fancy} +%$\renewcommand{\chaptermark}[1]{ +%$ \markboth{\chaptername +%$ \ \thechapter.\ #1} {} } + +\renewcommand{\sectionmark}[1]{ + \markright { + \ \thesection.\ #1} {} } + +\fancyhead[LE,RO]{\rightmark} +\fancyhead[LO,RE]{\leftmark} +\fancyfoot[C]{\today} +\fancyfoot[LE,RO]{\thepage} +\fancyfoot[LO,RE]{J. P. Wright} +\renewcommand{\footrulewidth}{0.4pt} + +\pagenumbering{arabic} % Page numbers + + + +\title{\textbf{\textsf{PyCBF}} \\ A python binding to the CBFlib library} +\author{Jon P. Wright \\ Anyone who wishes to contribute, please do!} +\date{Started Dec 12, 2005, already it is \today} + +\maketitle + +\abstract{ +Area detectors at synchrotron facilities can result in huge amounts of data +being generated very rapidly. +The IUCr (International Union of Crystallography) has devised a standard file +format for storing and annotating such data, in order that it might be more +easily interchanged and exploited. +A c library which gives access to this file format has been developed +by Paul Ellis and Herbert Bernstein (Version 0.7.4, +http://www.bernstein-plus-sons.com/software/CBF/). +In this document a python interface is developed using the SWIG + (http://www.swig.org) +package in order to give the author easy access to binary cif files. +} + +\tableofcontents +\markboth{}{} + +\section*{Index of file names} +@f + + +\section*{Index of macro names} +@m + +\section*{Things to do} + +\begin{itemize} +\item Write test code to test each and every function for good and bad args etc +\end{itemize} +\section{Introduction} + +The CBFlib library (version 0.7.4) is written in the C language, offering C + (and C++) +programmers a convenient interface to such files. +The current author uses a different language (python) from day to day and +so a python interface was desired. +After a short attempt to make a quick and dirty SWIG interface it was decided +that in the long run it would be better to write a proper interface for python. + +All of the functions in the library return an integer reflecting error status. +Usually these integers seem to be zero, and a non-zero return value appears +to mean an error occurred. +Actual return values are returned via pointers in argument lists. +In order to simplify the authors life (as a user) all of those integers have +been made to disappear if they are zero, and cause an ``exception'' to +be generated if they are not zero. +This solution might not be the best thing to do, and it can always be changed +where the return value is intended to normally be used. + +Actual return values which were passed back via pointer arguments are now +just passed back as (perhaps multiple) return values. +We must look out for INOUT arguments, none seem to have been found yet, but there +might be exceptions. +The author has a vague suspicion that python functions generally do not modify their +arguments, but this might be wrong. + +The library appears to define (at least) three objects. The one we started on +was the cbf\_handle\_struct defined in cbf.h. +Many of the functions have their first argument as a pointer to one +of these structures. Therefore we make this structure an object and then +everything which uses it as first argument is a member function for that +object. + +In order to pass image data back and forth there is a difficulty that python +seems to lack a good way to represent large arrays. +The standard library offers an "array" object which claims to efficiently +hold homogenous numerical data. +Sadly this seems to be limited to one-dimensional arrays. +The builtin string object can hold binary data and this was chosen as +the way to pass the actual binary back and forth between python and CBFlib. +Unfortunately this means the binary data are pretty useless when they arrive +on the python side, so helper functions are provided to convert the data +to a python (standard library) 1D array and also to a "Numeric" array or a +"Numarray" array. +The latter two are popular extension modules for manipulating large arrays. + +\section{Installation prerequisites} + +The document you are reading was generated from a nuweb source file. This +is something very similar to latex with a few extensions for writing out +source code files. As such it keeps together the whole package in a single file +and makes it easier to write documentation. You will need a to obtain the +preprocessing tool nuweb (perhaps from http://nuweb.sourceforge.net) in +order to build from scratch with the file pycbf.w. Preproccessed output +is hopefully also available to you. +We do not recommend editing the SWIG generated wrappers!! + +Only python version 2.4 has been targetted originally (other versions?) so +that you will probably want to have that version of python installed. + +We are building binary extensions, so you also need a working c compiler. +The compiler used by the author was gcc (for both windows and unix) with +the mingw version under windows. + +Finally, you need a copy of swig (from www.swig.org) in order to (re)generate +the c wrappers. + +In case all that sounds scary, then fear not, it is likely that a single download +for windows will just work with the right version of python. Unix systems +come with many of those things available anyway. + +@i pycbf_i.w + +Despite the temptation to just throw everything from the c header files +into the interface, a short experience suggested we are better off to pull +out only the parts we want and make the calls more pythonic + +The input files "CBFhandlewrappers.i", etc. are created by the make\_pycbf.py +script. + +\subsection{Exceptions} + +We attempt to catch the errors and pass them back to python as +exceptions. This could still do with a little work to propagage +back the calls causing the errors. + +Currently there are two global constants defined, called error\_message +and error\_status. +These are filled out when an error occurred, converting the numerical +error value into something the author can read. + +There is an implicit assumption that if the library is used +correctly you will not normally get exceptions. +This should be addressed further in areas like file opening, +proper python exceptions should be returned. + +See the section on exception handling in pycbf.i, above. + +Currently you get a meaningful string back. Should perhaps look into +defining these as python exception classes? +In any case - the SWIG exception handling is defined via the following. +It could have retained the old style if(status = action) but then +harder to see what to return... + + +\section{Docstrings} + +The file doc/CBFlib.html is converted to a file CBFlib.txt to generate the +docstrings and many of the wrappers. The conversion was done by the +text-based browser, links. + +This text document is then parsed by a python script called make\_pycbf.py +to generate the .i files which are included by the swig wrapper generator. +Unfortunately this more complicated for non-python users but seemed less +error prone and involved less typing for the author. + +@i make_pycbf.w + +\section{Building python extensions - the setup file} + + +Based on the contents of the makefile for CBFlib we will just +pull in all of the library for now. We use the distutils approach. + + + +@o py2setup_py.m4 -i -t +@{ +# +# py2setup_py.m4 +# + +`# Import the things to build python binary extensions + +from distutils.core import setup, Extension + +# Make our extension module + +e = Extension(''`_py2cbf''`, + sources = ["pycbf_wrap.c","../src/cbf_simple.c"], + extra_compile_args=["-g"], + 'm4_ifelse(regexlibdir,`NOREGEXLIBDIR',`library_dirs=["../solib/","../lib/"],',`library_dirs=["../solib/","../lib/","'regexlibdir`"],')` + 'm4_ifelse(regexlib,`',`libraries=["cbf"],', `m4_ifelse(regexlib2,`',`libraries=["cbf","'regexlib`"],',`libraries=["cbf","'regexlib`","'regexlib2`"],')' )` + include_dirs = ["../include","'hdf5_prefix`/include"] ) + +# Build it +setup(name="_py2cbf",ext_modules=[e],)' +@} + + +\section{Building and testing the resulting package} + +Aim to build and test in one go (so that the source and the binary match!!) + +@o win32.bat -i -t +@{ +nuweb pycbf +latex pycbf +nuweb pycbf +latex pycbf +dvipdfm pycbf +nuweb pycbf +C:\python24\python make_pycbf.py > TODO.txt +"C:\program files\swigwin-1.3.31\swig.exe" -python pycbf.i +C:\python24\python setup.py build --compiler=mingw32 +copy build\lib.win32-2.4\_py2cbf.pyd . +REM C:\python24\python pycbf_test1.py +C:\python24\python pycbf_test2.py +C:\python24\python pycbf_test3.py +C:\python24\lib\pydoc.py -w pycbf +C:\python24\python makeflatascii.py pycbf_ascii_help.txt +@} + +@o linux.sh +@{ +nuweb pycbf +latex pycbf +nuweb pycbf +latex pycbf +dvipdfm pycbf +nuweb pycbf +lynx -dump CBFlib.html > CBFlib.txt +python make_pycbf.py +swig -python pycbf.i +python setup.py build +rm _py2cbf.so +cp build/lib.linux-i686-2.4/_py2cbf.so . +python pycbf_test1.py +python pycbf_test2.py +pydoc -w pycbf +python makeflatascii.py pycbf_ascii_help.txt +@} + + + + +This still gives bold in the ascii (=sucks) + +@o makeflatascii.py -i -t +@{ +import pydoc, pycbf, sys +f = open(sys.argv[1],"w") +pydoc.pager=lambda text: f.write(text) +pydoc.TextDoc.bold = lambda self,text : text +pydoc.help(pycbf) +@} + +\section{Debugging compiled extensions} + +Since it can be a bit of a pain to see where things go wrong here is a +quick recipe for poking around with a debugger: + +\begin{verbatim} +amber $> gdb /bliss/users//blissadm/python/bliss_python/suse82/bin/python +GNU gdb 5.3 +Copyright 2002 Free Software Foundation, Inc. +GDB is free software, covered by the GNU General Public License, and you are +welcome to change it and/or distribute copies of it under certain conditions. +Type "show copying" to see the conditions. +There is absolutely no warranty for GDB. Type "show warranty" for details. +This GDB was configured as "i586-suse-linux"... +(gdb) br _PyImport_LoadDynamicModule +Breakpoint 1 at 0x80e4199: file Python/importdl.c, line 28. +\end{verbatim} + +This is how to get a breakpoint when loading the module +\begin{verbatim} +(gdb) run +Starting program: /mntdirect/_bliss/users/blissadm/python/bliss_python/suse82/bin/python +[New Thread 16384 (LWP 18191)] +Python 2.4.2 (#3, Feb 17 2006, 09:12:13) +[GCC 3.3 20030226 (prerelease) (SuSE Linux)] on linux2 +Type "help", "copyright", "credits" or "license" for more information. +>>> import pycbf +[Switching to Thread 16384 (LWP 18191)] + +Breakpoint 1, _PyImport_LoadDynamicModule (name=0xbfffd280 "_py2cbf.so", + pathname=0xbfffd280 "_py2cbf.so", fp=0x819e208) at Python/importdl.c:28 +28 if ((m = _PyImport_FindExtension(name, pathname)) != NULL) { +(gdb) finish +Run till exit from #0 _PyImport_LoadDynamicModule ( + name=0xbfffd280 "_py2cbf.so", pathname=0xbfffd280 "_py2cbf.so", fp=0x819e208) + at Python/importdl.c:28 +load_module (name=0xbfffd710 "_py2cbf", fp=0x819e208, + buf=0xbfffd280 "_py2cbf.so", type=3, loader=0x405b44f4) + at Python/import.c:1678 +1678 break; +Value returned is $1 = (PyObject *) 0x405662fc +(gdb) break cbf_read_file +Breakpoint 2 at 0x407f0508: file ../src/cbf.c, line 221. +(gdb) cont +Continuing. +\end{verbatim} + +We now have a breakpoint where we wanted inside the dynamically loaded file. +\begin{verbatim} +>>> o=pycbf.cbf_handle_struct() +>>> o.read_file("../img2cif_packed.cif",pycbf.MSG_DIGEST) + +Breakpoint 2, cbf_read_file (handle=0x81f7c08, stream=0x8174f58, + headers=136281096) at ../src/cbf.c:221 +221 if (!handle) +(gdb) +\end{verbatim} + +Now you can step through the c... + +\section{Things which are currently missing} + +This is the to do list. Obviously we could benefit a lot from more +extensive testing and checking of the docstrings etc. + +\input "TODO.txt" + +\section{Testing} + +Some test programs to see if anything appears to work. Eventually +it would be good to write a proper unit test suite. + +\subsection{Read a file based on cif2cbf.c} + +This is a pretty ugly translation of the program cif2cbf.c skipping +all of the writing parts. +It appeared to work with the file img2cif\_packed.cif which is built +when you build CBFlib, hence that file is hardwired in. + +@o pycbf_test1.py -i -t +@{ +import pycbf +object = pycbf.cbf_handle_struct() # FIXME +object.read_file("../img2cif_packed.cif",pycbf.MSG_DIGEST) +object.rewind_datablock() +print "Found",object.count_datablocks(),"blocks" +object.select_datablock(0) +print "Zeroth is named",object.datablock_name() +object.rewind_category() +categories = object.count_categories() +for i in range(categories): + print "Category:",i, + object.select_category(i) + category_name = object.category_name() + print "Name:",category_name, + rows=object.count_rows() + print "Rows:",rows, + cols = object.count_columns() + print "Cols:",cols + loop=1 + object.rewind_column() + while loop is not 0: + column_name = object.column_name() + print "column name \"",column_name,"\"", + try: + object.next_column() + except: + break + print + for j in range(rows): + object.select_row(j) + object.rewind_column() + print "row:",j + for k in range(cols): + name=object.column_name() + print "col:",name, + object.select_column(k) + typeofvalue=object.get_typeofvalue() + print "type:",typeofvalue + if typeofvalue.find("bnry") > -1: + print "Found the binary!!", + s=object.get_integerarray_as_string() + print type(s) + print dir(s) + print len(s) + try: + import numpy + d = numpy.frombuffer(s,numpy.uint32) + # Hard wired Unsigned Int32 + print d.shape + print d[0:10],d[d.shape[0]/2],d[-1] + print d[d.shape[0]/3:d.shape[0]/3+20] + d=numpy.reshape(d,(2300,2300)) +# from matplotlib import pylab +# pylab.imshow(d,vmin=0,vmax=1000) +# pylab.show() + except ImportError: + print "You need to get numpy and matplotlib to see the data" + else: + value=object.get_value() + print "Val:",value,i + print +del(object) +# +print dir() +#object.free_handle(handle) +@} + + +\subsection{Try to test the goniometer and detector} + +Had some initial difficulties but then downloaded an input cbf file which defines +a goniometer and detector. +The file was found in the example data which comes with CBFlib. + +This test is clearly minimalistic for now - it only checks the objects +for apparent existence of +a single member function. + +@o pycbf_test2.py -i -t +@{ +import pycbf +obj = pycbf.cbf_handle_struct() +obj.read_file("../adscconverted.cbf",0) +obj.select_datablock(0) +g = obj.construct_goniometer() +print "Rotation axis is",g.get_rotation_axis() +d = obj.construct_detector(0) +print "Beam center is",d.get_beam_center() +print "Detector slow axis is", d.get_detector_axis_slow() +print "Detector fast axis is", d.get_detector_axis_fast() +print "Detector axes (fast, slow) are", d.get_detector_axes_fs() +@} + + +It appears to work - eventually. Surprising + +\subsection{Test cases for the generics} + +@o pycbf_test3.py -i -t +@{ +import pycbf, unittest +class GenericTests(unittest.TestCase): + + def test_get_local_integer_byte_order(self): + self.assertEqual( pycbf.get_local_integer_byte_order(), + 'little_endian') + + def test_get_local_real_byte_order(self): + self.assertEqual( pycbf.get_local_real_byte_order() , + 'little_endian') + + def test_get_local_real_format(self): + self.assertEqual( pycbf.get_local_real_format(), + 'ieee 754-1985') + + def test_compute_cell_volume(self): + self.assertEqual( pycbf.compute_cell_volume((2.,3.,4.,90.,90.,90.)), + 24.0) +if __name__=="__main__": + unittest.main() + +@} + + +\subsection{Version of pycbf_test1 with write logic added} + +@o pycbf_test4.py -i -t +@{ +# version of pycbf_test1 with write logic added +import pycbf +object = pycbf.cbf_handle_struct() +newobject = pycbf.cbf_handle_struct() +object.read_file("../img2cif_packed.cif",pycbf.MSG_DIGEST) +object.rewind_datablock() +print "Found",object.count_datablocks(),"blocks" +object.select_datablock(0) +print "Zeroth is named",object.datablock_name() +newobject.force_new_datablock(object.datablock_name()); +object.rewind_category() +categories = object.count_categories() +for i in range(categories): + print "Category:",i, + object.select_category(i) + category_name = object.category_name() + print "Name:",category_name, + newobject.new_category(category_name) + rows=object.count_rows() + print "Rows:",rows, + cols = object.count_columns() + print "Cols:",cols + loop=1 + object.rewind_column() + while loop is not 0: + column_name = object.column_name() + print "column name \"",column_name,"\"", + newobject.new_column(column_name) + try: + object.next_column() + except: + break + print + for j in range(rows): + object.select_row(j) + newobject.new_row() + object.rewind_column() + print "row:",j + for k in range(cols): + name=object.column_name() + print "col:",name, + object.select_column(k) + newobject.select_column(k) + typeofvalue=object.get_typeofvalue() + print "type:",typeofvalue + if typeofvalue.find("bnry") > -1: + print "Found the binary!!", + s=object.get_integerarray_as_string() + print type(s) + print dir(s) + print len(s) + (compression, binaryid, elsize, elsigned, \ + elunsigned, elements, minelement, maxelement, \ + byteorder,dimfast,dimmid,dimslow,padding) = \ + object.get_integerarrayparameters_wdims_fs() + if dimfast==0: + dimfast = 1 + if dimmid==0: + dimmid = 1 + if dimslow == 0: + dimslow = 1 + print "compression: ",compression + print "binaryid", binaryid + print "elsize", elsize + print "elsigned", elsigned + print "elunsigned",elunsigned + print "elements", elements + print "minelement", minelement + print "maxelement", maxelement + print "byteorder", byteorder + print "dimfast", dimfast + print "dimmid", dimmid + print "dimslow",dimslow + print "padding", padding + newobject.set_integerarray_wdims_fs(\ + pycbf.CBF_BYTE_OFFSET,binaryid,s,elsize,elsigned,\ + elements,byteorder,dimfast,dimmid,dimslow,padding) + try: + import numpy + d = numpy.frombuffer(s,numpy.uint32) + # Hard wired Unsigned Int32 + print d.shape + print d[0:10],d[d.shape[0]/2],d[-1] + print d[d.shape[0]/3:d.shape[0]/3+20] + d=numpy.reshape(d,(2300,2300)) +# from matplotlib import pylab +# pylab.imshow(d,vmin=0,vmax=1000) +# pylab.show() + except ImportError: + print "You need to get numpy and matplotlib to see the data" + else: + value=object.get_value() + newobject.set_value(value) + print "Val:",value,i + print +del(object) +newobject.write_widefile("newtest1.cbf",pycbf.CBF,\ + pycbf.MIME_HEADERS|pycbf.MSG_DIGEST|pycbf.PAD_4K,0) +# +print dir() +#object.free_handle(handle) +@} + + +\subsection{Processing of XFEL axes} + +@o pycbf_testfelaxes.py -i -t +@{ +import pycbf, sys +from decimal import Decimal, ROUND_HALF_UP + +image_file = sys.argv[1] + +cbf = pycbf.cbf_handle_struct() +cbf.read_widefile(image_file, pycbf.MSG_DIGEST) + +for element in range(64): + d = cbf.construct_detector(element) + print "element:", element + + v00 = d.get_pixel_coordinates(0, 0) + v01 = d.get_pixel_coordinates(0, 1) + v10 = d.get_pixel_coordinates(1, 0) + v11 = d.get_pixel_coordinates(1, 1) + prec = Decimal('1.000000000') + + print '(0, 0) v00 [ %.9f %.9f %.9f ]' %(round(v00[0],9), round(v00[1],9), round(v00[2],9)) + print '(0, 1) v01 [ %.9g %.9g %.9g ]' %(round(v01[0],9), round(v01[1],9), round(v01[2],9)) + print '(1, 0) v10 [ %.9g %.9g %.9g ]' %(round(v10[0],9), round(v10[1],9), round(v10[2],9)) + print '(1, 1) v11 [ %.9g %.9g %.9g ]' %(round(v11[0],9), round(v11[1],9), round(v11[2],9)) + + print "surface axes:", d.get_detector_surface_axes(0), d.get_detector_surface_axes(1) + + print d.get_detector_surface_axes(0), "has", cbf.count_axis_ancestors(d.get_detector_surface_axes(0)), "ancestors" + print d.get_detector_surface_axes(1), "has", cbf.count_axis_ancestors(d.get_detector_surface_axes(1)), "ancestors" + + cur_axis = d.get_detector_surface_axes(0) + count = cbf.count_axis_ancestors(cur_axis) + + for index in range(count): + print "axis", cur_axis, "index: ", index + print " equipment", cbf.get_axis_equipment(cur_axis) + print " depends_on", cbf.get_axis_depends_on(cur_axis) + print " equipment_component", cbf.get_axis_equipment_component(cur_axis) + vector = cbf.get_axis_vector(cur_axis) + print " vector [ %.8g %.8g %.8g ]" % (round(vector[0],7), round(vector[1],7), round(vector[2],7)) + offset = cbf.get_axis_offset(cur_axis) + print " offset [ %.8g %.8g %.8g ]" % (round(offset[0],7), round(offset[1],7), round(offset[2],7)) + print " rotation", cbf.get_axis_rotation(cur_axis) + print " rotation_axis", cbf.get_axis_rotation_axis(cur_axis) + cur_axis = cbf.get_axis_depends_on(cur_axis) +@} + +\section{Worked example 1 : xmas beamline + mar ccd detector at the ESRF} + +Now for the interesting part. We will attempt to actually use pycbf for a real +dataprocessing task. Crazy you might think. + +The idea is the following - we want to take the header information from some +mar ccd files (and eventually also the user or the spec control system) and +pass this information into cif headers which can be read by fit2d (etc). + +\subsection{Reading marccd headers} + +Some relatively ugly code which parses a c header and then tries to interpret +the mar ccd header format. + +FIXME : byteswapping and ends??? + +@o xmas/readmarheader.py -i -t +@{#!/usr/bin/env python +import struct + +# Convert mar c header file types to python struct module types +mar_c_to_python_struct = { + "INT32" : "i", + "UINT32" : "I", + "char" : "c", + "UINT16" : "H" + } + +# Sizes (bytes) of mar c header objects +mar_c_sizes = { + "INT32" : 4, + "UINT32" : 4, + "char" : 1, + "UINT16" : 2 + } + +# This was worked out by trial and error from a trial image I think +MAXIMAGES=9 + + + +def make_format(cdefinition): + """ + Reads the header definition in c and makes the format + string to pass to struct.unpack + """ + lines = cdefinition.split("\n") + fmt = "" + names = [] + expected = 0 + for line in lines: + if line.find(";")==-1: + continue + decl = line.split(";")[0].lstrip().rstrip() + try: + [type, name] = decl.split() + except: + #print "skipping:",line + continue + # print "type:",type," name:",name + + if name.find("[")>-1: + # repeated ... times + try: + num = name.split("[")[1].split("]")[0] + num = num.replace("MAXIMAGES",str(MAXIMAGES)) + num = num.replace("sizeof(INT32)","4") + times = eval(num) + except: + print "Please decode",decl + raise + else: + times=1 + try: + fmt += mar_c_to_python_struct[type]*times + names += [name]*times + expected += mar_c_sizes[type]*times + except: + #print "skipping",line + continue + #print "%4d %4d"%(mar_c_sizes[type]*times,expected),name,":",times,line + #print struct.calcsize(fmt),expected + return names, fmt + +def read_mar_header(filename): + """ + Get the header from a binary file + """ + f = open(filename,"rb") + f.seek(1024) + header=f.read(3072) + f.close() + return header + + +def interpret_header(header, fmt, names): + """ + given a format and header interpret it + """ + values = struct.unpack(fmt,header) + dict = {} + i=0 + for name in names: + if dict.has_key(name): + if type(values[i]) == type("string"): + dict[name] = dict[name]+values[i] + else: + try: + dict[name].append(values[i]) + except: + dict[name] = [dict[name],values[i]] + else: + dict[name] = values[i] + i=i+1 + + return dict + + +# Now for the c definition (found on mar webpage) +# The following string is therefore copyrighted by Mar I guess + +cdefinition = """ +typedef struct frame_header_type { + /* File/header format parameters (256 bytes) */ + UINT32 header_type; /* flag for header type + (can be used as magic number) */ + char header_name[16]; /* header name (MMX) */ + UINT32 header_major_version; /* header_major_version (n.) */ + UINT32 header_minor_version; /* header_minor_version (.n) */ + UINT32 header_byte_order;/* BIG_ENDIAN (Motorola,MIPS); + LITTLE_ENDIAN (DEC, Intel) */ + UINT32 data_byte_order; /* BIG_ENDIAN (Motorola,MIPS); + LITTLE_ENDIAN (DEC, Intel) */ + UINT32 header_size; /* in bytes */ + UINT32 frame_type; /* flag for frame type */ + UINT32 magic_number; /* to be used as a flag - + usually to indicate new file */ + UINT32 compression_type; /* type of image compression */ + UINT32 compression1; /* compression parameter 1 */ + UINT32 compression2; /* compression parameter 2 */ + UINT32 compression3; /* compression parameter 3 */ + UINT32 compression4; /* compression parameter 4 */ + UINT32 compression5; /* compression parameter 4 */ + UINT32 compression6; /* compression parameter 4 */ + UINT32 nheaders; /* total number of headers */ + UINT32 nfast; /* number of pixels in one line */ + UINT32 nslow; /* number of lines in image */ + UINT32 depth; /* number of bytes per pixel */ + UINT32 record_length; /* number of pixels between + succesive rows */ + UINT32 signif_bits; /* true depth of data, in bits */ + UINT32 data_type; /* (signed,unsigned,float...) */ + UINT32 saturated_value; /* value marks pixel as saturated */ + UINT32 sequence; /* TRUE or FALSE */ + UINT32 nimages; /* total number of images - size of + each is nfast*(nslow/nimages) */ + UINT32 origin; /* corner of origin */ + UINT32 orientation; /* direction of fast axis */ + UINT32 view_direction; /* direction to view frame */ + UINT32 overflow_location;/* FOLLOWING_HEADER, FOLLOWING_DATA */ + UINT32 over_8_bits; /* # of pixels with counts 255 */ + UINT32 over_16_bits; /* # of pixels with count 65535 */ + UINT32 multiplexed; /* multiplex flag */ + UINT32 nfastimages; /* # of images in fast direction */ + UINT32 nslowimages; /* # of images in slow direction */ + UINT32 background_applied; /* flags correction has been applied - + hold magic number ? */ + UINT32 bias_applied; /* flags correction has been applied - + hold magic number ? */ + UINT32 flatfield_applied; /* flags correction has been applied - + hold magic number ? */ + UINT32 distortion_applied; /* flags correction has been applied - + hold magic number ? */ + UINT32 original_header_type; /* Header/frame type from file + that frame is read from */ + UINT32 file_saved; /* Flag that file has been saved, + should be zeroed if modified */ + char reserve1[(64-40)*sizeof(INT32)-16]; + + /* Data statistics (128) */ + UINT32 total_counts[2]; /* 64 bit integer range = 1.85E19*/ + UINT32 special_counts1[2]; + UINT32 special_counts2[2]; + UINT32 min; + UINT32 max; + UINT32 mean; + UINT32 rms; + UINT32 p10; + UINT32 p90; + UINT32 stats_uptodate; + UINT32 pixel_noise[MAXIMAGES]; /* 1000*base noise value (ADUs) */ + char reserve2[(32-13-MAXIMAGES)*sizeof(INT32)]; + + /* More statistics (256) */ + UINT16 percentile[128]; + + + /* Goniostat parameters (128 bytes) */ + INT32 xtal_to_detector; /* 1000*distance in millimeters */ + INT32 beam_x; /* 1000*x beam position (pixels) */ + INT32 beam_y; /* 1000*y beam position (pixels) */ + INT32 integration_time; /* integration time in milliseconds */ + INT32 exposure_time; /* exposure time in milliseconds */ + INT32 readout_time; /* readout time in milliseconds */ + INT32 nreads; /* number of readouts to get this image */ + INT32 start_twotheta; /* 1000*two_theta angle */ + INT32 start_omega; /* 1000*omega angle */ + INT32 start_chi; /* 1000*chi angle */ + INT32 start_kappa; /* 1000*kappa angle */ + INT32 start_phi; /* 1000*phi angle */ + INT32 start_delta; /* 1000*delta angle */ + INT32 start_gamma; /* 1000*gamma angle */ + INT32 start_xtal_to_detector; /* 1000*distance in mm (dist in um)*/ + INT32 end_twotheta; /* 1000*two_theta angle */ + INT32 end_omega; /* 1000*omega angle */ + INT32 end_chi; /* 1000*chi angle */ + INT32 end_kappa; /* 1000*kappa angle */ + INT32 end_phi; /* 1000*phi angle */ + INT32 end_delta; /* 1000*delta angle */ + INT32 end_gamma; /* 1000*gamma angle */ + INT32 end_xtal_to_detector; /* 1000*distance in mm (dist in um)*/ + INT32 rotation_axis; /* active rotation axis */ + INT32 rotation_range; /* 1000*rotation angle */ + INT32 detector_rotx; /* 1000*rotation of detector around X */ + INT32 detector_roty; /* 1000*rotation of detector around Y */ + INT32 detector_rotz; /* 1000*rotation of detector around Z */ + char reserve3[(32-28)*sizeof(INT32)]; + + /* Detector parameters (128 bytes) */ + INT32 detector_type; /* detector type */ + INT32 pixelsize_x; /* pixel size (nanometers) */ + INT32 pixelsize_y; /* pixel size (nanometers) */ + INT32 mean_bias; /* 1000*mean bias value */ + INT32 photons_per_100adu; /* photons / 100 ADUs */ + INT32 measured_bias[MAXIMAGES]; /* 1000*mean bias value for each image*/ + INT32 measured_temperature[MAXIMAGES]; /* Temperature of each + detector in milliKelvins */ + INT32 measured_pressure[MAXIMAGES]; /* Pressure of each chamber + in microTorr */ + /* Retired reserve4 when MAXIMAGES set to 9 from 16 and + two fields removed, and temp and pressure added + char reserve4[(32-(5+3*MAXIMAGES))*sizeof(INT32)] + */ + + /* X-ray source and optics parameters (128 bytes) */ + /* X-ray source parameters (8*4 bytes) */ + INT32 source_type; /* (code) - target, synch. etc */ + INT32 source_dx; /* Optics param. - (size microns) */ + INT32 source_dy; /* Optics param. - (size microns) */ + INT32 source_wavelength; /* wavelength (femtoMeters) */ + INT32 source_power; /* (Watts) */ + INT32 source_voltage; /* (Volts) */ + INT32 source_current; /* (microAmps) */ + INT32 source_bias; /* (Volts) */ + INT32 source_polarization_x; /* () */ + INT32 source_polarization_y; /* () */ + char reserve_source[4*sizeof(INT32)]; + + /* X-ray optics_parameters (8*4 bytes) */ + INT32 optics_type; /* Optics type (code)*/ + INT32 optics_dx; /* Optics param. - (size microns) */ + INT32 optics_dy; /* Optics param. - (size microns) */ + INT32 optics_wavelength; /* Optics param. - (size microns) */ + INT32 optics_dispersion; /* Optics param. - (*10E6) */ + INT32 optics_crossfire_x; /* Optics param. - (microRadians) */ + INT32 optics_crossfire_y; /* Optics param. - (microRadians) */ + INT32 optics_angle; /* Optics param. - (monoch. + 2theta - microradians) */ + INT32 optics_polarization_x; /* () */ + INT32 optics_polarization_y; /* () */ + char reserve_optics[4*sizeof(INT32)]; + + char reserve5[((32-28)*sizeof(INT32))]; + + /* File parameters (1024 bytes) */ + char filetitle[128]; /* Title */ + char filepath[128]; /* path name for data file */ + char filename[64]; /* name of data file */ + char acquire_timestamp[32]; /* date and time of acquisition */ + char header_timestamp[32]; /* date and time of header update */ + char save_timestamp[32]; /* date and time file saved */ + char file_comments[512]; /* comments, use as desired */ + char reserve6[1024-(128+128+64+(3*32)+512)]; + + /* Dataset parameters (512 bytes) */ + char dataset_comments[512]; /* comments, used as desired */ + /* pad out to 3072 bytes */ + char pad[3072-(256+128+256+(3*128)+1024+512)]; + + } frame_header; +""" + + + +class marheaderreader: + """ + Class to sit and read a series of images (makes format etc only once) + """ + def __init__(self): + """ + Initialise internal stuff + """ + self.names , self.fmt = make_format(cdefinition) + def get_header(self,filename): + """ + Reads a header from file filename + """ + h=read_mar_header(filename) + dict = interpret_header(h,self.fmt,self.names) + # Append ESRF formatted stuff + items = self.readesrfstring(dict["dataset_comments[512]"]) + for pair in items: + dict[pair[0]]=pair[1] + items = self.readesrfstring(dict["file_comments[512]"]) + for pair in items: + dict[pair[0]]=pair[1] + dict["pixelsize_x_mm"]= str(float(dict["pixelsize_x"])/1e6) + dict["pixelsize_y_mm"]= str(float(dict["pixelsize_y"])/1e6) + dict["integration_time_sec"]= str(float(dict["integration_time"])/1e3) + dict["beam_y_mm"]= str(float(dict["pixelsize_y_mm"])* + float(dict["beam_y"])/1000.) + dict["beam_x_mm"]= str(float(dict["pixelsize_x_mm"])* + float(dict["beam_x"])/1000.) + + return dict + + def readesrfstring(self,s): + """ + Interpret the so called "esrf format" header lines + which are in comment sections + """ + s=s.replace("\000","") + items = filter(None, [len(x)>1 and x or None for x in [ + item.split("=") for item in s.split(";")]]) + return items + + +if __name__=="__main__": + """ + Make a little program to process files + """ + import sys + print "Starting" + names,fmt = make_format(cdefinition) + print "Names and format made" + h = read_mar_header(sys.argv[1]) + print "Read header, interpreting" + d = interpret_header(h,fmt,names) + printed = {} + for name in names: + if printed.has_key(name): + continue + print name,":",d[name] + printed[name]=1 + +@} + +\subsection{Writing out cif files for fit2d/xmas} + +A script which is supposed to pick up some header information from the mar images, +some more infomation from the user and the create cif files. + +This relies on a "template" cif file to get it started (avoids me programming everything). + +@o xmas/xmasheaders.py -i -t +@{#!/usr/bin/env python + + +import pycbf + +# Some cbf helper functions - obj would be a cbf_handle_struct object + +def writewavelength(obj,wavelength): + obj.set_wavelength(float(wavelength)) + +def writecellpar(obj,cifname,value): + obj.find_category("cell") + obj.find_column(cifname) + obj.set_value(value) + +def writecell(obj,cell): + """ + call with cell = (a,b,c,alpha,beta,gamma) + """ + obj.find_category("cell") + obj.find_column("length_a") + obj.set_value(str(cell[0])) + obj.find_column("length_b") + obj.set_value(str(cell[1])) + obj.find_column("length_c") + obj.set_value(str(cell[2])) + obj.find_column("angle_alpha") + obj.set_value(str(cell[3])) + obj.find_column("angle_beta") + obj.set_value(str(cell[4])) + obj.find_column("angle_gamma") + obj.set_value(str(cell[5])) + +def writeUB(obj,ub): + """ + call with ub that can be indexed ub[i][j] + """ + obj.find_category("diffrn_orient_matrix") + for i in (1,2,3): + for j in (1,2,3): + obj.find_column("UB[%d][%d]"%(i,j)) + obj.set_value(str(ub[i-1][j-1])) + +def writedistance(obj,distance): + obj.set_axis_setting("DETECTOR_Z",float(distance),0.) + + +def writebeam_x_mm(obj,cen): + obj.set_axis_setting("DETECTOR_X",float(cen),0.) + +def writebeam_y_mm(obj,cen): + obj.set_axis_setting("DETECTOR_Y",float(cen),0.) + +def writeSPECcmd(obj,s): + obj.find_category("diffrn_measurement") + obj.find_column("details") + obj.set_value(s) + +def writeSPECscan(obj,s): + obj.find_category("diffrn_scan") + obj.find_column("id") + obj.set_value("SCAN%s"%(s)) + obj.find_category("diffrn_scan_axis") + obj.find_column("scan_id") + obj.rewind_row() + for i in range(obj.count_rows()): + obj.select_row(i) + obj.set_value("SCAN%s"%(s)) + obj.find_category("diffrn_scan_frame") + obj.find_column("scan_id") + obj.rewind_row() + obj.set_value("SCAN%s"%(s)) + + +def writepixelsize_y_mm(obj,s): + """ + Units are mm for cif + """ + # element number = assume this is first and only detector + element_number = 0 + # axis number = faster or slower... ? Need to check precedence ideally... + obj.find_category("array_structure_list") + obj.find_column("axis_set_id") + obj.find_row("ELEMENT_Y") + obj.find_column("precedence") + axis_number = obj.get_integervalue() + + obj.set_pixel_size(element_number, axis_number, float(s) ) + + obj.find_category("array_structure_list_axis") + obj.find_column("axis_id") + obj.find_row("ELEMENT_Y") + obj.find_column("displacement") + obj.set_doublevalue("%.6g",float(s)/2.0) + obj.find_column("displacement_increment") + obj.set_doublevalue("%.6g",float(s)) + +def writepixelsize_x_mm(obj,s): + # element number = assume this is first and only detector + element_number = 0 + # axis number = faster or slower... ? Need to check precedence ideally... + obj.find_category("array_structure_list") + obj.find_column("axis_set_id") + obj.find_row("ELEMENT_X") + obj.find_column("precedence") + axis_number = obj.get_integervalue() + + obj.set_pixel_size(element_number, axis_number, float(s) ) + + obj.find_category("array_structure_list_axis") + obj.find_column("axis_id") + obj.find_row("ELEMENT_X") + obj.find_column("displacement") + obj.set_doublevalue("%.6g",float(s)/2.0) + obj.find_column("displacement_increment") + obj.set_doublevalue("%.6g",float(s)) + +def writeintegrationtime(obj,s): + obj.find_category("diffrn_scan_frame") + obj.find_column("integration_time") + obj.set_value(str(s).replace("\000","")) + +def writenfast(obj,s): + obj.find_category("array_structure_list") + obj.find_column("index") + obj.find_row("1") + obj.find_column("dimension") + obj.set_value(str(s)) + +def writenslow(obj,s): + obj.find_category("array_structure_list") + obj.find_column("index") + obj.find_row("2") + obj.find_column("dimension") + obj.set_value(str(s)) + + +functiondict = { + "lambda" : writewavelength, + "beam_x_mm" : writebeam_x_mm, + "beam_y_mm" : writebeam_y_mm, + "distance" : writedistance, + "UB" : writeUB, + "cell" : writecell, + "cmd" : writeSPECcmd, + "scan" : writeSPECscan, + "nfast" : writenfast, + "nslow" : writenslow, + "pixelsize_y_mm" : writepixelsize_y_mm, + "pixelsize_x_mm" : writepixelsize_x_mm, + "integration_time_sec" : writeintegrationtime, + "tth" : lambda obj,value : obj.set_axis_setting( + "DETECTOR_TWO_THETA_VERTICAL",float(value),0.), + "chi" : lambda obj,value : obj.set_axis_setting( + "GONIOMETER_CHI",float(value),0.), + "th" : lambda obj,value : obj.set_axis_setting( + "GONIOMETER_THETA",float(value),0.), + "phi" : lambda obj,value : obj.set_axis_setting( + "GONIOMETER_PHI",float(value),0.), + "lc_a" : lambda obj,value : writecellpar(obj,"length_a",value), + "lc_b" : lambda obj,value : writecellpar(obj,"length_b",value), + "lc_c" : lambda obj,value : writecellpar(obj,"length_c",value), + "lc_al" : lambda obj,value : writecellpar(obj,"angle_alpha",value), + "lc_be" : lambda obj,value : writecellpar(obj,"angle_beta",value), + "lc_ga" : lambda obj,value : writecellpar(obj,"angle_gamma",value) + } + +""" + # + # Not implementing these for now + lc_ra + lc_rc 0.4742 + lc_rb 1.16 + energy 13 + cp_phi -180 + alpha 7.3716 + lc_ral 90 + cp_tth -180 + lc_rga 90 + beta 17.572 + omega -2.185 + h 0.21539 + k 0.01957 + l 5.9763 + cp_chi -180 + lc_rbe 90 + cp_th -180 + azimuth 0 +""" + +# Finally a class for creating header files. +# It reads a template and then offers a processfile command +# for running over a file series + +class cifheader: + + def __init__(self,templatefile): + self.cbf=pycbf.cbf_handle_struct() + self.cbf.read_template(templatefile) + from readmarheader import marheaderreader + self.marheaderreader = marheaderreader() + + + def processfile(self,filename, outfile=None, + format="mccd", + **kwds): + outfile=outfile.replace(format,"cif") + + if format == "mccd": + items = self.marheaderreader.get_header(filename) + + if format == "bruker": + pass + if format == "edf": + pass + + self.items=items + + # Take the image header items as default + self.updateitems(items) + + # Allow them to be overridden + self.updateitems(kwds) + + # Write the file + self.writefile(outfile) + + + + def writefile(self,filename): + self.cbf.write_file(filename,pycbf.CIF,pycbf.MIME_HEADERS, + pycbf.ENC_BASE64) + + + def updateitems(self,dict): + names = dict.keys() + for name in names: + value = dict[name] + # use a dictionary of functions + if functiondict.has_key(name): + # print "calling",functiondict[name],value + apply(functiondict[name],(self.cbf,value)) + else: + #print "ignoring",name,value + pass + + +if __name__=="__main__": + import sys + + obj=cifheader("xmas_cif_template.cif") + + ub = [[0.11, 0.12, 0.13] , [0.21, 0.22, 0.23], [0.31, 0.32, 0.33]] + + for filename in sys.argv[1:]: + fileout = filename.split("/")[-1] + obj.processfile(filename, outfile=fileout, UB=ub, distance=123.456) +@} + + +\subsection{A template cif file for the xmas beamline} + +This was sort of copied and modified from an example file. It has NOT been checked. +Hopefully the four circle geometry at least vaguely matches what is at the beamline. + +@o xmas/xmas_cif_template.cif -i -t +@{ +###CBF: VERSION 0.6 +# CBF file written by cbflib v0.6 + + + +data_image_1 + + + +loop_ +_diffrn.id +_diffrn.crystal_id + DS1 DIFFRN_CRYSTAL_ID + +loop_ +_cell.length_a 5.959(1) +_cell.length_b 14.956(1) +_cell.length_c 19.737(3) +_cell.angle_alpha 90 +_cell.angle_beta 90 +_cell.angle_gamma 90 + + +loop_ +_diffrn_orient_matrix.id 'DS1' +_diffrn_orient_matrix.type +; reciprocal axis matrix, multiplies hkl vector to generate + diffractometer xyz vector and diffractometer angles +; +_diffrn_orient_matrix.UB[1][1] 0.11 +_diffrn_orient_matrix.UB[1][2] 0.12 +_diffrn_orient_matrix.UB[1][3] 0.13 +_diffrn_orient_matrix.UB[2][1] 0.21 +_diffrn_orient_matrix.UB[2][2] 0.22 +_diffrn_orient_matrix.UB[2][3] 0.23 +_diffrn_orient_matrix.UB[3][1] 0.31 +_diffrn_orient_matrix.UB[3][2] 0.32 +_diffrn_orient_matrix.UB[3][3] 0.33 + + + + +loop_ +_diffrn_source.diffrn_id +_diffrn_source.source +_diffrn_source.current +_diffrn_source.type + DS1 synchrotron 200.0 'XMAS beamline bm28 ESRF' + +loop_ +_diffrn_radiation.diffrn_id +_diffrn_radiation.wavelength_id +_diffrn_radiation.probe +_diffrn_radiation.monochromator +_diffrn_radiation.polarizn_source_ratio +_diffrn_radiation.polarizn_source_norm +_diffrn_radiation.div_x_source +_diffrn_radiation.div_y_source +_diffrn_radiation.div_x_y_source +_diffrn_radiation.collimation + DS1 WAVELENGTH1 x-ray 'Si 111' 0.8 0.0 0.08 0.01 0.00 '0.20 mm x 0.20 mm' + +loop_ +_diffrn_radiation_wavelength.id +_diffrn_radiation_wavelength.wavelength +_diffrn_radiation_wavelength.wt + WAVELENGTH1 1.73862 1.0 + +loop_ +_diffrn_detector.diffrn_id +_diffrn_detector.id +_diffrn_detector.type +_diffrn_detector.details +_diffrn_detector.number_of_axes + DS1 MAR 'MAR XMAS' 'slow mode' 5 + +loop_ +_diffrn_detector_axis.detector_id +_diffrn_detector_axis.axis_id + MAR DETECTOR_TWO_THETA_VERTICAL + MAR DETECTOR_X + MAR DETECTOR_Y + MAR DETECTOR_Z + MAR DETECTOR_PITCH + +loop_ +_diffrn_detector_element.id +_diffrn_detector_element.detector_id + ELEMENT1 MAR + +loop_ +_diffrn_data_frame.id +_diffrn_data_frame.detector_element_id +_diffrn_data_frame.array_id +_diffrn_data_frame.binary_id + FRAME1 ELEMENT1 ARRAY1 1 + +loop_ +_diffrn_measurement.diffrn_id +_diffrn_measurement.id +_diffrn_measurement.number_of_axes +_diffrn_measurement.method +_diffrn_measurement.details + DS1 GONIOMETER 3 rotation + 'i0=1.000 i1=1.000 i2=1.000 ib=1.000 beamstop=20 mm 0% attenuation' + +loop_ +_diffrn_measurement_axis.measurement_id +_diffrn_measurement_axis.axis_id + GONIOMETER GONIOMETER_PHI + GONIOMETER GONIOMETER_CHI + GONIOMETER GONIOMETER_THETA + + +loop_ +_diffrn_scan.id +_diffrn_scan.frame_id_start +_diffrn_scan.frame_id_end +_diffrn_scan.frames + SCAN1 FRAME1 FRAME1 1 + +loop_ +_diffrn_scan_axis.scan_id +_diffrn_scan_axis.axis_id +_diffrn_scan_axis.angle_start +_diffrn_scan_axis.angle_range +_diffrn_scan_axis.angle_increment +_diffrn_scan_axis.displacement_start +_diffrn_scan_axis.displacement_range +_diffrn_scan_axis.displacement_increment + SCAN1 GONIOMETER_THETA 0.0 0.0 0.0 0.0 0.0 0.0 + SCAN1 GONIOMETER_CHI 0.0 0.0 0.0 0.0 0.0 0.0 + SCAN1 GONIOMETER_PHI 185 1 1 0.0 0.0 0.0 + SCAN1 DETECTOR_TWO_THETA_VERTICAL 0.0 0.0 0.0 0.0 0.0 0.0 + SCAN1 DETECTOR_Z 0.0 0.0 0.0 103.750 0 0 + SCAN1 DETECTOR_Y 0.0 0.0 0.0 0.0 0.0 0.0 + SCAN1 DETECTOR_X 0.0 0.0 0.0 0.0 0.0 0.0 + SCAN1 DETECTOR_PITCH 0.0 0.0 0.0 0.0 0.0 0.0 + +loop_ +_diffrn_scan_frame.frame_id +_diffrn_scan_frame.frame_number +_diffrn_scan_frame.integration_time +_diffrn_scan_frame.scan_id +_diffrn_scan_frame.date + FRAME1 1 360 SCAN1 1997-12-04T10:23:48 + +loop_ +_diffrn_scan_frame_axis.frame_id +_diffrn_scan_frame_axis.axis_id +_diffrn_scan_frame_axis.angle +_diffrn_scan_frame_axis.displacement + FRAME1 GONIOMETER_THETA 0.0 0.0 + FRAME1 GONIOMETER_CHI 0.0 0.0 + FRAME1 GONIOMETER_PHI 185 0.0 + FRAME1 DETECTOR_TWO_THETA_VERTICAL 185 0.0 + FRAME1 DETECTOR_Z 0.0 103.750 + FRAME1 DETECTOR_Y 0.0 0.0 + FRAME1 DETECTOR_X 0.0 0.0 + FRAME1 DETECTOR_PITCH 0.0 0.0 + +loop_ +_axis.id +_axis.type +_axis.equipment +_axis.depends_on +_axis.vector[1] +_axis.vector[2] +_axis.vector[3] +_axis.offset[1] +_axis.offset[2] +_axis.offset[3] + GONIOMETER_THETA rotation goniometer . 1 0 0 . . . + GONIOMETER_CHI rotation goniometer GONIOMETER_THETA 0 0 1 . . . + GONIOMETER_PHI rotation goniometer GONIOMETER_PHI 1 0 0 . . . + SOURCE general source . 0 0 1 . . . + GRAVITY general gravity . 0 -1 0 . . . + DETECTOR_TWO_THETA_VERTICAL rotation goniometer . 1 0 0 . . . + DETECTOR_Z translation detector DETECTOR_TWO_THETA_VERTICAL 0 0 -1 0 0 0 + DETECTOR_Y translation detector DETECTOR_Z 0 1 0 0 0 0 + DETECTOR_X translation detector DETECTOR_Y 1 0 0 0 0 0 + DETECTOR_PITCH rotation detector DETECTOR_X 0 1 0 0 0 0 + ELEMENT_X translation detector DETECTOR_PITCH 1 0 0 -94.0032 94.0032 0 + ELEMENT_Y translation detector ELEMENT_X 0 1 0 0 0 0 + +loop_ +_array_structure_list.array_id +_array_structure_list.index +_array_structure_list.dimension +_array_structure_list.precedence +_array_structure_list.direction +_array_structure_list.axis_set_id + ARRAY1 1 2049 1 increasing ELEMENT_X + ARRAY1 2 2049 2 increasing ELEMENT_Y + +loop_ +_array_structure_list_axis.axis_set_id +_array_structure_list_axis.axis_id +_array_structure_list_axis.displacement +_array_structure_list_axis.displacement_increment + ELEMENT_X ELEMENT_X 0.0408 0.0816 + ELEMENT_Y ELEMENT_Y -0.0408 -0.0816 + +loop_ +_array_intensities.array_id +_array_intensities.binary_id +_array_intensities.linearity +_array_intensities.gain +_array_intensities.gain_esd +_array_intensities.overload +_array_intensities.undefined_value + ARRAY1 1 linear 0.30 0.03 65000 0 + +loop_ +_array_structure.id +_array_structure.encoding_type +_array_structure.compression_type +_array_structure.byte_order + ARRAY1 "signed 32-bit integer" packed little_endian +@} + + + +\end{document} diff --git a/py2cbf/pycbf_0.7.7.zip b/py2cbf/pycbf_0.7.7.zip new file mode 100644 index 00000000..19a0db1c Binary files /dev/null and b/py2cbf/pycbf_0.7.7.zip differ diff --git a/py2cbf/pycbf_ascii_help.txt b/py2cbf/pycbf_ascii_help.txt new file mode 100644 index 00000000..d8a73576 --- /dev/null +++ b/py2cbf/pycbf_ascii_help.txt @@ -0,0 +1,3144 @@ +Help on module pycbf: + +NAME + pycbf - pycbf - python bindings to the CBFlib library + +FILE + d:\wright\cbflib\cbflib_0.7.7\pycbf\pycbf.py + +DESCRIPTION + A library for reading and writing ImageCIF and CBF files + which store area detector images for crystallography. + + This work is a derivative of the CBFlib version 0.7.7 library + by Paul J. Ellis of Stanford Synchrotron Radiation Laboratory + and Herbert J. Bernstein of Bernstein + Sons + See: + http://www.bernstein-plus-sons.com/software/CBF/ + + Licensing is GPL based, see: + http://www.bernstein-plus-sons.com/software/CBF/doc/CBFlib_NOTICES.html + + These bindings were automatically generated by SWIG, and the + input to SWIG was automatically generated by a python script. + We very strongly recommend you do not attempt to edit them + by hand! + + + + Copyright (C) 2007 Jonathan Wright + ESRF, Grenoble, France + email: wright@esrf.fr + +CLASSES + __builtin__.object + cbf_detector_struct + cbf_handle_struct + cbf_positioner_struct + + class cbf_detector_struct(__builtin__.object) + | Proxy of C cbf_detector_struct struct + | + | Methods defined here: + | + | __del__ lambda self + | + | __getattr__ lambda self, name + | + | __init__(self, *args) + | __init__(self) -> cbf_detector_struct + | + | __repr__ = _swig_repr(self) + | + | __setattr__ lambda self, name, value + | + | get_beam_center(*args) + | Returns : double index1,double index2,double center1,double center2 + | *args : + | + | C prototype: int cbf_get_beam_center (cbf_detector detector, double *index1, + | double *index2, double *center1, double *center2); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_beam_center sets *center1 and *center2 to the displacements + | in mm along the detector axes from pixel (0, 0) to the point at which + | the beam intersects the detector and *index1 and *index2 to the + | corresponding indices. cbf_set_beam_center sets the offsets in the + | axis category for the detector element axis with precedence 1 to + | place the beam center at the position given in mm by *center1 and + | *center2 as the displacements in mm along the detector axes from + | pixel (0, 0) to the point at which the beam intersects the detector + | at the indices given *index1 and *index2. + | Any of the destination pointers may be NULL for getting the beam + | center. For setting the beam axis, either the indices of the center + | must not be NULL. + | The indices are non-negative for beam centers within the detector + | surface, but the center for an axis with a negative increment will be + | negative for a beam center within the detector surface. + | ARGUMENTS + | detector Detector handle. index1 Pointer to the destination slow + | index. index2 Pointer to the destination fast index. center1 + | Pointer to the destination displacement along the slow axis. center2 + | Pointer to the destination displacement along the fast axis. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | get_detector_distance(*args) + | Returns : double distance + | *args : + | + | C prototype: int cbf_get_detector_distance (cbf_detector detector, + | double *distance); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_detector_distance sets *distance to the nearest distance from + | the sample position to the detector plane. + | ARGUMENTS + | detector Detector handle. distance Pointer to the destination + | distance. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | get_detector_normal(*args) + | Returns : double normal1,double normal2,double normal3 + | *args : + | + | C prototype: int cbf_get_detector_normal (cbf_detector detector, + | double *normal1, double *normal2, double *normal3); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_detector_normal sets *normal1, *normal2, and *normal3 to the + | 3 components of the of the normal vector to the detector plane. The + | vector is normalized. + | Any of the destination pointers may be NULL. + | ARGUMENTS + | detector Detector handle. normal1 Pointer to the destination x + | component of the normal vector. normal2 Pointer to the destination + | y component of the normal vector. normal3 Pointer to the + | destination z component of the normal vector. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | get_inferred_pixel_size(*args) + | Returns : Float pixel size + | *args : Int axis_number + | + | C prototype: int cbf_get_inferred_pixel_size (cbf_detector detector, + | unsigned int axis_number, double *psize); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_inferred_pixel_size sets *psize to point to the double value + | in millimeters of the pixel size for the axis axis_number value for + | pixel at (index1, index2) on the detector surface. The slow index is + | treated as axis 1 and the fast index is treated as axis 2. + | ARGUMENTS + | detector Detector handle. axis_number The number of the axis. + | area Pointer to the destination pizel size in mm. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | get_pixel_area(*args) + | Returns : double area,double projected_area + | *args : double index1,double index2 + | + | C prototype: int cbf_get_pixel_area (cbf_detector detector, double index1, + | double index2, double *area, double *projected_area); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_pixel_area sets *area to the area of the pixel at (index1, + | index2) on the detector surface and *projected_area to the apparent + | area of the pixel as viewed from the sample position. + | Either of the destination pointers may be NULL. + | ARGUMENTS + | detector Detector handle. index1 Slow index. index2 + | Fast index. area Pointer to the destination + | area in mm2. projected_area Pointer to the destination apparent + | area in mm2. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | get_pixel_coordinates(*args) + | Returns : double coordinate1,double coordinate2,double coordinate3 + | *args : double index1,double index2 + | + | C prototype: int cbf_get_pixel_coordinates (cbf_detector detector, + | double index1, double index2, double *coordinate1, + | double *coordinate2, double *coordinate3); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_pixel_coordinates sets *coordinate1, *coordinate2, and + | *coordinate3 to the vector position of pixel (index1, index2) on the + | detector surface. If index1 and index2 are integers then the + | coordinates correspond to the center of a pixel. + | Any of the destination pointers may be NULL. + | ARGUMENTS + | detector Detector handle. index1 Slow index. index2 + | Fast index. coordinate1 Pointer to the destination x component. + | coordinate2 Pointer to the destination y component. coordinate3 + | Pointer to the destination z component. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | get_pixel_normal(*args) + | Returns : double normal1,double normal2,double normal3 + | *args : double index1,double index2 + | + | C prototype: int cbf_get_pixel_normal (cbf_detector detector, double index1, + | double index2, double *normal1, double *normal2, + | double *normal3); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_detector_normal sets *normal1, *normal2, and *normal3 to the + | 3 components of the of the normal vector to the pixel at (index1, + | index2). The vector is normalized. + | Any of the destination pointers may be NULL. + | ARGUMENTS + | detector Detector handle. index1 Slow index. index2 Fast index. + | normal1 Pointer to the destination x component of the normal + | vector. normal2 Pointer to the destination y component of the + | normal vector. normal3 Pointer to the destination z component of + | the normal vector. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | ---------------------------------------------------------------------- + | Properties defined here: + | + | axes + | = cbf_detector_struct_axes_get(...) + | + | = cbf_detector_struct_axes_set(...) + | + | displacement + | = cbf_detector_struct_displacement_get(...) + | + | = cbf_detector_struct_displacement_set(...) + | + | increment + | = cbf_detector_struct_increment_get(...) + | + | = cbf_detector_struct_increment_set(...) + | + | index + | = cbf_detector_struct_index_get(...) + | + | = cbf_detector_struct_index_set(...) + | + | positioner + | = cbf_detector_struct_positioner_get(...) + | + | = cbf_detector_struct_positioner_set(...) + | + | ---------------------------------------------------------------------- + | Data and other attributes defined here: + | + | __dict__ = + | dictionary for instance variables (if defined) + | + | __swig_destroy__ = + | + | + | __swig_getmethods__ = {'axes': cbf_handle_struct + | + | __repr__ = _swig_repr(self) + | + | __setattr__ lambda self, name, value + | + | category_name(*args) + | Returns : + | *args : string + | + | C prototype: int cbf_category_name (cbf_handle handle, + | const char **categoryname); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_category_name sets *categoryname to point to the name of the + | current category of the current data block. + | The category name will be valid as long as the category exists. + | The name must not be modified by the program in any way. + | ARGUMENTS + | handle CBF handle. categoryname Pointer to the destination + | category name pointer. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | column_name(*args) + | Returns : + | *args : string + | + | C prototype: int cbf_column_name (cbf_handle handle, const char **columnname); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_column_name sets *columnname to point to the name of the current + | column of the current category. + | The column name will be valid as long as the column exists. + | The name must not be modified by the program in any way. + | ARGUMENTS + | handle CBF handle. columnname Pointer to the destination + | column name pointer. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | construct_detector(*args) + | Returns : pycbf detector object + | *args : Integer element_number + | + | C prototype: int cbf_construct_detector (cbf_handle handle, + | cbf_detector *detector, unsigned int element_number); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_construct_detector constructs a detector object for detector + | element number element_number using the description in the CBF object + | handle and initialises the detector handle *detector. + | ARGUMENTS + | handle CBF handle. detector Pointer to the destination detector + | handle. element_number The number of the detector element counting + | from 0 by order of appearance in the "diffrn_data_frame" category. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | construct_goniometer(*args) + | Returns : pycbf goniometer object + | *args : + | + | C prototype: int cbf_construct_goniometer (cbf_handle handle, + | cbf_goniometer *goniometer); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_construct_goniometer constructs a goniometer object using the + | description in the CBF object handle and initialises the goniometer + | handle *goniometer. + | ARGUMENTS + | handle CBF handle. goniometer Pointer to the destination + | goniometer handle. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | count_categories(*args) + | Returns : unsigned + | *args : + | + | C prototype: int cbf_count_categories (cbf_handle handle, + | unsigned int *categories); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_count_categories puts the number of categories in the current + | data block in *categories. + | ARGUMENTS + | handle CBF handle. categories Pointer to the destination + | category count. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | count_columns(*args) + | Returns : Integer + | *args : + | + | C prototype: int cbf_count_columns (cbf_handle handle, unsigned int *columns); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_count_columns puts the number of columns in the current category + | in *columns. + | ARGUMENTS + | handle CBF handle. columns Pointer to the destination column + | count. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | count_datablocks(*args) + | Returns : unsigned + | *args : + | + | C prototype: int cbf_count_datablocks (cbf_handle handle, + | unsigned int *datablocks); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_count_datablocks puts the number of data blocks in *datablocks . + | ARGUMENTS + | handle CBF handle. datablocks Pointer to the destination data + | block count. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | count_elements(*args) + | Returns : Integer + | *args : + | + | C prototype: int cbf_count_elements (cbf_handle handle, + | unsigned int *elements); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_count_elements sets *elements to the number of detector elements. + | ARGUMENTS + | handle CBF handle. elements Pointer to the destination count. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | count_rows(*args) + | Returns : Integer + | *args : + | + | C prototype: int cbf_count_rows (cbf_handle handle, unsigned int *rows); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_count_rows puts the number of rows in the current category in + | *rows . + | ARGUMENTS + | handle CBF handle. rows Pointer to the destination row count. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | datablock_name(*args) + | Returns : + | *args : string + | + | C prototype: int cbf_datablock_name (cbf_handle handle, + | const char **datablockname); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_datablock_name sets *datablockname to point to the name of the + | current data block. + | The data block name will be valid as long as the data block exists + | and has not been renamed. + | The name must not be modified by the program in any way. + | ARGUMENTS + | handle CBF handle. datablockname Pointer to the + | destination data block name pointer. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | delete_row(*args) + | Returns : + | *args : Integer + | + | C prototype: int cbf_delete_row (cbf_handle handle, unsigned int rownumber); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_delete_row deletes a row from the current category. Rows starting + | from rownumber +1 are moved down by 1. If the current row was higher + | than rownumber, or if the current row is the last row, it will also + | move down by 1. + | The row numbers start from 0. + | ARGUMENTS + | handle CBF handle. rownumber The number of the row to delete. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | find_category(*args) + | Returns : string + | *args : + | + | C prototype: int cbf_find_category (cbf_handle handle, + | const char *categoryname); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_find_category makes the category in the current data block with + | name categoryname the current category. + | The comparison is case-insensitive. + | If the category does not exist, the function returns CBF_NOTFOUND. + | The current column and row become undefined. + | ARGUMENTS + | handle CBF handle. categoryname The name of the category to + | find. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | find_category_root(*args) + | Returns : String categoryroot + | *args : String categoryname + | + | C prototype: int cbf_find_category_root (cbf_handle handle, + | const char* categoryname, const char** categoryroot); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_find_category_root sets *categoryroot to the root category of + | which categoryname is an alias. cbf_set_category_root sets + | categoryname_in as an alias of categoryroot in the dictionary + | associated with handle, creating the dictionary if necessary. + | cbf_require_category_root sets *categoryroot to the root category of + | which categoryname is an alias, if there is one, or to the value of + | categoryname, if categoryname is not an alias. + | A returned categoryroot string must not be modified in any way. + | ARGUMENTS + | handle CBF handle. categoryname category name which + | may be an alias. categoryroot pointer to a returned category + | root name. categoryroot_in input category root name. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | find_column(*args) + | Returns : string + | *args : + | + | C prototype: int cbf_find_column (cbf_handle handle, const char *columnname); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_find_column makes the columns in the current category with name + | columnname the current column. + | The comparison is case-insensitive. + | If the column does not exist, the function returns CBF_NOTFOUND. + | The current row is not affected. + | ARGUMENTS + | handle CBF handle. columnname The name of column to find. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | find_datablock(*args) + | Returns : string + | *args : + | + | C prototype: int cbf_find_datablock (cbf_handle handle, + | const char *datablockname); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_find_datablock makes the data block with name datablockname the + | current data block. + | The comparison is case-insensitive. + | If the data block does not exist, the function returns CBF_NOTFOUND. + | The current category becomes undefined. + | ARGUMENTS + | handle CBF handle. datablockname The name of the data + | block to find. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | find_nextrow(*args) + | Returns : string + | *args : + | + | C prototype: int cbf_find_nextrow (cbf_handle handle, const char *value); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_find_nextrow makes the makes the next row in the current column + | with value value the current row. The search starts from the row + | following the last row found with cbf_find_row or cbf_find_nextrow, + | or from the current row if the current row was defined using any + | other function. + | The comparison is case-sensitive. + | If no more matching rows exist, the function returns CBF_NOTFOUND. + | The current column is not affected. + | ARGUMENTS + | handle CBF handle. value the value to search for. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | find_row(*args) + | Returns : string + | *args : + | + | C prototype: int cbf_find_row (cbf_handle handle, const char *value); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_find_row makes the first row in the current column with value + | value the current row. + | The comparison is case-sensitive. + | If a matching row does not exist, the function returns CBF_NOTFOUND. + | The current column is not affected. + | ARGUMENTS + | handle CBF handle. value The value of the row to find. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | find_tag_category(*args) + | Returns : String categoryname_in + | *args : String tagname + | + | C prototype: int cbf_find_tag_category (cbf_handle handle, + | const char* tagname, const char** categoryname); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_find_tag_category sets categoryname to the category associated + | with tagname in the dictionary associated with handle. + | cbf_set_tag_category upddates the dictionary associated with handle + | to indicated that tagname is in category categoryname_in. + | ARGUMENTS + | handle CBF handle. tagname tag name. + | categoryname pointer to a returned category name. + | categoryname_in input category name. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | find_tag_root(*args) + | Returns : String tagroot + | *args : String tagname + | + | C prototype: int cbf_find_tag_root (cbf_handle handle, const char* tagname, + | const char** tagroot); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_find_tag_root sets *tagroot to the root tag of which tagname is + | an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in + | the dictionary associated with handle, creating the dictionary if + | necessary. cbf_require_tag_root sets *tagroot to the root tag of + | which tagname is an alias, if there is one, or to the value of + | tagname, if tagname is not an alias. + | A returned tagroot string must not be modified in any way. + | ARGUMENTS + | handle CBF handle. tagname tag name which may be an alias. + | tagroot pointer to a returned tag root name. tagroot_in input + | tag root name. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | force_new_category(*args) + | Returns : string + | *args : + | + | C prototype: int cbf_force_new_category (cbf_handle handle, + | const char *categoryname); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_force_new_category creates a new category in the current data + | block with name categoryname and makes it the current category. + | Duplicate category names are allowed. + | Even if a category with this name already exists, a new category of + | the same name is created and becomes the current category. The allows + | for the creation of unlooped tag/value lists drawn from the same + | category. + | ARGUMENTS + | handle CBF handle. categoryname The name of the new + | category. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | force_new_datablock(*args) + | Returns : string + | *args : + | + | C prototype: int cbf_force_new_datablock (cbf_handle handle, + | const char *datablockname); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_force_new_datablock creates a new data block with name + | datablockname and makes it the current data block. Duplicate data + | block names are allowed. cbf_force_new_saveframe creates a new savew + | frame with name saveframename and makes it the current save frame. + | Duplicate save frame names are allowed. + | Even if a save frame with this name already exists, a new save frame + | is created and becomes the current save frame. + | ARGUMENTS + | handle CBF handle. datablockname The name of the new data + | block. saveframename The name of the new save frame. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | force_new_saveframe(*args) + | Returns : string + | *args : + | + | C prototype: int cbf_force_new_saveframe (cbf_handle handle, + | const char *saveframename); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_force_new_datablock creates a new data block with name + | datablockname and makes it the current data block. Duplicate data + | block names are allowed. cbf_force_new_saveframe creates a new savew + | frame with name saveframename and makes it the current save frame. + | Duplicate save frame names are allowed. + | Even if a save frame with this name already exists, a new save frame + | is created and becomes the current save frame. + | ARGUMENTS + | handle CBF handle. datablockname The name of the new data + | block. saveframename The name of the new save frame. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | get_3d_image(*args) + | get_3d_image(self, void ?) + | + | get_3d_image_size(*args) + | get_3d_image_size(self, void ?) + | + | get_axis_setting(*args) + | Returns : Float start,Float increment + | *args : String axis_id + | + | C prototype: int cbf_get_axis_setting (cbf_handle handle, + | unsigned int reserved, const char *axis_id, double *start, + | double *increment); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_axis_setting sets *start and *increment to the corresponding + | values of the axis axis_id. + | Either of the destination pointers may be NULL. + | The parameter reserved is presently unused and should be set to 0. + | ARGUMENTS + | handle CBF handle. reserved Unused. Any value other than 0 is + | invalid. axis_id Axis id. start Pointer to the destination + | start value. increment Pointer to the destination increment value. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | get_bin_sizes(*args) + | get_bin_sizes(self, void ?) + | + | get_crystal_id(*args) + | Returns : + | *args : string + | + | C prototype: int cbf_get_crystal_id (cbf_handle handle, + | const char **crystal_id); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_crystal_id sets *crystal_id to point to the ASCII value of + | the "diffrn.crystal_id" entry. + | If the value is not ASCII, the function returns CBF_BINARY. + | The value will be valid as long as the item exists and has not been + | set to a new value. + | The value must not be modified by the program in any way. + | ARGUMENTS + | handle CBF handle. crystal_id Pointer to the destination + | value pointer. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | get_datestamp(*args) + | Returns : int year,int month,int day,int hour,int minute,double second, + | int timezone + | *args : + | + | C prototype: int cbf_get_datestamp (cbf_handle handle, unsigned int reserved, + | int *year, int *month, int *day, int *hour, int *minute, + | double *second, int *timezone); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_datestamp sets *year, *month, *day, *hour, *minute and + | *second to the corresponding values of the collection timestamp. + | *timezone is set to timezone difference from UTC in minutes. The + | parameter < i>reserved is presently unused and should be set to 0. + | Any of the destination pointers may be NULL. + | ARGUMENTS + | handle CBF handle. reserved Unused. Any value other than 0 is + | invalid. year Pointer to the destination timestamp year. month + | Pointer to the destination timestamp month (1-12). day Pointer to + | the destination timestamp day (1-31). hour Pointer to the + | destination timestamp hour (0-23). minute Pointer to the + | destination timestamp minute (0-59). second Pointer to the + | destination timestamp second (0-60.0). timezone Pointer to the + | destination timezone difference from UTC in minutes. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | get_dictionary(*args) + | Returns : CBFHandle dictionary + | *args : + | + | C prototype: int cbf_get_dictionary (cbf_handle handle, + | cbf_handle * dictionary); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_dictionary sets *dictionary to the handle of a CBF which has + | been associated with the CBF handle by cbf_set_dictionary. + | cbf_set_dictionary associates the CBF handle dictionary_in with + | handle as its dictionary. cbf_require_dictionary sets *dictionary to + | the handle of a CBF which has been associated with the CBF handle by + | cbf_set_dictionary or creates a new empty CBF and associates it with + | handle, returning the new handle in *dictionary. + | ARGUMENTS + | handle CBF handle. dictionary Pointer to CBF handle of + | dictionary. dictionary_in CBF handle of dcitionary. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | get_diffrn_id(*args) + | Returns : + | *args : string + | + | C prototype: int cbf_get_diffrn_id (cbf_handle handle, + | const char **diffrn_id); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_diffrn_id sets *diffrn_id to point to the ASCII value of the + | "diffrn.id" entry. cbf_require_diffrn_id also sets *diffrn_id to + | point to the ASCII value of the "diffrn.id" entry, but, if the + | "diffrn.id" entry does not exist, it sets the value in the CBF and + | in*diffrn_id to the character string given by default_id, creating + | the category and column is necessary. + | The diffrn_id will be valid as long as the item exists and has not + | been set to a new value. + | The diffrn_id must not be modified by the program in any way. + | ARGUMENTS + | handle CBF handle. diffrn_id Pointer to the destination + | value pointer. default_id Character string default value. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | get_divergence(*args) + | Returns : Float div_x_source,Float div_y_source,Float div_x_y_source + | *args : + | + | C prototype: int cbf_get_divergence (cbf_handle handle, double *div_x_source, + | double *div_y_source, double *div_x_y_source); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_divergence sets *div_x_source, *div_y_source and + | *div_x_y_source to the corresponding source divergence parameters. + | Any of the destination pointers may be NULL. + | ARGUMENTS + | handle CBF handle. div_x_source Pointer to the + | destination div_x_source. div_y_source Pointer to the destination + | div_y_source. div_x_y_source Pointer to the destination + | div_x_y_source. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | get_doublevalue(*args) + | Returns : double + | *args : + | + | C prototype: int cbf_get_doublevalue (cbf_handle handle, double *number); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_doublevalue sets *number to the value of the ASCII item at + | the current column and row interpreted as a decimal floating-point + | number. cbf_require_doublevalue sets *number to the value of the + | ASCII item at the current column and row interpreted as a decimal + | floating-point number, setting it to defaultvalue if necessary. + | If the value is not ASCII, the function returns CBF_BINARY. + | ARGUMENTS + | handle CBF handle. number Pointer to the destination + | number. defaultvalue default number value. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | get_element_id(*args) + | Returns : String + | *args : Integer element_number + | + | C prototype: int cbf_get_element_id (cbf_handle handle, + | unsigned int element_number, const char **element_id); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_element_id sets *element_id to point to the ASCII value of + | the element_number th "diffrn_data_frame.detector_element_id" + | entry, counting from 0. + | If the detector element does not exist, the function returns + | CBF_NOTFOUND. + | The element_id will be valid as long as the item exists and has not + | been set to a new value. + | The element_id must not be modified by the program in any way. + | ARGUMENTS + | handle CBF handle. element_number The number of the detector + | element counting from 0 by order of appearance in the + | "diffrn_data_frame" category. element_id Pointer to the + | destination. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | get_gain(*args) + | Returns : Float gain,Float gain_esd + | *args : + | + | C prototype: int cbf_get_gain (cbf_handle handle, unsigned int element_number, + | double *gain, double *gain_esd); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_gain sets *gain and *gain_esd to the corresponding gain + | parameters for element number element_number. + | Either of the destination pointers may be NULL. + | ARGUMENTS + | handle CBF handle. element_number The number of the detector + | element counting from 0 by order of appearance in the + | "diffrn_data_frame" category. gain Pointer to the destination + | gain. gain_esd Pointer to the destination gain_esd. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | get_image(*args) + | get_image(self, void ?) + | + | get_image_size(*args) + | Returns : size_t ndim1,size_t ndim2 + | *args : Integer element_number + | + | C prototype: int cbf_get_image_size (cbf_handle handle, unsigned int reserved, + | unsigned int element_number, size_t *ndim1, size_t *ndim2); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_image_size sets *ndim1 and *ndim2 to the slow and fast + | dimensions of the image array for element number element_number. If + | the array is 1-dimensional, *ndim1 will be set to the array size and + | *ndim2 will be set to 1. If the array is 3-dimensional an error code + | will be returned. cbf_get_3d_image_size sets *ndim1, *ndim2 and + | *ndim3 to the slowest, next fastest and fastest dimensions, + | respectively, of the 3D image array for element number + | element_number. If the array is 1-dimensional, *ndim1 will be set to + | the array size and *ndim2 and + | + | get_integerarray_as_string(*args) + | Returns : (Binary)String + | *args : + | + | C prototype: int cbf_get_integerarray (cbf_handle handle, int *binary_id, + | void *array, size_t elsize, int elsigned, size_t elements, + | size_t *elements_read); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_integerarray reads the binary value of the item at the + | current column and row into an integer array. The array consists of + | elements elements of elsize bytes each, starting at array. The + | elements are signed if elsigned is non-0 and unsigned otherwise. + | *binary_id is set to the binary section identifier and *elements_read + | to the number of elements actually read. cbf_get_realarray reads the + | binary value of the item at the current column and row into a real + | array. The array consists of elements elements of elsize bytes each, + | starting at array. *binary_id is set to the binary section identifier + | and *elements_read to the number of elements actually read. + | If any element in the integer binary data cant fit into the + | destination element, the destination is set the nearest possible + | value. + | If the value is not binary, the function returns CBF_ASCII. + | If the requested number of elements cant be read, the function will + | read as many as it can and then return CBF_ENDOFDATA. + | Currently, the destination array must consist of chars, shorts or + | ints (signed or unsigned). If elsize is not equal to sizeof (char), + | sizeof (short) or sizeof (int), for cbf_get_integerarray, or + | sizeof(double) or sizeof(float), for cbf_get_realarray the function + | returns CBF_ARGUMENT. + | An additional restriction in the current version of CBFlib is that + | values too large to fit in an int are not correctly decompressed. As + | an example, if the machine with 32-bit ints is reading an array + | containing a value outside the range 0 .. 2^32-1 (unsigned) or -2^31 + | .. 2^31-1 (signed), the array will not be correctly decompressed. + | This restriction will be removed in a future release. For + | cbf_get_realarray, only IEEE format is supported. No conversion to + | other floating point formats is done at this time. + | ARGUMENTS + | handle CBF handle. binary_id Pointer to the destination integer + | binary identifier. array Pointer to the destination array. elsize + | Size in bytes of each destination array element. elsigned Set to + | non-0 if the destination array elements are signed. elements The + | number of elements to read. elements_read Pointer to the + | destination number of elements actually read. + | RETURN VALUE + | Returns an error code on failure or 0 for success. SEE ALSO + | + | get_integerarrayparameters(*args) + | Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, + | int elements,int minelement,int maxelement + | *args : + | + | C prototype: int cbf_get_integerarrayparameters (cbf_handle handle, + | unsigned int *compression, int *binary_id, size_t *elsize, + | int *elsigned, int *elunsigned, size_t *elements, + | int *minelement, int *maxelement); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_integerarrayparameters sets *compression, *binary_id, + | *elsize, *elsigned, *elunsigned, *elements, *minelement and + | *maxelement to values read from the binary value of the item at the + | current column and row. This provides all the arguments needed for a + | subsequent call to cbf_set_integerarray, if a copy of the array is to + | be made into another CIF or CBF. cbf_get_realarrayparameters sets + | *compression, *binary_id, *elsize, *elements to values read from the + | binary value of the item at the current column and row. This provides + | all the arguments needed for a subsequent call to cbf_set_realarray, + | if a copy of the arry is to be made into another CIF or CBF. + | The variants cbf_get_integerarrayparameters_wdims and + | cbf_get_realarrayparameters_wdims set **byteorder, *dim1, *dim2, + | *dim3, and *padding as well, providing the additional parameters + | needed for a subsequent call to cbf_set_integerarray_wdims or + | cbf_set_realarray_wdims. + | The value returned in *byteorder is a pointer either to the string + | "little_endian" or to the string "big_endian". This should be the + | byte order of the data, not necessarily of the host machine. No + | attempt should be made to modify this string. At this time only + | "little_endian" will be returned. + | The values returned in *dim1, *dim2 and *dim3 are the sizes of the + | fastest changing, second fastest changing and third fastest changing + | dimensions of the array, if specified, or zero, if not specified. + | The value returned in *padding is the size of the post-data padding, + | if any and if specified in the data header. The value is given as a + | count of octets. + | If the value is not binary, the function returns CBF_ASCII. + | ARGUMENTS + | handle CBF handle. compression Compression method used. elsize + | Size in bytes of each array element. binary_id Pointer to the + | destination integer binary identifier. elsigned Pointer to an + | integer. Set to 1 if the elements can be read as signed integers. + | elunsigned Pointer to an integer. Set to 1 if the elements can be + | read as unsigned integers. elements Pointer to the destination + | number of elements. minelement Pointer to the destination smallest + | element. maxelement Pointer to the destination largest element. + | byteorder Pointer to the destination byte order. dim1 Pointer to + | the destination fastest dimension. dim2 Pointer to the destination + | second fastest dimension. dim3 Pointer to the destination third + | fastest dimension. padding Pointer to the destination padding size. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | get_integerarrayparameters_wdims(*args) + | get_integerarrayparameters_wdims(self, void ?) + | + | get_integervalue(*args) + | Returns : int + | *args : + | + | C prototype: int cbf_get_integervalue (cbf_handle handle, int *number); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_integervalue sets *number to the value of the ASCII item at + | the current column and row interpreted as a decimal integer. + | cbf_require_integervalue sets *number to the value of the ASCII item + | at the current column and row interpreted as a decimal integer, + | setting it to defaultvalue if necessary. + | If the value is not ASCII, the function returns CBF_BINARY. + | ARGUMENTS + | handle CBF handle. number pointer to the number. + | defaultvalue default number value. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | get_integration_time(*args) + | Returns : Float time + | *args : + | + | C prototype: int cbf_get_integration_time (cbf_handle handle, + | unsigned int reserved, double *time); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_integration_time sets *time to the integration time in + | seconds. The parameter reserved is presently unused and should be set + | to 0. + | ARGUMENTS + | handle CBF handle. reserved Unused. Any value other than 0 is + | invalid. time Pointer to the destination time. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | get_orientation_matrix(*args) + | Returns : Float matrix_0,Float matrix_1,Float matrix_2,Float matrix_3, + | Float matrix_4,Float matrix_5,Float matrix_6,Float matrix_7, + | Float matrix_8 + | *args : + | + | C prototype: int cbf_get_orientation_matrix (cbf_handle handle, + | double ub_matrix[9]); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_orientation_matrix sets ub_matrix to point to the array of + | orientation matrix entries in the "diffrn" category in the order of + | columns: + | "UB[1][1]" "UB[1][2]" "UB[1][3]" "UB[2][1]" "UB[2][2]" + | "UB[2][3]" "UB[3][1]" "UB[3][2]" "UB[3][3]" + | cbf_set_orientation_matrix sets the values in the "diffrn" category + | to the values pointed to by ub_matrix. + | ARGUMENTS + | handle CBF handle. ubmatric Source or destination array of 9 + | doubles giving the orientation matrix parameters. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | get_overload(*args) + | Returns : Float overload + | *args : Integer element_number + | + | C prototype: int cbf_get_overload (cbf_handle handle, + | unsigned int element_number, double *overload); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_overload sets *overload to the overload value for element + | number element_number. + | ARGUMENTS + | handle CBF handle. element_number The number of the detector + | element counting from 0 by order of appearance in the + | "diffrn_data_frame" category. overload Pointer to the destination + | overload. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | get_pixel_size(*args) + | Returns : Float pixel_size + | *args : Int element_number,Int axis_number + | + | C prototype: int cbf_get_pixel_size (cbf_handle handle, + | unsigned int element_number, unsigned int axis_number, + | double *psize); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_pixel_size sets *psize to point to the double value in + | millimeters of the axis axis_number of the detector element + | element_number. The axis_number is numbered from 1, starting with the + | fastest axis. + | If the pixel size is not given explcitly in the + | "array_element_size" category, the function returns CBF_NOTFOUND. + | ARGUMENTS + | handle CBF handle. element_number The number of the detector + | element counting from 0 by order of appearance in the + | "diffrn_data_frame" category. axis_number The number of the axis, + | fastest first, starting from 1. + | + | get_polarization(*args) + | Returns : float polarizn_source_ratio,float polarizn_source_norm + | *args : + | + | C prototype: int cbf_get_polarization (cbf_handle handle, + | double *polarizn_source_ratio, + | double *polarizn_source_norm); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_polarization sets *polarizn_source_ratio and + | *polarizn_source_norm to the corresponding source polarization + | parameters. + | Either destination pointer may be NULL. + | ARGUMENTS + | handle CBF handle. polarizn_source_ratio Pointer to the + | destination polarizn_source_ratio. polarizn_source_norm Pointer to + | the destination polarizn_source_norm. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | get_real_3d_image(*args) + | get_real_3d_image(self, void ?) + | + | get_real_image(*args) + | get_real_image(self, void ?) + | + | get_realarray(*args) + | get_realarray(self, void ?) + | + | get_realarrayparameters(*args) + | Returns : int compression,int binary_id,int elsize,int elements + | *args : + | + | C prototype: int cbf_get_realarrayparameters (cbf_handle handle, + | unsigned int *compression, int *binary_id, size_t *elsize, + | size_t *elements); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_integerarrayparameters sets *compression, *binary_id, + | *elsize, *elsigned, *elunsigned, *elements, *minelement and + | *maxelement to values read from the binary value of the item at the + | current column and row. This provides all the arguments needed for a + | subsequent call to cbf_set_integerarray, if a copy of the array is to + | be made into another CIF or CBF. cbf_get_realarrayparameters sets + | *compression, *binary_id, *elsize, *elements to values read from the + | binary value of the item at the current column and row. This provides + | all the arguments needed for a subsequent call to cbf_set_realarray, + | if a copy of the arry is to be made into another CIF or CBF. + | The variants cbf_get_integerarrayparameters_wdims and + | cbf_get_realarrayparameters_wdims set **byteorder, *dim1, *dim2, + | *dim3, and *padding as well, providing the additional parameters + | needed for a subsequent call to cbf_set_integerarray_wdims or + | cbf_set_realarray_wdims. + | The value returned in *byteorder is a pointer either to the string + | "little_endian" or to the string "big_endian". This should be the + | byte order of the data, not necessarily of the host machine. No + | attempt should be made to modify this string. At this time only + | "little_endian" will be returned. + | The values returned in *dim1, *dim2 and *dim3 are the sizes of the + | fastest changing, second fastest changing and third fastest changing + | dimensions of the array, if specified, or zero, if not specified. + | The value returned in *padding is the size of the post-data padding, + | if any and if specified in the data header. The value is given as a + | count of octets. + | If the value is not binary, the function returns CBF_ASCII. + | ARGUMENTS + | handle CBF handle. compression Compression method used. elsize + | Size in bytes of each array element. binary_id Pointer to the + | destination integer binary identifier. elsigned Pointer to an + | integer. Set to 1 if the elements can be read as signed integers. + | elunsigned Pointer to an integer. Set to 1 if the elements can be + | read as unsigned integers. elements Pointer to the destination + | number of elements. minelement Pointer to the destination smallest + | element. maxelement Pointer to the destination largest element. + | byteorder Pointer to the destination byte order. dim1 Pointer to + | the destination fastest dimension. dim2 Pointer to the destination + | second fastest dimension. dim3 Pointer to the destination third + | fastest dimension. padding Pointer to the destination padding size. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | get_realarrayparameters_wdims(*args) + | get_realarrayparameters_wdims(self, void ?) + | + | get_reciprocal_cell(*args) + | get_reciprocal_cell(self, void ?) + | + | get_timestamp(*args) + | Returns : Float time,Integer timezone + | *args : + | + | C prototype: int cbf_get_timestamp (cbf_handle handle, unsigned int reserved, + | double *time, int *timezone); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_timestamp sets *time to the collection timestamp in seconds + | since January 1 1970. *timezone is set to timezone difference from + | UTC in minutes. The parameter reserved is presently unused and should + | be set to 0. + | Either of the destination pointers may be NULL. + | ARGUMENTS + | handle CBF handle. reserved Unused. Any value other than 0 is + | invalid. time Pointer to the destination collection timestamp. + | timezone Pointer to the destination timezone difference. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | get_typeofvalue(*args) + | Returns : + | *args : string + | + | C prototype: int cbf_get_typeofvalue (cbf_handle handle, + | const char **typeofvalue); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_value sets *typeofvalue to point an ASCII descriptor of the + | value of the item at the current column and row. The strings that may + | be returned are "null" for a null value indicated by a "." or a + | "?", "bnry" for a binary value, "word" for an unquoted string, + | "dblq" for a double-quoted string, "sglq" for a single-quoted + | string, and "text" for a semicolon-quoted text field. A field for + | which no value has been set sets *typeofvalue to NULL rather than to + | the string "null". + | The typeofvalue must not be modified by the program in any way. + | ARGUMENTS + | handle CBF handle. typeofvalue Pointer to the destination + | type-of-value string pointer. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | get_unit_cell(*args) + | get_unit_cell(self, void ?) + | + | get_value(*args) + | Returns : + | *args : string + | + | C prototype: int cbf_get_value (cbf_handle handle, const char **value); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_value sets *value to point to the ASCII value of the item at + | the current column and row. cbf_set_value sets *value to point to the + | ASCII value of the item at the current column and row, creating the + | data item if necessary and initializing it to a copy of defaultvalue. + | If the value is not ASCII, the function returns CBF_BINARY. + | The value will be valid as long as the item exists and has not been + | set to a new value. + | The value must not be modified by the program in any way. + | ARGUMENTS + | handle CBF handle. value Pointer to the destination value + | pointer. value Default value character string. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | get_wavelength(*args) + | Returns : double + | *args : + | + | C prototype: int cbf_get_wavelength (cbf_handle handle, double *wavelength); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_wavelength sets *wavelength to the current wavelength in + | Angstrom. + | ARGUMENTS + | handle CBF handle. wavelength Pointer to the destination. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | insert_row(*args) + | Returns : + | *args : Integer + | + | C prototype: int cbf_insert_row (cbf_handle handle, unsigned int rownumber); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_insert_row adds a new row to the current category. The new row is + | inserted as row rownumber and existing rows starting from rownumber + | are moved up by 1. The new row becomes the current row. + | If the category has fewer than rownumber rows, the function returns + | CBF_NOTFOUND. + | The row numbers start from 0. + | ARGUMENTS + | handle CBF handle. rownumber The row number of the new row. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | new_category(*args) + | Returns : string + | *args : + | + | C prototype: int cbf_new_category (cbf_handle handle, + | const char *categoryname); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_new_category creates a new category in the current data block + | with name categoryname and makes it the current category. + | If a category with this name already exists, the existing category + | becomes the current category. + | ARGUMENTS + | handle CBF handle. categoryname The name of the new + | category. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | new_column(*args) + | Returns : string + | *args : + | + | C prototype: int cbf_new_column (cbf_handle handle, const char *columnname); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_new_column creates a new column in the current category with name + | columnname and makes it the current column. + | If a column with this name already exists, the existing column + | becomes the current category. + | ARGUMENTS + | handle CBF handle. columnname The name of the new column. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | new_datablock(*args) + | Returns : string + | *args : + | + | C prototype: int cbf_new_datablock (cbf_handle handle, + | const char *datablockname); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_new_datablock creates a new data block with name datablockname + | and makes it the current data block. cbf_new_saveframe creates a new + | save frame with name saveframename within the current data block and + | makes the new save frame the current save frame. + | If a data block or save frame with this name already exists, the + | existing data block or save frame becomes the current data block or + | save frame. + | ARGUMENTS + | handle CBF handle. datablockname The name of the new data + | block. saveframename The name of the new save frame. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | new_row(*args) + | Returns : + | *args : + | + | C prototype: int cbf_new_row (cbf_handle handle); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_new_row adds a new row to the current category and makes it the + | current row. + | ARGUMENTS + | handle CBF handle. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | new_saveframe(*args) + | Returns : string + | *args : + | + | C prototype: int cbf_new_saveframe (cbf_handle handle, + | const char *saveframename); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_new_datablock creates a new data block with name datablockname + | and makes it the current data block. cbf_new_saveframe creates a new + | save frame with name saveframename within the current data block and + | makes the new save frame the current save frame. + | If a data block or save frame with this name already exists, the + | existing data block or save frame becomes the current data block or + | save frame. + | ARGUMENTS + | handle CBF handle. datablockname The name of the new data + | block. saveframename The name of the new save frame. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | next_category(*args) + | Returns : + | *args : + | + | C prototype: int cbf_next_category (cbf_handle handle); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_next_category makes the category following the current category + | in the current data block the current category. + | If there are no more categories, the function returns CBF_NOTFOUND. + | The current column and row become undefined. + | ARGUMENTS + | handle CBF handle. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | next_column(*args) + | Returns : + | *args : + | + | C prototype: int cbf_next_column (cbf_handle handle); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_next_column makes the column following the current column in the + | current category the current column. + | If there are no more columns, the function returns CBF_NOTFOUND. + | The current row is not affected. + | ARGUMENTS + | handle CBF handle. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | next_datablock(*args) + | Returns : + | *args : + | + | C prototype: int cbf_next_datablock (cbf_handle handle); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_next_datablock makes the data block following the current data + | block the current data block. + | If there are no more data blocks, the function returns CBF_NOTFOUND. + | The current category becomes undefined. + | ARGUMENTS + | handle CBF handle. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | next_row(*args) + | Returns : + | *args : + | + | C prototype: int cbf_next_row (cbf_handle handle); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_next_row makes the row following the current row in the current + | category the current row. + | If there are no more rows, the function returns CBF_NOTFOUND. + | The current column is not affected. + | ARGUMENTS + | handle CBF handle. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | read_file(*args) + | Returns : + | *args : String filename,Integer headers + | + | C prototype: int cbf_read_file (cbf_handle handle, FILE *file, int headers); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_read_file reads the CBF or CIF file file into the CBF object + | specified by handle, using the CIF 1.0 convention of 80 character + | lines. cbf_read_widefile reads the CBF or CIF file file into the CBF + | object specified by handle, using the CIF 1.1 convention of 2048 + | character lines. A warning is issued to stderr for ascii lines over + | the limit. No test is performed on binary sections. + | Validation is performed in three ways levels: during the lexical + | scan, during the parse, and, if a dictionary was converted, against + | the value types, value enumerations, categories and parent-child + | relationships specified in the dictionary. + | headers controls the interprestation of binary section headers of + | imgCIF files. + | MSG_DIGEST: Instructs CBFlib to check that the digest of the binary + | section matches any header value. If the digests do not match, the + | call will return CBF_FORMAT. This evaluation and comparison is + | delayed (a "lazy" evaluation) to ensure maximal processing + | efficiency. If an immediately evaluation is required, see + | MSG_DIGESTNOW, below. MSG_DIGESTNOW: Instructs CBFlib to check that + | the digest of the binary section matches any header value. If the + | digests do not match, the call will return CBF_FORMAT. This + | evaluation and comparison is performed during initial parsing of the + | section to ensure timely error reporting at the expense of processing + | efficiency. If a more efficient delayed ("lazy") evaluation is + | required, see MSG_DIGESTNOW, below. MSG_NODIGEST: Do not check the + | digest (default). + | CBFlib defers reading binary sections as long as possible. In the + | current version of CBFlib, this means that: + | 1. The file must be a random-access file opened in binary mode (fopen + | + | read_template(*args) + | Returns : + | *args : String filename + | + | C prototype: int cbf_read_template (cbf_handle handle, FILE *file); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_read_template reads the CBF or CIF file file into the CBF object + | specified by handle and selects the first datablock as the current + | datablock. + | ARGUMENTS + | handle Pointer to a CBF handle. file Pointer to a file + | descriptor. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | read_widefile(*args) + | read_widefile(self, void ?) + | + | remove_category(*args) + | Returns : + | *args : + | + | C prototype: int cbf_remove_category (cbf_handle handle); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_remove_category deletes the current category. + | The current category becomes undefined. + | ARGUMENTS + | handle CBF handle. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | remove_column(*args) + | Returns : + | *args : + | + | C prototype: int cbf_remove_column (cbf_handle handle); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_remove_column deletes the current column. + | The current column becomes undefined. + | ARGUMENTS + | handle CBF handle. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | remove_datablock(*args) + | Returns : + | *args : + | + | C prototype: int cbf_remove_datablock (cbf_handle handle); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_remove_datablock deletes the current data block. + | cbf_remove_saveframe deletes the current save frame. + | The current data block becomes undefined. + | ARGUMENTS + | handle CBF handle. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | remove_row(*args) + | Returns : + | *args : + | + | C prototype: int cbf_remove_row (cbf_handle handle); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_remove_row deletes the current row in the current category. + | If the current row was the last row, it will move down by 1, + | otherwise, it will remain the same. + | ARGUMENTS + | handle CBF handle. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | remove_saveframe(*args) + | Returns : + | *args : + | + | C prototype: int cbf_remove_saveframe (cbf_handle handle); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_remove_datablock deletes the current data block. + | cbf_remove_saveframe deletes the current save frame. + | The current data block becomes undefined. + | ARGUMENTS + | handle CBF handle. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | require_category(*args) + | Returns : string + | *args : + | + | C prototype: int cbf_require_category (cbf_handle handle, + | const char *categoryname); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_rewuire_category makes the category in the current data block + | with name categoryname the current category, if it exists, or creates + | the catagory if it does not exist. + | The comparison is case-insensitive. + | The current column and row become undefined. + | ARGUMENTS + | handle CBF handle. categoryname The name of the category to + | find. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | require_category_root(*args) + | require_category_root(self, char categoryname) -> char + | + | require_column(*args) + | Returns : string + | *args : + | + | C prototype: int cbf_require_column (cbf_handle handle, + | const char *columnname); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_require_column makes the columns in the current category with + | name columnname the current column, if it exists, or creates it if it + | does not. + | The comparison is case-insensitive. + | The current row is not affected. + | ARGUMENTS + | handle CBF handle. columnname The name of column to find. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | require_column_doublevalue(*args) + | Returns : Float defaultvalue + | *args : String columnname,Float Value + | + | C prototype: int cbf_require_column_doublevalue (cbf_handle handle, + | const char *columnname, double *number, + | const double defaultvalue); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_require_column_doublevalue sets *number to the value of the ASCII + | item at the current row for the column given with the name given by + | *columnname, with the value interpreted as a decimal floating-point + | number, or to the number given by defaultvalue if the item cannot be + | found. + | ARGUMENTS + | handle CBF handle. columnname Name of the column containing the + | number. number pointer to the location to receive the + | floating-point value. defaultvalue Value to use if the requested + | column and value cannot be found. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | require_column_integervalue(*args) + | Returns : Int Value + | *args : String Columnvalue,Int default + | + | C prototype: int cbf_require_column_integervalue (cbf_handle handle, + | const char *columnname, int *number, + | const int defaultvalue); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_require_column_doublevalue sets *number to the value of the ASCII + | item at the current row for the column given with the name given by + | *columnname, with the value interpreted as an integer number, or to + | the number given by defaultvalue if the item cannot be found. + | ARGUMENTS + | handle CBF handle. columnname Name of the column containing the + | number. number pointer to the location to receive the integer + | value. defaultvalue Value to use if the requested column and value + | cannot be found. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | require_column_value(*args) + | Returns : String Name + | *args : String columnnanme,String Default + | + | C prototype: int cbf_require_column_value (cbf_handle handle, + | const char *columnname, const char **value, + | const char *defaultvalue); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_require_column_doublevalue sets *value to the ASCII item at the + | current row for the column given with the name given by *columnname, + | or to the string given by defaultvalue if the item cannot be found. + | ARGUMENTS + | handle CBF handle. columnname Name of the column containing the + | number. value pointer to the location to receive the value. + | defaultvalue Value to use if the requested column and value cannot + | be found. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | require_datablock(*args) + | Returns : string + | *args : + | + | C prototype: int cbf_require_datablock (cbf_handle handle, + | const char *datablockname); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_require_datablock makes the data block with name datablockname + | the current data block, if it exists, or creates it if it does not. + | The comparison is case-insensitive. + | The current category becomes undefined. + | ARGUMENTS + | handle CBF handle. datablockname The name of the data + | block to find or create. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | require_doublevalue(*args) + | Returns : Float Number + | *args : Float Default + | + | C prototype: int cbf_require_doublevalue (cbf_handle handle, double *number, + | double defaultvalue); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_doublevalue sets *number to the value of the ASCII item at + | the current column and row interpreted as a decimal floating-point + | number. cbf_require_doublevalue sets *number to the value of the + | ASCII item at the current column and row interpreted as a decimal + | floating-point number, setting it to defaultvalue if necessary. + | If the value is not ASCII, the function returns CBF_BINARY. + | ARGUMENTS + | handle CBF handle. number Pointer to the destination + | number. defaultvalue default number value. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | require_integervalue(*args) + | Returns : Int number + | *args : Int thedefault + | + | C prototype: int cbf_require_integervalue (cbf_handle handle, int *number, + | int defaultvalue); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_integervalue sets *number to the value of the ASCII item at + | the current column and row interpreted as a decimal integer. + | cbf_require_integervalue sets *number to the value of the ASCII item + | at the current column and row interpreted as a decimal integer, + | setting it to defaultvalue if necessary. + | If the value is not ASCII, the function returns CBF_BINARY. + | ARGUMENTS + | handle CBF handle. number pointer to the number. + | defaultvalue default number value. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | require_tag_root(*args) + | Returns : String tagroot + | *args : String tagname + | + | C prototype: int cbf_require_tag_root (cbf_handle handle, const char* tagname, + | const char** tagroot); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_find_tag_root sets *tagroot to the root tag of which tagname is + | an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in + | the dictionary associated with handle, creating the dictionary if + | necessary. cbf_require_tag_root sets *tagroot to the root tag of + | which tagname is an alias, if there is one, or to the value of + | tagname, if tagname is not an alias. + | A returned tagroot string must not be modified in any way. + | ARGUMENTS + | handle CBF handle. tagname tag name which may be an alias. + | tagroot pointer to a returned tag root name. tagroot_in input + | tag root name. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | require_value(*args) + | Returns : String Value + | *args : String defaultvalue + | + | C prototype: int cbf_require_value (cbf_handle handle, const char **value, + | const char *defaultvalue ); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_value sets *value to point to the ASCII value of the item at + | the current column and row. cbf_set_value sets *value to point to the + | ASCII value of the item at the current column and row, creating the + | data item if necessary and initializing it to a copy of defaultvalue. + | If the value is not ASCII, the function returns CBF_BINARY. + | The value will be valid as long as the item exists and has not been + | set to a new value. + | The value must not be modified by the program in any way. + | ARGUMENTS + | handle CBF handle. value Pointer to the destination value + | pointer. value Default value character string. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | reset_category(*args) + | Returns : + | *args : + | + | C prototype: int cbf_reset_category (cbf_handle handle); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_reset_category deletes all columns and rows from current category. + | ARGUMENTS + | handle CBF handle. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | reset_datablock(*args) + | Returns : + | *args : + | + | C prototype: int cbf_reset_datablock (cbf_handle handle); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_reset_datablock deletes all categories from the current data + | block. cbf_reset_saveframe deletes all categories from the current + | save frame. + | ARGUMENTS + | handle CBF handle. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | reset_datablocks(*args) + | Returns : + | *args : + | + | C prototype: int cbf_reset_datablocks (cbf_handle handle); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_reset_datablocks deletes all categories from all data blocks. + | The current data block does not change. + | ARGUMENTS + | handle CBF handle. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | reset_saveframe(*args) + | Returns : + | *args : + | + | C prototype: int cbf_reset_saveframe (cbf_handle handle); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_reset_datablock deletes all categories from the current data + | block. cbf_reset_saveframe deletes all categories from the current + | save frame. + | ARGUMENTS + | handle CBF handle. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | rewind_blockitem(*args) + | Returns : CBF_NODETYPE + | *args : + | + | C prototype: int cbf_rewind_blockitem (cbf_handle handle, + | CBF_NODETYPE * type); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_rewind_category makes the first category in the current data + | block the current category. cbf_rewind_saveframe makes the first + | saveframe in the current data block the current saveframe. + | cbf_rewind_blockitem makes the first blockitem (category or + | saveframe) in the current data block the current blockitem. + | If there are no categories, saveframes or blockitems the function + | returns CBF_NOTFOUND. + | The current column and row become undefined. + | ARGUMENTS + | handle CBF handle. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | rewind_category(*args) + | Returns : + | *args : + | + | C prototype: int cbf_rewind_category (cbf_handle handle); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_rewind_category makes the first category in the current data + | block the current category. cbf_rewind_saveframe makes the first + | saveframe in the current data block the current saveframe. + | cbf_rewind_blockitem makes the first blockitem (category or + | saveframe) in the current data block the current blockitem. + | If there are no categories, saveframes or blockitems the function + | returns CBF_NOTFOUND. + | The current column and row become undefined. + | ARGUMENTS + | handle CBF handle. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | rewind_column(*args) + | Returns : + | *args : + | + | C prototype: int cbf_rewind_column (cbf_handle handle); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_rewind_column makes the first column in the current category the + | current column. + | If there are no columns, the function returns CBF_NOTFOUND. + | The current row is not affected. + | ARGUMENTS + | handle CBF handle. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | rewind_datablock(*args) + | Returns : + | *args : + | + | C prototype: int cbf_rewind_datablock (cbf_handle handle); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_rewind_datablock makes the first data block the current data + | block. + | If there are no data blocks, the function returns CBF_NOTFOUND. + | The current category becomes undefined. + | ARGUMENTS + | handle CBF handle. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | rewind_row(*args) + | Returns : + | *args : + | + | C prototype: int cbf_rewind_row (cbf_handle handle); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_rewind_row makes the first row in the current category the + | current row. + | If there are no rows, the function returns CBF_NOTFOUND. + | The current column is not affected. + | ARGUMENTS + | handle CBF handle. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | rewind_saveframe(*args) + | Returns : + | *args : + | + | C prototype: int cbf_rewind_saveframe (cbf_handle handle); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_rewind_category makes the first category in the current data + | block the current category. cbf_rewind_saveframe makes the first + | saveframe in the current data block the current saveframe. + | cbf_rewind_blockitem makes the first blockitem (category or + | saveframe) in the current data block the current blockitem. + | If there are no categories, saveframes or blockitems the function + | returns CBF_NOTFOUND. + | The current column and row become undefined. + | ARGUMENTS + | handle CBF handle. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | row_number(*args) + | Returns : Integer + | *args : + | + | C prototype: int cbf_row_number (cbf_handle handle, unsigned int *row); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_row_number sets *row to the number of the current row of the + | current category. + | ARGUMENTS + | handle CBF handle. row Pointer to the destination row number. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | select_category(*args) + | Returns : + | *args : Integer + | + | C prototype: int cbf_select_category (cbf_handle handle, + | unsigned int category); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_select_category selects category number category in the current + | data block as the current category. + | The first category is number 0. + | The current column and row become undefined. + | If the category does not exist, the function returns CBF_NOTFOUND. + | ARGUMENTS + | handle CBF handle. category Number of the category to select. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | select_column(*args) + | Returns : + | *args : Integer + | + | C prototype: int cbf_select_column (cbf_handle handle, unsigned int column); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_select_column selects column number column in the current + | category as the current column. + | The first column is number 0. + | The current row is not affected + | If the column does not exist, the function returns CBF_NOTFOUND. + | ARGUMENTS + | handle CBF handle. column Number of the column to select. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | select_datablock(*args) + | Returns : + | *args : Integer + | + | C prototype: int cbf_select_datablock (cbf_handle handle, + | unsigned int datablock); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_select_datablock selects data block number datablock as the + | current data block. + | The first data block is number 0. + | If the data block does not exist, the function returns CBF_NOTFOUND. + | ARGUMENTS + | handle CBF handle. datablock Number of the data block to + | select. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | select_row(*args) + | Returns : + | *args : Integer + | + | C prototype: int cbf_select_row (cbf_handle handle, unsigned int row); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_select_row selects row number row in the current category as the + | current row. + | The first row is number 0. + | The current column is not affected + | If the row does not exist, the function returns CBF_NOTFOUND. + | ARGUMENTS + | handle CBF handle. row Number of the row to select. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | set_3d_image(*args) + | set_3d_image(self, void ?) + | + | set_axis_setting(*args) + | Returns : + | *args : String axis_id,Float start,Float increment + | + | C prototype: int cbf_set_axis_setting (cbf_handle handle, + | unsigned int reserved, const char *axis_id, double start, + | double increment); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_set_axis_setting sets the starting and increment values of the + | axis axis_id to start and increment. + | The parameter reserved is presently unused and should be set to 0. + | ARGUMENTS + | handle CBF handle. reserved Unused. Any value other than 0 is + | invalid. axis_id Axis id. start Start value. increment + | Increment value. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | set_bin_sizes(*args) + | set_bin_sizes(self, void ?) + | + | set_category_root(*args) + | Returns : + | *args : String categoryname,String categoryroot + | + | C prototype: int cbf_set_category_root (cbf_handle handle, + | const char* categoryname_in, const char*categoryroot); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_find_category_root sets *categoryroot to the root category of + | which categoryname is an alias. cbf_set_category_root sets + | categoryname_in as an alias of categoryroot in the dictionary + | associated with handle, creating the dictionary if necessary. + | cbf_require_category_root sets *categoryroot to the root category of + | which categoryname is an alias, if there is one, or to the value of + | categoryname, if categoryname is not an alias. + | A returned categoryroot string must not be modified in any way. + | ARGUMENTS + | handle CBF handle. categoryname category name which + | may be an alias. categoryroot pointer to a returned category + | root name. categoryroot_in input category root name. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | set_crystal_id(*args) + | Returns : string + | *args : + | + | C prototype: int cbf_set_crystal_id (cbf_handle handle, + | const char *crystal_id); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_set_crystal_id sets the "diffrn.crystal_id" entry to the ASCII + | value crystal_id. + | ARGUMENTS + | handle CBF handle. crystal_id ASCII value. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | set_datablockname(*args) + | Returns : string + | *args : + | + | C prototype: int cbf_set_datablockname (cbf_handle handle, + | const char *datablockname); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_set_datablockname changes the name of the current data block to + | datablockname. cbf_set_saveframename changes the name of the current + | save frame to saveframename. + | If a data block or save frame with this name already exists + | (comparison is case-insensitive), the function returns CBF_IDENTICAL. + | ARGUMENTS + | handle CBF handle. datablockname The new data block name. + | datablockname The new save frame name. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | set_datestamp(*args) + | Returns : + | *args : int year,int month,int day,int hour,int minute,double second, + | int timezone,Float precision + | + | C prototype: int cbf_set_datestamp (cbf_handle handle, unsigned int reserved, + | int year, int month, int day, int hour, int minute, + | double second, int timezone, double precision); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_set_datestamp sets the collection timestamp in seconds since + | January 1 1970 to the value specified by time. The timezone + | difference from UTC in minutes is set to timezone. If no timezone is + | desired, timezone should be CBF_NOTIM EZONE. The parameter reserved + | is presently unused and should be set to 0. + | The precision of the new timestamp is specified by the value + | precision in seconds. If precision is 0, the saved timestamp is + | assumed accurate to 1 second. + | ARGUMENTS + | handle CBF handle. reserved Unused. Any value other than 0 is + | invalid. time Timestamp in seconds since January 1 1970. + | timezone Timezone difference from UTC in minutes or CBF_NOTIMEZONE. + | precision Timestamp precision in seconds. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | set_dictionary(*args) + | Returns : + | *args : CBFHandle dictionary + | + | C prototype: int cbf_set_dictionary (cbf_handle handle, + | cbf_handle dictionary_in); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_dictionary sets *dictionary to the handle of a CBF which has + | been associated with the CBF handle by cbf_set_dictionary. + | cbf_set_dictionary associates the CBF handle dictionary_in with + | handle as its dictionary. cbf_require_dictionary sets *dictionary to + | the handle of a CBF which has been associated with the CBF handle by + | cbf_set_dictionary or creates a new empty CBF and associates it with + | handle, returning the new handle in *dictionary. + | ARGUMENTS + | handle CBF handle. dictionary Pointer to CBF handle of + | dictionary. dictionary_in CBF handle of dcitionary. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | set_diffrn_id(*args) + | Returns : string + | *args : + | + | C prototype: int cbf_set_diffrn_id (cbf_handle handle, const char *diffrn_id); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_set_diffrn_id sets the "diffrn.id" entry of the current + | datablock to the ASCII value diffrn_id. + | This function also changes corresponding "diffrn_id" entries in the + | "diffrn_source", "diffrn_radiation", "diffrn_detector" and + | "diffrn_measurement" categories. + | ARGUMENTS + | handle CBF handle. diffrn_id ASCII value. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | set_divergence(*args) + | Returns : + | *args : Float div_x_source,Float div_y_source,Float div_x_y_source + | + | C prototype: int cbf_set_divergence (cbf_handle handle, double div_x_source, + | double div_y_source, double div_x_y_source); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_set_divergence sets the source divergence parameters to the + | values specified by div_x_source, div_y_source and div_x_y_source. + | ARGUMENTS + | handle CBF handle. div_x_source New value of + | div_x_source. div_y_source New value of div_y_source. + | div_x_y_source New value of div_x_y_source. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | set_doublevalue(*args) + | Returns : + | *args : String format,Float number + | + | C prototype: int cbf_set_doublevalue (cbf_handle handle, const char *format, + | double number); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_set_doublevalue sets the item at the current column and row to + | the floating-point value number written as an ASCII string with the + | format specified by format as appropriate for the printf function. + | ARGUMENTS + | handle CBF handle. format Format for the number. number + | Floating-point value. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | set_gain(*args) + | Returns : + | *args : Float gain,Float gain_esd + | + | C prototype: int cbf_set_gain (cbf_handle handle, unsigned int element_number, + | double gain, double gain_esd); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_set_gain sets the gain of element number element_number to the + | values specified by gain and gain_esd. + | ARGUMENTS + | handle CBF handle. element_number The number of the detector + | element counting from 0 by order of appearance in the + | "diffrn_data_frame" category. gain New gain value. gain_esd New + | gain_esd value. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | set_image(*args) + | set_image(self, void ?) + | + | set_integerarray(*args) + | Returns : + | *args : int compression,int binary_id,(binary) String data,int elsize, + | int elsigned,int elements + | + | C prototype: int cbf_set_integerarray (cbf_handle handle, + | unsigned int compression, int binary_id, void *array, + | size_t elsize, int elsigned, size_t elements); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_set_integerarray sets the binary value of the item at the current + | column and row to an integer array. The array consists of elements + | elements of elsize bytes each, starting at array. The elements are + | signed if elsigned is non-0 and unsigned otherwise. binary_id is the + | binary section identifier. cbf_set_realarray sets the binary value of + | the item at the current column and row to an integer array. The array + | consists of elements elements of elsize bytes each, starting at + | array. binary_id is the binary section identifier. + | The cbf_set_integerarray_wdims and cbf_set_realarray_wdims allow the + | data header values of byteorder, dim1, dim2, dim3 and padding to be + | set to the data byte order, the fastest, second fastest and third + | fastest array dimensions and the size in byte of the post data + | padding to be used. + | The array will be compressed using the compression scheme specifed by + | compression. Currently, the available schemes are: + | CBF_CANONICAL Canonical-code compression (section 3.3.1) CBF_PACKED + | CCP4-style packing (section 3.3.2) CBF_PACKED_V2 CCP4-style + | packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET Simple + | "byte_offset" compression. CBF_NONE No compression. NOTE: This + | scheme is by far the slowest of the four and uses much more disk + | space. It is intended for routine use with small arrays only. With + | large arrays (like images) it should be used only for debugging. + | The values compressed are limited to 64 bits. If any element in the + | array is larger than 64 bits, the value compressed is the nearest + | 64-bit value. + | + | set_integerarray_wdims(*args) + | set_integerarray_wdims(self, void ?) + | + | set_integervalue(*args) + | Returns : int number + | *args : + | + | C prototype: int cbf_set_integervalue (cbf_handle handle, int number); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_set_integervalue sets the item at the current column and row to + | the integer value number written as a decimal ASCII string. + | ARGUMENTS + | handle CBF handle. number Integer value. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | set_integration_time(*args) + | Returns : + | *args : Float time + | + | C prototype: int cbf_set_integration_time (cbf_handle handle, + | unsigned int reserved, double time); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_set_integration_time sets the integration time in seconds to the + | value specified by time. The parameter reserved is presently unused + | and should be set to 0. + | ARGUMENTS + | handle CBF handle. reserved Unused. Any value + | other than 0 is invalid. time Integration time in seconds. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | set_orientation_matrix(*args) + | Returns : + | *args : Float matrix_0,Float matrix_1,Float matrix_2,Float matrix_3, + | Float matrix_4,Float matrix_5,Float matrix_6,Float matrix_7, + | Float matrix_8 + | + | C prototype: int cbf_set_orientation_matrix (cbf_handle handle, + | double ub_matrix[9]); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_orientation_matrix sets ub_matrix to point to the array of + | orientation matrix entries in the "diffrn" category in the order of + | columns: + | "UB[1][1]" "UB[1][2]" "UB[1][3]" "UB[2][1]" "UB[2][2]" + | "UB[2][3]" "UB[3][1]" "UB[3][2]" "UB[3][3]" + | cbf_set_orientation_matrix sets the values in the "diffrn" category + | to the values pointed to by ub_matrix. + | ARGUMENTS + | handle CBF handle. ubmatric Source or destination array of 9 + | doubles giving the orientation matrix parameters. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | set_overload(*args) + | Returns : + | *args : Integer element_number,Float overload + | + | C prototype: int cbf_set_overload (cbf_handle handle, + | unsigned int element_number, double overload); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_set_overload sets the overload value of element number + | element_number to overload. + | ARGUMENTS + | handle CBF handle. element_number The number of the detector + | element counting from 0 by order of appearance in the + | "diffrn_data_frame" category. overload New overload value. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | set_pixel_size(*args) + | Returns : + | *args : Int element_number,Int axis_number,Float pixel size + | + | C prototype: int cbf_set_pixel_size (cbf_handle handle, + | unsigned int element_number, unsigned int axis_number, + | double psize); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_set_pixel_size sets the item in the "e;size"e; column of + | the "array_structure_list" category at the row which matches axis + | axis_number of the detector element element_number converting the + | double pixel size psize from meters to millimeters in storing it in + | the "size" column for the axis axis_number of the detector element + | element_number. The axis_number is numbered from 1, starting with the + | fastest axis. + | If the "array_structure_list" category does not already exist, it + | is created. + | If the appropriate row in the "array_structure_list" catgeory does + | not already exist, it is created. + | If the pixel size is not given explcitly in the "array_element_size + | category", the function returns CBF_NOTFOUND. + | ARGUMENTS + | handle CBF handle. element_number The number of the detector + | element counting from 0 by order of appearance in the + | "diffrn_data_frame" category. axis_number The number of the axis, + | fastest first, starting from 1. + | + | set_polarization(*args) + | Returns : + | *args : Float polarizn_source_ratio,Float polarizn_source_norm + | + | C prototype: int cbf_set_polarization (cbf_handle handle, + | double polarizn_source_ratio, double polarizn_source_norm); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_set_polarization sets the source polarization to the values + | specified by polarizn_source_ratio and polarizn_source_norm. + | ARGUMENTS + | handle CBF handle. polarizn_source_ratio New value + | of polarizn_source_ratio. polarizn_source_norm New value of + | polarizn_source_norm. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | set_real_3d_image(*args) + | set_real_3d_image(self, void ?) + | + | set_real_image(*args) + | set_real_image(self, void ?) + | + | set_realarray(*args) + | set_realarray(self, void ?) + | + | set_realarray_wdims(*args) + | set_realarray_wdims(self, void ?) + | + | set_reciprocal_cell(*args) + | set_reciprocal_cell(self, void ?) + | + | set_tag_category(*args) + | Returns : + | *args : String tagname,String categoryname_in + | + | C prototype: int cbf_set_tag_category (cbf_handle handle, const char* tagname, + | const char* categoryname_in); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_find_tag_category sets categoryname to the category associated + | with tagname in the dictionary associated with handle. + | cbf_set_tag_category upddates the dictionary associated with handle + | to indicated that tagname is in category categoryname_in. + | ARGUMENTS + | handle CBF handle. tagname tag name. + | categoryname pointer to a returned category name. + | categoryname_in input category name. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | set_tag_root(*args) + | Returns : + | *args : String tagname,String tagroot_in + | + | C prototype: int cbf_set_tag_root (cbf_handle handle, const char* tagname, + | const char*tagroot_in); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_find_tag_root sets *tagroot to the root tag of which tagname is + | an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in + | the dictionary associated with handle, creating the dictionary if + | necessary. cbf_require_tag_root sets *tagroot to the root tag of + | which tagname is an alias, if there is one, or to the value of + | tagname, if tagname is not an alias. + | A returned tagroot string must not be modified in any way. + | ARGUMENTS + | handle CBF handle. tagname tag name which may be an alias. + | tagroot pointer to a returned tag root name. tagroot_in input + | tag root name. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | set_timestamp(*args) + | Returns : + | *args : Float time,Integer timezone,Float precision + | + | C prototype: int cbf_set_timestamp (cbf_handle handle, unsigned int reserved, + | double time, int timezone, double precision); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_set_timestamp sets the collection timestamp in seconds since + | January 1 1970 to the value specified by time. The timezone + | difference from UTC in minutes is set to timezone. If no timezone is + | desired, timezone should be CBF_NOTIM EZONE. The parameter reserved + | is presently unused and should be set to 0. + | The precision of the new timestamp is specified by the value + | precision in seconds. If precision is 0, the saved timestamp is + | assumed accurate to 1 second. + | ARGUMENTS + | handle CBF handle. reserved Unused. Any value other than 0 is + | invalid. time Timestamp in seconds since January 1 1970. timezone + | Timezone difference from UTC in minutes or CBF_NOTIMEZONE. precision + | Timestamp precision in seconds. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | set_typeofvalue(*args) + | Returns : string + | *args : + | + | C prototype: int cbf_set_typeofvalue (cbf_handle handle, + | const char *typeofvalue); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_set_typeofvalue sets the type of the item at the current column + | and row to the type specified by the ASCII character string given by + | typeofvalue. The strings that may be used are "null" for a null + | value indicated by a "." or a "?", "word" for an unquoted + | string, "dblq" for a double-quoted string, "sglq" for a + | single-quoted string, and "text" for a semicolon-quoted text field. + | Not all types may be used for all values. No changes may be made to + | the type of binary values. You may not set the type of a string that + | contains a single quote followed by a blank or a tab or which + | contains multiple lines to "sglq". You may not set the type of a + | string that contains a double quote followed by a blank or a tab or + | which contains multiple lines to "dblq". + | ARGUMENTS + | handle CBF handle. typeofvalue ASCII string for desired type + | of value. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | set_unit_cell(*args) + | set_unit_cell(self, void ?) + | + | set_value(*args) + | Returns : string + | *args : + | + | C prototype: int cbf_set_value (cbf_handle handle, const char *value); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_set_value sets the item at the current column and row to the + | ASCII value value. + | ARGUMENTS + | handle CBF handle. value ASCII value. defaultvalue + | default ASCII value. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | set_wavelength(*args) + | Returns : double wavelength + | *args : + | + | C prototype: int cbf_set_wavelength (cbf_handle handle, double wavelength); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_set_wavelength sets the current wavelength in Angstrom to + | wavelength. + | ARGUMENTS + | handle CBF handle. wavelength Wavelength in Angstrom. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | write_file(*args) + | Returns : + | *args : String filename,Integer ciforcbf,Integer Headers,Integer encoding + | + | C prototype: int cbf_write_file (cbf_handle handle, FILE *file, int readable, + | int ciforcbf, int headers, int encoding); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_write_file writes the CBF object specified by handle into the + | file file, following CIF 1.0 conventions of 80 character lines. + | cbf_write_widefile writes the CBF object specified by handle into the + | file file, following CIF 1.1 conventions of 2048 character lines. A + | warning is issued to stderr for ascii lines over the limit, and an + | attempt is made to fold lines to fit. No test is performed on binary + | sections. + | If a dictionary has been provided, aliases will be applied on output. + | Unlike cbf_read_file, the file does not have to be random-access. + | If the file is random-access and readable, readable can be set to + | non-0 to indicate to CBFlib that the file can be used as a buffer to + | conserve disk space. If the file is not random-access or not + | readable, readable must be 0. + | If readable is non-0, CBFlib will close the file when it is no longer + | required, otherwise this is the responsibility of the program. + | ciforcbf selects the format in which the binary sections are written: + | CIF Write an imgCIF file. CBF Write a CBF file (default). + | headers selects the type of header used in CBF binary sections and + | selects whether message digests are generated. The value of headers + | can be a logical OR of any of: + | MIME_HEADERS Use MIME-type headers (default). MIME_NOHEADERS + | Use a simple ASCII headers. MSG_DIGEST Generate message digests + | for binary data validation. MSG_NODIGEST Do not generate message + | digests (default). + | encoding selects the type of encoding used for binary sections and + | the type of line-termination in imgCIF files. The value can be a + | logical OR of any of: + | ENC_BASE64 Use BASE64 encoding (default). ENC_QP Use + | QUOTED-PRINTABLE encoding. ENC_BASE8 Use BASE8 (octal) encoding. + | ENC_BASE10 Use BASE10 (decimal) encoding. ENC_BASE16 Use BASE16 + | (hexadecimal) encoding. ENC_FORWARD For BASE8, BASE10 or BASE16 + | encoding, map bytes to words forward (1234) (default on little-endian + | machines). ENC_BACKWARD Map bytes to words backward (4321) (default + | on big-endian machines). ENC_CRTERM Terminate lines with CR. + | ENC_LFTERM Terminate lines with LF (default). + | ARGUMENTS + | handle CBF handle. file Pointer to a file descriptor. readable + | If non-0: this file is random-access and readable and can be used as + | a buffer. ciforcbf Selects the format in which the binary sections + | are written (CIF/CBF). headers Selects the type of header in CBF + | binary sections and message digest generation. encoding Selects the + | type of encoding used for binary sections and the type of + | line-termination in imgCIF files. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | SEE ALSO + | + | write_widefile(*args) + | write_widefile(self, void ?) + | + | ---------------------------------------------------------------------- + | Properties defined here: + | + | node + | = cbf_handle_struct_node_get(...) + | + | = cbf_handle_struct_node_set(...) + | + | row + | = cbf_handle_struct_row_get(...) + | + | = cbf_handle_struct_row_set(...) + | + | search_row + | = cbf_handle_struct_search_row_get(...) + | + | = cbf_handle_struct_search_row_set(...) + | + | ---------------------------------------------------------------------- + | Data and other attributes defined here: + | + | __dict__ = + | dictionary for instance variables (if defined) + | + | __swig_destroy__ = + | + | + | __swig_getmethods__ = {'node': + | list of weak references to the object (if defined) + + class cbf_positioner_struct(__builtin__.object) + | Methods defined here: + | + | __del__ lambda self + | + | __getattr__ lambda self, name + | + | __init__(self, *args) + | __init__(self) -> cbf_positioner_struct + | + | __repr__ = _swig_repr(self) + | + | __setattr__ lambda self, name, value + | + | get_reciprocal(*args) + | Returns : double reciprocal1,double reciprocal2,double reciprocal3 + | *args : double ratio,double wavelength,double real1,double real2,double real3 + | + | C prototype: int cbf_get_reciprocal (cbf_goniometer goniometer, + | unsigned int reserved, double ratio, double wavelength, + | double real1, double real2, double real3, + | double *reciprocal1, double *reciprocal2, + | double *reciprocal3); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_reciprocal sets *reciprocal1, * reciprocal2, and * + | reciprocal3 to the 3 components of the of the reciprocal-space vector + | corresponding to the real-space vector (real1, real2, real3). The + | reciprocal-space vector is oriented to correspond to the goniometer + | setting with all axes at 0. The value wavelength is the wavlength in + | Angstrom and the value ratio specifies the current goniometer setting + | and varies from 0.0 at the beginning of the exposur e to 1.0 at the + | end, irrespective of the actual rotation range. + | Any of the destination pointers may be NULL. + | The parameter reserved is presently unused and should be set to 0. + | ARGUMENTS + | goniometer Goniometer handle. reserved Unused. Any value other + | than 0 is invalid. ratio Goniometer setting. 0 = beginning of + | exposure, 1 = end. wavelength Wavelength in Angstrom. real1 x + | component of the real-space vector. real2 y component of the + | real-space vector. real3 z component of the real-space vector. + | reciprocal1 Pointer to the destination x component of the + | reciprocal-space vector. reciprocal2 Pointer to the destination y + | component of the reciprocal-space vector. reciprocal3 Pointer to + | the destination z component of the reciprocal-space vector. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | get_rotation_axis(*args) + | Returns : double vector1,double vector2,double vector3 + | *args : + | + | C prototype: int cbf_get_rotation_axis (cbf_goniometer goniometer, + | unsigned int reserved, double *vector1, double *vector2, + | double vector3); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_rotation_axis sets *vector1, *vector2, and *vector3 to the 3 + | components of the goniometer rotation axis used for the exposure. + | Any of the destination pointers may be NULL. + | The parameter reserved is presently unused and should be set to 0. + | ARGUMENTS + | goniometer Goniometer handle. reserved Unused. Any value other + | than 0 is invalid. vector1 Pointer to the destination x component + | of the rotation axis. vector2 Pointer to the destination y + | component of the rotation axis. vector3 Pointer to the destination + | z component of the rotation axis. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | get_rotation_range(*args) + | Returns : Float start,Float increment + | *args : + | + | C prototype: int cbf_get_rotation_range (cbf_goniometer goniometer, + | unsigned int reserved, double *start, double *increment); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_get_rotation_range sets *start and *increment to the + | corresponding values of the goniometer rotation axis used for the + | exposure. + | Either of the destination pointers may be NULL. + | The parameter reserved is presently unused and should be set to 0. + | ARGUMENTS + | goniometer Goniometer handle. reserved Unused. Any value other + | than 0 is invalid. start Pointer to the destination start + | value. increment Pointer to the destination increment value. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | rotate_vector(*args) + | Returns : double final1,double final2,double final3 + | *args : double ratio,double initial1,double initial2,double initial3 + | + | C prototype: int cbf_rotate_vector (cbf_goniometer goniometer, + | unsigned int reserved, double ratio, double initial1, + | double initial2, double initial3, double *final1, + | double *final2, double *final3); + | + | CBFLib documentation: + | DESCRIPTION + | cbf_rotate_vector sets *final1, *final2, and *final3 to the 3 + | components of the of the vector (initial1, initial2, initial3) after + | reorientation by applying the goniometer rotations. The value ratio + | specif ies the goniometer setting and varies from 0.0 at the + | beginning of the exposure to 1.0 at the end, irrespective of the + | actual rotation range. + | Any of the destination pointers may be NULL. + | The parameter reserved is presently unused and should be set to 0. + | ARGUMENTS + | goniometer Goniometer handle. reserved Unused. Any value other + | than 0 is invalid. ratio Goniometer setting. 0 = beginning of + | exposure, 1 = end. initial1 x component of the initial vector. + | initial2 y component of the initial vector. initial3 z component + | of the initial vector. vector1 Pointer to the destination x + | component of the final vector. vector2 Pointer to the destination y + | component of the final vector. vector3 Pointer to the destination z + | component of the final vector. + | RETURN VALUE + | Returns an error code on failure or 0 for success. + | _________________________________________________________________ + | + | ---------------------------------------------------------------------- + | Properties defined here: + | + | axes + | = cbf_positioner_struct_axes_get(...) + | + | = cbf_positioner_struct_axes_set(...) + | + | axes_are_connected + | = cbf_positioner_struct_axes_are_connected_get(...) + | + | = cbf_positioner_struct_axes_are_connected_set(...) + | + | axis + | = cbf_positioner_struct_axis_get(...) + | + | = cbf_positioner_struct_axis_set(...) + | + | matrix + | = cbf_positioner_struct_matrix_get(...) + | + | = cbf_positioner_struct_matrix_set(...) + | + | matrix_is_valid + | = cbf_positioner_struct_matrix_is_valid_get(...) + | + | = cbf_positioner_struct_matrix_is_valid_set(...) + | + | ---------------------------------------------------------------------- + | Data and other attributes defined here: + | + | __dict__ = + | dictionary for instance variables (if defined) + | + | __swig_destroy__ = + | + | + | __swig_getmethods__ = {'axes': + +CREDITS + Paul Ellis and Herbert Bernstein for the excellent CBFlib! + diff --git a/py2cbf/pycbf_i.w b/py2cbf/pycbf_i.w new file mode 100644 index 00000000..06317d99 --- /dev/null +++ b/py2cbf/pycbf_i.w @@ -0,0 +1,482 @@ +% pycbf_i.w +% nuweb source file used to create +% pycbf.i and to document it in pycbf.w +% +% pycbf - python binding to the CBFlib library +% +% Copyright (C) 2005 Jonathan Wright +% ESRF, Grenoble, France +% email: wright@@esrf.fr +% +% Revised for CBFlib 0.9 releases, Herbert J. Bernstein, 23 Aug 2010 +% +%###################################################################### +%# # +%# YOU MAY REDISTRIBUTE THE CBFLIB PACKAGE INCLUDING PYCBF UNDER THE # +%# TERMS OF THE GPL # +%# # +%# ALTERNATIVELY YOU MAY REDISTRIBUTE THE CBFLIB API INCLUDING PYCBF # +%# UNDER THE TERMS OF THE LGPL # +%# # +%###################################################################### +% +%########################### GPL NOTICES ############################## +%# # +%# This program is free software; you can redistribute it and/or # +%# modify it under the terms of the GNU General Public License as # +%# published by the Free Software Foundation; either version 2 of # +%# (the License, or (at your option) any later version. # +%# # +%# This program is distributed in the hope that it will be useful, # +%# but WITHOUT ANY WARRANTY; without even the implied warranty of # +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +%# GNU General Public License for more details. # +%# # +%# You should have received a copy of the GNU General Public License # +%# along with this program; if not, write to the Free Software # +%# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # +%# 02111-1307 USA # +%# # +%###################################################################### +% +%######################### LGPL NOTICES ############################### +%# # +%# This library is free software; you can redistribute it and/or # +%# modify it under the terms of the GNU Lesser General Public # +%# License as published by the Free Software Foundation; either # +%# version 2.1 of the License, or (at your option) any later version. # +%# # +%# This library is distributed in the hope that it will be useful, # +%# but WITHOUT ANY WARRANTY; without even the implied warranty of # +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # +%# Lesser General Public License for more details. # +%# # +%# You should have received a copy of the GNU Lesser General Public # +%# License along with this library; if not, write to the Free # +%# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # +%# MA 02110-1301 USA # +%# # +%###################################################################### +% +\section{Generating the c interface - the SWIG file} + +Essentially the swig file starts by saying what to include to build the wrappers, +and then goes on to define the python interface for each function we want to call. + +The library appears to define at least three ``objects''; a CBF handle, a cbf\_goniometer and +a cbf\_detector. We will attempt to map these onto python classes. + +FIXME - decide whether introduce a "binary array" class with converters to +more common representations? + +All of the functions in the library appear to return 0 on success and a +meaningful error code on failure. +We try to propagate that error code across the language barrier via exceptions. + +So the SWIG file will start off by including the header files needed +for compilation. Note the defintion of constants to be passed as +arguments in calls in the form pycbf.CONSTANTNAME + +@D Constants used for compression +@{ +// The actual wrappers + +// Constants needed from header files + + /* Constants used for compression */ + +#define CBF_INTEGER 0x0010 /* Uncompressed integer */ +#define CBF_FLOAT 0x0020 /* Uncompressed IEEE floating-point */ +#define CBF_CANONICAL 0x0050 /* Canonical compression */ +#define CBF_PACKED 0x0060 /* Packed compression */ +#define CBF_PACKED_V2 0x0090 /* CCP4 Packed (JPA) compression V2 */ +#define CBF_BYTE_OFFSET 0x0070 /* Byte Offset Compression */ +#define CBF_PREDICTOR 0x0080 /* Predictor_Huffman Compression */ +#define CBF_NONE 0x0040 /* No compression flag */ +#define CBF_COMPRESSION_MASK \ + 0x00FF /* Mask to separate compression + type from flags */ +#define CBF_FLAG_MASK 0x0F00 /* Mask to separate flags from + compression type */ +#define CBF_UNCORRELATED_SECTIONS \ + 0x0100 /* Flag for uncorrelated sections */ +#define CBF_FLAT_IMAGE 0x0200 /* Flag for flat (linear) images */ +#define CBF_NO_EXPAND 0x0400 /* Flag to try not to expand */ +@} + + +@D Constants used for headers +@{ + /* Constants used for headers */ + +#define PLAIN_HEADERS 0x0001 /* Use plain ASCII headers */ +#define MIME_HEADERS 0x0002 /* Use MIME headers */ +#define MSG_NODIGEST 0x0004 /* Do not check message digests */ +#define MSG_DIGEST 0x0008 /* Check message digests */ +#define MSG_DIGESTNOW 0x0010 /* Check message digests immediately */ +#define MSG_DIGESTWARN 0x0020 /* Warn on message digests immediately*/ +#define PAD_1K 0x0020 /* Pad binaries with 1023 0's */ +#define PAD_2K 0x0040 /* Pad binaries with 2047 0's */ +#define PAD_4K 0x0080 /* Pad binaries with 4095 0's */ +@} + +@D Constants used to control CIF parsing +@{ + /* Constants used to control CIF parsing */ + +#define CBF_PARSE_BRC 0x0100 /* PARSE DDLm/CIF2 brace {,...} */ +#define CBF_PARSE_PRN 0x0200 /* PARSE DDLm parens (,...) */ +#define CBF_PARSE_BKT 0x0400 /* PARSE DDLm brackets [,...] */ +#define CBF_PARSE_BRACKETS \ + 0x0700 /* PARSE ALL brackets */ +#define CBF_PARSE_TQ 0x0800 /* PARSE treble quotes """...""" and '''...''' */ +#define CBF_PARSE_CIF2_DELIMS \ + 0x1000 /* Do not scan past an unescaped close quote + do not accept {} , : " ' in non-delimited + strings'{ */ +#define CBF_PARSE_DDLm 0x0700 /* For DDLm parse (), [], {} */ +#define CBF_PARSE_CIF2 0x1F00 /* For CIF2 parse {}, treble quotes, + stop on unescaped close quotes */ +#define CBF_PARSE_DEFINES \ + 0x2000 /* Recognize DEFINE_name */ + + +#define CBF_PARSE_WIDE 0x4000 /* PARSE wide files */ + +#define CBF_PARSE_UTF8 0x10000 /* PARSE UTF-8 */ + +#define HDR_DEFAULT (MIME_HEADERS | MSG_NODIGEST) + +#define MIME_NOHEADERS PLAIN_HEADERS + + /* CBF vs CIF */ + +#define CBF 0x0000 /* Use simple binary sections */ +#define CIF 0x0001 /* Use MIME-encoded binary sections */ +@} + +@D Constants used for encoding +@{ + /* Constants used for encoding */ + +#define ENC_NONE 0x0001 /* Use BINARY encoding */ +#define ENC_BASE64 0x0002 /* Use BASE64 encoding */ +#define ENC_BASE32K 0x0004 /* Use X-BASE32K encoding */ +#define ENC_QP 0x0008 /* Use QUOTED-PRINTABLE encoding */ +#define ENC_BASE10 0x0010 /* Use BASE10 encoding */ +#define ENC_BASE16 0x0020 /* Use BASE16 encoding */ +#define ENC_BASE8 0x0040 /* Use BASE8 encoding */ +#define ENC_FORWARD 0x0080 /* Map bytes to words forward (1234) */ +#define ENC_BACKWARD 0x0100 /* Map bytes to words backward (4321) */ +#define ENC_CRTERM 0x0200 /* Terminate lines with CR */ +#define ENC_LFTERM 0x0400 /* Terminate lines with LF */ + +#define ENC_DEFAULT (ENC_BASE64 | ENC_LFTERM | ENC_FORWARD) +@} + +\subsection{Exceptions} + +We attempt to catch the errors and pass them back to python as +exceptions. This could still do with a little work to propagage +back the calls causing the errors. + +Currently there are two global constants defined, called error\_message +and error\_status. +These are filled out when an error occurred, converting the numerical +error value into something the author can read. + +There is an implicit assumption that if the library is used +correctly you will not normally get exceptions. +This should be addressed further in areas like file opening, +proper python exceptions should be returned. + +See the section on exception handling in pycbf.i, above. + +Currently you get a meaningful string back. Should perhaps look into +defining these as python exception classes? +In any case - the SWIG exception handling is defined via the following. +It could have retained the old style if(status = action) but then +harder to see what to return... + +@D Exception handling +@{ +// Exception handling + + /* Convenience definitions for functions returning error codes */ +%exception { + error_status=0; + $action + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } +} + +/* Retain notation from cbf lib but pass on as python exception */ + +#define cbf_failnez(x) {(error_status = x);} + +/* printf("Called \"x\", status %d\n",error_status);} */ + +#define cbf_onfailnez(x,c) {int err; err = (x); if (err) { fprintf (stderr, \ + "\nCBFlib error %d in \"x\"\n", err); \ + { c; } return err; }} +@} + +@O pycbf.i +@{ +/* File: pycbf.i */ + +// Indicate that we want to generate a module call pycbf +%module pycbf + +%pythoncode %{ +__author__ = "Jon Wright " +__date__ = "14 Dec 2005" +__version__ = "CBFlib 0.9" +__credits__ = """Paul Ellis and Herbert Bernstein for the excellent CBFlib!""" +__doc__=""" pycbf - python bindings to the CBFlib library + + A library for reading and writing ImageCIF and CBF files + which store area detector images for crystallography. + + This work is a derivative of the CBFlib version 0.7.7 library + by Paul J. Ellis of Stanford Synchrotron Radiation Laboratory + and Herbert J. Bernstein of Bernstein + Sons + See: + http://www.bernstein-plus-sons.com/software/CBF/ + + Licensing is GPL based, see: + http://www.bernstein-plus-sons.com/software/CBF/doc/CBFlib_NOTICES.html + + These bindings were automatically generated by SWIG, and the + input to SWIG was automatically generated by a python script. + We very strongly recommend you do not attempt to edit them + by hand! + + + + Copyright (C) 2007 Jonathan Wright + ESRF, Grenoble, France + email: wright@@esrf.fr + + Revised, August 2010 Herbert J. Bernstein + Add defines from CBFlib 0.9.1 + +""" +%} + + +// Used later to pass back binary data +%include "cstring.i" + +// Attempt to autogenerate what SWIG thinks the call looks like + +// Typemaps are a SWIG mechanism for many things, not least multiple +// return values +%include "typemaps.i" + +// Arrays are needed +%include "carrays.i" +%array_class(double, doubleArray) +%array_class(int, intArray) +%array_class(short, shortArray) +%array_class(long, longArray) + +// Following the SWIG 1.3 documentation at +// http://www.swig.org/Doc1.3/Python.html +// section 31.9.5, we map sequences of +// PyFloat, PyLong and PyInt to +// C arrays of double, long and int +// +// But with the strict checking of being a float +// commented out to allow automatic conversions +%{ +static int convert_darray(PyObject *input, double *ptr, int size) { + int i; + if (!PySequence_Check(input)) { + PyErr_SetString(PyExc_TypeError,"Expecting a sequence"); + return 0; + } + if (PyObject_Length(input) != size) { + PyErr_SetString(PyExc_ValueError,"Sequence size mismatch"); + return 0; + } + for (i =0; i < size; i++) { + PyObject *o = PySequence_GetItem(input,i); + /*if (!PyFloat_Check(o)) { + + Py_XDECREF(o); + PyErr_SetString(PyExc_ValueError,"Expecting a sequence of floats"); + return 0; + }*/ + ptr[i] = PyFloat_AsDouble(o); + Py_DECREF(o); + } + return 1; +} +%} + +%typemap(in) double [ANY](double temp[$1_dim0]) { + if ($input == Py_None) $1 = NULL; + else + if (!convert_darray($input,temp,$1_dim0)) { + return NULL; + } + $1 = &temp[0]; +} + +%{ + static long convert_larray(PyObject *input, long *ptr, int size) { + int i; + if (!PySequence_Check(input)) { + PyErr_SetString(PyExc_TypeError,"Expecting a sequence"); + return 0; + } + if (PyObject_Length(input) != size) { + PyErr_SetString(PyExc_ValueError,"Sequence size mismatch"); + return 0; + } + for (i =0; i < size; i++) { + PyObject *o = PySequence_GetItem(input,i); + /*if (!PyLong_Check(o)) { + Py_XDECREF(o); + PyErr_SetString(PyExc_ValueError,"Expecting a sequence of long integers"); + return 0; + }*/ + ptr[i] = PyLong_AsLong(o); + Py_DECREF(o); + } + return 1; + } +%} + +%typemap(in) long [ANY](long temp[$1_dim0]) { + if (!convert_larray($input,temp,$1_dim0)) { + return NULL; + } + $1 = &temp[0]; +} + +%{ + static int convert_iarray(PyObject *input, int *ptr, int size) { + int i; + if (!PySequence_Check(input)) { + PyErr_SetString(PyExc_TypeError,"Expecting a sequence"); + return 0; + } + if (PyObject_Length(input) != size) { + PyErr_SetString(PyExc_ValueError,"Sequence size mismatch"); + return 0; + } + for (i =0; i < size; i++) { + PyObject *o = PySequence_GetItem(input,i); + /*if (!PyInt_Check(o)) { + Py_XDECREF(o); + PyErr_SetString(PyExc_ValueError,"Expecting a sequence of long integers"); + return 0; + }*/ + ptr[i] = (int)PyInt_AsLong(o); + Py_DECREF(o); + } + return 1; + } +%} + +%typemap(in) int [ANY](int temp[$1_dim0]) { + if (!convert_iarray($input,temp,$1_dim0)) { + return NULL; + } + $1 = &temp[0]; +} + + +%{ // Here is the c code needed to compile the wrappers, but not + // to be wrapped + +#include "../include/cbf.h" +#include "../include/cbf_simple.h" + +// Helper functions to generate error message + + +static int error_status = 0; +static char error_message1[17] ; +static char error_message[1042] ; // hope that is long enough + +/* prototype */ +void get_error_message(void); + +void get_error_message(){ + sprintf(error_message1,"%s","CBFlib Error(s):"); + if (error_status & CBF_FORMAT ) + sprintf(error_message,"%s %s",error_message1,"CBF_FORMAT "); + if (error_status & CBF_ALLOC ) + sprintf(error_message,"%s %s",error_message1,"CBF_ALLOC "); + if (error_status & CBF_ARGUMENT ) + sprintf(error_message,"%s %s",error_message1,"CBF_ARGUMENT "); + if (error_status & CBF_ASCII ) + sprintf(error_message,"%s %s",error_message1,"CBF_ASCII "); + if (error_status & CBF_BINARY ) + sprintf(error_message,"%s %s",error_message1,"CBF_BINARY "); + if (error_status & CBF_BITCOUNT ) + sprintf(error_message,"%s %s",error_message1,"CBF_BITCOUNT "); + if (error_status & CBF_ENDOFDATA ) + sprintf(error_message,"%s %s",error_message1,"CBF_ENDOFDATA "); + if (error_status & CBF_FILECLOSE ) + sprintf(error_message,"%s %s",error_message1,"CBF_FILECLOSE "); + if (error_status & CBF_FILEOPEN ) + sprintf(error_message,"%s %s",error_message1,"CBF_FILEOPEN "); + if (error_status & CBF_FILEREAD ) + sprintf(error_message,"%s %s",error_message1,"CBF_FILEREAD "); + if (error_status & CBF_FILESEEK ) + sprintf(error_message,"%s %s",error_message1,"CBF_FILESEEK "); + if (error_status & CBF_FILETELL ) + sprintf(error_message,"%s %s",error_message1,"CBF_FILETELL "); + if (error_status & CBF_FILEWRITE ) + sprintf(error_message,"%s %s",error_message1,"CBF_FILEWRITE "); + if (error_status & CBF_IDENTICAL ) + sprintf(error_message,"%s %s",error_message1,"CBF_IDENTICAL "); + if (error_status & CBF_NOTFOUND ) + sprintf(error_message,"%s %s",error_message1,"CBF_NOTFOUND "); + if (error_status & CBF_OVERFLOW ) + sprintf(error_message,"%s %s",error_message1,"CBF_OVERFLOW "); + if (error_status & CBF_UNDEFINED ) + sprintf(error_message,"%s %s",error_message1,"CBF_UNDEFINED "); + if (error_status & CBF_NOTIMPLEMENTED) + sprintf(error_message,"%s %s",error_message1,"CBF_NOTIMPLEMENTED"); + if (error_status & CBF_NOCOMPRESSION) + sprintf(error_message,"%s %s",error_message1,"CBF_NOCOMPRESSION"); +} + + +%} // End of code which is not wrapped but needed to compile +@} + + +@O pycbf.i +@{ +@< Constants used for compression @> + +@< Constants used for headers @> + +@< Constants used to control CIF parsing @> + +@< Constants used for encoding @> + +@< Exception handling @> + +%include "cbfgenericwrappers.i" + + +// cbf_goniometer object + +%include "cbfgoniometerwrappers.i" + +%include "cbfdetectorwrappers.i" + +// cbfhandle object +%include "cbfhandlewrappers.i" + +@} diff --git a/py2cbf/pycbf_test1.py b/py2cbf/pycbf_test1.py new file mode 100644 index 00000000..16cadd17 --- /dev/null +++ b/py2cbf/pycbf_test1.py @@ -0,0 +1,66 @@ + +import pycbf +object = pycbf.cbf_handle_struct() # FIXME +object.read_file("../img2cif_packed.cif",pycbf.MSG_DIGEST) +object.rewind_datablock() +print "Found",object.count_datablocks(),"blocks" +object.select_datablock(0) +print "Zeroth is named",object.datablock_name() +object.rewind_category() +categories = object.count_categories() +for i in range(categories): + print "Category:",i, + object.select_category(i) + category_name = object.category_name() + print "Name:",category_name, + rows=object.count_rows() + print "Rows:",rows, + cols = object.count_columns() + print "Cols:",cols + loop=1 + object.rewind_column() + while loop is not 0: + column_name = object.column_name() + print "column name \"",column_name,"\"", + try: + object.next_column() + except: + break + print + for j in range(rows): + object.select_row(j) + object.rewind_column() + print "row:",j + for k in range(cols): + name=object.column_name() + print "col:",name, + object.select_column(k) + typeofvalue=object.get_typeofvalue() + print "type:",typeofvalue + if typeofvalue.find("bnry") > -1: + print "Found the binary!!", + s=object.get_integerarray_as_string() + print type(s) + print dir(s) + print len(s) + try: + import numpy + d = numpy.frombuffer(s,numpy.uint32) + # Hard wired Unsigned Int32 + print d.shape + print d[0:10],d[d.shape[0]/2],d[-1] + print d[d.shape[0]/3:d.shape[0]/3+20] + d=numpy.reshape(d,(2300,2300)) +# from matplotlib import pylab +# pylab.imshow(d,vmin=0,vmax=1000) +# pylab.show() + except ImportError: + print "You need to get numpy and matplotlib to see the data" + else: + value=object.get_value() + print "Val:",value,i + print +del(object) +# +print dir() +#object.free_handle(handle) diff --git a/py2cbf/pycbf_test2.py b/py2cbf/pycbf_test2.py new file mode 100644 index 00000000..5648f849 --- /dev/null +++ b/py2cbf/pycbf_test2.py @@ -0,0 +1,12 @@ + +import pycbf +obj = pycbf.cbf_handle_struct() +obj.read_file("../adscconverted.cbf",0) +obj.select_datablock(0) +g = obj.construct_goniometer() +print "Rotation axis is",g.get_rotation_axis() +d = obj.construct_detector(0) +print "Beam center is",d.get_beam_center() +print "Detector slow axis is", d.get_detector_axis_slow() +print "Detector fast axis is", d.get_detector_axis_fast() +print "Detector axes (fast, slow) are", d.get_detector_axes_fs() diff --git a/py2cbf/pycbf_test3.py b/py2cbf/pycbf_test3.py new file mode 100644 index 00000000..cfaf0f57 --- /dev/null +++ b/py2cbf/pycbf_test3.py @@ -0,0 +1,22 @@ + +import pycbf, unittest +class GenericTests(unittest.TestCase): + + def test_get_local_integer_byte_order(self): + self.assertEqual( pycbf.get_local_integer_byte_order(), + 'little_endian') + + def test_get_local_real_byte_order(self): + self.assertEqual( pycbf.get_local_real_byte_order() , + 'little_endian') + + def test_get_local_real_format(self): + self.assertEqual( pycbf.get_local_real_format(), + 'ieee 754-1985') + + def test_compute_cell_volume(self): + self.assertEqual( pycbf.compute_cell_volume((2.,3.,4.,90.,90.,90.)), + 24.0) +if __name__=="__main__": + unittest.main() + diff --git a/py2cbf/pycbf_test4.py b/py2cbf/pycbf_test4.py new file mode 100644 index 00000000..ef464427 --- /dev/null +++ b/py2cbf/pycbf_test4.py @@ -0,0 +1,102 @@ + +# version of pycbf_test1 with write logic added +import pycbf +object = pycbf.cbf_handle_struct() +newobject = pycbf.cbf_handle_struct() +object.read_file("../img2cif_packed.cif",pycbf.MSG_DIGEST) +object.rewind_datablock() +print "Found",object.count_datablocks(),"blocks" +object.select_datablock(0) +print "Zeroth is named",object.datablock_name() +newobject.force_new_datablock(object.datablock_name()); +object.rewind_category() +categories = object.count_categories() +for i in range(categories): + print "Category:",i, + object.select_category(i) + category_name = object.category_name() + print "Name:",category_name, + newobject.new_category(category_name) + rows=object.count_rows() + print "Rows:",rows, + cols = object.count_columns() + print "Cols:",cols + loop=1 + object.rewind_column() + while loop is not 0: + column_name = object.column_name() + print "column name \"",column_name,"\"", + newobject.new_column(column_name) + try: + object.next_column() + except: + break + print + for j in range(rows): + object.select_row(j) + newobject.new_row() + object.rewind_column() + print "row:",j + for k in range(cols): + name=object.column_name() + print "col:",name, + object.select_column(k) + newobject.select_column(k) + typeofvalue=object.get_typeofvalue() + print "type:",typeofvalue + if typeofvalue.find("bnry") > -1: + print "Found the binary!!", + s=object.get_integerarray_as_string() + print type(s) + print dir(s) + print len(s) + (compression, binaryid, elsize, elsigned, \ + elunsigned, elements, minelement, maxelement, \ + byteorder,dimfast,dimmid,dimslow,padding) = \ + object.get_integerarrayparameters_wdims_fs() + if dimfast==0: + dimfast = 1 + if dimmid==0: + dimmid = 1 + if dimslow == 0: + dimslow = 1 + print "compression: ",compression + print "binaryid", binaryid + print "elsize", elsize + print "elsigned", elsigned + print "elunsigned",elunsigned + print "elements", elements + print "minelement", minelement + print "maxelement", maxelement + print "byteorder", byteorder + print "dimfast", dimfast + print "dimmid", dimmid + print "dimslow",dimslow + print "padding", padding + newobject.set_integerarray_wdims_fs(\ + pycbf.CBF_BYTE_OFFSET,binaryid,s,elsize,elsigned,\ + elements,byteorder,dimfast,dimmid,dimslow,padding) + try: + import numpy + d = numpy.frombuffer(s,numpy.uint32) + # Hard wired Unsigned Int32 + print d.shape + print d[0:10],d[d.shape[0]/2],d[-1] + print d[d.shape[0]/3:d.shape[0]/3+20] + d=numpy.reshape(d,(2300,2300)) +# from matplotlib import pylab +# pylab.imshow(d,vmin=0,vmax=1000) +# pylab.show() + except ImportError: + print "You need to get numpy and matplotlib to see the data" + else: + value=object.get_value() + newobject.set_value(value) + print "Val:",value,i + print +del(object) +newobject.write_widefile("newtest1.cbf",pycbf.CBF,\ + pycbf.MIME_HEADERS|pycbf.MSG_DIGEST|pycbf.PAD_4K,0) +# +print dir() +#object.free_handle(handle) diff --git a/py2cbf/pycbf_testfelaxes.py b/py2cbf/pycbf_testfelaxes.py new file mode 100644 index 00000000..94951ae3 --- /dev/null +++ b/py2cbf/pycbf_testfelaxes.py @@ -0,0 +1,44 @@ + +import pycbf, sys +from decimal import Decimal, ROUND_HALF_UP + +image_file = sys.argv[1] + +cbf = pycbf.cbf_handle_struct() +cbf.read_widefile(image_file, pycbf.MSG_DIGEST) + +for element in range(64): + d = cbf.construct_detector(element) + print "element:", element + + v00 = d.get_pixel_coordinates(0, 0) + v01 = d.get_pixel_coordinates(0, 1) + v10 = d.get_pixel_coordinates(1, 0) + v11 = d.get_pixel_coordinates(1, 1) + prec = Decimal('1.000000000') + + print '(0, 0) v00 [ %.9f %.9f %.9f ]' %(round(v00[0],9), round(v00[1],9), round(v00[2],9)) + print '(0, 1) v01 [ %.9g %.9g %.9g ]' %(round(v01[0],9), round(v01[1],9), round(v01[2],9)) + print '(1, 0) v10 [ %.9g %.9g %.9g ]' %(round(v10[0],9), round(v10[1],9), round(v10[2],9)) + print '(1, 1) v11 [ %.9g %.9g %.9g ]' %(round(v11[0],9), round(v11[1],9), round(v11[2],9)) + + print "surface axes:", d.get_detector_surface_axes(0), d.get_detector_surface_axes(1) + + print d.get_detector_surface_axes(0), "has", cbf.count_axis_ancestors(d.get_detector_surface_axes(0)), "ancestors" + print d.get_detector_surface_axes(1), "has", cbf.count_axis_ancestors(d.get_detector_surface_axes(1)), "ancestors" + + cur_axis = d.get_detector_surface_axes(0) + count = cbf.count_axis_ancestors(cur_axis) + + for index in range(count): + print "axis", cur_axis, "index: ", index + print " equipment", cbf.get_axis_equipment(cur_axis) + print " depends_on", cbf.get_axis_depends_on(cur_axis) + print " equipment_component", cbf.get_axis_equipment_component(cur_axis) + vector = cbf.get_axis_vector(cur_axis) + print " vector [ %.8g %.8g %.8g ]" % (round(vector[0],7), round(vector[1],7), round(vector[2],7)) + offset = cbf.get_axis_offset(cur_axis) + print " offset [ %.8g %.8g %.8g ]" % (round(offset[0],7), round(offset[1],7), round(offset[2],7)) + print " rotation", cbf.get_axis_rotation(cur_axis) + print " rotation_axis", cbf.get_axis_rotation_axis(cur_axis) + cur_axis = cbf.get_axis_depends_on(cur_axis) diff --git a/py2cbf/pycbf_wrap.c b/py2cbf/pycbf_wrap.c new file mode 100644 index 00000000..31e3e37f --- /dev/null +++ b/py2cbf/pycbf_wrap.c @@ -0,0 +1,29181 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 4.0.2 + * + * This file is not intended to be easily readable and contains a number of + * coding conventions designed to improve portability and efficiency. Do not make + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. + * ----------------------------------------------------------------------------- */ + + +#ifndef SWIGPYTHON +#define SWIGPYTHON +#endif + +#define SWIG_PYTHON_DIRECTOR_NO_VTABLE + +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if defined(__GNUC__) +# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + +/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ +#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) +# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 +#endif + +/* Intel's compiler complains if a variable which was never initialised is + * cast to void, which is a common idiom which we use to indicate that we + * are aware a variable isn't used. So we just silence that warning. + * See: https://github.com/swig/swig/issues/192 for more discussion. + */ +#ifdef __INTEL_COMPILER +# pragma warning disable 592 +#endif + + +#if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND) +/* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */ +# include +#endif + +#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) +/* Use debug wrappers with the Python release dll */ +# undef _DEBUG +# include +# define _DEBUG 1 +#else +# include +#endif + +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic C API SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* This should only be incremented when either the layout of swig_type_info changes, + or for whatever reason, the runtime changes incompatibly */ +#define SWIG_RUNTIME_VERSION "4" + +/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ +#ifdef SWIG_TYPE_TABLE +# define SWIG_QUOTE_STRING(x) #x +# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) +# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#else +# define SWIG_TYPE_TABLE_NAME +#endif + +/* + You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for + creating a static or dynamic library from the SWIG runtime code. + In 99.9% of the cases, SWIG just needs to declare them as 'static'. + + But only do this if strictly necessary, ie, if you have problems + with your compiler or suchlike. +*/ + +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#endif + +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#endif + +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* Flags for pointer conversions */ +#define SWIG_POINTER_DISOWN 0x1 +#define SWIG_CAST_NEW_MEMORY 0x2 +#define SWIG_POINTER_NO_NULL 0x4 + +/* Flags for new pointer objects */ +#define SWIG_POINTER_OWN 0x1 + + +/* + Flags/methods for returning states. + + The SWIG conversion methods, as ConvertPtr, return an integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old versions of SWIG, code such as the following was usually written: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + which is the same really, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + also requires SWIG_ConvertPtr to return new result values, such as + + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + SWIG errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows to return the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() +*/ + +#define SWIG_OK (0) +#define SWIG_ERROR (-1) +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporal objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast(r) (r) +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +/* Structure to store information on one type */ +typedef struct swig_type_info { + const char *name; /* mangled name of this type */ + const char *str; /* human readable name of this type */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +/* Structure used to store module information + * Each module generates one structure like this, and the runtime collects + * all of these structures and stores them in a circularly linked list.*/ +typedef struct swig_module_info { + swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ + size_t size; /* Number of types in this module */ + struct swig_module_info *next; /* Pointer to next element in circularly linked list */ + swig_type_info **type_initial; /* Array of initially generated type structures */ + swig_cast_info **cast_initial; /* Array of initially generated casting structures */ + void *clientdata; /* Language specific module data */ +} swig_module_info; + +/* + Compare two type names skipping the space characters, therefore + "char*" == "char *" and "Class" == "Class", etc. + + Return 0 when the two name types are equivalent, as in + strncmp, but skipping ' '. +*/ +SWIGRUNTIME int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (int)((l1 - f1) - (l2 - f2)); +} + +/* + Check type equivalence in a name list like ||... + Return 0 if equal, -1 if nb < tb, 1 if nb > tb +*/ +SWIGRUNTIME int +SWIG_TypeCmp(const char *nb, const char *tb) { + int equiv = 1; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (equiv != 0 && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = SWIG_TypeNameComp(nb, ne, tb, te); + if (*ne) ++ne; + } + return equiv; +} + +/* + Check type equivalence in a name list like ||... + Return 0 if not equal, 1 if equal +*/ +SWIGRUNTIME int +SWIG_TypeEquiv(const char *nb, const char *tb) { + return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; +} + +/* + Check the typename +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Cast a pointer up an inheritance hierarchy +*/ +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} + +/* + Dynamic pointer casting. Down an inheritance hierarchy +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} + +/* + Return the pretty name associated with this type, + that is an unmangled type name in a form presentable to the user. +*/ +SWIGRUNTIME const char * +SWIG_TypePrettyName(const swig_type_info *type) { + /* The "str" field contains the equivalent pretty names of the + type, separated by vertical-bar characters. We choose + to print the last name, as it is often (?) the most + specific. */ + if (!type) return NULL; + if (type->str != NULL) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} + +/* + Set the clientdata field for a type +*/ +SWIGRUNTIME void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ + ti->clientdata = clientdata; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + +/* + Search for a swig_type_info structure only by mangled name + Search is a O(log #types) + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + size_t l = 0; + size_t r = iter->size - 1; + do { + /* since l+r >= 0, we can (>> 1) instead (/ 2) */ + size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; /* should never happen */ + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} + +/* + Search for a swig_type_info structure for either a mangled name or a human readable name. + It first searches the mangled names of the types, which is a O(log #types) + If a type is not found it then searches the human readable names, which is O(#types). + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + /* STEP 1: Search the name field using binary search */ + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + /* STEP 2: If the type hasn't been found, do a complete search + of the str field (the human readable name) */ + swig_module_info *iter = start; + do { + size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + + /* neither found a match */ + return 0; +} + +/* + Pack binary data into a string +*/ +SWIGRUNTIME char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + const unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* + Unpack binary data from a string +*/ +SWIGRUNTIME const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + char d = *(c++); + unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = (unsigned char)((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = (unsigned char)((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (unsigned char)(d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (unsigned char)(d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} + +/* + Pack 'void *' into a string buffer. +*/ +SWIGRUNTIME char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} + +SWIGRUNTIME char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} + +#ifdef __cplusplus +} +#endif + +/* Errors in SWIG */ +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 +#define SWIG_SystemError -10 +#define SWIG_AttributeError -11 +#define SWIG_MemoryError -12 +#define SWIG_NullReferenceError -13 + + + +/* Compatibility macros for Python 3 */ +#if PY_VERSION_HEX >= 0x03000000 + +#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) +#define PyInt_Check(x) PyLong_Check(x) +#define PyInt_AsLong(x) PyLong_AsLong(x) +#define PyInt_FromLong(x) PyLong_FromLong(x) +#define PyInt_FromSize_t(x) PyLong_FromSize_t(x) +#define PyString_Check(name) PyBytes_Check(name) +#define PyString_FromString(x) PyUnicode_FromString(x) +#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) +#define PyString_AsString(str) PyBytes_AsString(str) +#define PyString_Size(str) PyBytes_Size(str) +#define PyString_InternFromString(key) PyUnicode_InternFromString(key) +#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE +#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) +#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) + +#endif + +#ifndef Py_TYPE +# define Py_TYPE(op) ((op)->ob_type) +#endif + +/* SWIG APIs for compatibility of both Python 2 & 3 */ + +#if PY_VERSION_HEX >= 0x03000000 +# define SWIG_Python_str_FromFormat PyUnicode_FromFormat +#else +# define SWIG_Python_str_FromFormat PyString_FromFormat +#endif + + +/* Warning: This function will allocate a new string in Python 3, + * so please call SWIG_Python_str_DelForPy3(x) to free the space. + */ +SWIGINTERN char* +SWIG_Python_str_AsChar(PyObject *str) +{ +#if PY_VERSION_HEX >= 0x03030000 + return (char *)PyUnicode_AsUTF8(str); +#elif PY_VERSION_HEX >= 0x03000000 + char *newstr = 0; + str = PyUnicode_AsUTF8String(str); + if (str) { + char *cstr; + Py_ssize_t len; + if (PyBytes_AsStringAndSize(str, &cstr, &len) != -1) { + newstr = (char *) malloc(len+1); + if (newstr) + memcpy(newstr, cstr, len+1); + } + Py_XDECREF(str); + } + return newstr; +#else + return PyString_AsString(str); +#endif +} + +#if PY_VERSION_HEX >= 0x03030000 || PY_VERSION_HEX < 0x03000000 +# define SWIG_Python_str_DelForPy3(x) +#else +# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) +#endif + + +SWIGINTERN PyObject* +SWIG_Python_str_FromChar(const char *c) +{ +#if PY_VERSION_HEX >= 0x03000000 + return PyUnicode_FromString(c); +#else + return PyString_FromString(c); +#endif +} + +#ifndef PyObject_DEL +# define PyObject_DEL PyObject_Del +#endif + +// SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user +// interface files check for it. +# define SWIGPY_USE_CAPSULE +# define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) + +#if PY_VERSION_HEX < 0x03020000 +#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) +#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) +#define Py_hash_t long +#endif + +/* ----------------------------------------------------------------------------- + * error manipulation + * ----------------------------------------------------------------------------- */ + +SWIGRUNTIME PyObject* +SWIG_Python_ErrorType(int code) { + PyObject* type = 0; + switch(code) { + case SWIG_MemoryError: + type = PyExc_MemoryError; + break; + case SWIG_IOError: + type = PyExc_IOError; + break; + case SWIG_RuntimeError: + type = PyExc_RuntimeError; + break; + case SWIG_IndexError: + type = PyExc_IndexError; + break; + case SWIG_TypeError: + type = PyExc_TypeError; + break; + case SWIG_DivisionByZero: + type = PyExc_ZeroDivisionError; + break; + case SWIG_OverflowError: + type = PyExc_OverflowError; + break; + case SWIG_SyntaxError: + type = PyExc_SyntaxError; + break; + case SWIG_ValueError: + type = PyExc_ValueError; + break; + case SWIG_SystemError: + type = PyExc_SystemError; + break; + case SWIG_AttributeError: + type = PyExc_AttributeError; + break; + default: + type = PyExc_RuntimeError; + } + return type; +} + + +SWIGRUNTIME void +SWIG_Python_AddErrorMsg(const char* mesg) +{ + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + + if (PyErr_Occurred()) + PyErr_Fetch(&type, &value, &traceback); + if (value) { + PyObject *old_str = PyObject_Str(value); + const char *tmp = SWIG_Python_str_AsChar(old_str); + PyErr_Clear(); + Py_XINCREF(type); + if (tmp) + PyErr_Format(type, "%s %s", tmp, mesg); + else + PyErr_Format(type, "%s", mesg); + SWIG_Python_str_DelForPy3(tmp); + Py_DECREF(old_str); + Py_DECREF(value); + } else { + PyErr_SetString(PyExc_RuntimeError, mesg); + } +} + +SWIGRUNTIME int +SWIG_Python_TypeErrorOccurred(PyObject *obj) +{ + PyObject *error; + if (obj) + return 0; + error = PyErr_Occurred(); + return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError); +} + +SWIGRUNTIME void +SWIG_Python_RaiseOrModifyTypeError(const char *message) +{ + if (SWIG_Python_TypeErrorOccurred(NULL)) { + /* Use existing TypeError to preserve stacktrace and enhance with given message */ + PyObject *newvalue; + PyObject *type = NULL, *value = NULL, *traceback = NULL; + PyErr_Fetch(&type, &value, &traceback); +#if PY_VERSION_HEX >= 0x03000000 + newvalue = PyUnicode_FromFormat("%S\nAdditional information:\n%s", value, message); +#else + newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); +#endif + Py_XDECREF(value); + PyErr_Restore(type, newvalue, traceback); + } else { + /* Raise TypeError using given message */ + PyErr_SetString(PyExc_TypeError, message); + } +} + +#if defined(SWIG_PYTHON_NO_THREADS) +# if defined(SWIG_PYTHON_THREADS) +# undef SWIG_PYTHON_THREADS +# endif +#endif +#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ +# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) +# define SWIG_PYTHON_USE_GIL +# endif +# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ +# ifndef SWIG_PYTHON_INITIALIZE_THREADS +# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() +# endif +# ifdef __cplusplus /* C++ code */ + class SWIG_Python_Thread_Block { + bool status; + PyGILState_STATE state; + public: + void end() { if (status) { PyGILState_Release(state); status = false;} } + SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} + ~SWIG_Python_Thread_Block() { end(); } + }; + class SWIG_Python_Thread_Allow { + bool status; + PyThreadState *save; + public: + void end() { if (status) { PyEval_RestoreThread(save); status = false; }} + SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} + ~SWIG_Python_Thread_Allow() { end(); } + }; +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block +# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow +# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() +# else /* C code */ +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() +# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() +# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) +# endif +# else /* Old thread way, not implemented, user must provide it */ +# if !defined(SWIG_PYTHON_INITIALIZE_THREADS) +# define SWIG_PYTHON_INITIALIZE_THREADS +# endif +# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK +# endif +# if !defined(SWIG_PYTHON_THREAD_END_BLOCK) +# define SWIG_PYTHON_THREAD_END_BLOCK +# endif +# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW +# endif +# if !defined(SWIG_PYTHON_THREAD_END_ALLOW) +# define SWIG_PYTHON_THREAD_END_ALLOW +# endif +# endif +#else /* No thread support */ +# define SWIG_PYTHON_INITIALIZE_THREADS +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK +# define SWIG_PYTHON_THREAD_END_BLOCK +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW +# define SWIG_PYTHON_THREAD_END_ALLOW +#endif + +/* ----------------------------------------------------------------------------- + * Python API portion that goes into the runtime + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* ----------------------------------------------------------------------------- + * Constant declarations + * ----------------------------------------------------------------------------- */ + +/* Constant Types */ +#define SWIG_PY_POINTER 4 +#define SWIG_PY_BINARY 5 + +/* Constant information structure */ +typedef struct swig_const_info { + int type; + const char *name; + long lvalue; + double dvalue; + void *pvalue; + swig_type_info **ptype; +} swig_const_info; + +#ifdef __cplusplus +} +#endif + + +/* ----------------------------------------------------------------------------- + * pyrun.swg + * + * This file contains the runtime support for Python modules + * and includes code for managing global variables and pointer + * type checking. + * + * ----------------------------------------------------------------------------- */ + +#if PY_VERSION_HEX < 0x02070000 /* 2.7.0 */ +# error "This version of SWIG only supports Python >= 2.7" +#endif + +#if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03020000 +# error "This version of SWIG only supports Python 3 >= 3.2" +#endif + +/* Common SWIG API */ + +/* for raw pointers */ +#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) +#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) +#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) + +#ifdef SWIGPYTHON_BUILTIN +#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags) +#else +#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) +#endif + +#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) + +#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) +#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) +#define swig_owntype int + +/* for raw packed data */ +#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) + +/* for class or struct pointers */ +#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) +#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) + +/* for C or C++ function pointers */ +#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) +#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0) + +/* for C++ member pointers, ie, member methods */ +#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) + + +/* Runtime API */ + +#define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata) +#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) +#define SWIG_NewClientData(obj) SwigPyClientData_New(obj) + +#define SWIG_SetErrorObj SWIG_Python_SetErrorObj +#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg +#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) +#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) +#define SWIG_fail goto fail + + +/* Runtime API implementation */ + +/* Error manipulation */ + +SWIGINTERN void +SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetObject(errtype, obj); + Py_DECREF(obj); + SWIG_PYTHON_THREAD_END_BLOCK; +} + +SWIGINTERN void +SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetString(errtype, msg); + SWIG_PYTHON_THREAD_END_BLOCK; +} + +#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) + +/* Set a constant value */ + +#if defined(SWIGPYTHON_BUILTIN) + +SWIGINTERN void +SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { + PyObject *s = PyString_InternFromString(key); + PyList_Append(seq, s); + Py_DECREF(s); +} + +SWIGINTERN void +SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { + PyDict_SetItemString(d, name, obj); + Py_DECREF(obj); + if (public_interface) + SwigPyBuiltin_AddPublicSymbol(public_interface, name); +} + +#else + +SWIGINTERN void +SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { + PyDict_SetItemString(d, name, obj); + Py_DECREF(obj); +} + +#endif + +/* Append a value to the result obj */ + +SWIGINTERN PyObject* +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { + if (!result) { + result = obj; + } else if (result == Py_None) { + Py_DECREF(result); + result = obj; + } else { + if (!PyList_Check(result)) { + PyObject *o2 = result; + result = PyList_New(1); + PyList_SetItem(result, 0, o2); + } + PyList_Append(result,obj); + Py_DECREF(obj); + } + return result; +} + +/* Unpack the argument tuple */ + +SWIGINTERN Py_ssize_t +SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) +{ + if (!args) { + if (!min && !max) { + return 1; + } else { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", + name, (min == max ? "" : "at least "), (int)min); + return 0; + } + } + if (!PyTuple_Check(args)) { + if (min <= 1 && max >= 1) { + Py_ssize_t i; + objs[0] = args; + for (i = 1; i < max; ++i) { + objs[i] = 0; + } + return 2; + } + PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); + return 0; + } else { + Py_ssize_t l = PyTuple_GET_SIZE(args); + if (l < min) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at least "), (int)min, (int)l); + return 0; + } else if (l > max) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at most "), (int)max, (int)l); + return 0; + } else { + Py_ssize_t i; + for (i = 0; i < l; ++i) { + objs[i] = PyTuple_GET_ITEM(args, i); + } + for (; l < max; ++l) { + objs[l] = 0; + } + return i + 1; + } + } +} + +SWIGINTERN int +SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name) { + int no_kwargs = 1; + if (kwargs) { + assert(PyDict_Check(kwargs)); + if (PyDict_Size(kwargs) > 0) { + PyErr_Format(PyExc_TypeError, "%s() does not take keyword arguments", name); + no_kwargs = 0; + } + } + return no_kwargs; +} + +/* A functor is a function object with one single object argument */ +#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); + +/* + Helper for static pointer initialization for both C and C++ code, for example + static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); +*/ +#ifdef __cplusplus +#define SWIG_STATIC_POINTER(var) var +#else +#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var +#endif + +/* ----------------------------------------------------------------------------- + * Pointer declarations + * ----------------------------------------------------------------------------- */ + +/* Flags for new pointer objects */ +#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) +#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) + +#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) + +#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2) +#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN) + +#ifdef __cplusplus +extern "C" { +#endif + +/* The python void return value */ + +SWIGRUNTIMEINLINE PyObject * +SWIG_Py_Void(void) +{ + PyObject *none = Py_None; + Py_INCREF(none); + return none; +} + +/* SwigPyClientData */ + +typedef struct { + PyObject *klass; + PyObject *newraw; + PyObject *newargs; + PyObject *destroy; + int delargs; + int implicitconv; + PyTypeObject *pytype; +} SwigPyClientData; + +SWIGRUNTIMEINLINE int +SWIG_Python_CheckImplicit(swig_type_info *ty) +{ + SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; + int fail = data ? data->implicitconv : 0; + if (fail) + PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors."); + return fail; +} + +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_ExceptionType(swig_type_info *desc) { + SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; + PyObject *klass = data ? data->klass : 0; + return (klass ? klass : PyExc_RuntimeError); +} + + +SWIGRUNTIME SwigPyClientData * +SwigPyClientData_New(PyObject* obj) +{ + if (!obj) { + return 0; + } else { + SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); + /* the klass element */ + data->klass = obj; + Py_INCREF(data->klass); + /* the newraw method and newargs arguments used to create a new raw instance */ + if (PyClass_Check(obj)) { + data->newraw = 0; + data->newargs = obj; + Py_INCREF(obj); + } else { + data->newraw = PyObject_GetAttrString(data->klass, "__new__"); + if (data->newraw) { + Py_INCREF(data->newraw); + data->newargs = PyTuple_New(1); + PyTuple_SetItem(data->newargs, 0, obj); + } else { + data->newargs = obj; + } + Py_INCREF(data->newargs); + } + /* the destroy method, aka as the C++ delete method */ + data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__"); + if (PyErr_Occurred()) { + PyErr_Clear(); + data->destroy = 0; + } + if (data->destroy) { + int flags; + Py_INCREF(data->destroy); + flags = PyCFunction_GET_FLAGS(data->destroy); + data->delargs = !(flags & (METH_O)); + } else { + data->delargs = 0; + } + data->implicitconv = 0; + data->pytype = 0; + return data; + } +} + +SWIGRUNTIME void +SwigPyClientData_Del(SwigPyClientData *data) { + Py_XDECREF(data->newraw); + Py_XDECREF(data->newargs); + Py_XDECREF(data->destroy); +} + +/* =============== SwigPyObject =====================*/ + +typedef struct { + PyObject_HEAD + void *ptr; + swig_type_info *ty; + int own; + PyObject *next; +#ifdef SWIGPYTHON_BUILTIN + PyObject *dict; +#endif +} SwigPyObject; + + +#ifdef SWIGPYTHON_BUILTIN + +SWIGRUNTIME PyObject * +SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) +{ + SwigPyObject *sobj = (SwigPyObject *)v; + + if (!sobj->dict) + sobj->dict = PyDict_New(); + + Py_INCREF(sobj->dict); + return sobj->dict; +} + +#endif + +SWIGRUNTIME PyObject * +SwigPyObject_long(SwigPyObject *v) +{ + return PyLong_FromVoidPtr(v->ptr); +} + +SWIGRUNTIME PyObject * +SwigPyObject_format(const char* fmt, SwigPyObject *v) +{ + PyObject *res = NULL; + PyObject *args = PyTuple_New(1); + if (args) { + if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { + PyObject *ofmt = SWIG_Python_str_FromChar(fmt); + if (ofmt) { +#if PY_VERSION_HEX >= 0x03000000 + res = PyUnicode_Format(ofmt,args); +#else + res = PyString_Format(ofmt,args); +#endif + Py_DECREF(ofmt); + } + Py_DECREF(args); + } + } + return res; +} + +SWIGRUNTIME PyObject * +SwigPyObject_oct(SwigPyObject *v) +{ + return SwigPyObject_format("%o",v); +} + +SWIGRUNTIME PyObject * +SwigPyObject_hex(SwigPyObject *v) +{ + return SwigPyObject_format("%x",v); +} + +SWIGRUNTIME PyObject * +SwigPyObject_repr(SwigPyObject *v) +{ + const char *name = SWIG_TypePrettyName(v->ty); + PyObject *repr = SWIG_Python_str_FromFormat("", (name ? name : "unknown"), (void *)v); + if (v->next) { + PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); +# if PY_VERSION_HEX >= 0x03000000 + PyObject *joined = PyUnicode_Concat(repr, nrep); + Py_DecRef(repr); + Py_DecRef(nrep); + repr = joined; +# else + PyString_ConcatAndDel(&repr,nrep); +# endif + } + return repr; +} + +/* We need a version taking two PyObject* parameters so it's a valid + * PyCFunction to use in swigobject_methods[]. */ +SWIGRUNTIME PyObject * +SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) +{ + return SwigPyObject_repr((SwigPyObject*)v); +} + +SWIGRUNTIME int +SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) +{ + void *i = v->ptr; + void *j = w->ptr; + return (i < j) ? -1 : ((i > j) ? 1 : 0); +} + +/* Added for Python 3.x, would it also be useful for Python 2.x? */ +SWIGRUNTIME PyObject* +SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) +{ + PyObject* res; + if( op != Py_EQ && op != Py_NE ) { + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; + } + res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); + return res; +} + + +SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void); + +#ifdef SWIGPYTHON_BUILTIN +static swig_type_info *SwigPyObject_stype = 0; +SWIGRUNTIME PyTypeObject* +SwigPyObject_type(void) { + SwigPyClientData *cd; + assert(SwigPyObject_stype); + cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; + assert(cd); + assert(cd->pytype); + return cd->pytype; +} +#else +SWIGRUNTIME PyTypeObject* +SwigPyObject_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce(); + return type; +} +#endif + +SWIGRUNTIMEINLINE int +SwigPyObject_Check(PyObject *op) { +#ifdef SWIGPYTHON_BUILTIN + PyTypeObject *target_tp = SwigPyObject_type(); + if (PyType_IsSubtype(op->ob_type, target_tp)) + return 1; + return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0); +#else + return (Py_TYPE(op) == SwigPyObject_type()) + || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); +#endif +} + +SWIGRUNTIME PyObject * +SwigPyObject_New(void *ptr, swig_type_info *ty, int own); + +SWIGRUNTIME void +SwigPyObject_dealloc(PyObject *v) +{ + SwigPyObject *sobj = (SwigPyObject *) v; + PyObject *next = sobj->next; + if (sobj->own == SWIG_POINTER_OWN) { + swig_type_info *ty = sobj->ty; + SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; + PyObject *destroy = data ? data->destroy : 0; + if (destroy) { + /* destroy is always a VARARGS method */ + PyObject *res; + + /* PyObject_CallFunction() has the potential to silently drop + the active exception. In cases of unnamed temporary + variable or where we just finished iterating over a generator + StopIteration will be active right now, and this needs to + remain true upon return from SwigPyObject_dealloc. So save + and restore. */ + + PyObject *type = NULL, *value = NULL, *traceback = NULL; + PyErr_Fetch(&type, &value, &traceback); + + if (data->delargs) { + /* we need to create a temporary object to carry the destroy operation */ + PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); + res = SWIG_Python_CallFunctor(destroy, tmp); + Py_DECREF(tmp); + } else { + PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); + PyObject *mself = PyCFunction_GET_SELF(destroy); + res = ((*meth)(mself, v)); + } + if (!res) + PyErr_WriteUnraisable(destroy); + + PyErr_Restore(type, value, traceback); + + Py_XDECREF(res); + } +#if !defined(SWIG_PYTHON_SILENT_MEMLEAK) + else { + const char *name = SWIG_TypePrettyName(ty); + printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); + } +#endif + } + Py_XDECREF(next); + PyObject_DEL(v); +} + +SWIGRUNTIME PyObject* +SwigPyObject_append(PyObject* v, PyObject* next) +{ + SwigPyObject *sobj = (SwigPyObject *) v; + if (!SwigPyObject_Check(next)) { + PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject"); + return NULL; + } + sobj->next = next; + Py_INCREF(next); + return SWIG_Py_Void(); +} + +SWIGRUNTIME PyObject* +SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +{ + SwigPyObject *sobj = (SwigPyObject *) v; + if (sobj->next) { + Py_INCREF(sobj->next); + return sobj->next; + } else { + return SWIG_Py_Void(); + } +} + +SWIGINTERN PyObject* +SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +{ + SwigPyObject *sobj = (SwigPyObject *)v; + sobj->own = 0; + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject* +SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +{ + SwigPyObject *sobj = (SwigPyObject *)v; + sobj->own = SWIG_POINTER_OWN; + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject* +SwigPyObject_own(PyObject *v, PyObject *args) +{ + PyObject *val = 0; + if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) { + return NULL; + } else { + SwigPyObject *sobj = (SwigPyObject *)v; + PyObject *obj = PyBool_FromLong(sobj->own); + if (val) { + if (PyObject_IsTrue(val)) { + SwigPyObject_acquire(v,args); + } else { + SwigPyObject_disown(v,args); + } + } + return obj; + } +} + +static PyMethodDef +swigobject_methods[] = { + {"disown", SwigPyObject_disown, METH_NOARGS, "releases ownership of the pointer"}, + {"acquire", SwigPyObject_acquire, METH_NOARGS, "acquires ownership of the pointer"}, + {"own", SwigPyObject_own, METH_VARARGS, "returns/sets ownership of the pointer"}, + {"append", SwigPyObject_append, METH_O, "appends another 'this' object"}, + {"next", SwigPyObject_next, METH_NOARGS, "returns the next 'this' object"}, + {"__repr__",SwigPyObject_repr2, METH_NOARGS, "returns object representation"}, + {0, 0, 0, 0} +}; + +SWIGRUNTIME PyTypeObject* +SwigPyObject_TypeOnce(void) { + static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; + + static PyNumberMethods SwigPyObject_as_number = { + (binaryfunc)0, /*nb_add*/ + (binaryfunc)0, /*nb_subtract*/ + (binaryfunc)0, /*nb_multiply*/ + /* nb_divide removed in Python 3 */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc)0, /*nb_divide*/ +#endif + (binaryfunc)0, /*nb_remainder*/ + (binaryfunc)0, /*nb_divmod*/ + (ternaryfunc)0,/*nb_power*/ + (unaryfunc)0, /*nb_negative*/ + (unaryfunc)0, /*nb_positive*/ + (unaryfunc)0, /*nb_absolute*/ + (inquiry)0, /*nb_nonzero*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ +#if PY_VERSION_HEX < 0x03000000 + 0, /*nb_coerce*/ +#endif + (unaryfunc)SwigPyObject_long, /*nb_int*/ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc)SwigPyObject_long, /*nb_long*/ +#else + 0, /*nb_reserved*/ +#endif + (unaryfunc)0, /*nb_float*/ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc)SwigPyObject_oct, /*nb_oct*/ + (unaryfunc)SwigPyObject_hex, /*nb_hex*/ +#endif +#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */ +#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ +#else + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ +#endif + }; + + static PyTypeObject swigpyobject_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp = { +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + "SwigPyObject", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)SwigPyObject_dealloc, /* tp_dealloc */ + 0, /* tp_print */ + (getattrfunc)0, /* tp_getattr */ + (setattrfunc)0, /* tp_setattr */ +#if PY_VERSION_HEX >= 0x03000000 + 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ +#else + (cmpfunc)SwigPyObject_compare, /* tp_compare */ +#endif + (reprfunc)SwigPyObject_repr, /* tp_repr */ + &SwigPyObject_as_number, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + 0, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigobject_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ + 0, /* tp_weaklistoffset */ + 0, /* tp_iter */ + 0, /* tp_iternext */ + swigobject_methods, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ + 0, /* tp_del */ + 0, /* tp_version_tag */ +#if PY_VERSION_HEX >= 0x03040000 + 0, /* tp_finalize */ +#endif +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif +#ifdef COUNT_ALLOCS + 0, /* tp_allocs */ + 0, /* tp_frees */ + 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0 /* tp_next */ +#endif + }; + swigpyobject_type = tmp; + type_init = 1; + if (PyType_Ready(&swigpyobject_type) < 0) + return NULL; + } + return &swigpyobject_type; +} + +SWIGRUNTIME PyObject * +SwigPyObject_New(void *ptr, swig_type_info *ty, int own) +{ + SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); + if (sobj) { + sobj->ptr = ptr; + sobj->ty = ty; + sobj->own = own; + sobj->next = 0; + } + return (PyObject *)sobj; +} + +/* ----------------------------------------------------------------------------- + * Implements a simple Swig Packed type, and use it instead of string + * ----------------------------------------------------------------------------- */ + +typedef struct { + PyObject_HEAD + void *pack; + swig_type_info *ty; + size_t size; +} SwigPyPacked; + +SWIGRUNTIME PyObject * +SwigPyPacked_repr(SwigPyPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { + return SWIG_Python_str_FromFormat("", result, v->ty->name); + } else { + return SWIG_Python_str_FromFormat("", v->ty->name); + } +} + +SWIGRUNTIME PyObject * +SwigPyPacked_str(SwigPyPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ + return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); + } else { + return SWIG_Python_str_FromChar(v->ty->name); + } +} + +SWIGRUNTIME int +SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) +{ + size_t i = v->size; + size_t j = w->size; + int s = (i < j) ? -1 : ((i > j) ? 1 : 0); + return s ? s : strncmp((const char *)v->pack, (const char *)w->pack, 2*v->size); +} + +SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); + +SWIGRUNTIME PyTypeObject* +SwigPyPacked_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce(); + return type; +} + +SWIGRUNTIMEINLINE int +SwigPyPacked_Check(PyObject *op) { + return ((op)->ob_type == SwigPyPacked_TypeOnce()) + || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); +} + +SWIGRUNTIME void +SwigPyPacked_dealloc(PyObject *v) +{ + if (SwigPyPacked_Check(v)) { + SwigPyPacked *sobj = (SwigPyPacked *) v; + free(sobj->pack); + } + PyObject_DEL(v); +} + +SWIGRUNTIME PyTypeObject* +SwigPyPacked_TypeOnce(void) { + static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; + static PyTypeObject swigpypacked_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp = { +#if PY_VERSION_HEX>=0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + "SwigPyPacked", /* tp_name */ + sizeof(SwigPyPacked), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ + 0, /* tp_print */ + (getattrfunc)0, /* tp_getattr */ + (setattrfunc)0, /* tp_setattr */ +#if PY_VERSION_HEX>=0x03000000 + 0, /* tp_reserved in 3.0.1 */ +#else + (cmpfunc)SwigPyPacked_compare, /* tp_compare */ +#endif + (reprfunc)SwigPyPacked_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + (reprfunc)SwigPyPacked_str, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigpacked_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + 0, /* tp_iter */ + 0, /* tp_iternext */ + 0, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ + 0, /* tp_del */ + 0, /* tp_version_tag */ +#if PY_VERSION_HEX >= 0x03040000 + 0, /* tp_finalize */ +#endif +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif +#ifdef COUNT_ALLOCS + 0, /* tp_allocs */ + 0, /* tp_frees */ + 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0 /* tp_next */ +#endif + }; + swigpypacked_type = tmp; + type_init = 1; + if (PyType_Ready(&swigpypacked_type) < 0) + return NULL; + } + return &swigpypacked_type; +} + +SWIGRUNTIME PyObject * +SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) +{ + SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); + if (sobj) { + void *pack = malloc(size); + if (pack) { + memcpy(pack, ptr, size); + sobj->pack = pack; + sobj->ty = ty; + sobj->size = size; + } else { + PyObject_DEL((PyObject *) sobj); + sobj = 0; + } + } + return (PyObject *) sobj; +} + +SWIGRUNTIME swig_type_info * +SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) +{ + if (SwigPyPacked_Check(obj)) { + SwigPyPacked *sobj = (SwigPyPacked *)obj; + if (sobj->size != size) return 0; + memcpy(ptr, sobj->pack, size); + return sobj->ty; + } else { + return 0; + } +} + +/* ----------------------------------------------------------------------------- + * pointers/data manipulation + * ----------------------------------------------------------------------------- */ + +static PyObject *Swig_This_global = NULL; + +SWIGRUNTIME PyObject * +SWIG_This(void) +{ + if (Swig_This_global == NULL) + Swig_This_global = SWIG_Python_str_FromChar("this"); + return Swig_This_global; +} + +/* #define SWIG_PYTHON_SLOW_GETSET_THIS */ + +/* TODO: I don't know how to implement the fast getset in Python 3 right now */ +#if PY_VERSION_HEX>=0x03000000 +#define SWIG_PYTHON_SLOW_GETSET_THIS +#endif + +SWIGRUNTIME SwigPyObject * +SWIG_Python_GetSwigThis(PyObject *pyobj) +{ + PyObject *obj; + + if (SwigPyObject_Check(pyobj)) + return (SwigPyObject *) pyobj; + +#ifdef SWIGPYTHON_BUILTIN + (void)obj; +# ifdef PyWeakref_CheckProxy + if (PyWeakref_CheckProxy(pyobj)) { + pyobj = PyWeakref_GET_OBJECT(pyobj); + if (pyobj && SwigPyObject_Check(pyobj)) + return (SwigPyObject*) pyobj; + } +# endif + return NULL; +#else + + obj = 0; + +#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + if (PyInstance_Check(pyobj)) { + obj = _PyInstance_Lookup(pyobj, SWIG_This()); + } else { + PyObject **dictptr = _PyObject_GetDictPtr(pyobj); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; + } else { +#ifdef PyWeakref_CheckProxy + if (PyWeakref_CheckProxy(pyobj)) { + PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); + return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; + } +#endif + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } + } + } +#else + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } +#endif + if (obj && !SwigPyObject_Check(obj)) { + /* a PyObject is called 'this', try to get the 'real this' + SwigPyObject from it */ + return SWIG_Python_GetSwigThis(obj); + } + return (SwigPyObject *)obj; +#endif +} + +/* Acquire a pointer value */ + +SWIGRUNTIME int +SWIG_Python_AcquirePtr(PyObject *obj, int own) { + if (own == SWIG_POINTER_OWN) { + SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); + if (sobj) { + int oldown = sobj->own; + sobj->own = own; + return oldown; + } + } + return 0; +} + +/* Convert a pointer value */ + +SWIGRUNTIME int +SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { + int res; + SwigPyObject *sobj; + int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0; + + if (!obj) + return SWIG_ERROR; + if (obj == Py_None && !implicit_conv) { + if (ptr) + *ptr = 0; + return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK; + } + + res = SWIG_ERROR; + + sobj = SWIG_Python_GetSwigThis(obj); + if (own) + *own = 0; + while (sobj) { + void *vptr = sobj->ptr; + if (ty) { + swig_type_info *to = sobj->ty; + if (to == ty) { + /* no type cast needed */ + if (ptr) *ptr = vptr; + break; + } else { + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) { + sobj = (SwigPyObject *)sobj->next; + } else { + if (ptr) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + if (newmemory == SWIG_CAST_NEW_MEMORY) { + assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ + if (own) + *own = *own | SWIG_CAST_NEW_MEMORY; + } + } + break; + } + } + } else { + if (ptr) *ptr = vptr; + break; + } + } + if (sobj) { + if (own) + *own = *own | sobj->own; + if (flags & SWIG_POINTER_DISOWN) { + sobj->own = 0; + } + res = SWIG_OK; + } else { + if (implicit_conv) { + SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; + if (data && !data->implicitconv) { + PyObject *klass = data->klass; + if (klass) { + PyObject *impconv; + data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ + impconv = SWIG_Python_CallFunctor(klass, obj); + data->implicitconv = 0; + if (PyErr_Occurred()) { + PyErr_Clear(); + impconv = 0; + } + if (impconv) { + SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); + if (iobj) { + void *vptr; + res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); + if (SWIG_IsOK(res)) { + if (ptr) { + *ptr = vptr; + /* transfer the ownership to 'ptr' */ + iobj->own = 0; + res = SWIG_AddCast(res); + res = SWIG_AddNewMask(res); + } else { + res = SWIG_AddCast(res); + } + } + } + Py_DECREF(impconv); + } + } + } + if (!SWIG_IsOK(res) && obj == Py_None) { + if (ptr) + *ptr = 0; + if (PyErr_Occurred()) + PyErr_Clear(); + res = SWIG_OK; + } + } + } + return res; +} + +/* Convert a function ptr value */ + +SWIGRUNTIME int +SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { + if (!PyCFunction_Check(obj)) { + return SWIG_ConvertPtr(obj, ptr, ty, 0); + } else { + void *vptr = 0; + swig_cast_info *tc; + + /* here we get the method pointer for callbacks */ + const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); + const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; + if (desc) + desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; + if (!desc) + return SWIG_ERROR; + tc = SWIG_TypeCheck(desc,ty); + if (tc) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ + } else { + return SWIG_ERROR; + } + return SWIG_OK; + } +} + +/* Convert a packed pointer value */ + +SWIGRUNTIME int +SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { + swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); + if (!to) return SWIG_ERROR; + if (ty) { + if (to != ty) { + /* check type cast? */ + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) return SWIG_ERROR; + } + } + return SWIG_OK; +} + +/* ----------------------------------------------------------------------------- + * Create a new pointer object + * ----------------------------------------------------------------------------- */ + +/* + Create a new instance object, without calling __init__, and set the + 'this' attribute. +*/ + +SWIGRUNTIME PyObject* +SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) +{ + PyObject *inst = 0; + PyObject *newraw = data->newraw; + if (newraw) { + inst = PyObject_Call(newraw, data->newargs, NULL); + if (inst) { +#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + PyDict_SetItem(dict, SWIG_This(), swig_this); + } + } +#else + if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { + Py_DECREF(inst); + inst = 0; + } +#endif + } + } else { +#if PY_VERSION_HEX >= 0x03000000 + PyObject *empty_args = PyTuple_New(0); + if (empty_args) { + PyObject *empty_kwargs = PyDict_New(); + if (empty_kwargs) { + inst = ((PyTypeObject *)data->newargs)->tp_new((PyTypeObject *)data->newargs, empty_args, empty_kwargs); + Py_DECREF(empty_kwargs); + if (inst) { + if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { + Py_DECREF(inst); + inst = 0; + } else { + Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; + } + } + } + Py_DECREF(empty_args); + } +#else + PyObject *dict = PyDict_New(); + if (dict) { + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); + } +#endif + } + return inst; +} + +SWIGRUNTIME int +SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) +{ +#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + } + return PyDict_SetItem(dict, SWIG_This(), swig_this); + } +#endif + return PyObject_SetAttr(inst, SWIG_This(), swig_this); +} + + +SWIGINTERN PyObject * +SWIG_Python_InitShadowInstance(PyObject *args) { + PyObject *obj[2]; + if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) { + return NULL; + } else { + SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); + if (sthis) { + SwigPyObject_append((PyObject*) sthis, obj[1]); + } else { + if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) + return NULL; + } + return SWIG_Py_Void(); + } +} + +/* Create a new pointer object */ + +SWIGRUNTIME PyObject * +SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) { + SwigPyClientData *clientdata; + PyObject * robj; + int own; + + if (!ptr) + return SWIG_Py_Void(); + + clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; + own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; + if (clientdata && clientdata->pytype) { + SwigPyObject *newobj; + if (flags & SWIG_BUILTIN_TP_INIT) { + newobj = (SwigPyObject*) self; + if (newobj->ptr) { + PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0); + while (newobj->next) + newobj = (SwigPyObject *) newobj->next; + newobj->next = next_self; + newobj = (SwigPyObject *)next_self; +#ifdef SWIGPYTHON_BUILTIN + newobj->dict = 0; +#endif + } + } else { + newobj = PyObject_New(SwigPyObject, clientdata->pytype); +#ifdef SWIGPYTHON_BUILTIN + newobj->dict = 0; +#endif + } + if (newobj) { + newobj->ptr = ptr; + newobj->ty = type; + newobj->own = own; + newobj->next = 0; + return (PyObject*) newobj; + } + return SWIG_Py_Void(); + } + + assert(!(flags & SWIG_BUILTIN_TP_INIT)); + + robj = SwigPyObject_New(ptr, type, own); + if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { + PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); + Py_DECREF(robj); + robj = inst; + } + return robj; +} + +/* Create a new packed object */ + +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { + return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); +} + +/* -----------------------------------------------------------------------------* + * Get type list + * -----------------------------------------------------------------------------*/ + +#ifdef SWIG_LINK_RUNTIME +void *SWIG_ReturnGlobalTypeList(void *); +#endif + +SWIGRUNTIME swig_module_info * +SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { + static void *type_pointer = (void *)0; + /* first check if module already created */ + if (!type_pointer) { +#ifdef SWIG_LINK_RUNTIME + type_pointer = SWIG_ReturnGlobalTypeList((void *)0); +#else + type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); + if (PyErr_Occurred()) { + PyErr_Clear(); + type_pointer = (void *)0; + } +#endif + } + return (swig_module_info *) type_pointer; +} + +SWIGRUNTIME void +SWIG_Python_DestroyModule(PyObject *obj) +{ + swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); + swig_type_info **types = swig_module->types; + size_t i; + for (i =0; i < swig_module->size; ++i) { + swig_type_info *ty = types[i]; + if (ty->owndata) { + SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; + if (data) SwigPyClientData_Del(data); + } + } + Py_DECREF(SWIG_This()); + Swig_This_global = NULL; +} + +SWIGRUNTIME void +SWIG_Python_SetModule(swig_module_info *swig_module) { +#if PY_VERSION_HEX >= 0x03000000 + /* Add a dummy module object into sys.modules */ + PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION); +#else + static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ + PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); +#endif + PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); + if (pointer && module) { + PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); + } else { + Py_XDECREF(pointer); + } +} + +/* The python cached type query */ +SWIGRUNTIME PyObject * +SWIG_Python_TypeCache(void) { + static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); + return cache; +} + +SWIGRUNTIME swig_type_info * +SWIG_Python_TypeQuery(const char *type) +{ + PyObject *cache = SWIG_Python_TypeCache(); + PyObject *key = SWIG_Python_str_FromChar(type); + PyObject *obj = PyDict_GetItem(cache, key); + swig_type_info *descriptor; + if (obj) { + descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); + } else { + swig_module_info *swig_module = SWIG_GetModule(0); + descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); + if (descriptor) { + obj = PyCapsule_New((void*) descriptor, NULL, NULL); + PyDict_SetItem(cache, key, obj); + Py_DECREF(obj); + } + } + Py_DECREF(key); + return descriptor; +} + +/* + For backward compatibility only +*/ +#define SWIG_POINTER_EXCEPTION 0 +#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) +#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) + +SWIGRUNTIME int +SWIG_Python_AddErrMesg(const char* mesg, int infront) +{ + if (PyErr_Occurred()) { + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + PyErr_Fetch(&type, &value, &traceback); + if (value) { + PyObject *old_str = PyObject_Str(value); + const char *tmp = SWIG_Python_str_AsChar(old_str); + const char *errmesg = tmp ? tmp : "Invalid error message"; + Py_XINCREF(type); + PyErr_Clear(); + if (infront) { + PyErr_Format(type, "%s %s", mesg, errmesg); + } else { + PyErr_Format(type, "%s %s", errmesg, mesg); + } + SWIG_Python_str_DelForPy3(tmp); + Py_DECREF(old_str); + } + return 1; + } else { + return 0; + } +} + +SWIGRUNTIME int +SWIG_Python_ArgFail(int argnum) +{ + if (PyErr_Occurred()) { + /* add information about failing argument */ + char mesg[256]; + PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); + return SWIG_Python_AddErrMesg(mesg, 1); + } else { + return 0; + } +} + +SWIGRUNTIMEINLINE const char * +SwigPyObject_GetDesc(PyObject *self) +{ + SwigPyObject *v = (SwigPyObject *)self; + swig_type_info *ty = v ? v->ty : 0; + return ty ? ty->str : ""; +} + +SWIGRUNTIME void +SWIG_Python_TypeError(const char *type, PyObject *obj) +{ + if (type) { +#if defined(SWIG_COBJECT_TYPES) + if (obj && SwigPyObject_Check(obj)) { + const char *otype = (const char *) SwigPyObject_GetDesc(obj); + if (otype) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", + type, otype); + return; + } + } else +#endif + { + const char *otype = (obj ? obj->ob_type->tp_name : 0); + if (otype) { + PyObject *str = PyObject_Str(obj); + const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; + if (cstr) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", + type, otype, cstr); + SWIG_Python_str_DelForPy3(cstr); + } else { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", + type, otype); + } + Py_XDECREF(str); + return; + } + } + PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); + } else { + PyErr_Format(PyExc_TypeError, "unexpected type is received"); + } +} + + +/* Convert a pointer value, signal an exception on a type mismatch */ +SWIGRUNTIME void * +SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) { + void *result; + if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { + PyErr_Clear(); +#if SWIG_POINTER_EXCEPTION + if (flags) { + SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); + SWIG_Python_ArgFail(argnum); + } +#endif + } + return result; +} + +#ifdef SWIGPYTHON_BUILTIN +SWIGRUNTIME int +SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { + PyTypeObject *tp = obj->ob_type; + PyObject *descr; + PyObject *encoded_name; + descrsetfunc f; + int res = -1; + +# ifdef Py_USING_UNICODE + if (PyString_Check(name)) { + name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL); + if (!name) + return -1; + } else if (!PyUnicode_Check(name)) +# else + if (!PyString_Check(name)) +# endif + { + PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); + return -1; + } else { + Py_INCREF(name); + } + + if (!tp->tp_dict) { + if (PyType_Ready(tp) < 0) + goto done; + } + + descr = _PyType_Lookup(tp, name); + f = NULL; + if (descr != NULL) + f = descr->ob_type->tp_descr_set; + if (!f) { + if (PyString_Check(name)) { + encoded_name = name; + Py_INCREF(name); + } else { + encoded_name = PyUnicode_AsUTF8String(name); + if (!encoded_name) + return -1; + } + PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); + Py_DECREF(encoded_name); + } else { + res = f(descr, obj, value); + } + + done: + Py_DECREF(name); + return res; +} +#endif + + +#ifdef __cplusplus +} +#endif + + + +#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) + +#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else + + + +#ifdef __cplusplus +extern "C" { +#endif + +/* Method creation and docstring support functions */ + +SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name); +SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func); +SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func); + +#ifdef __cplusplus +} +#endif + + +/* -------- TYPES TABLE (BEGIN) -------- */ + +#define SWIGTYPE_p_CBF_NODETYPE swig_types[0] +#define SWIGTYPE_p_a_4__double swig_types[1] +#define SWIGTYPE_p_a_4__doubleArray swig_types[2] +#define SWIGTYPE_p_cbf_axis_struct swig_types[3] +#define SWIGTYPE_p_cbf_detector_struct swig_types[4] +#define SWIGTYPE_p_cbf_handle_struct swig_types[5] +#define SWIGTYPE_p_cbf_node swig_types[6] +#define SWIGTYPE_p_cbf_positioner_struct swig_types[7] +#define SWIGTYPE_p_char swig_types[8] +#define SWIGTYPE_p_double swig_types[9] +#define SWIGTYPE_p_doubleArray swig_types[10] +#define SWIGTYPE_p_int swig_types[11] +#define SWIGTYPE_p_intArray swig_types[12] +#define SWIGTYPE_p_long swig_types[13] +#define SWIGTYPE_p_longArray swig_types[14] +#define SWIGTYPE_p_p_char swig_types[15] +#define SWIGTYPE_p_short swig_types[16] +#define SWIGTYPE_p_shortArray swig_types[17] +#define SWIGTYPE_p_size_t swig_types[18] +#define SWIGTYPE_p_void swig_types[19] +static swig_type_info *swig_types[21]; +static swig_module_info swig_module = {swig_types, 20, 0, 0, 0, 0}; +#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) +#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) + +/* -------- TYPES TABLE (END) -------- */ + +#ifdef SWIG_TypeQuery +# undef SWIG_TypeQuery +#endif +#define SWIG_TypeQuery SWIG_Python_TypeQuery + +/*----------------------------------------------- + @(target):= _py2cbf.so + ------------------------------------------------*/ +#if PY_VERSION_HEX >= 0x03000000 +# define SWIG_init PyInit__py2cbf + +#else +# define SWIG_init init_py2cbf + +#endif +#define SWIG_name "_py2cbf" + +#define SWIGVERSION 0x040002 +#define SWIG_VERSION SWIGVERSION + + +#define SWIG_as_voidptr(a) (void *)((const void *)(a)) +#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) + + +typedef double doubleArray; + + +SWIGINTERN int +SWIG_AsVal_double (PyObject *obj, double *val) +{ + int res = SWIG_TypeError; + if (PyFloat_Check(obj)) { + if (val) *val = PyFloat_AsDouble(obj); + return SWIG_OK; +#if PY_VERSION_HEX < 0x03000000 + } else if (PyInt_Check(obj)) { + if (val) *val = (double) PyInt_AsLong(obj); + return SWIG_OK; +#endif + } else if (PyLong_Check(obj)) { + double v = PyLong_AsDouble(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + double d = PyFloat_AsDouble(obj); + if (!PyErr_Occurred()) { + if (val) *val = d; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + long v = PyLong_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); + } else { + PyErr_Clear(); + } + } + } +#endif + return res; +} + + +#include + + +#include + + +SWIGINTERNINLINE int +SWIG_CanCastAsInteger(double *d, double min, double max) { + double x = *d; + if ((min <= x && x <= max)) { + double fx = floor(x); + double cx = ceil(x); + double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ + if ((errno == EDOM) || (errno == ERANGE)) { + errno = 0; + } else { + double summ, reps, diff; + if (rd < x) { + diff = x - rd; + } else if (rd > x) { + diff = rd - x; + } else { + return 1; + } + summ = rd + x; + reps = diff/summ; + if (reps < 8*DBL_EPSILON) { + *d = rd; + return 1; + } + } + } + return 0; +} + + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) +{ +#if PY_VERSION_HEX < 0x03000000 + if (PyInt_Check(obj)) { + long v = PyInt_AsLong(obj); + if (v >= 0) { + if (val) *val = v; + return SWIG_OK; + } else { + return SWIG_OverflowError; + } + } else +#endif + if (PyLong_Check(obj)) { + unsigned long v = PyLong_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + return SWIG_OverflowError; + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + unsigned long v = PyLong_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + double d; + int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { + if (val) *val = (unsigned long)(d); + return res; + } + } + } +#endif + return SWIG_TypeError; +} + + +#include +#if !defined(SWIG_NO_LLONG_MAX) +# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) +# define LLONG_MAX __LONG_LONG_MAX__ +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +# endif +#endif + + +#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) +# define SWIG_LONG_LONG_AVAILABLE +#endif + + +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val) +{ + int res = SWIG_TypeError; + if (PyLong_Check(obj)) { + unsigned long long v = PyLong_AsUnsignedLongLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + res = SWIG_OverflowError; + } + } else { + unsigned long v; + res = SWIG_AsVal_unsigned_SS_long (obj,&v); + if (SWIG_IsOK(res)) { + if (val) *val = v; + return res; + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + const double mant_max = 1LL << DBL_MANT_DIG; + double d; + res = SWIG_AsVal_double (obj,&d); + if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max)) + return SWIG_OverflowError; + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { + if (val) *val = (unsigned long long)(d); + return SWIG_AddCast(res); + } + res = SWIG_TypeError; + } +#endif + return res; +} +#endif + + +SWIGINTERNINLINE int +SWIG_AsVal_size_t (PyObject * obj, size_t *val) +{ + int res = SWIG_TypeError; +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(size_t) <= sizeof(unsigned long)) { +#endif + unsigned long v; + res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = (size_t)(v); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else if (sizeof(size_t) <= sizeof(unsigned long long)) { + unsigned long long v; + res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = (size_t)(v); + } +#endif + return res; +} + +SWIGINTERN doubleArray *new_doubleArray(size_t nelements){ + return (double *)calloc(nelements, sizeof(double)); + } +SWIGINTERN void delete_doubleArray(doubleArray *self){ + free((char*)self); + } +SWIGINTERN double doubleArray___getitem__(doubleArray *self,size_t index){ + return self[index]; + } + + #define SWIG_From_double PyFloat_FromDouble + +SWIGINTERN void doubleArray___setitem__(doubleArray *self,size_t index,double value){ + self[index] = value; + } +SWIGINTERN double *doubleArray_cast(doubleArray *self){ + return self; + } +SWIGINTERN doubleArray *doubleArray_frompointer(double *t){ + return (doubleArray *)(t); + } + +typedef int intArray; + +SWIGINTERN intArray *new_intArray(size_t nelements){ + return (int *)calloc(nelements, sizeof(int)); + } +SWIGINTERN void delete_intArray(intArray *self){ + free((char*)self); + } +SWIGINTERN int intArray___getitem__(intArray *self,size_t index){ + return self[index]; + } + +SWIGINTERNINLINE PyObject* + SWIG_From_int (int value) +{ + return PyInt_FromLong((long) value); +} + + +SWIGINTERN int +SWIG_AsVal_long (PyObject *obj, long* val) +{ +#if PY_VERSION_HEX < 0x03000000 + if (PyInt_Check(obj)) { + if (val) *val = PyInt_AsLong(obj); + return SWIG_OK; + } else +#endif + if (PyLong_Check(obj)) { + long v = PyLong_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + return SWIG_OverflowError; + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + long v = PyInt_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + double d; + int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { + if (val) *val = (long)(d); + return res; + } + } + } +#endif + return SWIG_TypeError; +} + + +SWIGINTERN int +SWIG_AsVal_int (PyObject * obj, int *val) +{ + long v; + int res = SWIG_AsVal_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v < INT_MIN || v > INT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = (int)(v); + } + } + return res; +} + +SWIGINTERN void intArray___setitem__(intArray *self,size_t index,int value){ + self[index] = value; + } +SWIGINTERN int *intArray_cast(intArray *self){ + return self; + } +SWIGINTERN intArray *intArray_frompointer(int *t){ + return (intArray *)(t); + } + +typedef short shortArray; + +SWIGINTERN shortArray *new_shortArray(size_t nelements){ + return (short *)calloc(nelements, sizeof(short)); + } +SWIGINTERN void delete_shortArray(shortArray *self){ + free((char*)self); + } +SWIGINTERN short shortArray___getitem__(shortArray *self,size_t index){ + return self[index]; + } + + #define SWIG_From_long PyInt_FromLong + + +SWIGINTERNINLINE PyObject * +SWIG_From_short (short value) +{ + return SWIG_From_long (value); +} + + +SWIGINTERN int +SWIG_AsVal_short (PyObject * obj, short *val) +{ + long v; + int res = SWIG_AsVal_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v < SHRT_MIN || v > SHRT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = (short)(v); + } + } + return res; +} + +SWIGINTERN void shortArray___setitem__(shortArray *self,size_t index,short value){ + self[index] = value; + } +SWIGINTERN short *shortArray_cast(shortArray *self){ + return self; + } +SWIGINTERN shortArray *shortArray_frompointer(short *t){ + return (shortArray *)(t); + } + +typedef long longArray; + +SWIGINTERN longArray *new_longArray(size_t nelements){ + return (long *)calloc(nelements, sizeof(long)); + } +SWIGINTERN void delete_longArray(longArray *self){ + free((char*)self); + } +SWIGINTERN long longArray___getitem__(longArray *self,size_t index){ + return self[index]; + } +SWIGINTERN void longArray___setitem__(longArray *self,size_t index,long value){ + self[index] = value; + } +SWIGINTERN long *longArray_cast(longArray *self){ + return self; + } +SWIGINTERN longArray *longArray_frompointer(long *t){ + return (longArray *)(t); + } + +static int convert_darray(PyObject *input, double *ptr, int size) { + int i; + if (!PySequence_Check(input)) { + PyErr_SetString(PyExc_TypeError,"Expecting a sequence"); + return 0; + } + if (PyObject_Length(input) != size) { + PyErr_SetString(PyExc_ValueError,"Sequence size mismatch"); + return 0; + } + for (i =0; i < size; i++) { + PyObject *o = PySequence_GetItem(input,i); + /*if (!PyFloat_Check(o)) { + + Py_XDECREF(o); + PyErr_SetString(PyExc_ValueError,"Expecting a sequence of floats"); + return 0; + }*/ + ptr[i] = PyFloat_AsDouble(o); + Py_DECREF(o); + } + return 1; +} + + + static long convert_larray(PyObject *input, long *ptr, int size) { + int i; + if (!PySequence_Check(input)) { + PyErr_SetString(PyExc_TypeError,"Expecting a sequence"); + return 0; + } + if (PyObject_Length(input) != size) { + PyErr_SetString(PyExc_ValueError,"Sequence size mismatch"); + return 0; + } + for (i =0; i < size; i++) { + PyObject *o = PySequence_GetItem(input,i); + /*if (!PyLong_Check(o)) { + Py_XDECREF(o); + PyErr_SetString(PyExc_ValueError,"Expecting a sequence of long integers"); + return 0; + }*/ + ptr[i] = PyLong_AsLong(o); + Py_DECREF(o); + } + return 1; + } + + + static int convert_iarray(PyObject *input, int *ptr, int size) { + int i; + if (!PySequence_Check(input)) { + PyErr_SetString(PyExc_TypeError,"Expecting a sequence"); + return 0; + } + if (PyObject_Length(input) != size) { + PyErr_SetString(PyExc_ValueError,"Sequence size mismatch"); + return 0; + } + for (i =0; i < size; i++) { + PyObject *o = PySequence_GetItem(input,i); + /*if (!PyInt_Check(o)) { + Py_XDECREF(o); + PyErr_SetString(PyExc_ValueError,"Expecting a sequence of long integers"); + return 0; + }*/ + ptr[i] = (int)PyInt_AsLong(o); + Py_DECREF(o); + } + return 1; + } + + // Here is the c code needed to compile the wrappers, but not + // to be wrapped + +#include "../include/cbf.h" +#include "../include/cbf_simple.h" + +// Helper functions to generate error message + + +static int error_status = 0; +static char error_message1[17] ; +static char error_message[1042] ; // hope that is long enough + +/* prototype */ +void get_error_message(void); + +void get_error_message(){ + sprintf(error_message1,"%s","CBFlib Error(s):"); + if (error_status & CBF_FORMAT ) + sprintf(error_message,"%s %s",error_message1,"CBF_FORMAT "); + if (error_status & CBF_ALLOC ) + sprintf(error_message,"%s %s",error_message1,"CBF_ALLOC "); + if (error_status & CBF_ARGUMENT ) + sprintf(error_message,"%s %s",error_message1,"CBF_ARGUMENT "); + if (error_status & CBF_ASCII ) + sprintf(error_message,"%s %s",error_message1,"CBF_ASCII "); + if (error_status & CBF_BINARY ) + sprintf(error_message,"%s %s",error_message1,"CBF_BINARY "); + if (error_status & CBF_BITCOUNT ) + sprintf(error_message,"%s %s",error_message1,"CBF_BITCOUNT "); + if (error_status & CBF_ENDOFDATA ) + sprintf(error_message,"%s %s",error_message1,"CBF_ENDOFDATA "); + if (error_status & CBF_FILECLOSE ) + sprintf(error_message,"%s %s",error_message1,"CBF_FILECLOSE "); + if (error_status & CBF_FILEOPEN ) + sprintf(error_message,"%s %s",error_message1,"CBF_FILEOPEN "); + if (error_status & CBF_FILEREAD ) + sprintf(error_message,"%s %s",error_message1,"CBF_FILEREAD "); + if (error_status & CBF_FILESEEK ) + sprintf(error_message,"%s %s",error_message1,"CBF_FILESEEK "); + if (error_status & CBF_FILETELL ) + sprintf(error_message,"%s %s",error_message1,"CBF_FILETELL "); + if (error_status & CBF_FILEWRITE ) + sprintf(error_message,"%s %s",error_message1,"CBF_FILEWRITE "); + if (error_status & CBF_IDENTICAL ) + sprintf(error_message,"%s %s",error_message1,"CBF_IDENTICAL "); + if (error_status & CBF_NOTFOUND ) + sprintf(error_message,"%s %s",error_message1,"CBF_NOTFOUND "); + if (error_status & CBF_OVERFLOW ) + sprintf(error_message,"%s %s",error_message1,"CBF_OVERFLOW "); + if (error_status & CBF_UNDEFINED ) + sprintf(error_message,"%s %s",error_message1,"CBF_UNDEFINED "); + if (error_status & CBF_NOTIMPLEMENTED) + sprintf(error_message,"%s %s",error_message1,"CBF_NOTIMPLEMENTED"); + if (error_status & CBF_NOCOMPRESSION) + sprintf(error_message,"%s %s",error_message1,"CBF_NOCOMPRESSION"); +} + + + + + void get_local_integer_byte_order(char **bo, int *bolen) { + char * byteorder; + char * bot; + error_status = cbf_get_local_integer_byte_order(&byteorder); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {{(error_status = CBF_ALLOC);}} + strncpy(bot,byteorder,*bolen); + *bo = bot; + } + + +SWIGINTERN swig_type_info* +SWIG_pchar_descriptor(void) +{ + static int init = 0; + static swig_type_info* info = 0; + if (!init) { + info = SWIG_TypeQuery("_p_char"); + init = 1; + } + return info; +} + + +SWIGINTERNINLINE PyObject * +SWIG_FromCharPtrAndSize(const char* carray, size_t size) +{ + if (carray) { + if (size > INT_MAX) { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + return pchar_descriptor ? + SWIG_InternalNewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void(); + } else { +#if PY_VERSION_HEX >= 0x03000000 +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + return PyBytes_FromStringAndSize(carray, (Py_ssize_t)(size)); +#else + return PyUnicode_DecodeUTF8(carray, (Py_ssize_t)(size), "surrogateescape"); +#endif +#else + return PyString_FromStringAndSize(carray, (Py_ssize_t)(size)); +#endif + } + } else { + return SWIG_Py_Void(); + } +} + + + void compute_cell_volume(double cell[6], double *volume) { + {(error_status = cbf_compute_cell_volume(cell,volume));}; + } + + + void get_local_real_format(char **rf, int *rflen) { + char * real_format; + char * rft; + error_status = cbf_get_local_real_format(&real_format); + *rflen = strlen(real_format); + if (!(rft = (char *)malloc(*rflen))) {{(error_status = CBF_ALLOC);}} + strncpy(rft,real_format,*rflen); + *rf = rft; + } + + +void airy_disk(double x, double y, double cenx, double ceny, +double volume, double fwhm, double *value) { +{(error_status = cbf_airy_disk(x,y,cenx,ceny,volume,fwhm,value));}; +} + + + void get_local_real_byte_order(char **bo, int *bolen) { + char * byteorder; + char * bot; + error_status = cbf_get_local_real_byte_order(&byteorder); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {{(error_status = CBF_ALLOC);}} + strncpy(bot,byteorder,*bolen); + *bo = bot; + } + + + void compute_reciprocal_cell(double cell[6], double *astar, double *bstar, double *cstar, + double *alphastar, double *betastar, double *gammastar) { + double rcell[6]; + {(error_status = cbf_compute_reciprocal_cell(cell,rcell));}; + *astar = rcell[0]; + *bstar = rcell[1]; + *cstar = rcell[2]; + *alphastar = rcell[3]; + *betastar = rcell[4]; + *gammastar = rcell[5]; + } + + +void airy_disk_volume(double xlo, double ylo, double xhi, double yhi, +double cenx, double ceny, double volumein, double fwhm, double * volumeout) { +{(error_status = cbf_airy_disk_volume(xlo,ylo,xhi,yhi,cenx,ceny,volumein,fwhm,volumeout));}; +} + + +SWIGINTERNINLINE PyObject* +SWIG_From_unsigned_SS_long (unsigned long value) +{ + return (value > LONG_MAX) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)(value)); +} + + +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERNINLINE PyObject* +SWIG_From_unsigned_SS_long_SS_long (unsigned long long value) +{ + return (value > LONG_MAX) ? + PyLong_FromUnsignedLongLong(value) : PyInt_FromLong((long)(value)); +} +#endif + + +SWIGINTERNINLINE PyObject * +SWIG_From_size_t (size_t value) +{ +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(size_t) <= sizeof(unsigned long)) { +#endif + return SWIG_From_unsigned_SS_long ((unsigned long)(value)); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else { + /* assume sizeof(size_t) <= sizeof(unsigned long long) */ + return SWIG_From_unsigned_SS_long_SS_long ((unsigned long long)(value)); + } +#endif +} + +SWIGINTERN cbf_positioner_struct *new_cbf_positioner_struct(void){ // Constructor + // DO NOT CONSTRUCT WITHOUT A CBFHANDLE + {(error_status = CBF_ARGUMENT);}; + return NULL; /* Should never be executed */ + } +SWIGINTERN void delete_cbf_positioner_struct(cbf_positioner_struct *self){ // Destructor + {(error_status = cbf_free_positioner(self));}; + } +SWIGINTERN void cbf_positioner_struct_get_rotation_range(cbf_positioner_struct *self,double *start,double *increment){ + unsigned int reserved; + reserved = 0; + {(error_status = cbf_get_rotation_range (self,reserved, start,increment));}; + } +SWIGINTERN void cbf_positioner_struct_rotate_vector(cbf_positioner_struct *self,double ratio,double initial1,double initial2,double initial3,double *final1,double *final2,double *final3){ + unsigned int reserved; + reserved = 0; + {(error_status = cbf_rotate_vector (self, reserved, ratio, initial1, + initial2, initial3, final1, final2, final3));} +; + } +SWIGINTERN void cbf_positioner_struct_get_goniometer_poise(cbf_positioner_struct *self,double ratio,double *vector1,double *vector2,double *vector3,double *offset1,double *offset2,double *offset3,double *angle){ + {(error_status = cbf_get_goniometer_poise(self, ratio, + vector1, vector2, vector3, + offset1, offset2, offset3,angle));} + +; + } +SWIGINTERN void cbf_positioner_struct_get_reciprocal(cbf_positioner_struct *self,double ratio,double wavelength,double real1,double real2,double real3,double *reciprocal1,double *reciprocal2,double *reciprocal3){ + unsigned int reserved; + reserved = 0; + {(error_status = cbf_get_reciprocal(self,reserved, ratio, wavelength, + real1, real2, real3,reciprocal1, + reciprocal2,reciprocal3));} + +; + } +SWIGINTERN void cbf_positioner_struct_get_rotation_axis(cbf_positioner_struct *self,double *vector1,double *vector2,double *vector3){ + unsigned int reserved; + reserved = 0; + {(error_status = cbf_get_rotation_axis (self, reserved, + vector1, vector2, vector3));} +; + } +SWIGINTERN cbf_detector_struct *new_cbf_detector_struct(void){ // Constructor + // DO NOT CONSTRUCT WITHOUT A CBFHANDLE + {(error_status = CBF_ARGUMENT);}; + return NULL; /* Should never be executed */ + } +SWIGINTERN void delete_cbf_detector_struct(cbf_detector_struct *self){ // Destructor + {(error_status = cbf_free_detector(self));}; + } +SWIGINTERN void cbf_detector_struct_set_beam_center_fs(cbf_detector_struct *self,double *indexfast,double *indexslow,double *centerfast,double *centerslow){ + {(error_status = cbf_set_beam_center_fs(self, indexfast, indexslow, + centerfast, centerslow));} +; + } +SWIGINTERN void cbf_detector_struct_set_reference_beam_center_fs(cbf_detector_struct *self,double *indexfast,double *indexslow,double *centerfast,double *centerslow){ + {(error_status = cbf_set_reference_beam_center_fs(self, indexfast, indexslow, + centerfast, centerslow));} +; + } +SWIGINTERN void cbf_detector_struct_get_beam_center(cbf_detector_struct *self,double *index1,double *index2,double *center1,double *center2){ + {(error_status = cbf_get_beam_center(self, index1, index2, + center1, center2));} +; + } +SWIGINTERN void cbf_detector_struct_get_pixel_coordinates_fs(cbf_detector_struct *self,double indexfast,double indexslow,double *coordinate1,double *coordinate2,double *coordinate3){ + {(error_status = cbf_get_pixel_coordinates_fs(self, indexfast, indexslow, coordinate1, coordinate2, coordinate3));}; + } + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) +{ + unsigned long v; + int res = SWIG_AsVal_unsigned_SS_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v > UINT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = (unsigned int)(v); + } + } + return res; +} + +SWIGINTERN void cbf_detector_struct_get_inferred_pixel_size(cbf_detector_struct *self,unsigned int axis_number,double *psize){ + {(error_status = cbf_get_inferred_pixel_size(self, axis_number, psize));}; + } +SWIGINTERN void cbf_detector_struct_get_pixel_area(cbf_detector_struct *self,double index1,double index2,double *area,double *projected_area){ + {(error_status = cbf_get_pixel_area (self, + index1, index2, area,projected_area));} +; + } +SWIGINTERN void cbf_detector_struct_get_pixel_normal_fs(cbf_detector_struct *self,double indexfast,double indexslow,double *normal1,double *normal2,double *normal3){ + {(error_status = cbf_get_pixel_normal_fs(self, + indexfast,indexslow,normal1,normal2,normal3));} +; + } +SWIGINTERN char const *cbf_detector_struct_get_detector_surface_axes(cbf_detector_struct *self,int index){ + const char * axis_id1; + const char * axis_id2; + {(error_status = cbf_get_detector_surface_axes(self, + &axis_id1, &axis_id2));} +; + if (index == 0) return axis_id1; + if (index == 1) return axis_id2; + return "."; + } + +SWIGINTERNINLINE PyObject * +SWIG_FromCharPtr(const char *cptr) +{ + return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); +} + +SWIGINTERN void cbf_detector_struct_get_detector_axes(cbf_detector_struct *self,double *slowaxis1,double *slowaxis2,double *slowaxis3,double *fastaxis1,double *fastaxis2,double *fastaxis3){ + {(error_status = cbf_get_detector_axes(self, + slowaxis1,slowaxis2,slowaxis3, + fastaxis1,fastaxis2,fastaxis3));} + +; + } +SWIGINTERN void cbf_detector_struct_set_reference_beam_center(cbf_detector_struct *self,double *indexslow,double *indexfast,double *centerslow,double *centerfast){ + {(error_status = cbf_set_reference_beam_center(self, indexslow, indexfast, + centerslow, centerfast));} +; + } +SWIGINTERN void cbf_detector_struct_get_detector_axis_slow(cbf_detector_struct *self,double *slowaxis1,double *slowaxis2,double *slowaxis3){ + {(error_status = cbf_get_detector_axis_slow(self, + slowaxis1,slowaxis2,slowaxis3));} +; + } +SWIGINTERN void cbf_detector_struct_get_detector_distance(cbf_detector_struct *self,double *distance){ + {(error_status = cbf_get_detector_distance(self,distance));}; + } +SWIGINTERN void cbf_detector_struct_get_inferred_pixel_size_fs(cbf_detector_struct *self,unsigned int axis_number,double *psize){ + {(error_status = cbf_get_inferred_pixel_size_fs(self, axis_number, psize));}; + } +SWIGINTERN void cbf_detector_struct_get_detector_normal(cbf_detector_struct *self,double *normal1,double *normal2,double *normal3){ + {(error_status = cbf_get_detector_normal(self, + normal1, normal2, normal3));} +; + } +SWIGINTERN void cbf_detector_struct_get_detector_axis_fast(cbf_detector_struct *self,double *fastaxis1,double *fastaxis2,double *fastaxis3){ + {(error_status = cbf_get_detector_axis_fast(self, + fastaxis1,fastaxis2,fastaxis3));} +; + } +SWIGINTERN void cbf_detector_struct_get_detector_axes_fs(cbf_detector_struct *self,double *fastaxis1,double *fastaxis2,double *fastaxis3,double *slowaxis1,double *slowaxis2,double *slowaxis3){ + {(error_status = cbf_get_detector_axes(self, + slowaxis1,slowaxis2,slowaxis3, + fastaxis1,fastaxis2,fastaxis3));} + +; + } +SWIGINTERN void cbf_detector_struct_get_detector_axes_sf(cbf_detector_struct *self,double *slowaxis1,double *slowaxis2,double *slowaxis3,double *fastaxis1,double *fastaxis2,double *fastaxis3){ + {(error_status = cbf_get_detector_axes(self, + slowaxis1,slowaxis2,slowaxis3, + fastaxis1,fastaxis2,fastaxis3));} + +; + } +SWIGINTERN void cbf_detector_struct_get_pixel_coordinates_sf(cbf_detector_struct *self,double indexslow,double indexfast,double *coordinate1,double *coordinate2,double *coordinate3){ + {(error_status = cbf_get_pixel_coordinates_sf(self, indexslow, indexfast, coordinate1, coordinate2, coordinate3));}; + } +SWIGINTERN void cbf_detector_struct_set_beam_center(cbf_detector_struct *self,double *indexslow,double *indexfast,double *centerslow,double *centerfast){ + {(error_status = cbf_set_beam_center(self, indexslow, indexfast, + centerslow, centerfast));} +; + } +SWIGINTERN void cbf_detector_struct_get_pixel_area_fs(cbf_detector_struct *self,double indexfast,double indexslow,double *area,double *projected_area){ + {(error_status = cbf_get_pixel_area_fs (self, + indexfast, indexslow, area,projected_area));} +; + } +SWIGINTERN void cbf_detector_struct_get_beam_center_fs(cbf_detector_struct *self,double *indexfast,double *indexslow,double *centerfast,double *centerslow){ + {(error_status = cbf_get_beam_center_fs(self, indexfast, indexslow, + centerfast, centerslow));} +; + } +SWIGINTERN void cbf_detector_struct_get_inferred_pixel_size_sf(cbf_detector_struct *self,unsigned int axis_number,double *psize){ + {(error_status = cbf_get_inferred_pixel_size_sf(self, axis_number, psize));}; + } +SWIGINTERN void cbf_detector_struct_get_pixel_coordinates(cbf_detector_struct *self,double index1,double index2,double *coordinate1,double *coordinate2,double *coordinate3){ + {(error_status = cbf_get_pixel_coordinates(self, index1, index2, + coordinate1, coordinate2, coordinate3));} +; + } +SWIGINTERN void cbf_detector_struct_get_beam_center_sf(cbf_detector_struct *self,double *indexslow,double *indexfast,double *centerslow,double *centerfast){ + {(error_status = cbf_get_beam_center_sf(self, indexslow, indexfast, + centerslow, centerfast));} +; + } +SWIGINTERN void cbf_detector_struct_get_pixel_area_sf(cbf_detector_struct *self,double indexslow,double indexfast,double *area,double *projected_area){ + {(error_status = cbf_get_pixel_area_sf (self, + indexslow, indexfast, area,projected_area));} +; + } +SWIGINTERN void cbf_detector_struct_set_reference_beam_center_sf(cbf_detector_struct *self,double *indexslow,double *indexfast,double *centerslow,double *centerfast){ + {(error_status = cbf_set_reference_beam_center_sf(self, indexslow, indexfast, + centerslow, centerfast));} +; + } +SWIGINTERN void cbf_detector_struct_set_beam_center_sf(cbf_detector_struct *self,double *indexslow,double *indexfast,double *centerslow,double *centerfast){ + {(error_status = cbf_set_beam_center_sf(self, indexslow, indexfast, + centerslow, centerfast));} +; + } +SWIGINTERN void cbf_detector_struct_get_pixel_normal(cbf_detector_struct *self,double index1,double index2,double *normal1,double *normal2,double *normal3){ + {(error_status = cbf_get_pixel_normal(self, + index1,index2,normal1,normal2,normal3));} +; + } +SWIGINTERN cbf_handle_struct *new_cbf_handle_struct(void){ // Constructor + cbf_handle handle; + {(error_status = cbf_make_handle(&handle));}; + return handle; + } +SWIGINTERN void delete_cbf_handle_struct(cbf_handle_struct *self){ // Destructor + {(error_status = cbf_free_handle(self));}; + } +SWIGINTERN void cbf_handle_struct_select_datablock(cbf_handle_struct *self,unsigned int arg){ + {(error_status = cbf_select_datablock(self,arg));};} + +SWIGINTERN int +SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) +{ +#if PY_VERSION_HEX>=0x03000000 +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + if (PyBytes_Check(obj)) +#else + if (PyUnicode_Check(obj)) +#endif +#else + if (PyString_Check(obj)) +#endif + { + char *cstr; Py_ssize_t len; + int ret = SWIG_OK; +#if PY_VERSION_HEX>=0x03000000 +#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + if (!alloc && cptr) { + /* We can't allow converting without allocation, since the internal + representation of string in Python 3 is UCS-2/UCS-4 but we require + a UTF-8 representation. + TODO(bhy) More detailed explanation */ + return SWIG_RuntimeError; + } + obj = PyUnicode_AsUTF8String(obj); + if (!obj) + return SWIG_TypeError; + if (alloc) + *alloc = SWIG_NEWOBJ; +#endif + if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1) + return SWIG_TypeError; +#else + if (PyString_AsStringAndSize(obj, &cstr, &len) == -1) + return SWIG_TypeError; +#endif + if (cptr) { + if (alloc) { + if (*alloc == SWIG_NEWOBJ) { + *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); + *alloc = SWIG_NEWOBJ; + } else { + *cptr = cstr; + *alloc = SWIG_OLDOBJ; + } + } else { +#if PY_VERSION_HEX>=0x03000000 +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + *cptr = PyBytes_AsString(obj); +#else + assert(0); /* Should never reach here with Unicode strings in Python 3 */ +#endif +#else + *cptr = SWIG_Python_str_AsChar(obj); + if (!*cptr) + ret = SWIG_TypeError; +#endif + } + } + if (psize) *psize = len + 1; +#if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + Py_XDECREF(obj); +#endif + return ret; + } else { +#if defined(SWIG_PYTHON_2_UNICODE) +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) +#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once" +#endif +#if PY_VERSION_HEX<0x03000000 + if (PyUnicode_Check(obj)) { + char *cstr; Py_ssize_t len; + if (!alloc && cptr) { + return SWIG_RuntimeError; + } + obj = PyUnicode_AsUTF8String(obj); + if (!obj) + return SWIG_TypeError; + if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { + if (cptr) { + if (alloc) *alloc = SWIG_NEWOBJ; + *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); + } + if (psize) *psize = len + 1; + + Py_XDECREF(obj); + return SWIG_OK; + } else { + Py_XDECREF(obj); + } + } +#endif +#endif + + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + if (pchar_descriptor) { + void* vptr = 0; + if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { + if (cptr) *cptr = (char *) vptr; + if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; + if (alloc) *alloc = SWIG_OLDOBJ; + return SWIG_OK; + } + } + } + return SWIG_TypeError; +} + + + + +SWIGINTERN void cbf_handle_struct_force_new_datablock(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_force_new_datablock(self,arg));};} +SWIGINTERN void cbf_handle_struct_get_3d_image_fs_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int elsign,int ndimfast,int ndimmid,int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + {(error_status = cbf_get_3d_image_fs(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow));} + + +; + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } +SWIGINTERN void cbf_handle_struct_reset_datablocks(cbf_handle_struct *self){ + {(error_status = cbf_reset_datablocks(self));};} +SWIGINTERN void cbf_handle_struct_set_tag_category(cbf_handle_struct *self,char const *tagname,char const *categoryname_in){ + {(error_status = cbf_set_tag_category(self,tagname, categoryname_in));}; + } +SWIGINTERN char const *cbf_handle_struct_require_tag_root(cbf_handle_struct *self,char const *tagname){ + const char* result; + {(error_status = cbf_require_tag_root(self,tagname,&result));}; + return result; + } +SWIGINTERN unsigned int cbf_handle_struct_row_number(cbf_handle_struct *self){ + unsigned int result; + {(error_status = cbf_row_number(self,&result));}; + return result;} + +SWIGINTERNINLINE PyObject* + SWIG_From_unsigned_SS_int (unsigned int value) +{ + return PyInt_FromSize_t((size_t) value); +} + +SWIGINTERN void cbf_handle_struct_set_image(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int elsign,int ndimslow,int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + {(error_status = cbf_set_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t)ndimfast));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_set_bin_sizes(cbf_handle_struct *self,int element_number,double slowbinsize_in,double fastbinsize_in){ + {(error_status = cbf_set_bin_sizes(self,element_number,slowbinsize_in,fastbinsize_in));}; + } +SWIGINTERN void cbf_handle_struct_new_row(cbf_handle_struct *self){ + {(error_status = cbf_new_row(self));};} +SWIGINTERN void cbf_handle_struct_rewind_saveframe(cbf_handle_struct *self){ + {(error_status = cbf_rewind_saveframe(self));};} +SWIGINTERN void cbf_handle_struct_get_realarrayparameters(cbf_handle_struct *self,int *compression,int *binary_id,int *elsize,int *elements){ + unsigned int comp; + size_t elsiz, elem; + {(error_status = cbf_get_realarrayparameters(self, + &comp ,binary_id, &elsiz, &elem ));} +; + *compression = comp; /* FIXME - does this convert in C? */ + *elsize = elsiz; + *elements = elem; + } +SWIGINTERN void cbf_handle_struct_get_pixel_size_sf(cbf_handle_struct *self,unsigned int element_number,unsigned int axis_number,double *psize){ + {(error_status = cbf_get_pixel_size_sf(self, + element_number, + axis_number, + psize));} + + +; + } +SWIGINTERN void cbf_handle_struct_force_new_category(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_force_new_category(self,arg));};} +SWIGINTERN void cbf_handle_struct_force_new_saveframe(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_force_new_saveframe(self,arg));};} +SWIGINTERN unsigned int cbf_handle_struct_count_datablocks(cbf_handle_struct *self){ + unsigned int result; + {(error_status = cbf_count_datablocks(self,&result));}; + return result;} +SWIGINTERN void cbf_handle_struct_find_row(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_find_row(self,arg));};} +SWIGINTERN void cbf_handle_struct_select_column(cbf_handle_struct *self,unsigned int arg){ + {(error_status = cbf_select_column(self,arg));};} +SWIGINTERN cbf_detector cbf_handle_struct_construct_detector(cbf_handle_struct *self,unsigned int element_number){ + cbf_detector detector; + {(error_status = cbf_construct_detector(self,&detector,element_number));}; + return detector; + } +SWIGINTERN char const *cbf_handle_struct_get_axis_depends_on(cbf_handle_struct *self,char const *axis_id){ + const char* dep_on; + {(error_status = cbf_get_axis_depends_on(self,axis_id, + &dep_on));} +; + return dep_on; + } +SWIGINTERN void cbf_handle_struct_rewind_column(cbf_handle_struct *self){ + {(error_status = cbf_rewind_column(self));};} +SWIGINTERN cbf_positioner cbf_handle_struct_construct_reference_positioner(cbf_handle_struct *self,char const *axis_id){ + cbf_positioner positioner; + {(error_status = cbf_construct_reference_positioner(self,&positioner,axis_id));}; + return positioner; + } +SWIGINTERN void cbf_handle_struct_require_column_doublevalue(cbf_handle_struct *self,char const *columnname,double *number,double const defaultvalue){ + {(error_status = cbf_require_column_doublevalue(self, + columnname,number,defaultvalue));} +; + } +SWIGINTERN void cbf_handle_struct_get_datestamp(cbf_handle_struct *self,int *year,int *month,int *day,int *hour,int *minute,double *second,int *timezone){ + unsigned int reserved; + reserved = 0; + {(error_status = cbf_get_datestamp(self,reserved, + year,month,day,hour,minute,second,timezone));} +; + } +SWIGINTERN int cbf_handle_struct_get_integervalue(cbf_handle_struct *self){ + int result; + {(error_status = cbf_get_integervalue(self,&result));}; + return result;} +SWIGINTERN char const *cbf_handle_struct_get_crystal_id(cbf_handle_struct *self){ + const char* result; + {(error_status = cbf_get_crystal_id(self, &result));}; + return result;} +SWIGINTERN double cbf_handle_struct_get_doublevalue(cbf_handle_struct *self){ + double result; + {(error_status = cbf_get_doublevalue(self,&result));}; + return result;} +SWIGINTERN void cbf_handle_struct_get_unit_cell(cbf_handle_struct *self,double *a,double *b,double *c,double *alpha,double *beta,double *gamma){ + double cell[6]; + {(error_status = cbf_get_unit_cell(self,cell,NULL));}; + *a = cell[0]; + *b = cell[1]; + *c = cell[2]; + *alpha = cell[3]; + *beta = cell[4]; + *gamma = cell[5]; + } +SWIGINTERN void cbf_handle_struct_get_unit_cell_esd(cbf_handle_struct *self,double *a_esd,double *b_esd,double *c_esd,double *alpha_esd,double *beta_esd,double *gamma_esd){ + double cell_esd[6]; + {(error_status = cbf_get_unit_cell(self,NULL,cell_esd));}; + *a_esd = cell_esd[0]; + *b_esd = cell_esd[1]; + *c_esd = cell_esd[2]; + *alpha_esd = cell_esd[3]; + *beta_esd = cell_esd[4]; + *gamma_esd = cell_esd[5]; + } +SWIGINTERN char const *cbf_handle_struct_get_axis_type(cbf_handle_struct *self,char const *axis_id){ + cbf_axis_type axis_type; + {(error_status = cbf_get_axis_type(self,axis_id, + &axis_type));} +; + if (axis_type == CBF_TRANSLATION_AXIS) return "translation"; + if (axis_type == CBF_ROTATION_AXIS) return "rotation"; + return "general"; + } +SWIGINTERN void cbf_handle_struct_remove_column(cbf_handle_struct *self){ + {(error_status = cbf_remove_column(self));};} +SWIGINTERN CBF_NODETYPE cbf_handle_struct_rewind_blockitem(cbf_handle_struct *self){ + CBF_NODETYPE result; + {(error_status = cbf_rewind_blockitem(self,&result));}; + return result;} +SWIGINTERN char const *cbf_handle_struct_get_value(cbf_handle_struct *self){ + const char* result; + {(error_status = cbf_get_value(self, &result));}; + return result;} +SWIGINTERN unsigned int cbf_handle_struct_count_categories(cbf_handle_struct *self){ + unsigned int result; + {(error_status = cbf_count_categories(self,&result));}; + return result;} +SWIGINTERN void cbf_handle_struct_read_widefile(cbf_handle_struct *self,char *filename,int headers){ + /* CBFlib needs a stream that will remain open + hence DO NOT open from python */ + FILE *stream; + if ( ! ( stream = fopen (filename, "rb")) ){ + {(error_status = CBF_FILEOPEN);}; + } + else{ + {(error_status = cbf_read_widefile(self, stream, headers));}; + } + } +SWIGINTERN void cbf_handle_struct_set_wavelength(cbf_handle_struct *self,double wavelength){ + {(error_status = cbf_set_wavelength(self,wavelength));};} +SWIGINTERN void cbf_handle_struct_get_axis_vector(cbf_handle_struct *self,char const *axis_id,double *vector1,double *vector2,double *vector3){ + {(error_status = cbf_get_axis_vector(self,axis_id, + vector1, vector2,vector3));} +; + } +SWIGINTERN void cbf_handle_struct_set_pixel_size_sf(cbf_handle_struct *self,unsigned int element_number,unsigned int axis_number,double psize){ + {(error_status = cbf_set_pixel_size_sf(self, + element_number, + axis_number, + psize));} + + +; + } +SWIGINTERN char const *cbf_handle_struct_get_diffrn_id(cbf_handle_struct *self){ + const char* result; + {(error_status = cbf_get_diffrn_id(self, &result));}; + return result;} +SWIGINTERN void cbf_handle_struct_get_axis_rotation(cbf_handle_struct *self,char const *axis_id,double *rotation){ + {(error_status = cbf_get_axis_rotation(self,axis_id, + rotation));} +; + } +SWIGINTERN void cbf_handle_struct_find_datablock(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_find_datablock(self,arg));};} +SWIGINTERN void cbf_handle_struct_get_polarization(cbf_handle_struct *self,double *in1,double *in2){ + {(error_status = cbf_get_polarization (self, in1, in2));}; + } +SWIGINTERN void cbf_handle_struct_select_category(cbf_handle_struct *self,unsigned int arg){ + {(error_status = cbf_select_category(self,arg));};} +SWIGINTERN void cbf_handle_struct_get_pixel_size_fs(cbf_handle_struct *self,unsigned int element_number,unsigned int axis_number,double *psize){ + {(error_status = cbf_get_pixel_size_fs(self, + element_number, + axis_number, + psize));} + + +; + } +SWIGINTERN void cbf_handle_struct_get_axis_poise(cbf_handle_struct *self,double ratio,double *vector1,double *vector2,double *vector3,double *offset1,double *offset2,double *offset3,double *angle,char const *axis_id,char const *frame_id){ + {(error_status = cbf_get_axis_poise(self, ratio, + vector1, vector2, vector3, + offset1, offset2, offset3, angle, + axis_id, frame_id));} + + +; + } +SWIGINTERN void cbf_handle_struct_read_file(cbf_handle_struct *self,char *filename,int headers){ + /* CBFlib needs a stream that will remain open + hence DO NOT open from python */ + FILE *stream; + if ( ! ( stream = fopen (filename, "rb")) ){ + {(error_status = CBF_FILEOPEN);}; + } + else{ + {(error_status = cbf_read_file(self, stream, headers));}; + } + } +SWIGINTERN char const *cbf_handle_struct_datablock_name(cbf_handle_struct *self){ + const char* result; + {(error_status = cbf_datablock_name(self, &result));}; + return result;} +SWIGINTERN void cbf_handle_struct_set_realarray_wdims(cbf_handle_struct *self,unsigned int compression,int binary_id,char *data,int len,int elsize,int elements,char *bo,int bolen,int dimfast,int dimmid,int dimslow,int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + {(error_status = cbf_set_realarray_wdims (self, compression, binary_id, + (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder, + (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding));} + +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN cbf_detector cbf_handle_struct_construct_reference_detector(cbf_handle_struct *self,unsigned int element_number){ + cbf_detector detector; + {(error_status = cbf_construct_reference_detector(self,&detector,element_number));}; + return detector; + } +SWIGINTERN void cbf_handle_struct_get_real_3d_image_fs_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int ndimfast,int ndimmid,int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + {(error_status = cbf_get_real_3d_image_fs(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow));} + + +; + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } +SWIGINTERN void cbf_handle_struct_rewind_row(cbf_handle_struct *self){ + {(error_status = cbf_rewind_row(self));};} +SWIGINTERN void cbf_handle_struct_get_axis_setting(cbf_handle_struct *self,char const *axis_id,double *start,double *increment){ + unsigned int reserved; + reserved = 0; + {(error_status = cbf_get_axis_setting(self,reserved,axis_id, + start,increment));} +; + } +SWIGINTERN void cbf_handle_struct_require_column(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_require_column(self,arg));};} +SWIGINTERN void cbf_handle_struct_get_timestamp(cbf_handle_struct *self,double *time,int *timezone){ + unsigned int reserved; + reserved = 0; + {(error_status = cbf_get_timestamp(self,reserved,time,timezone));}; + } +SWIGINTERN void cbf_handle_struct_find_nextrow(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_find_nextrow(self,arg));};} +SWIGINTERN char const *cbf_handle_struct_get_axis_equipment_component(cbf_handle_struct *self,char const *axis_id){ + const char* equip_comp; + {(error_status = cbf_get_axis_equipment_component(self,axis_id, + &equip_comp));} +; + return equip_comp; + } +SWIGINTERN void cbf_handle_struct_get_realarrayparameters_wdims_sf(cbf_handle_struct *self,int *compression,int *binary_id,int *elsize,int *elements,char **bo,int *bolen,int *dimslow,int *dimmid,int *dimfast,int *padding){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + {(error_status = cbf_get_realarrayparameters_wdims_sf(self, + &comp,binary_id, &elsiz, &elem, + &byteorder,&ds,&dm,&df,&pd ));} + +; + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {{(error_status = CBF_ALLOC);}} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +SWIGINTERN void cbf_handle_struct_reset_datablock(cbf_handle_struct *self){ + {(error_status = cbf_reset_datablock(self));};} +SWIGINTERN void cbf_handle_struct_set_3d_image_fs(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int elsign,int ndimfast,int ndimmid,int ndimslow){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + {(error_status = cbf_set_3d_image_fs (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimfast, (size_t) ndimmid, (size_t)ndimslow));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_set_saveframename(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_set_saveframename(self,arg));};} +SWIGINTERN void cbf_handle_struct_require_integervalue(cbf_handle_struct *self,int *number,int thedefault){ + + {(error_status = cbf_require_integervalue(self,number,thedefault));}; + + } +SWIGINTERN void cbf_handle_struct_get_integerarrayparameters(cbf_handle_struct *self,int *compression,int *binary_id,int *elsize,int *elsigned,int *elunsigned,int *elements,int *minelement,int *maxelement){ + unsigned int comp; + size_t elsiz, elem; + {(error_status = cbf_get_integerarrayparameters(self, + &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, + minelement, maxelement));} + +; + *compression = comp; /* FIXME - does this convert in C? */ + *elsize = elsiz; + *elements = elem; + } +SWIGINTERN void cbf_handle_struct_set_real_3d_image_sf(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int ndimslow,int ndimmid,int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + {(error_status = cbf_set_real_3d_image_sf (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_write_file(cbf_handle_struct *self,char const *filename,int ciforcbf,int headers,int encoding){ + FILE *stream; + int readable; + /* Make readable false so we can close the file immediately */ + readable = 0; + if ( ! ( stream = fopen (filename, "w+b")) ){ + {(error_status = CBF_FILEOPEN);}; + } + else{ + {(error_status = cbf_write_file(self, stream, readable, + ciforcbf, headers, encoding));} +; + fclose(stream); + } + } +SWIGINTERN void cbf_handle_struct_set_divergence(cbf_handle_struct *self,double div_x_source,double div_y_source,double div_x_y_source){ + {(error_status = cbf_set_divergence (self, div_x_source, + div_y_source,div_x_y_source));} +; + } +SWIGINTERN void cbf_handle_struct_remove_datablock(cbf_handle_struct *self){ + {(error_status = cbf_remove_datablock(self));};} +SWIGINTERN unsigned int cbf_handle_struct_count_elements(cbf_handle_struct *self){ + unsigned int result; + {(error_status = cbf_count_elements(self,&result));}; + return result;} +SWIGINTERN void cbf_handle_struct_set_image_fs(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int elsign,int ndimfast,int ndimslow){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + {(error_status = cbf_set_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimfast, (size_t)ndimslow));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN cbf_detector cbf_handle_struct_require_reference_detector(cbf_handle_struct *self,unsigned int element_number){ + cbf_detector detector; + {(error_status = cbf_require_reference_detector(self,&detector,element_number));}; + return detector; + } +SWIGINTERN void cbf_handle_struct_next_category(cbf_handle_struct *self){ + {(error_status = cbf_next_category(self));};} +SWIGINTERN void cbf_handle_struct_set_diffrn_id(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_set_diffrn_id(self,arg));};} +SWIGINTERN void cbf_handle_struct_set_timestamp(cbf_handle_struct *self,double time,int timezone,double precision){ + unsigned int reserved; + reserved = 0; + {(error_status = cbf_set_timestamp(self,reserved,time,timezone,precision));}; + } +SWIGINTERN void cbf_handle_struct_get_orientation_matrix(cbf_handle_struct *self,double *m0,double *m1,double *m2,double *m3,double *m4,double *m5,double *m6,double *m7,double *m8){ + double m[9]; + {(error_status = cbf_get_orientation_matrix(self,m));}; + *m0 = m[0]; *m1=m[1] ; *m2=m[2] ; + *m3 = m[3]; *m4=m[4] ; *m5=m[5] ; + *m6 = m[6]; *m7=m[7] ; *m8=m[8] ; + } +SWIGINTERN void cbf_handle_struct_get_image_size_fs(cbf_handle_struct *self,unsigned int element_number,int *ndimfast,int *ndimslow){ + unsigned int reserved; + size_t infast, inslow; + reserved = 0; + {(error_status = cbf_get_image_size_fs(self,reserved,element_number,&infast,&inslow));}; + *ndimfast = (int)infast; /* FIXME - is that how to convert? */ + *ndimslow = (int)inslow; + } +SWIGINTERN void cbf_handle_struct_get_divergence(cbf_handle_struct *self,double *div_x_source,double *div_y_source,double *div_x_y_source){ + {(error_status = cbf_get_divergence(self, + div_x_source, + div_y_source, + div_x_y_source));} + + +; + } +SWIGINTERN void cbf_handle_struct_rewind_category(cbf_handle_struct *self){ + {(error_status = cbf_rewind_category(self));};} +SWIGINTERN void cbf_handle_struct_read_template(cbf_handle_struct *self,char *filename){ + /* CBFlib needs a stream that will remain open + hence DO NOT open from python */ + FILE *stream; + if ( ! ( stream = fopen (filename, "rb")) ){ + {(error_status = CBF_FILEOPEN);}; + } + else{ + {(error_status = cbf_read_template (self, stream));}; } + } +SWIGINTERN void cbf_handle_struct_select_row(cbf_handle_struct *self,unsigned int arg){ + {(error_status = cbf_select_row(self,arg));};} +SWIGINTERN void cbf_handle_struct_get_image_fs_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int elsign,int ndimfast,int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + {(error_status = cbf_get_image_fs(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimfast, (size_t)ndimslow));} + + +; + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } +SWIGINTERN void cbf_handle_struct_get_image_size_sf(cbf_handle_struct *self,unsigned int element_number,int *ndimslow,int *ndimfast){ + unsigned int reserved; + size_t inslow, infast; + reserved = 0; + {(error_status = cbf_get_image_size(self,reserved,element_number,&inslow,&infast));}; + *ndimslow = (int)inslow; + *ndimfast = (int)infast; + } +SWIGINTERN void cbf_handle_struct_get_real_image_fs_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int ndimfast,int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + {(error_status = cbf_get_real_image_fs(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimfast, (size_t)ndimslow));} + + +; + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } +SWIGINTERN unsigned int cbf_handle_struct_count_columns(cbf_handle_struct *self){ + unsigned int result; + {(error_status = cbf_count_columns(self,&result));}; + return result;} +SWIGINTERN void cbf_handle_struct_get_integerarrayparameters_wdims(cbf_handle_struct *self,int *compression,int *binary_id,int *elsize,int *elsigned,int *elunsigned,int *elements,int *minelement,int *maxelement,char **bo,int *bolen,int *dimfast,int *dimmid,int *dimslow,int *padding){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + {(error_status = cbf_get_integerarrayparameters_wdims(self, + &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, + minelement, maxelement, &byteorder,&df,&dm,&ds,&pd ));} + +; + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {{(error_status = CBF_ALLOC);}} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +SWIGINTERN void cbf_handle_struct_get_gain(cbf_handle_struct *self,unsigned int element_number,double *gain,double *gain_esd){ + {(error_status = cbf_get_gain (self, element_number, gain, gain_esd));}; + } +SWIGINTERN void cbf_handle_struct_new_saveframe(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_new_saveframe(self,arg));};} +SWIGINTERN void cbf_handle_struct_set_polarization(cbf_handle_struct *self,double polarizn_source_ratio,double polarizn_source_norm){ + {(error_status = cbf_set_polarization(self, + polarizn_source_ratio, + polarizn_source_norm));} + +; + } +SWIGINTERN void cbf_handle_struct_set_real_3d_image(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int ndimslow,int ndimmid,int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + {(error_status = cbf_set_real_3d_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_delete_row(cbf_handle_struct *self,unsigned int arg){ + {(error_status = cbf_delete_row(self,arg));};} +SWIGINTERN char const *cbf_handle_struct_column_name(cbf_handle_struct *self){ + const char* result; + {(error_status = cbf_column_name(self, &result));}; + return result;} +SWIGINTERN void cbf_handle_struct_remove_saveframe(cbf_handle_struct *self){ + {(error_status = cbf_remove_saveframe(self));};} +SWIGINTERN void cbf_handle_struct_set_integerarray_wdims_sf(cbf_handle_struct *self,unsigned int compression,int binary_id,char *data,int len,int elsize,int elsigned,int elements,char *bo,int bolen,int dimslow,int dimmid,int dimfast,int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + {(error_status = cbf_set_integerarray_wdims_sf (self, compression, binary_id, + (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder, + (size_t)dimslow, (size_t)dimmid, (size_t)dimfast, (size_t)padding));} + +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN char const *cbf_handle_struct_require_value(cbf_handle_struct *self,char const *defaultvalue){ + const char * result; + {(error_status = cbf_require_value(self, &result, defaultvalue));}; + return result; + } +SWIGINTERN void cbf_handle_struct_require_column_integervalue(cbf_handle_struct *self,char const *columnname,int *number,int const defaultvalue){ + {(error_status = cbf_require_column_integervalue(self, + columnname, number,defaultvalue));} +; + } +SWIGINTERN void cbf_handle_struct_set_pixel_size(cbf_handle_struct *self,unsigned int element_number,unsigned int axis_number,double psize){ + {(error_status = cbf_set_pixel_size(self, + element_number, + axis_number, + psize));} + + +; + } +SWIGINTERN void cbf_handle_struct_next_column(cbf_handle_struct *self){ + {(error_status = cbf_next_column(self));};} +SWIGINTERN void cbf_handle_struct_get_3d_image_size_sf(cbf_handle_struct *self,unsigned int element_number,int *ndimslow,int *ndimmid,int *ndimfast){ + unsigned int reserved; + size_t inslow, inmid, infast; + reserved = 0; + {(error_status = cbf_get_3d_image_size_sf(self,reserved,element_number,&inslow,&inmid,&infast));}; + *ndimslow = (int)inslow; /* FIXME - is that how to convert? */ + *ndimmid = (int)inmid; + *ndimfast = (int)infast; + } +SWIGINTERN void cbf_handle_struct_get_realarrayparameters_wdims_fs(cbf_handle_struct *self,int *compression,int *binary_id,int *elsize,int *elements,char **bo,int *bolen,int *dimfast,int *dimmid,int *dimslow,int *padding){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + {(error_status = cbf_get_realarrayparameters_wdims_fs(self, + &comp,binary_id, &elsiz, &elem, + &byteorder,&df,&dm,&ds,&pd ));} + +; + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {{(error_status = CBF_ALLOC);}} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +SWIGINTERN void cbf_handle_struct_get_realarray_as_string(cbf_handle_struct *self,char **s,int *slen){ + int binary_id; + size_t elements, elements_read, elsize; + unsigned int compression; + void * array; + *slen = 0; /* Initialise in case of problems */ + {(error_status = cbf_get_realarrayparameters(self, &compression, + &binary_id, &elsize, + &elements));} + +; + + if ((array=malloc(elsize*elements))) { + /* cbf_failnez (cbf_select_column(cbf,colnum)) */ + {(error_status = cbf_get_realarray(self, &binary_id, + (void *)array, elsize, + elements, &elements_read));} + +; + + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*elements; + *s = (char *) array; + } +SWIGINTERN void cbf_handle_struct_get_bin_sizes(cbf_handle_struct *self,int element_number,double *slowbinsize,double *fastbinsize){ + {(error_status = cbf_get_bin_sizes (self, (unsigned int)element_number, slowbinsize, fastbinsize));}; + } +SWIGINTERN void cbf_handle_struct_reset_category(cbf_handle_struct *self){ + {(error_status = cbf_reset_category(self));};} +SWIGINTERN void cbf_handle_struct_count_axis_ancestors(cbf_handle_struct *self,char const *axis_id,int *ancestors){ + unsigned int anc; + {(error_status = cbf_count_axis_ancestors(self,axis_id,&anc));}; + *ancestors = anc; + } +SWIGINTERN cbf_goniometer cbf_handle_struct_construct_goniometer(cbf_handle_struct *self){ + cbf_goniometer goniometer; + {(error_status = cbf_construct_goniometer(self,&goniometer));}; + return goniometer; + } +SWIGINTERN void cbf_handle_struct_set_datablockname(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_set_datablockname(self,arg));};} +SWIGINTERN void cbf_handle_struct_get_element_number(cbf_handle_struct *self){ + {(error_status = CBF_NOTIMPLEMENTED);};} +SWIGINTERN void cbf_handle_struct_set_crystal_id(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_set_crystal_id(self,arg));};} +SWIGINTERN void cbf_handle_struct_get_integerarray_as_string(cbf_handle_struct *self,char **s,int *slen){ + int binary_id, elsigned, elunsigned; + size_t elements, elements_read, elsize; + int minelement, maxelement; + unsigned int compression; + void * array; + *slen = 0; /* Initialise in case of problems */ + {(error_status = cbf_get_integerarrayparameters(self, &compression, + &binary_id, &elsize, &elsigned, &elunsigned, + &elements, &minelement, &maxelement));} + +; + + if ((array=malloc(elsize*elements))) { + /* cbf_failnez (cbf_select_column(cbf,colnum)) */ + {(error_status = cbf_get_integerarray(self, &binary_id, + (void *)array, elsize, elsigned, + elements, &elements_read));} + +; + + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*elements; + *s = (char *) array; + } +SWIGINTERN void cbf_handle_struct_set_3d_image(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int elsign,int ndimslow,int ndimmid,int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + {(error_status = cbf_set_3d_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t) ndimmid, (size_t)ndimfast));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_set_dictionary(cbf_handle_struct *self,cbf_handle other){ + {(error_status = cbf_set_dictionary(self,other));}; +} +SWIGINTERN char const *cbf_handle_struct_find_tag_category(cbf_handle_struct *self,char const *tagname){ + const char * result; + {(error_status = cbf_find_tag_category(self,tagname, &result));}; + return result; + } +SWIGINTERN void cbf_handle_struct_get_real_3d_image_sf_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int ndimslow,int ndimmid,int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + {(error_status = cbf_get_real_3d_image_sf(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast));} + + +; + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } +SWIGINTERN void cbf_handle_struct_set_typeofvalue(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_set_typeofvalue(self,arg));};} +SWIGINTERN char const *cbf_handle_struct_get_axis_rotation_axis(cbf_handle_struct *self,char const *axis_id){ + const char* rot_axis; + {(error_status = cbf_get_axis_rotation_axis(self,axis_id, + &rot_axis));} +; + return rot_axis; + } +SWIGINTERN void cbf_handle_struct_set_integerarray_wdims(cbf_handle_struct *self,unsigned int compression,int binary_id,char *data,int len,int elsize,int elsigned,int elements,char *bo,int bolen,int dimfast,int dimmid,int dimslow,int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + {(error_status = cbf_set_integerarray_wdims (self, compression, binary_id, + (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder, + (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding));} + +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_set_integration_time(cbf_handle_struct *self,double time){ + unsigned int reserved; + reserved = 0; + {(error_status = cbf_set_integration_time(self,reserved,time));}; + } +SWIGINTERN void cbf_handle_struct_set_axis_setting(cbf_handle_struct *self,char const *axis_id,double start,double increment){ + unsigned int reserved; + reserved = 0; + {(error_status = cbf_set_axis_setting(self,reserved, + axis_id,start,increment));} +; + } +SWIGINTERN void cbf_handle_struct_get_real_image_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int ndimslow,int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + {(error_status = cbf_get_real_image(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimfast));} + + +; + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } +SWIGINTERN char const *cbf_handle_struct_get_axis_ancestor(cbf_handle_struct *self,char const *axis_id,int ancestor_index){ + const char* anc; + {(error_status = cbf_get_axis_ancestor(self,axis_id, + (unsigned int)ancestor_index,&anc));} +; + return anc; + } +SWIGINTERN void cbf_handle_struct_get_3d_image_sf_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int elsign,int ndimfast,int ndimmid,int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + {(error_status = cbf_get_3d_image_sf(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast));} + + +; + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } +SWIGINTERN void cbf_handle_struct_set_real_image_fs(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int ndimfast,int ndimslow){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + {(error_status = cbf_set_real_image_fs (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimfast, (size_t)ndimslow));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_get_overload(cbf_handle_struct *self,unsigned int element_number,double *overload){ + {(error_status = cbf_get_overload(self,element_number,overload));}; + } +SWIGINTERN double cbf_handle_struct_get_wavelength(cbf_handle_struct *self){ + double result; + {(error_status = cbf_get_wavelength(self,&result));}; + return result;} +SWIGINTERN void cbf_handle_struct_next_datablock(cbf_handle_struct *self){ + {(error_status = cbf_next_datablock(self));};} +SWIGINTERN void cbf_handle_struct_get_realarrayparameters_wdims(cbf_handle_struct *self,int *compression,int *binary_id,int *elsize,int *elements,char **bo,int *bolen,int *dimfast,int *dimmid,int *dimslow,int *padding){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + {(error_status = cbf_get_realarrayparameters_wdims(self, + &comp,binary_id, &elsiz, &elem, + &byteorder,&df,&dm,&ds,&pd ));} + +; + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {{(error_status = CBF_ALLOC);}} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +SWIGINTERN void cbf_handle_struct_set_orientation_matrix(cbf_handle_struct *self,double m0,double m1,double m2,double m3,double m4,double m5,double m6,double m7,double m8){ + double m[9]; + m[0] = m0; m[1]=m1 ; m[2]=m2 ; + m[3] = m3; m[4]=m4 ; m[5]=m5 ; + m[6] = m6; m[7]=m7 ; m[8]=m8 ; + {(error_status = cbf_get_orientation_matrix(self,m));}; + } +SWIGINTERN void cbf_handle_struct_new_category(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_new_category(self,arg));};} +SWIGINTERN void cbf_handle_struct_set_gain(cbf_handle_struct *self,unsigned int element_number,double gain,double gain_esd){ + {(error_status = cbf_set_gain (self, element_number, gain, gain_esd));}; + } +SWIGINTERN void cbf_handle_struct_find_column(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_find_column(self,arg));};} +SWIGINTERN void cbf_handle_struct_remove_category(cbf_handle_struct *self){ + {(error_status = cbf_remove_category(self));};} +SWIGINTERN void cbf_handle_struct_get_integerarrayparameters_wdims_sf(cbf_handle_struct *self,int *compression,int *binary_id,int *elsize,int *elsigned,int *elunsigned,int *elements,int *minelement,int *maxelement,char **bo,int *bolen,int *dimslow,int *dimmid,int *dimfast,int *padding){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + {(error_status = cbf_get_integerarrayparameters_wdims_sf(self, + &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, + minelement, maxelement, &byteorder,&ds,&dm,&df,&pd ));} + +; + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {{(error_status = CBF_ALLOC);}} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +SWIGINTERN void cbf_handle_struct_get_pixel_size(cbf_handle_struct *self,unsigned int element_number,unsigned int axis_number,double *psize){ + {(error_status = cbf_get_pixel_size(self, + element_number, + axis_number, + psize));} + + +; + } +SWIGINTERN void cbf_handle_struct_set_real_image_sf(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int ndimslow,int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + {(error_status = cbf_set_real_image_sf (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimfast));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_require_category(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_require_category(self,arg));};} +SWIGINTERN void cbf_handle_struct_get_reciprocal_cell(cbf_handle_struct *self,double *astar,double *bstar,double *cstar,double *alphastar,double *betastar,double *gammastar){ + double rcell[6]; + {(error_status = cbf_get_reciprocal_cell(self,rcell,NULL));}; + *astar = rcell[0]; + *bstar = rcell[1]; + *cstar = rcell[2]; + *alphastar = rcell[3]; + *betastar = rcell[4]; + *gammastar = rcell[5]; + } +SWIGINTERN void cbf_handle_struct_get_reciprocal_cell_esd(cbf_handle_struct *self,double *a_esd,double *b_esd,double *c_esd,double *alpha_esd,double *beta_esd,double *gamma_esd){ + double cell_esd[6]; + {(error_status = cbf_get_reciprocal_cell(self,NULL,cell_esd));}; + *a_esd = cell_esd[0]; + *b_esd = cell_esd[1]; + *c_esd = cell_esd[2]; + *alpha_esd = cell_esd[3]; + *beta_esd = cell_esd[4]; + *gamma_esd = cell_esd[5]; + } +SWIGINTERN void cbf_handle_struct_get_3d_image_size(cbf_handle_struct *self,unsigned int element_number,int *ndimslow,int *ndimmid,int *ndimfast){ + unsigned int reserved; + size_t inslow, inmid, infast; + reserved = 0; + {(error_status = cbf_get_3d_image_size(self,reserved,element_number,&inslow,&inmid,&infast));}; + *ndimslow = (int)inslow; /* FIXME - is that how to convert? */ + *ndimmid = (int)inmid; + *ndimfast = (int)infast; + } +SWIGINTERN char const *cbf_handle_struct_find_tag_root(cbf_handle_struct *self,char const *tagname){ + const char* result; + {(error_status = cbf_find_tag_root(self,tagname,&result));}; + return result; +} +SWIGINTERN char const *cbf_handle_struct_require_category_root(cbf_handle_struct *self,char const *categoryname){ + const char* result; + {(error_status = cbf_require_category_root(self,categoryname, &result));}; + return result; +} +SWIGINTERN void cbf_handle_struct_set_realarray_wdims_sf(cbf_handle_struct *self,unsigned int compression,int binary_id,char *data,int len,int elsize,int elements,char *bo,int bolen,int dimslow,int dimmid,int dimfast,int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + {(error_status = cbf_set_realarray_wdims_sf (self, compression, binary_id, + (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder, + (size_t) dimslow, (size_t) dimmid, (size_t) dimfast, (size_t)padding));} + +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_set_integervalue(cbf_handle_struct *self,int number){ + {(error_status = cbf_set_integervalue(self,number));};} +SWIGINTERN char const *cbf_handle_struct_category_name(cbf_handle_struct *self){ + const char* result; + {(error_status = cbf_category_name(self, &result));}; + return result;} +SWIGINTERN char const *cbf_handle_struct_get_typeofvalue(cbf_handle_struct *self){ + const char* result; + {(error_status = cbf_get_typeofvalue(self, &result));}; + return result;} +SWIGINTERN void cbf_handle_struct_set_real_image(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int ndimslow,int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + {(error_status = cbf_set_real_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimfast));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_get_3d_image_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int elsign,int ndimfast,int ndimmid,int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + {(error_status = cbf_get_3d_image(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast));} + + +; + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } +SWIGINTERN void cbf_handle_struct_get_axis_reference_poise(cbf_handle_struct *self,double *vector1,double *vector2,double *vector3,double *offset1,double *offset2,double *offset3,char const *axis_id){ + {(error_status = cbf_get_axis_reference_poise(self, + vector1, vector2, vector3, + offset1, offset2, offset3, + axis_id));} + + +; + } +SWIGINTERN void cbf_handle_struct_remove_row(cbf_handle_struct *self){ + {(error_status = cbf_remove_row(self));};} +SWIGINTERN void cbf_handle_struct_set_overload(cbf_handle_struct *self,unsigned int element_number,double overload){ + {(error_status = cbf_set_overload(self,element_number,overload));}; + } +SWIGINTERN void cbf_handle_struct_get_image_size(cbf_handle_struct *self,unsigned int element_number,int *ndimslow,int *ndimfast){ + unsigned int reserved; + size_t inslow, infast; + reserved = 0; + {(error_status = cbf_get_image_size(self,reserved,element_number,&inslow,&infast));}; + *ndimslow = (int)inslow; + *ndimfast = (int)infast; + } +SWIGINTERN void cbf_handle_struct_set_3d_image_sf(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int elsign,int ndimslow,int ndimmid,int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + {(error_status = cbf_set_3d_image_sf (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t) ndimmid, (size_t)ndimfast));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_get_real_image_sf_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int ndimslow,int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + {(error_status = cbf_get_real_image_sf(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimfast));} + + +; + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } +SWIGINTERN void cbf_handle_struct_get_image_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int elsign,int ndimslow,int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + {(error_status = cbf_get_image(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimslow, (size_t)ndimfast));} + + +; + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } +SWIGINTERN void cbf_handle_struct_set_tag_root(cbf_handle_struct *self,char const *tagname,char const *tagroot_in){ + {(error_status = cbf_set_tag_root(self,tagname,tagroot_in));}; +} +SWIGINTERN void cbf_handle_struct_write_widefile(cbf_handle_struct *self,char const *filename,int ciforcbf,int headers,int encoding){ + FILE *stream; + int readable; + /* Make readable false so we can close the file immediately */ + readable = 0; + if ( ! ( stream = fopen (filename, "w+b")) ){ + {(error_status = CBF_FILEOPEN);}; + } + else{ + {(error_status = cbf_write_widefile(self, stream, readable, + ciforcbf, headers, encoding));} +; + fclose(stream); + + } + } +SWIGINTERN unsigned int cbf_handle_struct_count_rows(cbf_handle_struct *self){ + unsigned int result; + {(error_status = cbf_count_rows(self,&result));}; + return result;} +SWIGINTERN void cbf_handle_struct_require_datablock(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_require_datablock(self,arg));};} +SWIGINTERN void cbf_handle_struct_set_integerarray(cbf_handle_struct *self,unsigned int compression,int binary_id,char *data,int len,int elsize,int elsigned,int elements){ + /* safety check on args */ + size_t els, ele; + void *array; + if(len == elsize*elements){ + array = data; + els = elsize; + ele = elements; + {(error_status = cbf_set_integerarray (self, compression, binary_id, + (void *) data, (size_t) elsize, elsigned, (size_t) elements));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_new_datablock(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_new_datablock(self,arg));};} +SWIGINTERN void cbf_handle_struct_set_datestamp(cbf_handle_struct *self,int year,int month,int day,int hour,int minute,double second,int timezone,double precision){ + unsigned int reserved; + reserved = 0; + {(error_status = cbf_set_datestamp(self,reserved, + year,month,day,hour,minute,second,timezone,precision));} +; + } +SWIGINTERN void cbf_handle_struct_next_row(cbf_handle_struct *self){ + {(error_status = cbf_next_row(self));};} +SWIGINTERN void cbf_handle_struct_set_category_root(cbf_handle_struct *self,char const *categoryname,char const *categoryroot){ + {(error_status = cbf_set_category_root(self,categoryname,categoryroot));}; +} +SWIGINTERN void cbf_handle_struct_get_axis_offset(cbf_handle_struct *self,char const *axis_id,double *offset1,double *offset2,double *offset3){ + {(error_status = cbf_get_axis_offset(self,axis_id, + offset1, offset2,offset3));} +; + } +SWIGINTERN void cbf_handle_struct_set_pixel_size_fs(cbf_handle_struct *self,unsigned int element_number,unsigned int axis_number,double psize){ + {(error_status = cbf_set_pixel_size_fs(self, + element_number, + axis_number, + psize));} + + +; + } +SWIGINTERN void cbf_handle_struct_insert_row(cbf_handle_struct *self,unsigned int arg){ + {(error_status = cbf_insert_row(self,arg));};} +SWIGINTERN void cbf_handle_struct_new_column(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_new_column(self,arg));};} +SWIGINTERN void cbf_handle_struct_get_real_3d_image_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int ndimslow,int ndimmid,int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + {(error_status = cbf_get_real_3d_image(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast));} + + +; + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } +SWIGINTERN void cbf_handle_struct_get_integration_time(cbf_handle_struct *self,double *time){ + unsigned int reserved; + double tim; + reserved = 0; + {(error_status = cbf_get_integration_time(self,reserved,&tim));}; + *time = tim; + } +SWIGINTERN void cbf_handle_struct_set_realarray(cbf_handle_struct *self,unsigned int compression,int binary_id,char *data,int len,int elsize,int elements){ + /* safety check on args */ + size_t els, ele; + void *array; + if(len == elsize*elements){ + array = data; + els = elsize; + ele = elements; + {(error_status = cbf_set_realarray (self, compression, binary_id, + (void *) data, (size_t) elsize, (size_t) elements));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN char const *cbf_handle_struct_get_element_id(cbf_handle_struct *self,unsigned int element_number){ + const char * result; + {(error_status = cbf_get_element_id (self, element_number, &result));}; + return result; + } +SWIGINTERN void cbf_handle_struct_get_image_sf_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int elsign,int ndimslow,int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + {(error_status = cbf_get_image_sf(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimslow, (size_t)ndimfast));} + + +; + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } +SWIGINTERN cbf_positioner cbf_handle_struct_construct_positioner(cbf_handle_struct *self,char const *axis_id){ + cbf_positioner positioner; + {(error_status = cbf_construct_positioner(self,&positioner,axis_id));}; + return positioner; + } +SWIGINTERN void cbf_handle_struct_get_3d_image_size_fs(cbf_handle_struct *self,unsigned int element_number,int *ndimfast,int *ndimmid,int *ndimslow){ + unsigned int reserved; + size_t inslow, inmid, infast; + reserved = 0; + {(error_status = cbf_get_3d_image_size_fs(self,reserved,element_number,&infast,&inmid,&inslow));}; + *ndimslow = (int)inslow; /* FIXME - is that how to convert? */ + *ndimmid = (int)inmid; + *ndimfast = (int)infast; + } +SWIGINTERN void cbf_handle_struct_set_value(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_set_value(self,arg));};} +SWIGINTERN void cbf_handle_struct_set_current_timestamp(cbf_handle_struct *self,int timezone){ + unsigned int reserved; + reserved = 0; + {(error_status = cbf_set_current_timestamp(self,reserved,timezone));}; + } +SWIGINTERN void cbf_handle_struct_require_doublevalue(cbf_handle_struct *self,double *number,double defaultvalue){ + {(error_status = cbf_require_doublevalue(self,number,defaultvalue));}; +} +SWIGINTERN void cbf_handle_struct_rewind_datablock(cbf_handle_struct *self){ + {(error_status = cbf_rewind_datablock(self));};} +SWIGINTERN char const *cbf_handle_struct_require_column_value(cbf_handle_struct *self,char const *columnname,char const *defaultvalue){ + const char * result; + {(error_status = cbf_require_column_value(self,columnname, + &result,defaultvalue));} +; + return result; +} +SWIGINTERN cbf_handle cbf_handle_struct_get_dictionary(cbf_handle_struct *self){ + cbf_handle temp; + {(error_status = cbf_get_dictionary(self,&temp));}; + return temp; +} +SWIGINTERN void cbf_handle_struct_reset_saveframe(cbf_handle_struct *self){ + {(error_status = cbf_reset_saveframe(self));};} +SWIGINTERN void cbf_handle_struct_set_reciprocal_cell(cbf_handle_struct *self,double cell[6]){ + {(error_status = cbf_set_reciprocal_cell(self,cell,NULL));}; + } +SWIGINTERN void cbf_handle_struct_set_reciprocal_cell_esd(cbf_handle_struct *self,double cell_esd[6]){ + {(error_status = cbf_set_reciprocal_cell(self,NULL,cell_esd));}; + } +SWIGINTERN void cbf_handle_struct_set_real_3d_image_fs(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int ndimfast,int ndimmid,int ndimslow){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + {(error_status = cbf_set_real_3d_image_fs (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_set_doublevalue(cbf_handle_struct *self,char const *format,double number){ + {(error_status = cbf_set_doublevalue(self,format,number));};} +SWIGINTERN void cbf_handle_struct_find_category(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_find_category(self,arg));};} +SWIGINTERN void cbf_handle_struct_get_integerarrayparameters_wdims_fs(cbf_handle_struct *self,int *compression,int *binary_id,int *elsize,int *elsigned,int *elunsigned,int *elements,int *minelement,int *maxelement,char **bo,int *bolen,int *dimfast,int *dimmid,int *dimslow,int *padding){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + {(error_status = cbf_get_integerarrayparameters_wdims_fs(self, + &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, + minelement, maxelement, &byteorder,&df,&dm,&ds,&pd ));} + +; + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {{(error_status = CBF_ALLOC);}} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +SWIGINTERN void cbf_handle_struct_set_realarray_wdims_fs(cbf_handle_struct *self,unsigned int compression,int binary_id,char *data,int len,int elsize,int elements,char *bo,int bolen,int dimfast,int dimmid,int dimslow,int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + {(error_status = cbf_set_realarray_wdims_fs (self, compression, binary_id, + (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder, + (size_t) dimfast, (size_t) dimmid, (size_t) dimslow, (size_t)padding));} + +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN char const *cbf_handle_struct_find_category_root(cbf_handle_struct *self,char const *categoryname){ + const char * result; + {(error_status = cbf_find_category_root(self,categoryname,&result));}; + return result; +} +SWIGINTERN void cbf_handle_struct_set_integerarray_wdims_fs(cbf_handle_struct *self,unsigned int compression,int binary_id,char *data,int len,int elsize,int elsigned,int elements,char *bo,int bolen,int dimfast,int dimmid,int dimslow,int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + {(error_status = cbf_set_integerarray_wdims_fs (self, compression, binary_id, + (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder, + (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding));} + +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_set_image_sf(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int elsign,int ndimslow,int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + {(error_status = cbf_set_image_sf (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t)ndimfast));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN char const *cbf_handle_struct_get_axis_equipment(cbf_handle_struct *self,char const *axis_id){ + const char* equip; + {(error_status = cbf_get_axis_equipment(self,axis_id, + &equip));} +; + return equip; + } +SWIGINTERN void cbf_handle_struct_set_unit_cell(cbf_handle_struct *self,double cell[6]){ + {(error_status = cbf_set_unit_cell(self,cell,NULL));}; + } +SWIGINTERN void cbf_handle_struct_set_unit_cell_esd(cbf_handle_struct *self,double cell_esd[6]){ + {(error_status = cbf_set_unit_cell(self,NULL,cell_esd));}; + } +#ifdef __cplusplus +extern "C" { +#endif +SWIGINTERN PyObject *_wrap_new_doubleArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + size_t arg1 ; + size_t val1 ; + int ecode1 = 0 ; + PyObject *swig_obj[1] ; + doubleArray *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_doubleArray" "', argument " "1"" of type '" "size_t""'"); + } + arg1 = (size_t)(val1); + result = (doubleArray *)new_doubleArray(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_doubleArray, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_doubleArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + doubleArray *arg1 = (doubleArray *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_doubleArray, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_doubleArray" "', argument " "1"" of type '" "doubleArray *""'"); + } + arg1 = (doubleArray *)(argp1); + delete_doubleArray(arg1); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_doubleArray___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + doubleArray *arg1 = (doubleArray *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + double result; + + if (!SWIG_Python_UnpackTuple(args, "doubleArray___getitem__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_doubleArray, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "doubleArray___getitem__" "', argument " "1"" of type '" "doubleArray *""'"); + } + arg1 = (doubleArray *)(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "doubleArray___getitem__" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = (size_t)(val2); + result = (double)doubleArray___getitem__(arg1,arg2); + resultobj = SWIG_From_double((double)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_doubleArray___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + doubleArray *arg1 = (doubleArray *) 0 ; + size_t arg2 ; + double arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "doubleArray___setitem__", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_doubleArray, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "doubleArray___setitem__" "', argument " "1"" of type '" "doubleArray *""'"); + } + arg1 = (doubleArray *)(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "doubleArray___setitem__" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = (size_t)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "doubleArray___setitem__" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + doubleArray___setitem__(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_doubleArray_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + doubleArray *arg1 = (doubleArray *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_doubleArray, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "doubleArray_cast" "', argument " "1"" of type '" "doubleArray *""'"); + } + arg1 = (doubleArray *)(argp1); + result = (double *)doubleArray_cast(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_doubleArray_frompointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + double *arg1 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + doubleArray *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "doubleArray_frompointer" "', argument " "1"" of type '" "double *""'"); + } + arg1 = (double *)(argp1); + result = (doubleArray *)doubleArray_frompointer(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_doubleArray, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *doubleArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_doubleArray, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *doubleArray_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_intArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + size_t arg1 ; + size_t val1 ; + int ecode1 = 0 ; + PyObject *swig_obj[1] ; + intArray *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_intArray" "', argument " "1"" of type '" "size_t""'"); + } + arg1 = (size_t)(val1); + result = (intArray *)new_intArray(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_intArray, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_intArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + intArray *arg1 = (intArray *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_intArray, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_intArray" "', argument " "1"" of type '" "intArray *""'"); + } + arg1 = (intArray *)(argp1); + delete_intArray(arg1); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_intArray___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + intArray *arg1 = (intArray *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + int result; + + if (!SWIG_Python_UnpackTuple(args, "intArray___getitem__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_intArray, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "intArray___getitem__" "', argument " "1"" of type '" "intArray *""'"); + } + arg1 = (intArray *)(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "intArray___getitem__" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = (size_t)(val2); + result = (int)intArray___getitem__(arg1,arg2); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_intArray___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + intArray *arg1 = (intArray *) 0 ; + size_t arg2 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "intArray___setitem__", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_intArray, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "intArray___setitem__" "', argument " "1"" of type '" "intArray *""'"); + } + arg1 = (intArray *)(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "intArray___setitem__" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = (size_t)(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "intArray___setitem__" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + intArray___setitem__(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_intArray_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + intArray *arg1 = (intArray *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_intArray, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "intArray_cast" "', argument " "1"" of type '" "intArray *""'"); + } + arg1 = (intArray *)(argp1); + result = (int *)intArray_cast(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_intArray_frompointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + int *arg1 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + intArray *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_int, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "intArray_frompointer" "', argument " "1"" of type '" "int *""'"); + } + arg1 = (int *)(argp1); + result = (intArray *)intArray_frompointer(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_intArray, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *intArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_intArray, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *intArray_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_shortArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + size_t arg1 ; + size_t val1 ; + int ecode1 = 0 ; + PyObject *swig_obj[1] ; + shortArray *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_shortArray" "', argument " "1"" of type '" "size_t""'"); + } + arg1 = (size_t)(val1); + result = (shortArray *)new_shortArray(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_shortArray, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_shortArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + shortArray *arg1 = (shortArray *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_shortArray, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_shortArray" "', argument " "1"" of type '" "shortArray *""'"); + } + arg1 = (shortArray *)(argp1); + delete_shortArray(arg1); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_shortArray___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + shortArray *arg1 = (shortArray *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + short result; + + if (!SWIG_Python_UnpackTuple(args, "shortArray___getitem__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_shortArray, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "shortArray___getitem__" "', argument " "1"" of type '" "shortArray *""'"); + } + arg1 = (shortArray *)(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "shortArray___getitem__" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = (size_t)(val2); + result = (short)shortArray___getitem__(arg1,arg2); + resultobj = SWIG_From_short((short)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_shortArray___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + shortArray *arg1 = (shortArray *) 0 ; + size_t arg2 ; + short arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + short val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "shortArray___setitem__", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_shortArray, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "shortArray___setitem__" "', argument " "1"" of type '" "shortArray *""'"); + } + arg1 = (shortArray *)(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "shortArray___setitem__" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = (size_t)(val2); + ecode3 = SWIG_AsVal_short(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "shortArray___setitem__" "', argument " "3"" of type '" "short""'"); + } + arg3 = (short)(val3); + shortArray___setitem__(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_shortArray_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + shortArray *arg1 = (shortArray *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + short *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_shortArray, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "shortArray_cast" "', argument " "1"" of type '" "shortArray *""'"); + } + arg1 = (shortArray *)(argp1); + result = (short *)shortArray_cast(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_short, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_shortArray_frompointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + short *arg1 = (short *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + shortArray *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_short, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "shortArray_frompointer" "', argument " "1"" of type '" "short *""'"); + } + arg1 = (short *)(argp1); + result = (shortArray *)shortArray_frompointer(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_shortArray, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *shortArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_shortArray, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *shortArray_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_longArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + size_t arg1 ; + size_t val1 ; + int ecode1 = 0 ; + PyObject *swig_obj[1] ; + longArray *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_longArray" "', argument " "1"" of type '" "size_t""'"); + } + arg1 = (size_t)(val1); + result = (longArray *)new_longArray(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_longArray, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_longArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + longArray *arg1 = (longArray *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_longArray, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_longArray" "', argument " "1"" of type '" "longArray *""'"); + } + arg1 = (longArray *)(argp1); + delete_longArray(arg1); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_longArray___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + longArray *arg1 = (longArray *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + long result; + + if (!SWIG_Python_UnpackTuple(args, "longArray___getitem__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_longArray, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "longArray___getitem__" "', argument " "1"" of type '" "longArray *""'"); + } + arg1 = (longArray *)(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "longArray___getitem__" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = (size_t)(val2); + result = (long)longArray___getitem__(arg1,arg2); + resultobj = SWIG_From_long((long)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_longArray___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + longArray *arg1 = (longArray *) 0 ; + size_t arg2 ; + long arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + long val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "longArray___setitem__", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_longArray, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "longArray___setitem__" "', argument " "1"" of type '" "longArray *""'"); + } + arg1 = (longArray *)(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "longArray___setitem__" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = (size_t)(val2); + ecode3 = SWIG_AsVal_long(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "longArray___setitem__" "', argument " "3"" of type '" "long""'"); + } + arg3 = (long)(val3); + longArray___setitem__(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_longArray_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + longArray *arg1 = (longArray *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + long *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_longArray, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "longArray_cast" "', argument " "1"" of type '" "longArray *""'"); + } + arg1 = (longArray *)(argp1); + result = (long *)longArray_cast(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_longArray_frompointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + long *arg1 = (long *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + longArray *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_long, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "longArray_frompointer" "', argument " "1"" of type '" "long *""'"); + } + arg1 = (long *)(argp1); + result = (longArray *)longArray_frompointer(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_longArray, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *longArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_longArray, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *longArray_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_get_local_integer_byte_order(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + char **arg1 = (char **) 0 ; + int *arg2 = (int *) 0 ; + char *temp1 = 0 ; + int tempn1 ; + + arg1 = &temp1; arg2 = &tempn1; + if (!SWIG_Python_UnpackTuple(args, "get_local_integer_byte_order", 0, 0, 0)) SWIG_fail; + { + error_status=0; + get_local_integer_byte_order(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (*arg1) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg1,*arg2)); + free(*arg1); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_compute_cell_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + double *arg1 ; + double *arg2 = (double *) 0 ; + double temp1[6] ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + if (!args) SWIG_fail; + swig_obj[0] = args; + { + if (swig_obj[0] == Py_None) arg1 = NULL; + else + if (!convert_darray(swig_obj[0],temp1,6)) { + return NULL; + } + arg1 = &temp1[0]; + } + { + error_status=0; + compute_cell_volume(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_get_local_real_format(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + char **arg1 = (char **) 0 ; + int *arg2 = (int *) 0 ; + char *temp1 = 0 ; + int tempn1 ; + + arg1 = &temp1; arg2 = &tempn1; + if (!SWIG_Python_UnpackTuple(args, "get_local_real_format", 0, 0, 0)) SWIG_fail; + { + error_status=0; + get_local_real_format(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (*arg1) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg1,*arg2)); + free(*arg1); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_airy_disk(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + double arg1 ; + double arg2 ; + double arg3 ; + double arg4 ; + double arg5 ; + double arg6 ; + double *arg7 = (double *) 0 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double val6 ; + int ecode6 = 0 ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + PyObject *swig_obj[6] ; + + arg7 = &temp7; + if (!SWIG_Python_UnpackTuple(args, "airy_disk", 6, 6, swig_obj)) SWIG_fail; + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "airy_disk" "', argument " "1"" of type '" "double""'"); + } + arg1 = (double)(val1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "airy_disk" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "airy_disk" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "airy_disk" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); + ecode5 = SWIG_AsVal_double(swig_obj[4], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "airy_disk" "', argument " "5"" of type '" "double""'"); + } + arg5 = (double)(val5); + ecode6 = SWIG_AsVal_double(swig_obj[5], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "airy_disk" "', argument " "6"" of type '" "double""'"); + } + arg6 = (double)(val6); + { + error_status=0; + airy_disk(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_get_local_real_byte_order(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + char **arg1 = (char **) 0 ; + int *arg2 = (int *) 0 ; + char *temp1 = 0 ; + int tempn1 ; + + arg1 = &temp1; arg2 = &tempn1; + if (!SWIG_Python_UnpackTuple(args, "get_local_real_byte_order", 0, 0, 0)) SWIG_fail; + { + error_status=0; + get_local_real_byte_order(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (*arg1) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg1,*arg2)); + free(*arg1); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_compute_reciprocal_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + double *arg1 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + double *arg7 = (double *) 0 ; + double temp1[6] ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + if (!args) SWIG_fail; + swig_obj[0] = args; + { + if (swig_obj[0] == Py_None) arg1 = NULL; + else + if (!convert_darray(swig_obj[0],temp1,6)) { + return NULL; + } + arg1 = &temp1[0]; + } + { + error_status=0; + compute_reciprocal_cell(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_airy_disk_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + double arg1 ; + double arg2 ; + double arg3 ; + double arg4 ; + double arg5 ; + double arg6 ; + double arg7 ; + double arg8 ; + double *arg9 = (double *) 0 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double val6 ; + int ecode6 = 0 ; + double val7 ; + int ecode7 = 0 ; + double val8 ; + int ecode8 = 0 ; + double temp9 ; + int res9 = SWIG_TMPOBJ ; + PyObject *swig_obj[8] ; + + arg9 = &temp9; + if (!SWIG_Python_UnpackTuple(args, "airy_disk_volume", 8, 8, swig_obj)) SWIG_fail; + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "airy_disk_volume" "', argument " "1"" of type '" "double""'"); + } + arg1 = (double)(val1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "airy_disk_volume" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "airy_disk_volume" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "airy_disk_volume" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); + ecode5 = SWIG_AsVal_double(swig_obj[4], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "airy_disk_volume" "', argument " "5"" of type '" "double""'"); + } + arg5 = (double)(val5); + ecode6 = SWIG_AsVal_double(swig_obj[5], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "airy_disk_volume" "', argument " "6"" of type '" "double""'"); + } + arg6 = (double)(val6); + ecode7 = SWIG_AsVal_double(swig_obj[6], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "airy_disk_volume" "', argument " "7"" of type '" "double""'"); + } + arg7 = (double)(val7); + ecode8 = SWIG_AsVal_double(swig_obj[7], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "airy_disk_volume" "', argument " "8"" of type '" "double""'"); + } + arg8 = (double)(val8); + { + error_status=0; + airy_disk_volume(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res9)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg9))); + } else { + int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_matrix_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + double (*arg2)[4] ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_positioner_struct_matrix_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_matrix_set" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + } + arg1 = (cbf_positioner_struct *)(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_a_4__double, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_positioner_struct_matrix_set" "', argument " "2"" of type '" "double [3][4]""'"); + } + arg2 = (double (*)[4])(argp2); + { + if (arg2) { + size_t ii = 0; + for (; ii < (size_t)3; ++ii) { + if (arg2[ii]) { + size_t jj = 0; + for (; jj < (size_t)4; ++jj) arg1->matrix[ii][jj] = arg2[ii][jj]; + } else { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""matrix""' of type '""double [3][4]""'"); + } + } + } else { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""matrix""' of type '""double [3][4]""'"); + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_matrix_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double (*result)[4] = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_matrix_get" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + } + arg1 = (cbf_positioner_struct *)(argp1); + result = (double (*)[4])(double (*)[4]) ((arg1)->matrix); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_a_4__double, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_axis_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + cbf_axis_struct *arg2 = (cbf_axis_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_positioner_struct_axis_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_axis_set" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + } + arg1 = (cbf_positioner_struct *)(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cbf_axis_struct, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_positioner_struct_axis_set" "', argument " "2"" of type '" "cbf_axis_struct *""'"); + } + arg2 = (cbf_axis_struct *)(argp2); + if (arg1) (arg1)->axis = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_axis_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cbf_axis_struct *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_axis_get" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + } + arg1 = (cbf_positioner_struct *)(argp1); + result = (cbf_axis_struct *) ((arg1)->axis); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_axis_struct, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_axes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_positioner_struct_axes_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_axes_set" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + } + arg1 = (cbf_positioner_struct *)(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_positioner_struct_axes_set" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = (size_t)(val2); + if (arg1) (arg1)->axes = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_axes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_axes_get" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + } + arg1 = (cbf_positioner_struct *)(argp1); + result = ((arg1)->axes); + resultobj = SWIG_From_size_t((size_t)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_matrix_is_valid_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_positioner_struct_matrix_is_valid_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_matrix_is_valid_set" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + } + arg1 = (cbf_positioner_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_positioner_struct_matrix_is_valid_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + if (arg1) (arg1)->matrix_is_valid = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_matrix_is_valid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_matrix_is_valid_get" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + } + arg1 = (cbf_positioner_struct *)(argp1); + result = (int) ((arg1)->matrix_is_valid); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_matrix_ratio_used_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_positioner_struct_matrix_ratio_used_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_matrix_ratio_used_set" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + } + arg1 = (cbf_positioner_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_positioner_struct_matrix_ratio_used_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + if (arg1) (arg1)->matrix_ratio_used = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_matrix_ratio_used_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_matrix_ratio_used_get" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + } + arg1 = (cbf_positioner_struct *)(argp1); + result = (double) ((arg1)->matrix_ratio_used); + resultobj = SWIG_From_double((double)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_axis_index_limit_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_positioner_struct_axis_index_limit_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_axis_index_limit_set" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + } + arg1 = (cbf_positioner_struct *)(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_positioner_struct_axis_index_limit_set" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = (size_t)(val2); + if (arg1) (arg1)->axis_index_limit = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_axis_index_limit_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_axis_index_limit_get" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + } + arg1 = (cbf_positioner_struct *)(argp1); + result = ((arg1)->axis_index_limit); + resultobj = SWIG_From_size_t((size_t)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_cbf_positioner_struct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_positioner_struct *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "new_cbf_positioner_struct", 0, 0, 0)) SWIG_fail; + { + error_status=0; + result = (cbf_positioner_struct *)new_cbf_positioner_struct(); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_positioner_struct, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_cbf_positioner_struct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_cbf_positioner_struct" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + } + arg1 = (cbf_positioner_struct *)(argp1); + { + error_status=0; + delete_cbf_positioner_struct(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_get_rotation_range(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_get_rotation_range" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + } + arg1 = (cbf_positioner_struct *)(argp1); + { + error_status=0; + cbf_positioner_struct_get_rotation_range(arg1,arg2,arg3); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_rotate_vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + double arg2 ; + double arg3 ; + double arg4 ; + double arg5 ; + double *arg6 = (double *) 0 ; + double *arg7 = (double *) 0 ; + double *arg8 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + double temp8 ; + int res8 = SWIG_TMPOBJ ; + PyObject *swig_obj[5] ; + + arg6 = &temp6; + arg7 = &temp7; + arg8 = &temp8; + if (!SWIG_Python_UnpackTuple(args, "cbf_positioner_struct_rotate_vector", 5, 5, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_rotate_vector" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + } + arg1 = (cbf_positioner_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_positioner_struct_rotate_vector" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_positioner_struct_rotate_vector" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_positioner_struct_rotate_vector" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); + ecode5 = SWIG_AsVal_double(swig_obj[4], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_positioner_struct_rotate_vector" "', argument " "5"" of type '" "double""'"); + } + arg5 = (double)(val5); + { + error_status=0; + cbf_positioner_struct_rotate_vector(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res8)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg8))); + } else { + int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_get_goniometer_poise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + double arg2 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + double *arg7 = (double *) 0 ; + double *arg8 = (double *) 0 ; + double *arg9 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + double temp8 ; + int res8 = SWIG_TMPOBJ ; + double temp9 ; + int res9 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; + + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + arg8 = &temp8; + arg9 = &temp9; + if (!SWIG_Python_UnpackTuple(args, "cbf_positioner_struct_get_goniometer_poise", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_get_goniometer_poise" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + } + arg1 = (cbf_positioner_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_positioner_struct_get_goniometer_poise" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + { + error_status=0; + cbf_positioner_struct_get_goniometer_poise(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res8)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg8))); + } else { + int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res9)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg9))); + } else { + int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_get_reciprocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + double arg2 ; + double arg3 ; + double arg4 ; + double arg5 ; + double arg6 ; + double *arg7 = (double *) 0 ; + double *arg8 = (double *) 0 ; + double *arg9 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double val6 ; + int ecode6 = 0 ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + double temp8 ; + int res8 = SWIG_TMPOBJ ; + double temp9 ; + int res9 = SWIG_TMPOBJ ; + PyObject *swig_obj[6] ; + + arg7 = &temp7; + arg8 = &temp8; + arg9 = &temp9; + if (!SWIG_Python_UnpackTuple(args, "cbf_positioner_struct_get_reciprocal", 6, 6, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_get_reciprocal" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + } + arg1 = (cbf_positioner_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_positioner_struct_get_reciprocal" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_positioner_struct_get_reciprocal" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_positioner_struct_get_reciprocal" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); + ecode5 = SWIG_AsVal_double(swig_obj[4], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_positioner_struct_get_reciprocal" "', argument " "5"" of type '" "double""'"); + } + arg5 = (double)(val5); + ecode6 = SWIG_AsVal_double(swig_obj[5], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_positioner_struct_get_reciprocal" "', argument " "6"" of type '" "double""'"); + } + arg6 = (double)(val6); + { + error_status=0; + cbf_positioner_struct_get_reciprocal(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res8)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg8))); + } else { + int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res9)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg9))); + } else { + int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_get_rotation_axis(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_get_rotation_axis" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + } + arg1 = (cbf_positioner_struct *)(argp1); + { + error_status=0; + cbf_positioner_struct_get_rotation_axis(arg1,arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *cbf_positioner_struct_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cbf_positioner_struct, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *cbf_positioner_struct_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_positioner_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + cbf_positioner arg2 = (cbf_positioner) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_positioner_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_positioner_set" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cbf_positioner_struct, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_detector_struct_positioner_set" "', argument " "2"" of type '" "cbf_positioner""'"); + } + arg2 = (cbf_positioner)(argp2); + if (arg1) (arg1)->positioner = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_positioner_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cbf_positioner result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_positioner_get" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + result = (cbf_positioner) ((arg1)->positioner); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_displacement_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2[2] ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_displacement_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_displacement_set" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + { + if (swig_obj[1] == Py_None) arg2 = NULL; + else + if (!convert_darray(swig_obj[1],temp2,2)) { + return NULL; + } + arg2 = &temp2[0]; + } + { + if (arg2) { + size_t ii = 0; + for (; ii < (size_t)2; ++ii) *(double *)&arg1->displacement[ii] = *((double *)arg2 + ii); + } else { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""displacement""' of type '""double [2]""'"); + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_displacement_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_displacement_get" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + result = (double *)(double *) ((arg1)->displacement); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_increment_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2[2] ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_increment_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_increment_set" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + { + if (swig_obj[1] == Py_None) arg2 = NULL; + else + if (!convert_darray(swig_obj[1],temp2,2)) { + return NULL; + } + arg2 = &temp2[0]; + } + { + if (arg2) { + size_t ii = 0; + for (; ii < (size_t)2; ++ii) *(double *)&arg1->increment[ii] = *((double *)arg2 + ii); + } else { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""increment""' of type '""double [2]""'"); + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_increment_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_increment_get" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + result = (double *)(double *) ((arg1)->increment); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_axes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_axes_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_axes_set" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_axes_set" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = (size_t)(val2); + if (arg1) (arg1)->axes = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_axes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_axes_get" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + result = ((arg1)->axes); + resultobj = SWIG_From_size_t((size_t)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_index_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + size_t *arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_index_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_index_set" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_size_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_detector_struct_index_set" "', argument " "2"" of type '" "size_t [2]""'"); + } + arg2 = (size_t *)(argp2); + { + if (arg2) { + size_t ii = 0; + for (; ii < (size_t)2; ++ii) *(size_t *)&arg1->index[ii] = *((size_t *)arg2 + ii); + } else { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""index""' of type '""size_t [2]""'"); + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_index_get" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + result = (size_t *)(size_t *) ((arg1)->index); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_size_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_cbf_detector_struct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "new_cbf_detector_struct", 0, 0, 0)) SWIG_fail; + { + error_status=0; + result = (cbf_detector_struct *)new_cbf_detector_struct(); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_detector_struct, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_cbf_detector_struct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_cbf_detector_struct" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + { + error_status=0; + delete_cbf_detector_struct(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_set_beam_center_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + PyObject *swig_obj[5] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_set_beam_center_fs", 5, 5, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_set_beam_center_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_detector_struct_set_beam_center_fs" "', argument " "2"" of type '" "double *""'"); + } + arg2 = (double *)(argp2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "cbf_detector_struct_set_beam_center_fs" "', argument " "3"" of type '" "double *""'"); + } + arg3 = (double *)(argp3); + res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_detector_struct_set_beam_center_fs" "', argument " "4"" of type '" "double *""'"); + } + arg4 = (double *)(argp4); + res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "cbf_detector_struct_set_beam_center_fs" "', argument " "5"" of type '" "double *""'"); + } + arg5 = (double *)(argp5); + { + error_status=0; + cbf_detector_struct_set_beam_center_fs(arg1,arg2,arg3,arg4,arg5); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_set_reference_beam_center_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + PyObject *swig_obj[5] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_set_reference_beam_center_fs", 5, 5, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_set_reference_beam_center_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_detector_struct_set_reference_beam_center_fs" "', argument " "2"" of type '" "double *""'"); + } + arg2 = (double *)(argp2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "cbf_detector_struct_set_reference_beam_center_fs" "', argument " "3"" of type '" "double *""'"); + } + arg3 = (double *)(argp3); + res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_detector_struct_set_reference_beam_center_fs" "', argument " "4"" of type '" "double *""'"); + } + arg4 = (double *)(argp4); + res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "cbf_detector_struct_set_reference_beam_center_fs" "', argument " "5"" of type '" "double *""'"); + } + arg5 = (double *)(argp5); + { + error_status=0; + cbf_detector_struct_set_reference_beam_center_fs(arg1,arg2,arg3,arg4,arg5); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_beam_center(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_beam_center" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + { + error_status=0; + cbf_detector_struct_get_beam_center(arg1,arg2,arg3,arg4,arg5); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_coordinates_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double arg2 ; + double arg3 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + PyObject *swig_obj[3] ; + + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_get_pixel_coordinates_fs", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_pixel_coordinates_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_pixel_coordinates_fs" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_detector_struct_get_pixel_coordinates_fs" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + { + error_status=0; + cbf_detector_struct_get_pixel_coordinates_fs(arg1,arg2,arg3,arg4,arg5,arg6); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_inferred_pixel_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + unsigned int arg2 ; + double *arg3 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; + + arg3 = &temp3; + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_get_inferred_pixel_size", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_inferred_pixel_size" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_inferred_pixel_size" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + { + error_status=0; + cbf_detector_struct_get_inferred_pixel_size(arg1,arg2,arg3); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double arg2 ; + double arg3 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[3] ; + + arg4 = &temp4; + arg5 = &temp5; + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_get_pixel_area", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_pixel_area" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_pixel_area" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_detector_struct_get_pixel_area" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + { + error_status=0; + cbf_detector_struct_get_pixel_area(arg1,arg2,arg3,arg4,arg5); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_normal_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double arg2 ; + double arg3 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + PyObject *swig_obj[3] ; + + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_get_pixel_normal_fs", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_pixel_normal_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_pixel_normal_fs" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_detector_struct_get_pixel_normal_fs" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + { + error_status=0; + cbf_detector_struct_get_pixel_normal_fs(arg1,arg2,arg3,arg4,arg5,arg6); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_surface_axes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_get_detector_surface_axes", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_detector_surface_axes" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_detector_surface_axes" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + { + error_status=0; + result = (char *)cbf_detector_struct_get_detector_surface_axes(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_axes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + double *arg7 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_detector_axes" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + { + error_status=0; + cbf_detector_struct_get_detector_axes(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_set_reference_beam_center(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + PyObject *swig_obj[5] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_set_reference_beam_center", 5, 5, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_set_reference_beam_center" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_detector_struct_set_reference_beam_center" "', argument " "2"" of type '" "double *""'"); + } + arg2 = (double *)(argp2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "cbf_detector_struct_set_reference_beam_center" "', argument " "3"" of type '" "double *""'"); + } + arg3 = (double *)(argp3); + res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_detector_struct_set_reference_beam_center" "', argument " "4"" of type '" "double *""'"); + } + arg4 = (double *)(argp4); + res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "cbf_detector_struct_set_reference_beam_center" "', argument " "5"" of type '" "double *""'"); + } + arg5 = (double *)(argp5); + { + error_status=0; + cbf_detector_struct_set_reference_beam_center(arg1,arg2,arg3,arg4,arg5); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_axis_slow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_detector_axis_slow" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + { + error_status=0; + cbf_detector_struct_get_detector_axis_slow(arg1,arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_detector_distance" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + { + error_status=0; + cbf_detector_struct_get_detector_distance(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_inferred_pixel_size_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + unsigned int arg2 ; + double *arg3 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; + + arg3 = &temp3; + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_get_inferred_pixel_size_fs", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_inferred_pixel_size_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_inferred_pixel_size_fs" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + { + error_status=0; + cbf_detector_struct_get_inferred_pixel_size_fs(arg1,arg2,arg3); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_normal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_detector_normal" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + { + error_status=0; + cbf_detector_struct_get_detector_normal(arg1,arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_axis_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_detector_axis_fast" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + { + error_status=0; + cbf_detector_struct_get_detector_axis_fast(arg1,arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_axes_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + double *arg7 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_detector_axes_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + { + error_status=0; + cbf_detector_struct_get_detector_axes_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_axes_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + double *arg7 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_detector_axes_sf" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + { + error_status=0; + cbf_detector_struct_get_detector_axes_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_coordinates_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double arg2 ; + double arg3 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + PyObject *swig_obj[3] ; + + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_get_pixel_coordinates_sf", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_pixel_coordinates_sf" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_pixel_coordinates_sf" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_detector_struct_get_pixel_coordinates_sf" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + { + error_status=0; + cbf_detector_struct_get_pixel_coordinates_sf(arg1,arg2,arg3,arg4,arg5,arg6); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_set_beam_center(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + PyObject *swig_obj[5] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_set_beam_center", 5, 5, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_set_beam_center" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_detector_struct_set_beam_center" "', argument " "2"" of type '" "double *""'"); + } + arg2 = (double *)(argp2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "cbf_detector_struct_set_beam_center" "', argument " "3"" of type '" "double *""'"); + } + arg3 = (double *)(argp3); + res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_detector_struct_set_beam_center" "', argument " "4"" of type '" "double *""'"); + } + arg4 = (double *)(argp4); + res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "cbf_detector_struct_set_beam_center" "', argument " "5"" of type '" "double *""'"); + } + arg5 = (double *)(argp5); + { + error_status=0; + cbf_detector_struct_set_beam_center(arg1,arg2,arg3,arg4,arg5); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_area_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double arg2 ; + double arg3 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[3] ; + + arg4 = &temp4; + arg5 = &temp5; + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_get_pixel_area_fs", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_pixel_area_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_pixel_area_fs" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_detector_struct_get_pixel_area_fs" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + { + error_status=0; + cbf_detector_struct_get_pixel_area_fs(arg1,arg2,arg3,arg4,arg5); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_beam_center_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_beam_center_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + { + error_status=0; + cbf_detector_struct_get_beam_center_fs(arg1,arg2,arg3,arg4,arg5); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_inferred_pixel_size_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + unsigned int arg2 ; + double *arg3 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; + + arg3 = &temp3; + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_get_inferred_pixel_size_sf", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_inferred_pixel_size_sf" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_inferred_pixel_size_sf" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + { + error_status=0; + cbf_detector_struct_get_inferred_pixel_size_sf(arg1,arg2,arg3); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_coordinates(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double arg2 ; + double arg3 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + PyObject *swig_obj[3] ; + + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_get_pixel_coordinates", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_pixel_coordinates" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_pixel_coordinates" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_detector_struct_get_pixel_coordinates" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + { + error_status=0; + cbf_detector_struct_get_pixel_coordinates(arg1,arg2,arg3,arg4,arg5,arg6); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_beam_center_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_beam_center_sf" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + { + error_status=0; + cbf_detector_struct_get_beam_center_sf(arg1,arg2,arg3,arg4,arg5); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_area_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double arg2 ; + double arg3 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[3] ; + + arg4 = &temp4; + arg5 = &temp5; + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_get_pixel_area_sf", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_pixel_area_sf" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_pixel_area_sf" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_detector_struct_get_pixel_area_sf" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + { + error_status=0; + cbf_detector_struct_get_pixel_area_sf(arg1,arg2,arg3,arg4,arg5); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_set_reference_beam_center_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_set_reference_beam_center_sf" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + { + error_status=0; + cbf_detector_struct_set_reference_beam_center_sf(arg1,arg2,arg3,arg4,arg5); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_set_beam_center_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_set_beam_center_sf" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + { + error_status=0; + cbf_detector_struct_set_beam_center_sf(arg1,arg2,arg3,arg4,arg5); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_normal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double arg2 ; + double arg3 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + PyObject *swig_obj[3] ; + + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_get_pixel_normal", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_pixel_normal" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_pixel_normal" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_detector_struct_get_pixel_normal" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + { + error_status=0; + cbf_detector_struct_get_pixel_normal(arg1,arg2,arg3,arg4,arg5,arg6); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *cbf_detector_struct_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cbf_detector_struct, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *cbf_detector_struct_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_node_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + cbf_node *arg2 = (cbf_node *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_node_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_node_set" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cbf_node, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_node_set" "', argument " "2"" of type '" "cbf_node *""'"); + } + arg2 = (cbf_node *)(argp2); + if (arg1) (arg1)->node = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_node_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cbf_node *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_node_get" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + result = (cbf_node *) ((arg1)->node); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_node, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_row_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_row_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_row_set" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_row_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + if (arg1) (arg1)->row = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_row_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_row_get" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + result = (int) ((arg1)->row); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_search_row_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_search_row_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_search_row_set" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_search_row_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + if (arg1) (arg1)->search_row = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_search_row_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_search_row_get" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + result = (int) ((arg1)->search_row); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_cbf_handle_struct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "new_cbf_handle_struct", 0, 0, 0)) SWIG_fail; + { + error_status=0; + result = (cbf_handle_struct *)new_cbf_handle_struct(); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_handle_struct, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_cbf_handle_struct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_cbf_handle_struct" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + delete_cbf_handle_struct(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_select_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_select_datablock", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_select_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_select_datablock" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + { + error_status=0; + cbf_handle_struct_select_datablock(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_force_new_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_force_new_datablock", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_force_new_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_force_new_datablock" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_force_new_datablock(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_fs_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int arg2 ; + char **arg3 = (char **) 0 ; + int *arg4 = (int *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + int arg9 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + char *temp3 = 0 ; + int tempn3 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int val9 ; + int ecode9 = 0 ; + PyObject *swig_obj[7] ; + + arg3 = &temp3; arg4 = &tempn3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_3d_image_fs_as_string", 7, 7, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_3d_image_fs_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_3d_image_fs_as_string" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode5 = SWIG_AsVal_int(swig_obj[2], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_3d_image_fs_as_string" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[3], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_3d_image_fs_as_string" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[4], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_3d_image_fs_as_string" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[5], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_3d_image_fs_as_string" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + ecode9 = SWIG_AsVal_int(swig_obj[6], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_get_3d_image_fs_as_string" "', argument " "9"" of type '" "int""'"); + } + arg9 = (int)(val9); + { + error_status=0; + cbf_handle_struct_get_3d_image_fs_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (*arg3) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); + free(*arg3); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_reset_datablocks(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_reset_datablocks" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_reset_datablocks(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_tag_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_tag_category", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_tag_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_tag_category" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "cbf_handle_struct_set_tag_category" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = (char *)(buf3); + { + error_status=0; + cbf_handle_struct_set_tag_category(arg1,(char const *)arg2,(char const *)arg3); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_tag_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_require_tag_root", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_tag_root" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_tag_root" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + result = (char *)cbf_handle_struct_require_tag_root(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_row_number(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + unsigned int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_row_number" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + result = (unsigned int)cbf_handle_struct_row_number(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + int arg9 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int val9 ; + int ecode9 = 0 ; + PyObject *swig_obj[8] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_image", 8, 8, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_image" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_image" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_image" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_image" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_image" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_image" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_image" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + ecode9 = SWIG_AsVal_int(swig_obj[7], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_image" "', argument " "9"" of type '" "int""'"); + } + arg9 = (int)(val9); + { + error_status=0; + cbf_handle_struct_set_image(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return resultobj; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_bin_sizes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int arg2 ; + double arg3 ; + double arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject *swig_obj[4] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_bin_sizes", 4, 4, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_bin_sizes" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_bin_sizes" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_bin_sizes" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_bin_sizes" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); + { + error_status=0; + cbf_handle_struct_set_bin_sizes(arg1,arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_new_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_new_row" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_new_row(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_rewind_saveframe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_rewind_saveframe" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_rewind_saveframe(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_realarrayparameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int *arg2 = (int *) 0 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; + int *arg5 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int temp2 ; + int res2 = SWIG_TMPOBJ ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + int temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_realarrayparameters" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_get_realarrayparameters(arg1,arg2,arg3,arg4,arg5); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_pixel_size_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + double *arg4 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[3] ; + + arg4 = &temp4; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_pixel_size_sf", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_pixel_size_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_pixel_size_sf" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_get_pixel_size_sf" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + { + error_status=0; + cbf_handle_struct_get_pixel_size_sf(arg1,arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_force_new_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_force_new_category", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_force_new_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_force_new_category" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_force_new_category(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_force_new_saveframe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_force_new_saveframe", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_force_new_saveframe" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_force_new_saveframe" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_force_new_saveframe(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_count_datablocks(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + unsigned int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_count_datablocks" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + result = (unsigned int)cbf_handle_struct_count_datablocks(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_find_row", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_find_row" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_find_row" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_find_row(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_select_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_select_column", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_select_column" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_select_column" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + { + error_status=0; + cbf_handle_struct_select_column(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_construct_detector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + cbf_detector result; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_construct_detector", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_construct_detector" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_construct_detector" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + { + error_status=0; + result = (cbf_detector)cbf_handle_struct_construct_detector(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_depends_on(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_axis_depends_on", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_depends_on" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_depends_on" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + result = (char *)cbf_handle_struct_get_axis_depends_on(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_rewind_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_rewind_column" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_rewind_column(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_construct_reference_positioner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + cbf_positioner result; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_construct_reference_positioner", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_construct_reference_positioner" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_construct_reference_positioner" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + result = (cbf_positioner)cbf_handle_struct_construct_reference_positioner(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_column_doublevalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + double *arg3 = (double *) 0 ; + double arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double val4 ; + int ecode4 = 0 ; + PyObject *swig_obj[3] ; + + arg3 = &temp3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_require_column_doublevalue", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_column_doublevalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_column_doublevalue" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + ecode4 = SWIG_AsVal_double(swig_obj[2], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_require_column_doublevalue" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); + { + error_status=0; + cbf_handle_struct_require_column_doublevalue(arg1,(char const *)arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_datestamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int *arg2 = (int *) 0 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; + int *arg5 = (int *) 0 ; + int *arg6 = (int *) 0 ; + double *arg7 = (double *) 0 ; + int *arg8 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int temp2 ; + int res2 = SWIG_TMPOBJ ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + int temp5 ; + int res5 = SWIG_TMPOBJ ; + int temp6 ; + int res6 = SWIG_TMPOBJ ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + int temp8 ; + int res8 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + arg8 = &temp8; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_datestamp" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_get_datestamp(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res8)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8))); + } else { + int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integervalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_integervalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + result = (int)cbf_handle_struct_get_integervalue(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_crystal_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_crystal_id" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + result = (char *)cbf_handle_struct_get_crystal_id(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_doublevalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_doublevalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + result = (double)cbf_handle_struct_get_doublevalue(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_From_double((double)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_unit_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + double *arg7 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_unit_cell" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_get_unit_cell(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_unit_cell_esd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + double *arg7 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_unit_cell_esd" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_get_unit_cell_esd(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_axis_type", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_type" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_type" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + result = (char *)cbf_handle_struct_get_axis_type(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_remove_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_remove_column" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_remove_column(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_rewind_blockitem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + CBF_NODETYPE result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_rewind_blockitem" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + result = (CBF_NODETYPE)cbf_handle_struct_rewind_blockitem(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_value" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + result = (char *)cbf_handle_struct_get_value(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_count_categories(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + unsigned int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_count_categories" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + result = (unsigned int)cbf_handle_struct_count_categories(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_read_widefile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_read_widefile", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_read_widefile" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_read_widefile" "', argument " "2"" of type '" "char *""'"); + } + arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_read_widefile" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + { + error_status=0; + cbf_handle_struct_read_widefile(arg1,arg2,arg3); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_wavelength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_wavelength", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_wavelength" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_wavelength" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + { + error_status=0; + cbf_handle_struct_set_wavelength(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; + + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_axis_vector", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_vector" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_vector" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_get_axis_vector(arg1,(char const *)arg2,arg3,arg4,arg5); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_pixel_size_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + double arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject *swig_obj[4] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_pixel_size_sf", 4, 4, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_pixel_size_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_pixel_size_sf" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_pixel_size_sf" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_pixel_size_sf" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); + { + error_status=0; + cbf_handle_struct_set_pixel_size_sf(arg1,arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_diffrn_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_diffrn_id" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + result = (char *)cbf_handle_struct_get_diffrn_id(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_rotation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + double *arg3 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; + + arg3 = &temp3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_axis_rotation", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_rotation" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_rotation" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_get_axis_rotation(arg1,(char const *)arg2,arg3); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_find_datablock", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_find_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_find_datablock" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_find_datablock(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_polarization(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_polarization" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_get_polarization(arg1,arg2,arg3); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_select_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_select_category", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_select_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_select_category" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + { + error_status=0; + cbf_handle_struct_select_category(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_pixel_size_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + double *arg4 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[3] ; + + arg4 = &temp4; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_pixel_size_fs", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_pixel_size_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_pixel_size_fs" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_get_pixel_size_fs" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + { + error_status=0; + cbf_handle_struct_get_pixel_size_fs(arg1,arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_poise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double arg2 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + double *arg7 = (double *) 0 ; + double *arg8 = (double *) 0 ; + double *arg9 = (double *) 0 ; + char *arg10 = (char *) 0 ; + char *arg11 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + double temp8 ; + int res8 = SWIG_TMPOBJ ; + double temp9 ; + int res9 = SWIG_TMPOBJ ; + int res10 ; + char *buf10 = 0 ; + int alloc10 = 0 ; + int res11 ; + char *buf11 = 0 ; + int alloc11 = 0 ; + PyObject *swig_obj[4] ; + + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + arg8 = &temp8; + arg9 = &temp9; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_axis_poise", 4, 4, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_poise" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_axis_poise" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + res10 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf10, NULL, &alloc10); + if (!SWIG_IsOK(res10)) { + SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "cbf_handle_struct_get_axis_poise" "', argument " "10"" of type '" "char const *""'"); + } + arg10 = (char *)(buf10); + res11 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf11, NULL, &alloc11); + if (!SWIG_IsOK(res11)) { + SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "cbf_handle_struct_get_axis_poise" "', argument " "11"" of type '" "char const *""'"); + } + arg11 = (char *)(buf11); + { + error_status=0; + cbf_handle_struct_get_axis_poise(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,(char const *)arg10,(char const *)arg11); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res8)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg8))); + } else { + int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res9)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg9))); + } else { + int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_double, new_flags)); + } + if (alloc10 == SWIG_NEWOBJ) free((char*)buf10); + if (alloc11 == SWIG_NEWOBJ) free((char*)buf11); + return resultobj; +fail: + if (alloc10 == SWIG_NEWOBJ) free((char*)buf10); + if (alloc11 == SWIG_NEWOBJ) free((char*)buf11); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_read_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_read_file", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_read_file" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_read_file" "', argument " "2"" of type '" "char *""'"); + } + arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_read_file" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + { + error_status=0; + cbf_handle_struct_read_file(arg1,arg2,arg3); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_datablock_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_datablock_name" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + result = (char *)cbf_handle_struct_datablock_name(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_realarray_wdims(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + char *arg8 = (char *) 0 ; + int arg9 ; + int arg10 ; + int arg11 ; + int arg12 ; + int arg13 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int res8 ; + char *buf8 = 0 ; + size_t size8 = 0 ; + int alloc8 = 0 ; + int val10 ; + int ecode10 = 0 ; + int val11 ; + int ecode11 = 0 ; + int val12 ; + int ecode12 = 0 ; + int val13 ; + int ecode13 = 0 ; + PyObject *swig_obj[11] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_realarray_wdims", 11, 11, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + res8 = SWIG_AsCharPtrAndSize(swig_obj[6], &buf8, &size8, &alloc8); + if (!SWIG_IsOK(res8)) { + SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "8"" of type '" "char *""'"); + } + arg8 = (char *)(buf8); + arg9 = (int)(size8 - 1); + ecode10 = SWIG_AsVal_int(swig_obj[7], &val10); + if (!SWIG_IsOK(ecode10)) { + SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "10"" of type '" "int""'"); + } + arg10 = (int)(val10); + ecode11 = SWIG_AsVal_int(swig_obj[8], &val11); + if (!SWIG_IsOK(ecode11)) { + SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "11"" of type '" "int""'"); + } + arg11 = (int)(val11); + ecode12 = SWIG_AsVal_int(swig_obj[9], &val12); + if (!SWIG_IsOK(ecode12)) { + SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "12"" of type '" "int""'"); + } + arg12 = (int)(val12); + ecode13 = SWIG_AsVal_int(swig_obj[10], &val13); + if (!SWIG_IsOK(ecode13)) { + SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "13"" of type '" "int""'"); + } + arg13 = (int)(val13); + { + error_status=0; + cbf_handle_struct_set_realarray_wdims(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc8 == SWIG_NEWOBJ) free((char*)buf8); + return resultobj; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc8 == SWIG_NEWOBJ) free((char*)buf8); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_construct_reference_detector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + cbf_detector result; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_construct_reference_detector", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_construct_reference_detector" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_construct_reference_detector" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + { + error_status=0; + result = (cbf_detector)cbf_handle_struct_construct_reference_detector(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_real_3d_image_fs_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int arg2 ; + char **arg3 = (char **) 0 ; + int *arg4 = (int *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + char *temp3 = 0 ; + int tempn3 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + PyObject *swig_obj[6] ; + + arg3 = &temp3; arg4 = &tempn3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_real_3d_image_fs_as_string", 6, 6, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_real_3d_image_fs_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_real_3d_image_fs_as_string" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode5 = SWIG_AsVal_int(swig_obj[2], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_real_3d_image_fs_as_string" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[3], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_real_3d_image_fs_as_string" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[4], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_real_3d_image_fs_as_string" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[5], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_real_3d_image_fs_as_string" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + { + error_status=0; + cbf_handle_struct_get_real_3d_image_fs_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (*arg3) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); + free(*arg3); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_rewind_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_rewind_row" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_rewind_row(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_setting(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; + + arg3 = &temp3; + arg4 = &temp4; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_axis_setting", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_setting" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_setting" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_get_axis_setting(arg1,(char const *)arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_require_column", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_column" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_column" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_require_column(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_timestamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double *arg2 = (double *) 0 ; + int *arg3 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_timestamp" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_get_timestamp(arg1,arg2,arg3); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_nextrow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_find_nextrow", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_find_nextrow" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_find_nextrow" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_find_nextrow(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_equipment_component(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_axis_equipment_component", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_equipment_component" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_equipment_component" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + result = (char *)cbf_handle_struct_get_axis_equipment_component(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_realarrayparameters_wdims_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int *arg2 = (int *) 0 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; + int *arg5 = (int *) 0 ; + char **arg6 = (char **) 0 ; + int *arg7 = (int *) 0 ; + int *arg8 = (int *) 0 ; + int *arg9 = (int *) 0 ; + int *arg10 = (int *) 0 ; + int *arg11 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int temp2 ; + int res2 = SWIG_TMPOBJ ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + int temp5 ; + int res5 = SWIG_TMPOBJ ; + char *temp6 = 0 ; + int tempn6 ; + int temp8 ; + int res8 = SWIG_TMPOBJ ; + int temp9 ; + int res9 = SWIG_TMPOBJ ; + int temp10 ; + int res10 = SWIG_TMPOBJ ; + int temp11 ; + int res11 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; arg7 = &tempn6; + arg8 = &temp8; + arg9 = &temp9; + arg10 = &temp10; + arg11 = &temp11; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_realarrayparameters_wdims_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_get_realarrayparameters_wdims_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); + } + if (*arg6) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg6,*arg7)); + free(*arg6); + } + if (SWIG_IsTmpObj(res8)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8))); + } else { + int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res9)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9))); + } else { + int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res10)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg10))); + } else { + int new_flags = SWIG_IsNewObj(res10) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg10), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res11)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg11))); + } else { + int new_flags = SWIG_IsNewObj(res11) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg11), SWIGTYPE_p_int, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_reset_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_reset_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_reset_datablock(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_3d_image_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + int arg9 ; + int arg10 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int val9 ; + int ecode9 = 0 ; + int val10 ; + int ecode10 = 0 ; + PyObject *swig_obj[9] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_3d_image_fs", 9, 9, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + ecode9 = SWIG_AsVal_int(swig_obj[7], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "9"" of type '" "int""'"); + } + arg9 = (int)(val9); + ecode10 = SWIG_AsVal_int(swig_obj[8], &val10); + if (!SWIG_IsOK(ecode10)) { + SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "10"" of type '" "int""'"); + } + arg10 = (int)(val10); + { + error_status=0; + cbf_handle_struct_set_3d_image_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return resultobj; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_saveframename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_saveframename", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_saveframename" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_saveframename" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_set_saveframename(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_integervalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int *arg2 = (int *) 0 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int temp2 ; + int res2 = SWIG_TMPOBJ ; + int val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[2] ; + + arg2 = &temp2; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_require_integervalue", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_integervalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode3 = SWIG_AsVal_int(swig_obj[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_require_integervalue" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + { + error_status=0; + cbf_handle_struct_require_integervalue(arg1,arg2,arg3); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarrayparameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int *arg2 = (int *) 0 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; + int *arg5 = (int *) 0 ; + int *arg6 = (int *) 0 ; + int *arg7 = (int *) 0 ; + int *arg8 = (int *) 0 ; + int *arg9 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int temp2 ; + int res2 = SWIG_TMPOBJ ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + int temp5 ; + int res5 = SWIG_TMPOBJ ; + int temp6 ; + int res6 = SWIG_TMPOBJ ; + int temp7 ; + int res7 = SWIG_TMPOBJ ; + int temp8 ; + int res8 = SWIG_TMPOBJ ; + int temp9 ; + int res9 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + arg8 = &temp8; + arg9 = &temp9; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_integerarrayparameters" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_get_integerarrayparameters(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res8)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8))); + } else { + int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res9)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9))); + } else { + int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_real_3d_image_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + int arg9 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int val9 ; + int ecode9 = 0 ; + PyObject *swig_obj[8] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_real_3d_image_sf", 8, 8, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_real_3d_image_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_real_3d_image_sf" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_real_3d_image_sf" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_real_3d_image_sf" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_real_3d_image_sf" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_real_3d_image_sf" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_real_3d_image_sf" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + ecode9 = SWIG_AsVal_int(swig_obj[7], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_real_3d_image_sf" "', argument " "9"" of type '" "int""'"); + } + arg9 = (int)(val9); + { + error_status=0; + cbf_handle_struct_set_real_3d_image_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return resultobj; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_write_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + int arg4 ; + int arg5 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + PyObject *swig_obj[5] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_write_file", 5, 5, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_write_file" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_write_file" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_write_file" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_write_file" "', argument " "4"" of type '" "int""'"); + } + arg4 = (int)(val4); + ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_write_file" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + { + error_status=0; + cbf_handle_struct_write_file(arg1,(char const *)arg2,arg3,arg4,arg5); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_divergence(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double arg2 ; + double arg3 ; + double arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject *swig_obj[4] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_divergence", 4, 4, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_divergence" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_divergence" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_divergence" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_divergence" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); + { + error_status=0; + cbf_handle_struct_set_divergence(arg1,arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_remove_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_remove_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_remove_datablock(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_count_elements(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + unsigned int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_count_elements" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + result = (unsigned int)cbf_handle_struct_count_elements(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_image_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + int arg9 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int val9 ; + int ecode9 = 0 ; + PyObject *swig_obj[8] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_image_fs", 8, 8, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_image_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_image_fs" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_image_fs" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_image_fs" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_image_fs" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_image_fs" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_image_fs" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + ecode9 = SWIG_AsVal_int(swig_obj[7], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_image_fs" "', argument " "9"" of type '" "int""'"); + } + arg9 = (int)(val9); + { + error_status=0; + cbf_handle_struct_set_image_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return resultobj; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_reference_detector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + cbf_detector result; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_require_reference_detector", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_reference_detector" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_require_reference_detector" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + { + error_status=0; + result = (cbf_detector)cbf_handle_struct_require_reference_detector(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_next_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_next_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_next_category(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_diffrn_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_diffrn_id", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_diffrn_id" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_diffrn_id" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_set_diffrn_id(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_timestamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double arg2 ; + int arg3 ; + double arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject *swig_obj[4] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_timestamp", 4, 4, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_timestamp" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_timestamp" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_timestamp" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_timestamp" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); + { + error_status=0; + cbf_handle_struct_set_timestamp(arg1,arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_orientation_matrix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + double *arg7 = (double *) 0 ; + double *arg8 = (double *) 0 ; + double *arg9 = (double *) 0 ; + double *arg10 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + double temp8 ; + int res8 = SWIG_TMPOBJ ; + double temp9 ; + int res9 = SWIG_TMPOBJ ; + double temp10 ; + int res10 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + arg8 = &temp8; + arg9 = &temp9; + arg10 = &temp10; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_orientation_matrix" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_get_orientation_matrix(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res8)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg8))); + } else { + int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res9)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg9))); + } else { + int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res10)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg10))); + } else { + int new_flags = SWIG_IsNewObj(res10) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg10), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_image_size_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; + + arg3 = &temp3; + arg4 = &temp4; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_image_size_fs", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_image_size_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_image_size_fs" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + { + error_status=0; + cbf_handle_struct_get_image_size_fs(arg1,arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_divergence(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_divergence" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_get_divergence(arg1,arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_rewind_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_rewind_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_rewind_category(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_read_template(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_read_template", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_read_template" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_read_template" "', argument " "2"" of type '" "char *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_read_template(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_select_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_select_row", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_select_row" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_select_row" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + { + error_status=0; + cbf_handle_struct_select_row(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_image_fs_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int arg2 ; + char **arg3 = (char **) 0 ; + int *arg4 = (int *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + char *temp3 = 0 ; + int tempn3 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + PyObject *swig_obj[6] ; + + arg3 = &temp3; arg4 = &tempn3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_image_fs_as_string", 6, 6, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_image_fs_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_image_fs_as_string" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode5 = SWIG_AsVal_int(swig_obj[2], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_image_fs_as_string" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[3], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_image_fs_as_string" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[4], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_image_fs_as_string" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[5], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_image_fs_as_string" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + { + error_status=0; + cbf_handle_struct_get_image_fs_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (*arg3) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); + free(*arg3); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_image_size_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; + + arg3 = &temp3; + arg4 = &temp4; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_image_size_sf", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_image_size_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_image_size_sf" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + { + error_status=0; + cbf_handle_struct_get_image_size_sf(arg1,arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_real_image_fs_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int arg2 ; + char **arg3 = (char **) 0 ; + int *arg4 = (int *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + char *temp3 = 0 ; + int tempn3 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + PyObject *swig_obj[5] ; + + arg3 = &temp3; arg4 = &tempn3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_real_image_fs_as_string", 5, 5, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_real_image_fs_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_real_image_fs_as_string" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode5 = SWIG_AsVal_int(swig_obj[2], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_real_image_fs_as_string" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[3], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_real_image_fs_as_string" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[4], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_real_image_fs_as_string" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + { + error_status=0; + cbf_handle_struct_get_real_image_fs_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (*arg3) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); + free(*arg3); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_count_columns(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + unsigned int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_count_columns" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + result = (unsigned int)cbf_handle_struct_count_columns(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarrayparameters_wdims(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int *arg2 = (int *) 0 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; + int *arg5 = (int *) 0 ; + int *arg6 = (int *) 0 ; + int *arg7 = (int *) 0 ; + int *arg8 = (int *) 0 ; + int *arg9 = (int *) 0 ; + char **arg10 = (char **) 0 ; + int *arg11 = (int *) 0 ; + int *arg12 = (int *) 0 ; + int *arg13 = (int *) 0 ; + int *arg14 = (int *) 0 ; + int *arg15 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int temp2 ; + int res2 = SWIG_TMPOBJ ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + int temp5 ; + int res5 = SWIG_TMPOBJ ; + int temp6 ; + int res6 = SWIG_TMPOBJ ; + int temp7 ; + int res7 = SWIG_TMPOBJ ; + int temp8 ; + int res8 = SWIG_TMPOBJ ; + int temp9 ; + int res9 = SWIG_TMPOBJ ; + char *temp10 = 0 ; + int tempn10 ; + int temp12 ; + int res12 = SWIG_TMPOBJ ; + int temp13 ; + int res13 = SWIG_TMPOBJ ; + int temp14 ; + int res14 = SWIG_TMPOBJ ; + int temp15 ; + int res15 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + arg8 = &temp8; + arg9 = &temp9; + arg10 = &temp10; arg11 = &tempn10; + arg12 = &temp12; + arg13 = &temp13; + arg14 = &temp14; + arg15 = &temp15; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_integerarrayparameters_wdims" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_get_integerarrayparameters_wdims(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res8)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8))); + } else { + int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res9)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9))); + } else { + int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags)); + } + if (*arg10) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg10,*arg11)); + free(*arg10); + } + if (SWIG_IsTmpObj(res12)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg12))); + } else { + int new_flags = SWIG_IsNewObj(res12) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg12), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res13)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg13))); + } else { + int new_flags = SWIG_IsNewObj(res13) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg13), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res14)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg14))); + } else { + int new_flags = SWIG_IsNewObj(res14) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg14), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res15)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg15))); + } else { + int new_flags = SWIG_IsNewObj(res15) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg15), SWIGTYPE_p_int, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_gain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; + + arg3 = &temp3; + arg4 = &temp4; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_gain", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_gain" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_gain" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + { + error_status=0; + cbf_handle_struct_get_gain(arg1,arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_new_saveframe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_new_saveframe", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_new_saveframe" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_new_saveframe" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_new_saveframe(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_polarization(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double arg2 ; + double arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_polarization", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_polarization" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_polarization" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_polarization" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + { + error_status=0; + cbf_handle_struct_set_polarization(arg1,arg2,arg3); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_real_3d_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + int arg9 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int val9 ; + int ecode9 = 0 ; + PyObject *swig_obj[8] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_real_3d_image", 8, 8, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_real_3d_image" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_real_3d_image" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_real_3d_image" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_real_3d_image" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_real_3d_image" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_real_3d_image" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_real_3d_image" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + ecode9 = SWIG_AsVal_int(swig_obj[7], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_real_3d_image" "', argument " "9"" of type '" "int""'"); + } + arg9 = (int)(val9); + { + error_status=0; + cbf_handle_struct_set_real_3d_image(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return resultobj; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_delete_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_delete_row", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_delete_row" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_delete_row" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + { + error_status=0; + cbf_handle_struct_delete_row(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_column_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_column_name" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + result = (char *)cbf_handle_struct_column_name(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_remove_saveframe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_remove_saveframe" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_remove_saveframe(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_integerarray_wdims_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + char *arg9 = (char *) 0 ; + int arg10 ; + int arg11 ; + int arg12 ; + int arg13 ; + int arg14 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int res9 ; + char *buf9 = 0 ; + size_t size9 = 0 ; + int alloc9 = 0 ; + int val11 ; + int ecode11 = 0 ; + int val12 ; + int ecode12 = 0 ; + int val13 ; + int ecode13 = 0 ; + int val14 ; + int ecode14 = 0 ; + PyObject *swig_obj[12] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_integerarray_wdims_sf", 12, 12, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + res9 = SWIG_AsCharPtrAndSize(swig_obj[7], &buf9, &size9, &alloc9); + if (!SWIG_IsOK(res9)) { + SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "9"" of type '" "char *""'"); + } + arg9 = (char *)(buf9); + arg10 = (int)(size9 - 1); + ecode11 = SWIG_AsVal_int(swig_obj[8], &val11); + if (!SWIG_IsOK(ecode11)) { + SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "11"" of type '" "int""'"); + } + arg11 = (int)(val11); + ecode12 = SWIG_AsVal_int(swig_obj[9], &val12); + if (!SWIG_IsOK(ecode12)) { + SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "12"" of type '" "int""'"); + } + arg12 = (int)(val12); + ecode13 = SWIG_AsVal_int(swig_obj[10], &val13); + if (!SWIG_IsOK(ecode13)) { + SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "13"" of type '" "int""'"); + } + arg13 = (int)(val13); + ecode14 = SWIG_AsVal_int(swig_obj[11], &val14); + if (!SWIG_IsOK(ecode14)) { + SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "14"" of type '" "int""'"); + } + arg14 = (int)(val14); + { + error_status=0; + cbf_handle_struct_set_integerarray_wdims_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc9 == SWIG_NEWOBJ) free((char*)buf9); + return resultobj; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc9 == SWIG_NEWOBJ) free((char*)buf9); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_require_value", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_value" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_value" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + result = (char *)cbf_handle_struct_require_value(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_column_integervalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + int *arg3 = (int *) 0 ; + int arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int val4 ; + int ecode4 = 0 ; + PyObject *swig_obj[3] ; + + arg3 = &temp3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_require_column_integervalue", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_column_integervalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_column_integervalue" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + ecode4 = SWIG_AsVal_int(swig_obj[2], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_require_column_integervalue" "', argument " "4"" of type '" "int""'"); + } + arg4 = (int)(val4); + { + error_status=0; + cbf_handle_struct_require_column_integervalue(arg1,(char const *)arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_pixel_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + double arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject *swig_obj[4] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_pixel_size", 4, 4, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_pixel_size" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_pixel_size" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_pixel_size" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_pixel_size" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); + { + error_status=0; + cbf_handle_struct_set_pixel_size(arg1,arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_next_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_next_column" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_next_column(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_size_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; + int *arg5 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + int temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; + + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_3d_image_size_sf", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_3d_image_size_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_3d_image_size_sf" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + { + error_status=0; + cbf_handle_struct_get_3d_image_size_sf(arg1,arg2,arg3,arg4,arg5); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_realarrayparameters_wdims_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int *arg2 = (int *) 0 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; + int *arg5 = (int *) 0 ; + char **arg6 = (char **) 0 ; + int *arg7 = (int *) 0 ; + int *arg8 = (int *) 0 ; + int *arg9 = (int *) 0 ; + int *arg10 = (int *) 0 ; + int *arg11 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int temp2 ; + int res2 = SWIG_TMPOBJ ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + int temp5 ; + int res5 = SWIG_TMPOBJ ; + char *temp6 = 0 ; + int tempn6 ; + int temp8 ; + int res8 = SWIG_TMPOBJ ; + int temp9 ; + int res9 = SWIG_TMPOBJ ; + int temp10 ; + int res10 = SWIG_TMPOBJ ; + int temp11 ; + int res11 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; arg7 = &tempn6; + arg8 = &temp8; + arg9 = &temp9; + arg10 = &temp10; + arg11 = &temp11; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_realarrayparameters_wdims_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_get_realarrayparameters_wdims_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); + } + if (*arg6) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg6,*arg7)); + free(*arg6); + } + if (SWIG_IsTmpObj(res8)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8))); + } else { + int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res9)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9))); + } else { + int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res10)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg10))); + } else { + int new_flags = SWIG_IsNewObj(res10) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg10), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res11)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg11))); + } else { + int new_flags = SWIG_IsNewObj(res11) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg11), SWIGTYPE_p_int, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_realarray_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char **arg2 = (char **) 0 ; + int *arg3 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *temp2 = 0 ; + int tempn2 ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; arg3 = &tempn2; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_realarray_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_get_realarray_as_string(arg1,arg2,arg3); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (*arg2) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg2,*arg3)); + free(*arg2); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_bin_sizes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int arg2 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; + + arg3 = &temp3; + arg4 = &temp4; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_bin_sizes", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_bin_sizes" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_bin_sizes" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + { + error_status=0; + cbf_handle_struct_get_bin_sizes(arg1,arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_reset_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_reset_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_reset_category(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_count_axis_ancestors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + int *arg3 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; + + arg3 = &temp3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_count_axis_ancestors", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_count_axis_ancestors" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_count_axis_ancestors" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_count_axis_ancestors(arg1,(char const *)arg2,arg3); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_construct_goniometer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cbf_goniometer result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_construct_goniometer" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + result = (cbf_goniometer)cbf_handle_struct_construct_goniometer(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_datablockname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_datablockname", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_datablockname" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_datablockname" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_set_datablockname(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_element_number(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_element_number" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_get_element_number(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_crystal_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_crystal_id", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_crystal_id" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_crystal_id" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_set_crystal_id(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarray_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char **arg2 = (char **) 0 ; + int *arg3 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *temp2 = 0 ; + int tempn2 ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; arg3 = &tempn2; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_integerarray_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_get_integerarray_as_string(arg1,arg2,arg3); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (*arg2) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg2,*arg3)); + free(*arg2); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_3d_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + int arg9 ; + int arg10 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int val9 ; + int ecode9 = 0 ; + int val10 ; + int ecode10 = 0 ; + PyObject *swig_obj[9] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_3d_image", 9, 9, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + ecode9 = SWIG_AsVal_int(swig_obj[7], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "9"" of type '" "int""'"); + } + arg9 = (int)(val9); + ecode10 = SWIG_AsVal_int(swig_obj[8], &val10); + if (!SWIG_IsOK(ecode10)) { + SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "10"" of type '" "int""'"); + } + arg10 = (int)(val10); + { + error_status=0; + cbf_handle_struct_set_3d_image(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return resultobj; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_dictionary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + cbf_handle arg2 = (cbf_handle) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_dictionary", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_dictionary" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_dictionary" "', argument " "2"" of type '" "cbf_handle""'"); + } + arg2 = (cbf_handle)(argp2); + { + error_status=0; + cbf_handle_struct_set_dictionary(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_tag_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_find_tag_category", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_find_tag_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_find_tag_category" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + result = (char *)cbf_handle_struct_find_tag_category(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_real_3d_image_sf_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int arg2 ; + char **arg3 = (char **) 0 ; + int *arg4 = (int *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + char *temp3 = 0 ; + int tempn3 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + PyObject *swig_obj[6] ; + + arg3 = &temp3; arg4 = &tempn3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_real_3d_image_sf_as_string", 6, 6, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_real_3d_image_sf_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_real_3d_image_sf_as_string" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode5 = SWIG_AsVal_int(swig_obj[2], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_real_3d_image_sf_as_string" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[3], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_real_3d_image_sf_as_string" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[4], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_real_3d_image_sf_as_string" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[5], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_real_3d_image_sf_as_string" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + { + error_status=0; + cbf_handle_struct_get_real_3d_image_sf_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (*arg3) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); + free(*arg3); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_typeofvalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_typeofvalue", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_typeofvalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_typeofvalue" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_set_typeofvalue(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_rotation_axis(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_axis_rotation_axis", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_rotation_axis" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_rotation_axis" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + result = (char *)cbf_handle_struct_get_axis_rotation_axis(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_integerarray_wdims(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + char *arg9 = (char *) 0 ; + int arg10 ; + int arg11 ; + int arg12 ; + int arg13 ; + int arg14 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int res9 ; + char *buf9 = 0 ; + size_t size9 = 0 ; + int alloc9 = 0 ; + int val11 ; + int ecode11 = 0 ; + int val12 ; + int ecode12 = 0 ; + int val13 ; + int ecode13 = 0 ; + int val14 ; + int ecode14 = 0 ; + PyObject *swig_obj[12] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_integerarray_wdims", 12, 12, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + res9 = SWIG_AsCharPtrAndSize(swig_obj[7], &buf9, &size9, &alloc9); + if (!SWIG_IsOK(res9)) { + SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "9"" of type '" "char *""'"); + } + arg9 = (char *)(buf9); + arg10 = (int)(size9 - 1); + ecode11 = SWIG_AsVal_int(swig_obj[8], &val11); + if (!SWIG_IsOK(ecode11)) { + SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "11"" of type '" "int""'"); + } + arg11 = (int)(val11); + ecode12 = SWIG_AsVal_int(swig_obj[9], &val12); + if (!SWIG_IsOK(ecode12)) { + SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "12"" of type '" "int""'"); + } + arg12 = (int)(val12); + ecode13 = SWIG_AsVal_int(swig_obj[10], &val13); + if (!SWIG_IsOK(ecode13)) { + SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "13"" of type '" "int""'"); + } + arg13 = (int)(val13); + ecode14 = SWIG_AsVal_int(swig_obj[11], &val14); + if (!SWIG_IsOK(ecode14)) { + SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "14"" of type '" "int""'"); + } + arg14 = (int)(val14); + { + error_status=0; + cbf_handle_struct_set_integerarray_wdims(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc9 == SWIG_NEWOBJ) free((char*)buf9); + return resultobj; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc9 == SWIG_NEWOBJ) free((char*)buf9); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_integration_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_integration_time", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_integration_time" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_integration_time" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + { + error_status=0; + cbf_handle_struct_set_integration_time(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_axis_setting(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + double arg3 ; + double arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject *swig_obj[4] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_axis_setting", 4, 4, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_axis_setting" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_axis_setting" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_axis_setting" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_axis_setting" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); + { + error_status=0; + cbf_handle_struct_set_axis_setting(arg1,(char const *)arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_real_image_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int arg2 ; + char **arg3 = (char **) 0 ; + int *arg4 = (int *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + char *temp3 = 0 ; + int tempn3 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + PyObject *swig_obj[5] ; + + arg3 = &temp3; arg4 = &tempn3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_real_image_as_string", 5, 5, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_real_image_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_real_image_as_string" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode5 = SWIG_AsVal_int(swig_obj[2], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_real_image_as_string" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[3], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_real_image_as_string" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[4], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_real_image_as_string" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + { + error_status=0; + cbf_handle_struct_get_real_image_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (*arg3) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); + free(*arg3); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_ancestor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + char *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_axis_ancestor", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_ancestor" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_ancestor" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_get_axis_ancestor" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + { + error_status=0; + result = (char *)cbf_handle_struct_get_axis_ancestor(arg1,(char const *)arg2,arg3); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_sf_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int arg2 ; + char **arg3 = (char **) 0 ; + int *arg4 = (int *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + int arg9 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + char *temp3 = 0 ; + int tempn3 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int val9 ; + int ecode9 = 0 ; + PyObject *swig_obj[7] ; + + arg3 = &temp3; arg4 = &tempn3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_3d_image_sf_as_string", 7, 7, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_3d_image_sf_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_3d_image_sf_as_string" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode5 = SWIG_AsVal_int(swig_obj[2], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_3d_image_sf_as_string" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[3], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_3d_image_sf_as_string" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[4], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_3d_image_sf_as_string" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[5], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_3d_image_sf_as_string" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + ecode9 = SWIG_AsVal_int(swig_obj[6], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_get_3d_image_sf_as_string" "', argument " "9"" of type '" "int""'"); + } + arg9 = (int)(val9); + { + error_status=0; + cbf_handle_struct_get_3d_image_sf_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (*arg3) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); + free(*arg3); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_real_image_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + PyObject *swig_obj[7] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_real_image_fs", 7, 7, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_real_image_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_real_image_fs" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_real_image_fs" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_real_image_fs" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_real_image_fs" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_real_image_fs" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_real_image_fs" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + { + error_status=0; + cbf_handle_struct_set_real_image_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return resultobj; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_overload(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + double *arg3 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; + + arg3 = &temp3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_overload", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_overload" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_overload" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + { + error_status=0; + cbf_handle_struct_get_overload(arg1,arg2,arg3); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_wavelength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_wavelength" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + result = (double)cbf_handle_struct_get_wavelength(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_From_double((double)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_next_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_next_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_next_datablock(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_realarrayparameters_wdims(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int *arg2 = (int *) 0 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; + int *arg5 = (int *) 0 ; + char **arg6 = (char **) 0 ; + int *arg7 = (int *) 0 ; + int *arg8 = (int *) 0 ; + int *arg9 = (int *) 0 ; + int *arg10 = (int *) 0 ; + int *arg11 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int temp2 ; + int res2 = SWIG_TMPOBJ ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + int temp5 ; + int res5 = SWIG_TMPOBJ ; + char *temp6 = 0 ; + int tempn6 ; + int temp8 ; + int res8 = SWIG_TMPOBJ ; + int temp9 ; + int res9 = SWIG_TMPOBJ ; + int temp10 ; + int res10 = SWIG_TMPOBJ ; + int temp11 ; + int res11 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; arg7 = &tempn6; + arg8 = &temp8; + arg9 = &temp9; + arg10 = &temp10; + arg11 = &temp11; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_realarrayparameters_wdims" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_get_realarrayparameters_wdims(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); + } + if (*arg6) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg6,*arg7)); + free(*arg6); + } + if (SWIG_IsTmpObj(res8)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8))); + } else { + int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res9)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9))); + } else { + int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res10)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg10))); + } else { + int new_flags = SWIG_IsNewObj(res10) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg10), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res11)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg11))); + } else { + int new_flags = SWIG_IsNewObj(res11) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg11), SWIGTYPE_p_int, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_orientation_matrix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double arg2 ; + double arg3 ; + double arg4 ; + double arg5 ; + double arg6 ; + double arg7 ; + double arg8 ; + double arg9 ; + double arg10 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double val6 ; + int ecode6 = 0 ; + double val7 ; + int ecode7 = 0 ; + double val8 ; + int ecode8 = 0 ; + double val9 ; + int ecode9 = 0 ; + double val10 ; + int ecode10 = 0 ; + PyObject *swig_obj[10] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_orientation_matrix", 10, 10, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); + ecode5 = SWIG_AsVal_double(swig_obj[4], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "5"" of type '" "double""'"); + } + arg5 = (double)(val5); + ecode6 = SWIG_AsVal_double(swig_obj[5], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "6"" of type '" "double""'"); + } + arg6 = (double)(val6); + ecode7 = SWIG_AsVal_double(swig_obj[6], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "7"" of type '" "double""'"); + } + arg7 = (double)(val7); + ecode8 = SWIG_AsVal_double(swig_obj[7], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "8"" of type '" "double""'"); + } + arg8 = (double)(val8); + ecode9 = SWIG_AsVal_double(swig_obj[8], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "9"" of type '" "double""'"); + } + arg9 = (double)(val9); + ecode10 = SWIG_AsVal_double(swig_obj[9], &val10); + if (!SWIG_IsOK(ecode10)) { + SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "10"" of type '" "double""'"); + } + arg10 = (double)(val10); + { + error_status=0; + cbf_handle_struct_set_orientation_matrix(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_new_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_new_category", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_new_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_new_category" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_new_category(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_gain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + double arg3 ; + double arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject *swig_obj[4] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_gain", 4, 4, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_gain" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_gain" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_gain" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_gain" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); + { + error_status=0; + cbf_handle_struct_set_gain(arg1,arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_find_column", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_find_column" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_find_column" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_find_column(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_remove_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_remove_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_remove_category(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarrayparameters_wdims_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int *arg2 = (int *) 0 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; + int *arg5 = (int *) 0 ; + int *arg6 = (int *) 0 ; + int *arg7 = (int *) 0 ; + int *arg8 = (int *) 0 ; + int *arg9 = (int *) 0 ; + char **arg10 = (char **) 0 ; + int *arg11 = (int *) 0 ; + int *arg12 = (int *) 0 ; + int *arg13 = (int *) 0 ; + int *arg14 = (int *) 0 ; + int *arg15 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int temp2 ; + int res2 = SWIG_TMPOBJ ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + int temp5 ; + int res5 = SWIG_TMPOBJ ; + int temp6 ; + int res6 = SWIG_TMPOBJ ; + int temp7 ; + int res7 = SWIG_TMPOBJ ; + int temp8 ; + int res8 = SWIG_TMPOBJ ; + int temp9 ; + int res9 = SWIG_TMPOBJ ; + char *temp10 = 0 ; + int tempn10 ; + int temp12 ; + int res12 = SWIG_TMPOBJ ; + int temp13 ; + int res13 = SWIG_TMPOBJ ; + int temp14 ; + int res14 = SWIG_TMPOBJ ; + int temp15 ; + int res15 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + arg8 = &temp8; + arg9 = &temp9; + arg10 = &temp10; arg11 = &tempn10; + arg12 = &temp12; + arg13 = &temp13; + arg14 = &temp14; + arg15 = &temp15; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_integerarrayparameters_wdims_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_get_integerarrayparameters_wdims_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res8)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8))); + } else { + int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res9)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9))); + } else { + int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags)); + } + if (*arg10) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg10,*arg11)); + free(*arg10); + } + if (SWIG_IsTmpObj(res12)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg12))); + } else { + int new_flags = SWIG_IsNewObj(res12) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg12), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res13)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg13))); + } else { + int new_flags = SWIG_IsNewObj(res13) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg13), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res14)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg14))); + } else { + int new_flags = SWIG_IsNewObj(res14) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg14), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res15)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg15))); + } else { + int new_flags = SWIG_IsNewObj(res15) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg15), SWIGTYPE_p_int, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_pixel_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + double *arg4 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[3] ; + + arg4 = &temp4; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_pixel_size", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_pixel_size" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_pixel_size" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_get_pixel_size" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + { + error_status=0; + cbf_handle_struct_get_pixel_size(arg1,arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_real_image_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + PyObject *swig_obj[7] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_real_image_sf", 7, 7, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_real_image_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_real_image_sf" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_real_image_sf" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_real_image_sf" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_real_image_sf" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_real_image_sf" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_real_image_sf" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + { + error_status=0; + cbf_handle_struct_set_real_image_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return resultobj; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_require_category", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_category" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_require_category(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_reciprocal_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + double *arg7 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_reciprocal_cell" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_get_reciprocal_cell(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_reciprocal_cell_esd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + double *arg7 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_reciprocal_cell_esd" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_get_reciprocal_cell_esd(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; + int *arg5 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + int temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; + + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_3d_image_size", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_3d_image_size" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_3d_image_size" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + { + error_status=0; + cbf_handle_struct_get_3d_image_size(arg1,arg2,arg3,arg4,arg5); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_tag_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_find_tag_root", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_find_tag_root" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_find_tag_root" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + result = (char *)cbf_handle_struct_find_tag_root(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_category_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_require_category_root", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_category_root" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_category_root" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + result = (char *)cbf_handle_struct_require_category_root(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_realarray_wdims_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + char *arg8 = (char *) 0 ; + int arg9 ; + int arg10 ; + int arg11 ; + int arg12 ; + int arg13 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int res8 ; + char *buf8 = 0 ; + size_t size8 = 0 ; + int alloc8 = 0 ; + int val10 ; + int ecode10 = 0 ; + int val11 ; + int ecode11 = 0 ; + int val12 ; + int ecode12 = 0 ; + int val13 ; + int ecode13 = 0 ; + PyObject *swig_obj[11] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_realarray_wdims_sf", 11, 11, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + res8 = SWIG_AsCharPtrAndSize(swig_obj[6], &buf8, &size8, &alloc8); + if (!SWIG_IsOK(res8)) { + SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "8"" of type '" "char *""'"); + } + arg8 = (char *)(buf8); + arg9 = (int)(size8 - 1); + ecode10 = SWIG_AsVal_int(swig_obj[7], &val10); + if (!SWIG_IsOK(ecode10)) { + SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "10"" of type '" "int""'"); + } + arg10 = (int)(val10); + ecode11 = SWIG_AsVal_int(swig_obj[8], &val11); + if (!SWIG_IsOK(ecode11)) { + SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "11"" of type '" "int""'"); + } + arg11 = (int)(val11); + ecode12 = SWIG_AsVal_int(swig_obj[9], &val12); + if (!SWIG_IsOK(ecode12)) { + SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "12"" of type '" "int""'"); + } + arg12 = (int)(val12); + ecode13 = SWIG_AsVal_int(swig_obj[10], &val13); + if (!SWIG_IsOK(ecode13)) { + SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "13"" of type '" "int""'"); + } + arg13 = (int)(val13); + { + error_status=0; + cbf_handle_struct_set_realarray_wdims_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc8 == SWIG_NEWOBJ) free((char*)buf8); + return resultobj; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc8 == SWIG_NEWOBJ) free((char*)buf8); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_integervalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_integervalue", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_integervalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_integervalue" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + { + error_status=0; + cbf_handle_struct_set_integervalue(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_category_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_category_name" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + result = (char *)cbf_handle_struct_category_name(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_typeofvalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_typeofvalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + result = (char *)cbf_handle_struct_get_typeofvalue(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_real_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + PyObject *swig_obj[7] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_real_image", 7, 7, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_real_image" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_real_image" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_real_image" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_real_image" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_real_image" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_real_image" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_real_image" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + { + error_status=0; + cbf_handle_struct_set_real_image(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return resultobj; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int arg2 ; + char **arg3 = (char **) 0 ; + int *arg4 = (int *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + int arg9 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + char *temp3 = 0 ; + int tempn3 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int val9 ; + int ecode9 = 0 ; + PyObject *swig_obj[7] ; + + arg3 = &temp3; arg4 = &tempn3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_3d_image_as_string", 7, 7, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_3d_image_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_3d_image_as_string" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode5 = SWIG_AsVal_int(swig_obj[2], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_3d_image_as_string" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[3], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_3d_image_as_string" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[4], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_3d_image_as_string" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[5], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_3d_image_as_string" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + ecode9 = SWIG_AsVal_int(swig_obj[6], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_get_3d_image_as_string" "', argument " "9"" of type '" "int""'"); + } + arg9 = (int)(val9); + { + error_status=0; + cbf_handle_struct_get_3d_image_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (*arg3) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); + free(*arg3); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_reference_poise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + double *arg7 = (double *) 0 ; + char *arg8 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + int res8 ; + char *buf8 = 0 ; + int alloc8 = 0 ; + PyObject *swig_obj[2] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_axis_reference_poise", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_reference_poise" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res8 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf8, NULL, &alloc8); + if (!SWIG_IsOK(res8)) { + SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "cbf_handle_struct_get_axis_reference_poise" "', argument " "8"" of type '" "char const *""'"); + } + arg8 = (char *)(buf8); + { + error_status=0; + cbf_handle_struct_get_axis_reference_poise(arg1,arg2,arg3,arg4,arg5,arg6,arg7,(char const *)arg8); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } + if (alloc8 == SWIG_NEWOBJ) free((char*)buf8); + return resultobj; +fail: + if (alloc8 == SWIG_NEWOBJ) free((char*)buf8); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_remove_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_remove_row" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_remove_row(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_overload(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + double arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_overload", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_overload" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_overload" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_overload" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + { + error_status=0; + cbf_handle_struct_set_overload(arg1,arg2,arg3); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_image_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; + + arg3 = &temp3; + arg4 = &temp4; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_image_size", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_image_size" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_image_size" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + { + error_status=0; + cbf_handle_struct_get_image_size(arg1,arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_3d_image_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + int arg9 ; + int arg10 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int val9 ; + int ecode9 = 0 ; + int val10 ; + int ecode10 = 0 ; + PyObject *swig_obj[9] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_3d_image_sf", 9, 9, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + ecode9 = SWIG_AsVal_int(swig_obj[7], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "9"" of type '" "int""'"); + } + arg9 = (int)(val9); + ecode10 = SWIG_AsVal_int(swig_obj[8], &val10); + if (!SWIG_IsOK(ecode10)) { + SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "10"" of type '" "int""'"); + } + arg10 = (int)(val10); + { + error_status=0; + cbf_handle_struct_set_3d_image_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return resultobj; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_real_image_sf_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int arg2 ; + char **arg3 = (char **) 0 ; + int *arg4 = (int *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + char *temp3 = 0 ; + int tempn3 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + PyObject *swig_obj[5] ; + + arg3 = &temp3; arg4 = &tempn3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_real_image_sf_as_string", 5, 5, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_real_image_sf_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_real_image_sf_as_string" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode5 = SWIG_AsVal_int(swig_obj[2], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_real_image_sf_as_string" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[3], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_real_image_sf_as_string" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[4], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_real_image_sf_as_string" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + { + error_status=0; + cbf_handle_struct_get_real_image_sf_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (*arg3) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); + free(*arg3); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_image_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int arg2 ; + char **arg3 = (char **) 0 ; + int *arg4 = (int *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + char *temp3 = 0 ; + int tempn3 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + PyObject *swig_obj[6] ; + + arg3 = &temp3; arg4 = &tempn3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_image_as_string", 6, 6, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_image_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_image_as_string" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode5 = SWIG_AsVal_int(swig_obj[2], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_image_as_string" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[3], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_image_as_string" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[4], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_image_as_string" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[5], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_image_as_string" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + { + error_status=0; + cbf_handle_struct_get_image_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (*arg3) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); + free(*arg3); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_tag_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_tag_root", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_tag_root" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_tag_root" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "cbf_handle_struct_set_tag_root" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = (char *)(buf3); + { + error_status=0; + cbf_handle_struct_set_tag_root(arg1,(char const *)arg2,(char const *)arg3); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_write_widefile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + int arg4 ; + int arg5 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + PyObject *swig_obj[5] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_write_widefile", 5, 5, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_write_widefile" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_write_widefile" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_write_widefile" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_write_widefile" "', argument " "4"" of type '" "int""'"); + } + arg4 = (int)(val4); + ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_write_widefile" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + { + error_status=0; + cbf_handle_struct_write_widefile(arg1,(char const *)arg2,arg3,arg4,arg5); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_count_rows(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + unsigned int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_count_rows" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + result = (unsigned int)cbf_handle_struct_count_rows(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_require_datablock", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_datablock" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_require_datablock(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_integerarray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + PyObject *swig_obj[7] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_integerarray", 7, 7, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_integerarray" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_integerarray" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_integerarray" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_integerarray" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_integerarray" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_integerarray" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_integerarray" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + { + error_status=0; + cbf_handle_struct_set_integerarray(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return resultobj; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_new_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_new_datablock", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_new_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_new_datablock" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_new_datablock(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_datestamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + int arg5 ; + int arg6 ; + double arg7 ; + int arg8 ; + double arg9 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + double val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + double val9 ; + int ecode9 = 0 ; + PyObject *swig_obj[9] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_datestamp", 9, 9, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "4"" of type '" "int""'"); + } + arg4 = (int)(val4); + ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[5], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_double(swig_obj[6], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "7"" of type '" "double""'"); + } + arg7 = (double)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[7], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + ecode9 = SWIG_AsVal_double(swig_obj[8], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "9"" of type '" "double""'"); + } + arg9 = (double)(val9); + { + error_status=0; + cbf_handle_struct_set_datestamp(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_next_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_next_row" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_next_row(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_category_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_category_root", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_category_root" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_category_root" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "cbf_handle_struct_set_category_root" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = (char *)(buf3); + { + error_status=0; + cbf_handle_struct_set_category_root(arg1,(char const *)arg2,(char const *)arg3); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; + + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_axis_offset", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_offset" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_offset" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_get_axis_offset(arg1,(char const *)arg2,arg3,arg4,arg5); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_pixel_size_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + double arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject *swig_obj[4] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_pixel_size_fs", 4, 4, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_pixel_size_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_pixel_size_fs" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_pixel_size_fs" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_pixel_size_fs" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); + { + error_status=0; + cbf_handle_struct_set_pixel_size_fs(arg1,arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_insert_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_insert_row", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_insert_row" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_insert_row" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + { + error_status=0; + cbf_handle_struct_insert_row(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_new_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_new_column", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_new_column" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_new_column" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_new_column(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_real_3d_image_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int arg2 ; + char **arg3 = (char **) 0 ; + int *arg4 = (int *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + char *temp3 = 0 ; + int tempn3 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + PyObject *swig_obj[6] ; + + arg3 = &temp3; arg4 = &tempn3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_real_3d_image_as_string", 6, 6, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_real_3d_image_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_real_3d_image_as_string" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode5 = SWIG_AsVal_int(swig_obj[2], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_real_3d_image_as_string" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[3], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_real_3d_image_as_string" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[4], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_real_3d_image_as_string" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[5], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_real_3d_image_as_string" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + { + error_status=0; + cbf_handle_struct_get_real_3d_image_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (*arg3) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); + free(*arg3); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integration_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double *arg2 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_integration_time" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_get_integration_time(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_realarray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + PyObject *swig_obj[6] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_realarray", 6, 6, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_realarray" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_realarray" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_realarray" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_realarray" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_realarray" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_realarray" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + { + error_status=0; + cbf_handle_struct_set_realarray(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return resultobj; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_element_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_element_id", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_element_id" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_element_id" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + { + error_status=0; + result = (char *)cbf_handle_struct_get_element_id(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_image_sf_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int arg2 ; + char **arg3 = (char **) 0 ; + int *arg4 = (int *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + char *temp3 = 0 ; + int tempn3 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + PyObject *swig_obj[6] ; + + arg3 = &temp3; arg4 = &tempn3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_image_sf_as_string", 6, 6, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_image_sf_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_image_sf_as_string" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode5 = SWIG_AsVal_int(swig_obj[2], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_image_sf_as_string" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[3], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_image_sf_as_string" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[4], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_image_sf_as_string" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[5], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_image_sf_as_string" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + { + error_status=0; + cbf_handle_struct_get_image_sf_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (*arg3) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); + free(*arg3); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_construct_positioner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + cbf_positioner result; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_construct_positioner", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_construct_positioner" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_construct_positioner" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + result = (cbf_positioner)cbf_handle_struct_construct_positioner(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_size_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; + int *arg5 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + int temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; + + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_3d_image_size_fs", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_3d_image_size_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_3d_image_size_fs" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + { + error_status=0; + cbf_handle_struct_get_3d_image_size_fs(arg1,arg2,arg3,arg4,arg5); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_value", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_value" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_value" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_set_value(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_current_timestamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_current_timestamp", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_current_timestamp" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_current_timestamp" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + { + error_status=0; + cbf_handle_struct_set_current_timestamp(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_doublevalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double *arg2 = (double *) 0 ; + double arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[2] ; + + arg2 = &temp2; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_require_doublevalue", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_doublevalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode3 = SWIG_AsVal_double(swig_obj[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_require_doublevalue" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + { + error_status=0; + cbf_handle_struct_require_doublevalue(arg1,arg2,arg3); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_rewind_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_rewind_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_rewind_datablock(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_column_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + PyObject *swig_obj[3] ; + char *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_require_column_value", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_column_value" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_column_value" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "cbf_handle_struct_require_column_value" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = (char *)(buf3); + { + error_status=0; + result = (char *)cbf_handle_struct_require_column_value(arg1,(char const *)arg2,(char const *)arg3); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_dictionary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cbf_handle result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_dictionary" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + result = (cbf_handle)cbf_handle_struct_get_dictionary(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_reset_saveframe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_reset_saveframe" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_reset_saveframe(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_reciprocal_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double *arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2[6] ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_reciprocal_cell", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_reciprocal_cell" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + if (swig_obj[1] == Py_None) arg2 = NULL; + else + if (!convert_darray(swig_obj[1],temp2,6)) { + return NULL; + } + arg2 = &temp2[0]; + } + { + error_status=0; + cbf_handle_struct_set_reciprocal_cell(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_reciprocal_cell_esd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double *arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2[6] ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_reciprocal_cell_esd", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_reciprocal_cell_esd" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + if (swig_obj[1] == Py_None) arg2 = NULL; + else + if (!convert_darray(swig_obj[1],temp2,6)) { + return NULL; + } + arg2 = &temp2[0]; + } + { + error_status=0; + cbf_handle_struct_set_reciprocal_cell_esd(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_real_3d_image_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + int arg9 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int val9 ; + int ecode9 = 0 ; + PyObject *swig_obj[8] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_real_3d_image_fs", 8, 8, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_real_3d_image_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_real_3d_image_fs" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_real_3d_image_fs" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_real_3d_image_fs" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_real_3d_image_fs" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_real_3d_image_fs" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_real_3d_image_fs" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + ecode9 = SWIG_AsVal_int(swig_obj[7], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_real_3d_image_fs" "', argument " "9"" of type '" "int""'"); + } + arg9 = (int)(val9); + { + error_status=0; + cbf_handle_struct_set_real_3d_image_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return resultobj; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_doublevalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + double arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_doublevalue", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_doublevalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_doublevalue" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_doublevalue" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + { + error_status=0; + cbf_handle_struct_set_doublevalue(arg1,(char const *)arg2,arg3); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_find_category", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_find_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_find_category" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_find_category(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarrayparameters_wdims_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int *arg2 = (int *) 0 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; + int *arg5 = (int *) 0 ; + int *arg6 = (int *) 0 ; + int *arg7 = (int *) 0 ; + int *arg8 = (int *) 0 ; + int *arg9 = (int *) 0 ; + char **arg10 = (char **) 0 ; + int *arg11 = (int *) 0 ; + int *arg12 = (int *) 0 ; + int *arg13 = (int *) 0 ; + int *arg14 = (int *) 0 ; + int *arg15 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int temp2 ; + int res2 = SWIG_TMPOBJ ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + int temp5 ; + int res5 = SWIG_TMPOBJ ; + int temp6 ; + int res6 = SWIG_TMPOBJ ; + int temp7 ; + int res7 = SWIG_TMPOBJ ; + int temp8 ; + int res8 = SWIG_TMPOBJ ; + int temp9 ; + int res9 = SWIG_TMPOBJ ; + char *temp10 = 0 ; + int tempn10 ; + int temp12 ; + int res12 = SWIG_TMPOBJ ; + int temp13 ; + int res13 = SWIG_TMPOBJ ; + int temp14 ; + int res14 = SWIG_TMPOBJ ; + int temp15 ; + int res15 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + arg8 = &temp8; + arg9 = &temp9; + arg10 = &temp10; arg11 = &tempn10; + arg12 = &temp12; + arg13 = &temp13; + arg14 = &temp14; + arg15 = &temp15; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_integerarrayparameters_wdims_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_get_integerarrayparameters_wdims_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res8)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8))); + } else { + int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res9)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9))); + } else { + int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags)); + } + if (*arg10) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg10,*arg11)); + free(*arg10); + } + if (SWIG_IsTmpObj(res12)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg12))); + } else { + int new_flags = SWIG_IsNewObj(res12) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg12), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res13)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg13))); + } else { + int new_flags = SWIG_IsNewObj(res13) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg13), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res14)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg14))); + } else { + int new_flags = SWIG_IsNewObj(res14) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg14), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res15)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg15))); + } else { + int new_flags = SWIG_IsNewObj(res15) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg15), SWIGTYPE_p_int, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_realarray_wdims_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + char *arg8 = (char *) 0 ; + int arg9 ; + int arg10 ; + int arg11 ; + int arg12 ; + int arg13 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int res8 ; + char *buf8 = 0 ; + size_t size8 = 0 ; + int alloc8 = 0 ; + int val10 ; + int ecode10 = 0 ; + int val11 ; + int ecode11 = 0 ; + int val12 ; + int ecode12 = 0 ; + int val13 ; + int ecode13 = 0 ; + PyObject *swig_obj[11] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_realarray_wdims_fs", 11, 11, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + res8 = SWIG_AsCharPtrAndSize(swig_obj[6], &buf8, &size8, &alloc8); + if (!SWIG_IsOK(res8)) { + SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "8"" of type '" "char *""'"); + } + arg8 = (char *)(buf8); + arg9 = (int)(size8 - 1); + ecode10 = SWIG_AsVal_int(swig_obj[7], &val10); + if (!SWIG_IsOK(ecode10)) { + SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "10"" of type '" "int""'"); + } + arg10 = (int)(val10); + ecode11 = SWIG_AsVal_int(swig_obj[8], &val11); + if (!SWIG_IsOK(ecode11)) { + SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "11"" of type '" "int""'"); + } + arg11 = (int)(val11); + ecode12 = SWIG_AsVal_int(swig_obj[9], &val12); + if (!SWIG_IsOK(ecode12)) { + SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "12"" of type '" "int""'"); + } + arg12 = (int)(val12); + ecode13 = SWIG_AsVal_int(swig_obj[10], &val13); + if (!SWIG_IsOK(ecode13)) { + SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "13"" of type '" "int""'"); + } + arg13 = (int)(val13); + { + error_status=0; + cbf_handle_struct_set_realarray_wdims_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc8 == SWIG_NEWOBJ) free((char*)buf8); + return resultobj; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc8 == SWIG_NEWOBJ) free((char*)buf8); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_category_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_find_category_root", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_find_category_root" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_find_category_root" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + result = (char *)cbf_handle_struct_find_category_root(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_integerarray_wdims_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + char *arg9 = (char *) 0 ; + int arg10 ; + int arg11 ; + int arg12 ; + int arg13 ; + int arg14 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int res9 ; + char *buf9 = 0 ; + size_t size9 = 0 ; + int alloc9 = 0 ; + int val11 ; + int ecode11 = 0 ; + int val12 ; + int ecode12 = 0 ; + int val13 ; + int ecode13 = 0 ; + int val14 ; + int ecode14 = 0 ; + PyObject *swig_obj[12] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_integerarray_wdims_fs", 12, 12, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + res9 = SWIG_AsCharPtrAndSize(swig_obj[7], &buf9, &size9, &alloc9); + if (!SWIG_IsOK(res9)) { + SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "9"" of type '" "char *""'"); + } + arg9 = (char *)(buf9); + arg10 = (int)(size9 - 1); + ecode11 = SWIG_AsVal_int(swig_obj[8], &val11); + if (!SWIG_IsOK(ecode11)) { + SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "11"" of type '" "int""'"); + } + arg11 = (int)(val11); + ecode12 = SWIG_AsVal_int(swig_obj[9], &val12); + if (!SWIG_IsOK(ecode12)) { + SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "12"" of type '" "int""'"); + } + arg12 = (int)(val12); + ecode13 = SWIG_AsVal_int(swig_obj[10], &val13); + if (!SWIG_IsOK(ecode13)) { + SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "13"" of type '" "int""'"); + } + arg13 = (int)(val13); + ecode14 = SWIG_AsVal_int(swig_obj[11], &val14); + if (!SWIG_IsOK(ecode14)) { + SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "14"" of type '" "int""'"); + } + arg14 = (int)(val14); + { + error_status=0; + cbf_handle_struct_set_integerarray_wdims_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc9 == SWIG_NEWOBJ) free((char*)buf9); + return resultobj; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc9 == SWIG_NEWOBJ) free((char*)buf9); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_image_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + int arg9 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int val9 ; + int ecode9 = 0 ; + PyObject *swig_obj[8] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_image_sf", 8, 8, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_image_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_image_sf" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_image_sf" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_image_sf" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_image_sf" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_image_sf" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_image_sf" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + ecode9 = SWIG_AsVal_int(swig_obj[7], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_image_sf" "', argument " "9"" of type '" "int""'"); + } + arg9 = (int)(val9); + { + error_status=0; + cbf_handle_struct_set_image_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return resultobj; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_equipment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_axis_equipment", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_equipment" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_equipment" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + result = (char *)cbf_handle_struct_get_axis_equipment(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_unit_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double *arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2[6] ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_unit_cell", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_unit_cell" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + if (swig_obj[1] == Py_None) arg2 = NULL; + else + if (!convert_darray(swig_obj[1],temp2,6)) { + return NULL; + } + arg2 = &temp2[0]; + } + { + error_status=0; + cbf_handle_struct_set_unit_cell(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_unit_cell_esd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double *arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2[6] ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_unit_cell_esd", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_unit_cell_esd" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + if (swig_obj[1] == Py_None) arg2 = NULL; + else + if (!convert_darray(swig_obj[1],temp2,6)) { + return NULL; + } + arg2 = &temp2[0]; + } + { + error_status=0; + cbf_handle_struct_set_unit_cell_esd(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *cbf_handle_struct_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cbf_handle_struct, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *cbf_handle_struct_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +static PyMethodDef SwigMethods[] = { + { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL}, + { "new_doubleArray", _wrap_new_doubleArray, METH_O, NULL}, + { "delete_doubleArray", _wrap_delete_doubleArray, METH_O, NULL}, + { "doubleArray___getitem__", _wrap_doubleArray___getitem__, METH_VARARGS, NULL}, + { "doubleArray___setitem__", _wrap_doubleArray___setitem__, METH_VARARGS, NULL}, + { "doubleArray_cast", _wrap_doubleArray_cast, METH_O, NULL}, + { "doubleArray_frompointer", _wrap_doubleArray_frompointer, METH_O, NULL}, + { "doubleArray_swigregister", doubleArray_swigregister, METH_O, NULL}, + { "doubleArray_swiginit", doubleArray_swiginit, METH_VARARGS, NULL}, + { "new_intArray", _wrap_new_intArray, METH_O, NULL}, + { "delete_intArray", _wrap_delete_intArray, METH_O, NULL}, + { "intArray___getitem__", _wrap_intArray___getitem__, METH_VARARGS, NULL}, + { "intArray___setitem__", _wrap_intArray___setitem__, METH_VARARGS, NULL}, + { "intArray_cast", _wrap_intArray_cast, METH_O, NULL}, + { "intArray_frompointer", _wrap_intArray_frompointer, METH_O, NULL}, + { "intArray_swigregister", intArray_swigregister, METH_O, NULL}, + { "intArray_swiginit", intArray_swiginit, METH_VARARGS, NULL}, + { "new_shortArray", _wrap_new_shortArray, METH_O, NULL}, + { "delete_shortArray", _wrap_delete_shortArray, METH_O, NULL}, + { "shortArray___getitem__", _wrap_shortArray___getitem__, METH_VARARGS, NULL}, + { "shortArray___setitem__", _wrap_shortArray___setitem__, METH_VARARGS, NULL}, + { "shortArray_cast", _wrap_shortArray_cast, METH_O, NULL}, + { "shortArray_frompointer", _wrap_shortArray_frompointer, METH_O, NULL}, + { "shortArray_swigregister", shortArray_swigregister, METH_O, NULL}, + { "shortArray_swiginit", shortArray_swiginit, METH_VARARGS, NULL}, + { "new_longArray", _wrap_new_longArray, METH_O, NULL}, + { "delete_longArray", _wrap_delete_longArray, METH_O, NULL}, + { "longArray___getitem__", _wrap_longArray___getitem__, METH_VARARGS, NULL}, + { "longArray___setitem__", _wrap_longArray___setitem__, METH_VARARGS, NULL}, + { "longArray_cast", _wrap_longArray_cast, METH_O, NULL}, + { "longArray_frompointer", _wrap_longArray_frompointer, METH_O, NULL}, + { "longArray_swigregister", longArray_swigregister, METH_O, NULL}, + { "longArray_swiginit", longArray_swiginit, METH_VARARGS, NULL}, + { "get_local_integer_byte_order", _wrap_get_local_integer_byte_order, METH_NOARGS, "\n" + "\n" + "Returns : char **bo,int *bolen\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_local_integer_byte_order (char ** byte_order);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_local_integer_byte_order returns the byte order of integers \n" + "on the machine on which the API is being run in the form of a \n" + "character string returned as the value pointed to by byte_order. \n" + "cbf_get_local_real_byte_order returns the byte order of reals on the \n" + "machine on which the API is being run in the form of a character \n" + "string returned as the value pointed to by byte_order. \n" + "cbf_get_local_real_format returns the format of floats on the machine \n" + "on which the API is being run in the form of a character string \n" + "returned as the value pointed to by real_format. The strings returned \n" + "must not be modified in any way.\n" + "The values returned in byte_order may be the strings \"little_endian \n" + "\" or \"big-endian \". The values returned in real_format may be the \n" + "strings \"ieee 754-1985 \" or \"other \". Additional values may be \n" + "returned by future versions of the API.\n" + "ARGUMENTS\n" + "byte_order pointer to the returned string real_format pointer to \n" + "the returned string\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "compute_cell_volume", _wrap_compute_cell_volume, METH_O, "\n" + "\n" + "Returns : Float volume\n" + "*args : double cell[6]\n" + "\n" + "C prototype: int cbf_compute_cell_volume ( double cell[6], double *volume );\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_compute_cell_volume sets *volume to point to the volume of the \n" + "unit cell computed from the double values in cell[0:2] for the cell \n" + "edge lengths a, b and c in Ångstroms and the double values given in \n" + "cell[3:5] for the cell angles α, β and γ in degrees.\n" + "ARGUMENTS\n" + "cell Pointer to the array of 6 doubles giving the cell \n" + "parameters. volume Pointer to the doubles for cell volume.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "get_local_real_format", _wrap_get_local_real_format, METH_NOARGS, "\n" + "\n" + "Returns : char **rf,int *rflen\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_local_real_format (char ** real_format );\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_local_integer_byte_order returns the byte order of integers \n" + "on the machine on which the API is being run in the form of a \n" + "character string returned as the value pointed to by byte_order. \n" + "cbf_get_local_real_byte_order returns the byte order of reals on the \n" + "machine on which the API is being run in the form of a character \n" + "string returned as the value pointed to by byte_order. \n" + "cbf_get_local_real_format returns the format of floats on the machine \n" + "on which the API is being run in the form of a character string \n" + "returned as the value pointed to by real_format. The strings returned \n" + "must not be modified in any way.\n" + "The values returned in byte_order may be the strings \"little_endian \n" + "\" or \"big-endian \". The values returned in real_format may be the \n" + "strings \"ieee 754-1985 \" or \"other \". Additional values may be \n" + "returned by future versions of the API.\n" + "ARGUMENTS\n" + "byte_order pointer to the returned string real_format pointer to \n" + "the returned string\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "airy_disk", _wrap_airy_disk, METH_VARARGS, "\n" + "\n" + "Returns : Float value\n" + "*args : double x,double y,double cenx,double ceny,double volume,double fwhm\n" + "\n" + "C prototype: int cbf_airy_disk(double x, double y, double cenx, double ceny,\n" + " double volume, double fwhm, double * value);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_airy_disk sets value to point to the value taken at (x,y) of an \n" + "truncated Airy function approximation to a point-spread function of \n" + "total included volume volume and full width at half max fwhm centered \n" + "on (cenx, ceny).\n" + "cbf_airy_disk_volume sets to point to the integral in the box with \n" + "diagonal corners (xlo, ylo) and of (xhi, yhi) of a truncated Airy \n" + "function approximation to a point-spread function of total included \n" + "volume volume and full width at half max fwhm centered on (cenx, \n" + "ceny).\n" + "The Airy function used is an 8-digit approximation up to the first \n" + "minimum, after which it is forced to zero, so it cannot be used to \n" + "simulate diffraction rings.\n" + "ARGUMENTS\n" + "x the x-coordinate of a point in the real plane y \n" + "the y-coordinate of a point in the real plane xlo the \n" + "x-coordinate of a point in the real plane marking the left bound of \n" + "integration ylo the y-coordinate of a point in the real plane \n" + "marking the bottom bound of integration xhi the x-coordinate \n" + "of a point in the real plane marking the right bound of integration \n" + "yhi the y-coordinate of a point in the real plane marking the \n" + "top bound of integration cenx the x-coordinate of a point in \n" + "the real plane marking the PSF center ceny the y-coordinate of \n" + "a point in the real plane marking the PSF center volume the \n" + "total volume of the PSF fwhm the full-width at half max of the \n" + "PSF value Pointer to the value of the Airy function volumeout \n" + "Pointer to the value of the integral/TR>\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "get_local_real_byte_order", _wrap_get_local_real_byte_order, METH_NOARGS, "\n" + "\n" + "Returns : char **bo,int *bolen\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_local_real_byte_order (char ** byte_order);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_local_integer_byte_order returns the byte order of integers \n" + "on the machine on which the API is being run in the form of a \n" + "character string returned as the value pointed to by byte_order. \n" + "cbf_get_local_real_byte_order returns the byte order of reals on the \n" + "machine on which the API is being run in the form of a character \n" + "string returned as the value pointed to by byte_order. \n" + "cbf_get_local_real_format returns the format of floats on the machine \n" + "on which the API is being run in the form of a character string \n" + "returned as the value pointed to by real_format. The strings returned \n" + "must not be modified in any way.\n" + "The values returned in byte_order may be the strings \"little_endian \n" + "\" or \"big-endian \". The values returned in real_format may be the \n" + "strings \"ieee 754-1985 \" or \"other \". Additional values may be \n" + "returned by future versions of the API.\n" + "ARGUMENTS\n" + "byte_order pointer to the returned string real_format pointer to \n" + "the returned string\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "compute_reciprocal_cell", _wrap_compute_reciprocal_cell, METH_O, "\n" + "\n" + "Returns : Float astar,Float bstar,Float cstar,Float alphastar,Float betastar,\n" + " Float gammastar\n" + "*args : double cell[6]\n" + "\n" + "C prototype: int cbf_compute_reciprocal_cell ( double cell[6],\n" + " double rcell[6] );\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_compute_reciprocal_cell sets rcell to point to the array of \n" + "reciprocal cell parameters computed from the double values cell[0:2] \n" + "giving the cell edge lengths a, b and c in Ångstroms, and the double \n" + "values cell[3:5] giving the cell angles α, β and γ in degrees. The \n" + "double values rcell[0:2] will be set to the reciprocal cell lengths \n" + "a^*, b^* and c^* in Ångstroms^-1 and the double values rcell[3:5] \n" + "will be set to the reciprocal cell angles α^*, β^* and γ^* in \n" + "degrees.\n" + "ARGUMENTS\n" + "cell Pointer to the array of 6 doubles giving the cell \n" + "parameters. rcell Pointer to the destination array of 6 doubles \n" + "giving the reciprocal cell parameters. volume Pointer to the \n" + "doubles for cell volume.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "airy_disk_volume", _wrap_airy_disk_volume, METH_VARARGS, "\n" + "\n" + "Returns : Float volumeout\n" + "*args : double xlo,double ylo,double xhi,double yhi,double cenx,double ceny,\n" + " double volumein,double fwhm\n" + "\n" + "C prototype: int cbf_airy_disk_volume(double xlo, double ylo, double xhi,\n" + " double yhi, double cenx, double ceny, double volume,\n" + " double fwhm, double * volumeout);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_airy_disk sets value to point to the value taken at (x,y) of an \n" + "truncated Airy function approximation to a point-spread function of \n" + "total included volume volume and full width at half max fwhm centered \n" + "on (cenx, ceny).\n" + "cbf_airy_disk_volume sets to point to the integral in the box with \n" + "diagonal corners (xlo, ylo) and of (xhi, yhi) of a truncated Airy \n" + "function approximation to a point-spread function of total included \n" + "volume volume and full width at half max fwhm centered on (cenx, \n" + "ceny).\n" + "The Airy function used is an 8-digit approximation up to the first \n" + "minimum, after which it is forced to zero, so it cannot be used to \n" + "simulate diffraction rings.\n" + "ARGUMENTS\n" + "x the x-coordinate of a point in the real plane y \n" + "the y-coordinate of a point in the real plane xlo the \n" + "x-coordinate of a point in the real plane marking the left bound of \n" + "integration ylo the y-coordinate of a point in the real plane \n" + "marking the bottom bound of integration xhi the x-coordinate \n" + "of a point in the real plane marking the right bound of integration \n" + "yhi the y-coordinate of a point in the real plane marking the \n" + "top bound of integration cenx the x-coordinate of a point in \n" + "the real plane marking the PSF center ceny the y-coordinate of \n" + "a point in the real plane marking the PSF center volume the \n" + "total volume of the PSF fwhm the full-width at half max of the \n" + "PSF value Pointer to the value of the Airy function volumeout \n" + "Pointer to the value of the integral/TR>\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_positioner_struct_matrix_set", _wrap_cbf_positioner_struct_matrix_set, METH_VARARGS, "cbf_positioner_struct_matrix_set(cbf_positioner_struct self, double [3][4] matrix)"}, + { "cbf_positioner_struct_matrix_get", _wrap_cbf_positioner_struct_matrix_get, METH_O, "cbf_positioner_struct_matrix_get(cbf_positioner_struct self) -> double [3][4]"}, + { "cbf_positioner_struct_axis_set", _wrap_cbf_positioner_struct_axis_set, METH_VARARGS, "cbf_positioner_struct_axis_set(cbf_positioner_struct self, cbf_axis_struct * axis)"}, + { "cbf_positioner_struct_axis_get", _wrap_cbf_positioner_struct_axis_get, METH_O, "cbf_positioner_struct_axis_get(cbf_positioner_struct self) -> cbf_axis_struct *"}, + { "cbf_positioner_struct_axes_set", _wrap_cbf_positioner_struct_axes_set, METH_VARARGS, "cbf_positioner_struct_axes_set(cbf_positioner_struct self, size_t axes)"}, + { "cbf_positioner_struct_axes_get", _wrap_cbf_positioner_struct_axes_get, METH_O, "cbf_positioner_struct_axes_get(cbf_positioner_struct self) -> size_t"}, + { "cbf_positioner_struct_matrix_is_valid_set", _wrap_cbf_positioner_struct_matrix_is_valid_set, METH_VARARGS, "cbf_positioner_struct_matrix_is_valid_set(cbf_positioner_struct self, int matrix_is_valid)"}, + { "cbf_positioner_struct_matrix_is_valid_get", _wrap_cbf_positioner_struct_matrix_is_valid_get, METH_O, "cbf_positioner_struct_matrix_is_valid_get(cbf_positioner_struct self) -> int"}, + { "cbf_positioner_struct_matrix_ratio_used_set", _wrap_cbf_positioner_struct_matrix_ratio_used_set, METH_VARARGS, "cbf_positioner_struct_matrix_ratio_used_set(cbf_positioner_struct self, double matrix_ratio_used)"}, + { "cbf_positioner_struct_matrix_ratio_used_get", _wrap_cbf_positioner_struct_matrix_ratio_used_get, METH_O, "cbf_positioner_struct_matrix_ratio_used_get(cbf_positioner_struct self) -> double"}, + { "cbf_positioner_struct_axis_index_limit_set", _wrap_cbf_positioner_struct_axis_index_limit_set, METH_VARARGS, "cbf_positioner_struct_axis_index_limit_set(cbf_positioner_struct self, size_t axis_index_limit)"}, + { "cbf_positioner_struct_axis_index_limit_get", _wrap_cbf_positioner_struct_axis_index_limit_get, METH_O, "cbf_positioner_struct_axis_index_limit_get(cbf_positioner_struct self) -> size_t"}, + { "new_cbf_positioner_struct", _wrap_new_cbf_positioner_struct, METH_NOARGS, "new_cbf_positioner_struct() -> cbf_positioner_struct"}, + { "delete_cbf_positioner_struct", _wrap_delete_cbf_positioner_struct, METH_O, "delete_cbf_positioner_struct(cbf_positioner_struct self)"}, + { "cbf_positioner_struct_get_rotation_range", _wrap_cbf_positioner_struct_get_rotation_range, METH_O, "\n" + "\n" + "Returns : Float start,Float increment\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_rotation_range (cbf_goniometer goniometer,\n" + " unsigned int reserved, double *start, double *increment);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_rotation_range sets *start and *increment to the \n" + "corresponding values of the goniometer rotation axis used for the \n" + "exposure.\n" + "Either of the destination pointers may be NULL.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "goniometer Goniometer handle. reserved Unused. Any value other \n" + "than 0 is invalid. start Pointer to the destination start \n" + "value. increment Pointer to the destination increment value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_positioner_struct_rotate_vector", _wrap_cbf_positioner_struct_rotate_vector, METH_VARARGS, "\n" + "\n" + "Returns : double final1,double final2,double final3\n" + "*args : double ratio,double initial1,double initial2,double initial3\n" + "\n" + "C prototype: int cbf_rotate_vector (cbf_goniometer goniometer,\n" + " unsigned int reserved, double ratio, double initial1,\n" + " double initial2, double initial3, double *final1,\n" + " double *final2, double *final3);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_rotate_vector sets *final1, *final2, and *final3 to the 3 \n" + "components of the of the vector (initial1, initial2, initial3) after \n" + "reorientation by applying the goniometer rotations. The value ratio \n" + "specif ies the goniometer setting and varies from 0.0 at the \n" + "beginning of the exposure to 1.0 at the end, irrespective of the \n" + "actual rotation range.\n" + "Any of the destination pointers may be NULL.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "goniometer Goniometer handle. reserved Unused. Any value other \n" + "than 0 is invalid. ratio Goniometer setting. 0 = beginning of \n" + "exposure, 1 = end. initial1 x component of the initial vector. \n" + "initial2 y component of the initial vector. initial3 z \n" + "component of the initial vector. final1 Pointer to the \n" + "destination x component of the final vector. final2 Pointer to \n" + "the destination y component of the final vector. final3 Pointer \n" + "to the destination z component of the final vector.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_positioner_struct_get_goniometer_poise", _wrap_cbf_positioner_struct_get_goniometer_poise, METH_VARARGS, "\n" + "\n" + "Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2,\n" + " Float offset3,Float angle\n" + "*args : Float ratio\n" + "\n" + "C prototype: int cbf_get_goniometer_poise(cbf_goniometer goniometer,\n" + " double ratio, double * vector1, double * vector2,\n" + " double * vector3, double * offset1, double * offset2,\n" + " double * offset3, double * angle);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_axis_poise sets vector1, vector2, vector3 to point to the \n" + "components of the axis vector for axis axis_id, offset1, offset2, \n" + "offset3 to point to the components of the axis base offset vector for \n" + "axis axis_id, and angle to point to the angle of rotation of axis \n" + "axis_id after application of the axis settings for frame frame_id, \n" + "using ratio, a value between 0 and 1, indicating how far into the \n" + "internal motion in the frame to go. If frame_id is the string \". \n" + "\", the first frame found is used. If there is more than one frame, \n" + "which frame will be found is indeterminate. If frame_id is NULL, the \n" + "overall setting for the scan are used, rather than those for any \n" + "particular frame. The vector and offset reported are the reference \n" + "vector and offset of the axis axis_id transformed by application of \n" + "all motions of the axes on which axis_id depends.\n" + "cbf_get_goniometer_poise vector1, vector2, vector3 to point to the \n" + "components of the axis vector for the goniometer axis, offset1, \n" + "offset2, offset3 to point to the components of the axis base offset \n" + "vector for the goniometer axis, and angle to point to the angle of \n" + "rotation of the goniometer axis after application of all axis \n" + "settings in the goniometer deriving the vector, offset and angle from \n" + "the resulting matrix. Calculation of the vector is indeterminate if \n" + "the angle is zero.\n" + "cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point \n" + "to the components of the axis vector for axis axis_id, offset1, \n" + "offset2, offset3 to point to the components of the axis base offset \n" + "vector for axis axis_id unmodified by axis rotations. Any of the \n" + "pointers may be specified as NULL.\n" + "ARGUMENTS\n" + "handle CBF handle. ratio A number between 0 and 1 \n" + "indication how far into the frame to go vector1 Pointer to the \n" + "first component of the axis vector vector2 Pointer to the second \n" + "component of the axis vector vector3 Pointer to the third \n" + "component of the axis vector offset1 Pointer to the first \n" + "component of the axis offset offset2 Pointer to the second \n" + "component of the axis offset offset3 Pointer to the third \n" + "component of the axis offset angle Pointer to the rotation \n" + "angle axis_id The specified axis frame_id The specified \n" + "frame positioner CBF goniometer\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_positioner_struct_get_reciprocal", _wrap_cbf_positioner_struct_get_reciprocal, METH_VARARGS, "\n" + "\n" + "Returns : double reciprocal1,double reciprocal2,double reciprocal3\n" + "*args : double ratio,double wavelength,double real1,double real2,double real3\n" + "\n" + "C prototype: int cbf_get_reciprocal (cbf_goniometer goniometer,\n" + " unsigned int reserved, double ratio, double wavelength,\n" + " double real1, double real2, double real3,\n" + " double *reciprocal1, double *reciprocal2,\n" + " double *reciprocal3);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_reciprocal sets *reciprocal1, * reciprocal2, and * \n" + "reciprocal3 to the 3 components of the of the reciprocal-space vector \n" + "corresponding to the real-space vector (real1, real2, real3). The \n" + "reciprocal-space vector is oriented to correspond to the goniometer \n" + "setting with all axes at 0. The value wavelength is the wavlength in \n" + "Å and the value ratio specifies the current goniometer setting and \n" + "varies from 0.0 at the beginning of the exposur e to 1.0 at the end, \n" + "irrespective of the actual rotation range.\n" + "Any of the destination pointers may be NULL.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "goniometer Goniometer handle. reserved Unused. Any value \n" + "other than 0 is invalid. ratio Goniometer setting. 0 = \n" + "beginning of exposure, 1 = end. wavelength Wavelength in Å. real1 \n" + " x component of the real-space vector. real2 y \n" + "component of the real-space vector. real3 z component of the \n" + "real-space vector. reciprocal1 Pointer to the destination x \n" + "component of the reciprocal-space vector. reciprocal2 Pointer to \n" + "the destination y component of the reciprocal-space vector. \n" + "reciprocal3 Pointer to the destination z component of the \n" + "reciprocal-space vector.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_positioner_struct_get_rotation_axis", _wrap_cbf_positioner_struct_get_rotation_axis, METH_O, "\n" + "\n" + "Returns : double vector1,double vector2,double vector3\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_rotation_axis (cbf_goniometer goniometer,\n" + " unsigned int reserved, double *vector1, double *vector2,\n" + " double *vector3);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_rotation_axis sets *vector1, *vector2, and *vector3 to the 3 \n" + "components of the goniometer rotation axis used for the exposure.\n" + "Any of the destination pointers may be NULL.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "goniometer Goniometer handle. reserved Unused. Any value other \n" + "than 0 is invalid. vector1 Pointer to the destination x \n" + "component of the rotation axis. vector2 Pointer to the \n" + "destination y component of the rotation axis. vector3 Pointer to \n" + "the destination z component of the rotation axis.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_positioner_struct_swigregister", cbf_positioner_struct_swigregister, METH_O, NULL}, + { "cbf_positioner_struct_swiginit", cbf_positioner_struct_swiginit, METH_VARARGS, NULL}, + { "cbf_detector_struct_positioner_set", _wrap_cbf_detector_struct_positioner_set, METH_VARARGS, "cbf_detector_struct_positioner_set(cbf_detector_struct self, cbf_positioner_struct positioner)"}, + { "cbf_detector_struct_positioner_get", _wrap_cbf_detector_struct_positioner_get, METH_O, "cbf_detector_struct_positioner_get(cbf_detector_struct self) -> cbf_positioner_struct"}, + { "cbf_detector_struct_displacement_set", _wrap_cbf_detector_struct_displacement_set, METH_VARARGS, "cbf_detector_struct_displacement_set(cbf_detector_struct self, double [2] displacement)"}, + { "cbf_detector_struct_displacement_get", _wrap_cbf_detector_struct_displacement_get, METH_O, "cbf_detector_struct_displacement_get(cbf_detector_struct self) -> double [2]"}, + { "cbf_detector_struct_increment_set", _wrap_cbf_detector_struct_increment_set, METH_VARARGS, "cbf_detector_struct_increment_set(cbf_detector_struct self, double [2] increment)"}, + { "cbf_detector_struct_increment_get", _wrap_cbf_detector_struct_increment_get, METH_O, "cbf_detector_struct_increment_get(cbf_detector_struct self) -> double [2]"}, + { "cbf_detector_struct_axes_set", _wrap_cbf_detector_struct_axes_set, METH_VARARGS, "cbf_detector_struct_axes_set(cbf_detector_struct self, size_t axes)"}, + { "cbf_detector_struct_axes_get", _wrap_cbf_detector_struct_axes_get, METH_O, "cbf_detector_struct_axes_get(cbf_detector_struct self) -> size_t"}, + { "cbf_detector_struct_index_set", _wrap_cbf_detector_struct_index_set, METH_VARARGS, "cbf_detector_struct_index_set(cbf_detector_struct self, size_t [2] index)"}, + { "cbf_detector_struct_index_get", _wrap_cbf_detector_struct_index_get, METH_O, "cbf_detector_struct_index_get(cbf_detector_struct self) -> size_t [2]"}, + { "new_cbf_detector_struct", _wrap_new_cbf_detector_struct, METH_NOARGS, "new_cbf_detector_struct() -> cbf_detector_struct"}, + { "delete_cbf_detector_struct", _wrap_delete_cbf_detector_struct, METH_O, "delete_cbf_detector_struct(cbf_detector_struct self)"}, + { "cbf_detector_struct_set_beam_center_fs", _wrap_cbf_detector_struct_set_beam_center_fs, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : double indexfast,double indexslow,double centerfast,double centerslow\n" + "\n" + "C prototype: int cbf_set_beam_center_fs (cbf_detector detector,\n" + " double *indexfast, double *indexslow, double *centerfast,\n" + " double *centerslow);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_beam_center sets *centerfast and *centerslow to the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector and *indexfast and \n" + "*indexslow to the corresponding indices. cbf_set_beam_center sets the \n" + "offsets in the axis category for the detector element axis with \n" + "precedence 1 to place the beam center at the position given in mm by \n" + "*centerfast and *centerslow as the displacements in mm along the \n" + "detector axes from pixel (0, 0) to the point at which the beam \n" + "intersects the detector at the indices given *indexfast and \n" + "*indexslow. cbf_set_reference_beam_center sets the displacments in \n" + "the array_structure_list_axis category to place the beam center at \n" + "the position given in mm by *centerfast and *centerslow as the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector at the indices given \n" + "by *indexfast and *indexslow. In order to achieve consistent results, \n" + "a reference detector should be used for detector to have all axes at \n" + "their reference settings.\n" + "Note that the precedence 1 axis is the fastest axis, so that \n" + "*centerfast and *indexfast are the fast axis components of the center \n" + "and *centerslow and *indexslow are the slow axis components of the \n" + "center.\n" + "The _fs calls give the displacments in a fast-to-slow order. The \n" + "calls with no suffix and the calls _sf calls give the displacements \n" + "in slow-to-fast order\n" + "Any of the destination pointers may be NULL for getting the beam \n" + "center. For setting the beam axis, either the indices of the center \n" + "must not be NULL.\n" + "The indices are non-negative for beam centers within the detector \n" + "surface, but the center for an axis with a negative increment will be \n" + "negative for a beam center within the detector surface.\n" + "For cbf_set_beam_center if the diffrn_data_frame category exists with \n" + "a row for the corresponding element id, the values will be set for \n" + "_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in \n" + "millimetres and the value of _diffrn_data_frame.center_units will be \n" + "set to 'mm'.\n" + "For cbf_set_reference_beam_center if the diffrn_detector_element \n" + "category exists with a row for the corresponding element id, the \n" + "values will be set for _diffrn_detector_element.reference_center_fast \n" + "and _diffrn_detector_element.reference_center_slow in millimetres and \n" + "the value of _diffrn_detector_element.reference_units will be set to \n" + "'mm'.\n" + "ARGUMENTS\n" + "detector Detector handle. indexfast Pointer to the destination \n" + "fast index. indexslow Pointer to the destination slow index. \n" + "centerfast Pointer to the destination displacement along the fast \n" + "axis. centerslow Pointer to the destination displacement along the \n" + "slow axis.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_set_reference_beam_center_fs", _wrap_cbf_detector_struct_set_reference_beam_center_fs, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : double indexfast,double indexslow,double centerfast,double centerslow\n" + "\n" + "C prototype: int cbf_set_reference_beam_center_fs (cbf_detector detector,\n" + " double *indexfast, double *indexslow, double *centerfast,\n" + " double *centerslow);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_beam_center sets *centerfast and *centerslow to the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector and *indexfast and \n" + "*indexslow to the corresponding indices. cbf_set_beam_center sets the \n" + "offsets in the axis category for the detector element axis with \n" + "precedence 1 to place the beam center at the position given in mm by \n" + "*centerfast and *centerslow as the displacements in mm along the \n" + "detector axes from pixel (0, 0) to the point at which the beam \n" + "intersects the detector at the indices given *indexfast and \n" + "*indexslow. cbf_set_reference_beam_center sets the displacments in \n" + "the array_structure_list_axis category to place the beam center at \n" + "the position given in mm by *centerfast and *centerslow as the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector at the indices given \n" + "by *indexfast and *indexslow. In order to achieve consistent results, \n" + "a reference detector should be used for detector to have all axes at \n" + "their reference settings.\n" + "Note that the precedence 1 axis is the fastest axis, so that \n" + "*centerfast and *indexfast are the fast axis components of the center \n" + "and *centerslow and *indexslow are the slow axis components of the \n" + "center.\n" + "The _fs calls give the displacments in a fast-to-slow order. The \n" + "calls with no suffix and the calls _sf calls give the displacements \n" + "in slow-to-fast order\n" + "Any of the destination pointers may be NULL for getting the beam \n" + "center. For setting the beam axis, either the indices of the center \n" + "must not be NULL.\n" + "The indices are non-negative for beam centers within the detector \n" + "surface, but the center for an axis with a negative increment will be \n" + "negative for a beam center within the detector surface.\n" + "For cbf_set_beam_center if the diffrn_data_frame category exists with \n" + "a row for the corresponding element id, the values will be set for \n" + "_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in \n" + "millimetres and the value of _diffrn_data_frame.center_units will be \n" + "set to 'mm'.\n" + "For cbf_set_reference_beam_center if the diffrn_detector_element \n" + "category exists with a row for the corresponding element id, the \n" + "values will be set for _diffrn_detector_element.reference_center_fast \n" + "and _diffrn_detector_element.reference_center_slow in millimetres and \n" + "the value of _diffrn_detector_element.reference_units will be set to \n" + "'mm'.\n" + "ARGUMENTS\n" + "detector Detector handle. indexfast Pointer to the destination \n" + "fast index. indexslow Pointer to the destination slow index. \n" + "centerfast Pointer to the destination displacement along the fast \n" + "axis. centerslow Pointer to the destination displacement along the \n" + "slow axis.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_beam_center", _wrap_cbf_detector_struct_get_beam_center, METH_O, "\n" + "\n" + "Returns : double index1,double index2,double center1,double center2\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_beam_center (cbf_detector detector,\n" + " double *indexslow, double *indexfast, double *centerslow,\n" + " double *centerfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_beam_center sets *centerfast and *centerslow to the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector and *indexfast and \n" + "*indexslow to the corresponding indices. cbf_set_beam_center sets the \n" + "offsets in the axis category for the detector element axis with \n" + "precedence 1 to place the beam center at the position given in mm by \n" + "*centerfast and *centerslow as the displacements in mm along the \n" + "detector axes from pixel (0, 0) to the point at which the beam \n" + "intersects the detector at the indices given *indexfast and \n" + "*indexslow. cbf_set_reference_beam_center sets the displacments in \n" + "the array_structure_list_axis category to place the beam center at \n" + "the position given in mm by *centerfast and *centerslow as the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector at the indices given \n" + "by *indexfast and *indexslow. In order to achieve consistent results, \n" + "a reference detector should be used for detector to have all axes at \n" + "their reference settings.\n" + "Note that the precedence 1 axis is the fastest axis, so that \n" + "*centerfast and *indexfast are the fast axis components of the center \n" + "and *centerslow and *indexslow are the slow axis components of the \n" + "center.\n" + "The _fs calls give the displacments in a fast-to-slow order. The \n" + "calls with no suffix and the calls _sf calls give the displacements \n" + "in slow-to-fast order\n" + "Any of the destination pointers may be NULL for getting the beam \n" + "center. For setting the beam axis, either the indices of the center \n" + "must not be NULL.\n" + "The indices are non-negative for beam centers within the detector \n" + "surface, but the center for an axis with a negative increment will be \n" + "negative for a beam center within the detector surface.\n" + "For cbf_set_beam_center if the diffrn_data_frame category exists with \n" + "a row for the corresponding element id, the values will be set for \n" + "_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in \n" + "millimetres and the value of _diffrn_data_frame.center_units will be \n" + "set to 'mm'.\n" + "For cbf_set_reference_beam_center if the diffrn_detector_element \n" + "category exists with a row for the corresponding element id, the \n" + "values will be set for _diffrn_detector_element.reference_center_fast \n" + "and _diffrn_detector_element.reference_center_slow in millimetres and \n" + "the value of _diffrn_detector_element.reference_units will be set to \n" + "'mm'.\n" + "ARGUMENTS\n" + "detector Detector handle. indexfast Pointer to the destination \n" + "fast index. indexslow Pointer to the destination slow index. \n" + "centerfast Pointer to the destination displacement along the fast \n" + "axis. centerslow Pointer to the destination displacement along the \n" + "slow axis.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_pixel_coordinates_fs", _wrap_cbf_detector_struct_get_pixel_coordinates_fs, METH_VARARGS, "\n" + "\n" + "Returns : double coordinate1,double coordinate2,double coordinate3\n" + "*args : double indexfast,double indexslow\n" + "\n" + "C prototype: int cbf_get_pixel_coordinates_fs (cbf_detector detector,\n" + " double indexfast, double indexslow, double *coordinate1,\n" + " double *coordinate2, double *coordinate3);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_pixel_coordinates, cbf_get_pixel_coordinates_fs and \n" + "cbf_get_pixel_coordinates_sf ses *coordinate1, *coordinate2, and \n" + "*coordinate3 to the vector position of pixel (indexfast, indexslow) \n" + "on the detector surface. If indexslow and indexfast are integers then \n" + "the coordinates correspond to the center of a pixel.\n" + "Any of the destination pointers may be NULL.\n" + "ARGUMENTS\n" + "detector Detector handle. indexslow Slow index. indexfast \n" + " Fast index. coordinate1 Pointer to the destination x component. \n" + "coordinate2 Pointer to the destination y component. coordinate3 \n" + "Pointer to the destination z component.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_inferred_pixel_size", _wrap_cbf_detector_struct_get_inferred_pixel_size, METH_VARARGS, "\n" + "\n" + "Returns : Float pixel size\n" + "*args : Int axis_number\n" + "\n" + "C prototype: int cbf_get_inferred_pixel_size (cbf_detector detector,\n" + " int axis_number, double *psize);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_sf set \n" + "*psize to point to the double value in millimeters of the pixel size \n" + "for the axis axis_number value. The slow index is treated as axis 1 \n" + "and the next faster index is treated as axis 2. \n" + "cbf_get_inferred_pixel_size_fs sets *psize to point to the double \n" + "value in millimeters of the pixel size for the axis axis_number \n" + "value. The fast index is treated as axis 1 and the next slower index \n" + "is treated as axis 2.\n" + "If the axis number is negative, the axes are used in the reverse \n" + "order so that an axis_number of -1 indicates the fast axes in a call \n" + "to cbf_get_inferred_pixel_size or cbf_get_inferred_pixel_size_sf and \n" + "indicates the fast axis in a call to cbf_get_inferred_pixel_size_fs.\n" + "ARGUMENTS\n" + "detector Detector handle. axis_number The number of the axis. \n" + "psize Pointer to the destination pizel size in mm.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_pixel_area", _wrap_cbf_detector_struct_get_pixel_area, METH_VARARGS, "\n" + "\n" + "Returns : double area,double projected_area\n" + "*args : double index1,double index2\n" + "\n" + "C prototype: int cbf_get_pixel_area (cbf_detector detector, double indexslow,\n" + " double indexfast, double *area, double *projected_area);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_pixel_area, cbf_get_pixel_area_fs and cbf_get_pixel_area_sf \n" + "set *area to the area of the pixel at (indexfast, indexslow) on the \n" + "detector surface and *projected_area to the apparent area of the \n" + "pixel as viewed from the sample position, with indexslow being the \n" + "slow axis and indexfast being the fast axis.\n" + "Either of the destination pointers may be NULL.\n" + "ARGUMENTS\n" + "detector Detector handle. indexfast Fast index. \n" + "indexslow Slow index. area Pointer to the \n" + "destination area in mm2. projected_area Pointer to the destination \n" + "apparent area in mm2.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_pixel_normal_fs", _wrap_cbf_detector_struct_get_pixel_normal_fs, METH_VARARGS, "\n" + "\n" + "Returns : double normal1,double normal2,double normal3\n" + "*args : double indexfast,double indexslow\n" + "\n" + "C prototype: int cbf_get_pixel_normal_fs (cbf_detector detector,\n" + " double indexfast, double indexslow, double *normal1,\n" + " double *normal2, double *normal3);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_detector_normal, cbf_get_pixel_normal_fs and \n" + "cbf_get_pixel_normal_sf set *normal1, *normal2, and *normal3 to the 3 \n" + "components of the of the normal vector to the pixel at (indexfast, \n" + "indexslow). The vector is normalized.\n" + "Any of the destination pointers may be NULL.\n" + "ARGUMENTS\n" + "detector Detector handle. indexslow Slow index. indexfast Fast \n" + "index. normal1 Pointer to the destination x component of the \n" + "normal vector. normal2 Pointer to the destination y component of \n" + "the normal vector. normal3 Pointer to the destination z component \n" + "of the normal vector.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_detector_surface_axes", _wrap_cbf_detector_struct_get_detector_surface_axes, METH_VARARGS, "cbf_detector_struct_get_detector_surface_axes(cbf_detector_struct self, int index) -> char const *"}, + { "cbf_detector_struct_get_detector_axes", _wrap_cbf_detector_struct_get_detector_axes, METH_O, "\n" + "\n" + "Returns : double slowaxis1,double slowaxis2,double slowaxis3,double fastaxis1,\n" + " double fastaxis2,double fastaxis3\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_detector_axes (cbf_detector detector,\n" + " double *slowaxis1, double *slowaxis2, double *slowaxis3,\n" + " double *fastaxis1, double *fastaxis2, double *fastaxis3);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and \n" + "*slowaxis3 to the 3 components of the slow axis of the specified \n" + "detector at the current settings of all axes. \n" + "cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and \n" + "*fastaxis3 to the 3 components of the fast axis of the specified \n" + "detector at the current settings of all axes. cbf_get_detector_axes, \n" + "cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set \n" + "*slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the \n" + "slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 \n" + "components of the fast axis of the specified detector at the current \n" + "settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 \n" + "and *axis_id2 to the names of the two surface axes of the detector or \n" + " \". \",\n" + "Any of the destination pointers may be NULL.\n" + "ARGUMENTS\n" + "detector Detector handle. slowaxis1 Pointer to the destination x \n" + "component of the slow axis vector. slowaxis2 Pointer to the \n" + "destination y component of the slow axis vector. slowaxis3 Pointer \n" + "to the destination z component of the slow axis vector. fastaxis1 \n" + "Pointer to the destination x component of the fast axis vector. \n" + "fastaxis2 Pointer to the destination y component of the fast axis \n" + "vector. fastaxis3 Pointer to the destination z component of the \n" + "fast axis vector. axis_id1 Pointer to the destination first \n" + "surface axis name. axis_id2 Pointer to the destination second \n" + "surface axis name. axis_id3 Pointer to the destination third \n" + "surface axis name.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_set_reference_beam_center", _wrap_cbf_detector_struct_set_reference_beam_center, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : double indexslow,double indexfast,double centerslow,double centerfast\n" + "\n" + "C prototype: int cbf_set_reference_beam_center (cbf_detector detector,\n" + " double *indexslow, double *indexfast, double *centerslow,\n" + " double *centerfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_beam_center sets *centerfast and *centerslow to the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector and *indexfast and \n" + "*indexslow to the corresponding indices. cbf_set_beam_center sets the \n" + "offsets in the axis category for the detector element axis with \n" + "precedence 1 to place the beam center at the position given in mm by \n" + "*centerfast and *centerslow as the displacements in mm along the \n" + "detector axes from pixel (0, 0) to the point at which the beam \n" + "intersects the detector at the indices given *indexfast and \n" + "*indexslow. cbf_set_reference_beam_center sets the displacments in \n" + "the array_structure_list_axis category to place the beam center at \n" + "the position given in mm by *centerfast and *centerslow as the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector at the indices given \n" + "by *indexfast and *indexslow. In order to achieve consistent results, \n" + "a reference detector should be used for detector to have all axes at \n" + "their reference settings.\n" + "Note that the precedence 1 axis is the fastest axis, so that \n" + "*centerfast and *indexfast are the fast axis components of the center \n" + "and *centerslow and *indexslow are the slow axis components of the \n" + "center.\n" + "The _fs calls give the displacments in a fast-to-slow order. The \n" + "calls with no suffix and the calls _sf calls give the displacements \n" + "in slow-to-fast order\n" + "Any of the destination pointers may be NULL for getting the beam \n" + "center. For setting the beam axis, either the indices of the center \n" + "must not be NULL.\n" + "The indices are non-negative for beam centers within the detector \n" + "surface, but the center for an axis with a negative increment will be \n" + "negative for a beam center within the detector surface.\n" + "For cbf_set_beam_center if the diffrn_data_frame category exists with \n" + "a row for the corresponding element id, the values will be set for \n" + "_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in \n" + "millimetres and the value of _diffrn_data_frame.center_units will be \n" + "set to 'mm'.\n" + "For cbf_set_reference_beam_center if the diffrn_detector_element \n" + "category exists with a row for the corresponding element id, the \n" + "values will be set for _diffrn_detector_element.reference_center_fast \n" + "and _diffrn_detector_element.reference_center_slow in millimetres and \n" + "the value of _diffrn_detector_element.reference_units will be set to \n" + "'mm'.\n" + "ARGUMENTS\n" + "detector Detector handle. indexfast Pointer to the destination \n" + "fast index. indexslow Pointer to the destination slow index. \n" + "centerfast Pointer to the destination displacement along the fast \n" + "axis. centerslow Pointer to the destination displacement along the \n" + "slow axis.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_detector_axis_slow", _wrap_cbf_detector_struct_get_detector_axis_slow, METH_O, "\n" + "\n" + "Returns : double slowaxis1,double slowaxis2,double slowaxis3\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_detector_axis_slow (cbf_detector detector,\n" + " double *slowaxis1, double *slowaxis2, double *slowaxis3);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and \n" + "*slowaxis3 to the 3 components of the slow axis of the specified \n" + "detector at the current settings of all axes. \n" + "cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and \n" + "*fastaxis3 to the 3 components of the fast axis of the specified \n" + "detector at the current settings of all axes. cbf_get_detector_axes, \n" + "cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set \n" + "*slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the \n" + "slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 \n" + "components of the fast axis of the specified detector at the current \n" + "settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 \n" + "and *axis_id2 to the names of the two surface axes of the detector or \n" + " \". \",\n" + "Any of the destination pointers may be NULL.\n" + "ARGUMENTS\n" + "detector Detector handle. slowaxis1 Pointer to the destination x \n" + "component of the slow axis vector. slowaxis2 Pointer to the \n" + "destination y component of the slow axis vector. slowaxis3 Pointer \n" + "to the destination z component of the slow axis vector. fastaxis1 \n" + "Pointer to the destination x component of the fast axis vector. \n" + "fastaxis2 Pointer to the destination y component of the fast axis \n" + "vector. fastaxis3 Pointer to the destination z component of the \n" + "fast axis vector. axis_id1 Pointer to the destination first \n" + "surface axis name. axis_id2 Pointer to the destination second \n" + "surface axis name. axis_id3 Pointer to the destination third \n" + "surface axis name.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_detector_distance", _wrap_cbf_detector_struct_get_detector_distance, METH_O, "\n" + "\n" + "Returns : double distance\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_detector_distance (cbf_detector detector,\n" + " double *distance);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_detector_distance sets *distance to the nearest distance from \n" + "the sample position to the detector plane.\n" + "ARGUMENTS\n" + "detector Detector handle. distance Pointer to the destination \n" + "distance.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_inferred_pixel_size_fs", _wrap_cbf_detector_struct_get_inferred_pixel_size_fs, METH_VARARGS, "\n" + "\n" + "Returns : Float pixel size\n" + "*args : Int axis_number\n" + "\n" + "C prototype: int cbf_get_inferred_pixel_size_fs(cbf_detector detector,\n" + " int axis_number, double *psize);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_sf set \n" + "*psize to point to the double value in millimeters of the pixel size \n" + "for the axis axis_number value. The slow index is treated as axis 1 \n" + "and the next faster index is treated as axis 2. \n" + "cbf_get_inferred_pixel_size_fs sets *psize to point to the double \n" + "value in millimeters of the pixel size for the axis axis_number \n" + "value. The fast index is treated as axis 1 and the next slower index \n" + "is treated as axis 2.\n" + "If the axis number is negative, the axes are used in the reverse \n" + "order so that an axis_number of -1 indicates the fast axes in a call \n" + "to cbf_get_inferred_pixel_size or cbf_get_inferred_pixel_size_sf and \n" + "indicates the fast axis in a call to cbf_get_inferred_pixel_size_fs.\n" + "ARGUMENTS\n" + "detector Detector handle. axis_number The number of the axis. \n" + "psize Pointer to the destination pizel size in mm.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_detector_normal", _wrap_cbf_detector_struct_get_detector_normal, METH_O, "\n" + "\n" + "Returns : double normal1,double normal2,double normal3\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_detector_normal (cbf_detector detector,\n" + " double *normal1, double *normal2, double *normal3);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_detector_normal sets *normal1, *normal2, and *normal3 to the \n" + "3 components of the of the normal vector to the detector plane. The \n" + "vector is normalized.\n" + "Any of the destination pointers may be NULL.\n" + "ARGUMENTS\n" + "detector Detector handle. normal1 Pointer to the destination x \n" + "component of the normal vector. normal2 Pointer to the destination \n" + "y component of the normal vector. normal3 Pointer to the \n" + "destination z component of the normal vector.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_detector_axis_fast", _wrap_cbf_detector_struct_get_detector_axis_fast, METH_O, "\n" + "\n" + "Returns : double fastaxis1,double fastaxis2,double fastaxis3\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_detector_axis_fast (cbf_detector detector,\n" + " double *fastaxis1, double *fastaxis2, double *fastaxis3);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and \n" + "*slowaxis3 to the 3 components of the slow axis of the specified \n" + "detector at the current settings of all axes. \n" + "cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and \n" + "*fastaxis3 to the 3 components of the fast axis of the specified \n" + "detector at the current settings of all axes. cbf_get_detector_axes, \n" + "cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set \n" + "*slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the \n" + "slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 \n" + "components of the fast axis of the specified detector at the current \n" + "settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 \n" + "and *axis_id2 to the names of the two surface axes of the detector or \n" + " \". \",\n" + "Any of the destination pointers may be NULL.\n" + "ARGUMENTS\n" + "detector Detector handle. slowaxis1 Pointer to the destination x \n" + "component of the slow axis vector. slowaxis2 Pointer to the \n" + "destination y component of the slow axis vector. slowaxis3 Pointer \n" + "to the destination z component of the slow axis vector. fastaxis1 \n" + "Pointer to the destination x component of the fast axis vector. \n" + "fastaxis2 Pointer to the destination y component of the fast axis \n" + "vector. fastaxis3 Pointer to the destination z component of the \n" + "fast axis vector. axis_id1 Pointer to the destination first \n" + "surface axis name. axis_id2 Pointer to the destination second \n" + "surface axis name. axis_id3 Pointer to the destination third \n" + "surface axis name.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_detector_axes_fs", _wrap_cbf_detector_struct_get_detector_axes_fs, METH_O, "cbf_detector_struct_get_detector_axes_fs(cbf_detector_struct self)"}, + { "cbf_detector_struct_get_detector_axes_sf", _wrap_cbf_detector_struct_get_detector_axes_sf, METH_O, "\n" + "\n" + "Returns : double slowaxis1,double slowaxis2,double slowaxis3,double fastaxis1,\n" + " double fastaxis2,double fastaxis3\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_detector_axes_sf (cbf_detector detector,\n" + " double *slowaxis1, double *slowaxis2, double *slowaxis3,\n" + " double *fastaxis1, double *fastaxis2, double *fastaxis3);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and \n" + "*slowaxis3 to the 3 components of the slow axis of the specified \n" + "detector at the current settings of all axes. \n" + "cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and \n" + "*fastaxis3 to the 3 components of the fast axis of the specified \n" + "detector at the current settings of all axes. cbf_get_detector_axes, \n" + "cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set \n" + "*slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the \n" + "slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 \n" + "components of the fast axis of the specified detector at the current \n" + "settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 \n" + "and *axis_id2 to the names of the two surface axes of the detector or \n" + " \". \",\n" + "Any of the destination pointers may be NULL.\n" + "ARGUMENTS\n" + "detector Detector handle. slowaxis1 Pointer to the destination x \n" + "component of the slow axis vector. slowaxis2 Pointer to the \n" + "destination y component of the slow axis vector. slowaxis3 Pointer \n" + "to the destination z component of the slow axis vector. fastaxis1 \n" + "Pointer to the destination x component of the fast axis vector. \n" + "fastaxis2 Pointer to the destination y component of the fast axis \n" + "vector. fastaxis3 Pointer to the destination z component of the \n" + "fast axis vector. axis_id1 Pointer to the destination first \n" + "surface axis name. axis_id2 Pointer to the destination second \n" + "surface axis name. axis_id3 Pointer to the destination third \n" + "surface axis name.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_pixel_coordinates_sf", _wrap_cbf_detector_struct_get_pixel_coordinates_sf, METH_VARARGS, "\n" + "\n" + "Returns : double coordinate1,double coordinate2,double coordinate3\n" + "*args : double indexslow,double indexfast\n" + "\n" + "C prototype: int cbf_get_pixel_coordinates_sf (cbf_detector detector,\n" + " double indexslow, double indexfast, double *coordinate1,\n" + " double *coordinate2, double *coordinate3);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_pixel_coordinates, cbf_get_pixel_coordinates_fs and \n" + "cbf_get_pixel_coordinates_sf ses *coordinate1, *coordinate2, and \n" + "*coordinate3 to the vector position of pixel (indexfast, indexslow) \n" + "on the detector surface. If indexslow and indexfast are integers then \n" + "the coordinates correspond to the center of a pixel.\n" + "Any of the destination pointers may be NULL.\n" + "ARGUMENTS\n" + "detector Detector handle. indexslow Slow index. indexfast \n" + " Fast index. coordinate1 Pointer to the destination x component. \n" + "coordinate2 Pointer to the destination y component. coordinate3 \n" + "Pointer to the destination z component.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_set_beam_center", _wrap_cbf_detector_struct_set_beam_center, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : double indexslow,double indexfast,double centerslow,double centerfast\n" + "\n" + "C prototype: int cbf_set_beam_center (cbf_detector detector,\n" + " double *indexslow, double *indexfast, double *centerslow,\n" + " double *centerfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_beam_center sets *centerfast and *centerslow to the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector and *indexfast and \n" + "*indexslow to the corresponding indices. cbf_set_beam_center sets the \n" + "offsets in the axis category for the detector element axis with \n" + "precedence 1 to place the beam center at the position given in mm by \n" + "*centerfast and *centerslow as the displacements in mm along the \n" + "detector axes from pixel (0, 0) to the point at which the beam \n" + "intersects the detector at the indices given *indexfast and \n" + "*indexslow. cbf_set_reference_beam_center sets the displacments in \n" + "the array_structure_list_axis category to place the beam center at \n" + "the position given in mm by *centerfast and *centerslow as the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector at the indices given \n" + "by *indexfast and *indexslow. In order to achieve consistent results, \n" + "a reference detector should be used for detector to have all axes at \n" + "their reference settings.\n" + "Note that the precedence 1 axis is the fastest axis, so that \n" + "*centerfast and *indexfast are the fast axis components of the center \n" + "and *centerslow and *indexslow are the slow axis components of the \n" + "center.\n" + "The _fs calls give the displacments in a fast-to-slow order. The \n" + "calls with no suffix and the calls _sf calls give the displacements \n" + "in slow-to-fast order\n" + "Any of the destination pointers may be NULL for getting the beam \n" + "center. For setting the beam axis, either the indices of the center \n" + "must not be NULL.\n" + "The indices are non-negative for beam centers within the detector \n" + "surface, but the center for an axis with a negative increment will be \n" + "negative for a beam center within the detector surface.\n" + "For cbf_set_beam_center if the diffrn_data_frame category exists with \n" + "a row for the corresponding element id, the values will be set for \n" + "_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in \n" + "millimetres and the value of _diffrn_data_frame.center_units will be \n" + "set to 'mm'.\n" + "For cbf_set_reference_beam_center if the diffrn_detector_element \n" + "category exists with a row for the corresponding element id, the \n" + "values will be set for _diffrn_detector_element.reference_center_fast \n" + "and _diffrn_detector_element.reference_center_slow in millimetres and \n" + "the value of _diffrn_detector_element.reference_units will be set to \n" + "'mm'.\n" + "ARGUMENTS\n" + "detector Detector handle. indexfast Pointer to the destination \n" + "fast index. indexslow Pointer to the destination slow index. \n" + "centerfast Pointer to the destination displacement along the fast \n" + "axis. centerslow Pointer to the destination displacement along the \n" + "slow axis.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_pixel_area_fs", _wrap_cbf_detector_struct_get_pixel_area_fs, METH_VARARGS, "\n" + "\n" + "Returns : double area,double projected_area\n" + "*args : double indexfast,double indexslow\n" + "\n" + "C prototype: int cbf_get_pixel_area_fs(cbf_detector detector,\n" + " double indexfast, double indexslow, double *area,\n" + " double *projected_area);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_pixel_area, cbf_get_pixel_area_fs and cbf_get_pixel_area_sf \n" + "set *area to the area of the pixel at (indexfast, indexslow) on the \n" + "detector surface and *projected_area to the apparent area of the \n" + "pixel as viewed from the sample position, with indexslow being the \n" + "slow axis and indexfast being the fast axis.\n" + "Either of the destination pointers may be NULL.\n" + "ARGUMENTS\n" + "detector Detector handle. indexfast Fast index. \n" + "indexslow Slow index. area Pointer to the \n" + "destination area in mm2. projected_area Pointer to the destination \n" + "apparent area in mm2.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_beam_center_fs", _wrap_cbf_detector_struct_get_beam_center_fs, METH_O, "\n" + "\n" + "Returns : double indexfast,double indexslow,double centerfast,double centerslow\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_beam_center_fs (cbf_detector detector,\n" + " double *indexfast, double *indexslow, double *centerfast,\n" + " double *centerslow);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_beam_center sets *centerfast and *centerslow to the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector and *indexfast and \n" + "*indexslow to the corresponding indices. cbf_set_beam_center sets the \n" + "offsets in the axis category for the detector element axis with \n" + "precedence 1 to place the beam center at the position given in mm by \n" + "*centerfast and *centerslow as the displacements in mm along the \n" + "detector axes from pixel (0, 0) to the point at which the beam \n" + "intersects the detector at the indices given *indexfast and \n" + "*indexslow. cbf_set_reference_beam_center sets the displacments in \n" + "the array_structure_list_axis category to place the beam center at \n" + "the position given in mm by *centerfast and *centerslow as the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector at the indices given \n" + "by *indexfast and *indexslow. In order to achieve consistent results, \n" + "a reference detector should be used for detector to have all axes at \n" + "their reference settings.\n" + "Note that the precedence 1 axis is the fastest axis, so that \n" + "*centerfast and *indexfast are the fast axis components of the center \n" + "and *centerslow and *indexslow are the slow axis components of the \n" + "center.\n" + "The _fs calls give the displacments in a fast-to-slow order. The \n" + "calls with no suffix and the calls _sf calls give the displacements \n" + "in slow-to-fast order\n" + "Any of the destination pointers may be NULL for getting the beam \n" + "center. For setting the beam axis, either the indices of the center \n" + "must not be NULL.\n" + "The indices are non-negative for beam centers within the detector \n" + "surface, but the center for an axis with a negative increment will be \n" + "negative for a beam center within the detector surface.\n" + "For cbf_set_beam_center if the diffrn_data_frame category exists with \n" + "a row for the corresponding element id, the values will be set for \n" + "_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in \n" + "millimetres and the value of _diffrn_data_frame.center_units will be \n" + "set to 'mm'.\n" + "For cbf_set_reference_beam_center if the diffrn_detector_element \n" + "category exists with a row for the corresponding element id, the \n" + "values will be set for _diffrn_detector_element.reference_center_fast \n" + "and _diffrn_detector_element.reference_center_slow in millimetres and \n" + "the value of _diffrn_detector_element.reference_units will be set to \n" + "'mm'.\n" + "ARGUMENTS\n" + "detector Detector handle. indexfast Pointer to the destination \n" + "fast index. indexslow Pointer to the destination slow index. \n" + "centerfast Pointer to the destination displacement along the fast \n" + "axis. centerslow Pointer to the destination displacement along the \n" + "slow axis.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_inferred_pixel_size_sf", _wrap_cbf_detector_struct_get_inferred_pixel_size_sf, METH_VARARGS, "\n" + "\n" + "Returns : Float pixel size\n" + "*args : Int axis_number\n" + "\n" + "C prototype: int cbf_get_inferred_pixel_size_sf(cbf_detector detector,\n" + " int axis_number, double *psize);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_sf set \n" + "*psize to point to the double value in millimeters of the pixel size \n" + "for the axis axis_number value. The slow index is treated as axis 1 \n" + "and the next faster index is treated as axis 2. \n" + "cbf_get_inferred_pixel_size_fs sets *psize to point to the double \n" + "value in millimeters of the pixel size for the axis axis_number \n" + "value. The fast index is treated as axis 1 and the next slower index \n" + "is treated as axis 2.\n" + "If the axis number is negative, the axes are used in the reverse \n" + "order so that an axis_number of -1 indicates the fast axes in a call \n" + "to cbf_get_inferred_pixel_size or cbf_get_inferred_pixel_size_sf and \n" + "indicates the fast axis in a call to cbf_get_inferred_pixel_size_fs.\n" + "ARGUMENTS\n" + "detector Detector handle. axis_number The number of the axis. \n" + "psize Pointer to the destination pizel size in mm.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_pixel_coordinates", _wrap_cbf_detector_struct_get_pixel_coordinates, METH_VARARGS, "\n" + "\n" + "Returns : double coordinate1,double coordinate2,double coordinate3\n" + "*args : double index1,double index2\n" + "\n" + "C prototype: int cbf_get_pixel_coordinates (cbf_detector detector,\n" + " double indexslow, double indexfast, double *coordinate1,\n" + " double *coordinate2, double *coordinate3);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_pixel_coordinates, cbf_get_pixel_coordinates_fs and \n" + "cbf_get_pixel_coordinates_sf ses *coordinate1, *coordinate2, and \n" + "*coordinate3 to the vector position of pixel (indexfast, indexslow) \n" + "on the detector surface. If indexslow and indexfast are integers then \n" + "the coordinates correspond to the center of a pixel.\n" + "Any of the destination pointers may be NULL.\n" + "ARGUMENTS\n" + "detector Detector handle. indexslow Slow index. indexfast \n" + " Fast index. coordinate1 Pointer to the destination x component. \n" + "coordinate2 Pointer to the destination y component. coordinate3 \n" + "Pointer to the destination z component.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_beam_center_sf", _wrap_cbf_detector_struct_get_beam_center_sf, METH_O, "\n" + "\n" + "Returns : double indexslow,double indexfast,double centerslow,double centerfast\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_beam_center_sf (cbf_detector detector,\n" + " double *indexslow, double *indexfast, double *centerslow,\n" + " double *centerfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_beam_center sets *centerfast and *centerslow to the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector and *indexfast and \n" + "*indexslow to the corresponding indices. cbf_set_beam_center sets the \n" + "offsets in the axis category for the detector element axis with \n" + "precedence 1 to place the beam center at the position given in mm by \n" + "*centerfast and *centerslow as the displacements in mm along the \n" + "detector axes from pixel (0, 0) to the point at which the beam \n" + "intersects the detector at the indices given *indexfast and \n" + "*indexslow. cbf_set_reference_beam_center sets the displacments in \n" + "the array_structure_list_axis category to place the beam center at \n" + "the position given in mm by *centerfast and *centerslow as the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector at the indices given \n" + "by *indexfast and *indexslow. In order to achieve consistent results, \n" + "a reference detector should be used for detector to have all axes at \n" + "their reference settings.\n" + "Note that the precedence 1 axis is the fastest axis, so that \n" + "*centerfast and *indexfast are the fast axis components of the center \n" + "and *centerslow and *indexslow are the slow axis components of the \n" + "center.\n" + "The _fs calls give the displacments in a fast-to-slow order. The \n" + "calls with no suffix and the calls _sf calls give the displacements \n" + "in slow-to-fast order\n" + "Any of the destination pointers may be NULL for getting the beam \n" + "center. For setting the beam axis, either the indices of the center \n" + "must not be NULL.\n" + "The indices are non-negative for beam centers within the detector \n" + "surface, but the center for an axis with a negative increment will be \n" + "negative for a beam center within the detector surface.\n" + "For cbf_set_beam_center if the diffrn_data_frame category exists with \n" + "a row for the corresponding element id, the values will be set for \n" + "_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in \n" + "millimetres and the value of _diffrn_data_frame.center_units will be \n" + "set to 'mm'.\n" + "For cbf_set_reference_beam_center if the diffrn_detector_element \n" + "category exists with a row for the corresponding element id, the \n" + "values will be set for _diffrn_detector_element.reference_center_fast \n" + "and _diffrn_detector_element.reference_center_slow in millimetres and \n" + "the value of _diffrn_detector_element.reference_units will be set to \n" + "'mm'.\n" + "ARGUMENTS\n" + "detector Detector handle. indexfast Pointer to the destination \n" + "fast index. indexslow Pointer to the destination slow index. \n" + "centerfast Pointer to the destination displacement along the fast \n" + "axis. centerslow Pointer to the destination displacement along the \n" + "slow axis.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_pixel_area_sf", _wrap_cbf_detector_struct_get_pixel_area_sf, METH_VARARGS, "\n" + "\n" + "Returns : double area,double projected_area\n" + "*args : double indexslow,double indexfast\n" + "\n" + "C prototype: int cbf_get_pixel_area_sf(cbf_detector detector,\n" + " double indexslow, double indexfast, double *area,\n" + " double *projected_area);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_pixel_area, cbf_get_pixel_area_fs and cbf_get_pixel_area_sf \n" + "set *area to the area of the pixel at (indexfast, indexslow) on the \n" + "detector surface and *projected_area to the apparent area of the \n" + "pixel as viewed from the sample position, with indexslow being the \n" + "slow axis and indexfast being the fast axis.\n" + "Either of the destination pointers may be NULL.\n" + "ARGUMENTS\n" + "detector Detector handle. indexfast Fast index. \n" + "indexslow Slow index. area Pointer to the \n" + "destination area in mm2. projected_area Pointer to the destination \n" + "apparent area in mm2.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_set_reference_beam_center_sf", _wrap_cbf_detector_struct_set_reference_beam_center_sf, METH_O, "\n" + "\n" + "Returns : \n" + "*args : double indexslow,double indexfast,double centerslow,double centerfast\n" + "\n" + "C prototype: int cbf_set_reference_beam_center_sf (cbf_detector detector,\n" + " double *indexslow, double *indexfast, double *centerslow,\n" + " double *centerfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_beam_center sets *centerfast and *centerslow to the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector and *indexfast and \n" + "*indexslow to the corresponding indices. cbf_set_beam_center sets the \n" + "offsets in the axis category for the detector element axis with \n" + "precedence 1 to place the beam center at the position given in mm by \n" + "*centerfast and *centerslow as the displacements in mm along the \n" + "detector axes from pixel (0, 0) to the point at which the beam \n" + "intersects the detector at the indices given *indexfast and \n" + "*indexslow. cbf_set_reference_beam_center sets the displacments in \n" + "the array_structure_list_axis category to place the beam center at \n" + "the position given in mm by *centerfast and *centerslow as the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector at the indices given \n" + "by *indexfast and *indexslow. In order to achieve consistent results, \n" + "a reference detector should be used for detector to have all axes at \n" + "their reference settings.\n" + "Note that the precedence 1 axis is the fastest axis, so that \n" + "*centerfast and *indexfast are the fast axis components of the center \n" + "and *centerslow and *indexslow are the slow axis components of the \n" + "center.\n" + "The _fs calls give the displacments in a fast-to-slow order. The \n" + "calls with no suffix and the calls _sf calls give the displacements \n" + "in slow-to-fast order\n" + "Any of the destination pointers may be NULL for getting the beam \n" + "center. For setting the beam axis, either the indices of the center \n" + "must not be NULL.\n" + "The indices are non-negative for beam centers within the detector \n" + "surface, but the center for an axis with a negative increment will be \n" + "negative for a beam center within the detector surface.\n" + "For cbf_set_beam_center if the diffrn_data_frame category exists with \n" + "a row for the corresponding element id, the values will be set for \n" + "_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in \n" + "millimetres and the value of _diffrn_data_frame.center_units will be \n" + "set to 'mm'.\n" + "For cbf_set_reference_beam_center if the diffrn_detector_element \n" + "category exists with a row for the corresponding element id, the \n" + "values will be set for _diffrn_detector_element.reference_center_fast \n" + "and _diffrn_detector_element.reference_center_slow in millimetres and \n" + "the value of _diffrn_detector_element.reference_units will be set to \n" + "'mm'.\n" + "ARGUMENTS\n" + "detector Detector handle. indexfast Pointer to the destination \n" + "fast index. indexslow Pointer to the destination slow index. \n" + "centerfast Pointer to the destination displacement along the fast \n" + "axis. centerslow Pointer to the destination displacement along the \n" + "slow axis.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_set_beam_center_sf", _wrap_cbf_detector_struct_set_beam_center_sf, METH_O, "\n" + "\n" + "Returns : \n" + "*args : double indexslow,double indexfast,double centerslow,double centerfast\n" + "\n" + "C prototype: int cbf_set_beam_center_sf (cbf_detector detector,\n" + " double *indexslow, double *indexfast, double *centerslow,\n" + " double *centerfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_beam_center sets *centerfast and *centerslow to the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector and *indexfast and \n" + "*indexslow to the corresponding indices. cbf_set_beam_center sets the \n" + "offsets in the axis category for the detector element axis with \n" + "precedence 1 to place the beam center at the position given in mm by \n" + "*centerfast and *centerslow as the displacements in mm along the \n" + "detector axes from pixel (0, 0) to the point at which the beam \n" + "intersects the detector at the indices given *indexfast and \n" + "*indexslow. cbf_set_reference_beam_center sets the displacments in \n" + "the array_structure_list_axis category to place the beam center at \n" + "the position given in mm by *centerfast and *centerslow as the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector at the indices given \n" + "by *indexfast and *indexslow. In order to achieve consistent results, \n" + "a reference detector should be used for detector to have all axes at \n" + "their reference settings.\n" + "Note that the precedence 1 axis is the fastest axis, so that \n" + "*centerfast and *indexfast are the fast axis components of the center \n" + "and *centerslow and *indexslow are the slow axis components of the \n" + "center.\n" + "The _fs calls give the displacments in a fast-to-slow order. The \n" + "calls with no suffix and the calls _sf calls give the displacements \n" + "in slow-to-fast order\n" + "Any of the destination pointers may be NULL for getting the beam \n" + "center. For setting the beam axis, either the indices of the center \n" + "must not be NULL.\n" + "The indices are non-negative for beam centers within the detector \n" + "surface, but the center for an axis with a negative increment will be \n" + "negative for a beam center within the detector surface.\n" + "For cbf_set_beam_center if the diffrn_data_frame category exists with \n" + "a row for the corresponding element id, the values will be set for \n" + "_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in \n" + "millimetres and the value of _diffrn_data_frame.center_units will be \n" + "set to 'mm'.\n" + "For cbf_set_reference_beam_center if the diffrn_detector_element \n" + "category exists with a row for the corresponding element id, the \n" + "values will be set for _diffrn_detector_element.reference_center_fast \n" + "and _diffrn_detector_element.reference_center_slow in millimetres and \n" + "the value of _diffrn_detector_element.reference_units will be set to \n" + "'mm'.\n" + "ARGUMENTS\n" + "detector Detector handle. indexfast Pointer to the destination \n" + "fast index. indexslow Pointer to the destination slow index. \n" + "centerfast Pointer to the destination displacement along the fast \n" + "axis. centerslow Pointer to the destination displacement along the \n" + "slow axis.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_pixel_normal", _wrap_cbf_detector_struct_get_pixel_normal, METH_VARARGS, "\n" + "\n" + "Returns : double normal1,double normal2,double normal3\n" + "*args : double index1,double index2\n" + "\n" + "C prototype: int cbf_get_pixel_normal (cbf_detector detector,\n" + " double indexslow, double indexfast, double *normal1,\n" + " double *normal2, double *normal3);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_detector_normal, cbf_get_pixel_normal_fs and \n" + "cbf_get_pixel_normal_sf set *normal1, *normal2, and *normal3 to the 3 \n" + "components of the of the normal vector to the pixel at (indexfast, \n" + "indexslow). The vector is normalized.\n" + "Any of the destination pointers may be NULL.\n" + "ARGUMENTS\n" + "detector Detector handle. indexslow Slow index. indexfast Fast \n" + "index. normal1 Pointer to the destination x component of the \n" + "normal vector. normal2 Pointer to the destination y component of \n" + "the normal vector. normal3 Pointer to the destination z component \n" + "of the normal vector.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_swigregister", cbf_detector_struct_swigregister, METH_O, NULL}, + { "cbf_detector_struct_swiginit", cbf_detector_struct_swiginit, METH_VARARGS, NULL}, + { "cbf_handle_struct_node_set", _wrap_cbf_handle_struct_node_set, METH_VARARGS, "cbf_handle_struct_node_set(cbf_handle_struct self, cbf_node * node)"}, + { "cbf_handle_struct_node_get", _wrap_cbf_handle_struct_node_get, METH_O, "cbf_handle_struct_node_get(cbf_handle_struct self) -> cbf_node *"}, + { "cbf_handle_struct_row_set", _wrap_cbf_handle_struct_row_set, METH_VARARGS, "cbf_handle_struct_row_set(cbf_handle_struct self, int row)"}, + { "cbf_handle_struct_row_get", _wrap_cbf_handle_struct_row_get, METH_O, "cbf_handle_struct_row_get(cbf_handle_struct self) -> int"}, + { "cbf_handle_struct_search_row_set", _wrap_cbf_handle_struct_search_row_set, METH_VARARGS, "cbf_handle_struct_search_row_set(cbf_handle_struct self, int search_row)"}, + { "cbf_handle_struct_search_row_get", _wrap_cbf_handle_struct_search_row_get, METH_O, "cbf_handle_struct_search_row_get(cbf_handle_struct self) -> int"}, + { "new_cbf_handle_struct", _wrap_new_cbf_handle_struct, METH_NOARGS, "new_cbf_handle_struct() -> cbf_handle_struct"}, + { "delete_cbf_handle_struct", _wrap_delete_cbf_handle_struct, METH_O, "delete_cbf_handle_struct(cbf_handle_struct self)"}, + { "cbf_handle_struct_select_datablock", _wrap_cbf_handle_struct_select_datablock, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : Integer\n" + "\n" + "C prototype: int cbf_select_datablock (cbf_handle handle,\n" + " unsigned int datablock);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_select_datablock selects data block number datablock as the \n" + "current data block.\n" + "The first data block is number 0.\n" + "If the data block does not exist, the function returns CBF_NOTFOUND.\n" + "ARGUMENTS\n" + "handle CBF handle. datablock Number of the data block to \n" + "select.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_force_new_datablock", _wrap_cbf_handle_struct_force_new_datablock, METH_VARARGS, "\n" + "\n" + "Returns : string\n" + "*args : \n" + "\n" + "C prototype: int cbf_force_new_datablock (cbf_handle handle,\n" + " const char *datablockname);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_force_new_datablock creates a new data block with name \n" + "datablockname and makes it the current data block. Duplicate data \n" + "block names are allowed. cbf_force_new_saveframe creates a new savew \n" + "frame with name saveframename and makes it the current save frame. \n" + "Duplicate save frame names are allowed.\n" + "Even if a save frame with this name already exists, a new save frame \n" + "is created and becomes the current save frame.\n" + "ARGUMENTS\n" + "handle CBF handle. datablockname The name of the new data \n" + "block. saveframename The name of the new save frame.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_3d_image_fs_as_string", _wrap_cbf_handle_struct_get_3d_image_fs_as_string, METH_VARARGS, "\n" + "\n" + "Returns : (Binary)String\n" + "*args : int element_number,int elsize,int elsign,int ndimfast,int ndimmid,\n" + " int ndimslow\n" + "\n" + "C prototype: int cbf_get_3d_image_fs (cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " void *array, size_t elsize, int elsign, size_t ndimfast,\n" + " size_t ndimmid, size_t ndimslow);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" + "array for element number element_number into an array. The array \n" + "consists of ndimslow×ndimfast elements of elsize bytes each, \n" + "starting at array. The elements are signed if elsign is non-0 and \n" + "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" + "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" + "for element number element_number into an array. A real array is \n" + "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" + "cbf_get_3d_image_sf read the 3D image array for element number \n" + "element_number into an array. The array consists of \n" + "ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting \n" + "at array. The elements are signed if elsign is non-0 and unsigned \n" + "otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" + "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" + "floats for element number element_number into an array. A real array \n" + "is always signed.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "The structure of the array as a 1-, 2- or 3-dimensional array should \n" + "agree with the structure of the array given in the \n" + "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" + "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" + "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" + "being processed. If the array is 2-dimensional and a 3D call is used, \n" + "ndimslow and ndimmid should be the\n" + "\n" + ""}, + { "cbf_handle_struct_reset_datablocks", _wrap_cbf_handle_struct_reset_datablocks, METH_O, "\n" + "\n" + "Returns : \n" + "*args : \n" + "\n" + "C prototype: int cbf_reset_datablocks (cbf_handle handle);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_reset_datablocks deletes all categories from all data blocks.\n" + "The current data block does not change.\n" + "ARGUMENTS\n" + "handle CBF handle.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_tag_category", _wrap_cbf_handle_struct_set_tag_category, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : String tagname,String categoryname_in\n" + "\n" + "C prototype: int cbf_set_tag_category (cbf_handle handle, const char* tagname,\n" + " const char* categoryname_in);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_find_tag_category sets categoryname to the category associated \n" + "with tagname in the dictionary associated with handle. \n" + "cbf_set_tag_category upddates the dictionary associated with handle \n" + "to indicated that tagname is in category categoryname_in.\n" + "ARGUMENTS\n" + "handle CBF handle. tagname tag name. \n" + "categoryname pointer to a returned category name. \n" + "categoryname_in input category name.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_require_tag_root", _wrap_cbf_handle_struct_require_tag_root, METH_VARARGS, "\n" + "\n" + "Returns : String tagroot\n" + "*args : String tagname\n" + "\n" + "C prototype: int cbf_require_tag_root (cbf_handle handle, const char* tagname,\n" + " const char** tagroot);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_find_tag_root sets *tagroot to the root tag of which tagname is \n" + "an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in \n" + "the dictionary associated with handle, creating the dictionary if \n" + "necessary. cbf_require_tag_root sets *tagroot to the root tag of \n" + "which tagname is an alias, if there is one, or to the value of \n" + "tagname, if tagname is not an alias.\n" + "A returned tagroot string must not be modified in any way.\n" + "ARGUMENTS\n" + "handle CBF handle. tagname tag name which may be an alias. \n" + "tagroot pointer to a returned tag root name. tagroot_in input \n" + "tag root name.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_row_number", _wrap_cbf_handle_struct_row_number, METH_O, "\n" + "\n" + "Returns : Integer\n" + "*args : \n" + "\n" + "C prototype: int cbf_row_number (cbf_handle handle, unsigned int *row);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_row_number sets *row to the number of the current row of the \n" + "current category.\n" + "ARGUMENTS\n" + "handle CBF handle. row Pointer to the destination row number.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_image", _wrap_cbf_handle_struct_set_image, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : int element_number,int compression,(binary) String data,int elsize,\n" + " int elsign,int dimslow,int dimfast\n" + "\n" + "C prototype: int cbf_set_image (cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, unsigned int compression,\n" + " void *array, size_t elsize, int elsign, size_t ndimslow,\n" + " size_t ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" + "array for element number element_number. The array consists of \n" + "ndimfast×ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-zero and unsigned otherwise. \n" + "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" + "write the image array for element number element_number. The array \n" + "consists of ndimfast×ndimslow IEEE double or float elements of \n" + "elsize bytes each, starting at array. cbf_set_3d_image, \n" + "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" + "for element number element_number. The array consists of \n" + "ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting \n" + "at array. The elements are signed if elsign is non-0 and unsigned \n" + "otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" + "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" + "element_number. The array consists of ndimfast×ndimmid×ndimslow \n" + "IEEE double or float elements of elsize bytes each, starting at \n" + "array.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "If the array is 1-dimensional, ndimslow should be the array size and \n" + "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" + "array is 2-dimensional and the 3D calls are used, ndimslow and \n" + "ndimmid should be used for the array dimensions and ndimfast should \n" + "be set to 1.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" + "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" + "(int), sizeof(double) or sizeof(float), the function returns \n" + "CBF_ARGUMENT.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any value other \n" + "than 0 is invalid. element_number The number of the detector \n" + "element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. compression Compression type. \n" + "array Pointer to the image array. elsize Size in \n" + "bytes of each image array element. elsigned Set to non-0 if \n" + "the image array elements are signed. ndimslow Slowest array \n" + "dimension. ndimmid Second slowest array dimension. ndimfast \n" + " Fastest array dimension.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_set_bin_sizes", _wrap_cbf_handle_struct_set_bin_sizes, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : Integer element_number,Float slowbinsize_in,Float fastbinsize_in\n" + "\n" + "C prototype: int cbf_set_bin_sizes(cbf_handle handle,\n" + " unsigned int element_number, double slowbinsize_in,\n" + " double fastbinsize_in);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_bin_sizes sets slowbinsize to point to the value of the \n" + "number of pixels composing one array element in the dimension that \n" + "changes at the second-fastest rate and fastbinsize to point to the \n" + "value of the number of pixels composing one array element in the \n" + "dimension that changes at the fastest rate for the dectector element \n" + "with the ordinal element_number. cbf_set_bin_sizes sets the the pixel \n" + "bin sizes in the \"array_intensities \" category to the values of \n" + "slowbinsize_in for the number of pixels composing one array element \n" + "in the dimension that changes at the second-fastest rate and \n" + "fastbinsize_in for the number of pixels composing one array element \n" + "in the dimension that changes at the fastest rate for the dectector \n" + "element with the ordinal element_number.\n" + "In order to allow for software binning involving fractions of pixels, \n" + "the bin sizes are doubles rather than ints.\n" + "ARGUMENTS\n" + "handle CBF handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. slowbinsize Pointer to the \n" + "returned number of pixels composing one array element in the \n" + "dimension that changes at the second-fastest rate. fastbinsize \n" + "Pointer to the returned number of pixels composing one array element \n" + "in the dimension that changes at the fastest rate. slowbinsize_in \n" + "The number of pixels composing one array element in the dimension \n" + "that changes at the second-fastest rate. fastbinsize_in The number \n" + "of pixels composing one array element in the dimension that changes \n" + "at the fastest rate.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_new_row", _wrap_cbf_handle_struct_new_row, METH_O, "\n" + "\n" + "Returns : \n" + "*args : \n" + "\n" + "C prototype: int cbf_new_row (cbf_handle handle);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_new_row adds a new row to the current category and makes it the \n" + "current row.\n" + "ARGUMENTS\n" + "handle CBF handle.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_rewind_saveframe", _wrap_cbf_handle_struct_rewind_saveframe, METH_O, "\n" + "\n" + "Returns : \n" + "*args : \n" + "\n" + "C prototype: int cbf_rewind_saveframe (cbf_handle handle);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_rewind_category makes the first category in the current data \n" + "block the current category. cbf_rewind_saveframe makes the first \n" + "saveframe in the current data block the current saveframe. \n" + "cbf_rewind_blockitem makes the first blockitem (category or \n" + "saveframe) in the current data block the current blockitem. The type \n" + "of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type.\n" + "If there are no categories, saveframes or blockitems the function \n" + "returns CBF_NOTFOUND.\n" + "The current column and row become undefined.\n" + "ARGUMENTS\n" + "handle CBF handle. type CBF handle.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_realarrayparameters", _wrap_cbf_handle_struct_get_realarrayparameters, METH_O, "\n" + "\n" + "Returns : int compression,int binary_id,int elsize,int elements\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_realarrayparameters (cbf_handle handle,\n" + " unsigned int *compression, int *binary_id, size_t *elsize,\n" + " size_t *elements);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_integerarrayparameters sets *compression, *binary_id, \n" + "*elsize, *elsigned, *elunsigned, *elements, *minelement and \n" + "*maxelement to values read from the binary value of the item at the \n" + "current column and row. This provides all the arguments needed for a \n" + "subsequent call to cbf_set_integerarray, if a copy of the array is to \n" + "be made into another CIF or CBF. cbf_get_realarrayparameters sets \n" + "*compression, *binary_id, *elsize, *elements to values read from the \n" + "binary value of the item at the current column and row. This provides \n" + "all the arguments needed for a subsequent call to cbf_set_realarray, \n" + "if a copy of the arry is to be made into another CIF or CBF.\n" + "The variants cbf_get_integerarrayparameters_wdims, \n" + "cbf_get_integerarrayparameters_wdims_fs, \n" + "cbf_get_integerarrayparameters_wdims_sf, \n" + "cbf_get_realarrayparameters_wdims, \n" + "cbf_get_realarrayparameters_wdims_fs, \n" + "cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, \n" + "*dimmid, *dimslow, and *padding as well, providing the additional \n" + "parameters needed for a subsequent call to cbf_set_integerarray_wdims \n" + "or cbf_set_realarray_wdims.\n" + "The value returned in *byteorder is a pointer either to the string \n" + "\"little_endian \" or to the string \"big_endian \". This should be \n" + "the byte order of the data, not necessarily of the host machine. No \n" + "attempt should be made to modify this string. At this time only \n" + "\"little_endian \" will be returned.\n" + "The values returned in *dimfast, *dimmid and *dimslow are the sizes \n" + "of the fastest changing, second fastest changing and third fastest \n" + "changing dimensions of the array, if specified, or zero, if not \n" + "specified.\n" + "The value returned in *padding is the size of the post-data padding, \n" + "if any and if specified in the data header. The value is given as a \n" + "count of octets.\n" + "If the value is not binary, the function returns CBF_ASCII.\n" + "ARGUMENTS\n" + "handle CBF handle. compression Compression method used. \n" + "elsize Size in bytes of each array element. binary_id \n" + "Pointer to the destination integer binary identifier. elsigned \n" + "Pointer to an integer. Set to 1 if the elements can be read as signed \n" + "integers. elunsigned Pointer to an integer. Set to 1 if the \n" + "elements can be read as unsigned integers. elements Pointer to \n" + "the destination number of elements. minelement Pointer to the \n" + "destination smallest element. maxelement Pointer to the \n" + "destination largest element. byteorder Pointer to the destination \n" + "byte order. dimfast Pointer to the destination fastest \n" + "dimension. dimmid Pointer to the destination second fastest \n" + "dimension. dimslow Pointer to the destination third fastest \n" + "dimension. padding Pointer to the destination padding size.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_pixel_size_sf", _wrap_cbf_handle_struct_get_pixel_size_sf, METH_VARARGS, "\n" + "\n" + "Returns : Float pixel_size\n" + "*args : Int element_number,Int axis_number\n" + "\n" + "C prototype: int cbf_get_pixel_size_sf(cbf_handle handle,\n" + " unsigned int element_number, int axis_number,\n" + " double *psize);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to \n" + "the double value in millimeters of the axis axis_number of the \n" + "detector element element_number. The axis_number is numbered from 1, \n" + "starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to \n" + "point to the double value in millimeters of the axis axis_number of \n" + "the detector element element_number. The axis_number is numbered from \n" + "1, starting with the fastest axis.\n" + "If a negative axis number is given, the order of axes is reversed, so \n" + "that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the \n" + "fastest axis for cbf_get_pixel_size_sf.\n" + "If the pixel size is not given explcitly in the \"array_element_size \n" + "\" category, the function returns CBF_NOTFOUND.\n" + "ARGUMENTS\n" + "handle CBF handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. axis_number The number of the \n" + "axis, starting from 1 for the fastest for cbf_get_pixel_size and \n" + "cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. \n" + "psize Pointer to the destination pixel size.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_force_new_category", _wrap_cbf_handle_struct_force_new_category, METH_VARARGS, "\n" + "\n" + "Returns : string\n" + "*args : \n" + "\n" + "C prototype: int cbf_force_new_category (cbf_handle handle,\n" + " const char *categoryname);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_force_new_category creates a new category in the current data \n" + "block with name categoryname and makes it the current category. \n" + "Duplicate category names are allowed.\n" + "Even if a category with this name already exists, a new category of \n" + "the same name is created and becomes the current category. The allows \n" + "for the creation of unlooped tag/value lists drawn from the same \n" + "category.\n" + "ARGUMENTS\n" + "handle CBF handle. categoryname The name of the new \n" + "category.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_force_new_saveframe", _wrap_cbf_handle_struct_force_new_saveframe, METH_VARARGS, "\n" + "\n" + "Returns : string\n" + "*args : \n" + "\n" + "C prototype: int cbf_force_new_saveframe (cbf_handle handle,\n" + " const char *saveframename);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_force_new_datablock creates a new data block with name \n" + "datablockname and makes it the current data block. Duplicate data \n" + "block names are allowed. cbf_force_new_saveframe creates a new savew \n" + "frame with name saveframename and makes it the current save frame. \n" + "Duplicate save frame names are allowed.\n" + "Even if a save frame with this name already exists, a new save frame \n" + "is created and becomes the current save frame.\n" + "ARGUMENTS\n" + "handle CBF handle. datablockname The name of the new data \n" + "block. saveframename The name of the new save frame.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_count_datablocks", _wrap_cbf_handle_struct_count_datablocks, METH_O, "\n" + "\n" + "Returns : Integer\n" + "*args : \n" + "\n" + "C prototype: int cbf_count_datablocks (cbf_handle handle,\n" + " unsigned int *datablocks);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_count_datablocks puts the number of data blocks in *datablocks .\n" + "ARGUMENTS\n" + "handle CBF handle. datablocks Pointer to the destination data \n" + "block count.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_find_row", _wrap_cbf_handle_struct_find_row, METH_VARARGS, "\n" + "\n" + "Returns : string\n" + "*args : \n" + "\n" + "C prototype: int cbf_find_row (cbf_handle handle, const char *value);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_find_row makes the first row in the current column with value \n" + "value the current row.\n" + "The comparison is case-sensitive.\n" + "If a matching row does not exist, the function returns CBF_NOTFOUND.\n" + "The current column is not affected.\n" + "ARGUMENTS\n" + "handle CBF handle. value The value of the row to find.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_select_column", _wrap_cbf_handle_struct_select_column, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : Integer\n" + "\n" + "C prototype: int cbf_select_column (cbf_handle handle, unsigned int column);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_select_column selects column number column in the current \n" + "category as the current column.\n" + "The first column is number 0.\n" + "The current row is not affected\n" + "If the column does not exist, the function returns CBF_NOTFOUND.\n" + "ARGUMENTS\n" + "handle CBF handle. column Number of the column to select.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_construct_detector", _wrap_cbf_handle_struct_construct_detector, METH_VARARGS, "\n" + "\n" + "Returns : pycbf detector object\n" + "*args : Integer element_number\n" + "\n" + "C prototype: int cbf_construct_detector (cbf_handle handle,\n" + " cbf_detector *detector, unsigned int element_number);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_construct_detector constructs a detector object for detector \n" + "element number element_number using the description in the CBF object \n" + "handle and initialises the detector handle *detector.\n" + "cbf_construct_reference_detector constructs a detector object for \n" + "detector element number element_number using the description in the \n" + "CBF object handle and initialises the detector handle *detector using \n" + "the reference settings of the axes. cbf_require_reference_detector is \n" + "similar, but try to force the creations of missing intermediate \n" + "categories needed to construct a detector object.\n" + "ARGUMENTS\n" + "handle CBF handle. detector Pointer to the \n" + "destination detector handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_get_axis_depends_on", _wrap_cbf_handle_struct_get_axis_depends_on, METH_VARARGS, "\n" + "\n" + "Returns : String\n" + "*args : String axis_id\n" + "\n" + "C prototype: int cbf_get_axis_depends_on (cbf_handle handle,\n" + " const char *axis_id, const char * *depends_on);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" + "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" + "axis of index ancestor_index of axis axis_id, starting with axis_id \n" + "for ancestor_index 0.\n" + "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" + "axis_id or to \". \" if there is no such ancestor. \n" + "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" + "to \". \" if there is no such equipment. \n" + "cbf_get_axis_equipment_component sets *equipment_component to the \n" + "equipment_component of axis_id or to \". \" if there is no such \n" + "equipment_component.\n" + "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" + "components of the ofset of axis_id.\n" + "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" + "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" + "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" + "is no such rotation_axis.\n" + "cbf_get_axis_setting sets *start and *increment to the corresponding \n" + "values of the axis axis_id. Any of the destination pointers may be \n" + "NULL.\n" + "cbf_get_axis_type sets axis_type to the type of axis_id.\n" + "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" + "components of the vector of axis_id.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any \n" + "value other than 0 is invalid. axis_id Axis id. \n" + "ancestor_index Integer index of the desired ancestor, starting \n" + "with 0 for the current axis_id. ancestor Pointer to \n" + "destination ancestor name pointer. depends_on Pointer to \n" + "destination depends_on name pointer. equipment Pointer to \n" + "destination equipment name pointer. equipment_component Pointer to \n" + "destination equipment_component name pointer. offset1 \n" + "Pointer to destination first offset component value. offset2 \n" + " Pointer to destination second offset component value. offset3 \n" + " Pointer to destination third offset component value. \n" + "rotation Pointer to destination rotation value. \n" + "rotation_axis Pointer to destination rotation_axisn name \n" + "pointer. start Pointer to the destination start \n" + "value. increment Pointer to the destination increment \n" + "value. type Pointer to destination axis type of type \n" + ". vector1 Pointer to destination first vector component \n" + "value. vector2 Pointer to destination second vector \n" + "component value. vector3 Pointer to destination third \n" + "vector component value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_rewind_column", _wrap_cbf_handle_struct_rewind_column, METH_O, "\n" + "\n" + "Returns : \n" + "*args : \n" + "\n" + "C prototype: int cbf_rewind_column (cbf_handle handle);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_rewind_column makes the first column in the current category the \n" + "current column.\n" + "If there are no columns, the function returns CBF_NOTFOUND.\n" + "The current row is not affected.\n" + "ARGUMENTS\n" + "handle CBF handle.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_construct_reference_positioner", _wrap_cbf_handle_struct_construct_reference_positioner, METH_VARARGS, "\n" + "\n" + "Returns : pycbf positioner object\n" + "*args : String axis_id\n" + "\n" + "C prototype: int cbf_construct_reference_positioner (cbf_handle handle,\n" + " cbf_positioner *positioner, const char *axis_id);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_construct_positioner constructs a positioner object for the axis \n" + "given by axis_id using the description in the CBF object handle and \n" + "initialises the positioner handle *positioner.\n" + "cbf_construct_reference positioner constructs a positioner object for \n" + "the axis given by axis_id using the description in the CBF object \n" + "handle and initialises the detector handle *detector using the \n" + "reference settings of the axes.\n" + "ARGUMENTS\n" + "handle CBF handle. positioner Pointer to the destination \n" + "positioner handle. axis_id The identifier of the axis in the \n" + "\"axis \" category.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_require_column_doublevalue", _wrap_cbf_handle_struct_require_column_doublevalue, METH_VARARGS, "\n" + "\n" + "Returns : Float defaultvalue\n" + "*args : String columnname,Float Value\n" + "\n" + "C prototype: int cbf_require_column_doublevalue (cbf_handle handle,\n" + " const char *columnname, double *number,\n" + " const double defaultvalue);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_require_column_doublevalue sets *number to the value of the ASCII \n" + "item at the current row for the column given with the name given by \n" + "*columnname, with the value interpreted as a decimal floating-point \n" + "number, or to the number given by defaultvalue if the item cannot be \n" + "found.\n" + "ARGUMENTS\n" + "handle CBF handle. columnname Name of the column \n" + "containing the number. number pointer to the location to \n" + "receive the floating-point value. defaultvalue Value to use if the \n" + "requested column and value cannot be found.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_datestamp", _wrap_cbf_handle_struct_get_datestamp, METH_O, "\n" + "\n" + "Returns : int year,int month,int day,int hour,int minute,double second,\n" + " int timezone\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_datestamp (cbf_handle handle, unsigned int reserved,\n" + " int *year, int *month, int *day, int *hour, int *minute,\n" + " double *second, int *timezone);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_datestamp sets *year, *month, *day, *hour, *minute and \n" + "*second to the corresponding values of the collection timestamp. \n" + "*timezone is set to timezone difference from UTC in minutes. The \n" + "parameter < i>reserved is presently unused and should be set to 0.\n" + "Any of the destination pointers may be NULL.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any value other than 0 is \n" + "invalid. year Pointer to the destination timestamp year. month \n" + " Pointer to the destination timestamp month (1-12). day \n" + "Pointer to the destination timestamp day (1-31). hour Pointer \n" + "to the destination timestamp hour (0-23). minute Pointer to the \n" + "destination timestamp minute (0-59). second Pointer to the \n" + "destination timestamp second (0-60.0). timezone Pointer to the \n" + "destination timezone difference from UTC in minutes.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_get_integervalue", _wrap_cbf_handle_struct_get_integervalue, METH_O, "\n" + "\n" + "Returns : int\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_integervalue (cbf_handle handle, int *number);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_integervalue sets *number to the value of the ASCII item at \n" + "the current column and row interpreted as a decimal integer. \n" + "cbf_require_integervalue sets *number to the value of the ASCII item \n" + "at the current column and row interpreted as a decimal integer, \n" + "setting it to defaultvalue if necessary.\n" + "If the value is not ASCII, the function returns CBF_BINARY.\n" + "ARGUMENTS\n" + "handle CBF handle. number pointer to the number. \n" + "defaultvalue default number value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_crystal_id", _wrap_cbf_handle_struct_get_crystal_id, METH_O, "\n" + "\n" + "Returns : \n" + "*args : string\n" + "\n" + "C prototype: int cbf_get_crystal_id (cbf_handle handle,\n" + " const char **crystal_id);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_crystal_id sets *crystal_id to point to the ASCII value of \n" + "the \"diffrn.crystal_id \" entry.\n" + "If the value is not ASCII, the function returns CBF_BINARY.\n" + "The value will be valid as long as the item exists and has not been \n" + "set to a new value.\n" + "The value must not be modified by the program in any way.\n" + "ARGUMENTS\n" + "handle CBF handle. crystal_id Pointer to the destination \n" + "value pointer.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_get_doublevalue", _wrap_cbf_handle_struct_get_doublevalue, METH_O, "\n" + "\n" + "Returns : double\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_doublevalue (cbf_handle handle, double *number);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_doublevalue sets *number to the value of the ASCII item at \n" + "the current column and row interpreted as a decimal floating-point \n" + "number. cbf_require_doublevalue sets *number to the value of the \n" + "ASCII item at the current column and row interpreted as a decimal \n" + "floating-point number, setting it to defaultvalue if necessary.\n" + "If the value is not ASCII, the function returns CBF_BINARY.\n" + "ARGUMENTS\n" + "handle CBF handle. number Pointer to the destination \n" + "number. defaultvalue default number value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_unit_cell", _wrap_cbf_handle_struct_get_unit_cell, METH_O, "\n" + "\n" + "Returns : Float a,Float b,Float c,Float alpha,Float beta,Float gamma\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_unit_cell (cbf_handle handle, double cell[6],\n" + " double cell_esd[6] );\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_unit_cell sets cell[0:2] to the double values of the cell \n" + "edge lengths a, b and c in Ångstroms, cell[3:5] to the double values \n" + "of the cell angles α, β and γ in degrees, cell_esd[0:2] to the \n" + "double values of the estimated strandard deviations of the cell edge \n" + "lengths a, b and c in Ångstroms, cell_esd[3:5] to the double values \n" + "of the estimated standard deviations of the the cell angles α, β \n" + "and γ in degrees.\n" + "The values returned are retrieved from the first row of the \"cell \n" + "\" category. The value of \"_cell.entry_id \" is ignored.\n" + "cell or cell_esd may be NULL.\n" + "If cell is NULL, the cell parameters are not retrieved.\n" + "If cell_esd is NULL, the cell parameter esds are not retrieved.\n" + "If the \"cell \" category is present, but some of the values are \n" + "missing, zeros are returned for the missing values.\n" + "ARGUMENTS\n" + "handle CBF handle. cell Pointer to the destination array of \n" + "6 doubles for the cell parameters. cell_esd Pointer to the \n" + "destination array of 6 doubles for the cell parameter esds.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success. No errors is \n" + "returned for missing values if the \"cell \" category exists.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_unit_cell_esd", _wrap_cbf_handle_struct_get_unit_cell_esd, METH_O, "cbf_handle_struct_get_unit_cell_esd(cbf_handle_struct self)"}, + { "cbf_handle_struct_get_axis_type", _wrap_cbf_handle_struct_get_axis_type, METH_VARARGS, "\n" + "\n" + "Returns : String\n" + "*args : String axis_id\n" + "\n" + "C prototype: int cbf_get_axis_type (cbf_handle handle, const char *axis_id,\n" + " cbf_axis_type *axis_type);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" + "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" + "axis of index ancestor_index of axis axis_id, starting with axis_id \n" + "for ancestor_index 0.\n" + "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" + "axis_id or to \". \" if there is no such ancestor. \n" + "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" + "to \". \" if there is no such equipment. \n" + "cbf_get_axis_equipment_component sets *equipment_component to the \n" + "equipment_component of axis_id or to \". \" if there is no such \n" + "equipment_component.\n" + "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" + "components of the ofset of axis_id.\n" + "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" + "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" + "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" + "is no such rotation_axis.\n" + "cbf_get_axis_setting sets *start and *increment to the corresponding \n" + "values of the axis axis_id. Any of the destination pointers may be \n" + "NULL.\n" + "cbf_get_axis_type sets axis_type to the type of axis_id.\n" + "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" + "components of the vector of axis_id.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any \n" + "value other than 0 is invalid. axis_id Axis id. \n" + "ancestor_index Integer index of the desired ancestor, starting \n" + "with 0 for the current axis_id. ancestor Pointer to \n" + "destination ancestor name pointer. depends_on Pointer to \n" + "destination depends_on name pointer. equipment Pointer to \n" + "destination equipment name pointer. equipment_component Pointer to \n" + "destination equipment_component name pointer. offset1 \n" + "Pointer to destination first offset component value. offset2 \n" + " Pointer to destination second offset component value. offset3 \n" + " Pointer to destination third offset component value. \n" + "rotation Pointer to destination rotation value. \n" + "rotation_axis Pointer to destination rotation_axisn name \n" + "pointer. start Pointer to the destination start \n" + "value. increment Pointer to the destination increment \n" + "value. type Pointer to destination axis type of type \n" + ". vector1 Pointer to destination first vector component \n" + "value. vector2 Pointer to destination second vector \n" + "component value. vector3 Pointer to destination third \n" + "vector component value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_remove_column", _wrap_cbf_handle_struct_remove_column, METH_O, "\n" + "\n" + "Returns : \n" + "*args : \n" + "\n" + "C prototype: int cbf_remove_column (cbf_handle handle);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_remove_column deletes the current column.\n" + "The current column becomes undefined.\n" + "ARGUMENTS\n" + "handle CBF handle.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_rewind_blockitem", _wrap_cbf_handle_struct_rewind_blockitem, METH_O, "\n" + "\n" + "Returns : CBF_NODETYPE\n" + "*args : \n" + "\n" + "C prototype: int cbf_rewind_blockitem (cbf_handle handle,\n" + " CBF_NODETYPE * type);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_rewind_category makes the first category in the current data \n" + "block the current category. cbf_rewind_saveframe makes the first \n" + "saveframe in the current data block the current saveframe. \n" + "cbf_rewind_blockitem makes the first blockitem (category or \n" + "saveframe) in the current data block the current blockitem. The type \n" + "of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type.\n" + "If there are no categories, saveframes or blockitems the function \n" + "returns CBF_NOTFOUND.\n" + "The current column and row become undefined.\n" + "ARGUMENTS\n" + "handle CBF handle. type CBF handle.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_value", _wrap_cbf_handle_struct_get_value, METH_O, "\n" + "\n" + "Returns : \n" + "*args : string\n" + "\n" + "C prototype: int cbf_get_value (cbf_handle handle, const char **value);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_value sets *value to point to the ASCII value of the item at \n" + "the current column and row. cbf_require_value sets *value to point to \n" + "the ASCII value of the item at the current column and row, creating \n" + "the data item if necessary and initializing it to a copy of \n" + "defaultvalue.\n" + "If the value is not ASCII, the function returns CBF_BINARY.\n" + "The value will be valid as long as the item exists and has not been \n" + "set to a new value.\n" + "The value must not be modified by the program in any way.\n" + "ARGUMENTS\n" + "handle CBF handle. value Pointer to the destination \n" + "value pointer. defaultvalue Default value character string.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_count_categories", _wrap_cbf_handle_struct_count_categories, METH_O, "\n" + "\n" + "Returns : Integer\n" + "*args : \n" + "\n" + "C prototype: int cbf_count_categories (cbf_handle handle,\n" + " unsigned int *categories);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_count_categories puts the number of categories in the current \n" + "data block in *categories.\n" + "ARGUMENTS\n" + "handle CBF handle. categories Pointer to the destination \n" + "category count.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_read_widefile", _wrap_cbf_handle_struct_read_widefile, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : String filename,Integer headers\n" + "\n" + "C prototype: int cbf_read_widefile (cbf_handle handle, FILE *file, int flags);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_read_file reads the CBF or CIF file file into the CBF object \n" + "specified by handle, using the CIF 1.0 convention of 80 character \n" + "lines. cbf_read_widefile reads the CBF or CIF file file into the CBF \n" + "object specified by handle, using the CIF 1.1 convention of 2048 \n" + "character lines. A warning is issued to stderr for ascii lines over \n" + "the limit. No test is performed on binary sections.\n" + "Validation is performed in three ways levels: during the lexical \n" + "scan, during the parse, and, if a dictionary was converted, against \n" + "the value types, value enumerations, categories and parent-child \n" + "relationships specified in the dictionary.\n" + "flags controls the interpretation of binary section headers, the \n" + "parsing of brackets constructs and the parsing of treble-quoted \n" + "strings.\n" + "MSG_DIGEST: Instructs CBFlib to check that the digest \n" + "of the binary section matches any header digest value. If the digests \n" + "do not match, the call will return CBF_FORMAT. This evaluation and \n" + "comparison is delayed (a \"lazy \" evaluation) to ensure maximal \n" + "processing efficiency. If an immediately evaluation is required, see \n" + "MSG_DIGESTNOW, below. MSG_DIGESTNOW: Instructs CBFlib to \n" + "check that the digest of the binary section matches any header \n" + "digeste value. If the digests do not match, the call will return \n" + "CBF_FORMAT. This evaluation and comparison is performed during \n" + "initial parsing of the section to ensure timely error reporting at \n" + "the expense of processing efficiency. If a more efficient delayed ( \n" + "\"lazy \") evaluation is required, see MSG_DIGEST, above. \n" + "MSG_DIGESTWARN: Instructs CBFlib to check that the digest \n" + "of the binary section matches any header digeste value. If the \n" + "digests do not match, a warning message will be sent to stderr, but \n" + "processing will attempt to continue. This evaluation and comparison \n" + "is first performed during initial parsing of the section to ensure \n" + "timely error reporting at the expense of processing efficiency. An \n" + "mismatch of the message digest usually indicates a serious error, but \n" + "it is sometimes worth continuing processing to try to isolate the \n" + "cause of the error. Use this option with caution. MSG_NODIGEST: \n" + " Do not check the digest (default). PARSE_BRACKETS: \n" + "Accept DDLm bracket-delimited [item,item,...item] or \n" + "{item,item,...item} or (item,item,...item) constructs as valid, \n" + "stripping non-quoted embedded whitespace and comments. These \n" + "constructs may span multiple lines. PARSE_LIBERAL_BRACKETS: Accept \n" + "DDLm bracket-delimited [item,item,...item] or {item,item,...item} or \n" + "(item,item,...item) constructs as valid, stripping embedded \n" + "non-quoted, non-separating whitespace and comments. These constructs \n" + "may span multiple lines. In this case, whitespace may be used as an \n" + "alternative to the comma. PARSE_TRIPLE_QUOTES: Accept DDLm \n" + "triple-quoted \" \" \"item,item,...item \" \" \" or \n" + "'''item,item,...item''' constructs as valid, stripping embedded \n" + "whitespace and comments. These constructs may span multiple lines. If \n" + "this flag is set, then ''' will not be interpreted as a quoted \n" + "apoptrophe and \" \" \" will not be interpreted as a quoted double \n" + "quote mark and PARSE_NOBRACKETS: Do not accept DDLm \n" + "bracket-delimited [item,item,...item] or {item,item,...item} or \n" + "(item,item,...item) constructs as valid, stripping non-quoted \n" + "embedded whitespace and comments. These constructs may span multiple \n" + "lines. PARSE_NOTRIPLE_QUOTES: No not accept DDLm triple-quoted \" \n" + "\" \"item,item,...item \" \" \" or '''item,item,...item''' constructs \n" + "as valid, stripping embedded whitespace and comments. These \n" + "constructs may span multiple lines. If this flag is set, then ''' \n" + "will be interpreted as a quoted apostrophe and \" \" \" will be \n" + "interpreted as a quoted double quote mark.\n" + "CBFlib defers reading binary sections as long as possible. In the \n" + "current version of CBFlib, this means that:\n" + "1. The file must be a random-access file opened in binary mode (fopen \n" + "( ,\n" + "\n" + ""}, + { "cbf_handle_struct_set_wavelength", _wrap_cbf_handle_struct_set_wavelength, METH_VARARGS, "\n" + "\n" + "Returns : double wavelength\n" + "*args : \n" + "\n" + "C prototype: int cbf_set_wavelength (cbf_handle handle, double wavelength);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_wavelength sets the current wavelength in Å to wavelength.\n" + "ARGUMENTS\n" + "handle CBF handle. wavelength Wavelength in Å.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_get_axis_vector", _wrap_cbf_handle_struct_get_axis_vector, METH_VARARGS, "\n" + "\n" + "Returns : Float vector1,Float vector2,Float vector3\n" + "*args : String axis_id\n" + "\n" + "C prototype: int cbf_get_axis_vector (cbf_handle handle, const char *axis_id,\n" + " double *vector1, double *vector2, double *vector3);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" + "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" + "axis of index ancestor_index of axis axis_id, starting with axis_id \n" + "for ancestor_index 0.\n" + "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" + "axis_id or to \". \" if there is no such ancestor. \n" + "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" + "to \". \" if there is no such equipment. \n" + "cbf_get_axis_equipment_component sets *equipment_component to the \n" + "equipment_component of axis_id or to \". \" if there is no such \n" + "equipment_component.\n" + "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" + "components of the ofset of axis_id.\n" + "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" + "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" + "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" + "is no such rotation_axis.\n" + "cbf_get_axis_setting sets *start and *increment to the corresponding \n" + "values of the axis axis_id. Any of the destination pointers may be \n" + "NULL.\n" + "cbf_get_axis_type sets axis_type to the type of axis_id.\n" + "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" + "components of the vector of axis_id.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any \n" + "value other than 0 is invalid. axis_id Axis id. \n" + "ancestor_index Integer index of the desired ancestor, starting \n" + "with 0 for the current axis_id. ancestor Pointer to \n" + "destination ancestor name pointer. depends_on Pointer to \n" + "destination depends_on name pointer. equipment Pointer to \n" + "destination equipment name pointer. equipment_component Pointer to \n" + "destination equipment_component name pointer. offset1 \n" + "Pointer to destination first offset component value. offset2 \n" + " Pointer to destination second offset component value. offset3 \n" + " Pointer to destination third offset component value. \n" + "rotation Pointer to destination rotation value. \n" + "rotation_axis Pointer to destination rotation_axisn name \n" + "pointer. start Pointer to the destination start \n" + "value. increment Pointer to the destination increment \n" + "value. type Pointer to destination axis type of type \n" + ". vector1 Pointer to destination first vector component \n" + "value. vector2 Pointer to destination second vector \n" + "component value. vector3 Pointer to destination third \n" + "vector component value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_set_pixel_size_sf", _wrap_cbf_handle_struct_set_pixel_size_sf, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : Int element_number,Int axis_number,Float pixel size\n" + "\n" + "C prototype: int cbf_set_pixel_size_sf(cbf_handle handle,\n" + " unsigned int element_number, int axis_number,\n" + " double psize);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the \n" + "\"size \" column of the \"array_structure_list \" category at the \n" + "row which matches axis axis_number of the detector element \n" + "element_number converting the double pixel size psize from meters to \n" + "millimeters in storing it in the \"size \" column for the axis \n" + "axis_number of the detector element element_number. The axis_number \n" + "is numbered from 1, starting with the slowest axis. \n" + "cbf_set_pixel_size_fs sets the item in the \"size \" column of the \n" + "\"array_structure_list \" category at the row which matches axis \n" + "axis_number of the detector element element_number converting the \n" + "double pixel size psize from meters to millimeters in storing it in \n" + "the \"size \" column for the axis axis_number of the detector \n" + "element element_number. The axis_number is numbered from 1, starting \n" + "with the fastest axis.\n" + "If a negative axis number is given, the order of axes is reversed, so \n" + "that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the \n" + "fastest axis for cbf_get_pixel_size_sf.\n" + "If the \"array_structure_list \" category does not already exist, it \n" + "is created.\n" + "If the appropriate row in the \"array_structure_list \" catgeory \n" + "does not already exist, it is created.\n" + "If the pixel size is not given explcitly in the \"array_element_size \n" + "category \", the function returns CBF_NOTFOUND.\n" + "ARGUMENTS\n" + "handle CBF handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. axis_number The number of the \n" + "axis, fastest first, starting from 1.\n" + "\n" + ""}, + { "cbf_handle_struct_get_diffrn_id", _wrap_cbf_handle_struct_get_diffrn_id, METH_O, "\n" + "\n" + "Returns : \n" + "*args : string\n" + "\n" + "C prototype: int cbf_get_diffrn_id (cbf_handle handle,\n" + " const char **diffrn_id);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_diffrn_id sets *diffrn_id to point to the ASCII value of the \n" + "\"diffrn.id \" entry. cbf_require_diffrn_id also sets *diffrn_id to \n" + "point to the ASCII value of the \"diffrn.id \" entry, but, if the \n" + "\"diffrn.id \" entry does not exist, it sets the value in the CBF and \n" + "in*diffrn_id to the character string given by default_id, creating \n" + "the category and column is necessary.\n" + "The diffrn_id will be valid as long as the item exists and has not \n" + "been set to a new value.\n" + "The diffrn_id must not be modified by the program in any way.\n" + "ARGUMENTS\n" + "handle CBF handle. diffrn_id Pointer to the destination \n" + "value pointer. default_id Character string default value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_get_axis_rotation", _wrap_cbf_handle_struct_get_axis_rotation, METH_VARARGS, "\n" + "\n" + "Returns : Float\n" + "*args : String axis_id\n" + "\n" + "C prototype: int cbf_get_axis_rotation (cbf_handle handle,\n" + " const char *axis_id, double *rotation);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" + "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" + "axis of index ancestor_index of axis axis_id, starting with axis_id \n" + "for ancestor_index 0.\n" + "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" + "axis_id or to \". \" if there is no such ancestor. \n" + "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" + "to \". \" if there is no such equipment. \n" + "cbf_get_axis_equipment_component sets *equipment_component to the \n" + "equipment_component of axis_id or to \". \" if there is no such \n" + "equipment_component.\n" + "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" + "components of the ofset of axis_id.\n" + "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" + "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" + "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" + "is no such rotation_axis.\n" + "cbf_get_axis_setting sets *start and *increment to the corresponding \n" + "values of the axis axis_id. Any of the destination pointers may be \n" + "NULL.\n" + "cbf_get_axis_type sets axis_type to the type of axis_id.\n" + "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" + "components of the vector of axis_id.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any \n" + "value other than 0 is invalid. axis_id Axis id. \n" + "ancestor_index Integer index of the desired ancestor, starting \n" + "with 0 for the current axis_id. ancestor Pointer to \n" + "destination ancestor name pointer. depends_on Pointer to \n" + "destination depends_on name pointer. equipment Pointer to \n" + "destination equipment name pointer. equipment_component Pointer to \n" + "destination equipment_component name pointer. offset1 \n" + "Pointer to destination first offset component value. offset2 \n" + " Pointer to destination second offset component value. offset3 \n" + " Pointer to destination third offset component value. \n" + "rotation Pointer to destination rotation value. \n" + "rotation_axis Pointer to destination rotation_axisn name \n" + "pointer. start Pointer to the destination start \n" + "value. increment Pointer to the destination increment \n" + "value. type Pointer to destination axis type of type \n" + ". vector1 Pointer to destination first vector component \n" + "value. vector2 Pointer to destination second vector \n" + "component value. vector3 Pointer to destination third \n" + "vector component value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_find_datablock", _wrap_cbf_handle_struct_find_datablock, METH_VARARGS, "\n" + "\n" + "Returns : string\n" + "*args : \n" + "\n" + "C prototype: int cbf_find_datablock (cbf_handle handle,\n" + " const char *datablockname);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_find_datablock makes the data block with name datablockname the \n" + "current data block.\n" + "The comparison is case-insensitive.\n" + "If the data block does not exist, the function returns CBF_NOTFOUND.\n" + "The current category becomes undefined.\n" + "ARGUMENTS\n" + "handle CBF handle. datablockname The name of the data \n" + "block to find.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_polarization", _wrap_cbf_handle_struct_get_polarization, METH_O, "\n" + "\n" + "Returns : float polarizn_source_ratio,float polarizn_source_norm\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_polarization (cbf_handle handle,\n" + " double *polarizn_source_ratio,\n" + " double *polarizn_source_norm);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_polarization sets *polarizn_source_ratio and \n" + "*polarizn_source_norm to the corresponding source polarization \n" + "parameters.\n" + "Either destination pointer may be NULL.\n" + "ARGUMENTS\n" + "handle CBF handle. polarizn_source_ratio Pointer \n" + "to the destination polarizn_source_ratio. polarizn_source_norm \n" + "Pointer to the destination polarizn_source_norm.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_select_category", _wrap_cbf_handle_struct_select_category, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : Integer\n" + "\n" + "C prototype: int cbf_select_category (cbf_handle handle,\n" + " unsigned int category);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_select_category selects category number category in the current \n" + "data block as the current category.\n" + "The first category is number 0.\n" + "The current column and row become undefined.\n" + "If the category does not exist, the function returns CBF_NOTFOUND.\n" + "ARGUMENTS\n" + "handle CBF handle. category Number of the category to select.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_pixel_size_fs", _wrap_cbf_handle_struct_get_pixel_size_fs, METH_VARARGS, "\n" + "\n" + "Returns : Float pixel_size\n" + "*args : Int element_number,Int axis_number\n" + "\n" + "C prototype: int cbf_get_pixel_size_fs(cbf_handle handle,\n" + " unsigned int element_number, int axis_number,\n" + " double *psize);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to \n" + "the double value in millimeters of the axis axis_number of the \n" + "detector element element_number. The axis_number is numbered from 1, \n" + "starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to \n" + "point to the double value in millimeters of the axis axis_number of \n" + "the detector element element_number. The axis_number is numbered from \n" + "1, starting with the fastest axis.\n" + "If a negative axis number is given, the order of axes is reversed, so \n" + "that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the \n" + "fastest axis for cbf_get_pixel_size_sf.\n" + "If the pixel size is not given explcitly in the \"array_element_size \n" + "\" category, the function returns CBF_NOTFOUND.\n" + "ARGUMENTS\n" + "handle CBF handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. axis_number The number of the \n" + "axis, starting from 1 for the fastest for cbf_get_pixel_size and \n" + "cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. \n" + "psize Pointer to the destination pixel size.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_get_axis_poise", _wrap_cbf_handle_struct_get_axis_poise, METH_VARARGS, "\n" + "\n" + "Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2,\n" + " Float offset3,Float angle\n" + "*args : Float ratio,String axis_id,String frame_id\n" + "\n" + "C prototype: int cbf_get_axis_poise(cbf_handle handle, double ratio,\n" + " double * vector1, double * vector2, double * vector3,\n" + " double * offset1, double * offset2, double * offset3,\n" + " double * angle, const char * axis_id,\n" + " const char * frame_id);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_axis_poise sets vector1, vector2, vector3 to point to the \n" + "components of the axis vector for axis axis_id, offset1, offset2, \n" + "offset3 to point to the components of the axis base offset vector for \n" + "axis axis_id, and angle to point to the angle of rotation of axis \n" + "axis_id after application of the axis settings for frame frame_id, \n" + "using ratio, a value between 0 and 1, indicating how far into the \n" + "internal motion in the frame to go. If frame_id is the string \". \n" + "\", the first frame found is used. If there is more than one frame, \n" + "which frame will be found is indeterminate. If frame_id is NULL, the \n" + "overall setting for the scan are used, rather than those for any \n" + "particular frame. The vector and offset reported are the reference \n" + "vector and offset of the axis axis_id transformed by application of \n" + "all motions of the axes on which axis_id depends.\n" + "cbf_get_goniometer_poise vector1, vector2, vector3 to point to the \n" + "components of the axis vector for the goniometer axis, offset1, \n" + "offset2, offset3 to point to the components of the axis base offset \n" + "vector for the goniometer axis, and angle to point to the angle of \n" + "rotation of the goniometer axis after application of all axis \n" + "settings in the goniometer deriving the vector, offset and angle from \n" + "the resulting matrix. Calculation of the vector is indeterminate if \n" + "the angle is zero.\n" + "cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point \n" + "to the components of the axis vector for axis axis_id, offset1, \n" + "offset2, offset3 to point to the components of the axis base offset \n" + "vector for axis axis_id unmodified by axis rotations. Any of the \n" + "pointers may be specified as NULL.\n" + "ARGUMENTS\n" + "handle CBF handle. ratio A number between 0 and 1 \n" + "indication how far into the frame to go vector1 Pointer to the \n" + "first component of the axis vector vector2 Pointer to the second \n" + "component of the axis vector vector3 Pointer to the third \n" + "component of the axis vector offset1 Pointer to the first \n" + "component of the axis offset offset2 Pointer to the second \n" + "component of the axis offset offset3 Pointer to the third \n" + "component of the axis offset angle Pointer to the rotation \n" + "angle axis_id The specified axis frame_id The specified \n" + "frame positioner CBF goniometer\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_read_file", _wrap_cbf_handle_struct_read_file, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : String filename,Integer headers\n" + "\n" + "C prototype: int cbf_read_file (cbf_handle handle, FILE *file, int flags);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_read_file reads the CBF or CIF file file into the CBF object \n" + "specified by handle, using the CIF 1.0 convention of 80 character \n" + "lines. cbf_read_widefile reads the CBF or CIF file file into the CBF \n" + "object specified by handle, using the CIF 1.1 convention of 2048 \n" + "character lines. A warning is issued to stderr for ascii lines over \n" + "the limit. No test is performed on binary sections.\n" + "Validation is performed in three ways levels: during the lexical \n" + "scan, during the parse, and, if a dictionary was converted, against \n" + "the value types, value enumerations, categories and parent-child \n" + "relationships specified in the dictionary.\n" + "flags controls the interpretation of binary section headers, the \n" + "parsing of brackets constructs and the parsing of treble-quoted \n" + "strings.\n" + "MSG_DIGEST: Instructs CBFlib to check that the digest \n" + "of the binary section matches any header digest value. If the digests \n" + "do not match, the call will return CBF_FORMAT. This evaluation and \n" + "comparison is delayed (a \"lazy \" evaluation) to ensure maximal \n" + "processing efficiency. If an immediately evaluation is required, see \n" + "MSG_DIGESTNOW, below. MSG_DIGESTNOW: Instructs CBFlib to \n" + "check that the digest of the binary section matches any header \n" + "digeste value. If the digests do not match, the call will return \n" + "CBF_FORMAT. This evaluation and comparison is performed during \n" + "initial parsing of the section to ensure timely error reporting at \n" + "the expense of processing efficiency. If a more efficient delayed ( \n" + "\"lazy \") evaluation is required, see MSG_DIGEST, above. \n" + "MSG_DIGESTWARN: Instructs CBFlib to check that the digest \n" + "of the binary section matches any header digeste value. If the \n" + "digests do not match, a warning message will be sent to stderr, but \n" + "processing will attempt to continue. This evaluation and comparison \n" + "is first performed during initial parsing of the section to ensure \n" + "timely error reporting at the expense of processing efficiency. An \n" + "mismatch of the message digest usually indicates a serious error, but \n" + "it is sometimes worth continuing processing to try to isolate the \n" + "cause of the error. Use this option with caution. MSG_NODIGEST: \n" + " Do not check the digest (default). PARSE_BRACKETS: \n" + "Accept DDLm bracket-delimited [item,item,...item] or \n" + "{item,item,...item} or (item,item,...item) constructs as valid, \n" + "stripping non-quoted embedded whitespace and comments. These \n" + "constructs may span multiple lines. PARSE_LIBERAL_BRACKETS: Accept \n" + "DDLm bracket-delimited [item,item,...item] or {item,item,...item} or \n" + "(item,item,...item) constructs as valid, stripping embedded \n" + "non-quoted, non-separating whitespace and comments. These constructs \n" + "may span multiple lines. In this case, whitespace may be used as an \n" + "alternative to the comma. PARSE_TRIPLE_QUOTES: Accept DDLm \n" + "triple-quoted \" \" \"item,item,...item \" \" \" or \n" + "'''item,item,...item''' constructs as valid, stripping embedded \n" + "whitespace and comments. These constructs may span multiple lines. If \n" + "this flag is set, then ''' will not be interpreted as a quoted \n" + "apoptrophe and \" \" \" will not be interpreted as a quoted double \n" + "quote mark and PARSE_NOBRACKETS: Do not accept DDLm \n" + "bracket-delimited [item,item,...item] or {item,item,...item} or \n" + "(item,item,...item) constructs as valid, stripping non-quoted \n" + "embedded whitespace and comments. These constructs may span multiple \n" + "lines. PARSE_NOTRIPLE_QUOTES: No not accept DDLm triple-quoted \" \n" + "\" \"item,item,...item \" \" \" or '''item,item,...item''' constructs \n" + "as valid, stripping embedded whitespace and comments. These \n" + "constructs may span multiple lines. If this flag is set, then ''' \n" + "will be interpreted as a quoted apostrophe and \" \" \" will be \n" + "interpreted as a quoted double quote mark.\n" + "CBFlib defers reading binary sections as long as possible. In the \n" + "current version of CBFlib, this means that:\n" + "1. The file must be a random-access file opened in binary mode (fopen \n" + "( ,\n" + "\n" + ""}, + { "cbf_handle_struct_datablock_name", _wrap_cbf_handle_struct_datablock_name, METH_O, "\n" + "\n" + "Returns : \n" + "*args : string\n" + "\n" + "C prototype: int cbf_datablock_name (cbf_handle handle,\n" + " const char **datablockname);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_datablock_name sets *datablockname to point to the name of the \n" + "current data block.\n" + "The data block name will be valid as long as the data block exists \n" + "and has not been renamed.\n" + "The name must not be modified by the program in any way.\n" + "ARGUMENTS\n" + "handle CBF handle. datablockname Pointer to the \n" + "destination data block name pointer.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_realarray_wdims", _wrap_cbf_handle_struct_set_realarray_wdims, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : int compression,int binary_id,(binary) String data,int elsize,\n" + " int elements,String byteorder,int dimfast,int dimmid,int dimslow,\n" + " int padding\n" + "\n" + "C prototype: int cbf_set_realarray_wdims (cbf_handle handle,\n" + " unsigned int compression, int binary_id, void *array,\n" + " size_t elsize, size_t elements, const char *byteorder,\n" + " size_t dimfast, size_t dimmid, size_t dimslow,\n" + " size_t padding);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_integerarray sets the binary value of the item at the current \n" + "column and row to an integer array. The array consists of elements \n" + "elements of elsize bytes each, starting at array. The elements are \n" + "signed if elsigned is non-0 and unsigned otherwise. binary_id is the \n" + "binary section identifier. cbf_set_realarray sets the binary value of \n" + "the item at the current column and row to an integer array. The array \n" + "consists of elements elements of elsize bytes each, starting at \n" + "array. binary_id is the binary section identifier.\n" + "The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, \n" + "cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, \n" + "cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants \n" + "allow the data header values of byteorder, dimfast, dimmid, dimslow \n" + "and padding to be set to the data byte order, the fastest, second \n" + "fastest and third fastest array dimensions and the size in byte of \n" + "the post data padding to be used.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + " Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression. \n" + "NOTE: This scheme is by far the slowest of the four and uses much \n" + "more disk space. It is intended for routine use with small arrays \n" + "only. With large arrays (like images) it should be used only for \n" + "debugging.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or \n" + "floats for cbf_set_realarray. If elsize is not equal to sizeof \n" + "(char), sizeof (short) or sizeof (int), the function returns \n" + "CBF_ARGUMENT.\n" + "ARGUMENTS\n" + "handle CBF handle. compression Compression method to use. \n" + "binary_id Integer binary identifier. array Pointer to the \n" + "source array. elsize Size in bytes of each source array \n" + "element. elsigned Set to non-0 if the source array elements are \n" + "signed. elements The number of elements in the array\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_construct_reference_detector", _wrap_cbf_handle_struct_construct_reference_detector, METH_VARARGS, "\n" + "\n" + "Returns : pycbf detector object\n" + "*args : Integer element_number\n" + "\n" + "C prototype: int cbf_construct_reference_detector (cbf_handle handle,\n" + " cbf_detector *detector, unsigned int element_number);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_construct_detector constructs a detector object for detector \n" + "element number element_number using the description in the CBF object \n" + "handle and initialises the detector handle *detector.\n" + "cbf_construct_reference_detector constructs a detector object for \n" + "detector element number element_number using the description in the \n" + "CBF object handle and initialises the detector handle *detector using \n" + "the reference settings of the axes. cbf_require_reference_detector is \n" + "similar, but try to force the creations of missing intermediate \n" + "categories needed to construct a detector object.\n" + "ARGUMENTS\n" + "handle CBF handle. detector Pointer to the \n" + "destination detector handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_get_real_3d_image_fs_as_string", _wrap_cbf_handle_struct_get_real_3d_image_fs_as_string, METH_VARARGS, "\n" + "\n" + "Returns : (Binary)String\n" + "*args : int element_number,int elsize,int ndimfast,int ndimmid,int ndimslow\n" + "\n" + "C prototype: int cbf_get_real_3d_image_fs (cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " void *array, size_t elsize, size_t ndimfast,\n" + " size_t ndimmid, size_t ndimslow);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" + "array for element number element_number into an array. The array \n" + "consists of ndimslow×ndimfast elements of elsize bytes each, \n" + "starting at array. The elements are signed if elsign is non-0 and \n" + "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" + "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" + "for element number element_number into an array. A real array is \n" + "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" + "cbf_get_3d_image_sf read the 3D image array for element number \n" + "element_number into an array. The array consists of \n" + "ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting \n" + "at array. The elements are signed if elsign is non-0 and unsigned \n" + "otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" + "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" + "floats for element number element_number into an array. A real array \n" + "is always signed.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "The structure of the array as a 1-, 2- or 3-dimensional array should \n" + "agree with the structure of the array given in the \n" + "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" + "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" + "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" + "being processed. If the array is 2-dimensional and a 3D call is used, \n" + "ndimslow and ndimmid should be the\n" + "\n" + ""}, + { "cbf_handle_struct_rewind_row", _wrap_cbf_handle_struct_rewind_row, METH_O, "\n" + "\n" + "Returns : \n" + "*args : \n" + "\n" + "C prototype: int cbf_rewind_row (cbf_handle handle);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_rewind_row makes the first row in the current category the \n" + "current row.\n" + "If there are no rows, the function returns CBF_NOTFOUND.\n" + "The current column is not affected.\n" + "ARGUMENTS\n" + "handle CBF handle.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_axis_setting", _wrap_cbf_handle_struct_get_axis_setting, METH_VARARGS, "\n" + "\n" + "Returns : Float start,Float increment\n" + "*args : String axis_id\n" + "\n" + "C prototype: int cbf_get_axis_setting (cbf_handle handle,\n" + " unsigned int reserved, const char *axis_id, double *start,\n" + " double *increment);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" + "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" + "axis of index ancestor_index of axis axis_id, starting with axis_id \n" + "for ancestor_index 0.\n" + "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" + "axis_id or to \". \" if there is no such ancestor. \n" + "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" + "to \". \" if there is no such equipment. \n" + "cbf_get_axis_equipment_component sets *equipment_component to the \n" + "equipment_component of axis_id or to \". \" if there is no such \n" + "equipment_component.\n" + "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" + "components of the ofset of axis_id.\n" + "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" + "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" + "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" + "is no such rotation_axis.\n" + "cbf_get_axis_setting sets *start and *increment to the corresponding \n" + "values of the axis axis_id. Any of the destination pointers may be \n" + "NULL.\n" + "cbf_get_axis_type sets axis_type to the type of axis_id.\n" + "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" + "components of the vector of axis_id.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any \n" + "value other than 0 is invalid. axis_id Axis id. \n" + "ancestor_index Integer index of the desired ancestor, starting \n" + "with 0 for the current axis_id. ancestor Pointer to \n" + "destination ancestor name pointer. depends_on Pointer to \n" + "destination depends_on name pointer. equipment Pointer to \n" + "destination equipment name pointer. equipment_component Pointer to \n" + "destination equipment_component name pointer. offset1 \n" + "Pointer to destination first offset component value. offset2 \n" + " Pointer to destination second offset component value. offset3 \n" + " Pointer to destination third offset component value. \n" + "rotation Pointer to destination rotation value. \n" + "rotation_axis Pointer to destination rotation_axisn name \n" + "pointer. start Pointer to the destination start \n" + "value. increment Pointer to the destination increment \n" + "value. type Pointer to destination axis type of type \n" + ". vector1 Pointer to destination first vector component \n" + "value. vector2 Pointer to destination second vector \n" + "component value. vector3 Pointer to destination third \n" + "vector component value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_require_column", _wrap_cbf_handle_struct_require_column, METH_VARARGS, "\n" + "\n" + "Returns : string\n" + "*args : \n" + "\n" + "C prototype: int cbf_require_column (cbf_handle handle,\n" + " const char *columnname);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_require_column makes the columns in the current category with \n" + "name columnname the current column, if it exists, or creates it if it \n" + "does not.\n" + "The comparison is case-insensitive.\n" + "The current row is not affected.\n" + "ARGUMENTS\n" + "handle CBF handle. columnname The name of column to find.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_timestamp", _wrap_cbf_handle_struct_get_timestamp, METH_O, "\n" + "\n" + "Returns : Float time,Integer timezone\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_timestamp (cbf_handle handle, unsigned int reserved,\n" + " double *time, int *timezone);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_timestamp sets *time to the collection timestamp in seconds \n" + "since January 1 1970. *timezone is set to timezone difference from \n" + "UTC in minutes. The parameter reserved is presently unused and should \n" + "be set to 0.\n" + "Either of the destination pointers may be NULL.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any value other than 0 is \n" + "invalid. time Pointer to the destination collection timestamp. \n" + "timezone Pointer to the destination timezone difference.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_find_nextrow", _wrap_cbf_handle_struct_find_nextrow, METH_VARARGS, "\n" + "\n" + "Returns : string\n" + "*args : \n" + "\n" + "C prototype: int cbf_find_nextrow (cbf_handle handle, const char *value);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_find_nextrow makes the makes the next row in the current column \n" + "with value value the current row. The search starts from the row \n" + "following the last row found with cbf_find_row or cbf_find_nextrow, \n" + "or from the current row if the current row was defined using any \n" + "other function.\n" + "The comparison is case-sensitive.\n" + "If no more matching rows exist, the function returns CBF_NOTFOUND.\n" + "The current column is not affected.\n" + "ARGUMENTS\n" + "handle CBF handle. value the value to search for.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_axis_equipment_component", _wrap_cbf_handle_struct_get_axis_equipment_component, METH_VARARGS, "\n" + "\n" + "Returns : String\n" + "*args : String axis_id\n" + "\n" + "C prototype: int cbf_get_axis_equipment_component (cbf_handle handle,\n" + " const char *axis_id, const char * *equipment_component);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" + "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" + "axis of index ancestor_index of axis axis_id, starting with axis_id \n" + "for ancestor_index 0.\n" + "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" + "axis_id or to \". \" if there is no such ancestor. \n" + "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" + "to \". \" if there is no such equipment. \n" + "cbf_get_axis_equipment_component sets *equipment_component to the \n" + "equipment_component of axis_id or to \". \" if there is no such \n" + "equipment_component.\n" + "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" + "components of the ofset of axis_id.\n" + "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" + "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" + "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" + "is no such rotation_axis.\n" + "cbf_get_axis_setting sets *start and *increment to the corresponding \n" + "values of the axis axis_id. Any of the destination pointers may be \n" + "NULL.\n" + "cbf_get_axis_type sets axis_type to the type of axis_id.\n" + "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" + "components of the vector of axis_id.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any \n" + "value other than 0 is invalid. axis_id Axis id. \n" + "ancestor_index Integer index of the desired ancestor, starting \n" + "with 0 for the current axis_id. ancestor Pointer to \n" + "destination ancestor name pointer. depends_on Pointer to \n" + "destination depends_on name pointer. equipment Pointer to \n" + "destination equipment name pointer. equipment_component Pointer to \n" + "destination equipment_component name pointer. offset1 \n" + "Pointer to destination first offset component value. offset2 \n" + " Pointer to destination second offset component value. offset3 \n" + " Pointer to destination third offset component value. \n" + "rotation Pointer to destination rotation value. \n" + "rotation_axis Pointer to destination rotation_axisn name \n" + "pointer. start Pointer to the destination start \n" + "value. increment Pointer to the destination increment \n" + "value. type Pointer to destination axis type of type \n" + ". vector1 Pointer to destination first vector component \n" + "value. vector2 Pointer to destination second vector \n" + "component value. vector3 Pointer to destination third \n" + "vector component value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_get_realarrayparameters_wdims_sf", _wrap_cbf_handle_struct_get_realarrayparameters_wdims_sf, METH_O, "\n" + "\n" + "Returns : int compression,int binary_id,int elsize,int elements,char **bo,\n" + " int *bolen,int dimslow,int dimmid,int dimfast,int padding\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_realarrayparameters_wdims_sf (cbf_handle handle,\n" + " unsigned int *compression, int *binary_id, size_t *elsize,\n" + " size_t *elements, const char **byteorder, size_t *dimslow,\n" + " size_t *dimmid, size_t *dimfast, size_t *padding);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_integerarrayparameters sets *compression, *binary_id, \n" + "*elsize, *elsigned, *elunsigned, *elements, *minelement and \n" + "*maxelement to values read from the binary value of the item at the \n" + "current column and row. This provides all the arguments needed for a \n" + "subsequent call to cbf_set_integerarray, if a copy of the array is to \n" + "be made into another CIF or CBF. cbf_get_realarrayparameters sets \n" + "*compression, *binary_id, *elsize, *elements to values read from the \n" + "binary value of the item at the current column and row. This provides \n" + "all the arguments needed for a subsequent call to cbf_set_realarray, \n" + "if a copy of the arry is to be made into another CIF or CBF.\n" + "The variants cbf_get_integerarrayparameters_wdims, \n" + "cbf_get_integerarrayparameters_wdims_fs, \n" + "cbf_get_integerarrayparameters_wdims_sf, \n" + "cbf_get_realarrayparameters_wdims, \n" + "cbf_get_realarrayparameters_wdims_fs, \n" + "cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, \n" + "*dimmid, *dimslow, and *padding as well, providing the additional \n" + "parameters needed for a subsequent call to cbf_set_integerarray_wdims \n" + "or cbf_set_realarray_wdims.\n" + "The value returned in *byteorder is a pointer either to the string \n" + "\"little_endian \" or to the string \"big_endian \". This should be \n" + "the byte order of the data, not necessarily of the host machine. No \n" + "attempt should be made to modify this string. At this time only \n" + "\"little_endian \" will be returned.\n" + "The values returned in *dimfast, *dimmid and *dimslow are the sizes \n" + "of the fastest changing, second fastest changing and third fastest \n" + "changing dimensions of the array, if specified, or zero, if not \n" + "specified.\n" + "The value returned in *padding is the size of the post-data padding, \n" + "if any and if specified in the data header. The value is given as a \n" + "count of octets.\n" + "If the value is not binary, the function returns CBF_ASCII.\n" + "ARGUMENTS\n" + "handle CBF handle. compression Compression method used. \n" + "elsize Size in bytes of each array element. binary_id \n" + "Pointer to the destination integer binary identifier. elsigned \n" + "Pointer to an integer. Set to 1 if the elements can be read as signed \n" + "integers. elunsigned Pointer to an integer. Set to 1 if the \n" + "elements can be read as unsigned integers. elements Pointer to \n" + "the destination number of elements. minelement Pointer to the \n" + "destination smallest element. maxelement Pointer to the \n" + "destination largest element. byteorder Pointer to the destination \n" + "byte order. dimfast Pointer to the destination fastest \n" + "dimension. dimmid Pointer to the destination second fastest \n" + "dimension. dimslow Pointer to the destination third fastest \n" + "dimension. padding Pointer to the destination padding size.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_reset_datablock", _wrap_cbf_handle_struct_reset_datablock, METH_O, "\n" + "\n" + "Returns : \n" + "*args : \n" + "\n" + "C prototype: int cbf_reset_datablock (cbf_handle handle);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_reset_datablock deletes all categories from the current data \n" + "block. cbf_reset_saveframe deletes all categories from the current \n" + "save frame.\n" + "ARGUMENTS\n" + "handle CBF handle.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_3d_image_fs", _wrap_cbf_handle_struct_set_3d_image_fs, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : int element_number,int compression,(binary) String data,int elsize,\n" + " int elsign,int dimfast,int dimmid,int dimslow\n" + "\n" + "C prototype: int cbf_set_3d_image_fs(cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, unsigned int compression,\n" + " void *array, size_t elsize, int elsign, size_t ndimfast,\n" + " size_t ndimmid, size_t ndimslow);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" + "array for element number element_number. The array consists of \n" + "ndimfast×ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-zero and unsigned otherwise. \n" + "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" + "write the image array for element number element_number. The array \n" + "consists of ndimfast×ndimslow IEEE double or float elements of \n" + "elsize bytes each, starting at array. cbf_set_3d_image, \n" + "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" + "for element number element_number. The array consists of \n" + "ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting \n" + "at array. The elements are signed if elsign is non-0 and unsigned \n" + "otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" + "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" + "element_number. The array consists of ndimfast×ndimmid×ndimslow \n" + "IEEE double or float elements of elsize bytes each, starting at \n" + "array.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "If the array is 1-dimensional, ndimslow should be the array size and \n" + "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" + "array is 2-dimensional and the 3D calls are used, ndimslow and \n" + "ndimmid should be used for the array dimensions and ndimfast should \n" + "be set to 1.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" + "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" + "(int), sizeof(double) or sizeof(float), the function returns \n" + "CBF_ARGUMENT.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any value other \n" + "than 0 is invalid. element_number The number of the detector \n" + "element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. compression Compression type. \n" + "array Pointer to the image array. elsize Size in \n" + "bytes of each image array element. elsigned Set to non-0 if \n" + "the image array elements are signed. ndimslow Slowest array \n" + "dimension. ndimmid Second slowest array dimension. ndimfast \n" + " Fastest array dimension.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_set_saveframename", _wrap_cbf_handle_struct_set_saveframename, METH_VARARGS, "\n" + "\n" + "Returns : string\n" + "*args : \n" + "\n" + "C prototype: int cbf_set_saveframename (cbf_handle handle,\n" + " const char *saveframename);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_datablockname changes the name of the current data block to \n" + "datablockname. cbf_set_saveframename changes the name of the current \n" + "save frame to saveframename.\n" + "If a data block or save frame with this name already exists \n" + "(comparison is case-insensitive), the function returns CBF_IDENTICAL.\n" + "ARGUMENTS\n" + "handle CBF handle. datablockname The new data block name. \n" + "saveframename The new save frame name.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_require_integervalue", _wrap_cbf_handle_struct_require_integervalue, METH_VARARGS, "\n" + "\n" + "Returns : Int number\n" + "*args : Int thedefault\n" + "\n" + "C prototype: int cbf_require_integervalue (cbf_handle handle, int *number,\n" + " int defaultvalue);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_integervalue sets *number to the value of the ASCII item at \n" + "the current column and row interpreted as a decimal integer. \n" + "cbf_require_integervalue sets *number to the value of the ASCII item \n" + "at the current column and row interpreted as a decimal integer, \n" + "setting it to defaultvalue if necessary.\n" + "If the value is not ASCII, the function returns CBF_BINARY.\n" + "ARGUMENTS\n" + "handle CBF handle. number pointer to the number. \n" + "defaultvalue default number value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_integerarrayparameters", _wrap_cbf_handle_struct_get_integerarrayparameters, METH_O, "\n" + "\n" + "Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned,\n" + " int elements,int minelement,int maxelement\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_integerarrayparameters (cbf_handle handle,\n" + " unsigned int *compression, int *binary_id, size_t *elsize,\n" + " int *elsigned, int *elunsigned, size_t *elements,\n" + " int *minelement, int *maxelement);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_integerarrayparameters sets *compression, *binary_id, \n" + "*elsize, *elsigned, *elunsigned, *elements, *minelement and \n" + "*maxelement to values read from the binary value of the item at the \n" + "current column and row. This provides all the arguments needed for a \n" + "subsequent call to cbf_set_integerarray, if a copy of the array is to \n" + "be made into another CIF or CBF. cbf_get_realarrayparameters sets \n" + "*compression, *binary_id, *elsize, *elements to values read from the \n" + "binary value of the item at the current column and row. This provides \n" + "all the arguments needed for a subsequent call to cbf_set_realarray, \n" + "if a copy of the arry is to be made into another CIF or CBF.\n" + "The variants cbf_get_integerarrayparameters_wdims, \n" + "cbf_get_integerarrayparameters_wdims_fs, \n" + "cbf_get_integerarrayparameters_wdims_sf, \n" + "cbf_get_realarrayparameters_wdims, \n" + "cbf_get_realarrayparameters_wdims_fs, \n" + "cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, \n" + "*dimmid, *dimslow, and *padding as well, providing the additional \n" + "parameters needed for a subsequent call to cbf_set_integerarray_wdims \n" + "or cbf_set_realarray_wdims.\n" + "The value returned in *byteorder is a pointer either to the string \n" + "\"little_endian \" or to the string \"big_endian \". This should be \n" + "the byte order of the data, not necessarily of the host machine. No \n" + "attempt should be made to modify this string. At this time only \n" + "\"little_endian \" will be returned.\n" + "The values returned in *dimfast, *dimmid and *dimslow are the sizes \n" + "of the fastest changing, second fastest changing and third fastest \n" + "changing dimensions of the array, if specified, or zero, if not \n" + "specified.\n" + "The value returned in *padding is the size of the post-data padding, \n" + "if any and if specified in the data header. The value is given as a \n" + "count of octets.\n" + "If the value is not binary, the function returns CBF_ASCII.\n" + "ARGUMENTS\n" + "handle CBF handle. compression Compression method used. \n" + "elsize Size in bytes of each array element. binary_id \n" + "Pointer to the destination integer binary identifier. elsigned \n" + "Pointer to an integer. Set to 1 if the elements can be read as signed \n" + "integers. elunsigned Pointer to an integer. Set to 1 if the \n" + "elements can be read as unsigned integers. elements Pointer to \n" + "the destination number of elements. minelement Pointer to the \n" + "destination smallest element. maxelement Pointer to the \n" + "destination largest element. byteorder Pointer to the destination \n" + "byte order. dimfast Pointer to the destination fastest \n" + "dimension. dimmid Pointer to the destination second fastest \n" + "dimension. dimslow Pointer to the destination third fastest \n" + "dimension. padding Pointer to the destination padding size.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_real_3d_image_sf", _wrap_cbf_handle_struct_set_real_3d_image_sf, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : int element_number,int compression,(binary) String data,int elsize,\n" + " int dimslow,int dimmid,int dimfast\n" + "\n" + "C prototype: int cbf_set_real_3d_image_sf(cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " unsigned int compression, void *array,size_t elsize,\n" + " size_t ndimslow, size_t ndimmid, size_t ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" + "array for element number element_number. The array consists of \n" + "ndimfast×ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-zero and unsigned otherwise. \n" + "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" + "write the image array for element number element_number. The array \n" + "consists of ndimfast×ndimslow IEEE double or float elements of \n" + "elsize bytes each, starting at array. cbf_set_3d_image, \n" + "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" + "for element number element_number. The array consists of \n" + "ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting \n" + "at array. The elements are signed if elsign is non-0 and unsigned \n" + "otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" + "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" + "element_number. The array consists of ndimfast×ndimmid×ndimslow \n" + "IEEE double or float elements of elsize bytes each, starting at \n" + "array.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "If the array is 1-dimensional, ndimslow should be the array size and \n" + "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" + "array is 2-dimensional and the 3D calls are used, ndimslow and \n" + "ndimmid should be used for the array dimensions and ndimfast should \n" + "be set to 1.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" + "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" + "(int), sizeof(double) or sizeof(float), the function returns \n" + "CBF_ARGUMENT.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any value other \n" + "than 0 is invalid. element_number The number of the detector \n" + "element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. compression Compression type. \n" + "array Pointer to the image array. elsize Size in \n" + "bytes of each image array element. elsigned Set to non-0 if \n" + "the image array elements are signed. ndimslow Slowest array \n" + "dimension. ndimmid Second slowest array dimension. ndimfast \n" + " Fastest array dimension.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_write_file", _wrap_cbf_handle_struct_write_file, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : String filename,Integer ciforcbf,Integer Headers,Integer encoding\n" + "\n" + "C prototype: int cbf_write_file (cbf_handle handle, FILE *file, int readable,\n" + " int ciforcbf, int flags, int encoding);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_write_file writes the CBF object specified by handle into the \n" + "file file, following CIF 1.0 conventions of 80 character lines. \n" + "cbf_write_widefile writes the CBF object specified by handle into the \n" + "file file, following CIF 1.1 conventions of 2048 character lines. A \n" + "warning is issued to stderr for ascii lines over the limit, and an \n" + "attempt is made to fold lines to fit. No test is performed on binary \n" + "sections.\n" + "If a dictionary has been provided, aliases will be applied on output.\n" + "Unlike cbf_read_file, the file does not have to be random-access.\n" + "If the file is random-access and readable, readable can be set to \n" + "non-0 to indicate to CBFlib that the file can be used as a buffer to \n" + "conserve disk space. If the file is not random-access or not \n" + "readable, readable must be 0.\n" + "\n" + ""}, + { "cbf_handle_struct_set_divergence", _wrap_cbf_handle_struct_set_divergence, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : Float div_x_source,Float div_y_source,Float div_x_y_source\n" + "\n" + "C prototype: int cbf_set_divergence (cbf_handle handle, double div_x_source,\n" + " double div_y_source, double div_x_y_source);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_divergence sets the source divergence parameters to the \n" + "values specified by div_x_source, div_y_source and div_x_y_source.\n" + "ARGUMENTS\n" + "handle CBF handle. div_x_source New value of \n" + "div_x_source. div_y_source New value of div_y_source. \n" + "div_x_y_source New value of div_x_y_source.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_remove_datablock", _wrap_cbf_handle_struct_remove_datablock, METH_O, "\n" + "\n" + "Returns : \n" + "*args : \n" + "\n" + "C prototype: int cbf_remove_datablock (cbf_handle handle);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_remove_datablock deletes the current data block. \n" + "cbf_remove_saveframe deletes the current save frame.\n" + "The current data block becomes undefined.\n" + "ARGUMENTS\n" + "handle CBF handle.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_count_elements", _wrap_cbf_handle_struct_count_elements, METH_O, "\n" + "\n" + "Returns : Integer\n" + "*args : \n" + "\n" + "C prototype: int cbf_count_elements (cbf_handle handle,\n" + " unsigned int *elements);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_count_elements sets *elements to the number of detector elements.\n" + "ARGUMENTS\n" + "handle CBF handle. elements Pointer to the destination count.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_set_image_fs", _wrap_cbf_handle_struct_set_image_fs, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : int element_number,int compression,(binary) String data,int elsize,\n" + " int elsign,int dimfast,int dimslow\n" + "\n" + "C prototype: int cbf_set_image_fs(cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, unsigned int compression,\n" + " void *array, size_t elsize, int elsign, size_t ndimfast,\n" + " size_t ndimslow);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" + "array for element number element_number. The array consists of \n" + "ndimfast×ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-zero and unsigned otherwise. \n" + "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" + "write the image array for element number element_number. The array \n" + "consists of ndimfast×ndimslow IEEE double or float elements of \n" + "elsize bytes each, starting at array. cbf_set_3d_image, \n" + "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" + "for element number element_number. The array consists of \n" + "ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting \n" + "at array. The elements are signed if elsign is non-0 and unsigned \n" + "otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" + "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" + "element_number. The array consists of ndimfast×ndimmid×ndimslow \n" + "IEEE double or float elements of elsize bytes each, starting at \n" + "array.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "If the array is 1-dimensional, ndimslow should be the array size and \n" + "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" + "array is 2-dimensional and the 3D calls are used, ndimslow and \n" + "ndimmid should be used for the array dimensions and ndimfast should \n" + "be set to 1.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" + "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" + "(int), sizeof(double) or sizeof(float), the function returns \n" + "CBF_ARGUMENT.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any value other \n" + "than 0 is invalid. element_number The number of the detector \n" + "element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. compression Compression type. \n" + "array Pointer to the image array. elsize Size in \n" + "bytes of each image array element. elsigned Set to non-0 if \n" + "the image array elements are signed. ndimslow Slowest array \n" + "dimension. ndimmid Second slowest array dimension. ndimfast \n" + " Fastest array dimension.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_require_reference_detector", _wrap_cbf_handle_struct_require_reference_detector, METH_VARARGS, "\n" + "\n" + "Returns : pycbf detector object\n" + "*args : Integer element_number\n" + "\n" + "C prototype: int cbf_require_reference_detector (cbf_handle handle,\n" + " cbf_detector *detector, unsigned int element_number);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_construct_detector constructs a detector object for detector \n" + "element number element_number using the description in the CBF object \n" + "handle and initialises the detector handle *detector.\n" + "cbf_construct_reference_detector constructs a detector object for \n" + "detector element number element_number using the description in the \n" + "CBF object handle and initialises the detector handle *detector using \n" + "the reference settings of the axes. cbf_require_reference_detector is \n" + "similar, but try to force the creations of missing intermediate \n" + "categories needed to construct a detector object.\n" + "ARGUMENTS\n" + "handle CBF handle. detector Pointer to the \n" + "destination detector handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_next_category", _wrap_cbf_handle_struct_next_category, METH_O, "\n" + "\n" + "Returns : \n" + "*args : \n" + "\n" + "C prototype: int cbf_next_category (cbf_handle handle);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_next_category makes the category following the current category \n" + "in the current data block the current category.\n" + "If there are no more categories, the function returns CBF_NOTFOUND.\n" + "The current column and row become undefined.\n" + "ARGUMENTS\n" + "handle CBF handle.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_diffrn_id", _wrap_cbf_handle_struct_set_diffrn_id, METH_VARARGS, "\n" + "\n" + "Returns : string\n" + "*args : \n" + "\n" + "C prototype: int cbf_set_diffrn_id (cbf_handle handle, const char *diffrn_id);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_diffrn_id sets the \"diffrn.id \" entry of the current \n" + "datablock to the ASCII value diffrn_id.\n" + "This function also changes corresponding \"diffrn_id \" entries in \n" + "the \"diffrn_source \", \"diffrn_radiation \", \"diffrn_detector \n" + "\" and \"diffrn_measurement \" categories.\n" + "ARGUMENTS\n" + "handle CBF handle. diffrn_id ASCII value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_set_timestamp", _wrap_cbf_handle_struct_set_timestamp, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : Float time,Integer timezone,Float precision\n" + "\n" + "C prototype: int cbf_set_timestamp (cbf_handle handle, unsigned int reserved,\n" + " double time, int timezone, double precision);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_timestamp sets the collection timestamp in seconds since \n" + "January 1 1970 to the value specified by time. The timezone \n" + "difference from UTC\n" + "\n" + ""}, + { "cbf_handle_struct_get_orientation_matrix", _wrap_cbf_handle_struct_get_orientation_matrix, METH_O, "\n" + "\n" + "Returns : Float matrix_0,Float matrix_1,Float matrix_2,Float matrix_3,\n" + " Float matrix_4,Float matrix_5,Float matrix_6,Float matrix_7,\n" + " Float matrix_8\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_orientation_matrix (cbf_handle handle,\n" + " double ub_matrix[9]);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_orientation_matrix sets ub_matrix to point to the array of \n" + "orientation matrix entries in the \"diffrn \" category in the order \n" + "of columns:\n" + " \"UB[1][1] \" \"UB[1][2] \" \"UB[1][3] \" \"UB[2][1] \" \n" + "\"UB[2][2] \" \"UB[2][3] \" \"UB[3][1] \" \"UB[3][2] \" \n" + "\"UB[3][3] \"\n" + "cbf_set_orientation_matrix sets the values in the \"diffrn \" \n" + "category to the values pointed to by ub_matrix.\n" + "ARGUMENTS\n" + "handle CBF handle. ub_matrix Source or destination array of 9 \n" + "doubles giving the orientation matrix parameters.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_get_image_size_fs", _wrap_cbf_handle_struct_get_image_size_fs, METH_VARARGS, "\n" + "\n" + "Returns : size_t ndimfast,size_t ndimslow\n" + "*args : Integer element_number\n" + "\n" + "C prototype: int cbf_get_image_size_fs (cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " size_t *ndimfast, size_t *ndimslow);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf \n" + "set *ndimslow and *ndimfast to the slow and fast dimensions of the \n" + "image array for element number element_number. If the array is \n" + "1-dimensional, *ndimslow will be set to the array size and *ndimfast \n" + "will be set to 1. If the array is 3-dimensional an error code will be \n" + "returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and \n" + "cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the \n" + "slowest, next fastest and fastest dimensions, respectively, of the 3D \n" + "image array for element number element_number. If the array is \n" + "1-dimensional, *ndimslow will be set to the array size and *ndimmid \n" + "and\n" + "\n" + ""}, + { "cbf_handle_struct_get_divergence", _wrap_cbf_handle_struct_get_divergence, METH_O, "\n" + "\n" + "Returns : Float div_x_source,Float div_y_source,Float div_x_y_source\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_divergence (cbf_handle handle, double *div_x_source,\n" + " double *div_y_source, double *div_x_y_source);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_divergence sets *div_x_source, *div_y_source and \n" + "*div_x_y_source to the corresponding source divergence parameters.\n" + "Any of the destination pointers may be NULL.\n" + "ARGUMENTS\n" + "handle CBF handle. div_x_source Pointer to the \n" + "destination div_x_source. div_y_source Pointer to the destination \n" + "div_y_source. div_x_y_source Pointer to the destination \n" + "div_x_y_source.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_rewind_category", _wrap_cbf_handle_struct_rewind_category, METH_O, "\n" + "\n" + "Returns : \n" + "*args : \n" + "\n" + "C prototype: int cbf_rewind_category (cbf_handle handle);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_rewind_category makes the first category in the current data \n" + "block the current category. cbf_rewind_saveframe makes the first \n" + "saveframe in the current data block the current saveframe. \n" + "cbf_rewind_blockitem makes the first blockitem (category or \n" + "saveframe) in the current data block the current blockitem. The type \n" + "of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type.\n" + "If there are no categories, saveframes or blockitems the function \n" + "returns CBF_NOTFOUND.\n" + "The current column and row become undefined.\n" + "ARGUMENTS\n" + "handle CBF handle. type CBF handle.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_read_template", _wrap_cbf_handle_struct_read_template, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : String filename\n" + "\n" + "C prototype: int cbf_read_template (cbf_handle handle, FILE *file);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_read_template reads the CBF or CIF file file into the CBF object \n" + "specified by handle and selects the first datablock as the current \n" + "datablock.\n" + "ARGUMENTS\n" + "handle Pointer to a CBF handle. file Pointer to a file \n" + "descriptor.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_select_row", _wrap_cbf_handle_struct_select_row, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : Integer\n" + "\n" + "C prototype: int cbf_select_row (cbf_handle handle, unsigned int row);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_select_row selects row number row in the current category as the \n" + "current row.\n" + "The first row is number 0.\n" + "The current column is not affected\n" + "If the row does not exist, the function returns CBF_NOTFOUND.\n" + "ARGUMENTS\n" + "handle CBF handle. row Number of the row to select.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_image_fs_as_string", _wrap_cbf_handle_struct_get_image_fs_as_string, METH_VARARGS, "\n" + "\n" + "Returns : (Binary)String\n" + "*args : int element_number,int elsize,int elsign,int ndimfast,int ndimslow\n" + "\n" + "C prototype: int cbf_get_image_fs (cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, void *array, size_t elsize,\n" + " int elsign, size_t ndimfast, size_t ndimslow);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" + "array for element number element_number into an array. The array \n" + "consists of ndimslow×ndimfast elements of elsize bytes each, \n" + "starting at array. The elements are signed if elsign is non-0 and \n" + "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" + "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" + "for element number element_number into an array. A real array is \n" + "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" + "cbf_get_3d_image_sf read the 3D image array for element number \n" + "element_number into an array. The array consists of \n" + "ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting \n" + "at array. The elements are signed if elsign is non-0 and unsigned \n" + "otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" + "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" + "floats for element number element_number into an array. A real array \n" + "is always signed.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "The structure of the array as a 1-, 2- or 3-dimensional array should \n" + "agree with the structure of the array given in the \n" + "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" + "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" + "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" + "being processed. If the array is 2-dimensional and a 3D call is used, \n" + "ndimslow and ndimmid should be the\n" + "\n" + ""}, + { "cbf_handle_struct_get_image_size_sf", _wrap_cbf_handle_struct_get_image_size_sf, METH_VARARGS, "\n" + "\n" + "Returns : size_t ndimslow,size_t ndimfast\n" + "*args : Integer element_number\n" + "\n" + "C prototype: int cbf_get_image_size_sf (cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " size_t *ndimslow, size_t *ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf \n" + "set *ndimslow and *ndimfast to the slow and fast dimensions of the \n" + "image array for element number element_number. If the array is \n" + "1-dimensional, *ndimslow will be set to the array size and *ndimfast \n" + "will be set to 1. If the array is 3-dimensional an error code will be \n" + "returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and \n" + "cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the \n" + "slowest, next fastest and fastest dimensions, respectively, of the 3D \n" + "image array for element number element_number. If the array is \n" + "1-dimensional, *ndimslow will be set to the array size and *ndimmid \n" + "and\n" + "\n" + ""}, + { "cbf_handle_struct_get_real_image_fs_as_string", _wrap_cbf_handle_struct_get_real_image_fs_as_string, METH_VARARGS, "\n" + "\n" + "Returns : (Binary)String\n" + "*args : int element_number,int elsize,int ndimfast,int ndimslow\n" + "\n" + "C prototype: int cbf_get_real_image_fs (cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " void *array, size_t elsize, size_t ndimfast,\n" + " size_t ndimslow);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" + "array for element number element_number into an array. The array \n" + "consists of ndimslow×ndimfast elements of elsize bytes each, \n" + "starting at array. The elements are signed if elsign is non-0 and \n" + "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" + "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" + "for element number element_number into an array. A real array is \n" + "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" + "cbf_get_3d_image_sf read the 3D image array for element number \n" + "element_number into an array. The array consists of \n" + "ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting \n" + "at array. The elements are signed if elsign is non-0 and unsigned \n" + "otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" + "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" + "floats for element number element_number into an array. A real array \n" + "is always signed.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "The structure of the array as a 1-, 2- or 3-dimensional array should \n" + "agree with the structure of the array given in the \n" + "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" + "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" + "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" + "being processed. If the array is 2-dimensional and a 3D call is used, \n" + "ndimslow and ndimmid should be the\n" + "\n" + ""}, + { "cbf_handle_struct_count_columns", _wrap_cbf_handle_struct_count_columns, METH_O, "\n" + "\n" + "Returns : Integer\n" + "*args : \n" + "\n" + "C prototype: int cbf_count_columns (cbf_handle handle, unsigned int *columns);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_count_columns puts the number of columns in the current category \n" + "in *columns.\n" + "ARGUMENTS\n" + "handle CBF handle. columns Pointer to the destination column \n" + "count.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_integerarrayparameters_wdims", _wrap_cbf_handle_struct_get_integerarrayparameters_wdims, METH_O, "\n" + "\n" + "Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned,\n" + " int elements,int minelement,int maxelement,char **bo,int *bolen,\n" + " int dimfast,int dimmid,int dimslow,int padding\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_integerarrayparameters_wdims (cbf_handle handle,\n" + " unsigned int *compression, int *binary_id, size_t *elsize,\n" + " int *elsigned, int *elunsigned, size_t *elements,\n" + " int *minelement, int *maxelement, const char **byteorder,\n" + " size_t *dimfast, size_t *dimmid, size_t *dimslow,\n" + " size_t *padding);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_integerarrayparameters sets *compression, *binary_id, \n" + "*elsize, *elsigned, *elunsigned, *elements, *minelement and \n" + "*maxelement to values read from the binary value of the item at the \n" + "current column and row. This provides all the arguments needed for a \n" + "subsequent call to cbf_set_integerarray, if a copy of the array is to \n" + "be made into another CIF or CBF. cbf_get_realarrayparameters sets \n" + "*compression, *binary_id, *elsize, *elements to values read from the \n" + "binary value of the item at the current column and row. This provides \n" + "all the arguments needed for a subsequent call to cbf_set_realarray, \n" + "if a copy of the arry is to be made into another CIF or CBF.\n" + "The variants cbf_get_integerarrayparameters_wdims, \n" + "cbf_get_integerarrayparameters_wdims_fs, \n" + "cbf_get_integerarrayparameters_wdims_sf, \n" + "cbf_get_realarrayparameters_wdims, \n" + "cbf_get_realarrayparameters_wdims_fs, \n" + "cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, \n" + "*dimmid, *dimslow, and *padding as well, providing the additional \n" + "parameters needed for a subsequent call to cbf_set_integerarray_wdims \n" + "or cbf_set_realarray_wdims.\n" + "The value returned in *byteorder is a pointer either to the string \n" + "\"little_endian \" or to the string \"big_endian \". This should be \n" + "the byte order of the data, not necessarily of the host machine. No \n" + "attempt should be made to modify this string. At this time only \n" + "\"little_endian \" will be returned.\n" + "The values returned in *dimfast, *dimmid and *dimslow are the sizes \n" + "of the fastest changing, second fastest changing and third fastest \n" + "changing dimensions of the array, if specified, or zero, if not \n" + "specified.\n" + "The value returned in *padding is the size of the post-data padding, \n" + "if any and if specified in the data header. The value is given as a \n" + "count of octets.\n" + "If the value is not binary, the function returns CBF_ASCII.\n" + "ARGUMENTS\n" + "handle CBF handle. compression Compression method used. \n" + "elsize Size in bytes of each array element. binary_id \n" + "Pointer to the destination integer binary identifier. elsigned \n" + "Pointer to an integer. Set to 1 if the elements can be read as signed \n" + "integers. elunsigned Pointer to an integer. Set to 1 if the \n" + "elements can be read as unsigned integers. elements Pointer to \n" + "the destination number of elements. minelement Pointer to the \n" + "destination smallest element. maxelement Pointer to the \n" + "destination largest element. byteorder Pointer to the destination \n" + "byte order. dimfast Pointer to the destination fastest \n" + "dimension. dimmid Pointer to the destination second fastest \n" + "dimension. dimslow Pointer to the destination third fastest \n" + "dimension. padding Pointer to the destination padding size.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_gain", _wrap_cbf_handle_struct_get_gain, METH_VARARGS, "\n" + "\n" + "Returns : Float gain,Float gain_esd\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_gain (cbf_handle handle, unsigned int element_number,\n" + " double *gain, double *gain_esd);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_gain sets *gain and *gain_esd to the corresponding gain \n" + "parameters for element number element_number.\n" + "Either of the destination pointers may be NULL.\n" + "ARGUMENTS\n" + "handle CBF handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. gain Pointer to the \n" + "destination gain. gain_esd Pointer to the destination \n" + "gain_esd.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_new_saveframe", _wrap_cbf_handle_struct_new_saveframe, METH_VARARGS, "\n" + "\n" + "Returns : string\n" + "*args : \n" + "\n" + "C prototype: int cbf_new_saveframe (cbf_handle handle,\n" + " const char *saveframename);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_new_datablock creates a new data block with name datablockname \n" + "and makes it the current data block. cbf_new_saveframe creates a new \n" + "save frame with name saveframename within the current data block and \n" + "makes the new save frame the current save frame.\n" + "If a data block or save frame with this name already exists, the \n" + "existing data block or save frame becomes the current data block or \n" + "save frame.\n" + "ARGUMENTS\n" + "handle CBF handle. datablockname The name of the new data \n" + "block. saveframename The name of the new save frame.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_polarization", _wrap_cbf_handle_struct_set_polarization, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : Float polarizn_source_ratio,Float polarizn_source_norm\n" + "\n" + "C prototype: int cbf_set_polarization (cbf_handle handle,\n" + " double polarizn_source_ratio,\n" + " double polarizn_source_norm);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_polarization sets the source polarization to the values \n" + "specified by polarizn_source_ratio and polarizn_source_norm.\n" + "ARGUMENTS\n" + "handle CBF handle. polarizn_source_ratio New value \n" + "of polarizn_source_ratio. polarizn_source_norm New value of \n" + "polarizn_source_norm.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_set_real_3d_image", _wrap_cbf_handle_struct_set_real_3d_image, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : int element_number,int compression,(binary) String data,int elsize,\n" + " int dimslow,int dimmid,int dimfast\n" + "\n" + "C prototype: int cbf_set_real_3d_image (cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " unsigned int compression, void *array,size_t elsize,\n" + " size_t ndimslow, size_t ndimmid, size_t ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" + "array for element number element_number. The array consists of \n" + "ndimfast×ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-zero and unsigned otherwise. \n" + "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" + "write the image array for element number element_number. The array \n" + "consists of ndimfast×ndimslow IEEE double or float elements of \n" + "elsize bytes each, starting at array. cbf_set_3d_image, \n" + "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" + "for element number element_number. The array consists of \n" + "ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting \n" + "at array. The elements are signed if elsign is non-0 and unsigned \n" + "otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" + "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" + "element_number. The array consists of ndimfast×ndimmid×ndimslow \n" + "IEEE double or float elements of elsize bytes each, starting at \n" + "array.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "If the array is 1-dimensional, ndimslow should be the array size and \n" + "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" + "array is 2-dimensional and the 3D calls are used, ndimslow and \n" + "ndimmid should be used for the array dimensions and ndimfast should \n" + "be set to 1.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" + "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" + "(int), sizeof(double) or sizeof(float), the function returns \n" + "CBF_ARGUMENT.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any value other \n" + "than 0 is invalid. element_number The number of the detector \n" + "element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. compression Compression type. \n" + "array Pointer to the image array. elsize Size in \n" + "bytes of each image array element. elsigned Set to non-0 if \n" + "the image array elements are signed. ndimslow Slowest array \n" + "dimension. ndimmid Second slowest array dimension. ndimfast \n" + " Fastest array dimension.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_delete_row", _wrap_cbf_handle_struct_delete_row, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : Integer\n" + "\n" + "C prototype: int cbf_delete_row (cbf_handle handle, unsigned int rownumber);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_delete_row deletes a row from the current category. Rows starting \n" + "from rownumber +1 are moved down by 1. If the current row was higher \n" + "than rownumber, or if the current row is the last row, it will also \n" + "move down by 1.\n" + "The row numbers start from 0.\n" + "ARGUMENTS\n" + "handle CBF handle. rownumber The number of the row to delete.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_column_name", _wrap_cbf_handle_struct_column_name, METH_O, "\n" + "\n" + "Returns : \n" + "*args : string\n" + "\n" + "C prototype: int cbf_column_name (cbf_handle handle, const char **columnname);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_column_name sets *columnname to point to the name of the current \n" + "column of the current category.\n" + "The column name will be valid as long as the column exists.\n" + "The name must not be modified by the program in any way.\n" + "cbf_set_column_name sets the name of the current column to \n" + "newcolumnname\n" + "ARGUMENTS\n" + "handle CBF handle. columnname Pointer to the \n" + "destination column name pointer. newcolumnname New column name \n" + "pointer.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_remove_saveframe", _wrap_cbf_handle_struct_remove_saveframe, METH_O, "\n" + "\n" + "Returns : \n" + "*args : \n" + "\n" + "C prototype: int cbf_remove_saveframe (cbf_handle handle);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_remove_datablock deletes the current data block. \n" + "cbf_remove_saveframe deletes the current save frame.\n" + "The current data block becomes undefined.\n" + "ARGUMENTS\n" + "handle CBF handle.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_integerarray_wdims_sf", _wrap_cbf_handle_struct_set_integerarray_wdims_sf, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : int compression,int binary_id,(binary) String data,int elsize,\n" + " int elsigned,int elements,String byteorder,int dimslow,int dimmid,\n" + " int dimfast,int padding\n" + "\n" + "C prototype: int cbf_set_integerarray_wdims_sf (cbf_handle handle,\n" + " unsigned int compression, int binary_id, void *array,\n" + " size_t elsize, int elsigned, size_t elements,\n" + " const char *byteorder, size_t dimslow, size_t dimmid,\n" + " size_t dimfast, size_t padding);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_integerarray sets the binary value of the item at the current \n" + "column and row to an integer array. The array consists of elements \n" + "elements of elsize bytes each, starting at array. The elements are \n" + "signed if elsigned is non-0 and unsigned otherwise. binary_id is the \n" + "binary section identifier. cbf_set_realarray sets the binary value of \n" + "the item at the current column and row to an integer array. The array \n" + "consists of elements elements of elsize bytes each, starting at \n" + "array. binary_id is the binary section identifier.\n" + "The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, \n" + "cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, \n" + "cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants \n" + "allow the data header values of byteorder, dimfast, dimmid, dimslow \n" + "and padding to be set to the data byte order, the fastest, second \n" + "fastest and third fastest array dimensions and the size in byte of \n" + "the post data padding to be used.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + " Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression. \n" + "NOTE: This scheme is by far the slowest of the four and uses much \n" + "more disk space. It is intended for routine use with small arrays \n" + "only. With large arrays (like images) it should be used only for \n" + "debugging.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or \n" + "floats for cbf_set_realarray. If elsize is not equal to sizeof \n" + "(char), sizeof (short) or sizeof (int), the function returns \n" + "CBF_ARGUMENT.\n" + "ARGUMENTS\n" + "handle CBF handle. compression Compression method to use. \n" + "binary_id Integer binary identifier. array Pointer to the \n" + "source array. elsize Size in bytes of each source array \n" + "element. elsigned Set to non-0 if the source array elements are \n" + "signed. elements The number of elements in the array\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_require_value", _wrap_cbf_handle_struct_require_value, METH_VARARGS, "\n" + "\n" + "Returns : String Value\n" + "*args : String defaultvalue\n" + "\n" + "C prototype: int cbf_require_value (cbf_handle handle, const char **value,\n" + " const char *defaultvalue );\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_value sets *value to point to the ASCII value of the item at \n" + "the current column and row. cbf_require_value sets *value to point to \n" + "the ASCII value of the item at the current column and row, creating \n" + "the data item if necessary and initializing it to a copy of \n" + "defaultvalue.\n" + "If the value is not ASCII, the function returns CBF_BINARY.\n" + "The value will be valid as long as the item exists and has not been \n" + "set to a new value.\n" + "The value must not be modified by the program in any way.\n" + "ARGUMENTS\n" + "handle CBF handle. value Pointer to the destination \n" + "value pointer. defaultvalue Default value character string.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_require_column_integervalue", _wrap_cbf_handle_struct_require_column_integervalue, METH_VARARGS, "\n" + "\n" + "Returns : Int Value\n" + "*args : String Columnvalue,Int default\n" + "\n" + "C prototype: int cbf_require_column_integervalue (cbf_handle handle,\n" + " const char *columnname, int *number,\n" + " const int defaultvalue);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_require_column_doublevalue sets *number to the value of the ASCII \n" + "item at the current row for the column given with the name given by \n" + "*columnname, with the value interpreted as an integer number, or to \n" + "the number given by defaultvalue if the item cannot be found.\n" + "ARGUMENTS\n" + "handle CBF handle. columnname Name of the column \n" + "containing the number. number pointer to the location to \n" + "receive the integer value. defaultvalue Value to use if the \n" + "requested column and value cannot be found.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_pixel_size", _wrap_cbf_handle_struct_set_pixel_size, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : Int element_number,Int axis_number,Float pixel size\n" + "\n" + "C prototype: int cbf_set_pixel_size (cbf_handle handle,\n" + " unsigned int element_number, int axis_number,\n" + " double psize);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the \n" + "\"size \" column of the \"array_structure_list \" category at the \n" + "row which matches axis axis_number of the detector element \n" + "element_number converting the double pixel size psize from meters to \n" + "millimeters in storing it in the \"size \" column for the axis \n" + "axis_number of the detector element element_number. The axis_number \n" + "is numbered from 1, starting with the slowest axis. \n" + "cbf_set_pixel_size_fs sets the item in the \"size \" column of the \n" + "\"array_structure_list \" category at the row which matches axis \n" + "axis_number of the detector element element_number converting the \n" + "double pixel size psize from meters to millimeters in storing it in \n" + "the \"size \" column for the axis axis_number of the detector \n" + "element element_number. The axis_number is numbered from 1, starting \n" + "with the fastest axis.\n" + "If a negative axis number is given, the order of axes is reversed, so \n" + "that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the \n" + "fastest axis for cbf_get_pixel_size_sf.\n" + "If the \"array_structure_list \" category does not already exist, it \n" + "is created.\n" + "If the appropriate row in the \"array_structure_list \" catgeory \n" + "does not already exist, it is created.\n" + "If the pixel size is not given explcitly in the \"array_element_size \n" + "category \", the function returns CBF_NOTFOUND.\n" + "ARGUMENTS\n" + "handle CBF handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. axis_number The number of the \n" + "axis, fastest first, starting from 1.\n" + "\n" + ""}, + { "cbf_handle_struct_next_column", _wrap_cbf_handle_struct_next_column, METH_O, "\n" + "\n" + "Returns : \n" + "*args : \n" + "\n" + "C prototype: int cbf_next_column (cbf_handle handle);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_next_column makes the column following the current column in the \n" + "current category the current column.\n" + "If there are no more columns, the function returns CBF_NOTFOUND.\n" + "The current row is not affected.\n" + "ARGUMENTS\n" + "handle CBF handle.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_3d_image_size_sf", _wrap_cbf_handle_struct_get_3d_image_size_sf, METH_VARARGS, "\n" + "\n" + "Returns : size_t ndimslow,size_t ndimmid,size_t ndimfast\n" + "*args : Integer element_number\n" + "\n" + "C prototype: int cbf_get_3d_image_size_sf (cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " size_t *ndimslow, size_t *ndimmid, size_t *ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf \n" + "set *ndimslow and *ndimfast to the slow and fast dimensions of the \n" + "image array for element number element_number. If the array is \n" + "1-dimensional, *ndimslow will be set to the array size and *ndimfast \n" + "will be set to 1. If the array is 3-dimensional an error code will be \n" + "returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and \n" + "cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the \n" + "slowest, next fastest and fastest dimensions, respectively, of the 3D \n" + "image array for element number element_number. If the array is \n" + "1-dimensional, *ndimslow will be set to the array size and *ndimmid \n" + "and\n" + "\n" + ""}, + { "cbf_handle_struct_get_realarrayparameters_wdims_fs", _wrap_cbf_handle_struct_get_realarrayparameters_wdims_fs, METH_O, "\n" + "\n" + "Returns : int compression,int binary_id,int elsize,int elements,char **bo,\n" + " int *bolen,int dimfast,int dimmid,int dimslow,int padding\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_realarrayparameters_wdims_fs (cbf_handle handle,\n" + " unsigned int *compression, int *binary_id, size_t *elsize,\n" + " size_t *elements, const char **byteorder, size_t *dimfast,\n" + " size_t *dimmid, size_t *dimslow, size_t *padding);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_integerarrayparameters sets *compression, *binary_id, \n" + "*elsize, *elsigned, *elunsigned, *elements, *minelement and \n" + "*maxelement to values read from the binary value of the item at the \n" + "current column and row. This provides all the arguments needed for a \n" + "subsequent call to cbf_set_integerarray, if a copy of the array is to \n" + "be made into another CIF or CBF. cbf_get_realarrayparameters sets \n" + "*compression, *binary_id, *elsize, *elements to values read from the \n" + "binary value of the item at the current column and row. This provides \n" + "all the arguments needed for a subsequent call to cbf_set_realarray, \n" + "if a copy of the arry is to be made into another CIF or CBF.\n" + "The variants cbf_get_integerarrayparameters_wdims, \n" + "cbf_get_integerarrayparameters_wdims_fs, \n" + "cbf_get_integerarrayparameters_wdims_sf, \n" + "cbf_get_realarrayparameters_wdims, \n" + "cbf_get_realarrayparameters_wdims_fs, \n" + "cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, \n" + "*dimmid, *dimslow, and *padding as well, providing the additional \n" + "parameters needed for a subsequent call to cbf_set_integerarray_wdims \n" + "or cbf_set_realarray_wdims.\n" + "The value returned in *byteorder is a pointer either to the string \n" + "\"little_endian \" or to the string \"big_endian \". This should be \n" + "the byte order of the data, not necessarily of the host machine. No \n" + "attempt should be made to modify this string. At this time only \n" + "\"little_endian \" will be returned.\n" + "The values returned in *dimfast, *dimmid and *dimslow are the sizes \n" + "of the fastest changing, second fastest changing and third fastest \n" + "changing dimensions of the array, if specified, or zero, if not \n" + "specified.\n" + "The value returned in *padding is the size of the post-data padding, \n" + "if any and if specified in the data header. The value is given as a \n" + "count of octets.\n" + "If the value is not binary, the function returns CBF_ASCII.\n" + "ARGUMENTS\n" + "handle CBF handle. compression Compression method used. \n" + "elsize Size in bytes of each array element. binary_id \n" + "Pointer to the destination integer binary identifier. elsigned \n" + "Pointer to an integer. Set to 1 if the elements can be read as signed \n" + "integers. elunsigned Pointer to an integer. Set to 1 if the \n" + "elements can be read as unsigned integers. elements Pointer to \n" + "the destination number of elements. minelement Pointer to the \n" + "destination smallest element. maxelement Pointer to the \n" + "destination largest element. byteorder Pointer to the destination \n" + "byte order. dimfast Pointer to the destination fastest \n" + "dimension. dimmid Pointer to the destination second fastest \n" + "dimension. dimslow Pointer to the destination third fastest \n" + "dimension. padding Pointer to the destination padding size.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_realarray_as_string", _wrap_cbf_handle_struct_get_realarray_as_string, METH_O, "\n" + "\n" + "Returns : (Binary)String\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_realarray (cbf_handle handle, int *binary_id,\n" + " void *array, size_t elsize, size_t elements,\n" + " size_t *elements_read);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_integerarray reads the binary value of the item at the \n" + "current column and row into an integer array. The array consists of \n" + "elements elements of elsize bytes each, starting at array. The \n" + "elements are signed if elsigned is non-0 and unsigned otherwise. \n" + "*binary_id is set to the binary section identifier and *elements_read \n" + "to the number of elements actually read. cbf_get_realarray reads the \n" + "binary value of the item at the current column and row into a real \n" + "array. The array consists of elements elements of elsize bytes each, \n" + "starting at array. *binary_id is set to the binary section identifier \n" + "and *elements_read to the number of elements actually read.\n" + "If any element in the integer binary data cant fit into the \n" + "destination element, the destination is set the nearest possible \n" + "value.\n" + "If the value is not binary, the function returns CBF_ASCII.\n" + "If the requested number of elements cant be read, the function will \n" + "read as many as it can and then return CBF_ENDOFDATA.\n" + "Currently, the destination array must consist of chars, shorts or \n" + "ints (signed or unsigned). If elsize is not equal to sizeof (char), \n" + "sizeof (short) or sizeof (int), for cbf_get_integerarray, or \n" + "sizeof(double) or sizeof(float), for cbf_get_realarray the function \n" + "returns CBF_ARGUMENT.\n" + "An additional restriction in the current version of CBFlib is that \n" + "values too large to fit in an int are not correctly decompressed. As \n" + "an example, if the machine with 32-bit ints is reading an array \n" + "containing a value outside the range 0 .. 2^^32-1 (unsigned) or \n" + "-2^^31 .. 2^^31-1 (signed), the array will not be correctly \n" + "decompressed. This restriction will be removed in a future release. \n" + "For cbf_get_realarray, only IEEE format is supported. No conversion \n" + "to other floating point formats is done at this time.\n" + "ARGUMENTS\n" + "handle CBF handle. binary_id Pointer to the \n" + "destination integer binary identifier. array Pointer to the \n" + "destination array. elsize Size in bytes of each destination \n" + "array element. elsigned Set to non-0 if the destination array \n" + "elements are signed. elements The number of elements to read. \n" + "elements_read Pointer to the destination number of elements \n" + "actually read.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success. SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_bin_sizes", _wrap_cbf_handle_struct_get_bin_sizes, METH_VARARGS, "\n" + "\n" + "Returns : Float slowbinsize,Float fastbinsize\n" + "*args : Integer element_number\n" + "\n" + "C prototype: int cbf_get_bin_sizes(cbf_handle handle,\n" + " unsigned int element_number, double * slowbinsize,\n" + " double * fastbinsize);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_bin_sizes sets slowbinsize to point to the value of the \n" + "number of pixels composing one array element in the dimension that \n" + "changes at the second-fastest rate and fastbinsize to point to the \n" + "value of the number of pixels composing one array element in the \n" + "dimension that changes at the fastest rate for the dectector element \n" + "with the ordinal element_number. cbf_set_bin_sizes sets the the pixel \n" + "bin sizes in the \"array_intensities \" category to the values of \n" + "slowbinsize_in for the number of pixels composing one array element \n" + "in the dimension that changes at the second-fastest rate and \n" + "fastbinsize_in for the number of pixels composing one array element \n" + "in the dimension that changes at the fastest rate for the dectector \n" + "element with the ordinal element_number.\n" + "In order to allow for software binning involving fractions of pixels, \n" + "the bin sizes are doubles rather than ints.\n" + "ARGUMENTS\n" + "handle CBF handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. slowbinsize Pointer to the \n" + "returned number of pixels composing one array element in the \n" + "dimension that changes at the second-fastest rate. fastbinsize \n" + "Pointer to the returned number of pixels composing one array element \n" + "in the dimension that changes at the fastest rate. slowbinsize_in \n" + "The number of pixels composing one array element in the dimension \n" + "that changes at the second-fastest rate. fastbinsize_in The number \n" + "of pixels composing one array element in the dimension that changes \n" + "at the fastest rate.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_reset_category", _wrap_cbf_handle_struct_reset_category, METH_O, "\n" + "\n" + "Returns : \n" + "*args : \n" + "\n" + "C prototype: int cbf_reset_category (cbf_handle handle);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_reset_category deletes all columns and rows from current category.\n" + "ARGUMENTS\n" + "handle CBF handle.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_count_axis_ancestors", _wrap_cbf_handle_struct_count_axis_ancestors, METH_VARARGS, "\n" + "\n" + "Returns : Integer\n" + "*args : String axis_id\n" + "\n" + "C prototype: int cbf_count_axis_ancestors (cbf_handle handle,\n" + " const char *axis_id, unsigned int *ancestors);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" + "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" + "axis of index ancestor_index of axis axis_id, starting with axis_id \n" + "for ancestor_index 0.\n" + "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" + "axis_id or to \". \" if there is no such ancestor. \n" + "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" + "to \". \" if there is no such equipment. \n" + "cbf_get_axis_equipment_component sets *equipment_component to the \n" + "equipment_component of axis_id or to \". \" if there is no such \n" + "equipment_component.\n" + "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" + "components of the ofset of axis_id.\n" + "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" + "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" + "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" + "is no such rotation_axis.\n" + "cbf_get_axis_setting sets *start and *increment to the corresponding \n" + "values of the axis axis_id. Any of the destination pointers may be \n" + "NULL.\n" + "cbf_get_axis_type sets axis_type to the type of axis_id.\n" + "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" + "components of the vector of axis_id.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any \n" + "value other than 0 is invalid. axis_id Axis id. \n" + "ancestor_index Integer index of the desired ancestor, starting \n" + "with 0 for the current axis_id. ancestor Pointer to \n" + "destination ancestor name pointer. depends_on Pointer to \n" + "destination depends_on name pointer. equipment Pointer to \n" + "destination equipment name pointer. equipment_component Pointer to \n" + "destination equipment_component name pointer. offset1 \n" + "Pointer to destination first offset component value. offset2 \n" + " Pointer to destination second offset component value. offset3 \n" + " Pointer to destination third offset component value. \n" + "rotation Pointer to destination rotation value. \n" + "rotation_axis Pointer to destination rotation_axisn name \n" + "pointer. start Pointer to the destination start \n" + "value. increment Pointer to the destination increment \n" + "value. type Pointer to destination axis type of type \n" + ". vector1 Pointer to destination first vector component \n" + "value. vector2 Pointer to destination second vector \n" + "component value. vector3 Pointer to destination third \n" + "vector component value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_construct_goniometer", _wrap_cbf_handle_struct_construct_goniometer, METH_O, "\n" + "\n" + "Returns : pycbf goniometer object\n" + "*args : \n" + "\n" + "C prototype: int cbf_construct_goniometer (cbf_handle handle,\n" + " cbf_goniometer *goniometer);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_construct_goniometer constructs a goniometer object using the \n" + "description in the CBF object handle and initialises the goniometer \n" + "handle *goniometer.\n" + "ARGUMENTS\n" + "handle CBF handle. goniometer Pointer to the destination \n" + "goniometer handle.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_set_datablockname", _wrap_cbf_handle_struct_set_datablockname, METH_VARARGS, "\n" + "\n" + "Returns : string\n" + "*args : \n" + "\n" + "C prototype: int cbf_set_datablockname (cbf_handle handle,\n" + " const char *datablockname);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_datablockname changes the name of the current data block to \n" + "datablockname. cbf_set_saveframename changes the name of the current \n" + "save frame to saveframename.\n" + "If a data block or save frame with this name already exists \n" + "(comparison is case-insensitive), the function returns CBF_IDENTICAL.\n" + "ARGUMENTS\n" + "handle CBF handle. datablockname The new data block name. \n" + "saveframename The new save frame name.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_element_number", _wrap_cbf_handle_struct_get_element_number, METH_O, "cbf_handle_struct_get_element_number(cbf_handle_struct self)"}, + { "cbf_handle_struct_set_crystal_id", _wrap_cbf_handle_struct_set_crystal_id, METH_VARARGS, "\n" + "\n" + "Returns : string\n" + "*args : \n" + "\n" + "C prototype: int cbf_set_crystal_id (cbf_handle handle,\n" + " const char *crystal_id);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_crystal_id sets the \"diffrn.crystal_id \" entry to the \n" + "ASCII value crystal_id.\n" + "ARGUMENTS\n" + "handle CBF handle. crystal_id ASCII value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_get_integerarray_as_string", _wrap_cbf_handle_struct_get_integerarray_as_string, METH_O, "\n" + "\n" + "Returns : (Binary)String\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_integerarray (cbf_handle handle, int *binary_id,\n" + " void *array, size_t elsize, int elsigned, size_t elements,\n" + " size_t *elements_read);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_integerarray reads the binary value of the item at the \n" + "current column and row into an integer array. The array consists of \n" + "elements elements of elsize bytes each, starting at array. The \n" + "elements are signed if elsigned is non-0 and unsigned otherwise. \n" + "*binary_id is set to the binary section identifier and *elements_read \n" + "to the number of elements actually read. cbf_get_realarray reads the \n" + "binary value of the item at the current column and row into a real \n" + "array. The array consists of elements elements of elsize bytes each, \n" + "starting at array. *binary_id is set to the binary section identifier \n" + "and *elements_read to the number of elements actually read.\n" + "If any element in the integer binary data cant fit into the \n" + "destination element, the destination is set the nearest possible \n" + "value.\n" + "If the value is not binary, the function returns CBF_ASCII.\n" + "If the requested number of elements cant be read, the function will \n" + "read as many as it can and then return CBF_ENDOFDATA.\n" + "Currently, the destination array must consist of chars, shorts or \n" + "ints (signed or unsigned). If elsize is not equal to sizeof (char), \n" + "sizeof (short) or sizeof (int), for cbf_get_integerarray, or \n" + "sizeof(double) or sizeof(float), for cbf_get_realarray the function \n" + "returns CBF_ARGUMENT.\n" + "An additional restriction in the current version of CBFlib is that \n" + "values too large to fit in an int are not correctly decompressed. As \n" + "an example, if the machine with 32-bit ints is reading an array \n" + "containing a value outside the range 0 .. 2^^32-1 (unsigned) or \n" + "-2^^31 .. 2^^31-1 (signed), the array will not be correctly \n" + "decompressed. This restriction will be removed in a future release. \n" + "For cbf_get_realarray, only IEEE format is supported. No conversion \n" + "to other floating point formats is done at this time.\n" + "ARGUMENTS\n" + "handle CBF handle. binary_id Pointer to the \n" + "destination integer binary identifier. array Pointer to the \n" + "destination array. elsize Size in bytes of each destination \n" + "array element. elsigned Set to non-0 if the destination array \n" + "elements are signed. elements The number of elements to read. \n" + "elements_read Pointer to the destination number of elements \n" + "actually read.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success. SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_3d_image", _wrap_cbf_handle_struct_set_3d_image, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : int element_number,int compression,(binary) String data,int elsize,\n" + " int elsign,int dimslow,int dimmid,int dimfast\n" + "\n" + "C prototype: int cbf_set_3d_image (cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, unsigned int compression,\n" + " void *array, size_t elsize, int elsign, size_t ndimslow,\n" + " size_t ndimmid, size_t ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" + "array for element number element_number. The array consists of \n" + "ndimfast×ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-zero and unsigned otherwise. \n" + "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" + "write the image array for element number element_number. The array \n" + "consists of ndimfast×ndimslow IEEE double or float elements of \n" + "elsize bytes each, starting at array. cbf_set_3d_image, \n" + "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" + "for element number element_number. The array consists of \n" + "ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting \n" + "at array. The elements are signed if elsign is non-0 and unsigned \n" + "otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" + "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" + "element_number. The array consists of ndimfast×ndimmid×ndimslow \n" + "IEEE double or float elements of elsize bytes each, starting at \n" + "array.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "If the array is 1-dimensional, ndimslow should be the array size and \n" + "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" + "array is 2-dimensional and the 3D calls are used, ndimslow and \n" + "ndimmid should be used for the array dimensions and ndimfast should \n" + "be set to 1.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" + "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" + "(int), sizeof(double) or sizeof(float), the function returns \n" + "CBF_ARGUMENT.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any value other \n" + "than 0 is invalid. element_number The number of the detector \n" + "element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. compression Compression type. \n" + "array Pointer to the image array. elsize Size in \n" + "bytes of each image array element. elsigned Set to non-0 if \n" + "the image array elements are signed. ndimslow Slowest array \n" + "dimension. ndimmid Second slowest array dimension. ndimfast \n" + " Fastest array dimension.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_set_dictionary", _wrap_cbf_handle_struct_set_dictionary, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : CBFHandle dictionary\n" + "\n" + "C prototype: int cbf_set_dictionary (cbf_handle handle,\n" + " cbf_handle dictionary_in);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_dictionary sets *dictionary to the handle of a CBF which has \n" + "been associated with the CBF handle by cbf_set_dictionary. \n" + "cbf_set_dictionary associates the CBF handle dictionary_in with \n" + "handle as its dictionary. cbf_require_dictionary sets *dictionary to \n" + "the handle of a CBF which has been associated with the CBF handle by \n" + "cbf_set_dictionary or creates a new empty CBF and associates it with \n" + "handle, returning the new handle in *dictionary.\n" + "ARGUMENTS\n" + "handle CBF handle. dictionary Pointer to CBF handle of \n" + "dictionary. dictionary_in CBF handle of dcitionary.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_find_tag_category", _wrap_cbf_handle_struct_find_tag_category, METH_VARARGS, "\n" + "\n" + "Returns : String categoryname\n" + "*args : String tagname\n" + "\n" + "C prototype: int cbf_find_tag_category (cbf_handle handle,\n" + " const char* tagname, const char** categoryname);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_find_tag_category sets categoryname to the category associated \n" + "with tagname in the dictionary associated with handle. \n" + "cbf_set_tag_category upddates the dictionary associated with handle \n" + "to indicated that tagname is in category categoryname_in.\n" + "ARGUMENTS\n" + "handle CBF handle. tagname tag name. \n" + "categoryname pointer to a returned category name. \n" + "categoryname_in input category name.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_get_real_3d_image_sf_as_string", _wrap_cbf_handle_struct_get_real_3d_image_sf_as_string, METH_VARARGS, "\n" + "\n" + "Returns : (Binary)String\n" + "*args : int element_number,int elsize,int ndimslow,int ndimmid,int ndimfast\n" + "\n" + "C prototype: int cbf_get_real_3d_image_sf (cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " void *array, size_t elsize, size_t ndimslow,\n" + " size_t ndimmid, size_t ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" + "array for element number element_number into an array. The array \n" + "consists of ndimslow×ndimfast elements of elsize bytes each, \n" + "starting at array. The elements are signed if elsign is non-0 and \n" + "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" + "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" + "for element number element_number into an array. A real array is \n" + "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" + "cbf_get_3d_image_sf read the 3D image array for element number \n" + "element_number into an array. The array consists of \n" + "ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting \n" + "at array. The elements are signed if elsign is non-0 and unsigned \n" + "otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" + "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" + "floats for element number element_number into an array. A real array \n" + "is always signed.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "The structure of the array as a 1-, 2- or 3-dimensional array should \n" + "agree with the structure of the array given in the \n" + "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" + "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" + "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" + "being processed. If the array is 2-dimensional and a 3D call is used, \n" + "ndimslow and ndimmid should be the\n" + "\n" + ""}, + { "cbf_handle_struct_set_typeofvalue", _wrap_cbf_handle_struct_set_typeofvalue, METH_VARARGS, "\n" + "\n" + "Returns : string\n" + "*args : \n" + "\n" + "C prototype: int cbf_set_typeofvalue (cbf_handle handle,\n" + " const char *typeofvalue);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_typeofvalue sets the type of the item at the current column \n" + "and row to the type specified by the ASCII character string given by \n" + "typeofvalue. The strings that may be used are:\n" + " \"null \" for a null value indicated by a \". \" or a \"? \" \n" + "\"bnry \" for a binary value \"word \" for an unquoted string \n" + "\"dblq \" for a double-quoted string \"sglq \" for a single-quoted \n" + "string \"text \" for a semicolon-quoted string (multiline text \n" + "field) \"prns \" for a parenthesis-bracketed string (multiline text \n" + "field) \"brcs \" for a brace-bracketed string (multiline text field) \n" + " \"bkts \" for a square-bracket-bracketed string (multiline text \n" + "field) \"tsqs \" for a treble-single-quote quoted string (multiline \n" + "text field) \"tdqs \" for a treble-double-quote quoted string \n" + "(multiline text field)\n" + "Not all types may be used for all values. Not all types are valid for \n" + "all type of CIF files. In partcular the types \"prns \", \"brcs \", \n" + " \"bkts \" were introduced with DDLm and are not valid in DDL1 or \n" + "DDL2 CIFS. The types \"tsqs \" and \"tdqs \" are not formally part \n" + "of the CIF syntax. No changes may be made to the type of binary \n" + "values. You may not set the type of a string that contains a single \n" + "quote followed by a blank or a tab or which contains multiple lines \n" + "to \"sglq \". You may not set the type of a string that contains a \n" + "double quote followed by a blank or a tab or which contains multiple \n" + "lines to \"dblq \".\n" + "ARGUMENTS\n" + "handle CBF handle. typeofvalue ASCII string for desired type \n" + "of value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_axis_rotation_axis", _wrap_cbf_handle_struct_get_axis_rotation_axis, METH_VARARGS, "\n" + "\n" + "Returns : String\n" + "*args : String axis_id\n" + "\n" + "C prototype: int cbf_get_axis_rotation_axis (cbf_handle handle,\n" + " const char *axis_id, const char * *rotation_axis);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" + "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" + "axis of index ancestor_index of axis axis_id, starting with axis_id \n" + "for ancestor_index 0.\n" + "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" + "axis_id or to \". \" if there is no such ancestor. \n" + "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" + "to \". \" if there is no such equipment. \n" + "cbf_get_axis_equipment_component sets *equipment_component to the \n" + "equipment_component of axis_id or to \". \" if there is no such \n" + "equipment_component.\n" + "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" + "components of the ofset of axis_id.\n" + "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" + "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" + "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" + "is no such rotation_axis.\n" + "cbf_get_axis_setting sets *start and *increment to the corresponding \n" + "values of the axis axis_id. Any of the destination pointers may be \n" + "NULL.\n" + "cbf_get_axis_type sets axis_type to the type of axis_id.\n" + "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" + "components of the vector of axis_id.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any \n" + "value other than 0 is invalid. axis_id Axis id. \n" + "ancestor_index Integer index of the desired ancestor, starting \n" + "with 0 for the current axis_id. ancestor Pointer to \n" + "destination ancestor name pointer. depends_on Pointer to \n" + "destination depends_on name pointer. equipment Pointer to \n" + "destination equipment name pointer. equipment_component Pointer to \n" + "destination equipment_component name pointer. offset1 \n" + "Pointer to destination first offset component value. offset2 \n" + " Pointer to destination second offset component value. offset3 \n" + " Pointer to destination third offset component value. \n" + "rotation Pointer to destination rotation value. \n" + "rotation_axis Pointer to destination rotation_axisn name \n" + "pointer. start Pointer to the destination start \n" + "value. increment Pointer to the destination increment \n" + "value. type Pointer to destination axis type of type \n" + ". vector1 Pointer to destination first vector component \n" + "value. vector2 Pointer to destination second vector \n" + "component value. vector3 Pointer to destination third \n" + "vector component value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_set_integerarray_wdims", _wrap_cbf_handle_struct_set_integerarray_wdims, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : int compression,int binary_id,(binary) String data,int elsize,\n" + " int elsigned,int elements,String byteorder,int dimfast,int dimmid,\n" + " int dimslow,int padding\n" + "\n" + "C prototype: int cbf_set_integerarray_wdims (cbf_handle handle,\n" + " unsigned int compression, int binary_id, void *array,\n" + " size_t elsize, int elsigned, size_t elements,\n" + " const char *byteorder, size_t dimfast, size_t dimmid,\n" + " size_t dimslow, size_t padding);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_integerarray sets the binary value of the item at the current \n" + "column and row to an integer array. The array consists of elements \n" + "elements of elsize bytes each, starting at array. The elements are \n" + "signed if elsigned is non-0 and unsigned otherwise. binary_id is the \n" + "binary section identifier. cbf_set_realarray sets the binary value of \n" + "the item at the current column and row to an integer array. The array \n" + "consists of elements elements of elsize bytes each, starting at \n" + "array. binary_id is the binary section identifier.\n" + "The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, \n" + "cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, \n" + "cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants \n" + "allow the data header values of byteorder, dimfast, dimmid, dimslow \n" + "and padding to be set to the data byte order, the fastest, second \n" + "fastest and third fastest array dimensions and the size in byte of \n" + "the post data padding to be used.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + " Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression. \n" + "NOTE: This scheme is by far the slowest of the four and uses much \n" + "more disk space. It is intended for routine use with small arrays \n" + "only. With large arrays (like images) it should be used only for \n" + "debugging.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or \n" + "floats for cbf_set_realarray. If elsize is not equal to sizeof \n" + "(char), sizeof (short) or sizeof (int), the function returns \n" + "CBF_ARGUMENT.\n" + "ARGUMENTS\n" + "handle CBF handle. compression Compression method to use. \n" + "binary_id Integer binary identifier. array Pointer to the \n" + "source array. elsize Size in bytes of each source array \n" + "element. elsigned Set to non-0 if the source array elements are \n" + "signed. elements The number of elements in the array\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_integration_time", _wrap_cbf_handle_struct_set_integration_time, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : Float time\n" + "\n" + "C prototype: int cbf_set_integration_time (cbf_handle handle,\n" + " unsigned int reserved, double time);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_integration_time sets the integration time in seconds to the \n" + "value specified by time. The parameter reserved is presently unused \n" + "and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any value other than 0 is \n" + "invalid. time Integration time in seconds.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_set_axis_setting", _wrap_cbf_handle_struct_set_axis_setting, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : String axis_id,Float start,Float increment\n" + "\n" + "C prototype: int cbf_set_axis_setting (cbf_handle handle,\n" + " unsigned int reserved, const char *axis_id, double start,\n" + " double increment);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_axis_setting sets the starting and increment values of the \n" + "axis axis_id to start and increment.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any value other than 0 is \n" + "invalid. axis_id Axis id. start Start value. increment \n" + "Increment value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_get_real_image_as_string", _wrap_cbf_handle_struct_get_real_image_as_string, METH_VARARGS, "\n" + "\n" + "Returns : (Binary)String\n" + "*args : int element_number,int elsize,int ndimslow,int ndimfast\n" + "\n" + "C prototype: int cbf_get_real_image (cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, void *array, size_t elsize,\n" + " size_t ndimslow, size_t ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" + "array for element number element_number into an array. The array \n" + "consists of ndimslow×ndimfast elements of elsize bytes each, \n" + "starting at array. The elements are signed if elsign is non-0 and \n" + "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" + "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" + "for element number element_number into an array. A real array is \n" + "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" + "cbf_get_3d_image_sf read the 3D image array for element number \n" + "element_number into an array. The array consists of \n" + "ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting \n" + "at array. The elements are signed if elsign is non-0 and unsigned \n" + "otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" + "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" + "floats for element number element_number into an array. A real array \n" + "is always signed.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "The structure of the array as a 1-, 2- or 3-dimensional array should \n" + "agree with the structure of the array given in the \n" + "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" + "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" + "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" + "being processed. If the array is 2-dimensional and a 3D call is used, \n" + "ndimslow and ndimmid should be the\n" + "\n" + ""}, + { "cbf_handle_struct_get_axis_ancestor", _wrap_cbf_handle_struct_get_axis_ancestor, METH_VARARGS, "\n" + "\n" + "Returns : String\n" + "*args : String axis_id,Integer ancestor_index\n" + "\n" + "C prototype: int cbf_get_axis_ancestor (cbf_handle handle,\n" + " const char *axis_id, const unsigned int ancestor_index,\n" + " const char * *ancestor);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" + "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" + "axis of index ancestor_index of axis axis_id, starting with axis_id \n" + "for ancestor_index 0.\n" + "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" + "axis_id or to \". \" if there is no such ancestor. \n" + "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" + "to \". \" if there is no such equipment. \n" + "cbf_get_axis_equipment_component sets *equipment_component to the \n" + "equipment_component of axis_id or to \". \" if there is no such \n" + "equipment_component.\n" + "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" + "components of the ofset of axis_id.\n" + "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" + "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" + "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" + "is no such rotation_axis.\n" + "cbf_get_axis_setting sets *start and *increment to the corresponding \n" + "values of the axis axis_id. Any of the destination pointers may be \n" + "NULL.\n" + "cbf_get_axis_type sets axis_type to the type of axis_id.\n" + "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" + "components of the vector of axis_id.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any \n" + "value other than 0 is invalid. axis_id Axis id. \n" + "ancestor_index Integer index of the desired ancestor, starting \n" + "with 0 for the current axis_id. ancestor Pointer to \n" + "destination ancestor name pointer. depends_on Pointer to \n" + "destination depends_on name pointer. equipment Pointer to \n" + "destination equipment name pointer. equipment_component Pointer to \n" + "destination equipment_component name pointer. offset1 \n" + "Pointer to destination first offset component value. offset2 \n" + " Pointer to destination second offset component value. offset3 \n" + " Pointer to destination third offset component value. \n" + "rotation Pointer to destination rotation value. \n" + "rotation_axis Pointer to destination rotation_axisn name \n" + "pointer. start Pointer to the destination start \n" + "value. increment Pointer to the destination increment \n" + "value. type Pointer to destination axis type of type \n" + ". vector1 Pointer to destination first vector component \n" + "value. vector2 Pointer to destination second vector \n" + "component value. vector3 Pointer to destination third \n" + "vector component value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_get_3d_image_sf_as_string", _wrap_cbf_handle_struct_get_3d_image_sf_as_string, METH_VARARGS, "\n" + "\n" + "Returns : (Binary)String\n" + "*args : int element_number,int elsize,int elsign,int ndimslow,int ndimmid,\n" + " int ndimfast\n" + "\n" + "C prototype: int cbf_get_3d_image_sf (cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " void *array, size_t elsize, int elsign, size_t ndimslow,\n" + " size_t ndimmid, size_t ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" + "array for element number element_number into an array. The array \n" + "consists of ndimslow×ndimfast elements of elsize bytes each, \n" + "starting at array. The elements are signed if elsign is non-0 and \n" + "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" + "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" + "for element number element_number into an array. A real array is \n" + "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" + "cbf_get_3d_image_sf read the 3D image array for element number \n" + "element_number into an array. The array consists of \n" + "ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting \n" + "at array. The elements are signed if elsign is non-0 and unsigned \n" + "otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" + "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" + "floats for element number element_number into an array. A real array \n" + "is always signed.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "The structure of the array as a 1-, 2- or 3-dimensional array should \n" + "agree with the structure of the array given in the \n" + "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" + "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" + "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" + "being processed. If the array is 2-dimensional and a 3D call is used, \n" + "ndimslow and ndimmid should be the\n" + "\n" + ""}, + { "cbf_handle_struct_set_real_image_fs", _wrap_cbf_handle_struct_set_real_image_fs, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : int element_number,int compression,(binary) String data,int elsize,\n" + " int dimfast,int dimslow\n" + "\n" + "C prototype: int cbf_set_real_image_fs(cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " unsigned int compression, void *array,size_t elsize,\n" + " size_t ndimfast, size_t ndimslow);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" + "array for element number element_number. The array consists of \n" + "ndimfast×ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-zero and unsigned otherwise. \n" + "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" + "write the image array for element number element_number. The array \n" + "consists of ndimfast×ndimslow IEEE double or float elements of \n" + "elsize bytes each, starting at array. cbf_set_3d_image, \n" + "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" + "for element number element_number. The array consists of \n" + "ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting \n" + "at array. The elements are signed if elsign is non-0 and unsigned \n" + "otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" + "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" + "element_number. The array consists of ndimfast×ndimmid×ndimslow \n" + "IEEE double or float elements of elsize bytes each, starting at \n" + "array.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "If the array is 1-dimensional, ndimslow should be the array size and \n" + "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" + "array is 2-dimensional and the 3D calls are used, ndimslow and \n" + "ndimmid should be used for the array dimensions and ndimfast should \n" + "be set to 1.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" + "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" + "(int), sizeof(double) or sizeof(float), the function returns \n" + "CBF_ARGUMENT.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any value other \n" + "than 0 is invalid. element_number The number of the detector \n" + "element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. compression Compression type. \n" + "array Pointer to the image array. elsize Size in \n" + "bytes of each image array element. elsigned Set to non-0 if \n" + "the image array elements are signed. ndimslow Slowest array \n" + "dimension. ndimmid Second slowest array dimension. ndimfast \n" + " Fastest array dimension.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_get_overload", _wrap_cbf_handle_struct_get_overload, METH_VARARGS, "\n" + "\n" + "Returns : Float overload\n" + "*args : Integer element_number\n" + "\n" + "C prototype: int cbf_get_overload (cbf_handle handle,\n" + " unsigned int element_number, double *overload);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_overload sets *overload to the overload value for element \n" + "number element_number.\n" + "ARGUMENTS\n" + "handle CBF handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. overload Pointer to the \n" + "destination overload.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_get_wavelength", _wrap_cbf_handle_struct_get_wavelength, METH_O, "\n" + "\n" + "Returns : double\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_wavelength (cbf_handle handle, double *wavelength);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_wavelength sets *wavelength to the current wavelength in Å.\n" + "ARGUMENTS\n" + "handle CBF handle. wavelength Pointer to the destination.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_next_datablock", _wrap_cbf_handle_struct_next_datablock, METH_O, "\n" + "\n" + "Returns : \n" + "*args : \n" + "\n" + "C prototype: int cbf_next_datablock (cbf_handle handle);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_next_datablock makes the data block following the current data \n" + "block the current data block.\n" + "If there are no more data blocks, the function returns CBF_NOTFOUND.\n" + "The current category becomes undefined.\n" + "ARGUMENTS\n" + "handle CBF handle.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_realarrayparameters_wdims", _wrap_cbf_handle_struct_get_realarrayparameters_wdims, METH_O, "\n" + "\n" + "Returns : int compression,int binary_id,int elsize,int elements,char **bo,\n" + " int *bolen,int dimfast,int dimmid,int dimslow,int padding\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_realarrayparameters_wdims (cbf_handle handle,\n" + " unsigned int *compression, int *binary_id, size_t *elsize,\n" + " size_t *elements, const char **byteorder, size_t *dimfast,\n" + " size_t *dimmid, size_t *dimslow, size_t *padding);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_integerarrayparameters sets *compression, *binary_id, \n" + "*elsize, *elsigned, *elunsigned, *elements, *minelement and \n" + "*maxelement to values read from the binary value of the item at the \n" + "current column and row. This provides all the arguments needed for a \n" + "subsequent call to cbf_set_integerarray, if a copy of the array is to \n" + "be made into another CIF or CBF. cbf_get_realarrayparameters sets \n" + "*compression, *binary_id, *elsize, *elements to values read from the \n" + "binary value of the item at the current column and row. This provides \n" + "all the arguments needed for a subsequent call to cbf_set_realarray, \n" + "if a copy of the arry is to be made into another CIF or CBF.\n" + "The variants cbf_get_integerarrayparameters_wdims, \n" + "cbf_get_integerarrayparameters_wdims_fs, \n" + "cbf_get_integerarrayparameters_wdims_sf, \n" + "cbf_get_realarrayparameters_wdims, \n" + "cbf_get_realarrayparameters_wdims_fs, \n" + "cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, \n" + "*dimmid, *dimslow, and *padding as well, providing the additional \n" + "parameters needed for a subsequent call to cbf_set_integerarray_wdims \n" + "or cbf_set_realarray_wdims.\n" + "The value returned in *byteorder is a pointer either to the string \n" + "\"little_endian \" or to the string \"big_endian \". This should be \n" + "the byte order of the data, not necessarily of the host machine. No \n" + "attempt should be made to modify this string. At this time only \n" + "\"little_endian \" will be returned.\n" + "The values returned in *dimfast, *dimmid and *dimslow are the sizes \n" + "of the fastest changing, second fastest changing and third fastest \n" + "changing dimensions of the array, if specified, or zero, if not \n" + "specified.\n" + "The value returned in *padding is the size of the post-data padding, \n" + "if any and if specified in the data header. The value is given as a \n" + "count of octets.\n" + "If the value is not binary, the function returns CBF_ASCII.\n" + "ARGUMENTS\n" + "handle CBF handle. compression Compression method used. \n" + "elsize Size in bytes of each array element. binary_id \n" + "Pointer to the destination integer binary identifier. elsigned \n" + "Pointer to an integer. Set to 1 if the elements can be read as signed \n" + "integers. elunsigned Pointer to an integer. Set to 1 if the \n" + "elements can be read as unsigned integers. elements Pointer to \n" + "the destination number of elements. minelement Pointer to the \n" + "destination smallest element. maxelement Pointer to the \n" + "destination largest element. byteorder Pointer to the destination \n" + "byte order. dimfast Pointer to the destination fastest \n" + "dimension. dimmid Pointer to the destination second fastest \n" + "dimension. dimslow Pointer to the destination third fastest \n" + "dimension. padding Pointer to the destination padding size.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_orientation_matrix", _wrap_cbf_handle_struct_set_orientation_matrix, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : Float matrix_0,Float matrix_1,Float matrix_2,Float matrix_3,\n" + " Float matrix_4,Float matrix_5,Float matrix_6,Float matrix_7,\n" + " Float matrix_8\n" + "\n" + "C prototype: int cbf_set_orientation_matrix (cbf_handle handle,\n" + " double ub_matrix[9]);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_orientation_matrix sets ub_matrix to point to the array of \n" + "orientation matrix entries in the \"diffrn \" category in the order \n" + "of columns:\n" + " \"UB[1][1] \" \"UB[1][2] \" \"UB[1][3] \" \"UB[2][1] \" \n" + "\"UB[2][2] \" \"UB[2][3] \" \"UB[3][1] \" \"UB[3][2] \" \n" + "\"UB[3][3] \"\n" + "cbf_set_orientation_matrix sets the values in the \"diffrn \" \n" + "category to the values pointed to by ub_matrix.\n" + "ARGUMENTS\n" + "handle CBF handle. ub_matrix Source or destination array of 9 \n" + "doubles giving the orientation matrix parameters.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_new_category", _wrap_cbf_handle_struct_new_category, METH_VARARGS, "\n" + "\n" + "Returns : string\n" + "*args : \n" + "\n" + "C prototype: int cbf_new_category (cbf_handle handle,\n" + " const char *categoryname);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_new_category creates a new category in the current data block \n" + "with name categoryname and makes it the current category.\n" + "If a category with this name already exists, the existing category \n" + "becomes the current category.\n" + "ARGUMENTS\n" + "handle CBF handle. categoryname The name of the new \n" + "category.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_gain", _wrap_cbf_handle_struct_set_gain, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : Float gain,Float gain_esd\n" + "\n" + "C prototype: int cbf_set_gain (cbf_handle handle, unsigned int element_number,\n" + " double gain, double gain_esd);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_gain sets the gain of element number element_number to the \n" + "values specified by gain and gain_esd.\n" + "ARGUMENTS\n" + "handle CBF handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. gain New gain value. \n" + "gain_esd New gain_esd value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_find_column", _wrap_cbf_handle_struct_find_column, METH_VARARGS, "\n" + "\n" + "Returns : string\n" + "*args : \n" + "\n" + "C prototype: int cbf_find_column (cbf_handle handle, const char *columnname);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_find_column makes the columns in the current category with name \n" + "columnname the current column.\n" + "The comparison is case-insensitive.\n" + "If the column does not exist, the function returns CBF_NOTFOUND.\n" + "The current row is not affected.\n" + "ARGUMENTS\n" + "handle CBF handle. columnname The name of column to find.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_remove_category", _wrap_cbf_handle_struct_remove_category, METH_O, "\n" + "\n" + "Returns : \n" + "*args : \n" + "\n" + "C prototype: int cbf_remove_category (cbf_handle handle);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_remove_category deletes the current category.\n" + "The current category becomes undefined.\n" + "ARGUMENTS\n" + "handle CBF handle.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_integerarrayparameters_wdims_sf", _wrap_cbf_handle_struct_get_integerarrayparameters_wdims_sf, METH_O, "\n" + "\n" + "Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned,\n" + " int elements,int minelement,int maxelement,char **bo,int *bolen,\n" + " int dimslow,int dimmid,int dimfast,int padding\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_integerarrayparameters_wdims_sf (cbf_handle handle,\n" + " unsigned int *compression, int *binary_id, size_t *elsize,\n" + " int *elsigned, int *elunsigned, size_t *elements,\n" + " int *minelement, int *maxelement, const char **byteorder,\n" + " size_t *dimslow, size_t *dimmid, size_t *dimfast,\n" + " size_t *padding);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_integerarrayparameters sets *compression, *binary_id, \n" + "*elsize, *elsigned, *elunsigned, *elements, *minelement and \n" + "*maxelement to values read from the binary value of the item at the \n" + "current column and row. This provides all the arguments needed for a \n" + "subsequent call to cbf_set_integerarray, if a copy of the array is to \n" + "be made into another CIF or CBF. cbf_get_realarrayparameters sets \n" + "*compression, *binary_id, *elsize, *elements to values read from the \n" + "binary value of the item at the current column and row. This provides \n" + "all the arguments needed for a subsequent call to cbf_set_realarray, \n" + "if a copy of the arry is to be made into another CIF or CBF.\n" + "The variants cbf_get_integerarrayparameters_wdims, \n" + "cbf_get_integerarrayparameters_wdims_fs, \n" + "cbf_get_integerarrayparameters_wdims_sf, \n" + "cbf_get_realarrayparameters_wdims, \n" + "cbf_get_realarrayparameters_wdims_fs, \n" + "cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, \n" + "*dimmid, *dimslow, and *padding as well, providing the additional \n" + "parameters needed for a subsequent call to cbf_set_integerarray_wdims \n" + "or cbf_set_realarray_wdims.\n" + "The value returned in *byteorder is a pointer either to the string \n" + "\"little_endian \" or to the string \"big_endian \". This should be \n" + "the byte order of the data, not necessarily of the host machine. No \n" + "attempt should be made to modify this string. At this time only \n" + "\"little_endian \" will be returned.\n" + "The values returned in *dimfast, *dimmid and *dimslow are the sizes \n" + "of the fastest changing, second fastest changing and third fastest \n" + "changing dimensions of the array, if specified, or zero, if not \n" + "specified.\n" + "The value returned in *padding is the size of the post-data padding, \n" + "if any and if specified in the data header. The value is given as a \n" + "count of octets.\n" + "If the value is not binary, the function returns CBF_ASCII.\n" + "ARGUMENTS\n" + "handle CBF handle. compression Compression method used. \n" + "elsize Size in bytes of each array element. binary_id \n" + "Pointer to the destination integer binary identifier. elsigned \n" + "Pointer to an integer. Set to 1 if the elements can be read as signed \n" + "integers. elunsigned Pointer to an integer. Set to 1 if the \n" + "elements can be read as unsigned integers. elements Pointer to \n" + "the destination number of elements. minelement Pointer to the \n" + "destination smallest element. maxelement Pointer to the \n" + "destination largest element. byteorder Pointer to the destination \n" + "byte order. dimfast Pointer to the destination fastest \n" + "dimension. dimmid Pointer to the destination second fastest \n" + "dimension. dimslow Pointer to the destination third fastest \n" + "dimension. padding Pointer to the destination padding size.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_pixel_size", _wrap_cbf_handle_struct_get_pixel_size, METH_VARARGS, "\n" + "\n" + "Returns : Float pixel_size\n" + "*args : Int element_number,Int axis_number\n" + "\n" + "C prototype: int cbf_get_pixel_size (cbf_handle handle,\n" + " unsigned int element_number, int axis_number,\n" + " double *psize);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to \n" + "the double value in millimeters of the axis axis_number of the \n" + "detector element element_number. The axis_number is numbered from 1, \n" + "starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to \n" + "point to the double value in millimeters of the axis axis_number of \n" + "the detector element element_number. The axis_number is numbered from \n" + "1, starting with the fastest axis.\n" + "If a negative axis number is given, the order of axes is reversed, so \n" + "that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the \n" + "fastest axis for cbf_get_pixel_size_sf.\n" + "If the pixel size is not given explcitly in the \"array_element_size \n" + "\" category, the function returns CBF_NOTFOUND.\n" + "ARGUMENTS\n" + "handle CBF handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. axis_number The number of the \n" + "axis, starting from 1 for the fastest for cbf_get_pixel_size and \n" + "cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. \n" + "psize Pointer to the destination pixel size.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_set_real_image_sf", _wrap_cbf_handle_struct_set_real_image_sf, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : int element_number,int compression,(binary) String data,int elsize,\n" + " int dimslow,int dimfast\n" + "\n" + "C prototype: int cbf_set_real_image_sf(cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " unsigned int compression, void *array,size_t elsize,\n" + " size_t ndimslow, size_t ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" + "array for element number element_number. The array consists of \n" + "ndimfast×ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-zero and unsigned otherwise. \n" + "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" + "write the image array for element number element_number. The array \n" + "consists of ndimfast×ndimslow IEEE double or float elements of \n" + "elsize bytes each, starting at array. cbf_set_3d_image, \n" + "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" + "for element number element_number. The array consists of \n" + "ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting \n" + "at array. The elements are signed if elsign is non-0 and unsigned \n" + "otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" + "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" + "element_number. The array consists of ndimfast×ndimmid×ndimslow \n" + "IEEE double or float elements of elsize bytes each, starting at \n" + "array.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "If the array is 1-dimensional, ndimslow should be the array size and \n" + "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" + "array is 2-dimensional and the 3D calls are used, ndimslow and \n" + "ndimmid should be used for the array dimensions and ndimfast should \n" + "be set to 1.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" + "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" + "(int), sizeof(double) or sizeof(float), the function returns \n" + "CBF_ARGUMENT.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any value other \n" + "than 0 is invalid. element_number The number of the detector \n" + "element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. compression Compression type. \n" + "array Pointer to the image array. elsize Size in \n" + "bytes of each image array element. elsigned Set to non-0 if \n" + "the image array elements are signed. ndimslow Slowest array \n" + "dimension. ndimmid Second slowest array dimension. ndimfast \n" + " Fastest array dimension.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_require_category", _wrap_cbf_handle_struct_require_category, METH_VARARGS, "\n" + "\n" + "Returns : string\n" + "*args : \n" + "\n" + "C prototype: int cbf_require_category (cbf_handle handle,\n" + " const char *categoryname);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_rewuire_category makes the category in the current data block \n" + "with name categoryname the current category, if it exists, or creates \n" + "the catagory if it does not exist.\n" + "The comparison is case-insensitive.\n" + "The current column and row become undefined.\n" + "ARGUMENTS\n" + "handle CBF handle. categoryname The name of the category to \n" + "find.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_reciprocal_cell", _wrap_cbf_handle_struct_get_reciprocal_cell, METH_O, "\n" + "\n" + "Returns : Float astar,Float bstar,Float cstar,Float alphastar,Float betastar,\n" + " Float gammastar\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_reciprocal_cell (cbf_handle handle, double cell[6],\n" + " double cell_esd[6] );\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_reciprocal_cell sets cell[0:2] to the double values of the \n" + "reciprocal cell edge lengths a^*, b^* and c^* in Ångstroms^-1, \n" + "cell[3:5] to the double values of the reciprocal cell angles α^*, \n" + "β^* and γ^* in degrees, cell_esd[0:2] to the double values of the \n" + "estimated strandard deviations of the reciprocal cell edge lengths \n" + "a^*, b^* and c^* in Ångstroms^-1, cell_esd[3:5] to the double values \n" + "of the estimated standard deviations of the the reciprocal cell \n" + "angles α^*, β^* and γ^* in degrees.\n" + "The values returned are retrieved from the first row of the \"cell \n" + "\" category. The value of \"_cell.entry_id \" is ignored.\n" + "cell or cell_esd may be NULL.\n" + "If cell is NULL, the reciprocal cell parameters are not retrieved.\n" + "If cell_esd is NULL, the reciprocal cell parameter esds are not \n" + "retrieved.\n" + "If the \"cell \" category is present, but some of the values are \n" + "missing, zeros are returned for the missing values.\n" + "ARGUMENTS\n" + "handle CBF handle. cell Pointer to the destination array of \n" + "6 doubles for the reciprocal cell parameters. cell_esd Pointer to \n" + "the destination array of 6 doubles for the reciprocal cell parameter \n" + "esds.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success. No errors is \n" + "returned for missing values if the \"cell \" category exists.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_reciprocal_cell_esd", _wrap_cbf_handle_struct_get_reciprocal_cell_esd, METH_O, "cbf_handle_struct_get_reciprocal_cell_esd(cbf_handle_struct self)"}, + { "cbf_handle_struct_get_3d_image_size", _wrap_cbf_handle_struct_get_3d_image_size, METH_VARARGS, "\n" + "\n" + "Returns : size_t ndimslow,size_t ndimmid,size_t ndimfast\n" + "*args : Integer element_number\n" + "\n" + "C prototype: int cbf_get_3d_image_size (cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " size_t *ndimslow, size_t *ndimmid, size_t *ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf \n" + "set *ndimslow and *ndimfast to the slow and fast dimensions of the \n" + "image array for element number element_number. If the array is \n" + "1-dimensional, *ndimslow will be set to the array size and *ndimfast \n" + "will be set to 1. If the array is 3-dimensional an error code will be \n" + "returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and \n" + "cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the \n" + "slowest, next fastest and fastest dimensions, respectively, of the 3D \n" + "image array for element number element_number. If the array is \n" + "1-dimensional, *ndimslow will be set to the array size and *ndimmid \n" + "and\n" + "\n" + ""}, + { "cbf_handle_struct_find_tag_root", _wrap_cbf_handle_struct_find_tag_root, METH_VARARGS, "\n" + "\n" + "Returns : String tagroot\n" + "*args : String tagname\n" + "\n" + "C prototype: int cbf_find_tag_root (cbf_handle handle, const char* tagname,\n" + " const char** tagroot);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_find_tag_root sets *tagroot to the root tag of which tagname is \n" + "an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in \n" + "the dictionary associated with handle, creating the dictionary if \n" + "necessary. cbf_require_tag_root sets *tagroot to the root tag of \n" + "which tagname is an alias, if there is one, or to the value of \n" + "tagname, if tagname is not an alias.\n" + "A returned tagroot string must not be modified in any way.\n" + "ARGUMENTS\n" + "handle CBF handle. tagname tag name which may be an alias. \n" + "tagroot pointer to a returned tag root name. tagroot_in input \n" + "tag root name.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_require_category_root", _wrap_cbf_handle_struct_require_category_root, METH_VARARGS, "cbf_handle_struct_require_category_root(cbf_handle_struct self, char const * categoryname) -> char const *"}, + { "cbf_handle_struct_set_realarray_wdims_sf", _wrap_cbf_handle_struct_set_realarray_wdims_sf, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : int compression,int binary_id,(binary) String data,int elsize,\n" + " int elements,String byteorder,int dimslow,int dimmid,int dimfast,\n" + " int padding\n" + "\n" + "C prototype: int cbf_set_realarray_wdims_sf (cbf_handle handle,\n" + " unsigned int compression, int binary_id, void *array,\n" + " size_t elsize, size_t elements, const char *byteorder,\n" + " size_t dimslow, size_t dimmid, size_t dimfast,\n" + " size_t padding);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_integerarray sets the binary value of the item at the current \n" + "column and row to an integer array. The array consists of elements \n" + "elements of elsize bytes each, starting at array. The elements are \n" + "signed if elsigned is non-0 and unsigned otherwise. binary_id is the \n" + "binary section identifier. cbf_set_realarray sets the binary value of \n" + "the item at the current column and row to an integer array. The array \n" + "consists of elements elements of elsize bytes each, starting at \n" + "array. binary_id is the binary section identifier.\n" + "The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, \n" + "cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, \n" + "cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants \n" + "allow the data header values of byteorder, dimfast, dimmid, dimslow \n" + "and padding to be set to the data byte order, the fastest, second \n" + "fastest and third fastest array dimensions and the size in byte of \n" + "the post data padding to be used.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + " Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression. \n" + "NOTE: This scheme is by far the slowest of the four and uses much \n" + "more disk space. It is intended for routine use with small arrays \n" + "only. With large arrays (like images) it should be used only for \n" + "debugging.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or \n" + "floats for cbf_set_realarray. If elsize is not equal to sizeof \n" + "(char), sizeof (short) or sizeof (int), the function returns \n" + "CBF_ARGUMENT.\n" + "ARGUMENTS\n" + "handle CBF handle. compression Compression method to use. \n" + "binary_id Integer binary identifier. array Pointer to the \n" + "source array. elsize Size in bytes of each source array \n" + "element. elsigned Set to non-0 if the source array elements are \n" + "signed. elements The number of elements in the array\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_integervalue", _wrap_cbf_handle_struct_set_integervalue, METH_VARARGS, "\n" + "\n" + "Returns : int number\n" + "*args : \n" + "\n" + "C prototype: int cbf_set_integervalue (cbf_handle handle, int number);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_integervalue sets the item at the current column and row to \n" + "the integer value number written as a decimal ASCII string.\n" + "ARGUMENTS\n" + "handle CBF handle. number Integer value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_category_name", _wrap_cbf_handle_struct_category_name, METH_O, "\n" + "\n" + "Returns : \n" + "*args : string\n" + "\n" + "C prototype: int cbf_category_name (cbf_handle handle,\n" + " const char **categoryname);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_category_name sets *categoryname to point to the name of the \n" + "current category of the current data block.\n" + "The category name will be valid as long as the category exists.\n" + "The name must not be modified by the program in any way.\n" + "ARGUMENTS\n" + "handle CBF handle. categoryname Pointer to the destination \n" + "category name pointer.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_typeofvalue", _wrap_cbf_handle_struct_get_typeofvalue, METH_O, "\n" + "\n" + "Returns : \n" + "*args : string\n" + "\n" + "C prototype: int cbf_get_typeofvalue (cbf_handle handle,\n" + " const char **typeofvalue);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_value sets *typeofvalue to point an ASCII descriptor of the \n" + "value of the item at the current column and row. The strings that may \n" + "be returned are:\n" + " \"null \" for a null value indicated by a \". \" or a \"? \" \n" + "\"bnry \" for a binary value \"word \" for an unquoted string \n" + "\"dblq \" for a double-quoted string \"sglq \" for a single-quoted \n" + "string \"text \" for a semicolon-quoted string (multiline text \n" + "field) \"prns \" for a parenthesis-bracketed string (multiline text \n" + "field) \"brcs \" for a brace-bracketed string (multiline text field) \n" + " \"bkts \" for a square-bracket-bracketed string (multiline text \n" + "field) \"tsqs \" for a treble-single-quote quoted string (multiline \n" + "text field) \"tdqs \" for a treble-double-quote quoted string \n" + "(multiline text field)\n" + "Not all types are valid for all type of CIF files. In partcular the \n" + "types \"prns \", \"brcs \", \"bkts \" were introduced with DDLm \n" + "and are not valid in DDL1 or DDL2 CIFS. The types \"tsqs \" and \n" + "\"tdqs \" are not formally part of the CIF syntax. A field for which \n" + "no value has been set sets *typeofvalue to NULL rather than to the \n" + "string \"null \".\n" + "The typeofvalue must not be modified by the program in any way.\n" + "ARGUMENTS\n" + "handle CBF handle. typeofvalue Pointer to the destination \n" + "type-of-value string pointer.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_real_image", _wrap_cbf_handle_struct_set_real_image, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : int element_number,int compression,(binary) String data,int elsize,\n" + " int dimslow,int dimfast\n" + "\n" + "C prototype: int cbf_set_real_image (cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, unsigned int compression,\n" + " void *array,size_t elsize, size_t ndimslow,\n" + " size_t ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" + "array for element number element_number. The array consists of \n" + "ndimfast×ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-zero and unsigned otherwise. \n" + "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" + "write the image array for element number element_number. The array \n" + "consists of ndimfast×ndimslow IEEE double or float elements of \n" + "elsize bytes each, starting at array. cbf_set_3d_image, \n" + "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" + "for element number element_number. The array consists of \n" + "ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting \n" + "at array. The elements are signed if elsign is non-0 and unsigned \n" + "otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" + "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" + "element_number. The array consists of ndimfast×ndimmid×ndimslow \n" + "IEEE double or float elements of elsize bytes each, starting at \n" + "array.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "If the array is 1-dimensional, ndimslow should be the array size and \n" + "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" + "array is 2-dimensional and the 3D calls are used, ndimslow and \n" + "ndimmid should be used for the array dimensions and ndimfast should \n" + "be set to 1.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" + "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" + "(int), sizeof(double) or sizeof(float), the function returns \n" + "CBF_ARGUMENT.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any value other \n" + "than 0 is invalid. element_number The number of the detector \n" + "element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. compression Compression type. \n" + "array Pointer to the image array. elsize Size in \n" + "bytes of each image array element. elsigned Set to non-0 if \n" + "the image array elements are signed. ndimslow Slowest array \n" + "dimension. ndimmid Second slowest array dimension. ndimfast \n" + " Fastest array dimension.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_get_3d_image_as_string", _wrap_cbf_handle_struct_get_3d_image_as_string, METH_VARARGS, "\n" + "\n" + "Returns : (Binary)String\n" + "*args : int element_number,int elsize,int elsign,int ndimslow,int ndimmid,\n" + " int ndimfast\n" + "\n" + "C prototype: int cbf_get_3d_image (cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, void *array, size_t elsize,\n" + " int elsign, size_t ndimslow, size_t ndimmid,\n" + " size_t ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" + "array for element number element_number into an array. The array \n" + "consists of ndimslow×ndimfast elements of elsize bytes each, \n" + "starting at array. The elements are signed if elsign is non-0 and \n" + "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" + "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" + "for element number element_number into an array. A real array is \n" + "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" + "cbf_get_3d_image_sf read the 3D image array for element number \n" + "element_number into an array. The array consists of \n" + "ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting \n" + "at array. The elements are signed if elsign is non-0 and unsigned \n" + "otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" + "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" + "floats for element number element_number into an array. A real array \n" + "is always signed.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "The structure of the array as a 1-, 2- or 3-dimensional array should \n" + "agree with the structure of the array given in the \n" + "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" + "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" + "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" + "being processed. If the array is 2-dimensional and a 3D call is used, \n" + "ndimslow and ndimmid should be the\n" + "\n" + ""}, + { "cbf_handle_struct_get_axis_reference_poise", _wrap_cbf_handle_struct_get_axis_reference_poise, METH_VARARGS, "\n" + "\n" + "Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2,\n" + " Float offset3\n" + "*args : String axis_id\n" + "\n" + "C prototype: int cbf_get_axis_reference_poise(cbf_handle handle,\n" + " double * vector1, double * vector2, double * vector3,\n" + " double * offset1, double * offset2, double * offset3,\n" + " const char * axis_id);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_axis_poise sets vector1, vector2, vector3 to point to the \n" + "components of the axis vector for axis axis_id, offset1, offset2, \n" + "offset3 to point to the components of the axis base offset vector for \n" + "axis axis_id, and angle to point to the angle of rotation of axis \n" + "axis_id after application of the axis settings for frame frame_id, \n" + "using ratio, a value between 0 and 1, indicating how far into the \n" + "internal motion in the frame to go. If frame_id is the string \". \n" + "\", the first frame found is used. If there is more than one frame, \n" + "which frame will be found is indeterminate. If frame_id is NULL, the \n" + "overall setting for the scan are used, rather than those for any \n" + "particular frame. The vector and offset reported are the reference \n" + "vector and offset of the axis axis_id transformed by application of \n" + "all motions of the axes on which axis_id depends.\n" + "cbf_get_goniometer_poise vector1, vector2, vector3 to point to the \n" + "components of the axis vector for the goniometer axis, offset1, \n" + "offset2, offset3 to point to the components of the axis base offset \n" + "vector for the goniometer axis, and angle to point to the angle of \n" + "rotation of the goniometer axis after application of all axis \n" + "settings in the goniometer deriving the vector, offset and angle from \n" + "the resulting matrix. Calculation of the vector is indeterminate if \n" + "the angle is zero.\n" + "cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point \n" + "to the components of the axis vector for axis axis_id, offset1, \n" + "offset2, offset3 to point to the components of the axis base offset \n" + "vector for axis axis_id unmodified by axis rotations. Any of the \n" + "pointers may be specified as NULL.\n" + "ARGUMENTS\n" + "handle CBF handle. ratio A number between 0 and 1 \n" + "indication how far into the frame to go vector1 Pointer to the \n" + "first component of the axis vector vector2 Pointer to the second \n" + "component of the axis vector vector3 Pointer to the third \n" + "component of the axis vector offset1 Pointer to the first \n" + "component of the axis offset offset2 Pointer to the second \n" + "component of the axis offset offset3 Pointer to the third \n" + "component of the axis offset angle Pointer to the rotation \n" + "angle axis_id The specified axis frame_id The specified \n" + "frame positioner CBF goniometer\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_remove_row", _wrap_cbf_handle_struct_remove_row, METH_O, "\n" + "\n" + "Returns : \n" + "*args : \n" + "\n" + "C prototype: int cbf_remove_row (cbf_handle handle);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_remove_row deletes the current row in the current category.\n" + "If the current row was the last row, it will move down by 1, \n" + "otherwise, it will remain the same.\n" + "ARGUMENTS\n" + "handle CBF handle.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_overload", _wrap_cbf_handle_struct_set_overload, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : Integer element_number,Float overload\n" + "\n" + "C prototype: int cbf_set_overload (cbf_handle handle,\n" + " unsigned int element_number, double overload);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_overload sets the overload value of element number \n" + "element_number to overload.\n" + "ARGUMENTS\n" + "handle CBF handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. overload New overload value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_get_image_size", _wrap_cbf_handle_struct_get_image_size, METH_VARARGS, "\n" + "\n" + "Returns : size_t ndim1,size_t ndim2\n" + "*args : Integer element_number\n" + "\n" + "C prototype: int cbf_get_image_size (cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, size_t *ndimslow,\n" + " size_t *ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf \n" + "set *ndimslow and *ndimfast to the slow and fast dimensions of the \n" + "image array for element number element_number. If the array is \n" + "1-dimensional, *ndimslow will be set to the array size and *ndimfast \n" + "will be set to 1. If the array is 3-dimensional an error code will be \n" + "returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and \n" + "cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the \n" + "slowest, next fastest and fastest dimensions, respectively, of the 3D \n" + "image array for element number element_number. If the array is \n" + "1-dimensional, *ndimslow will be set to the array size and *ndimmid \n" + "and\n" + "\n" + ""}, + { "cbf_handle_struct_set_3d_image_sf", _wrap_cbf_handle_struct_set_3d_image_sf, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : int element_number,int compression,(binary) String data,int elsize,\n" + " int elsign,int dimslow,int dimmid,int dimfast\n" + "\n" + "C prototype: int cbf_set_3d_image_sf(cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, unsigned int compression,\n" + " void *array, size_t elsize, int elsign, size_t ndimslow,\n" + " size_t ndimmid, size_t ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" + "array for element number element_number. The array consists of \n" + "ndimfast×ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-zero and unsigned otherwise. \n" + "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" + "write the image array for element number element_number. The array \n" + "consists of ndimfast×ndimslow IEEE double or float elements of \n" + "elsize bytes each, starting at array. cbf_set_3d_image, \n" + "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" + "for element number element_number. The array consists of \n" + "ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting \n" + "at array. The elements are signed if elsign is non-0 and unsigned \n" + "otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" + "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" + "element_number. The array consists of ndimfast×ndimmid×ndimslow \n" + "IEEE double or float elements of elsize bytes each, starting at \n" + "array.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "If the array is 1-dimensional, ndimslow should be the array size and \n" + "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" + "array is 2-dimensional and the 3D calls are used, ndimslow and \n" + "ndimmid should be used for the array dimensions and ndimfast should \n" + "be set to 1.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" + "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" + "(int), sizeof(double) or sizeof(float), the function returns \n" + "CBF_ARGUMENT.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any value other \n" + "than 0 is invalid. element_number The number of the detector \n" + "element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. compression Compression type. \n" + "array Pointer to the image array. elsize Size in \n" + "bytes of each image array element. elsigned Set to non-0 if \n" + "the image array elements are signed. ndimslow Slowest array \n" + "dimension. ndimmid Second slowest array dimension. ndimfast \n" + " Fastest array dimension.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_get_real_image_sf_as_string", _wrap_cbf_handle_struct_get_real_image_sf_as_string, METH_VARARGS, "\n" + "\n" + "Returns : (Binary)String\n" + "*args : int element_number,int elsize,int ndimslow,int ndimfast\n" + "\n" + "C prototype: int cbf_get_real_image_sf (cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " void *array, size_t elsize, size_t ndimslow,\n" + " size_t ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" + "array for element number element_number into an array. The array \n" + "consists of ndimslow×ndimfast elements of elsize bytes each, \n" + "starting at array. The elements are signed if elsign is non-0 and \n" + "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" + "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" + "for element number element_number into an array. A real array is \n" + "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" + "cbf_get_3d_image_sf read the 3D image array for element number \n" + "element_number into an array. The array consists of \n" + "ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting \n" + "at array. The elements are signed if elsign is non-0 and unsigned \n" + "otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" + "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" + "floats for element number element_number into an array. A real array \n" + "is always signed.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "The structure of the array as a 1-, 2- or 3-dimensional array should \n" + "agree with the structure of the array given in the \n" + "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" + "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" + "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" + "being processed. If the array is 2-dimensional and a 3D call is used, \n" + "ndimslow and ndimmid should be the\n" + "\n" + ""}, + { "cbf_handle_struct_get_image_as_string", _wrap_cbf_handle_struct_get_image_as_string, METH_VARARGS, "\n" + "\n" + "Returns : (Binary)String\n" + "*args : int element_number,int elsize,int elsign,int ndimslow,int ndimfast\n" + "\n" + "C prototype: int cbf_get_image (cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, void *array, size_t elsize,\n" + " int elsign, size_t ndimslow, size_t ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" + "array for element number element_number into an array. The array \n" + "consists of ndimslow×ndimfast elements of elsize bytes each, \n" + "starting at array. The elements are signed if elsign is non-0 and \n" + "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" + "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" + "for element number element_number into an array. A real array is \n" + "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" + "cbf_get_3d_image_sf read the 3D image array for element number \n" + "element_number into an array. The array consists of \n" + "ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting \n" + "at array. The elements are signed if elsign is non-0 and unsigned \n" + "otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" + "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" + "floats for element number element_number into an array. A real array \n" + "is always signed.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "The structure of the array as a 1-, 2- or 3-dimensional array should \n" + "agree with the structure of the array given in the \n" + "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" + "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" + "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" + "being processed. If the array is 2-dimensional and a 3D call is used, \n" + "ndimslow and ndimmid should be the\n" + "\n" + ""}, + { "cbf_handle_struct_set_tag_root", _wrap_cbf_handle_struct_set_tag_root, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : String tagname,String tagroot_in\n" + "\n" + "C prototype: int cbf_set_tag_root (cbf_handle handle, const char* tagname,\n" + " const char*tagroot_in);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_find_tag_root sets *tagroot to the root tag of which tagname is \n" + "an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in \n" + "the dictionary associated with handle, creating the dictionary if \n" + "necessary. cbf_require_tag_root sets *tagroot to the root tag of \n" + "which tagname is an alias, if there is one, or to the value of \n" + "tagname, if tagname is not an alias.\n" + "A returned tagroot string must not be modified in any way.\n" + "ARGUMENTS\n" + "handle CBF handle. tagname tag name which may be an alias. \n" + "tagroot pointer to a returned tag root name. tagroot_in input \n" + "tag root name.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_write_widefile", _wrap_cbf_handle_struct_write_widefile, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : String filename,Integer ciforcbf,Integer Headers,Integer encoding\n" + "\n" + "C prototype: int cbf_write_widefile (cbf_handle handle, FILE *file,\n" + " int readable, int ciforcbf, int flags, int encoding);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_write_file writes the CBF object specified by handle into the \n" + "file file, following CIF 1.0 conventions of 80 character lines. \n" + "cbf_write_widefile writes the CBF object specified by handle into the \n" + "file file, following CIF 1.1 conventions of 2048 character lines. A \n" + "warning is issued to stderr for ascii lines over the limit, and an \n" + "attempt is made to fold lines to fit. No test is performed on binary \n" + "sections.\n" + "If a dictionary has been provided, aliases will be applied on output.\n" + "Unlike cbf_read_file, the file does not have to be random-access.\n" + "If the file is random-access and readable, readable can be set to \n" + "non-0 to indicate to CBFlib that the file can be used as a buffer to \n" + "conserve disk space. If the file is not random-access or not \n" + "readable, readable must be 0.\n" + "\n" + ""}, + { "cbf_handle_struct_count_rows", _wrap_cbf_handle_struct_count_rows, METH_O, "\n" + "\n" + "Returns : Integer\n" + "*args : \n" + "\n" + "C prototype: int cbf_count_rows (cbf_handle handle, unsigned int *rows);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_count_rows puts the number of rows in the current category in \n" + "*rows .\n" + "ARGUMENTS\n" + "handle CBF handle. rows Pointer to the destination row count.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_require_datablock", _wrap_cbf_handle_struct_require_datablock, METH_VARARGS, "\n" + "\n" + "Returns : string\n" + "*args : \n" + "\n" + "C prototype: int cbf_require_datablock (cbf_handle handle,\n" + " const char *datablockname);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_require_datablock makes the data block with name datablockname \n" + "the current data block, if it exists, or creates it if it does not.\n" + "The comparison is case-insensitive.\n" + "The current category becomes undefined.\n" + "ARGUMENTS\n" + "handle CBF handle. datablockname The name of the data \n" + "block to find or create.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_integerarray", _wrap_cbf_handle_struct_set_integerarray, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : int compression,int binary_id,(binary) String data,int elsize,\n" + " int elsigned,int elements\n" + "\n" + "C prototype: int cbf_set_integerarray (cbf_handle handle,\n" + " unsigned int compression, int binary_id, void *array,\n" + " size_t elsize, int elsigned, size_t elements);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_integerarray sets the binary value of the item at the current \n" + "column and row to an integer array. The array consists of elements \n" + "elements of elsize bytes each, starting at array. The elements are \n" + "signed if elsigned is non-0 and unsigned otherwise. binary_id is the \n" + "binary section identifier. cbf_set_realarray sets the binary value of \n" + "the item at the current column and row to an integer array. The array \n" + "consists of elements elements of elsize bytes each, starting at \n" + "array. binary_id is the binary section identifier.\n" + "The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, \n" + "cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, \n" + "cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants \n" + "allow the data header values of byteorder, dimfast, dimmid, dimslow \n" + "and padding to be set to the data byte order, the fastest, second \n" + "fastest and third fastest array dimensions and the size in byte of \n" + "the post data padding to be used.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + " Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression. \n" + "NOTE: This scheme is by far the slowest of the four and uses much \n" + "more disk space. It is intended for routine use with small arrays \n" + "only. With large arrays (like images) it should be used only for \n" + "debugging.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or \n" + "floats for cbf_set_realarray. If elsize is not equal to sizeof \n" + "(char), sizeof (short) or sizeof (int), the function returns \n" + "CBF_ARGUMENT.\n" + "ARGUMENTS\n" + "handle CBF handle. compression Compression method to use. \n" + "binary_id Integer binary identifier. array Pointer to the \n" + "source array. elsize Size in bytes of each source array \n" + "element. elsigned Set to non-0 if the source array elements are \n" + "signed. elements The number of elements in the array\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_new_datablock", _wrap_cbf_handle_struct_new_datablock, METH_VARARGS, "\n" + "\n" + "Returns : string\n" + "*args : \n" + "\n" + "C prototype: int cbf_new_datablock (cbf_handle handle,\n" + " const char *datablockname);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_new_datablock creates a new data block with name datablockname \n" + "and makes it the current data block. cbf_new_saveframe creates a new \n" + "save frame with name saveframename within the current data block and \n" + "makes the new save frame the current save frame.\n" + "If a data block or save frame with this name already exists, the \n" + "existing data block or save frame becomes the current data block or \n" + "save frame.\n" + "ARGUMENTS\n" + "handle CBF handle. datablockname The name of the new data \n" + "block. saveframename The name of the new save frame.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_datestamp", _wrap_cbf_handle_struct_set_datestamp, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : int year,int month,int day,int hour,int minute,double second,\n" + " int timezone,Float precision\n" + "\n" + "C prototype: int cbf_set_datestamp (cbf_handle handle, unsigned int reserved,\n" + " int year, int month, int day, int hour, int minute,\n" + " double second, int timezone, double precision);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_datestamp sets the collection timestamp in seconds since \n" + "January 1 1970 to the value specified by time. The timezone \n" + "difference from UTC\n" + "\n" + ""}, + { "cbf_handle_struct_next_row", _wrap_cbf_handle_struct_next_row, METH_O, "\n" + "\n" + "Returns : \n" + "*args : \n" + "\n" + "C prototype: int cbf_next_row (cbf_handle handle);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_next_row makes the row following the current row in the current \n" + "category the current row.\n" + "If there are no more rows, the function returns CBF_NOTFOUND.\n" + "The current column is not affected.\n" + "ARGUMENTS\n" + "handle CBF handle.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_category_root", _wrap_cbf_handle_struct_set_category_root, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : String categoryname,String categoryroot\n" + "\n" + "C prototype: int cbf_set_category_root (cbf_handle handle,\n" + " const char* categoryname_in, const char*categoryroot);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_find_category_root sets *categoryroot to the root category of \n" + "which categoryname is an alias. cbf_set_category_root sets \n" + "categoryname_in as an alias of categoryroot in the dictionary \n" + "associated with handle, creating the dictionary if necessary. \n" + "cbf_require_category_root sets *categoryroot to the root category of \n" + "which categoryname is an alias, if there is one, or to the value of \n" + "categoryname, if categoryname is not an alias.\n" + "A returned categoryroot string must not be modified in any way.\n" + "ARGUMENTS\n" + "handle CBF handle. categoryname category name which \n" + "may be an alias. categoryroot pointer to a returned category \n" + "root name. categoryroot_in input category root name.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_get_axis_offset", _wrap_cbf_handle_struct_get_axis_offset, METH_VARARGS, "\n" + "\n" + "Returns : Float offset1,Float offset2,Float offset3\n" + "*args : String axis_id\n" + "\n" + "C prototype: int cbf_get_axis_offset (cbf_handle handle, const char *axis_id,\n" + " double *offset1, double *offset2, double *offset3);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" + "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" + "axis of index ancestor_index of axis axis_id, starting with axis_id \n" + "for ancestor_index 0.\n" + "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" + "axis_id or to \". \" if there is no such ancestor. \n" + "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" + "to \". \" if there is no such equipment. \n" + "cbf_get_axis_equipment_component sets *equipment_component to the \n" + "equipment_component of axis_id or to \". \" if there is no such \n" + "equipment_component.\n" + "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" + "components of the ofset of axis_id.\n" + "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" + "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" + "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" + "is no such rotation_axis.\n" + "cbf_get_axis_setting sets *start and *increment to the corresponding \n" + "values of the axis axis_id. Any of the destination pointers may be \n" + "NULL.\n" + "cbf_get_axis_type sets axis_type to the type of axis_id.\n" + "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" + "components of the vector of axis_id.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any \n" + "value other than 0 is invalid. axis_id Axis id. \n" + "ancestor_index Integer index of the desired ancestor, starting \n" + "with 0 for the current axis_id. ancestor Pointer to \n" + "destination ancestor name pointer. depends_on Pointer to \n" + "destination depends_on name pointer. equipment Pointer to \n" + "destination equipment name pointer. equipment_component Pointer to \n" + "destination equipment_component name pointer. offset1 \n" + "Pointer to destination first offset component value. offset2 \n" + " Pointer to destination second offset component value. offset3 \n" + " Pointer to destination third offset component value. \n" + "rotation Pointer to destination rotation value. \n" + "rotation_axis Pointer to destination rotation_axisn name \n" + "pointer. start Pointer to the destination start \n" + "value. increment Pointer to the destination increment \n" + "value. type Pointer to destination axis type of type \n" + ". vector1 Pointer to destination first vector component \n" + "value. vector2 Pointer to destination second vector \n" + "component value. vector3 Pointer to destination third \n" + "vector component value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_set_pixel_size_fs", _wrap_cbf_handle_struct_set_pixel_size_fs, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : Int element_number,Int axis_number,Float pixel size\n" + "\n" + "C prototype: int cbf_set_pixel_size_fs(cbf_handle handle,\n" + " unsigned int element_number, int axis_number,\n" + " double psize);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the \n" + "\"size \" column of the \"array_structure_list \" category at the \n" + "row which matches axis axis_number of the detector element \n" + "element_number converting the double pixel size psize from meters to \n" + "millimeters in storing it in the \"size \" column for the axis \n" + "axis_number of the detector element element_number. The axis_number \n" + "is numbered from 1, starting with the slowest axis. \n" + "cbf_set_pixel_size_fs sets the item in the \"size \" column of the \n" + "\"array_structure_list \" category at the row which matches axis \n" + "axis_number of the detector element element_number converting the \n" + "double pixel size psize from meters to millimeters in storing it in \n" + "the \"size \" column for the axis axis_number of the detector \n" + "element element_number. The axis_number is numbered from 1, starting \n" + "with the fastest axis.\n" + "If a negative axis number is given, the order of axes is reversed, so \n" + "that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the \n" + "fastest axis for cbf_get_pixel_size_sf.\n" + "If the \"array_structure_list \" category does not already exist, it \n" + "is created.\n" + "If the appropriate row in the \"array_structure_list \" catgeory \n" + "does not already exist, it is created.\n" + "If the pixel size is not given explcitly in the \"array_element_size \n" + "category \", the function returns CBF_NOTFOUND.\n" + "ARGUMENTS\n" + "handle CBF handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. axis_number The number of the \n" + "axis, fastest first, starting from 1.\n" + "\n" + ""}, + { "cbf_handle_struct_insert_row", _wrap_cbf_handle_struct_insert_row, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : Integer\n" + "\n" + "C prototype: int cbf_insert_row (cbf_handle handle, unsigned int rownumber);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_insert_row adds a new row to the current category. The new row is \n" + "inserted as row rownumber and existing rows starting from rownumber \n" + "are moved up by 1. The new row becomes the current row.\n" + "If the category has fewer than rownumber rows, the function returns \n" + "CBF_NOTFOUND.\n" + "The row numbers start from 0.\n" + "ARGUMENTS\n" + "handle CBF handle. rownumber The row number of the new row.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_new_column", _wrap_cbf_handle_struct_new_column, METH_VARARGS, "\n" + "\n" + "Returns : string\n" + "*args : \n" + "\n" + "C prototype: int cbf_new_column (cbf_handle handle, const char *columnname);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_new_column creates a new column in the current category with name \n" + "columnname and makes it the current column.\n" + "If a column with this name already exists, the existing column \n" + "becomes the current category.\n" + "ARGUMENTS\n" + "handle CBF handle. columnname The name of the new column.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_real_3d_image_as_string", _wrap_cbf_handle_struct_get_real_3d_image_as_string, METH_VARARGS, "\n" + "\n" + "Returns : (Binary)String\n" + "*args : int element_number,int elsize,int ndimslow,int ndimmid,int ndimfast\n" + "\n" + "C prototype: int cbf_get_real_3d_image (cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " void *array, size_t elsize, size_t ndimslow,\n" + " size_t ndimmid, size_t ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" + "array for element number element_number into an array. The array \n" + "consists of ndimslow×ndimfast elements of elsize bytes each, \n" + "starting at array. The elements are signed if elsign is non-0 and \n" + "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" + "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" + "for element number element_number into an array. A real array is \n" + "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" + "cbf_get_3d_image_sf read the 3D image array for element number \n" + "element_number into an array. The array consists of \n" + "ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting \n" + "at array. The elements are signed if elsign is non-0 and unsigned \n" + "otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" + "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" + "floats for element number element_number into an array. A real array \n" + "is always signed.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "The structure of the array as a 1-, 2- or 3-dimensional array should \n" + "agree with the structure of the array given in the \n" + "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" + "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" + "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" + "being processed. If the array is 2-dimensional and a 3D call is used, \n" + "ndimslow and ndimmid should be the\n" + "\n" + ""}, + { "cbf_handle_struct_get_integration_time", _wrap_cbf_handle_struct_get_integration_time, METH_O, "\n" + "\n" + "Returns : Float time\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_integration_time (cbf_handle handle,\n" + " unsigned int reserved, double *time);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_integration_time sets *time to the integration time in \n" + "seconds. The parameter reserved is presently unused and should be set \n" + "to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any value other than 0 is \n" + "invalid. time Pointer to the destination time.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_set_realarray", _wrap_cbf_handle_struct_set_realarray, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : int compression,int binary_id,(binary) String data,int elsize,\n" + " int elements\n" + "\n" + "C prototype: int cbf_set_realarray (cbf_handle handle,\n" + " unsigned int compression, int binary_id, void *array,\n" + " size_t elsize, size_t elements);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_integerarray sets the binary value of the item at the current \n" + "column and row to an integer array. The array consists of elements \n" + "elements of elsize bytes each, starting at array. The elements are \n" + "signed if elsigned is non-0 and unsigned otherwise. binary_id is the \n" + "binary section identifier. cbf_set_realarray sets the binary value of \n" + "the item at the current column and row to an integer array. The array \n" + "consists of elements elements of elsize bytes each, starting at \n" + "array. binary_id is the binary section identifier.\n" + "The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, \n" + "cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, \n" + "cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants \n" + "allow the data header values of byteorder, dimfast, dimmid, dimslow \n" + "and padding to be set to the data byte order, the fastest, second \n" + "fastest and third fastest array dimensions and the size in byte of \n" + "the post data padding to be used.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + " Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression. \n" + "NOTE: This scheme is by far the slowest of the four and uses much \n" + "more disk space. It is intended for routine use with small arrays \n" + "only. With large arrays (like images) it should be used only for \n" + "debugging.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or \n" + "floats for cbf_set_realarray. If elsize is not equal to sizeof \n" + "(char), sizeof (short) or sizeof (int), the function returns \n" + "CBF_ARGUMENT.\n" + "ARGUMENTS\n" + "handle CBF handle. compression Compression method to use. \n" + "binary_id Integer binary identifier. array Pointer to the \n" + "source array. elsize Size in bytes of each source array \n" + "element. elsigned Set to non-0 if the source array elements are \n" + "signed. elements The number of elements in the array\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_element_id", _wrap_cbf_handle_struct_get_element_id, METH_VARARGS, "\n" + "\n" + "Returns : String\n" + "*args : Integer element_number\n" + "\n" + "C prototype: int cbf_get_element_id (cbf_handle handle,\n" + " unsigned int element_number, const char **element_id);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_element_number sets element_number to a number that can be \n" + "used in other cbf_simple calls to identify the detector element \n" + "element_id and optionally the specific array_id> and \n" + "array_section_id. cbf_get_element_id sets *element_id to point to the \n" + "ASCII value of the element_number'th \n" + "\"diffrn_data_frame.detector_element_id \" entry, counting from 0. \n" + "The element_number is the ordinal of the detector element in the \n" + "DIFFRN_DETECTOR_ELEMENT category. If an array_section_id is specified \n" + "(i.e. is not NULL), the element_number is the sum of the ordinal of \n" + "the detector element plus the number of detector elements multiplied \n" + "by the ordinal of array_section_id for the specified array_id> in the \n" + "ARRAY_STRUCTURE_LIST_SECTION category.\n" + "If the detector element does not exist, the function returns \n" + "CBF_NOTFOUND.\n" + "The element_id will be valid as long as the item exists and has not \n" + "been set to a new value.\n" + "The element_id must not be modified by the program in any way.\n" + "ARGUMENTS\n" + "handle CBF handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. element_id Pointer to the \n" + "destination string for cbf_get_element_id, but the string itself for \n" + "cbf_get_element_number. array_id The optional array id or \n" + "NULL. array_section_id The optional array_section_id or NULL.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_get_image_sf_as_string", _wrap_cbf_handle_struct_get_image_sf_as_string, METH_VARARGS, "\n" + "\n" + "Returns : (Binary)String\n" + "*args : int element_number,int elsize,int elsign,int ndimslow,int ndimfast\n" + "\n" + "C prototype: int cbf_get_image_sf (cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, void *array, size_t elsize,\n" + " int elsign, size_t ndimslow, size_t ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" + "array for element number element_number into an array. The array \n" + "consists of ndimslow×ndimfast elements of elsize bytes each, \n" + "starting at array. The elements are signed if elsign is non-0 and \n" + "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" + "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" + "for element number element_number into an array. A real array is \n" + "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" + "cbf_get_3d_image_sf read the 3D image array for element number \n" + "element_number into an array. The array consists of \n" + "ndimslow×ndimmid×ndimfast elements of elsize bytes each, starting \n" + "at array. The elements are signed if elsign is non-0 and unsigned \n" + "otherwise. cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" + "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" + "floats for element number element_number into an array. A real array \n" + "is always signed.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "The structure of the array as a 1-, 2- or 3-dimensional array should \n" + "agree with the structure of the array given in the \n" + "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" + "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" + "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" + "being processed. If the array is 2-dimensional and a 3D call is used, \n" + "ndimslow and ndimmid should be the\n" + "\n" + ""}, + { "cbf_handle_struct_construct_positioner", _wrap_cbf_handle_struct_construct_positioner, METH_VARARGS, "\n" + "\n" + "Returns : pycbf positioner object\n" + "*args : String axis_id\n" + "\n" + "C prototype: int cbf_construct_positioner (cbf_handle handle,\n" + " cbf_positioner *positioner, const char *axis_id);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_construct_positioner constructs a positioner object for the axis \n" + "given by axis_id using the description in the CBF object handle and \n" + "initialises the positioner handle *positioner.\n" + "cbf_construct_reference positioner constructs a positioner object for \n" + "the axis given by axis_id using the description in the CBF object \n" + "handle and initialises the detector handle *detector using the \n" + "reference settings of the axes.\n" + "ARGUMENTS\n" + "handle CBF handle. positioner Pointer to the destination \n" + "positioner handle. axis_id The identifier of the axis in the \n" + "\"axis \" category.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_get_3d_image_size_fs", _wrap_cbf_handle_struct_get_3d_image_size_fs, METH_VARARGS, "cbf_handle_struct_get_3d_image_size_fs(cbf_handle_struct self, unsigned int element_number)"}, + { "cbf_handle_struct_set_value", _wrap_cbf_handle_struct_set_value, METH_VARARGS, "\n" + "\n" + "Returns : string\n" + "*args : \n" + "\n" + "C prototype: int cbf_set_value (cbf_handle handle, const char *value);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_value sets the item at the current column and row to the \n" + "ASCII value value.\n" + "ARGUMENTS\n" + "handle CBF handle. value ASCII value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_current_timestamp", _wrap_cbf_handle_struct_set_current_timestamp, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : Integer timezone\n" + "\n" + "C prototype: int cbf_set_current_timestamp (cbf_handle handle,\n" + " unsigned int reserved, int timezone);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_current_timestamp sets the collection timestamp to the \n" + "current time. The timezone difference from UTC in minutes is set to \n" + "timezone. If no timezone is desired, timezone should be \n" + "CBF_NOTIMEZONE. If no timezone is used, the timest amp will be UTC. \n" + "The parameter reserved is presently unused and should be set to 0.\n" + "The new timestamp will have a precision of 1 second.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any value other than 0 is \n" + "invalid. timezone Timezone difference from UTC in minutes or \n" + "CBF_NOTIMEZONE.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_require_doublevalue", _wrap_cbf_handle_struct_require_doublevalue, METH_VARARGS, "\n" + "\n" + "Returns : Float Number\n" + "*args : Float Default\n" + "\n" + "C prototype: int cbf_require_doublevalue (cbf_handle handle, double *number,\n" + " double defaultvalue);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_doublevalue sets *number to the value of the ASCII item at \n" + "the current column and row interpreted as a decimal floating-point \n" + "number. cbf_require_doublevalue sets *number to the value of the \n" + "ASCII item at the current column and row interpreted as a decimal \n" + "floating-point number, setting it to defaultvalue if necessary.\n" + "If the value is not ASCII, the function returns CBF_BINARY.\n" + "ARGUMENTS\n" + "handle CBF handle. number Pointer to the destination \n" + "number. defaultvalue default number value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_rewind_datablock", _wrap_cbf_handle_struct_rewind_datablock, METH_O, "\n" + "\n" + "Returns : \n" + "*args : \n" + "\n" + "C prototype: int cbf_rewind_datablock (cbf_handle handle);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_rewind_datablock makes the first data block the current data \n" + "block.\n" + "If there are no data blocks, the function returns CBF_NOTFOUND.\n" + "The current category becomes undefined.\n" + "ARGUMENTS\n" + "handle CBF handle.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_require_column_value", _wrap_cbf_handle_struct_require_column_value, METH_VARARGS, "\n" + "\n" + "Returns : String Name\n" + "*args : String columnnanme,String Default\n" + "\n" + "C prototype: int cbf_require_column_value (cbf_handle handle,\n" + " const char *columnname, const char **value,\n" + " const char *defaultvalue);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_require_column_doublevalue sets *value to the ASCII item at the \n" + "current row for the column given with the name given by *columnname, \n" + "or to the string given by defaultvalue if the item cannot be found.\n" + "ARGUMENTS\n" + "handle CBF handle. columnname Name of the column \n" + "containing the number. value pointer to the location to \n" + "receive the value. defaultvalue Value to use if the requested \n" + "column and value cannot be found.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_dictionary", _wrap_cbf_handle_struct_get_dictionary, METH_O, "\n" + "\n" + "Returns : CBFHandle dictionary\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_dictionary (cbf_handle handle,\n" + " cbf_handle * dictionary);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_dictionary sets *dictionary to the handle of a CBF which has \n" + "been associated with the CBF handle by cbf_set_dictionary. \n" + "cbf_set_dictionary associates the CBF handle dictionary_in with \n" + "handle as its dictionary. cbf_require_dictionary sets *dictionary to \n" + "the handle of a CBF which has been associated with the CBF handle by \n" + "cbf_set_dictionary or creates a new empty CBF and associates it with \n" + "handle, returning the new handle in *dictionary.\n" + "ARGUMENTS\n" + "handle CBF handle. dictionary Pointer to CBF handle of \n" + "dictionary. dictionary_in CBF handle of dcitionary.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_reset_saveframe", _wrap_cbf_handle_struct_reset_saveframe, METH_O, "\n" + "\n" + "Returns : \n" + "*args : \n" + "\n" + "C prototype: int cbf_reset_saveframe (cbf_handle handle);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_reset_datablock deletes all categories from the current data \n" + "block. cbf_reset_saveframe deletes all categories from the current \n" + "save frame.\n" + "ARGUMENTS\n" + "handle CBF handle.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_reciprocal_cell", _wrap_cbf_handle_struct_set_reciprocal_cell, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : double cell[6]\n" + "\n" + "C prototype: int cbf_set_reciprocal_cell (cbf_handle handle, double cell[6],\n" + " double cell_esd[6] );\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_reciprocal_cell sets the reciprocal cell parameters to the \n" + "double values given in cell[0:2] for the reciprocal cell edge lengths \n" + "a^*, b^* and c^* in Ångstroms^-1, the double values given in \n" + "cell[3:5] for the reciprocal cell angles α^*, β^* and γ^* in \n" + "degrees, the double values given in cell_esd[0:2] for the estimated \n" + "strandard deviations of the reciprocal cell edge lengths a^*, b^* and \n" + "c^* in Ångstroms, and the double values given in cell_esd[3:5] for \n" + "the estimated standard deviations of the reciprocal cell angles α^*, \n" + "β^* and γ^* in degrees.\n" + "The values are placed in the first row of the \"cell \" category. If \n" + "no value has been given for \"_cell.entry_id \", it is set to the \n" + "value of the \"diffrn.id \" entry of the current data block.\n" + "cell or cell_esd may be NULL.\n" + "If cell is NULL, the reciprocal cell parameters are not set.\n" + "If cell_esd is NULL, the reciprocal cell parameter esds are not set.\n" + "If the \"cell \" category is not present, it is created. If any of \n" + "the necessary columns are not present, they are created.\n" + "ARGUMENTS\n" + "handle CBF handle. cell Pointer to the array of 6 doubles \n" + "for the reciprocal cell parameters. cell_esd Pointer to the array \n" + "of 6 doubles for the reciprocal cell parameter esds.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_reciprocal_cell_esd", _wrap_cbf_handle_struct_set_reciprocal_cell_esd, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : double cell_esd[6]\n" + "\n" + "C prototype: int cbf_set_reciprocal_cell (cbf_handle handle, double cell[6],\n" + " double cell_esd[6] );\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_reciprocal_cell sets the reciprocal cell parameters to the \n" + "double values given in cell[0:2] for the reciprocal cell edge lengths \n" + "a^*, b^* and c^* in Ångstroms^-1, the double values given in \n" + "cell[3:5] for the reciprocal cell angles α^*, β^* and γ^* in \n" + "degrees, the double values given in cell_esd[0:2] for the estimated \n" + "strandard deviations of the reciprocal cell edge lengths a^*, b^* and \n" + "c^* in Ångstroms, and the double values given in cell_esd[3:5] for \n" + "the estimated standard deviations of the reciprocal cell angles α^*, \n" + "β^* and γ^* in degrees.\n" + "The values are placed in the first row of the \"cell \" category. If \n" + "no value has been given for \"_cell.entry_id \", it is set to the \n" + "value of the \"diffrn.id \" entry of the current data block.\n" + "cell or cell_esd may be NULL.\n" + "If cell is NULL, the reciprocal cell parameters are not set.\n" + "If cell_esd is NULL, the reciprocal cell parameter esds are not set.\n" + "If the \"cell \" category is not present, it is created. If any of \n" + "the necessary columns are not present, they are created.\n" + "ARGUMENTS\n" + "handle CBF handle. cell Pointer to the array of 6 doubles \n" + "for the reciprocal cell parameters. cell_esd Pointer to the array \n" + "of 6 doubles for the reciprocal cell parameter esds.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_real_3d_image_fs", _wrap_cbf_handle_struct_set_real_3d_image_fs, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : int element_number,int compression,(binary) String data,int elsize,\n" + " int dimfast,int dimmid,int dimslow\n" + "\n" + "C prototype: int cbf_set_real_3d_image_fs(cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " unsigned int compression, void *array,size_t elsize,\n" + " size_t ndimfast, size_t ndimmid, size_t ndimslow);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" + "array for element number element_number. The array consists of \n" + "ndimfast×ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-zero and unsigned otherwise. \n" + "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" + "write the image array for element number element_number. The array \n" + "consists of ndimfast×ndimslow IEEE double or float elements of \n" + "elsize bytes each, starting at array. cbf_set_3d_image, \n" + "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" + "for element number element_number. The array consists of \n" + "ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting \n" + "at array. The elements are signed if elsign is non-0 and unsigned \n" + "otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" + "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" + "element_number. The array consists of ndimfast×ndimmid×ndimslow \n" + "IEEE double or float elements of elsize bytes each, starting at \n" + "array.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "If the array is 1-dimensional, ndimslow should be the array size and \n" + "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" + "array is 2-dimensional and the 3D calls are used, ndimslow and \n" + "ndimmid should be used for the array dimensions and ndimfast should \n" + "be set to 1.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" + "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" + "(int), sizeof(double) or sizeof(float), the function returns \n" + "CBF_ARGUMENT.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any value other \n" + "than 0 is invalid. element_number The number of the detector \n" + "element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. compression Compression type. \n" + "array Pointer to the image array. elsize Size in \n" + "bytes of each image array element. elsigned Set to non-0 if \n" + "the image array elements are signed. ndimslow Slowest array \n" + "dimension. ndimmid Second slowest array dimension. ndimfast \n" + " Fastest array dimension.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_set_doublevalue", _wrap_cbf_handle_struct_set_doublevalue, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : String format,Float number\n" + "\n" + "C prototype: int cbf_set_doublevalue (cbf_handle handle, const char *format,\n" + " double number);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_doublevalue sets the item at the current column and row to \n" + "the floating-point value number written as an ASCII string with the \n" + "format specified by format as appropriate for the printf function.\n" + "ARGUMENTS\n" + "handle CBF handle. format Format for the number. number \n" + "Floating-point value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_find_category", _wrap_cbf_handle_struct_find_category, METH_VARARGS, "\n" + "\n" + "Returns : string\n" + "*args : \n" + "\n" + "C prototype: int cbf_find_category (cbf_handle handle,\n" + " const char *categoryname);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_find_category makes the category in the current data block with \n" + "name categoryname the current category.\n" + "The comparison is case-insensitive.\n" + "If the category does not exist, the function returns CBF_NOTFOUND.\n" + "The current column and row become undefined.\n" + "ARGUMENTS\n" + "handle CBF handle. categoryname The name of the category to \n" + "find.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_get_integerarrayparameters_wdims_fs", _wrap_cbf_handle_struct_get_integerarrayparameters_wdims_fs, METH_O, "\n" + "\n" + "Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned,\n" + " int elements,int minelement,int maxelement,char **bo,int *bolen,\n" + " int dimfast,int dimmid,int dimslow,int padding\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_integerarrayparameters_wdims_fs (cbf_handle handle,\n" + " unsigned int *compression, int *binary_id, size_t *elsize,\n" + " int *elsigned, int *elunsigned, size_t *elements,\n" + " int *minelement, int *maxelement, const char **byteorder,\n" + " size_t *dimfast, size_t *dimmid, size_t *dimslow,\n" + " size_t *padding);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_integerarrayparameters sets *compression, *binary_id, \n" + "*elsize, *elsigned, *elunsigned, *elements, *minelement and \n" + "*maxelement to values read from the binary value of the item at the \n" + "current column and row. This provides all the arguments needed for a \n" + "subsequent call to cbf_set_integerarray, if a copy of the array is to \n" + "be made into another CIF or CBF. cbf_get_realarrayparameters sets \n" + "*compression, *binary_id, *elsize, *elements to values read from the \n" + "binary value of the item at the current column and row. This provides \n" + "all the arguments needed for a subsequent call to cbf_set_realarray, \n" + "if a copy of the arry is to be made into another CIF or CBF.\n" + "The variants cbf_get_integerarrayparameters_wdims, \n" + "cbf_get_integerarrayparameters_wdims_fs, \n" + "cbf_get_integerarrayparameters_wdims_sf, \n" + "cbf_get_realarrayparameters_wdims, \n" + "cbf_get_realarrayparameters_wdims_fs, \n" + "cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, \n" + "*dimmid, *dimslow, and *padding as well, providing the additional \n" + "parameters needed for a subsequent call to cbf_set_integerarray_wdims \n" + "or cbf_set_realarray_wdims.\n" + "The value returned in *byteorder is a pointer either to the string \n" + "\"little_endian \" or to the string \"big_endian \". This should be \n" + "the byte order of the data, not necessarily of the host machine. No \n" + "attempt should be made to modify this string. At this time only \n" + "\"little_endian \" will be returned.\n" + "The values returned in *dimfast, *dimmid and *dimslow are the sizes \n" + "of the fastest changing, second fastest changing and third fastest \n" + "changing dimensions of the array, if specified, or zero, if not \n" + "specified.\n" + "The value returned in *padding is the size of the post-data padding, \n" + "if any and if specified in the data header. The value is given as a \n" + "count of octets.\n" + "If the value is not binary, the function returns CBF_ASCII.\n" + "ARGUMENTS\n" + "handle CBF handle. compression Compression method used. \n" + "elsize Size in bytes of each array element. binary_id \n" + "Pointer to the destination integer binary identifier. elsigned \n" + "Pointer to an integer. Set to 1 if the elements can be read as signed \n" + "integers. elunsigned Pointer to an integer. Set to 1 if the \n" + "elements can be read as unsigned integers. elements Pointer to \n" + "the destination number of elements. minelement Pointer to the \n" + "destination smallest element. maxelement Pointer to the \n" + "destination largest element. byteorder Pointer to the destination \n" + "byte order. dimfast Pointer to the destination fastest \n" + "dimension. dimmid Pointer to the destination second fastest \n" + "dimension. dimslow Pointer to the destination third fastest \n" + "dimension. padding Pointer to the destination padding size.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_realarray_wdims_fs", _wrap_cbf_handle_struct_set_realarray_wdims_fs, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : int compression,int binary_id,(binary) String data,int elsize,\n" + " int elements,String byteorder,int dimfast,int dimmid,int dimslow,\n" + " int padding\n" + "\n" + "C prototype: int cbf_set_realarray_wdims_fs (cbf_handle handle,\n" + " unsigned int compression, int binary_id, void *array,\n" + " size_t elsize, size_t elements, const char *byteorder,\n" + " size_t dimfast, size_t dimmid, size_t dimslow,\n" + " size_t padding);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_integerarray sets the binary value of the item at the current \n" + "column and row to an integer array. The array consists of elements \n" + "elements of elsize bytes each, starting at array. The elements are \n" + "signed if elsigned is non-0 and unsigned otherwise. binary_id is the \n" + "binary section identifier. cbf_set_realarray sets the binary value of \n" + "the item at the current column and row to an integer array. The array \n" + "consists of elements elements of elsize bytes each, starting at \n" + "array. binary_id is the binary section identifier.\n" + "The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, \n" + "cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, \n" + "cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants \n" + "allow the data header values of byteorder, dimfast, dimmid, dimslow \n" + "and padding to be set to the data byte order, the fastest, second \n" + "fastest and third fastest array dimensions and the size in byte of \n" + "the post data padding to be used.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + " Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression. \n" + "NOTE: This scheme is by far the slowest of the four and uses much \n" + "more disk space. It is intended for routine use with small arrays \n" + "only. With large arrays (like images) it should be used only for \n" + "debugging.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or \n" + "floats for cbf_set_realarray. If elsize is not equal to sizeof \n" + "(char), sizeof (short) or sizeof (int), the function returns \n" + "CBF_ARGUMENT.\n" + "ARGUMENTS\n" + "handle CBF handle. compression Compression method to use. \n" + "binary_id Integer binary identifier. array Pointer to the \n" + "source array. elsize Size in bytes of each source array \n" + "element. elsigned Set to non-0 if the source array elements are \n" + "signed. elements The number of elements in the array\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_find_category_root", _wrap_cbf_handle_struct_find_category_root, METH_VARARGS, "\n" + "\n" + "Returns : String categoryroot\n" + "*args : String categoryname\n" + "\n" + "C prototype: int cbf_find_category_root (cbf_handle handle,\n" + " const char* categoryname, const char** categoryroot);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_find_category_root sets *categoryroot to the root category of \n" + "which categoryname is an alias. cbf_set_category_root sets \n" + "categoryname_in as an alias of categoryroot in the dictionary \n" + "associated with handle, creating the dictionary if necessary. \n" + "cbf_require_category_root sets *categoryroot to the root category of \n" + "which categoryname is an alias, if there is one, or to the value of \n" + "categoryname, if categoryname is not an alias.\n" + "A returned categoryroot string must not be modified in any way.\n" + "ARGUMENTS\n" + "handle CBF handle. categoryname category name which \n" + "may be an alias. categoryroot pointer to a returned category \n" + "root name. categoryroot_in input category root name.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_set_integerarray_wdims_fs", _wrap_cbf_handle_struct_set_integerarray_wdims_fs, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : int compression,int binary_id,(binary) String data,int elsize,\n" + " int elsigned,int elements,String byteorder,int dimfast,int dimmid,\n" + " int dimslow,int padding\n" + "\n" + "C prototype: int cbf_set_integerarray_wdims_fs (cbf_handle handle,\n" + " unsigned int compression, int binary_id, void *array,\n" + " size_t elsize, int elsigned, size_t elements,\n" + " const char *byteorder, size_t dimfast, size_t dimmid,\n" + " size_t dimslow, size_t padding);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_integerarray sets the binary value of the item at the current \n" + "column and row to an integer array. The array consists of elements \n" + "elements of elsize bytes each, starting at array. The elements are \n" + "signed if elsigned is non-0 and unsigned otherwise. binary_id is the \n" + "binary section identifier. cbf_set_realarray sets the binary value of \n" + "the item at the current column and row to an integer array. The array \n" + "consists of elements elements of elsize bytes each, starting at \n" + "array. binary_id is the binary section identifier.\n" + "The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, \n" + "cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, \n" + "cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants \n" + "allow the data header values of byteorder, dimfast, dimmid, dimslow \n" + "and padding to be set to the data byte order, the fastest, second \n" + "fastest and third fastest array dimensions and the size in byte of \n" + "the post data padding to be used.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + " Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression. \n" + "NOTE: This scheme is by far the slowest of the four and uses much \n" + "more disk space. It is intended for routine use with small arrays \n" + "only. With large arrays (like images) it should be used only for \n" + "debugging.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or \n" + "floats for cbf_set_realarray. If elsize is not equal to sizeof \n" + "(char), sizeof (short) or sizeof (int), the function returns \n" + "CBF_ARGUMENT.\n" + "ARGUMENTS\n" + "handle CBF handle. compression Compression method to use. \n" + "binary_id Integer binary identifier. array Pointer to the \n" + "source array. elsize Size in bytes of each source array \n" + "element. elsigned Set to non-0 if the source array elements are \n" + "signed. elements The number of elements in the array\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_image_sf", _wrap_cbf_handle_struct_set_image_sf, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : int element_number,int compression,(binary) String data,int elsize,\n" + " int elsign,int dimslow,int dimfast\n" + "\n" + "C prototype: int cbf_set_image_sf(cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, unsigned int compression,\n" + " void *array, size_t elsize, int elsign, size_t ndimslow,\n" + " size_t ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" + "array for element number element_number. The array consists of \n" + "ndimfast×ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-zero and unsigned otherwise. \n" + "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" + "write the image array for element number element_number. The array \n" + "consists of ndimfast×ndimslow IEEE double or float elements of \n" + "elsize bytes each, starting at array. cbf_set_3d_image, \n" + "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" + "for element number element_number. The array consists of \n" + "ndimfast×ndimmid×ndimslow elements of elsize bytes each, starting \n" + "at array. The elements are signed if elsign is non-0 and unsigned \n" + "otherwise. cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" + "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" + "element_number. The array consists of ndimfast×ndimmid×ndimslow \n" + "IEEE double or float elements of elsize bytes each, starting at \n" + "array.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "If the array is 1-dimensional, ndimslow should be the array size and \n" + "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" + "array is 2-dimensional and the 3D calls are used, ndimslow and \n" + "ndimmid should be used for the array dimensions and ndimfast should \n" + "be set to 1.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" + "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" + "(int), sizeof(double) or sizeof(float), the function returns \n" + "CBF_ARGUMENT.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any value other \n" + "than 0 is invalid. element_number The number of the detector \n" + "element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. compression Compression type. \n" + "array Pointer to the image array. elsize Size in \n" + "bytes of each image array element. elsigned Set to non-0 if \n" + "the image array elements are signed. ndimslow Slowest array \n" + "dimension. ndimmid Second slowest array dimension. ndimfast \n" + " Fastest array dimension.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_get_axis_equipment", _wrap_cbf_handle_struct_get_axis_equipment, METH_VARARGS, "\n" + "\n" + "Returns : String\n" + "*args : String axis_id\n" + "\n" + "C prototype: int cbf_get_axis_equipment (cbf_handle handle,\n" + " const char *axis_id, const char * *equipment);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" + "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" + "axis of index ancestor_index of axis axis_id, starting with axis_id \n" + "for ancestor_index 0.\n" + "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" + "axis_id or to \". \" if there is no such ancestor. \n" + "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" + "to \". \" if there is no such equipment. \n" + "cbf_get_axis_equipment_component sets *equipment_component to the \n" + "equipment_component of axis_id or to \". \" if there is no such \n" + "equipment_component.\n" + "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" + "components of the ofset of axis_id.\n" + "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" + "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" + "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" + "is no such rotation_axis.\n" + "cbf_get_axis_setting sets *start and *increment to the corresponding \n" + "values of the axis axis_id. Any of the destination pointers may be \n" + "NULL.\n" + "cbf_get_axis_type sets axis_type to the type of axis_id.\n" + "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" + "components of the vector of axis_id.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any \n" + "value other than 0 is invalid. axis_id Axis id. \n" + "ancestor_index Integer index of the desired ancestor, starting \n" + "with 0 for the current axis_id. ancestor Pointer to \n" + "destination ancestor name pointer. depends_on Pointer to \n" + "destination depends_on name pointer. equipment Pointer to \n" + "destination equipment name pointer. equipment_component Pointer to \n" + "destination equipment_component name pointer. offset1 \n" + "Pointer to destination first offset component value. offset2 \n" + " Pointer to destination second offset component value. offset3 \n" + " Pointer to destination third offset component value. \n" + "rotation Pointer to destination rotation value. \n" + "rotation_axis Pointer to destination rotation_axisn name \n" + "pointer. start Pointer to the destination start \n" + "value. increment Pointer to the destination increment \n" + "value. type Pointer to destination axis type of type \n" + ". vector1 Pointer to destination first vector component \n" + "value. vector2 Pointer to destination second vector \n" + "component value. vector3 Pointer to destination third \n" + "vector component value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_set_unit_cell", _wrap_cbf_handle_struct_set_unit_cell, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : double cell[6]\n" + "\n" + "C prototype: int cbf_set_unit_cell (cbf_handle handle, double cell[6],\n" + " double cell_esd[6] );\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_unit_cell sets the cell parameters to the double values given \n" + "in cell[0:2] for the cell edge lengths a, b and c in Ångstroms, the \n" + "double values given in cell[3:5] for the cell angles α, β and γ in \n" + "degrees, the double values given in cell_esd[0:2] for the estimated \n" + "strandard deviations of the cell edge lengths a, b and c in \n" + "Ångstroms, and the double values given in cell_esd[3:5] for the \n" + "estimated standard deviations of the the cell angles α, β and γ in \n" + "degrees.\n" + "The values are placed in the first row of the \"cell \" category. If \n" + "no value has been given for \"_cell.entry_id \", it is set to the \n" + "value of the \"diffrn.id \" entry of the current data block.\n" + "cell or cell_esd may be NULL.\n" + "If cell is NULL, the cell parameters are not set.\n" + "If cell_esd is NULL, the cell parameter esds are not set.\n" + "If the \"cell \" category is not present, it is created. If any of \n" + "the necessary columns are not present, they are created.\n" + "ARGUMENTS\n" + "handle CBF handle. cell Pointer to the array of 6 doubles \n" + "for the cell parameters. cell_esd Pointer to the array of 6 doubles \n" + "for the cell parameter esds.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_set_unit_cell_esd", _wrap_cbf_handle_struct_set_unit_cell_esd, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : double cell_esd[6]\n" + "\n" + "C prototype: int cbf_set_unit_cell (cbf_handle handle, double cell[6],\n" + " double cell_esd[6] );\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_unit_cell sets the cell parameters to the double values given \n" + "in cell[0:2] for the cell edge lengths a, b and c in Ångstroms, the \n" + "double values given in cell[3:5] for the cell angles α, β and γ in \n" + "degrees, the double values given in cell_esd[0:2] for the estimated \n" + "strandard deviations of the cell edge lengths a, b and c in \n" + "Ångstroms, and the double values given in cell_esd[3:5] for the \n" + "estimated standard deviations of the the cell angles α, β and γ in \n" + "degrees.\n" + "The values are placed in the first row of the \"cell \" category. If \n" + "no value has been given for \"_cell.entry_id \", it is set to the \n" + "value of the \"diffrn.id \" entry of the current data block.\n" + "cell or cell_esd may be NULL.\n" + "If cell is NULL, the cell parameters are not set.\n" + "If cell_esd is NULL, the cell parameter esds are not set.\n" + "If the \"cell \" category is not present, it is created. If any of \n" + "the necessary columns are not present, they are created.\n" + "ARGUMENTS\n" + "handle CBF handle. cell Pointer to the array of 6 doubles \n" + "for the cell parameters. cell_esd Pointer to the array of 6 doubles \n" + "for the cell parameter esds.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_swigregister", cbf_handle_struct_swigregister, METH_O, NULL}, + { "cbf_handle_struct_swiginit", cbf_handle_struct_swiginit, METH_VARARGS, NULL}, + { NULL, NULL, 0, NULL } +}; + +static PyMethodDef SwigMethods_proxydocs[] = { + { NULL, NULL, 0, NULL } +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ + +static void *_p_shortArrayTo_p_short(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((short *) ((shortArray *) x)); +} +static void *_p_longArrayTo_p_long(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((long *) ((longArray *) x)); +} +static void *_p_intArrayTo_p_int(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((int *) ((intArray *) x)); +} +static void *_p_a_4__doubleArrayTo_p_a_4__double(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((double (*)[4]) ((doubleArray (*)[4]) x)); +} +static void *_p_doubleArrayTo_p_double(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((double *) ((doubleArray *) x)); +} +static swig_type_info _swigt__p_CBF_NODETYPE = {"_p_CBF_NODETYPE", "enum CBF_NODETYPE *|CBF_NODETYPE *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_a_4__double = {"_p_a_4__double", "double (*)[4]", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_a_4__doubleArray = {"_p_a_4__doubleArray", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_cbf_axis_struct = {"_p_cbf_axis_struct", "cbf_axis_struct *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cbf_detector_struct = {"_p_cbf_detector_struct", "cbf_detector|cbf_detector_struct *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cbf_handle_struct = {"_p_cbf_handle_struct", "cbf_handle|cbf_handle_struct *|handle *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cbf_node = {"_p_cbf_node", "cbf_node *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_cbf_positioner_struct = {"_p_cbf_positioner_struct", "cbf_positioner|cbf_goniometer|cbf_positioner_struct *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_doubleArray = {"_p_doubleArray", "doubleArray *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_intArray = {"_p_intArray", "intArray *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_long = {"_p_long", "long *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_longArray = {"_p_longArray", "longArray *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_short = {"_p_short", "short *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_shortArray = {"_p_shortArray", "shortArray *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; + +static swig_type_info *swig_type_initial[] = { + &_swigt__p_CBF_NODETYPE, + &_swigt__p_a_4__double, + &_swigt__p_a_4__doubleArray, + &_swigt__p_cbf_axis_struct, + &_swigt__p_cbf_detector_struct, + &_swigt__p_cbf_handle_struct, + &_swigt__p_cbf_node, + &_swigt__p_cbf_positioner_struct, + &_swigt__p_char, + &_swigt__p_double, + &_swigt__p_doubleArray, + &_swigt__p_int, + &_swigt__p_intArray, + &_swigt__p_long, + &_swigt__p_longArray, + &_swigt__p_p_char, + &_swigt__p_short, + &_swigt__p_shortArray, + &_swigt__p_size_t, + &_swigt__p_void, +}; + +static swig_cast_info _swigc__p_CBF_NODETYPE[] = { {&_swigt__p_CBF_NODETYPE, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_a_4__doubleArray[] = {{&_swigt__p_a_4__doubleArray, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_a_4__double[] = { {&_swigt__p_a_4__doubleArray, _p_a_4__doubleArrayTo_p_a_4__double, 0, 0}, {&_swigt__p_a_4__double, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cbf_axis_struct[] = { {&_swigt__p_cbf_axis_struct, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cbf_detector_struct[] = { {&_swigt__p_cbf_detector_struct, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cbf_handle_struct[] = { {&_swigt__p_cbf_handle_struct, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cbf_node[] = { {&_swigt__p_cbf_node, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_cbf_positioner_struct[] = { {&_swigt__p_cbf_positioner_struct, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_double[] = { {&_swigt__p_doubleArray, _p_doubleArrayTo_p_double, 0, 0}, {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_doubleArray[] = { {&_swigt__p_doubleArray, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_int[] = { {&_swigt__p_intArray, _p_intArrayTo_p_int, 0, 0}, {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_intArray[] = { {&_swigt__p_intArray, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0}, {&_swigt__p_longArray, _p_longArrayTo_p_long, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_longArray[] = { {&_swigt__p_longArray, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_short[] = { {&_swigt__p_shortArray, _p_shortArrayTo_p_short, 0, 0}, {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_shortArray[] = { {&_swigt__p_shortArray, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_size_t[] = { {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; + +static swig_cast_info *swig_cast_initial[] = { + _swigc__p_CBF_NODETYPE, + _swigc__p_a_4__double, + _swigc__p_a_4__doubleArray, + _swigc__p_cbf_axis_struct, + _swigc__p_cbf_detector_struct, + _swigc__p_cbf_handle_struct, + _swigc__p_cbf_node, + _swigc__p_cbf_positioner_struct, + _swigc__p_char, + _swigc__p_double, + _swigc__p_doubleArray, + _swigc__p_int, + _swigc__p_intArray, + _swigc__p_long, + _swigc__p_longArray, + _swigc__p_p_char, + _swigc__p_short, + _swigc__p_shortArray, + _swigc__p_size_t, + _swigc__p_void, +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ + +static swig_const_info swig_const_table[] = { +{0, 0, 0, 0.0, 0, 0}}; + +#ifdef __cplusplus +} +#endif +/* ----------------------------------------------------------------------------- + * Type initialization: + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to + * swig_cast_info structures and swig_cast_info structures store pointers back + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of + * swig_module, and does all the lookup, filling in the swig_module.types + * array with the correct data and linking the correct swig_cast_info + * structures together. + * + * The generated swig_type_info structures are assigned statically to an initial + * array. We just loop through that array, and handle each type individually. + * First we lookup if this type has been already loaded, and if so, use the + * loaded structure instead of the generated one. Then we have to fill in the + * cast linked list. The cast data is initially stored in something like a + * two-dimensional array. Each row corresponds to a type (there are the same + * number of rows as there are in the swig_type_initial array). Each entry in + * a column is one of the swig_cast_info structures for that type. + * The cast_initial array is actually an array of arrays, because each row has + * a variable number of columns. So to actually build the cast linked list, + * we find the array of casts associated with the type, and loop through it + * adding the casts to the list. The one last trick we need to do is making + * sure the type pointer in the swig_cast_info struct is correct. + * + * First off, we lookup the cast->type name to see if it is already loaded. + * There are three cases to handle: + * 1) If the cast->type has already been loaded AND the type we are adding + * casting info to has not been loaded (it is in this module), THEN we + * replace the cast->type pointer with the type pointer that has already + * been loaded. + * 2) If BOTH types (the one we are adding casting info to, and the + * cast->type) are loaded, THEN the cast info has already been loaded by + * the previous module so we just ignore it. + * 3) Finally, if cast->type has not already been loaded, then we add that + * swig_cast_info to the linked list (because the cast->type) pointer will + * be correct. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* c-mode */ +#endif +#endif + +#if 0 +#define SWIGRUNTIME_DEBUG +#endif + + +SWIGRUNTIME void +SWIG_InitializeModule(void *clientdata) { + size_t i; + swig_module_info *module_head, *iter; + int init; + + /* check to see if the circular list has been setup, if not, set it up */ + if (swig_module.next==0) { + /* Initialize the swig_module */ + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + init = 1; + } else { + init = 0; + } + + /* Try and load any already created modules */ + module_head = SWIG_GetModule(clientdata); + if (!module_head) { + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + } else { + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + iter=module_head; + do { + if (iter==&swig_module) { + /* Our module is already in the list, so there's nothing more to do. */ + return; + } + iter=iter->next; + } while (iter!= module_head); + + /* otherwise we must add our module into the list */ + swig_module.next = module_head->next; + module_head->next = &swig_module; + } + + /* When multiple interpreters are used, a module could have already been initialized in + a different interpreter, but not yet have a pointer in this interpreter. + In this case, we do not want to continue adding types... everything should be + set up already */ + if (init == 0) return; + + /* Now work on filling in swig_module.types */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size); +#endif + for (i = 0; i < swig_module.size; ++i) { + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; + +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name); +#endif + + /* if there is another module already loaded */ + if (swig_module.next != &swig_module) { + type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); + } + if (type) { + /* Overwrite clientdata field */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found type %s\n", type->name); +#endif + if (swig_module.type_initial[i]->clientdata) { + type->clientdata = swig_module.type_initial[i]->clientdata; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); +#endif + } + } else { + type = swig_module.type_initial[i]; + } + + /* Insert casting types */ + cast = swig_module.cast_initial[i]; + while (cast->type) { + /* Don't need to add information already in the list */ + ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); +#endif + if (swig_module.next != &swig_module) { + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); +#ifdef SWIGRUNTIME_DEBUG + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); +#endif + } + if (ret) { + if (type == swig_module.type_initial[i]) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); +#endif + cast->type = ret; + ret = 0; + } else { + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); +#ifdef SWIGRUNTIME_DEBUG + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); +#endif + if (!ocast) ret = 0; + } + } + + if (!ret) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); +#endif + if (type->cast) { + type->cast->prev = cast; + cast->next = type->cast; + } + type->cast = cast; + } + cast++; + } + /* Set entry in modules->types array equal to the type */ + swig_module.types[i] = type; + } + swig_module.types[i] = 0; + +#ifdef SWIGRUNTIME_DEBUG + printf("**** SWIG_InitializeModule: Cast List ******\n"); + for (i = 0; i < swig_module.size; ++i) { + int j = 0; + swig_cast_info *cast = swig_module.cast_initial[i]; + printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name); + while (cast->type) { + printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); + cast++; + ++j; + } + printf("---- Total casts: %d\n",j); + } + printf("**** SWIG_InitializeModule: Cast List ******\n"); +#endif +} + +/* This function will propagate the clientdata field of type to +* any new swig_type_info structures that have been added into the list +* of equivalent types. It is like calling +* SWIG_TypeClientData(type, clientdata) a second time. +*/ +SWIGRUNTIME void +SWIG_PropagateClientData(void) { + size_t i; + swig_cast_info *equiv; + static int init_run = 0; + + if (init_run) return; + init_run = 1; + + for (i = 0; i < swig_module.size; i++) { + if (swig_module.types[i]->clientdata) { + equiv = swig_module.types[i]->cast; + while (equiv) { + if (!equiv->converter) { + if (equiv->type && !equiv->type->clientdata) + SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); + } + equiv = equiv->next; + } + } + } +} + +#ifdef __cplusplus +#if 0 +{ + /* c-mode */ +#endif +} +#endif + + + +#ifdef __cplusplus +extern "C" { +#endif + + /* Python-specific SWIG API */ +#define SWIG_newvarlink() SWIG_Python_newvarlink() +#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) +#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) + + /* ----------------------------------------------------------------------------- + * global variable support code. + * ----------------------------------------------------------------------------- */ + + typedef struct swig_globalvar { + char *name; /* Name of global variable */ + PyObject *(*get_attr)(void); /* Return the current value */ + int (*set_attr)(PyObject *); /* Set the value */ + struct swig_globalvar *next; + } swig_globalvar; + + typedef struct swig_varlinkobject { + PyObject_HEAD + swig_globalvar *vars; + } swig_varlinkobject; + + SWIGINTERN PyObject * + swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { +#if PY_VERSION_HEX >= 0x03000000 + return PyUnicode_InternFromString(""); +#else + return PyString_FromString(""); +#endif + } + + SWIGINTERN PyObject * + swig_varlink_str(swig_varlinkobject *v) { +#if PY_VERSION_HEX >= 0x03000000 + PyObject *str = PyUnicode_InternFromString("("); + PyObject *tail; + PyObject *joined; + swig_globalvar *var; + for (var = v->vars; var; var=var->next) { + tail = PyUnicode_FromString(var->name); + joined = PyUnicode_Concat(str, tail); + Py_DecRef(str); + Py_DecRef(tail); + str = joined; + if (var->next) { + tail = PyUnicode_InternFromString(", "); + joined = PyUnicode_Concat(str, tail); + Py_DecRef(str); + Py_DecRef(tail); + str = joined; + } + } + tail = PyUnicode_InternFromString(")"); + joined = PyUnicode_Concat(str, tail); + Py_DecRef(str); + Py_DecRef(tail); + str = joined; +#else + PyObject *str = PyString_FromString("("); + swig_globalvar *var; + for (var = v->vars; var; var=var->next) { + PyString_ConcatAndDel(&str,PyString_FromString(var->name)); + if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); + } + PyString_ConcatAndDel(&str,PyString_FromString(")")); +#endif + return str; + } + + SWIGINTERN void + swig_varlink_dealloc(swig_varlinkobject *v) { + swig_globalvar *var = v->vars; + while (var) { + swig_globalvar *n = var->next; + free(var->name); + free(var); + var = n; + } + } + + SWIGINTERN PyObject * + swig_varlink_getattr(swig_varlinkobject *v, char *n) { + PyObject *res = NULL; + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + res = (*var->get_attr)(); + break; + } + var = var->next; + } + if (res == NULL && !PyErr_Occurred()) { + PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); + } + return res; + } + + SWIGINTERN int + swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { + int res = 1; + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + res = (*var->set_attr)(p); + break; + } + var = var->next; + } + if (res == 1 && !PyErr_Occurred()) { + PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); + } + return res; + } + + SWIGINTERN PyTypeObject* + swig_varlink_type(void) { + static char varlink__doc__[] = "Swig var link object"; + static PyTypeObject varlink_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp = { +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + "swigvarlink", /* tp_name */ + sizeof(swig_varlinkobject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor) swig_varlink_dealloc, /* tp_dealloc */ + 0, /* tp_print */ + (getattrfunc) swig_varlink_getattr, /* tp_getattr */ + (setattrfunc) swig_varlink_setattr, /* tp_setattr */ + 0, /* tp_compare */ + (reprfunc) swig_varlink_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + 0, /* tp_hash */ + 0, /* tp_call */ + (reprfunc) swig_varlink_str, /* tp_str */ + 0, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + 0, /* tp_flags */ + varlink__doc__, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ + 0, /* tp_del */ + 0, /* tp_version_tag */ +#if PY_VERSION_HEX >= 0x03040000 + 0, /* tp_finalize */ +#endif +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif +#ifdef COUNT_ALLOCS + 0, /* tp_allocs */ + 0, /* tp_frees */ + 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0 /* tp_next */ +#endif + }; + varlink_type = tmp; + type_init = 1; + if (PyType_Ready(&varlink_type) < 0) + return NULL; + } + return &varlink_type; + } + + /* Create a variable linking object for use later */ + SWIGINTERN PyObject * + SWIG_Python_newvarlink(void) { + swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); + if (result) { + result->vars = 0; + } + return ((PyObject*) result); + } + + SWIGINTERN void + SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { + swig_varlinkobject *v = (swig_varlinkobject *) p; + swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); + if (gv) { + size_t size = strlen(name)+1; + gv->name = (char *)malloc(size); + if (gv->name) { + memcpy(gv->name, name, size); + gv->get_attr = get_attr; + gv->set_attr = set_attr; + gv->next = v->vars; + } + } + v->vars = gv; + } + + SWIGINTERN PyObject * + SWIG_globals(void) { + static PyObject *globals = 0; + if (!globals) { + globals = SWIG_newvarlink(); + } + return globals; + } + + /* ----------------------------------------------------------------------------- + * constants/methods manipulation + * ----------------------------------------------------------------------------- */ + + /* Install Constants */ + SWIGINTERN void + SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { + PyObject *obj = 0; + size_t i; + for (i = 0; constants[i].type; ++i) { + switch(constants[i].type) { + case SWIG_PY_POINTER: + obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); + break; + case SWIG_PY_BINARY: + obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); + break; + default: + obj = 0; + break; + } + if (obj) { + PyDict_SetItemString(d, constants[i].name, obj); + Py_DECREF(obj); + } + } + } + + /* -----------------------------------------------------------------------------*/ + /* Fix SwigMethods to carry the callback ptrs when needed */ + /* -----------------------------------------------------------------------------*/ + + SWIGINTERN void + SWIG_Python_FixMethods(PyMethodDef *methods, + swig_const_info *const_table, + swig_type_info **types, + swig_type_info **types_initial) { + size_t i; + for (i = 0; methods[i].ml_name; ++i) { + const char *c = methods[i].ml_doc; + if (!c) continue; + c = strstr(c, "swig_ptr: "); + if (c) { + int j; + swig_const_info *ci = 0; + const char *name = c + 10; + for (j = 0; const_table[j].type; ++j) { + if (strncmp(const_table[j].name, name, + strlen(const_table[j].name)) == 0) { + ci = &(const_table[j]); + break; + } + } + if (ci) { + void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; + if (ptr) { + size_t shift = (ci->ptype) - types; + swig_type_info *ty = types_initial[shift]; + size_t ldoc = (c - methods[i].ml_doc); + size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; + char *ndoc = (char*)malloc(ldoc + lptr + 10); + if (ndoc) { + char *buff = ndoc; + memcpy(buff, methods[i].ml_doc, ldoc); + buff += ldoc; + memcpy(buff, "swig_ptr: ", 10); + buff += 10; + SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); + methods[i].ml_doc = ndoc; + } + } + } + } + } + } + + /* ----------------------------------------------------------------------------- + * Method creation and docstring support functions + * ----------------------------------------------------------------------------- */ + + /* ----------------------------------------------------------------------------- + * Function to find the method definition with the correct docstring for the + * proxy module as opposed to the low-level API + * ----------------------------------------------------------------------------- */ + + SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) { + /* Find the function in the modified method table */ + size_t offset = 0; + int found = 0; + while (SwigMethods_proxydocs[offset].ml_meth != NULL) { + if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) { + found = 1; + break; + } + offset++; + } + /* Use the copy with the modified docstring if available */ + return found ? &SwigMethods_proxydocs[offset] : NULL; + } + + /* ----------------------------------------------------------------------------- + * Wrapper of PyInstanceMethod_New() used in Python 3 + * It is exported to the generated module, used for -fastproxy + * ----------------------------------------------------------------------------- */ + + SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) { + if (PyCFunction_Check(func)) { + PyCFunctionObject *funcobj = (PyCFunctionObject *)func; + PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name); + if (ml) + func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module); + } +#if PY_VERSION_HEX >= 0x03000000 + return PyInstanceMethod_New(func); +#else + return PyMethod_New(func, NULL, NULL); +#endif + } + + /* ----------------------------------------------------------------------------- + * Wrapper of PyStaticMethod_New() + * It is exported to the generated module, used for -fastproxy + * ----------------------------------------------------------------------------- */ + + SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) { + if (PyCFunction_Check(func)) { + PyCFunctionObject *funcobj = (PyCFunctionObject *)func; + PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name); + if (ml) + func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module); + } + return PyStaticMethod_New(func); + } + +#ifdef __cplusplus +} +#endif + +/* -----------------------------------------------------------------------------* + * Partial Init method + * -----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +#endif + +SWIGEXPORT +#if PY_VERSION_HEX >= 0x03000000 +PyObject* +#else +void +#endif +SWIG_init(void) { + PyObject *m, *d, *md, *globals; + +#if PY_VERSION_HEX >= 0x03000000 + static struct PyModuleDef SWIG_module = { + PyModuleDef_HEAD_INIT, + SWIG_name, + NULL, + -1, + SwigMethods, + NULL, + NULL, + NULL, + NULL + }; +#endif + +#if defined(SWIGPYTHON_BUILTIN) + static SwigPyClientData SwigPyObject_clientdata = { + 0, 0, 0, 0, 0, 0, 0 + }; + static PyGetSetDef this_getset_def = { + (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL + }; + static SwigPyGetSet thisown_getset_closure = { + SwigPyObject_own, + SwigPyObject_own + }; + static PyGetSetDef thisown_getset_def = { + (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure + }; + PyTypeObject *builtin_pytype; + int builtin_base_count; + swig_type_info *builtin_basetype; + PyObject *tuple; + PyGetSetDescrObject *static_getset; + PyTypeObject *metatype; + PyTypeObject *swigpyobject; + SwigPyClientData *cd; + PyObject *public_interface, *public_symbol; + PyObject *this_descr; + PyObject *thisown_descr; + PyObject *self = 0; + int i; + + (void)builtin_pytype; + (void)builtin_base_count; + (void)builtin_basetype; + (void)tuple; + (void)static_getset; + (void)self; + + /* Metaclass is used to implement static member variables */ + metatype = SwigPyObjectType(); + assert(metatype); +#endif + + (void)globals; + + /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */ + SWIG_This(); + SWIG_Python_TypeCache(); + SwigPyPacked_type(); +#ifndef SWIGPYTHON_BUILTIN + SwigPyObject_type(); +#endif + + /* Fix SwigMethods to carry the callback ptrs when needed */ + SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); + +#if PY_VERSION_HEX >= 0x03000000 + m = PyModule_Create(&SWIG_module); +#else + m = Py_InitModule(SWIG_name, SwigMethods); +#endif + + md = d = PyModule_GetDict(m); + (void)md; + + SWIG_InitializeModule(0); + +#ifdef SWIGPYTHON_BUILTIN + swigpyobject = SwigPyObject_TypeOnce(); + + SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); + assert(SwigPyObject_stype); + cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; + if (!cd) { + SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; + SwigPyObject_clientdata.pytype = swigpyobject; + } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) { + PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); +# if PY_VERSION_HEX >= 0x03000000 + return NULL; +# else + return; +# endif + } + + /* All objects have a 'this' attribute */ + this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def); + (void)this_descr; + + /* All objects have a 'thisown' attribute */ + thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def); + (void)thisown_descr; + + public_interface = PyList_New(0); + public_symbol = 0; + (void)public_symbol; + + PyDict_SetItemString(md, "__all__", public_interface); + Py_DECREF(public_interface); + for (i = 0; SwigMethods[i].ml_name != NULL; ++i) + SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); + for (i = 0; swig_const_table[i].name != 0; ++i) + SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name); +#endif + + SWIG_InstallConstants(d,swig_const_table); + + SWIG_Python_SetConstant(d, "CBF_INTEGER",SWIG_From_int((int)(0x0010))); + SWIG_Python_SetConstant(d, "CBF_FLOAT",SWIG_From_int((int)(0x0020))); + SWIG_Python_SetConstant(d, "CBF_CANONICAL",SWIG_From_int((int)(0x0050))); + SWIG_Python_SetConstant(d, "CBF_PACKED",SWIG_From_int((int)(0x0060))); + SWIG_Python_SetConstant(d, "CBF_PACKED_V2",SWIG_From_int((int)(0x0090))); + SWIG_Python_SetConstant(d, "CBF_BYTE_OFFSET",SWIG_From_int((int)(0x0070))); + SWIG_Python_SetConstant(d, "CBF_PREDICTOR",SWIG_From_int((int)(0x0080))); + SWIG_Python_SetConstant(d, "CBF_NONE",SWIG_From_int((int)(0x0040))); + SWIG_Python_SetConstant(d, "CBF_COMPRESSION_MASK",SWIG_From_int((int)(0x00FF))); + SWIG_Python_SetConstant(d, "CBF_FLAG_MASK",SWIG_From_int((int)(0x0F00))); + SWIG_Python_SetConstant(d, "CBF_UNCORRELATED_SECTIONS",SWIG_From_int((int)(0x0100))); + SWIG_Python_SetConstant(d, "CBF_FLAT_IMAGE",SWIG_From_int((int)(0x0200))); + SWIG_Python_SetConstant(d, "CBF_NO_EXPAND",SWIG_From_int((int)(0x0400))); + SWIG_Python_SetConstant(d, "PLAIN_HEADERS",SWIG_From_int((int)(0x0001))); + SWIG_Python_SetConstant(d, "MIME_HEADERS",SWIG_From_int((int)(0x0002))); + SWIG_Python_SetConstant(d, "MSG_NODIGEST",SWIG_From_int((int)(0x0004))); + SWIG_Python_SetConstant(d, "MSG_DIGEST",SWIG_From_int((int)(0x0008))); + SWIG_Python_SetConstant(d, "MSG_DIGESTNOW",SWIG_From_int((int)(0x0010))); + SWIG_Python_SetConstant(d, "MSG_DIGESTWARN",SWIG_From_int((int)(0x0020))); + SWIG_Python_SetConstant(d, "PAD_1K",SWIG_From_int((int)(0x0020))); + SWIG_Python_SetConstant(d, "PAD_2K",SWIG_From_int((int)(0x0040))); + SWIG_Python_SetConstant(d, "PAD_4K",SWIG_From_int((int)(0x0080))); + SWIG_Python_SetConstant(d, "CBF_PARSE_BRC",SWIG_From_int((int)(0x0100))); + SWIG_Python_SetConstant(d, "CBF_PARSE_PRN",SWIG_From_int((int)(0x0200))); + SWIG_Python_SetConstant(d, "CBF_PARSE_BKT",SWIG_From_int((int)(0x0400))); + SWIG_Python_SetConstant(d, "CBF_PARSE_BRACKETS",SWIG_From_int((int)(0x0700))); + SWIG_Python_SetConstant(d, "CBF_PARSE_TQ",SWIG_From_int((int)(0x0800))); + SWIG_Python_SetConstant(d, "CBF_PARSE_CIF2_DELIMS",SWIG_From_int((int)(0x1000))); + SWIG_Python_SetConstant(d, "CBF_PARSE_DDLm",SWIG_From_int((int)(0x0700))); + SWIG_Python_SetConstant(d, "CBF_PARSE_CIF2",SWIG_From_int((int)(0x1F00))); + SWIG_Python_SetConstant(d, "CBF_PARSE_DEFINES",SWIG_From_int((int)(0x2000))); + SWIG_Python_SetConstant(d, "CBF_PARSE_WIDE",SWIG_From_int((int)(0x4000))); + SWIG_Python_SetConstant(d, "CBF_PARSE_UTF8",SWIG_From_int((int)(0x10000))); + SWIG_Python_SetConstant(d, "HDR_DEFAULT",SWIG_From_int((int)((0x0002|0x0004)))); + SWIG_Python_SetConstant(d, "MIME_NOHEADERS",SWIG_From_int((int)(0x0001))); + SWIG_Python_SetConstant(d, "CBF",SWIG_From_int((int)(0x0000))); + SWIG_Python_SetConstant(d, "CIF",SWIG_From_int((int)(0x0001))); + SWIG_Python_SetConstant(d, "ENC_NONE",SWIG_From_int((int)(0x0001))); + SWIG_Python_SetConstant(d, "ENC_BASE64",SWIG_From_int((int)(0x0002))); + SWIG_Python_SetConstant(d, "ENC_BASE32K",SWIG_From_int((int)(0x0004))); + SWIG_Python_SetConstant(d, "ENC_QP",SWIG_From_int((int)(0x0008))); + SWIG_Python_SetConstant(d, "ENC_BASE10",SWIG_From_int((int)(0x0010))); + SWIG_Python_SetConstant(d, "ENC_BASE16",SWIG_From_int((int)(0x0020))); + SWIG_Python_SetConstant(d, "ENC_BASE8",SWIG_From_int((int)(0x0040))); + SWIG_Python_SetConstant(d, "ENC_FORWARD",SWIG_From_int((int)(0x0080))); + SWIG_Python_SetConstant(d, "ENC_BACKWARD",SWIG_From_int((int)(0x0100))); + SWIG_Python_SetConstant(d, "ENC_CRTERM",SWIG_From_int((int)(0x0200))); + SWIG_Python_SetConstant(d, "ENC_LFTERM",SWIG_From_int((int)(0x0400))); + SWIG_Python_SetConstant(d, "ENC_DEFAULT",SWIG_From_int((int)((0x0002|0x0400|0x0080)))); + SWIG_Python_SetConstant(d, "CBF_UNDEFNODE",SWIG_From_int((int)(CBF_UNDEFNODE))); + SWIG_Python_SetConstant(d, "CBF_LINK",SWIG_From_int((int)(CBF_LINK))); + SWIG_Python_SetConstant(d, "CBF_ROOT",SWIG_From_int((int)(CBF_ROOT))); + SWIG_Python_SetConstant(d, "CBF_DATABLOCK",SWIG_From_int((int)(CBF_DATABLOCK))); + SWIG_Python_SetConstant(d, "CBF_SAVEFRAME",SWIG_From_int((int)(CBF_SAVEFRAME))); + SWIG_Python_SetConstant(d, "CBF_CATEGORY",SWIG_From_int((int)(CBF_CATEGORY))); + SWIG_Python_SetConstant(d, "CBF_COLUMN",SWIG_From_int((int)(CBF_COLUMN))); +#if PY_VERSION_HEX >= 0x03000000 + return m; +#else + return; +#endif +} + diff --git a/py2cbf/win32.bat b/py2cbf/win32.bat new file mode 100644 index 00000000..ed0809c0 --- /dev/null +++ b/py2cbf/win32.bat @@ -0,0 +1,16 @@ + +nuweb pycbf +latex pycbf +nuweb pycbf +latex pycbf +dvipdfm pycbf +nuweb pycbf +C:\python24\python make_pycbf.py > TODO.txt +"C:\program files\swigwin-1.3.31\swig.exe" -python pycbf.i +C:\python24\python setup.py build --compiler=mingw32 +copy build\lib.win32-2.4\_py2cbf.pyd . +REM C:\python24\python pycbf_test1.py +C:\python24\python pycbf_test2.py +C:\python24\python pycbf_test3.py +C:\python24\lib\pydoc.py -w pycbf +C:\python24\python makeflatascii.py pycbf_ascii_help.txt diff --git a/py2cbf/xmas/readmarheader.py b/py2cbf/xmas/readmarheader.py new file mode 100644 index 00000000..3cca9174 --- /dev/null +++ b/py2cbf/xmas/readmarheader.py @@ -0,0 +1,338 @@ +#!/usr/bin/env python +import struct + +# Convert mar c header file types to python struct module types +mar_c_to_python_struct = { + "INT32" : "i", + "UINT32" : "I", + "char" : "c", + "UINT16" : "H" + } + +# Sizes (bytes) of mar c header objects +mar_c_sizes = { + "INT32" : 4, + "UINT32" : 4, + "char" : 1, + "UINT16" : 2 + } + +# This was worked out by trial and error from a trial image I think +MAXIMAGES=9 + + + +def make_format(cdefinition): + """ + Reads the header definition in c and makes the format + string to pass to struct.unpack + """ + lines = cdefinition.split("\n") + fmt = "" + names = [] + expected = 0 + for line in lines: + if line.find(";")==-1: + continue + decl = line.split(";")[0].lstrip().rstrip() + try: + [type, name] = decl.split() + except: + #print "skipping:",line + continue + # print "type:",type," name:",name + + if name.find("[")>-1: + # repeated ... times + try: + num = name.split("[")[1].split("]")[0] + num = num.replace("MAXIMAGES",str(MAXIMAGES)) + num = num.replace("sizeof(INT32)","4") + times = eval(num) + except: + print "Please decode",decl + raise + else: + times=1 + try: + fmt += mar_c_to_python_struct[type]*times + names += [name]*times + expected += mar_c_sizes[type]*times + except: + #print "skipping",line + continue + #print "%4d %4d"%(mar_c_sizes[type]*times,expected),name,":",times,line + #print struct.calcsize(fmt),expected + return names, fmt + +def read_mar_header(filename): + """ + Get the header from a binary file + """ + f = open(filename,"rb") + f.seek(1024) + header=f.read(3072) + f.close() + return header + + +def interpret_header(header, fmt, names): + """ + given a format and header interpret it + """ + values = struct.unpack(fmt,header) + dict = {} + i=0 + for name in names: + if dict.has_key(name): + if type(values[i]) == type("string"): + dict[name] = dict[name]+values[i] + else: + try: + dict[name].append(values[i]) + except: + dict[name] = [dict[name],values[i]] + else: + dict[name] = values[i] + i=i+1 + + return dict + + +# Now for the c definition (found on mar webpage) +# The following string is therefore copyrighted by Mar I guess + +cdefinition = """ +typedef struct frame_header_type { + /* File/header format parameters (256 bytes) */ + UINT32 header_type; /* flag for header type + (can be used as magic number) */ + char header_name[16]; /* header name (MMX) */ + UINT32 header_major_version; /* header_major_version (n.) */ + UINT32 header_minor_version; /* header_minor_version (.n) */ + UINT32 header_byte_order;/* BIG_ENDIAN (Motorola,MIPS); + LITTLE_ENDIAN (DEC, Intel) */ + UINT32 data_byte_order; /* BIG_ENDIAN (Motorola,MIPS); + LITTLE_ENDIAN (DEC, Intel) */ + UINT32 header_size; /* in bytes */ + UINT32 frame_type; /* flag for frame type */ + UINT32 magic_number; /* to be used as a flag - + usually to indicate new file */ + UINT32 compression_type; /* type of image compression */ + UINT32 compression1; /* compression parameter 1 */ + UINT32 compression2; /* compression parameter 2 */ + UINT32 compression3; /* compression parameter 3 */ + UINT32 compression4; /* compression parameter 4 */ + UINT32 compression5; /* compression parameter 4 */ + UINT32 compression6; /* compression parameter 4 */ + UINT32 nheaders; /* total number of headers */ + UINT32 nfast; /* number of pixels in one line */ + UINT32 nslow; /* number of lines in image */ + UINT32 depth; /* number of bytes per pixel */ + UINT32 record_length; /* number of pixels between + succesive rows */ + UINT32 signif_bits; /* true depth of data, in bits */ + UINT32 data_type; /* (signed,unsigned,float...) */ + UINT32 saturated_value; /* value marks pixel as saturated */ + UINT32 sequence; /* TRUE or FALSE */ + UINT32 nimages; /* total number of images - size of + each is nfast*(nslow/nimages) */ + UINT32 origin; /* corner of origin */ + UINT32 orientation; /* direction of fast axis */ + UINT32 view_direction; /* direction to view frame */ + UINT32 overflow_location;/* FOLLOWING_HEADER, FOLLOWING_DATA */ + UINT32 over_8_bits; /* # of pixels with counts 255 */ + UINT32 over_16_bits; /* # of pixels with count 65535 */ + UINT32 multiplexed; /* multiplex flag */ + UINT32 nfastimages; /* # of images in fast direction */ + UINT32 nslowimages; /* # of images in slow direction */ + UINT32 background_applied; /* flags correction has been applied - + hold magic number ? */ + UINT32 bias_applied; /* flags correction has been applied - + hold magic number ? */ + UINT32 flatfield_applied; /* flags correction has been applied - + hold magic number ? */ + UINT32 distortion_applied; /* flags correction has been applied - + hold magic number ? */ + UINT32 original_header_type; /* Header/frame type from file + that frame is read from */ + UINT32 file_saved; /* Flag that file has been saved, + should be zeroed if modified */ + char reserve1[(64-40)*sizeof(INT32)-16]; + + /* Data statistics (128) */ + UINT32 total_counts[2]; /* 64 bit integer range = 1.85E19*/ + UINT32 special_counts1[2]; + UINT32 special_counts2[2]; + UINT32 min; + UINT32 max; + UINT32 mean; + UINT32 rms; + UINT32 p10; + UINT32 p90; + UINT32 stats_uptodate; + UINT32 pixel_noise[MAXIMAGES]; /* 1000*base noise value (ADUs) */ + char reserve2[(32-13-MAXIMAGES)*sizeof(INT32)]; + + /* More statistics (256) */ + UINT16 percentile[128]; + + + /* Goniostat parameters (128 bytes) */ + INT32 xtal_to_detector; /* 1000*distance in millimeters */ + INT32 beam_x; /* 1000*x beam position (pixels) */ + INT32 beam_y; /* 1000*y beam position (pixels) */ + INT32 integration_time; /* integration time in milliseconds */ + INT32 exposure_time; /* exposure time in milliseconds */ + INT32 readout_time; /* readout time in milliseconds */ + INT32 nreads; /* number of readouts to get this image */ + INT32 start_twotheta; /* 1000*two_theta angle */ + INT32 start_omega; /* 1000*omega angle */ + INT32 start_chi; /* 1000*chi angle */ + INT32 start_kappa; /* 1000*kappa angle */ + INT32 start_phi; /* 1000*phi angle */ + INT32 start_delta; /* 1000*delta angle */ + INT32 start_gamma; /* 1000*gamma angle */ + INT32 start_xtal_to_detector; /* 1000*distance in mm (dist in um)*/ + INT32 end_twotheta; /* 1000*two_theta angle */ + INT32 end_omega; /* 1000*omega angle */ + INT32 end_chi; /* 1000*chi angle */ + INT32 end_kappa; /* 1000*kappa angle */ + INT32 end_phi; /* 1000*phi angle */ + INT32 end_delta; /* 1000*delta angle */ + INT32 end_gamma; /* 1000*gamma angle */ + INT32 end_xtal_to_detector; /* 1000*distance in mm (dist in um)*/ + INT32 rotation_axis; /* active rotation axis */ + INT32 rotation_range; /* 1000*rotation angle */ + INT32 detector_rotx; /* 1000*rotation of detector around X */ + INT32 detector_roty; /* 1000*rotation of detector around Y */ + INT32 detector_rotz; /* 1000*rotation of detector around Z */ + char reserve3[(32-28)*sizeof(INT32)]; + + /* Detector parameters (128 bytes) */ + INT32 detector_type; /* detector type */ + INT32 pixelsize_x; /* pixel size (nanometers) */ + INT32 pixelsize_y; /* pixel size (nanometers) */ + INT32 mean_bias; /* 1000*mean bias value */ + INT32 photons_per_100adu; /* photons / 100 ADUs */ + INT32 measured_bias[MAXIMAGES]; /* 1000*mean bias value for each image*/ + INT32 measured_temperature[MAXIMAGES]; /* Temperature of each + detector in milliKelvins */ + INT32 measured_pressure[MAXIMAGES]; /* Pressure of each chamber + in microTorr */ + /* Retired reserve4 when MAXIMAGES set to 9 from 16 and + two fields removed, and temp and pressure added + char reserve4[(32-(5+3*MAXIMAGES))*sizeof(INT32)] + */ + + /* X-ray source and optics parameters (128 bytes) */ + /* X-ray source parameters (8*4 bytes) */ + INT32 source_type; /* (code) - target, synch. etc */ + INT32 source_dx; /* Optics param. - (size microns) */ + INT32 source_dy; /* Optics param. - (size microns) */ + INT32 source_wavelength; /* wavelength (femtoMeters) */ + INT32 source_power; /* (Watts) */ + INT32 source_voltage; /* (Volts) */ + INT32 source_current; /* (microAmps) */ + INT32 source_bias; /* (Volts) */ + INT32 source_polarization_x; /* () */ + INT32 source_polarization_y; /* () */ + char reserve_source[4*sizeof(INT32)]; + + /* X-ray optics_parameters (8*4 bytes) */ + INT32 optics_type; /* Optics type (code)*/ + INT32 optics_dx; /* Optics param. - (size microns) */ + INT32 optics_dy; /* Optics param. - (size microns) */ + INT32 optics_wavelength; /* Optics param. - (size microns) */ + INT32 optics_dispersion; /* Optics param. - (*10E6) */ + INT32 optics_crossfire_x; /* Optics param. - (microRadians) */ + INT32 optics_crossfire_y; /* Optics param. - (microRadians) */ + INT32 optics_angle; /* Optics param. - (monoch. + 2theta - microradians) */ + INT32 optics_polarization_x; /* () */ + INT32 optics_polarization_y; /* () */ + char reserve_optics[4*sizeof(INT32)]; + + char reserve5[((32-28)*sizeof(INT32))]; + + /* File parameters (1024 bytes) */ + char filetitle[128]; /* Title */ + char filepath[128]; /* path name for data file */ + char filename[64]; /* name of data file */ + char acquire_timestamp[32]; /* date and time of acquisition */ + char header_timestamp[32]; /* date and time of header update */ + char save_timestamp[32]; /* date and time file saved */ + char file_comments[512]; /* comments, use as desired */ + char reserve6[1024-(128+128+64+(3*32)+512)]; + + /* Dataset parameters (512 bytes) */ + char dataset_comments[512]; /* comments, used as desired */ + /* pad out to 3072 bytes */ + char pad[3072-(256+128+256+(3*128)+1024+512)]; + + } frame_header; +""" + + + +class marheaderreader: + """ + Class to sit and read a series of images (makes format etc only once) + """ + def __init__(self): + """ + Initialise internal stuff + """ + self.names , self.fmt = make_format(cdefinition) + def get_header(self,filename): + """ + Reads a header from file filename + """ + h=read_mar_header(filename) + dict = interpret_header(h,self.fmt,self.names) + # Append ESRF formatted stuff + items = self.readesrfstring(dict["dataset_comments[512]"]) + for pair in items: + dict[pair[0]]=pair[1] + items = self.readesrfstring(dict["file_comments[512]"]) + for pair in items: + dict[pair[0]]=pair[1] + dict["pixelsize_x_mm"]= str(float(dict["pixelsize_x"])/1e6) + dict["pixelsize_y_mm"]= str(float(dict["pixelsize_y"])/1e6) + dict["integration_time_sec"]= str(float(dict["integration_time"])/1e3) + dict["beam_y_mm"]= str(float(dict["pixelsize_y_mm"])* + float(dict["beam_y"])/1000.) + dict["beam_x_mm"]= str(float(dict["pixelsize_x_mm"])* + float(dict["beam_x"])/1000.) + + return dict + + def readesrfstring(self,s): + """ + Interpret the so called "esrf format" header lines + which are in comment sections + """ + s=s.replace("\000","") + items = filter(None, [len(x)>1 and x or None for x in [ + item.split("=") for item in s.split(";")]]) + return items + + +if __name__=="__main__": + """ + Make a little program to process files + """ + import sys + print "Starting" + names,fmt = make_format(cdefinition) + print "Names and format made" + h = read_mar_header(sys.argv[1]) + print "Read header, interpreting" + d = interpret_header(h,fmt,names) + printed = {} + for name in names: + if printed.has_key(name): + continue + print name,":",d[name] + printed[name]=1 + diff --git a/py2cbf/xmas/xmas_cif_template.cif b/py2cbf/xmas/xmas_cif_template.cif new file mode 100644 index 00000000..c5f468f8 --- /dev/null +++ b/py2cbf/xmas/xmas_cif_template.cif @@ -0,0 +1,220 @@ + +###CBF: VERSION 0.6 +# CBF file written by cbflib v0.6 + + + +data_image_1 + + + +loop_ +_diffrn.id +_diffrn.crystal_id + DS1 DIFFRN_CRYSTAL_ID + +loop_ +_cell.length_a 5.959(1) +_cell.length_b 14.956(1) +_cell.length_c 19.737(3) +_cell.angle_alpha 90 +_cell.angle_beta 90 +_cell.angle_gamma 90 + + +loop_ +_diffrn_orient_matrix.id 'DS1' +_diffrn_orient_matrix.type +; reciprocal axis matrix, multiplies hkl vector to generate + diffractometer xyz vector and diffractometer angles +; +_diffrn_orient_matrix.UB[1][1] 0.11 +_diffrn_orient_matrix.UB[1][2] 0.12 +_diffrn_orient_matrix.UB[1][3] 0.13 +_diffrn_orient_matrix.UB[2][1] 0.21 +_diffrn_orient_matrix.UB[2][2] 0.22 +_diffrn_orient_matrix.UB[2][3] 0.23 +_diffrn_orient_matrix.UB[3][1] 0.31 +_diffrn_orient_matrix.UB[3][2] 0.32 +_diffrn_orient_matrix.UB[3][3] 0.33 + + + + +loop_ +_diffrn_source.diffrn_id +_diffrn_source.source +_diffrn_source.current +_diffrn_source.type + DS1 synchrotron 200.0 'XMAS beamline bm28 ESRF' + +loop_ +_diffrn_radiation.diffrn_id +_diffrn_radiation.wavelength_id +_diffrn_radiation.probe +_diffrn_radiation.monochromator +_diffrn_radiation.polarizn_source_ratio +_diffrn_radiation.polarizn_source_norm +_diffrn_radiation.div_x_source +_diffrn_radiation.div_y_source +_diffrn_radiation.div_x_y_source +_diffrn_radiation.collimation + DS1 WAVELENGTH1 x-ray 'Si 111' 0.8 0.0 0.08 0.01 0.00 '0.20 mm x 0.20 mm' + +loop_ +_diffrn_radiation_wavelength.id +_diffrn_radiation_wavelength.wavelength +_diffrn_radiation_wavelength.wt + WAVELENGTH1 1.73862 1.0 + +loop_ +_diffrn_detector.diffrn_id +_diffrn_detector.id +_diffrn_detector.type +_diffrn_detector.details +_diffrn_detector.number_of_axes + DS1 MAR 'MAR XMAS' 'slow mode' 5 + +loop_ +_diffrn_detector_axis.detector_id +_diffrn_detector_axis.axis_id + MAR DETECTOR_TWO_THETA_VERTICAL + MAR DETECTOR_X + MAR DETECTOR_Y + MAR DETECTOR_Z + MAR DETECTOR_PITCH + +loop_ +_diffrn_detector_element.id +_diffrn_detector_element.detector_id + ELEMENT1 MAR + +loop_ +_diffrn_data_frame.id +_diffrn_data_frame.detector_element_id +_diffrn_data_frame.array_id +_diffrn_data_frame.binary_id + FRAME1 ELEMENT1 ARRAY1 1 + +loop_ +_diffrn_measurement.diffrn_id +_diffrn_measurement.id +_diffrn_measurement.number_of_axes +_diffrn_measurement.method +_diffrn_measurement.details + DS1 GONIOMETER 3 rotation + 'i0=1.000 i1=1.000 i2=1.000 ib=1.000 beamstop=20 mm 0% attenuation' + +loop_ +_diffrn_measurement_axis.measurement_id +_diffrn_measurement_axis.axis_id + GONIOMETER GONIOMETER_PHI + GONIOMETER GONIOMETER_CHI + GONIOMETER GONIOMETER_THETA + + +loop_ +_diffrn_scan.id +_diffrn_scan.frame_id_start +_diffrn_scan.frame_id_end +_diffrn_scan.frames + SCAN1 FRAME1 FRAME1 1 + +loop_ +_diffrn_scan_axis.scan_id +_diffrn_scan_axis.axis_id +_diffrn_scan_axis.angle_start +_diffrn_scan_axis.angle_range +_diffrn_scan_axis.angle_increment +_diffrn_scan_axis.displacement_start +_diffrn_scan_axis.displacement_range +_diffrn_scan_axis.displacement_increment + SCAN1 GONIOMETER_THETA 0.0 0.0 0.0 0.0 0.0 0.0 + SCAN1 GONIOMETER_CHI 0.0 0.0 0.0 0.0 0.0 0.0 + SCAN1 GONIOMETER_PHI 185 1 1 0.0 0.0 0.0 + SCAN1 DETECTOR_TWO_THETA_VERTICAL 0.0 0.0 0.0 0.0 0.0 0.0 + SCAN1 DETECTOR_Z 0.0 0.0 0.0 103.750 0 0 + SCAN1 DETECTOR_Y 0.0 0.0 0.0 0.0 0.0 0.0 + SCAN1 DETECTOR_X 0.0 0.0 0.0 0.0 0.0 0.0 + SCAN1 DETECTOR_PITCH 0.0 0.0 0.0 0.0 0.0 0.0 + +loop_ +_diffrn_scan_frame.frame_id +_diffrn_scan_frame.frame_number +_diffrn_scan_frame.integration_time +_diffrn_scan_frame.scan_id +_diffrn_scan_frame.date + FRAME1 1 360 SCAN1 1997-12-04T10:23:48 + +loop_ +_diffrn_scan_frame_axis.frame_id +_diffrn_scan_frame_axis.axis_id +_diffrn_scan_frame_axis.angle +_diffrn_scan_frame_axis.displacement + FRAME1 GONIOMETER_THETA 0.0 0.0 + FRAME1 GONIOMETER_CHI 0.0 0.0 + FRAME1 GONIOMETER_PHI 185 0.0 + FRAME1 DETECTOR_TWO_THETA_VERTICAL 185 0.0 + FRAME1 DETECTOR_Z 0.0 103.750 + FRAME1 DETECTOR_Y 0.0 0.0 + FRAME1 DETECTOR_X 0.0 0.0 + FRAME1 DETECTOR_PITCH 0.0 0.0 + +loop_ +_axis.id +_axis.type +_axis.equipment +_axis.depends_on +_axis.vector[1] +_axis.vector[2] +_axis.vector[3] +_axis.offset[1] +_axis.offset[2] +_axis.offset[3] + GONIOMETER_THETA rotation goniometer . 1 0 0 . . . + GONIOMETER_CHI rotation goniometer GONIOMETER_THETA 0 0 1 . . . + GONIOMETER_PHI rotation goniometer GONIOMETER_PHI 1 0 0 . . . + SOURCE general source . 0 0 1 . . . + GRAVITY general gravity . 0 -1 0 . . . + DETECTOR_TWO_THETA_VERTICAL rotation goniometer . 1 0 0 . . . + DETECTOR_Z translation detector DETECTOR_TWO_THETA_VERTICAL 0 0 -1 0 0 0 + DETECTOR_Y translation detector DETECTOR_Z 0 1 0 0 0 0 + DETECTOR_X translation detector DETECTOR_Y 1 0 0 0 0 0 + DETECTOR_PITCH rotation detector DETECTOR_X 0 1 0 0 0 0 + ELEMENT_X translation detector DETECTOR_PITCH 1 0 0 -94.0032 94.0032 0 + ELEMENT_Y translation detector ELEMENT_X 0 1 0 0 0 0 + +loop_ +_array_structure_list.array_id +_array_structure_list.index +_array_structure_list.dimension +_array_structure_list.precedence +_array_structure_list.direction +_array_structure_list.axis_set_id + ARRAY1 1 2049 1 increasing ELEMENT_X + ARRAY1 2 2049 2 increasing ELEMENT_Y + +loop_ +_array_structure_list_axis.axis_set_id +_array_structure_list_axis.axis_id +_array_structure_list_axis.displacement +_array_structure_list_axis.displacement_increment + ELEMENT_X ELEMENT_X 0.0408 0.0816 + ELEMENT_Y ELEMENT_Y -0.0408 -0.0816 + +loop_ +_array_intensities.array_id +_array_intensities.binary_id +_array_intensities.linearity +_array_intensities.gain +_array_intensities.gain_esd +_array_intensities.overload +_array_intensities.undefined_value + ARRAY1 1 linear 0.30 0.03 65000 0 + +loop_ +_array_structure.id +_array_structure.encoding_type +_array_structure.compression_type +_array_structure.byte_order + ARRAY1 "signed 32-bit integer" packed little_endian diff --git a/py2cbf/xmas/xmasheaders.py b/py2cbf/xmas/xmasheaders.py new file mode 100644 index 00000000..e6cd345b --- /dev/null +++ b/py2cbf/xmas/xmasheaders.py @@ -0,0 +1,257 @@ +#!/usr/bin/env python + + +import pycbf + +# Some cbf helper functions - obj would be a cbf_handle_struct object + +def writewavelength(obj,wavelength): + obj.set_wavelength(float(wavelength)) + +def writecellpar(obj,cifname,value): + obj.find_category("cell") + obj.find_column(cifname) + obj.set_value(value) + +def writecell(obj,cell): + """ + call with cell = (a,b,c,alpha,beta,gamma) + """ + obj.find_category("cell") + obj.find_column("length_a") + obj.set_value(str(cell[0])) + obj.find_column("length_b") + obj.set_value(str(cell[1])) + obj.find_column("length_c") + obj.set_value(str(cell[2])) + obj.find_column("angle_alpha") + obj.set_value(str(cell[3])) + obj.find_column("angle_beta") + obj.set_value(str(cell[4])) + obj.find_column("angle_gamma") + obj.set_value(str(cell[5])) + +def writeUB(obj,ub): + """ + call with ub that can be indexed ub[i][j] + """ + obj.find_category("diffrn_orient_matrix") + for i in (1,2,3): + for j in (1,2,3): + obj.find_column("UB[%d][%d]"%(i,j)) + obj.set_value(str(ub[i-1][j-1])) + +def writedistance(obj,distance): + obj.set_axis_setting("DETECTOR_Z",float(distance),0.) + + +def writebeam_x_mm(obj,cen): + obj.set_axis_setting("DETECTOR_X",float(cen),0.) + +def writebeam_y_mm(obj,cen): + obj.set_axis_setting("DETECTOR_Y",float(cen),0.) + +def writeSPECcmd(obj,s): + obj.find_category("diffrn_measurement") + obj.find_column("details") + obj.set_value(s) + +def writeSPECscan(obj,s): + obj.find_category("diffrn_scan") + obj.find_column("id") + obj.set_value("SCAN%s"%(s)) + obj.find_category("diffrn_scan_axis") + obj.find_column("scan_id") + obj.rewind_row() + for i in range(obj.count_rows()): + obj.select_row(i) + obj.set_value("SCAN%s"%(s)) + obj.find_category("diffrn_scan_frame") + obj.find_column("scan_id") + obj.rewind_row() + obj.set_value("SCAN%s"%(s)) + + +def writepixelsize_y_mm(obj,s): + """ + Units are mm for cif + """ + # element number = assume this is first and only detector + element_number = 0 + # axis number = faster or slower... ? Need to check precedence ideally... + obj.find_category("array_structure_list") + obj.find_column("axis_set_id") + obj.find_row("ELEMENT_Y") + obj.find_column("precedence") + axis_number = obj.get_integervalue() + + obj.set_pixel_size(element_number, axis_number, float(s) ) + + obj.find_category("array_structure_list_axis") + obj.find_column("axis_id") + obj.find_row("ELEMENT_Y") + obj.find_column("displacement") + obj.set_doublevalue("%.6g",float(s)/2.0) + obj.find_column("displacement_increment") + obj.set_doublevalue("%.6g",float(s)) + +def writepixelsize_x_mm(obj,s): + # element number = assume this is first and only detector + element_number = 0 + # axis number = faster or slower... ? Need to check precedence ideally... + obj.find_category("array_structure_list") + obj.find_column("axis_set_id") + obj.find_row("ELEMENT_X") + obj.find_column("precedence") + axis_number = obj.get_integervalue() + + obj.set_pixel_size(element_number, axis_number, float(s) ) + + obj.find_category("array_structure_list_axis") + obj.find_column("axis_id") + obj.find_row("ELEMENT_X") + obj.find_column("displacement") + obj.set_doublevalue("%.6g",float(s)/2.0) + obj.find_column("displacement_increment") + obj.set_doublevalue("%.6g",float(s)) + +def writeintegrationtime(obj,s): + obj.find_category("diffrn_scan_frame") + obj.find_column("integration_time") + obj.set_value(str(s).replace("\000","")) + +def writenfast(obj,s): + obj.find_category("array_structure_list") + obj.find_column("index") + obj.find_row("1") + obj.find_column("dimension") + obj.set_value(str(s)) + +def writenslow(obj,s): + obj.find_category("array_structure_list") + obj.find_column("index") + obj.find_row("2") + obj.find_column("dimension") + obj.set_value(str(s)) + + +functiondict = { + "lambda" : writewavelength, + "beam_x_mm" : writebeam_x_mm, + "beam_y_mm" : writebeam_y_mm, + "distance" : writedistance, + "UB" : writeUB, + "cell" : writecell, + "cmd" : writeSPECcmd, + "scan" : writeSPECscan, + "nfast" : writenfast, + "nslow" : writenslow, + "pixelsize_y_mm" : writepixelsize_y_mm, + "pixelsize_x_mm" : writepixelsize_x_mm, + "integration_time_sec" : writeintegrationtime, + "tth" : lambda obj,value : obj.set_axis_setting( + "DETECTOR_TWO_THETA_VERTICAL",float(value),0.), + "chi" : lambda obj,value : obj.set_axis_setting( + "GONIOMETER_CHI",float(value),0.), + "th" : lambda obj,value : obj.set_axis_setting( + "GONIOMETER_THETA",float(value),0.), + "phi" : lambda obj,value : obj.set_axis_setting( + "GONIOMETER_PHI",float(value),0.), + "lc_a" : lambda obj,value : writecellpar(obj,"length_a",value), + "lc_b" : lambda obj,value : writecellpar(obj,"length_b",value), + "lc_c" : lambda obj,value : writecellpar(obj,"length_c",value), + "lc_al" : lambda obj,value : writecellpar(obj,"angle_alpha",value), + "lc_be" : lambda obj,value : writecellpar(obj,"angle_beta",value), + "lc_ga" : lambda obj,value : writecellpar(obj,"angle_gamma",value) + } + +""" + # + # Not implementing these for now + lc_ra + lc_rc 0.4742 + lc_rb 1.16 + energy 13 + cp_phi -180 + alpha 7.3716 + lc_ral 90 + cp_tth -180 + lc_rga 90 + beta 17.572 + omega -2.185 + h 0.21539 + k 0.01957 + l 5.9763 + cp_chi -180 + lc_rbe 90 + cp_th -180 + azimuth 0 +""" + +# Finally a class for creating header files. +# It reads a template and then offers a processfile command +# for running over a file series + +class cifheader: + + def __init__(self,templatefile): + self.cbf=pycbf.cbf_handle_struct() + self.cbf.read_template(templatefile) + from readmarheader import marheaderreader + self.marheaderreader = marheaderreader() + + + def processfile(self,filename, outfile=None, + format="mccd", + **kwds): + outfile=outfile.replace(format,"cif") + + if format == "mccd": + items = self.marheaderreader.get_header(filename) + + if format == "bruker": + pass + if format == "edf": + pass + + self.items=items + + # Take the image header items as default + self.updateitems(items) + + # Allow them to be overridden + self.updateitems(kwds) + + # Write the file + self.writefile(outfile) + + + + def writefile(self,filename): + self.cbf.write_file(filename,pycbf.CIF,pycbf.MIME_HEADERS, + pycbf.ENC_BASE64) + + + def updateitems(self,dict): + names = dict.keys() + for name in names: + value = dict[name] + # use a dictionary of functions + if functiondict.has_key(name): + # print "calling",functiondict[name],value + apply(functiondict[name],(self.cbf,value)) + else: + #print "ignoring",name,value + pass + + +if __name__=="__main__": + import sys + + obj=cifheader("xmas_cif_template.cif") + + ub = [[0.11, 0.12, 0.13] , [0.21, 0.22, 0.23], [0.31, 0.32, 0.33]] + + for filename in sys.argv[1:]: + fileout = filename.split("/")[-1] + obj.processfile(filename, outfile=fileout, UB=ub, distance=123.456) diff --git a/pycbf/cbf_autoscrolled_window.py b/pycbf/cbf_autoscrolled_window.py index 0d7e5743..c16c62c8 100644 --- a/pycbf/cbf_autoscrolled_window.py +++ b/pycbf/cbf_autoscrolled_window.py @@ -70,7 +70,7 @@ import tkinter as TKINTER import tkinter.filedialog as TKFILEDIALOG except ImportError: - print "CBF: cbf_autoscrolled_window requires Tkinter" + print("CBF: cbf_autoscrolled_window requires Tkinter") sys.exit(1) diff --git a/pycbf/cbf_axis_text.py b/pycbf/cbf_axis_text.py index 1a0dc04c..6b1d4946 100644 --- a/pycbf/cbf_axis_text.py +++ b/pycbf/cbf_axis_text.py @@ -76,7 +76,7 @@ def get_table_entry(xcbf,xcol): object.read_file(cbf,pycbf.MSG_DIGEST) foundfile = 1 except: - print "Unable to open ",cbf + print("Unable to open ",cbf) if foundfile == -1: sys.exit(0) @@ -84,7 +84,7 @@ def get_table_entry(xcbf,xcol): try: object.find_category("axis") except: - print "No axis category found" + print("No axis category found") sys.exit() axis_table = {} axis_objects = {} @@ -93,13 +93,13 @@ def get_table_entry(xcbf,xcol): equipment_table = {} axis_rows = object.count_rows() -print axis_rows, "rows in axis table" +print(axis_rows, "rows in axis table") if axis_rows < 1: - print "Axis category has no rows" + print("Axis category has no rows") sys.exit() for jrow in range(axis_rows): object.rewind_column() - # print "jrow: ", jrow + # print("jrow: ", jrow) object.select_row(jrow) temp_dictionary = {} id = get_table_entry(object,"id") @@ -142,7 +142,7 @@ def get_table_entry(xcbf,xcol): base_axis_table[temp_dictionary["id"]] = temp_dictionary["depends_on"] -#print "axis table: " +#print("axis table: ") for key in axis_table.keys(): - print key+": vector: ", axis_table[key]["vector"],", offset: ", axis_table[key]["offset"] - print "axis chain:", get_axis_chain(axis_table,key) + print(key+": vector: ", axis_table[key]["vector"],", offset: ", axis_table[key]["offset"]) + print("axis chain:", get_axis_chain(axis_table,key)) diff --git a/pycbf/cbfdetectorwrappers.i b/pycbf/cbfdetectorwrappers.i index b144c529..31535371 100644 --- a/pycbf/cbfdetectorwrappers.i +++ b/pycbf/cbfdetectorwrappers.i @@ -30,12 +30,12 @@ typedef cbf_detector_struct *cbf_detector; cbf_failnez(cbf_free_detector(self)); } %feature("autodoc", " -Returns : -*args : double indexfast,double indexslow,double centerfast,double centerslow +Returns : double index1,double index2,double center1,double center2 +*args : -C prototype: int cbf_set_beam_center_fs (cbf_detector detector, - double *indexfast, double *indexslow, double *centerfast, - double *centerslow); +C prototype: int cbf_get_beam_center (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, + double *centerfast); CBFLib documentation: DESCRIPTION @@ -89,19 +89,21 @@ slow axis. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")set_beam_center_fs; +")get_beam_center; - void set_beam_center_fs(double *indexfast, double *indexslow, - double *centerfast,double *centerslow){ - cbf_failnez(cbf_set_beam_center_fs(self, indexfast, indexslow, - centerfast, centerslow)); +%apply double *OUTPUT {double *index1, double *index2, + double *center1,double *center2}; + void get_beam_center(double *index1, double *index2, + double *center1,double *center2){ + cbf_failnez(cbf_get_beam_center(self, index1, index2, + center1, center2)); } %feature("autodoc", " -Returns : -*args : double indexfast,double indexslow,double centerfast,double centerslow +Returns : double indexfast,double indexslow,double centerfast,double centerslow +*args : -C prototype: int cbf_set_reference_beam_center_fs (cbf_detector detector, - double *indexfast, double *indexslow, double *centerfast, +C prototype: int cbf_get_beam_center_fs (cbf_detector detector, + double *indexfast, double *indexslow, double *centerfast, double *centerslow); CBFLib documentation: @@ -156,18 +158,20 @@ slow axis. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")set_reference_beam_center_fs; +")get_beam_center_fs; - void set_reference_beam_center_fs(double *indexfast, double *indexslow, +%apply double *OUTPUT {double *indexfast, double *indexslow, + double *centerfast,double *centerslow}; + void get_beam_center_fs(double *indexfast, double *indexslow, double *centerfast,double *centerslow){ - cbf_failnez(cbf_set_reference_beam_center_fs(self, indexfast, indexslow, + cbf_failnez(cbf_get_beam_center_fs(self, indexfast, indexslow, centerfast, centerslow)); } %feature("autodoc", " -Returns : double index1,double index2,double center1,double center2 +Returns : double indexslow,double indexfast,double centerslow,double centerfast *args : -C prototype: int cbf_get_beam_center (cbf_detector detector, +C prototype: int cbf_get_beam_center_sf (cbf_detector detector, double *indexslow, double *indexfast, double *centerslow, double *centerfast); @@ -223,248 +227,216 @@ slow axis. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_beam_center; +")get_beam_center_sf; -%apply double *OUTPUT {double *index1, double *index2, - double *center1,double *center2}; - void get_beam_center(double *index1, double *index2, - double *center1,double *center2){ - cbf_failnez(cbf_get_beam_center(self, index1, index2, - center1, center2)); +%apply double *OUTPUT {double *indexslow, double *indexfast, + double *centerslow,double *centerfast}; + void get_beam_center_sf(double *indexslow, double *indexfast, + double *centerslow,double *centerfast){ + cbf_failnez(cbf_get_beam_center_sf(self, indexslow, indexfast, + centerslow, centerfast)); } %feature("autodoc", " -Returns : double coordinate1,double coordinate2,double coordinate3 -*args : double indexfast,double indexslow +Returns : +*args : double indexslow,double indexfast,double centerslow,double centerfast -C prototype: int cbf_get_pixel_coordinates_fs (cbf_detector detector, - double indexfast, double indexslow, double *coordinate1, - double *coordinate2, double *coordinate3); +C prototype: int cbf_set_beam_center (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, + double *centerfast); CBFLib documentation: DESCRIPTION -cbf_get_pixel_coordinates, cbf_get_pixel_coordinates_fs and -cbf_get_pixel_coordinates_sf ses *coordinate1, *coordinate2, and -*coordinate3 to the vector position of pixel (indexfast, indexslow) -on the detector surface. If indexslow and indexfast are integers then -the coordinates correspond to the center of a pixel. -Any of the destination pointers may be NULL. +cbf_get_beam_center sets *centerfast and *centerslow to the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector and *indexfast and +*indexslow to the corresponding indices. cbf_set_beam_center sets the +offsets in the axis category for the detector element axis with +precedence 1 to place the beam center at the position given in mm by +*centerfast and *centerslow as the displacements in mm along the +detector axes from pixel (0, 0) to the point at which the beam +intersects the detector at the indices given *indexfast and +*indexslow. cbf_set_reference_beam_center sets the displacments in +the array_structure_list_axis category to place the beam center at +the position given in mm by *centerfast and *centerslow as the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector at the indices given +by *indexfast and *indexslow. In order to achieve consistent results, +a reference detector should be used for detector to have all axes at +their reference settings. +Note that the precedence 1 axis is the fastest axis, so that +*centerfast and *indexfast are the fast axis components of the center +and *centerslow and *indexslow are the slow axis components of the +center. +The _fs calls give the displacments in a fast-to-slow order. The +calls with no suffix and the calls _sf calls give the displacements +in slow-to-fast order +Any of the destination pointers may be NULL for getting the beam +center. For setting the beam axis, either the indices of the center +must not be NULL. +The indices are non-negative for beam centers within the detector +surface, but the center for an axis with a negative increment will be +negative for a beam center within the detector surface. +For cbf_set_beam_center if the diffrn_data_frame category exists with +a row for the corresponding element id, the values will be set for +_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in +millimetres and the value of _diffrn_data_frame.center_units will be +set to 'mm'. +For cbf_set_reference_beam_center if the diffrn_detector_element +category exists with a row for the corresponding element id, the +values will be set for _diffrn_detector_element.reference_center_fast +and _diffrn_detector_element.reference_center_slow in millimetres and +the value of _diffrn_detector_element.reference_units will be set to +'mm'. ARGUMENTS -detector Detector handle. indexslow Slow index. indexfast - Fast index. coordinate1 Pointer to the destination x component. -coordinate2 Pointer to the destination y component. coordinate3 -Pointer to the destination z component. +detector Detector handle. indexfast Pointer to the destination +fast index. indexslow Pointer to the destination slow index. +centerfast Pointer to the destination displacement along the fast +axis. centerslow Pointer to the destination displacement along the +slow axis. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_pixel_coordinates_fs; +")set_beam_center; -%apply double *OUTPUT {double *coordinate1, - double *coordinate2, double *coordinate3}; - void get_pixel_coordinates_fs(double indexfast, double indexslow, - double *coordinate1, - double *coordinate2, - double *coordinate3){ - cbf_failnez(cbf_get_pixel_coordinates_fs(self, indexfast, indexslow, coordinate1, coordinate2, coordinate3)); - } + void set_beam_center(double *indexslow, double *indexfast, + double *centerslow,double *centerfast){ + cbf_failnez(cbf_set_beam_center(self, indexslow, indexfast, + centerslow, centerfast)); + } %feature("autodoc", " -Returns : Float pixel size -*args : Int axis_number +Returns : +*args : double indexfast,double indexslow,double centerfast,double centerslow -C prototype: int cbf_get_inferred_pixel_size (cbf_detector detector, - int axis_number, double *psize); +C prototype: int cbf_set_beam_center_fs (cbf_detector detector, + double *indexfast, double *indexslow, double *centerfast, + double *centerslow); CBFLib documentation: DESCRIPTION -cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_sf set -*psize to point to the double value in millimeters of the pixel size -for the axis axis_number value. The slow index is treated as axis 1 -and the next faster index is treated as axis 2. -cbf_get_inferred_pixel_size_fs sets *psize to point to the double -value in millimeters of the pixel size for the axis axis_number -value. The fast index is treated as axis 1 and the next slower index -is treated as axis 2. -If the axis number is negative, the axes are used in the reverse -order so that an axis_number of -1 indicates the fast axes in a call -to cbf_get_inferred_pixel_size or cbf_get_inferred_pixel_size_sf and -indicates the fast axis in a call to cbf_get_inferred_pixel_size_fs. +cbf_get_beam_center sets *centerfast and *centerslow to the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector and *indexfast and +*indexslow to the corresponding indices. cbf_set_beam_center sets the +offsets in the axis category for the detector element axis with +precedence 1 to place the beam center at the position given in mm by +*centerfast and *centerslow as the displacements in mm along the +detector axes from pixel (0, 0) to the point at which the beam +intersects the detector at the indices given *indexfast and +*indexslow. cbf_set_reference_beam_center sets the displacments in +the array_structure_list_axis category to place the beam center at +the position given in mm by *centerfast and *centerslow as the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector at the indices given +by *indexfast and *indexslow. In order to achieve consistent results, +a reference detector should be used for detector to have all axes at +their reference settings. +Note that the precedence 1 axis is the fastest axis, so that +*centerfast and *indexfast are the fast axis components of the center +and *centerslow and *indexslow are the slow axis components of the +center. +The _fs calls give the displacments in a fast-to-slow order. The +calls with no suffix and the calls _sf calls give the displacements +in slow-to-fast order +Any of the destination pointers may be NULL for getting the beam +center. For setting the beam axis, either the indices of the center +must not be NULL. +The indices are non-negative for beam centers within the detector +surface, but the center for an axis with a negative increment will be +negative for a beam center within the detector surface. +For cbf_set_beam_center if the diffrn_data_frame category exists with +a row for the corresponding element id, the values will be set for +_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in +millimetres and the value of _diffrn_data_frame.center_units will be +set to 'mm'. +For cbf_set_reference_beam_center if the diffrn_detector_element +category exists with a row for the corresponding element id, the +values will be set for _diffrn_detector_element.reference_center_fast +and _diffrn_detector_element.reference_center_slow in millimetres and +the value of _diffrn_detector_element.reference_units will be set to +'mm'. ARGUMENTS -detector Detector handle. axis_number The number of the axis. -area Pointer to the destination pizel size in mm. +detector Detector handle. indexfast Pointer to the destination +fast index. indexslow Pointer to the destination slow index. +centerfast Pointer to the destination displacement along the fast +axis. centerslow Pointer to the destination displacement along the +slow axis. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_inferred_pixel_size; +")set_beam_center_fs; -%apply double *OUTPUT { double *psize } get_inferred_pixel_size; -void get_inferred_pixel_size(unsigned int axis_number, double* psize){ - cbf_failnez(cbf_get_inferred_pixel_size(self, axis_number, psize)); - } + void set_beam_center_fs(double *indexfast, double *indexslow, + double *centerfast,double *centerslow){ + cbf_failnez(cbf_set_beam_center_fs(self, indexfast, indexslow, + centerfast, centerslow)); + } %feature("autodoc", " -Returns : double area,double projected_area -*args : double index1,double index2 +Returns : +*args : double indexslow,double indexfast,double centerslow,double centerfast -C prototype: int cbf_get_pixel_area (cbf_detector detector, double indexslow, - double indexfast, double *area, double *projected_area); +C prototype: int cbf_set_beam_center_sf (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, + double *centerfast); CBFLib documentation: DESCRIPTION -cbf_get_pixel_area, cbf_get_pixel_area_fs and cbf_get_pixel_area_sf -set *area to the area of the pixel at (indexfast, indexslow) on the -detector surface and *projected_area to the apparent area of the -pixel as viewed from the sample position, with indexslow being the -slow axis and indexfast being the fast axis. -Either of the destination pointers may be NULL. -ARGUMENTS -detector Detector handle. indexfast Fast index. -indexslow Slow index. area Pointer to the -destination area in mm2. projected_area Pointer to the destination -apparent area in mm2. -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_pixel_area; - -%apply double *OUTPUT{double *area,double *projected_area}; - void get_pixel_area(double index1, double index2, - double *area,double *projected_area){ - cbf_failnez(cbf_get_pixel_area (self, - index1, index2, area,projected_area)); - } -%feature("autodoc", " -Returns : double normal1,double normal2,double normal3 -*args : double indexfast,double indexslow - -C prototype: int cbf_get_pixel_normal_fs (cbf_detector detector, - double indexfast, double indexslow, double *normal1, - double *normal2, double *normal3); - -CBFLib documentation: -DESCRIPTION -cbf_get_detector_normal, cbf_get_pixel_normal_fs and -cbf_get_pixel_normal_sf set *normal1, *normal2, and *normal3 to the 3 -components of the of the normal vector to the pixel at (indexfast, -indexslow). The vector is normalized. -Any of the destination pointers may be NULL. -ARGUMENTS -detector Detector handle. indexslow Slow index. indexfast Fast -index. normal1 Pointer to the destination x component of the -normal vector. normal2 Pointer to the destination y component of -the normal vector. normal3 Pointer to the destination z component -of the normal vector. -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_pixel_normal_fs; - -%apply double *OUTPUT {double *normal1, double *normal2, double *normal3}; - void get_pixel_normal_fs ( double indexfast, double indexslow, - double *normal1, double *normal2, double *normal3){ - cbf_failnez(cbf_get_pixel_normal_fs(self, - indexfast,indexslow,normal1,normal2,normal3)); - } - -%feature("autodoc", " -Returns : String -*args : Integer index - -C prototype: int cbf_get_detector_surface_axes(cbf_detector detector, - const char * * axis_id1, const char * * axis_id2); - -CBFLib documentation: -DESCRIPTION -cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and -*slowaxis3 to the 3 components of the slow axis of the specified -detector at the current settings of all axes. -cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and -*fastaxis3 to the 3 components of the fast axis of the specified -detector at the current settings of all axes. cbf_get_detector_axes, -cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set -*slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the -slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 -components of the fast axis of the specified detector at the current -settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 -and *axis_id2 to the names of the two surface axes of the detector or - \". \", -Any of the destination pointers may be NULL. -ARGUMENTS -detector Detector handle. slowaxis1 Pointer to the destination x -component of the slow axis vector. slowaxis2 Pointer to the -destination y component of the slow axis vector. slowaxis3 Pointer -to the destination z component of the slow axis vector. fastaxis1 -Pointer to the destination x component of the fast axis vector. -fastaxis2 Pointer to the destination y component of the fast axis -vector. fastaxis3 Pointer to the destination z component of the -fast axis vector. axis_id1 Pointer to the destination first -surface axis name. axis_id1 Pointer to the destination first -surface axis name. axis_id2 Pointer to the destination second -surface axis name. -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")cbf_get_detector_surface_axes; - - const char * get_detector_surface_axes (int index ){ - const char * axis_id1; - const char * axis_id2; - cbf_failnez(cbf_get_detector_surface_axes(self, - &axis_id1, &axis_id2)); - if (index == 0) return axis_id1; - if (index == 1) return axis_id2; - return "."; - } - - - %feature("autodoc", " -Returns : double slowaxis1,double slowaxis2,double slowaxis3,double fastaxis1, - double fastaxis2,double fastaxis3 -*args : - -C prototype: int cbf_get_detector_axes (cbf_detector detector, - double *slowaxis1, double *slowaxis2, double *slowaxis3, - double *fastaxis1, double *fastaxis2, double *fastaxis3); - -CBFLib documentation: -DESCRIPTION -cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and -*slowaxis3 to the 3 components of the slow axis of the specified -detector at the current settings of all axes. -cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and -*fastaxis3 to the 3 components of the fast axis of the specified -detector at the current settings of all axes. cbf_get_detector_axes, -cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set -*slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the -slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 -components of the fast axis of the specified detector at the current -settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 -and *axis_id2 to the names of the two surface axes of the detector or - \". \", -Any of the destination pointers may be NULL. +cbf_get_beam_center sets *centerfast and *centerslow to the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector and *indexfast and +*indexslow to the corresponding indices. cbf_set_beam_center sets the +offsets in the axis category for the detector element axis with +precedence 1 to place the beam center at the position given in mm by +*centerfast and *centerslow as the displacements in mm along the +detector axes from pixel (0, 0) to the point at which the beam +intersects the detector at the indices given *indexfast and +*indexslow. cbf_set_reference_beam_center sets the displacments in +the array_structure_list_axis category to place the beam center at +the position given in mm by *centerfast and *centerslow as the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector at the indices given +by *indexfast and *indexslow. In order to achieve consistent results, +a reference detector should be used for detector to have all axes at +their reference settings. +Note that the precedence 1 axis is the fastest axis, so that +*centerfast and *indexfast are the fast axis components of the center +and *centerslow and *indexslow are the slow axis components of the +center. +The _fs calls give the displacments in a fast-to-slow order. The +calls with no suffix and the calls _sf calls give the displacements +in slow-to-fast order +Any of the destination pointers may be NULL for getting the beam +center. For setting the beam axis, either the indices of the center +must not be NULL. +The indices are non-negative for beam centers within the detector +surface, but the center for an axis with a negative increment will be +negative for a beam center within the detector surface. +For cbf_set_beam_center if the diffrn_data_frame category exists with +a row for the corresponding element id, the values will be set for +_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in +millimetres and the value of _diffrn_data_frame.center_units will be +set to 'mm'. +For cbf_set_reference_beam_center if the diffrn_detector_element +category exists with a row for the corresponding element id, the +values will be set for _diffrn_detector_element.reference_center_fast +and _diffrn_detector_element.reference_center_slow in millimetres and +the value of _diffrn_detector_element.reference_units will be set to +'mm'. ARGUMENTS -detector Detector handle. slowaxis1 Pointer to the destination x -component of the slow axis vector. slowaxis2 Pointer to the -destination y component of the slow axis vector. slowaxis3 Pointer -to the destination z component of the slow axis vector. fastaxis1 -Pointer to the destination x component of the fast axis vector. -fastaxis2 Pointer to the destination y component of the fast axis -vector. fastaxis3 Pointer to the destination z component of the -fast axis vector. axis_id1 Pointer to the destination first -surface axis name. axis_id1 Pointer to the destination first -surface axis name. axis_id2 Pointer to the destination second -surface axis name. +detector Detector handle. indexfast Pointer to the destination +fast index. indexslow Pointer to the destination slow index. +centerfast Pointer to the destination displacement along the fast +axis. centerslow Pointer to the destination displacement along the +slow axis. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_detector_axes; - -%apply double *OUTPUT {double *slowaxis1, double *slowaxis2, double *slowaxis3, - double *fastaxis1, double *fastaxis2, double *fastaxis3}; - void get_detector_axes ( double *slowaxis1, double *slowaxis2, double *slowaxis3, - double *fastaxis1, double *fastaxis2, double *fastaxis3){ - cbf_failnez(cbf_get_detector_axes(self, - slowaxis1,slowaxis2,slowaxis3, - fastaxis1,fastaxis2,fastaxis3)); - } +")set_beam_center_sf; + void set_beam_center_sf(double *indexslow, double *indexfast, + double *centerslow,double *centerfast){ + cbf_failnez(cbf_set_beam_center_sf(self, indexslow, indexfast, + centerslow, centerfast)); + } %feature("autodoc", " Returns : *args : double indexslow,double indexfast,double centerslow,double centerfast @@ -533,54 +505,142 @@ Returns an error code on failure or 0 for success. centerslow, centerfast)); } %feature("autodoc", " -Returns : double slowaxis1,double slowaxis2,double slowaxis3 -*args : +Returns : +*args : double indexfast,double indexslow,double centerfast,double centerslow -C prototype: int cbf_get_detector_axis_slow (cbf_detector detector, - double *slowaxis1, double *slowaxis2, double *slowaxis3); +C prototype: int cbf_set_reference_beam_center_fs (cbf_detector detector, + double *indexfast, double *indexslow, double *centerfast, + double *centerslow); CBFLib documentation: DESCRIPTION -cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and -*slowaxis3 to the 3 components of the slow axis of the specified -detector at the current settings of all axes. -cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and -*fastaxis3 to the 3 components of the fast axis of the specified -detector at the current settings of all axes. cbf_get_detector_axes, -cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set -*slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the -slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 -components of the fast axis of the specified detector at the current -settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 -and *axis_id2 to the names of the two surface axes of the detector or - \". \", -Any of the destination pointers may be NULL. +cbf_get_beam_center sets *centerfast and *centerslow to the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector and *indexfast and +*indexslow to the corresponding indices. cbf_set_beam_center sets the +offsets in the axis category for the detector element axis with +precedence 1 to place the beam center at the position given in mm by +*centerfast and *centerslow as the displacements in mm along the +detector axes from pixel (0, 0) to the point at which the beam +intersects the detector at the indices given *indexfast and +*indexslow. cbf_set_reference_beam_center sets the displacments in +the array_structure_list_axis category to place the beam center at +the position given in mm by *centerfast and *centerslow as the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector at the indices given +by *indexfast and *indexslow. In order to achieve consistent results, +a reference detector should be used for detector to have all axes at +their reference settings. +Note that the precedence 1 axis is the fastest axis, so that +*centerfast and *indexfast are the fast axis components of the center +and *centerslow and *indexslow are the slow axis components of the +center. +The _fs calls give the displacments in a fast-to-slow order. The +calls with no suffix and the calls _sf calls give the displacements +in slow-to-fast order +Any of the destination pointers may be NULL for getting the beam +center. For setting the beam axis, either the indices of the center +must not be NULL. +The indices are non-negative for beam centers within the detector +surface, but the center for an axis with a negative increment will be +negative for a beam center within the detector surface. +For cbf_set_beam_center if the diffrn_data_frame category exists with +a row for the corresponding element id, the values will be set for +_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in +millimetres and the value of _diffrn_data_frame.center_units will be +set to 'mm'. +For cbf_set_reference_beam_center if the diffrn_detector_element +category exists with a row for the corresponding element id, the +values will be set for _diffrn_detector_element.reference_center_fast +and _diffrn_detector_element.reference_center_slow in millimetres and +the value of _diffrn_detector_element.reference_units will be set to +'mm'. ARGUMENTS -detector Detector handle. slowaxis1 Pointer to the destination x -component of the slow axis vector. slowaxis2 Pointer to the -destination y component of the slow axis vector. slowaxis3 Pointer -to the destination z component of the slow axis vector. fastaxis1 -Pointer to the destination x component of the fast axis vector. -fastaxis2 Pointer to the destination y component of the fast axis -vector. fastaxis3 Pointer to the destination z component of the -fast axis vector. axis_id1 Pointer to the destination first -surface axis name. axis_id1 Pointer to the destination first -surface axis name. axis_id2 Pointer to the destination second -surface axis name. +detector Detector handle. indexfast Pointer to the destination +fast index. indexslow Pointer to the destination slow index. +centerfast Pointer to the destination displacement along the fast +axis. centerslow Pointer to the destination displacement along the +slow axis. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_detector_axis_slow; - -%apply double *OUTPUT {double *slowaxis1, double *slowaxis2, double *slowaxis3}; - void get_detector_axis_slow ( double *slowaxis1, double *slowaxis2, double *slowaxis3){ - cbf_failnez(cbf_get_detector_axis_slow(self, - slowaxis1,slowaxis2,slowaxis3)); - } +")set_reference_beam_center_fs; + void set_reference_beam_center_fs(double *indexfast, double *indexslow, + double *centerfast,double *centerslow){ + cbf_failnez(cbf_set_reference_beam_center_fs(self, indexfast, indexslow, + centerfast, centerslow)); + } %feature("autodoc", " -Returns : double distance -*args : +Returns : +*args : double indexslow,double indexfast,double centerslow,double centerfast + +C prototype: int cbf_set_reference_beam_center_sf (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, + double *centerfast); + +CBFLib documentation: +DESCRIPTION +cbf_get_beam_center sets *centerfast and *centerslow to the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector and *indexfast and +*indexslow to the corresponding indices. cbf_set_beam_center sets the +offsets in the axis category for the detector element axis with +precedence 1 to place the beam center at the position given in mm by +*centerfast and *centerslow as the displacements in mm along the +detector axes from pixel (0, 0) to the point at which the beam +intersects the detector at the indices given *indexfast and +*indexslow. cbf_set_reference_beam_center sets the displacments in +the array_structure_list_axis category to place the beam center at +the position given in mm by *centerfast and *centerslow as the +displacements in mm along the detector axes from pixel (0, 0) to the +point at which the beam intersects the detector at the indices given +by *indexfast and *indexslow. In order to achieve consistent results, +a reference detector should be used for detector to have all axes at +their reference settings. +Note that the precedence 1 axis is the fastest axis, so that +*centerfast and *indexfast are the fast axis components of the center +and *centerslow and *indexslow are the slow axis components of the +center. +The _fs calls give the displacments in a fast-to-slow order. The +calls with no suffix and the calls _sf calls give the displacements +in slow-to-fast order +Any of the destination pointers may be NULL for getting the beam +center. For setting the beam axis, either the indices of the center +must not be NULL. +The indices are non-negative for beam centers within the detector +surface, but the center for an axis with a negative increment will be +negative for a beam center within the detector surface. +For cbf_set_beam_center if the diffrn_data_frame category exists with +a row for the corresponding element id, the values will be set for +_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in +millimetres and the value of _diffrn_data_frame.center_units will be +set to 'mm'. +For cbf_set_reference_beam_center if the diffrn_detector_element +category exists with a row for the corresponding element id, the +values will be set for _diffrn_detector_element.reference_center_fast +and _diffrn_detector_element.reference_center_slow in millimetres and +the value of _diffrn_detector_element.reference_units will be set to +'mm'. +ARGUMENTS +detector Detector handle. indexfast Pointer to the destination +fast index. indexslow Pointer to the destination slow index. +centerfast Pointer to the destination displacement along the fast +axis. centerslow Pointer to the destination displacement along the +slow axis. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_reference_beam_center_sf; + + void set_reference_beam_center_sf(double *indexslow, double *indexfast, + double *centerslow,double *centerfast){ + cbf_failnez(cbf_set_reference_beam_center_sf(self, indexslow, indexfast, + centerslow, centerfast)); + } +%feature("autodoc", " +Returns : double distance +*args : C prototype: int cbf_get_detector_distance (cbf_detector detector, double *distance); @@ -602,39 +662,6 @@ Returns an error code on failure or 0 for success. cbf_failnez(cbf_get_detector_distance(self,distance)); } %feature("autodoc", " -Returns : Float pixel size -*args : Int axis_number - -C prototype: int cbf_get_inferred_pixel_size_fs(cbf_detector detector, - int axis_number, double *psize); - -CBFLib documentation: -DESCRIPTION -cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_sf set -*psize to point to the double value in millimeters of the pixel size -for the axis axis_number value. The slow index is treated as axis 1 -and the next faster index is treated as axis 2. -cbf_get_inferred_pixel_size_fs sets *psize to point to the double -value in millimeters of the pixel size for the axis axis_number -value. The fast index is treated as axis 1 and the next slower index -is treated as axis 2. -If the axis number is negative, the axes are used in the reverse -order so that an axis_number of -1 indicates the fast axes in a call -to cbf_get_inferred_pixel_size or cbf_get_inferred_pixel_size_sf and -indicates the fast axis in a call to cbf_get_inferred_pixel_size_fs. -ARGUMENTS -detector Detector handle. axis_number The number of the axis. -area Pointer to the destination pizel size in mm. -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_inferred_pixel_size_fs; - -%apply double *OUTPUT { double *psize } get_inferred_pixel_size; -void get_inferred_pixel_size_fs(unsigned int axis_number, double* psize){ - cbf_failnez(cbf_get_inferred_pixel_size_fs(self, axis_number, psize)); - } -%feature("autodoc", " Returns : double normal1,double normal2,double normal3 *args : @@ -665,6 +692,52 @@ Returns an error code on failure or 0 for success. normal1, normal2, normal3)); } %feature("autodoc", " +Returns : double slowaxis1,double slowaxis2,double slowaxis3 +*args : + +C prototype: int cbf_get_detector_axis_slow (cbf_detector detector, + double *slowaxis1, double *slowaxis2, double *slowaxis3); + +CBFLib documentation: +DESCRIPTION +cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and +*slowaxis3 to the 3 components of the slow axis of the specified +detector at the current settings of all axes. +cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and +*fastaxis3 to the 3 components of the fast axis of the specified +detector at the current settings of all axes. cbf_get_detector_axes, +cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set +*slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the +slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 +components of the fast axis of the specified detector at the current +settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 +and *axis_id2 to the names of the two surface axes of the detector or + \". \", +Any of the destination pointers may be NULL. +ARGUMENTS +detector Detector handle. slowaxis1 Pointer to the destination x +component of the slow axis vector. slowaxis2 Pointer to the +destination y component of the slow axis vector. slowaxis3 Pointer +to the destination z component of the slow axis vector. fastaxis1 +Pointer to the destination x component of the fast axis vector. +fastaxis2 Pointer to the destination y component of the fast axis +vector. fastaxis3 Pointer to the destination z component of the +fast axis vector. axis_id1 Pointer to the destination first +surface axis name. axis_id1 Pointer to the destination first +surface axis name. axis_id2 Pointer to the destination second +surface axis name. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_detector_axis_slow; + +%apply double *OUTPUT {double *slowaxis1, double *slowaxis2, double *slowaxis3}; + void get_detector_axis_slow ( double *slowaxis1, double *slowaxis2, double *slowaxis3){ + cbf_failnez(cbf_get_detector_axis_slow(self, + slowaxis1,slowaxis2,slowaxis3)); + } + +%feature("autodoc", " Returns : double fastaxis1,double fastaxis2,double fastaxis3 *args : @@ -710,6 +783,57 @@ Returns an error code on failure or 0 for success. fastaxis1,fastaxis2,fastaxis3)); } +%feature("autodoc", " +Returns : double slowaxis1,double slowaxis2,double slowaxis3,double fastaxis1, + double fastaxis2,double fastaxis3 +*args : + +C prototype: int cbf_get_detector_axes (cbf_detector detector, + double *slowaxis1, double *slowaxis2, double *slowaxis3, + double *fastaxis1, double *fastaxis2, double *fastaxis3); + +CBFLib documentation: +DESCRIPTION +cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and +*slowaxis3 to the 3 components of the slow axis of the specified +detector at the current settings of all axes. +cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and +*fastaxis3 to the 3 components of the fast axis of the specified +detector at the current settings of all axes. cbf_get_detector_axes, +cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set +*slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the +slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 +components of the fast axis of the specified detector at the current +settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 +and *axis_id2 to the names of the two surface axes of the detector or + \". \", +Any of the destination pointers may be NULL. +ARGUMENTS +detector Detector handle. slowaxis1 Pointer to the destination x +component of the slow axis vector. slowaxis2 Pointer to the +destination y component of the slow axis vector. slowaxis3 Pointer +to the destination z component of the slow axis vector. fastaxis1 +Pointer to the destination x component of the fast axis vector. +fastaxis2 Pointer to the destination y component of the fast axis +vector. fastaxis3 Pointer to the destination z component of the +fast axis vector. axis_id1 Pointer to the destination first +surface axis name. axis_id1 Pointer to the destination first +surface axis name. axis_id2 Pointer to the destination second +surface axis name. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_detector_axes; + +%apply double *OUTPUT {double *slowaxis1, double *slowaxis2, double *slowaxis3, + double *fastaxis1, double *fastaxis2, double *fastaxis3}; + void get_detector_axes ( double *slowaxis1, double *slowaxis2, double *slowaxis3, + double *fastaxis1, double *fastaxis2, double *fastaxis3){ + cbf_failnez(cbf_get_detector_axes(self, + slowaxis1,slowaxis2,slowaxis3, + fastaxis1,fastaxis2,fastaxis3)); + } + %feature("autodoc", " Returns : double fastaxis1,double fastaxis2,double fastaxis3,double slowaxis1, double slowaxis2,double slowaxis3 @@ -812,13 +936,64 @@ Returns an error code on failure or 0 for success. fastaxis1,fastaxis2,fastaxis3)); } +%feature("autodoc", " +Returns : String +*args : Integer index + +C prototype: int cbf_get_detector_surface_axes(cbf_detector detector, + const char * * axis_id1, const char * * axis_id2); + +CBFLib documentation: +DESCRIPTION +cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and +*slowaxis3 to the 3 components of the slow axis of the specified +detector at the current settings of all axes. +cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and +*fastaxis3 to the 3 components of the fast axis of the specified +detector at the current settings of all axes. cbf_get_detector_axes, +cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set +*slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the +slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 +components of the fast axis of the specified detector at the current +settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 +and *axis_id2 to the names of the two surface axes of the detector or + \". \", +Any of the destination pointers may be NULL. +ARGUMENTS +detector Detector handle. slowaxis1 Pointer to the destination x +component of the slow axis vector. slowaxis2 Pointer to the +destination y component of the slow axis vector. slowaxis3 Pointer +to the destination z component of the slow axis vector. fastaxis1 +Pointer to the destination x component of the fast axis vector. +fastaxis2 Pointer to the destination y component of the fast axis +vector. fastaxis3 Pointer to the destination z component of the +fast axis vector. axis_id1 Pointer to the destination first +surface axis name. axis_id1 Pointer to the destination first +surface axis name. axis_id2 Pointer to the destination second +surface axis name. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")cbf_get_detector_surface_axes; + + const char * get_detector_surface_axes (int index ){ + const char * axis_id1; + const char * axis_id2; + cbf_failnez(cbf_get_detector_surface_axes(self, + &axis_id1, &axis_id2)); + if (index == 0) return axis_id1; + if (index == 1) return axis_id2; + return "."; + } + + %feature("autodoc", " Returns : double coordinate1,double coordinate2,double coordinate3 -*args : double indexslow,double indexfast +*args : double index1,double index2 -C prototype: int cbf_get_pixel_coordinates_sf (cbf_detector detector, - double indexslow, double indexfast, double *coordinate1, - double *coordinate2, double *coordinate3); +C prototype: int cbf_get_pixel_coordinates (cbf_detector detector, + double indexslow, double indexfast, double *coordinate1, + double *coordinate2, double *coordinate3); CBFLib documentation: DESCRIPTION @@ -836,321 +1011,214 @@ Pointer to the destination z component. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_pixel_coordinates_sf; +")get_pixel_coordinates; %apply double *OUTPUT {double *coordinate1, double *coordinate2, double *coordinate3}; - void get_pixel_coordinates_sf(double indexslow, double indexfast, + void get_pixel_coordinates(double index1, double index2, double *coordinate1, double *coordinate2, double *coordinate3){ - cbf_failnez(cbf_get_pixel_coordinates_sf(self, indexslow, indexfast, coordinate1, coordinate2, coordinate3)); - } -%feature("autodoc", " -Returns : -*args : double indexslow,double indexfast,double centerslow,double centerfast - -C prototype: int cbf_set_beam_center (cbf_detector detector, - double *indexslow, double *indexfast, double *centerslow, - double *centerfast); - -CBFLib documentation: -DESCRIPTION -cbf_get_beam_center sets *centerfast and *centerslow to the -displacements in mm along the detector axes from pixel (0, 0) to the -point at which the beam intersects the detector and *indexfast and -*indexslow to the corresponding indices. cbf_set_beam_center sets the -offsets in the axis category for the detector element axis with -precedence 1 to place the beam center at the position given in mm by -*centerfast and *centerslow as the displacements in mm along the -detector axes from pixel (0, 0) to the point at which the beam -intersects the detector at the indices given *indexfast and -*indexslow. cbf_set_reference_beam_center sets the displacments in -the array_structure_list_axis category to place the beam center at -the position given in mm by *centerfast and *centerslow as the -displacements in mm along the detector axes from pixel (0, 0) to the -point at which the beam intersects the detector at the indices given -by *indexfast and *indexslow. In order to achieve consistent results, -a reference detector should be used for detector to have all axes at -their reference settings. -Note that the precedence 1 axis is the fastest axis, so that -*centerfast and *indexfast are the fast axis components of the center -and *centerslow and *indexslow are the slow axis components of the -center. -The _fs calls give the displacments in a fast-to-slow order. The -calls with no suffix and the calls _sf calls give the displacements -in slow-to-fast order -Any of the destination pointers may be NULL for getting the beam -center. For setting the beam axis, either the indices of the center -must not be NULL. -The indices are non-negative for beam centers within the detector -surface, but the center for an axis with a negative increment will be -negative for a beam center within the detector surface. -For cbf_set_beam_center if the diffrn_data_frame category exists with -a row for the corresponding element id, the values will be set for -_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in -millimetres and the value of _diffrn_data_frame.center_units will be -set to 'mm'. -For cbf_set_reference_beam_center if the diffrn_detector_element -category exists with a row for the corresponding element id, the -values will be set for _diffrn_detector_element.reference_center_fast -and _diffrn_detector_element.reference_center_slow in millimetres and -the value of _diffrn_detector_element.reference_units will be set to -'mm'. -ARGUMENTS -detector Detector handle. indexfast Pointer to the destination -fast index. indexslow Pointer to the destination slow index. -centerfast Pointer to the destination displacement along the fast -axis. centerslow Pointer to the destination displacement along the -slow axis. -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")set_beam_center; - - void set_beam_center(double *indexslow, double *indexfast, - double *centerslow,double *centerfast){ - cbf_failnez(cbf_set_beam_center(self, indexslow, indexfast, - centerslow, centerfast)); - } + cbf_failnez(cbf_get_pixel_coordinates(self, index1, index2, + coordinate1, coordinate2, coordinate3)); + } %feature("autodoc", " -Returns : double area,double projected_area +Returns : double coordinate1,double coordinate2,double coordinate3 *args : double indexfast,double indexslow -C prototype: int cbf_get_pixel_area_fs(cbf_detector detector, - double indexfast, double indexslow, double *area, - double *projected_area); +C prototype: int cbf_get_pixel_coordinates_fs (cbf_detector detector, + double indexfast, double indexslow, double *coordinate1, + double *coordinate2, double *coordinate3); CBFLib documentation: DESCRIPTION -cbf_get_pixel_area, cbf_get_pixel_area_fs and cbf_get_pixel_area_sf -set *area to the area of the pixel at (indexfast, indexslow) on the -detector surface and *projected_area to the apparent area of the -pixel as viewed from the sample position, with indexslow being the -slow axis and indexfast being the fast axis. -Either of the destination pointers may be NULL. +cbf_get_pixel_coordinates, cbf_get_pixel_coordinates_fs and +cbf_get_pixel_coordinates_sf ses *coordinate1, *coordinate2, and +*coordinate3 to the vector position of pixel (indexfast, indexslow) +on the detector surface. If indexslow and indexfast are integers then +the coordinates correspond to the center of a pixel. +Any of the destination pointers may be NULL. ARGUMENTS -detector Detector handle. indexfast Fast index. -indexslow Slow index. area Pointer to the -destination area in mm2. projected_area Pointer to the destination -apparent area in mm2. +detector Detector handle. indexslow Slow index. indexfast + Fast index. coordinate1 Pointer to the destination x component. +coordinate2 Pointer to the destination y component. coordinate3 +Pointer to the destination z component. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_pixel_area_fs; +")get_pixel_coordinates_fs; -%apply double *OUTPUT{double *area,double *projected_area}; - void get_pixel_area_fs(double indexfast, double indexslow, - double *area,double *projected_area){ - cbf_failnez(cbf_get_pixel_area_fs (self, - indexfast, indexslow, area,projected_area)); - } +%apply double *OUTPUT {double *coordinate1, + double *coordinate2, double *coordinate3}; + void get_pixel_coordinates_fs(double indexfast, double indexslow, + double *coordinate1, + double *coordinate2, + double *coordinate3){ + cbf_failnez(cbf_get_pixel_coordinates_fs(self, indexfast, indexslow, coordinate1, coordinate2, coordinate3)); + } %feature("autodoc", " -Returns : double indexfast,double indexslow,double centerfast,double centerslow -*args : +Returns : double coordinate1,double coordinate2,double coordinate3 +*args : double indexslow,double indexfast -C prototype: int cbf_get_beam_center_fs (cbf_detector detector, - double *indexfast, double *indexslow, double *centerfast, - double *centerslow); +C prototype: int cbf_get_pixel_coordinates_sf (cbf_detector detector, + double indexslow, double indexfast, double *coordinate1, + double *coordinate2, double *coordinate3); CBFLib documentation: DESCRIPTION -cbf_get_beam_center sets *centerfast and *centerslow to the -displacements in mm along the detector axes from pixel (0, 0) to the -point at which the beam intersects the detector and *indexfast and -*indexslow to the corresponding indices. cbf_set_beam_center sets the -offsets in the axis category for the detector element axis with -precedence 1 to place the beam center at the position given in mm by -*centerfast and *centerslow as the displacements in mm along the -detector axes from pixel (0, 0) to the point at which the beam -intersects the detector at the indices given *indexfast and -*indexslow. cbf_set_reference_beam_center sets the displacments in -the array_structure_list_axis category to place the beam center at -the position given in mm by *centerfast and *centerslow as the -displacements in mm along the detector axes from pixel (0, 0) to the -point at which the beam intersects the detector at the indices given -by *indexfast and *indexslow. In order to achieve consistent results, -a reference detector should be used for detector to have all axes at -their reference settings. -Note that the precedence 1 axis is the fastest axis, so that -*centerfast and *indexfast are the fast axis components of the center -and *centerslow and *indexslow are the slow axis components of the -center. -The _fs calls give the displacments in a fast-to-slow order. The -calls with no suffix and the calls _sf calls give the displacements -in slow-to-fast order -Any of the destination pointers may be NULL for getting the beam -center. For setting the beam axis, either the indices of the center -must not be NULL. -The indices are non-negative for beam centers within the detector -surface, but the center for an axis with a negative increment will be -negative for a beam center within the detector surface. -For cbf_set_beam_center if the diffrn_data_frame category exists with -a row for the corresponding element id, the values will be set for -_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in -millimetres and the value of _diffrn_data_frame.center_units will be -set to 'mm'. -For cbf_set_reference_beam_center if the diffrn_detector_element -category exists with a row for the corresponding element id, the -values will be set for _diffrn_detector_element.reference_center_fast -and _diffrn_detector_element.reference_center_slow in millimetres and -the value of _diffrn_detector_element.reference_units will be set to -'mm'. +cbf_get_pixel_coordinates, cbf_get_pixel_coordinates_fs and +cbf_get_pixel_coordinates_sf ses *coordinate1, *coordinate2, and +*coordinate3 to the vector position of pixel (indexfast, indexslow) +on the detector surface. If indexslow and indexfast are integers then +the coordinates correspond to the center of a pixel. +Any of the destination pointers may be NULL. ARGUMENTS -detector Detector handle. indexfast Pointer to the destination -fast index. indexslow Pointer to the destination slow index. -centerfast Pointer to the destination displacement along the fast -axis. centerslow Pointer to the destination displacement along the -slow axis. +detector Detector handle. indexslow Slow index. indexfast + Fast index. coordinate1 Pointer to the destination x component. +coordinate2 Pointer to the destination y component. coordinate3 +Pointer to the destination z component. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_beam_center_fs; +")get_pixel_coordinates_sf; -%apply double *OUTPUT {double *indexfast, double *indexslow, - double *centerfast,double *centerslow}; - void get_beam_center_fs(double *indexfast, double *indexslow, - double *centerfast,double *centerslow){ - cbf_failnez(cbf_get_beam_center_fs(self, indexfast, indexslow, - centerfast, centerslow)); - } +%apply double *OUTPUT {double *coordinate1, + double *coordinate2, double *coordinate3}; + void get_pixel_coordinates_sf(double indexslow, double indexfast, + double *coordinate1, + double *coordinate2, + double *coordinate3){ + cbf_failnez(cbf_get_pixel_coordinates_sf(self, indexslow, indexfast, coordinate1, coordinate2, coordinate3)); + } %feature("autodoc", " -Returns : Float pixel size -*args : Int axis_number +Returns : double normal1,double normal2,double normal3 +*args : double index1,double index2 -C prototype: int cbf_get_inferred_pixel_size_sf(cbf_detector detector, - int axis_number, double *psize); +C prototype: int cbf_get_pixel_normal (cbf_detector detector, + double indexslow, double indexfast, double *normal1, + double *normal2, double *normal3); CBFLib documentation: DESCRIPTION -cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_sf set -*psize to point to the double value in millimeters of the pixel size -for the axis axis_number value. The slow index is treated as axis 1 -and the next faster index is treated as axis 2. -cbf_get_inferred_pixel_size_fs sets *psize to point to the double -value in millimeters of the pixel size for the axis axis_number -value. The fast index is treated as axis 1 and the next slower index -is treated as axis 2. -If the axis number is negative, the axes are used in the reverse -order so that an axis_number of -1 indicates the fast axes in a call -to cbf_get_inferred_pixel_size or cbf_get_inferred_pixel_size_sf and -indicates the fast axis in a call to cbf_get_inferred_pixel_size_fs. +cbf_get_detector_normal, cbf_get_pixel_normal_fs and +cbf_get_pixel_normal_sf set *normal1, *normal2, and *normal3 to the 3 +components of the of the normal vector to the pixel at (indexfast, +indexslow). The vector is normalized. +Any of the destination pointers may be NULL. ARGUMENTS -detector Detector handle. axis_number The number of the axis. -area Pointer to the destination pizel size in mm. +detector Detector handle. indexslow Slow index. indexfast Fast +index. normal1 Pointer to the destination x component of the +normal vector. normal2 Pointer to the destination y component of +the normal vector. normal3 Pointer to the destination z component +of the normal vector. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_inferred_pixel_size_sf; +")get_pixel_normal; -%apply double *OUTPUT { double *psize } get_inferred_pixel_size; -void get_inferred_pixel_size_sf(unsigned int axis_number, double* psize){ - cbf_failnez(cbf_get_inferred_pixel_size_sf(self, axis_number, psize)); +%apply double *OUTPUT {double *normal1, double *normal2, double *normal3}; + void get_pixel_normal ( double index1, double index2, + double *normal1, double *normal2, double *normal3){ + cbf_failnez(cbf_get_pixel_normal(self, + index1,index2,normal1,normal2,normal3)); } + %feature("autodoc", " -Returns : double coordinate1,double coordinate2,double coordinate3 -*args : double index1,double index2 +Returns : double normal1,double normal2,double normal3 +*args : double indexfast,double indexslow -C prototype: int cbf_get_pixel_coordinates (cbf_detector detector, - double indexslow, double indexfast, double *coordinate1, - double *coordinate2, double *coordinate3); +C prototype: int cbf_get_pixel_normal_fs (cbf_detector detector, + double indexfast, double indexslow, double *normal1, + double *normal2, double *normal3); CBFLib documentation: DESCRIPTION -cbf_get_pixel_coordinates, cbf_get_pixel_coordinates_fs and -cbf_get_pixel_coordinates_sf ses *coordinate1, *coordinate2, and -*coordinate3 to the vector position of pixel (indexfast, indexslow) -on the detector surface. If indexslow and indexfast are integers then -the coordinates correspond to the center of a pixel. +cbf_get_detector_normal, cbf_get_pixel_normal_fs and +cbf_get_pixel_normal_sf set *normal1, *normal2, and *normal3 to the 3 +components of the of the normal vector to the pixel at (indexfast, +indexslow). The vector is normalized. Any of the destination pointers may be NULL. ARGUMENTS -detector Detector handle. indexslow Slow index. indexfast - Fast index. coordinate1 Pointer to the destination x component. -coordinate2 Pointer to the destination y component. coordinate3 -Pointer to the destination z component. +detector Detector handle. indexslow Slow index. indexfast Fast +index. normal1 Pointer to the destination x component of the +normal vector. normal2 Pointer to the destination y component of +the normal vector. normal3 Pointer to the destination z component +of the normal vector. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_pixel_coordinates; +")get_pixel_normal_fs; -%apply double *OUTPUT {double *coordinate1, - double *coordinate2, double *coordinate3}; - void get_pixel_coordinates(double index1, double index2, - double *coordinate1, - double *coordinate2, - double *coordinate3){ - cbf_failnez(cbf_get_pixel_coordinates(self, index1, index2, - coordinate1, coordinate2, coordinate3)); +%apply double *OUTPUT {double *normal1, double *normal2, double *normal3}; + void get_pixel_normal_fs ( double indexfast, double indexslow, + double *normal1, double *normal2, double *normal3){ + cbf_failnez(cbf_get_pixel_normal_fs(self, + indexfast,indexslow,normal1,normal2,normal3)); } + %feature("autodoc", " -Returns : double indexslow,double indexfast,double centerslow,double centerfast -*args : +Returns : double area,double projected_area +*args : double index1,double index2 -C prototype: int cbf_get_beam_center_sf (cbf_detector detector, - double *indexslow, double *indexfast, double *centerslow, - double *centerfast); +C prototype: int cbf_get_pixel_area (cbf_detector detector, double indexslow, + double indexfast, double *area, double *projected_area); CBFLib documentation: DESCRIPTION -cbf_get_beam_center sets *centerfast and *centerslow to the -displacements in mm along the detector axes from pixel (0, 0) to the -point at which the beam intersects the detector and *indexfast and -*indexslow to the corresponding indices. cbf_set_beam_center sets the -offsets in the axis category for the detector element axis with -precedence 1 to place the beam center at the position given in mm by -*centerfast and *centerslow as the displacements in mm along the -detector axes from pixel (0, 0) to the point at which the beam -intersects the detector at the indices given *indexfast and -*indexslow. cbf_set_reference_beam_center sets the displacments in -the array_structure_list_axis category to place the beam center at -the position given in mm by *centerfast and *centerslow as the -displacements in mm along the detector axes from pixel (0, 0) to the -point at which the beam intersects the detector at the indices given -by *indexfast and *indexslow. In order to achieve consistent results, -a reference detector should be used for detector to have all axes at -their reference settings. -Note that the precedence 1 axis is the fastest axis, so that -*centerfast and *indexfast are the fast axis components of the center -and *centerslow and *indexslow are the slow axis components of the -center. -The _fs calls give the displacments in a fast-to-slow order. The -calls with no suffix and the calls _sf calls give the displacements -in slow-to-fast order -Any of the destination pointers may be NULL for getting the beam -center. For setting the beam axis, either the indices of the center -must not be NULL. -The indices are non-negative for beam centers within the detector -surface, but the center for an axis with a negative increment will be -negative for a beam center within the detector surface. -For cbf_set_beam_center if the diffrn_data_frame category exists with -a row for the corresponding element id, the values will be set for -_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in -millimetres and the value of _diffrn_data_frame.center_units will be -set to 'mm'. -For cbf_set_reference_beam_center if the diffrn_detector_element -category exists with a row for the corresponding element id, the -values will be set for _diffrn_detector_element.reference_center_fast -and _diffrn_detector_element.reference_center_slow in millimetres and -the value of _diffrn_detector_element.reference_units will be set to -'mm'. +cbf_get_pixel_area, cbf_get_pixel_area_fs and cbf_get_pixel_area_sf +set *area to the area of the pixel at (indexfast, indexslow) on the +detector surface and *projected_area to the apparent area of the +pixel as viewed from the sample position, with indexslow being the +slow axis and indexfast being the fast axis. +Either of the destination pointers may be NULL. +ARGUMENTS +detector Detector handle. indexfast Fast index. +indexslow Slow index. area Pointer to the +destination area in mm2. projected_area Pointer to the destination +apparent area in mm2. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_pixel_area; + +%apply double *OUTPUT{double *area,double *projected_area}; + void get_pixel_area(double index1, double index2, + double *area,double *projected_area){ + cbf_failnez(cbf_get_pixel_area (self, + index1, index2, area,projected_area)); + } +%feature("autodoc", " +Returns : double area,double projected_area +*args : double indexfast,double indexslow + +C prototype: int cbf_get_pixel_area_fs(cbf_detector detector, + double indexfast, double indexslow, double *area, + double *projected_area); + +CBFLib documentation: +DESCRIPTION +cbf_get_pixel_area, cbf_get_pixel_area_fs and cbf_get_pixel_area_sf +set *area to the area of the pixel at (indexfast, indexslow) on the +detector surface and *projected_area to the apparent area of the +pixel as viewed from the sample position, with indexslow being the +slow axis and indexfast being the fast axis. +Either of the destination pointers may be NULL. ARGUMENTS -detector Detector handle. indexfast Pointer to the destination -fast index. indexslow Pointer to the destination slow index. -centerfast Pointer to the destination displacement along the fast -axis. centerslow Pointer to the destination displacement along the -slow axis. +detector Detector handle. indexfast Fast index. +indexslow Slow index. area Pointer to the +destination area in mm2. projected_area Pointer to the destination +apparent area in mm2. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_beam_center_sf; +")get_pixel_area_fs; -%apply double *OUTPUT {double *indexslow, double *indexfast, - double *centerslow,double *centerfast}; - void get_beam_center_sf(double *indexslow, double *indexfast, - double *centerslow,double *centerfast){ - cbf_failnez(cbf_get_beam_center_sf(self, indexslow, indexfast, - centerslow, centerfast)); - } +%apply double *OUTPUT{double *area,double *projected_area}; + void get_pixel_area_fs(double indexfast, double indexslow, + double *area,double *projected_area){ + cbf_failnez(cbf_get_pixel_area_fs (self, + indexfast, indexslow, area,projected_area)); + } %feature("autodoc", " Returns : double area,double projected_area *args : double indexslow,double indexfast @@ -1184,171 +1252,103 @@ Returns an error code on failure or 0 for success. indexslow, indexfast, area,projected_area)); } %feature("autodoc", " -Returns : -*args : double indexslow,double indexfast,double centerslow,double centerfast +Returns : Float pixel size +*args : Int axis_number -C prototype: int cbf_set_reference_beam_center_sf (cbf_detector detector, - double *indexslow, double *indexfast, double *centerslow, - double *centerfast); +C prototype: int cbf_get_inferred_pixel_size (cbf_detector detector, + int axis_number, double *psize); CBFLib documentation: DESCRIPTION -cbf_get_beam_center sets *centerfast and *centerslow to the -displacements in mm along the detector axes from pixel (0, 0) to the -point at which the beam intersects the detector and *indexfast and -*indexslow to the corresponding indices. cbf_set_beam_center sets the -offsets in the axis category for the detector element axis with -precedence 1 to place the beam center at the position given in mm by -*centerfast and *centerslow as the displacements in mm along the -detector axes from pixel (0, 0) to the point at which the beam -intersects the detector at the indices given *indexfast and -*indexslow. cbf_set_reference_beam_center sets the displacments in -the array_structure_list_axis category to place the beam center at -the position given in mm by *centerfast and *centerslow as the -displacements in mm along the detector axes from pixel (0, 0) to the -point at which the beam intersects the detector at the indices given -by *indexfast and *indexslow. In order to achieve consistent results, -a reference detector should be used for detector to have all axes at -their reference settings. -Note that the precedence 1 axis is the fastest axis, so that -*centerfast and *indexfast are the fast axis components of the center -and *centerslow and *indexslow are the slow axis components of the -center. -The _fs calls give the displacments in a fast-to-slow order. The -calls with no suffix and the calls _sf calls give the displacements -in slow-to-fast order -Any of the destination pointers may be NULL for getting the beam -center. For setting the beam axis, either the indices of the center -must not be NULL. -The indices are non-negative for beam centers within the detector -surface, but the center for an axis with a negative increment will be -negative for a beam center within the detector surface. -For cbf_set_beam_center if the diffrn_data_frame category exists with -a row for the corresponding element id, the values will be set for -_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in -millimetres and the value of _diffrn_data_frame.center_units will be -set to 'mm'. -For cbf_set_reference_beam_center if the diffrn_detector_element -category exists with a row for the corresponding element id, the -values will be set for _diffrn_detector_element.reference_center_fast -and _diffrn_detector_element.reference_center_slow in millimetres and -the value of _diffrn_detector_element.reference_units will be set to -'mm'. +cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_sf set +*psize to point to the double value in millimeters of the pixel size +for the axis axis_number value. The slow index is treated as axis 1 +and the next faster index is treated as axis 2. +cbf_get_inferred_pixel_size_fs sets *psize to point to the double +value in millimeters of the pixel size for the axis axis_number +value. The fast index is treated as axis 1 and the next slower index +is treated as axis 2. +If the axis number is negative, the axes are used in the reverse +order so that an axis_number of -1 indicates the fast axes in a call +to cbf_get_inferred_pixel_size or cbf_get_inferred_pixel_size_sf and +indicates the fast axis in a call to cbf_get_inferred_pixel_size_fs. ARGUMENTS -detector Detector handle. indexfast Pointer to the destination -fast index. indexslow Pointer to the destination slow index. -centerfast Pointer to the destination displacement along the fast -axis. centerslow Pointer to the destination displacement along the -slow axis. +detector Detector handle. axis_number The number of the axis. +area Pointer to the destination pizel size in mm. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")set_reference_beam_center_sf; +")get_inferred_pixel_size; - void set_reference_beam_center_sf(double *indexslow, double *indexfast, - double *centerslow,double *centerfast){ - cbf_failnez(cbf_set_reference_beam_center_sf(self, indexslow, indexfast, - centerslow, centerfast)); - } +%apply double *OUTPUT { double *psize } get_inferred_pixel_size; +void get_inferred_pixel_size(unsigned int axis_number, double* psize){ + cbf_failnez(cbf_get_inferred_pixel_size(self, axis_number, psize)); + } %feature("autodoc", " -Returns : -*args : double indexslow,double indexfast,double centerslow,double centerfast +Returns : Float pixel size +*args : Int axis_number -C prototype: int cbf_set_beam_center_sf (cbf_detector detector, - double *indexslow, double *indexfast, double *centerslow, - double *centerfast); +C prototype: int cbf_get_inferred_pixel_size_fs(cbf_detector detector, + int axis_number, double *psize); CBFLib documentation: DESCRIPTION -cbf_get_beam_center sets *centerfast and *centerslow to the -displacements in mm along the detector axes from pixel (0, 0) to the -point at which the beam intersects the detector and *indexfast and -*indexslow to the corresponding indices. cbf_set_beam_center sets the -offsets in the axis category for the detector element axis with -precedence 1 to place the beam center at the position given in mm by -*centerfast and *centerslow as the displacements in mm along the -detector axes from pixel (0, 0) to the point at which the beam -intersects the detector at the indices given *indexfast and -*indexslow. cbf_set_reference_beam_center sets the displacments in -the array_structure_list_axis category to place the beam center at -the position given in mm by *centerfast and *centerslow as the -displacements in mm along the detector axes from pixel (0, 0) to the -point at which the beam intersects the detector at the indices given -by *indexfast and *indexslow. In order to achieve consistent results, -a reference detector should be used for detector to have all axes at -their reference settings. -Note that the precedence 1 axis is the fastest axis, so that -*centerfast and *indexfast are the fast axis components of the center -and *centerslow and *indexslow are the slow axis components of the -center. -The _fs calls give the displacments in a fast-to-slow order. The -calls with no suffix and the calls _sf calls give the displacements -in slow-to-fast order -Any of the destination pointers may be NULL for getting the beam -center. For setting the beam axis, either the indices of the center -must not be NULL. -The indices are non-negative for beam centers within the detector -surface, but the center for an axis with a negative increment will be -negative for a beam center within the detector surface. -For cbf_set_beam_center if the diffrn_data_frame category exists with -a row for the corresponding element id, the values will be set for -_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in -millimetres and the value of _diffrn_data_frame.center_units will be -set to 'mm'. -For cbf_set_reference_beam_center if the diffrn_detector_element -category exists with a row for the corresponding element id, the -values will be set for _diffrn_detector_element.reference_center_fast -and _diffrn_detector_element.reference_center_slow in millimetres and -the value of _diffrn_detector_element.reference_units will be set to -'mm'. +cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_sf set +*psize to point to the double value in millimeters of the pixel size +for the axis axis_number value. The slow index is treated as axis 1 +and the next faster index is treated as axis 2. +cbf_get_inferred_pixel_size_fs sets *psize to point to the double +value in millimeters of the pixel size for the axis axis_number +value. The fast index is treated as axis 1 and the next slower index +is treated as axis 2. +If the axis number is negative, the axes are used in the reverse +order so that an axis_number of -1 indicates the fast axes in a call +to cbf_get_inferred_pixel_size or cbf_get_inferred_pixel_size_sf and +indicates the fast axis in a call to cbf_get_inferred_pixel_size_fs. ARGUMENTS -detector Detector handle. indexfast Pointer to the destination -fast index. indexslow Pointer to the destination slow index. -centerfast Pointer to the destination displacement along the fast -axis. centerslow Pointer to the destination displacement along the -slow axis. +detector Detector handle. axis_number The number of the axis. +area Pointer to the destination pizel size in mm. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")set_beam_center_sf; +")get_inferred_pixel_size_fs; - void set_beam_center_sf(double *indexslow, double *indexfast, - double *centerslow,double *centerfast){ - cbf_failnez(cbf_set_beam_center_sf(self, indexslow, indexfast, - centerslow, centerfast)); - } +%apply double *OUTPUT { double *psize } get_inferred_pixel_size; +void get_inferred_pixel_size_fs(unsigned int axis_number, double* psize){ + cbf_failnez(cbf_get_inferred_pixel_size_fs(self, axis_number, psize)); + } %feature("autodoc", " -Returns : double normal1,double normal2,double normal3 -*args : double index1,double index2 +Returns : Float pixel size +*args : Int axis_number -C prototype: int cbf_get_pixel_normal (cbf_detector detector, - double indexslow, double indexfast, double *normal1, - double *normal2, double *normal3); +C prototype: int cbf_get_inferred_pixel_size_sf(cbf_detector detector, + int axis_number, double *psize); CBFLib documentation: DESCRIPTION -cbf_get_detector_normal, cbf_get_pixel_normal_fs and -cbf_get_pixel_normal_sf set *normal1, *normal2, and *normal3 to the 3 -components of the of the normal vector to the pixel at (indexfast, -indexslow). The vector is normalized. -Any of the destination pointers may be NULL. +cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_sf set +*psize to point to the double value in millimeters of the pixel size +for the axis axis_number value. The slow index is treated as axis 1 +and the next faster index is treated as axis 2. +cbf_get_inferred_pixel_size_fs sets *psize to point to the double +value in millimeters of the pixel size for the axis axis_number +value. The fast index is treated as axis 1 and the next slower index +is treated as axis 2. +If the axis number is negative, the axes are used in the reverse +order so that an axis_number of -1 indicates the fast axes in a call +to cbf_get_inferred_pixel_size or cbf_get_inferred_pixel_size_sf and +indicates the fast axis in a call to cbf_get_inferred_pixel_size_fs. ARGUMENTS -detector Detector handle. indexslow Slow index. indexfast Fast -index. normal1 Pointer to the destination x component of the -normal vector. normal2 Pointer to the destination y component of -the normal vector. normal3 Pointer to the destination z component -of the normal vector. +detector Detector handle. axis_number The number of the axis. +area Pointer to the destination pizel size in mm. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_pixel_normal; +")get_inferred_pixel_size_sf; -%apply double *OUTPUT {double *normal1, double *normal2, double *normal3}; - void get_pixel_normal ( double index1, double index2, - double *normal1, double *normal2, double *normal3){ - cbf_failnez(cbf_get_pixel_normal(self, - index1,index2,normal1,normal2,normal3)); +%apply double *OUTPUT { double *psize } get_inferred_pixel_size; +void get_inferred_pixel_size_sf(unsigned int axis_number, double* psize){ + cbf_failnez(cbf_get_inferred_pixel_size_sf(self, axis_number, psize)); } - }; // End of cbf_detector diff --git a/pycbf/cbfgenericwrappers.i b/pycbf/cbfgenericwrappers.i index 30ce53dc..52247dc5 100644 --- a/pycbf/cbfgenericwrappers.i +++ b/pycbf/cbfgenericwrappers.i @@ -48,34 +48,49 @@ Returns an error code on failure or 0 for success. } } -/* cfunc cbf_compute_cell_volume pyfunc compute_cell_volume - arg double cell[6] arg double *volume */ +/* cfunc cbf_get_local_real_byte_order pyfunc get_local_real_byte_order + arg char ** byte_order */ %feature("autodoc", " -Returns : Float volume -*args : double cell[6] +Returns : char **bo,int *bolen +*args : -C prototype: int cbf_compute_cell_volume ( double cell[6], double *volume ); +C prototype: int cbf_get_local_real_byte_order (char ** byte_order); CBFLib documentation: DESCRIPTION -cbf_compute_cell_volume sets *volume to point to the volume of the -unit cell computed from the double values in cell[0:2] for the cell -edge lengths a, b and c in AAngstroms and the double values given in -cell[3:5] for the cell angles a, b and g in degrees. +cbf_get_local_integer_byte_order returns the byte order of integers +on the machine on which the API is being run in the form of a +character string returned as the value pointed to by byte_order. +cbf_get_local_real_byte_order returns the byte order of reals on the +machine on which the API is being run in the form of a character +string returned as the value pointed to by byte_order. +cbf_get_local_real_format returns the format of floats on the machine +on which the API is being run in the form of a character string +returned as the value pointed to by real_format. The strings returned +must not be modified in any way. +The values returned in byte_order may be the strings \"little_endian +\" or \"big-endian \". The values returned in real_format may be the +strings \"ieee 754-1985 \" or \"other \". Additional values may be +returned by future versions of the API. ARGUMENTS -cell Pointer to the array of 6 doubles giving the cell -parameters. volume Pointer to the doubles for cell volume. +byte_order pointer to the returned string real_format pointer to +the returned string RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")compute_cell_volume; - +---------------------------------------------------------------------- +")get_local_real_byte_order; -%apply double *OUTPUT {double *volume}; +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); %inline { - void compute_cell_volume(double cell[6], double *volume) { - cbf_failnez(cbf_compute_cell_volume(cell,volume)); + void get_local_real_byte_order(char **bo, int *bolen) { + char * byteorder; + char * bot; + error_status = cbf_get_local_real_byte_order(&byteorder); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; } } @@ -125,101 +140,34 @@ Returns an error code on failure or 0 for success. } } -/* cfunc cbf_airy_disk pyfunc airy_disk - arg double x arg double y arg double cenx arg double ceny arg double volume arg double fwhm arg double * value */ +/* cfunc cbf_compute_cell_volume pyfunc compute_cell_volume + arg double cell[6] arg double *volume */ %feature("autodoc", " -Returns : Float value -*args : double x,double y,double cenx,double ceny,double volume,double fwhm +Returns : Float volume +*args : double cell[6] -C prototype: int cbf_airy_disk(double x, double y, double cenx, double ceny, - double volume, double fwhm, double * value); +C prototype: int cbf_compute_cell_volume ( double cell[6], double *volume ); CBFLib documentation: DESCRIPTION -cbf_airy_disk sets value to point to the value taken at (x,y) of an -truncated Airy function approximation to a point-spread function of -total included volume volume and full width at half max fwhm centered -on (cenx, ceny). -cbf_airy_disk_volume sets to point to the integral in the box with -diagonal corners (xlo, ylo) and of (xhi, yhi) of a truncated Airy -function approximation to a point-spread function of total included -volume volume and full width at half max fwhm centered on (cenx, -ceny). -The Airy function used is an 8-digit approximation up to the first -minimum, after which it is forced to zero, so it cannot be used to -simulate diffraction rings. +cbf_compute_cell_volume sets *volume to point to the volume of the +unit cell computed from the double values in cell[0:2] for the cell +edge lengths a, b and c in AAngstroms and the double values given in +cell[3:5] for the cell angles a, b and g in degrees. ARGUMENTS -x the x-coordinate of a point in the real plane y -the y-coordinate of a point in the real plane xlo the -x-coordinate of a point in the real plane marking the left bound of -integration ylo the y-coordinate of a point in the real plane -marking the bottom bound of integration xhi the x-coordinate -of a point in the real plane marking the right bound of integration -yhi the y-coordinate of a point in the real plane marking the -top bound of integration cenx the x-coordinate of a point in -the real plane marking the PSF center ceny the y-coordinate of -a point in the real plane marking the PSF center volume the -total volume of the PSF fwhm the full-width at half max of the -PSF value Pointer to the value of the Airy function volumeout -Pointer to the value of the integral/TR> +cell Pointer to the array of 6 doubles giving the cell +parameters. volume Pointer to the doubles for cell volume. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")airy_disk; - -%apply double *OUTPUT {double *value}; -%inline { -void airy_disk(double x, double y, double cenx, double ceny, -double volume, double fwhm, double *value) { -cbf_failnez(cbf_airy_disk(x,y,cenx,ceny,volume,fwhm,value)); -} -} - - -/* cfunc cbf_get_local_real_byte_order pyfunc get_local_real_byte_order - arg char ** byte_order */ - -%feature("autodoc", " -Returns : char **bo,int *bolen -*args : - -C prototype: int cbf_get_local_real_byte_order (char ** byte_order); +SEE ALSO +")compute_cell_volume; -CBFLib documentation: -DESCRIPTION -cbf_get_local_integer_byte_order returns the byte order of integers -on the machine on which the API is being run in the form of a -character string returned as the value pointed to by byte_order. -cbf_get_local_real_byte_order returns the byte order of reals on the -machine on which the API is being run in the form of a character -string returned as the value pointed to by byte_order. -cbf_get_local_real_format returns the format of floats on the machine -on which the API is being run in the form of a character string -returned as the value pointed to by real_format. The strings returned -must not be modified in any way. -The values returned in byte_order may be the strings \"little_endian -\" or \"big-endian \". The values returned in real_format may be the -strings \"ieee 754-1985 \" or \"other \". Additional values may be -returned by future versions of the API. -ARGUMENTS -byte_order pointer to the returned string real_format pointer to -the returned string -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_local_real_byte_order; -%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply double *OUTPUT {double *volume}; %inline { - void get_local_real_byte_order(char **bo, int *bolen) { - char * byteorder; - char * bot; - error_status = cbf_get_local_real_byte_order(&byteorder); - *bolen = strlen(byteorder); - if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} - strncpy(bot,byteorder,*bolen); - *bo = bot; + void compute_cell_volume(double cell[6], double *volume) { + cbf_failnez(cbf_compute_cell_volume(cell,volume)); } } @@ -270,6 +218,58 @@ SEE ALSO } +/* cfunc cbf_airy_disk pyfunc airy_disk + arg double x arg double y arg double cenx arg double ceny arg double volume arg double fwhm arg double * value */ + +%feature("autodoc", " +Returns : Float value +*args : double x,double y,double cenx,double ceny,double volume,double fwhm + +C prototype: int cbf_airy_disk(double x, double y, double cenx, double ceny, + double volume, double fwhm, double * value); + +CBFLib documentation: +DESCRIPTION +cbf_airy_disk sets value to point to the value taken at (x,y) of an +truncated Airy function approximation to a point-spread function of +total included volume volume and full width at half max fwhm centered +on (cenx, ceny). +cbf_airy_disk_volume sets to point to the integral in the box with +diagonal corners (xlo, ylo) and of (xhi, yhi) of a truncated Airy +function approximation to a point-spread function of total included +volume volume and full width at half max fwhm centered on (cenx, +ceny). +The Airy function used is an 8-digit approximation up to the first +minimum, after which it is forced to zero, so it cannot be used to +simulate diffraction rings. +ARGUMENTS +x the x-coordinate of a point in the real plane y +the y-coordinate of a point in the real plane xlo the +x-coordinate of a point in the real plane marking the left bound of +integration ylo the y-coordinate of a point in the real plane +marking the bottom bound of integration xhi the x-coordinate +of a point in the real plane marking the right bound of integration +yhi the y-coordinate of a point in the real plane marking the +top bound of integration cenx the x-coordinate of a point in +the real plane marking the PSF center ceny the y-coordinate of +a point in the real plane marking the PSF center volume the +total volume of the PSF fwhm the full-width at half max of the +PSF value Pointer to the value of the Airy function volumeout +Pointer to the value of the integral/TR> +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")airy_disk; + +%apply double *OUTPUT {double *value}; +%inline { +void airy_disk(double x, double y, double cenx, double ceny, +double volume, double fwhm, double *value) { +cbf_failnez(cbf_airy_disk(x,y,cenx,ceny,volume,fwhm,value)); +} +} + + /* cfunc cbf_airy_disk_volume pyfunc airy_disk_volume arg double xlo arg double ylo arg double xhi arg double yhi arg double cenx arg double ceny arg double volume arg double fwhm arg double * volumeout */ diff --git a/pycbf/cbfgoniometerwrappers.i b/pycbf/cbfgoniometerwrappers.i index 8b351eb9..97878223 100644 --- a/pycbf/cbfgoniometerwrappers.i +++ b/pycbf/cbfgoniometerwrappers.i @@ -40,6 +40,39 @@ typedef cbf_positioner_struct *cbf_goniometer; cbf_failnez(cbf_free_positioner(self)); } %feature("autodoc", " +Returns : double vector1,double vector2,double vector3 +*args : + +C prototype: int cbf_get_rotation_axis (cbf_goniometer goniometer, + unsigned int reserved, double *vector1, double *vector2, + double *vector3); + +CBFLib documentation: +DESCRIPTION +cbf_get_rotation_axis sets *vector1, *vector2, and *vector3 to the 3 +components of the goniometer rotation axis used for the exposure. +Any of the destination pointers may be NULL. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +goniometer Goniometer handle. reserved Unused. Any value other +than 0 is invalid. vector1 Pointer to the destination x +component of the rotation axis. vector2 Pointer to the +destination y component of the rotation axis. vector3 Pointer to +the destination z component of the rotation axis. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_rotation_axis; + +%apply double *OUTPUT {double *vector1, double *vector2, double *vector3}; + +void get_rotation_axis (double *vector1, double *vector2, double *vector3){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_get_rotation_axis (self, reserved, + vector1, vector2, vector3)); + } +%feature("autodoc", " Returns : Float start,Float increment *args : @@ -113,6 +146,57 @@ Returns an error code on failure or 0 for success. initial2, initial3, final1, final2, final3)); } %feature("autodoc", " +Returns : double reciprocal1,double reciprocal2,double reciprocal3 +*args : double ratio,double wavelength,double real1,double real2,double real3 + +C prototype: int cbf_get_reciprocal (cbf_goniometer goniometer, + unsigned int reserved, double ratio, double wavelength, + double real1, double real2, double real3, + double *reciprocal1, double *reciprocal2, + double *reciprocal3); + +CBFLib documentation: +DESCRIPTION +cbf_get_reciprocal sets *reciprocal1, * reciprocal2, and * +reciprocal3 to the 3 components of the of the reciprocal-space vector +corresponding to the real-space vector (real1, real2, real3). The +reciprocal-space vector is oriented to correspond to the goniometer +setting with all axes at 0. The value wavelength is the wavlength in +AA and the value ratio specifies the current goniometer setting and +varies from 0.0 at the beginning of the exposur e to 1.0 at the end, +irrespective of the actual rotation range. +Any of the destination pointers may be NULL. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +goniometer Goniometer handle. reserved Unused. Any value +other than 0 is invalid. ratio Goniometer setting. 0 = +beginning of exposure, 1 = end. wavelength Wavelength in AA. real1 + x component of the real-space vector. real2 y +component of the real-space vector. real3 z component of the +real-space vector. reciprocal1 Pointer to the destination x +component of the reciprocal-space vector. reciprocal2 Pointer to +the destination y component of the reciprocal-space vector. +reciprocal3 Pointer to the destination z component of the +reciprocal-space vector. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_reciprocal; + +%apply double *OUTPUT {double *reciprocal1, double *reciprocal2, + double *reciprocal3}; + + void get_reciprocal (double ratio,double wavelength, + double real1, double real2, double real3, + double *reciprocal1, double *reciprocal2, + double *reciprocal3){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_get_reciprocal(self,reserved, ratio, wavelength, + real1, real2, real3,reciprocal1, + reciprocal2,reciprocal3)); + } +%feature("autodoc", " Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2, Float offset3,Float angle *args : Float ratio @@ -178,89 +262,5 @@ Returns an error code on failure or 0 for success. offset1, offset2, offset3,angle)); } -%feature("autodoc", " -Returns : double reciprocal1,double reciprocal2,double reciprocal3 -*args : double ratio,double wavelength,double real1,double real2,double real3 - -C prototype: int cbf_get_reciprocal (cbf_goniometer goniometer, - unsigned int reserved, double ratio, double wavelength, - double real1, double real2, double real3, - double *reciprocal1, double *reciprocal2, - double *reciprocal3); - -CBFLib documentation: -DESCRIPTION -cbf_get_reciprocal sets *reciprocal1, * reciprocal2, and * -reciprocal3 to the 3 components of the of the reciprocal-space vector -corresponding to the real-space vector (real1, real2, real3). The -reciprocal-space vector is oriented to correspond to the goniometer -setting with all axes at 0. The value wavelength is the wavlength in -AA and the value ratio specifies the current goniometer setting and -varies from 0.0 at the beginning of the exposur e to 1.0 at the end, -irrespective of the actual rotation range. -Any of the destination pointers may be NULL. -The parameter reserved is presently unused and should be set to 0. -ARGUMENTS -goniometer Goniometer handle. reserved Unused. Any value -other than 0 is invalid. ratio Goniometer setting. 0 = -beginning of exposure, 1 = end. wavelength Wavelength in AA. real1 - x component of the real-space vector. real2 y -component of the real-space vector. real3 z component of the -real-space vector. reciprocal1 Pointer to the destination x -component of the reciprocal-space vector. reciprocal2 Pointer to -the destination y component of the reciprocal-space vector. -reciprocal3 Pointer to the destination z component of the -reciprocal-space vector. -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_reciprocal; - -%apply double *OUTPUT {double *reciprocal1, double *reciprocal2, - double *reciprocal3}; - - void get_reciprocal (double ratio,double wavelength, - double real1, double real2, double real3, - double *reciprocal1, double *reciprocal2, - double *reciprocal3){ - unsigned int reserved; - reserved = 0; - cbf_failnez(cbf_get_reciprocal(self,reserved, ratio, wavelength, - real1, real2, real3,reciprocal1, - reciprocal2,reciprocal3)); - } -%feature("autodoc", " -Returns : double vector1,double vector2,double vector3 -*args : - -C prototype: int cbf_get_rotation_axis (cbf_goniometer goniometer, - unsigned int reserved, double *vector1, double *vector2, - double *vector3); - -CBFLib documentation: -DESCRIPTION -cbf_get_rotation_axis sets *vector1, *vector2, and *vector3 to the 3 -components of the goniometer rotation axis used for the exposure. -Any of the destination pointers may be NULL. -The parameter reserved is presently unused and should be set to 0. -ARGUMENTS -goniometer Goniometer handle. reserved Unused. Any value other -than 0 is invalid. vector1 Pointer to the destination x -component of the rotation axis. vector2 Pointer to the -destination y component of the rotation axis. vector3 Pointer to -the destination z component of the rotation axis. -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_rotation_axis; - -%apply double *OUTPUT {double *vector1, double *vector2, double *vector3}; - -void get_rotation_axis (double *vector1, double *vector2, double *vector3){ - unsigned int reserved; - reserved = 0; - cbf_failnez(cbf_get_rotation_axis (self, reserved, - vector1, vector2, vector3)); - } }; // End of cbf_positioner diff --git a/pycbf/cbfhandlewrappers.i b/pycbf/cbfhandlewrappers.i index 133291da..d796ac15 100644 --- a/pycbf/cbfhandlewrappers.i +++ b/pycbf/cbfhandlewrappers.i @@ -43,359 +43,448 @@ typedef cbf_handle_struct handle; ~cbf_handle_struct(){ // Destructor cbf_failnez(cbf_free_handle(self)); } +%feature("autodoc", " +Returns : +*args : String filename,Integer headers -/* cfunc cbf_select_datablock pyfunc select_datablock - arg cbf_handle handle arg unsigned int datablock */ +C prototype: int cbf_read_file (cbf_handle handle, FILE *file, int flags); + +CBFLib documentation: +DESCRIPTION +cbf_read_file reads the CBF or CIF file file into the CBF object +specified by handle, using the CIF 1.0 convention of 80 character +lines. cbf_read_widefile reads the CBF or CIF file file into the CBF +object specified by handle, using the CIF 1.1 convention of 2048 +character lines. A warning is issued to stderr for ascii lines over +the limit. No test is performed on binary sections. +Validation is performed in three ways levels: during the lexical +scan, during the parse, and, if a dictionary was converted, against +the value types, value enumerations, categories and parent-child +relationships specified in the dictionary. +flags controls the interpretation of binary section headers, the +parsing of brackets constructs and the parsing of treble-quoted +strings. +MSG_DIGEST: Instructs CBFlib to check that the digest +of the binary section matches any header digest value. If the digests +do not match, the call will return CBF_FORMAT. This evaluation and +comparison is delayed (a \"lazy \" evaluation) to ensure maximal +processing efficiency. If an immediately evaluation is required, see +MSG_DIGESTNOW, below. MSG_DIGESTNOW: Instructs CBFlib to +check that the digest of the binary section matches any header +digeste value. If the digests do not match, the call will return +CBF_FORMAT. This evaluation and comparison is performed during +initial parsing of the section to ensure timely error reporting at +the expense of processing efficiency. If a more efficient delayed ( +\"lazy \") evaluation is required, see MSG_DIGEST, above. +MSG_DIGESTWARN: Instructs CBFlib to check that the digest +of the binary section matches any header digeste value. If the +digests do not match, a warning message will be sent to stderr, but +processing will attempt to continue. This evaluation and comparison +is first performed during initial parsing of the section to ensure +timely error reporting at the expense of processing efficiency. An +mismatch of the message digest usually indicates a serious error, but +it is sometimes worth continuing processing to try to isolate the +cause of the error. Use this option with caution. MSG_NODIGEST: + Do not check the digest (default). PARSE_BRACKETS: +Accept DDLm bracket-delimited [item,item,...item] or +{item,item,...item} or (item,item,...item) constructs as valid, +stripping non-quoted embedded whitespace and comments. These +constructs may span multiple lines. PARSE_LIBERAL_BRACKETS: Accept +DDLm bracket-delimited [item,item,...item] or {item,item,...item} or +(item,item,...item) constructs as valid, stripping embedded +non-quoted, non-separating whitespace and comments. These constructs +may span multiple lines. In this case, whitespace may be used as an +alternative to the comma. PARSE_TRIPLE_QUOTES: Accept DDLm +triple-quoted \" \" \"item,item,...item \" \" \" or +'''item,item,...item''' constructs as valid, stripping embedded +whitespace and comments. These constructs may span multiple lines. If +this flag is set, then ''' will not be interpreted as a quoted +apoptrophe and \" \" \" will not be interpreted as a quoted double +quote mark and PARSE_NOBRACKETS: Do not accept DDLm +bracket-delimited [item,item,...item] or {item,item,...item} or +(item,item,...item) constructs as valid, stripping non-quoted +embedded whitespace and comments. These constructs may span multiple +lines. PARSE_NOTRIPLE_QUOTES: No not accept DDLm triple-quoted \" +\" \"item,item,...item \" \" \" or '''item,item,...item''' constructs +as valid, stripping embedded whitespace and comments. These +constructs may span multiple lines. If this flag is set, then ''' +will be interpreted as a quoted apostrophe and \" \" \" will be +interpreted as a quoted double quote mark. +CBFlib defers reading binary sections as long as possible. In the +current version of CBFlib, this means that: +1. The file must be a random-access file opened in binary mode (fopen +( , +")read_file; + void read_file(char* filename, int headers){ + /* CBFlib needs a stream that will remain open + hence DO NOT open from python */ + FILE *stream; + if ( ! ( stream = fopen (filename, "rb")) ){ + cbf_failnez(CBF_FILEOPEN); + } + else{ + cbf_failnez(cbf_read_file(self, stream, headers)); + } + } %feature("autodoc", " Returns : -*args : Integer +*args : String filename,Integer headers -C prototype: int cbf_select_datablock (cbf_handle handle, - unsigned int datablock); +C prototype: int cbf_read_widefile (cbf_handle handle, FILE *file, int flags); CBFLib documentation: DESCRIPTION -cbf_select_datablock selects data block number datablock as the -current data block. -The first data block is number 0. -If the data block does not exist, the function returns CBF_NOTFOUND. -ARGUMENTS -handle CBF handle. datablock Number of the data block to -select. -RETURN VALUE -Returns an error code on failure or 0 for success. -SEE ALSO -")select_datablock; - void select_datablock(unsigned int arg){ - cbf_failnez(cbf_select_datablock(self,arg));} - -/* cfunc cbf_force_new_datablock pyfunc force_new_datablock - arg cbf_handle handle arg const char *datablockname */ +cbf_read_file reads the CBF or CIF file file into the CBF object +specified by handle, using the CIF 1.0 convention of 80 character +lines. cbf_read_widefile reads the CBF or CIF file file into the CBF +object specified by handle, using the CIF 1.1 convention of 2048 +character lines. A warning is issued to stderr for ascii lines over +the limit. No test is performed on binary sections. +Validation is performed in three ways levels: during the lexical +scan, during the parse, and, if a dictionary was converted, against +the value types, value enumerations, categories and parent-child +relationships specified in the dictionary. +flags controls the interpretation of binary section headers, the +parsing of brackets constructs and the parsing of treble-quoted +strings. +MSG_DIGEST: Instructs CBFlib to check that the digest +of the binary section matches any header digest value. If the digests +do not match, the call will return CBF_FORMAT. This evaluation and +comparison is delayed (a \"lazy \" evaluation) to ensure maximal +processing efficiency. If an immediately evaluation is required, see +MSG_DIGESTNOW, below. MSG_DIGESTNOW: Instructs CBFlib to +check that the digest of the binary section matches any header +digeste value. If the digests do not match, the call will return +CBF_FORMAT. This evaluation and comparison is performed during +initial parsing of the section to ensure timely error reporting at +the expense of processing efficiency. If a more efficient delayed ( +\"lazy \") evaluation is required, see MSG_DIGEST, above. +MSG_DIGESTWARN: Instructs CBFlib to check that the digest +of the binary section matches any header digeste value. If the +digests do not match, a warning message will be sent to stderr, but +processing will attempt to continue. This evaluation and comparison +is first performed during initial parsing of the section to ensure +timely error reporting at the expense of processing efficiency. An +mismatch of the message digest usually indicates a serious error, but +it is sometimes worth continuing processing to try to isolate the +cause of the error. Use this option with caution. MSG_NODIGEST: + Do not check the digest (default). PARSE_BRACKETS: +Accept DDLm bracket-delimited [item,item,...item] or +{item,item,...item} or (item,item,...item) constructs as valid, +stripping non-quoted embedded whitespace and comments. These +constructs may span multiple lines. PARSE_LIBERAL_BRACKETS: Accept +DDLm bracket-delimited [item,item,...item] or {item,item,...item} or +(item,item,...item) constructs as valid, stripping embedded +non-quoted, non-separating whitespace and comments. These constructs +may span multiple lines. In this case, whitespace may be used as an +alternative to the comma. PARSE_TRIPLE_QUOTES: Accept DDLm +triple-quoted \" \" \"item,item,...item \" \" \" or +'''item,item,...item''' constructs as valid, stripping embedded +whitespace and comments. These constructs may span multiple lines. If +this flag is set, then ''' will not be interpreted as a quoted +apoptrophe and \" \" \" will not be interpreted as a quoted double +quote mark and PARSE_NOBRACKETS: Do not accept DDLm +bracket-delimited [item,item,...item] or {item,item,...item} or +(item,item,...item) constructs as valid, stripping non-quoted +embedded whitespace and comments. These constructs may span multiple +lines. PARSE_NOTRIPLE_QUOTES: No not accept DDLm triple-quoted \" +\" \"item,item,...item \" \" \" or '''item,item,...item''' constructs +as valid, stripping embedded whitespace and comments. These +constructs may span multiple lines. If this flag is set, then ''' +will be interpreted as a quoted apostrophe and \" \" \" will be +interpreted as a quoted double quote mark. +CBFlib defers reading binary sections as long as possible. In the +current version of CBFlib, this means that: +1. The file must be a random-access file opened in binary mode (fopen +( , +")read_widefile; + void read_widefile(char* filename, int headers){ + /* CBFlib needs a stream that will remain open + hence DO NOT open from python */ + FILE *stream; + if ( ! ( stream = fopen (filename, "rb")) ){ + cbf_failnez(CBF_FILEOPEN); + } + else{ + cbf_failnez(cbf_read_widefile(self, stream, headers)); + } + } %feature("autodoc", " -Returns : string -*args : +Returns : +*args : String filename,Integer ciforcbf,Integer Headers,Integer encoding -C prototype: int cbf_force_new_datablock (cbf_handle handle, - const char *datablockname); +C prototype: int cbf_write_file (cbf_handle handle, FILE *file, int readable, + int ciforcbf, int flags, int encoding); CBFLib documentation: DESCRIPTION -cbf_force_new_datablock creates a new data block with name -datablockname and makes it the current data block. Duplicate data -block names are allowed. cbf_force_new_saveframe creates a new savew -frame with name saveframename and makes it the current save frame. -Duplicate save frame names are allowed. -Even if a save frame with this name already exists, a new save frame -is created and becomes the current save frame. -ARGUMENTS -handle CBF handle. datablockname The name of the new data -block. saveframename The name of the new save frame. -RETURN VALUE -Returns an error code on failure or 0 for success. -SEE ALSO -")force_new_datablock; - void force_new_datablock(const char* arg){ - cbf_failnez(cbf_force_new_datablock(self,arg));} +cbf_write_file writes the CBF object specified by handle into the +file file, following CIF 1.0 conventions of 80 character lines. +cbf_write_widefile writes the CBF object specified by handle into the +file file, following CIF 1.1 conventions of 2048 character lines. A +warning is issued to stderr for ascii lines over the limit, and an +attempt is made to fold lines to fit. No test is performed on binary +sections. +If a dictionary has been provided, aliases will be applied on output. +Unlike cbf_read_file, the file does not have to be random-access. +If the file is random-access and readable, readable can be set to +non-0 to indicate to CBFlib that the file can be used as a buffer to +conserve disk space. If the file is not random-access or not +readable, readable must be 0. +")write_file; + + void write_file(char* filename, int ciforcbf, int headers, + int encoding){ + FILE *stream; + int readable; + /* Make readable false so we can close the file immediately */ + readable = 0; + if ( ! ( stream = fopen (filename, "w+b")) ){ + cbf_failnez(CBF_FILEOPEN); + } + else{ + cbf_failnez(cbf_write_file(self, stream, readable, + ciforcbf, headers, encoding)); + fclose(stream); + } + } %feature("autodoc", " -Returns : (Binary)String -*args : int element_number,int elsize,int elsign,int ndimfast,int ndimmid, - int ndimslow +Returns : +*args : String filename,Integer ciforcbf,Integer Headers,Integer encoding -C prototype: int cbf_get_3d_image_fs (cbf_handle handle, - unsigned int reserved, unsigned int element_number, - void *array, size_t elsize, int elsign, size_t ndimfast, - size_t ndimmid, size_t ndimslow); +C prototype: int cbf_write_widefile (cbf_handle handle, FILE *file, + int readable, int ciforcbf, int flags, int encoding); CBFLib documentation: DESCRIPTION -cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image -array for element number element_number into an array. The array -consists of ndimslow *ndimfast elements of elsize bytes each, -starting at array. The elements are signed if elsign is non-0 and -unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and -cbf_get_real_image_sf read the image array of IEEE doubles or floats -for element number element_number into an array. A real array is -always signed. cbf_get_3d_image, cbf_get_3d_image_fs and -cbf_get_3d_image_sf read the 3D image array for element number -element_number into an array. The array consists of ndimslow *ndimmid -*ndimfast elements of elsize bytes each, starting at array. The -elements are signed if elsign is non-0 and unsigned otherwise. -cbf_get_real_3d_image, cbf_get_real_3d_image_fs, -cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or -floats for element number element_number into an array. A real array -is always signed. -The _fs calls give the dimensions in a fast-to-slow order. The calls -with no suffix and the calls _sf calls give the dimensions in -slow-to-fast order -The structure of the array as a 1-, 2- or 3-dimensional array should -agree with the structure of the array given in the -ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, -ndimslow should be the array size and ndimfast and, for the 3D calls, -ndimmid, should be set to 1 both in the call and in the imgCIF data -being processed. If the array is 2-dimensional and a 3D call is used, -ndimslow and ndimmid should be the -")get_3d_image_fs_as_string; +cbf_write_file writes the CBF object specified by handle into the +file file, following CIF 1.0 conventions of 80 character lines. +cbf_write_widefile writes the CBF object specified by handle into the +file file, following CIF 1.1 conventions of 2048 character lines. A +warning is issued to stderr for ascii lines over the limit, and an +attempt is made to fold lines to fit. No test is performed on binary +sections. +If a dictionary has been provided, aliases will be applied on output. +Unlike cbf_read_file, the file does not have to be random-access. +If the file is random-access and readable, readable can be set to +non-0 to indicate to CBFlib that the file can be used as a buffer to +conserve disk space. If the file is not random-access or not +readable, readable must be 0. +")write_widefile; -// Ensure we free the local temporary + void write_widefile(char* filename, int ciforcbf, int headers, + int encoding){ + FILE *stream; + int readable; + /* Make readable false so we can close the file immediately */ + readable = 0; + if ( ! ( stream = fopen (filename, "w+b")) ){ + cbf_failnez(CBF_FILEOPEN); + } + else{ + cbf_failnez(cbf_write_widefile(self, stream, readable, + ciforcbf, headers, encoding)); + fclose(stream); -%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) - get_3d_image_fs_as_string; + } + } -// Get the length correct +/* cfunc cbf_new_datablock pyfunc new_datablock + arg cbf_handle handle arg const char *datablockname */ - void get_3d_image_fs_as_string(int element_number, char **s, int *slen, - int elsize, int elsign, int ndimfast, int ndimmid, int ndimslow){ - void *array; - int reserved = 0; - *slen = 0; /* Initialise in case of problems */ - if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { - cbf_failnez (cbf_get_3d_image_fs(self, - reserved, (unsigned int)element_number, - (void *)array, (size_t)elsize, elsign, - (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow)); - }else{ - cbf_failnez(CBF_ALLOC); - } - *slen = elsize*ndimfast*ndimmid*ndimslow; - *s = (char *) array; - } +%feature("autodoc", " +Returns : string +*args : -/* cfunc cbf_reset_datablocks pyfunc reset_datablocks - arg cbf_handle handle */ +C prototype: int cbf_new_datablock (cbf_handle handle, + const char *datablockname); + +CBFLib documentation: +DESCRIPTION +cbf_new_datablock creates a new data block with name datablockname +and makes it the current data block. cbf_new_saveframe creates a new +save frame with name saveframename within the current data block and +makes the new save frame the current save frame. +If a data block or save frame with this name already exists, the +existing data block or save frame becomes the current data block or +save frame. +ARGUMENTS +handle CBF handle. datablockname The name of the new data +block. saveframename The name of the new save frame. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")new_datablock; + void new_datablock(const char* arg){ + cbf_failnez(cbf_new_datablock(self,arg));} + +/* cfunc cbf_new_saveframe pyfunc new_saveframe + arg cbf_handle handle arg const char *saveframename */ %feature("autodoc", " -Returns : +Returns : string *args : -C prototype: int cbf_reset_datablocks (cbf_handle handle); +C prototype: int cbf_new_saveframe (cbf_handle handle, + const char *saveframename); CBFLib documentation: DESCRIPTION -cbf_reset_datablocks deletes all categories from all data blocks. -The current data block does not change. +cbf_new_datablock creates a new data block with name datablockname +and makes it the current data block. cbf_new_saveframe creates a new +save frame with name saveframename within the current data block and +makes the new save frame the current save frame. +If a data block or save frame with this name already exists, the +existing data block or save frame becomes the current data block or +save frame. ARGUMENTS -handle CBF handle. +handle CBF handle. datablockname The name of the new data +block. saveframename The name of the new save frame. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")reset_datablocks; - void reset_datablocks(void){ - cbf_failnez(cbf_reset_datablocks(self));} +")new_saveframe; + void new_saveframe(const char* arg){ + cbf_failnez(cbf_new_saveframe(self,arg));} + +/* cfunc cbf_force_new_datablock pyfunc force_new_datablock + arg cbf_handle handle arg const char *datablockname */ + %feature("autodoc", " -Returns : -*args : String tagname,String categoryname_in +Returns : string +*args : -C prototype: int cbf_set_tag_category (cbf_handle handle, const char* tagname, - const char* categoryname_in); +C prototype: int cbf_force_new_datablock (cbf_handle handle, + const char *datablockname); CBFLib documentation: DESCRIPTION -cbf_find_tag_category sets categoryname to the category associated -with tagname in the dictionary associated with handle. -cbf_set_tag_category upddates the dictionary associated with handle -to indicated that tagname is in category categoryname_in. +cbf_force_new_datablock creates a new data block with name +datablockname and makes it the current data block. Duplicate data +block names are allowed. cbf_force_new_saveframe creates a new savew +frame with name saveframename and makes it the current save frame. +Duplicate save frame names are allowed. +Even if a save frame with this name already exists, a new save frame +is created and becomes the current save frame. ARGUMENTS -handle CBF handle. tagname tag name. -categoryname pointer to a returned category name. -categoryname_in input category name. +handle CBF handle. datablockname The name of the new data +block. saveframename The name of the new save frame. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")set_tag_category; +SEE ALSO +")force_new_datablock; + void force_new_datablock(const char* arg){ + cbf_failnez(cbf_force_new_datablock(self,arg));} + +/* cfunc cbf_force_new_saveframe pyfunc force_new_saveframe + arg cbf_handle handle arg const char *saveframename */ - void set_tag_category(const char *tagname, const char* categoryname_in){ - cbf_failnez(cbf_set_tag_category(self,tagname, categoryname_in)); - } %feature("autodoc", " -Returns : String tagroot -*args : String tagname +Returns : string +*args : -C prototype: int cbf_require_tag_root (cbf_handle handle, const char* tagname, - const char** tagroot); +C prototype: int cbf_force_new_saveframe (cbf_handle handle, + const char *saveframename); CBFLib documentation: DESCRIPTION -cbf_find_tag_root sets *tagroot to the root tag of which tagname is -an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in -the dictionary associated with handle, creating the dictionary if -necessary. cbf_require_tag_root sets *tagroot to the root tag of -which tagname is an alias, if there is one, or to the value of -tagname, if tagname is not an alias. -A returned tagroot string must not be modified in any way. +cbf_force_new_datablock creates a new data block with name +datablockname and makes it the current data block. Duplicate data +block names are allowed. cbf_force_new_saveframe creates a new savew +frame with name saveframename and makes it the current save frame. +Duplicate save frame names are allowed. +Even if a save frame with this name already exists, a new save frame +is created and becomes the current save frame. ARGUMENTS -handle CBF handle. tagname tag name which may be an alias. -tagroot pointer to a returned tag root name. tagroot_in input -tag root name. +handle CBF handle. datablockname The name of the new data +block. saveframename The name of the new save frame. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")require_tag_root; - -const char* require_tag_root(const char* tagname){ - const char* result; - cbf_failnez(cbf_require_tag_root(self,tagname,&result)); - return result; - } +SEE ALSO +")force_new_saveframe; + void force_new_saveframe(const char* arg){ + cbf_failnez(cbf_force_new_saveframe(self,arg));} -/* cfunc cbf_row_number pyfunc row_number - arg cbf_handle handle arg unsigned int *row */ +/* cfunc cbf_new_category pyfunc new_category + arg cbf_handle handle arg const char *categoryname */ %feature("autodoc", " -Returns : Integer +Returns : string *args : -C prototype: int cbf_row_number (cbf_handle handle, unsigned int *row); +C prototype: int cbf_new_category (cbf_handle handle, + const char *categoryname); CBFLib documentation: DESCRIPTION -cbf_row_number sets *row to the number of the current row of the -current category. +cbf_new_category creates a new category in the current data block +with name categoryname and makes it the current category. +If a category with this name already exists, the existing category +becomes the current category. ARGUMENTS -handle CBF handle. row Pointer to the destination row number. +handle CBF handle. categoryname The name of the new +category. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")row_number; - unsigned int row_number(void){ - unsigned int result; - cbf_failnez(cbf_row_number(self,&result)); - return result;} +")new_category; + void new_category(const char* arg){ + cbf_failnez(cbf_new_category(self,arg));} + +/* cfunc cbf_force_new_category pyfunc force_new_category + arg cbf_handle handle arg const char *categoryname */ + %feature("autodoc", " -Returns : -*args : int element_number,int compression,(binary) String data,int elsize, - int elsign,int dimslow,int dimfast +Returns : string +*args : -C prototype: int cbf_set_image (cbf_handle handle, unsigned int reserved, - unsigned int element_number, unsigned int compression, - void *array, size_t elsize, int elsign, size_t ndimslow, - size_t ndimfast); +C prototype: int cbf_force_new_category (cbf_handle handle, + const char *categoryname); CBFLib documentation: DESCRIPTION -cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image -array for element number element_number. The array consists of -ndimfast *ndimslow elements of elsize bytes each, starting at array. -The elements are signed if elsign is non-zero and unsigned otherwise. -cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf -write the image array for element number element_number. The array -consists of ndimfast *ndimslow IEEE double or float elements of -elsize bytes each, starting at array. cbf_set_3d_image, -cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array -for element number element_number. The array consists of ndimfast -*ndimmid *ndimslow elements of elsize bytes each, starting at array. -The elements are signed if elsign is non-0 and unsigned otherwise. -cbf_set_real_3d_image, cbf_set_real_3d_image_fs and -cbf_set_real_3d_image_sf writes the 3D image array for element number -element_number. The array consists of ndimfast *ndimmid *ndimslow -IEEE double or float elements of elsize bytes each, starting at -array. -The _fs calls give the dimensions in a fast-to-slow order. The calls -with no suffix and the calls _sf calls give the dimensions in -slow-to-fast order -If the array is 1-dimensional, ndimslow should be the array size and -ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the -array is 2-dimensional and the 3D calls are used, ndimslow and -ndimmid should be used for the array dimensions and ndimfast should -be set to 1. -The array will be compressed using the compression scheme specifed by -compression. Currently, the available schemes are: -CBF_CANONICAL Canonical-code compression (section 3.3.1) -CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET -Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple -\"nibble_offset \" compression. CBF_NONE No compression. -The values compressed are limited to 64 bits. If any element in the -array is larger than 64 bits, the value compressed is the nearest -64-bit value. -Currently, the source array must consist of chars, shorts or ints -(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for -cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof -(int), sizeof(double) or sizeof(float), the function returns -CBF_ARGUMENT. -The parameter reserved is presently unused and should be set to 0. +cbf_force_new_category creates a new category in the current data +block with name categoryname and makes it the current category. +Duplicate category names are allowed. +Even if a category with this name already exists, a new category of +the same name is created and becomes the current category. The allows +for the creation of unlooped tag/value lists drawn from the same +category. ARGUMENTS -handle CBF handle. reserved Unused. Any value other -than 0 is invalid. element_number The number of the detector -element counting from 0 by order of appearance in the -\"diffrn_data_frame \" category. compression Compression type. -array Pointer to the image array. elsize Size in -bytes of each image array element. elsigned Set to non-0 if -the image array elements are signed. ndimslow Slowest array -dimension. ndimmid Second slowest array dimension. ndimfast - Fastest array dimension. +handle CBF handle. categoryname The name of the new +category. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")set_image; - - /* CBFlib must NOT modify the data string which belongs to the scripting - language we will get and check the length via a typemap */ +SEE ALSO +")force_new_category; + void force_new_category(const char* arg){ + cbf_failnez(cbf_force_new_category(self,arg));} -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_image; +/* cfunc cbf_new_column pyfunc new_column + arg cbf_handle handle arg const char *columnname */ - void set_image(unsigned int element_number, - unsigned int compression, - char *data, int len, int elsize, int elsign, int ndimslow, int ndimfast){ - /* safety check on args */ - size_t els; - unsigned int reserved; - void *array; - if(len == elsize*ndimslow*ndimfast){ - array = data; - els = elsize; - reserved = 0; - cbf_failnez(cbf_set_image (self, reserved, element_number, compression, - (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t)ndimfast)); - }else{ - cbf_failnez(CBF_ARGUMENT); - } - } %feature("autodoc", " -Returns : -*args : Integer element_number,Float slowbinsize_in,Float fastbinsize_in +Returns : string +*args : -C prototype: int cbf_set_bin_sizes(cbf_handle handle, - unsigned int element_number, double slowbinsize_in, - double fastbinsize_in); +C prototype: int cbf_new_column (cbf_handle handle, const char *columnname); CBFLib documentation: DESCRIPTION -cbf_get_bin_sizes sets slowbinsize to point to the value of the -number of pixels composing one array element in the dimension that -changes at the second-fastest rate and fastbinsize to point to the -value of the number of pixels composing one array element in the -dimension that changes at the fastest rate for the dectector element -with the ordinal element_number. cbf_set_bin_sizes sets the the pixel -bin sizes in the \"array_intensities \" category to the values of -slowbinsize_in for the number of pixels composing one array element -in the dimension that changes at the second-fastest rate and -fastbinsize_in for the number of pixels composing one array element -in the dimension that changes at the fastest rate for the dectector -element with the ordinal element_number. -In order to allow for software binning involving fractions of pixels, -the bin sizes are doubles rather than ints. +cbf_new_column creates a new column in the current category with name +columnname and makes it the current column. +If a column with this name already exists, the existing column +becomes the current category. ARGUMENTS -handle CBF handle. element_number The number of the -detector element counting from 0 by order of appearance in the -\"diffrn_data_frame \" category. slowbinsize Pointer to the -returned number of pixels composing one array element in the -dimension that changes at the second-fastest rate. fastbinsize -Pointer to the returned number of pixels composing one array element -in the dimension that changes at the fastest rate. slowbinsize_in -The number of pixels composing one array element in the dimension -that changes at the second-fastest rate. fastbinsize_in The number -of pixels composing one array element in the dimension that changes -at the fastest rate. +handle CBF handle. columnname The name of the new column. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")set_bin_sizes; - - void set_bin_sizes( int element_number, double slowbinsize_in, double fastbinsize_in) { - cbf_failnez(cbf_set_bin_sizes(self,element_number,slowbinsize_in,fastbinsize_in)); - } +SEE ALSO +")new_column; + void new_column(const char* arg){ + cbf_failnez(cbf_new_column(self,arg));} /* cfunc cbf_new_row pyfunc new_row arg cbf_handle handle */ @@ -419,1215 +508,828 @@ SEE ALSO void new_row(void){ cbf_failnez(cbf_new_row(self));} -/* cfunc cbf_rewind_saveframe pyfunc rewind_saveframe - arg cbf_handle handle */ +/* cfunc cbf_insert_row pyfunc insert_row + arg cbf_handle handle arg unsigned int rownumber */ %feature("autodoc", " Returns : -*args : +*args : Integer -C prototype: int cbf_rewind_saveframe (cbf_handle handle); +C prototype: int cbf_insert_row (cbf_handle handle, unsigned int rownumber); CBFLib documentation: DESCRIPTION -cbf_rewind_category makes the first category in the current data -block the current category. cbf_rewind_saveframe makes the first -saveframe in the current data block the current saveframe. -cbf_rewind_blockitem makes the first blockitem (category or -saveframe) in the current data block the current blockitem. The type -of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type. -If there are no categories, saveframes or blockitems the function -returns CBF_NOTFOUND. -The current column and row become undefined. +cbf_insert_row adds a new row to the current category. The new row is +inserted as row rownumber and existing rows starting from rownumber +are moved up by 1. The new row becomes the current row. +If the category has fewer than rownumber rows, the function returns +CBF_NOTFOUND. +The row numbers start from 0. ARGUMENTS -handle CBF handle. type CBF handle. +handle CBF handle. rownumber The row number of the new row. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")rewind_saveframe; - void rewind_saveframe(void){ - cbf_failnez(cbf_rewind_saveframe(self));} +")insert_row; + void insert_row(unsigned int arg){ + cbf_failnez(cbf_insert_row(self,arg));} + +/* cfunc cbf_delete_row pyfunc delete_row + arg cbf_handle handle arg unsigned int rownumber */ + %feature("autodoc", " -Returns : int compression,int binary_id,int elsize,int elements -*args : +Returns : +*args : Integer -C prototype: int cbf_get_realarrayparameters (cbf_handle handle, - unsigned int *compression, int *binary_id, size_t *elsize, - size_t *elements); +C prototype: int cbf_delete_row (cbf_handle handle, unsigned int rownumber); CBFLib documentation: DESCRIPTION -cbf_get_integerarrayparameters sets *compression, *binary_id, -*elsize, *elsigned, *elunsigned, *elements, *minelement and -*maxelement to values read from the binary value of the item at the -current column and row. This provides all the arguments needed for a -subsequent call to cbf_set_integerarray, if a copy of the array is to -be made into another CIF or CBF. cbf_get_realarrayparameters sets -*compression, *binary_id, *elsize, *elements to values read from the -binary value of the item at the current column and row. This provides -all the arguments needed for a subsequent call to cbf_set_realarray, -if a copy of the arry is to be made into another CIF or CBF. -The variants cbf_get_integerarrayparameters_wdims, -cbf_get_integerarrayparameters_wdims_fs, -cbf_get_integerarrayparameters_wdims_sf, -cbf_get_realarrayparameters_wdims, -cbf_get_realarrayparameters_wdims_fs, -cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, -*dimmid, *dimslow, and *padding as well, providing the additional -parameters needed for a subsequent call to cbf_set_integerarray_wdims -or cbf_set_realarray_wdims. -The value returned in *byteorder is a pointer either to the string -\"little_endian \" or to the string \"big_endian \". This should be -the byte order of the data, not necessarily of the host machine. No -attempt should be made to modify this string. At this time only -\"little_endian \" will be returned. -The values returned in *dimfast, *dimmid and *dimslow are the sizes -of the fastest changing, second fastest changing and third fastest -changing dimensions of the array, if specified, or zero, if not -specified. -The value returned in *padding is the size of the post-data padding, -if any and if specified in the data header. The value is given as a -count of octets. -If the value is not binary, the function returns CBF_ASCII. +cbf_delete_row deletes a row from the current category. Rows starting +from rownumber +1 are moved down by 1. If the current row was higher +than rownumber, or if the current row is the last row, it will also +move down by 1. +The row numbers start from 0. ARGUMENTS -handle CBF handle. compression Compression method used. -elsize Size in bytes of each array element. binary_id -Pointer to the destination integer binary identifier. elsigned -Pointer to an integer. Set to 1 if the elements can be read as signed -integers. elunsigned Pointer to an integer. Set to 1 if the -elements can be read as unsigned integers. elements Pointer to -the destination number of elements. minelement Pointer to the -destination smallest element. maxelement Pointer to the -destination largest element. byteorder Pointer to the destination -byte order. dimfast Pointer to the destination fastest -dimension. dimmid Pointer to the destination second fastest -dimension. dimslow Pointer to the destination third fastest -dimension. padding Pointer to the destination padding size. +handle CBF handle. rownumber The number of the row to delete. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")get_realarrayparameters; - -%apply int *OUTPUT {int *compression,int *binary_id, - int *elsize, int *elements} get_realarrayparameters; +")delete_row; + void delete_row(unsigned int arg){ + cbf_failnez(cbf_delete_row(self,arg));} +/* cfunc cbf_set_datablockname pyfunc set_datablockname + arg cbf_handle handle arg const char *datablockname */ - void get_realarrayparameters(int *compression,int *binary_id, - int *elsize, int *elements){ - unsigned int comp; - size_t elsiz, elem; - cbf_failnez(cbf_get_realarrayparameters(self, - &comp ,binary_id, &elsiz, &elem )); - *compression = comp; /* FIXME - does this convert in C? */ - *elsize = elsiz; - *elements = elem; - } %feature("autodoc", " -Returns : Float pixel_size -*args : Int element_number,Int axis_number +Returns : string +*args : -C prototype: int cbf_get_pixel_size_sf(cbf_handle handle, - unsigned int element_number, int axis_number, - double *psize); +C prototype: int cbf_set_datablockname (cbf_handle handle, + const char *datablockname); CBFLib documentation: DESCRIPTION -cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to -the double value in millimeters of the axis axis_number of the -detector element element_number. The axis_number is numbered from 1, -starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to -point to the double value in millimeters of the axis axis_number of -the detector element element_number. The axis_number is numbered from -1, starting with the fastest axis. -If a negative axis number is given, the order of axes is reversed, so -that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the -fastest axis for cbf_get_pixel_size_sf. -If the pixel size is not given explcitly in the \"array_element_size -\" category, the function returns CBF_NOTFOUND. +cbf_set_datablockname changes the name of the current data block to +datablockname. cbf_set_saveframename changes the name of the current +save frame to saveframename. +If a data block or save frame with this name already exists +(comparison is case-insensitive), the function returns CBF_IDENTICAL. ARGUMENTS -handle CBF handle. element_number The number of the -detector element counting from 0 by order of appearance in the -\"diffrn_data_frame \" category. axis_number The number of the -axis, starting from 1 for the fastest for cbf_get_pixel_size and -cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. -psize Pointer to the destination pixel size. +handle CBF handle. datablockname The new data block name. +datablockname The new save frame name. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_pixel_size_sf; - -%apply double *OUTPUT {double *psize} get_pixel_size; - void get_pixel_size_sf(unsigned int element_number, - unsigned int axis_number, double *psize){ - cbf_failnez(cbf_get_pixel_size_sf(self, - element_number, - axis_number, - psize)); - } +SEE ALSO +")set_datablockname; + void set_datablockname(const char* arg){ + cbf_failnez(cbf_set_datablockname(self,arg));} -/* cfunc cbf_force_new_category pyfunc force_new_category - arg cbf_handle handle arg const char *categoryname */ +/* cfunc cbf_set_saveframename pyfunc set_saveframename + arg cbf_handle handle arg const char *saveframename */ %feature("autodoc", " Returns : string *args : -C prototype: int cbf_force_new_category (cbf_handle handle, - const char *categoryname); +C prototype: int cbf_set_saveframename (cbf_handle handle, + const char *saveframename); CBFLib documentation: DESCRIPTION -cbf_force_new_category creates a new category in the current data -block with name categoryname and makes it the current category. -Duplicate category names are allowed. -Even if a category with this name already exists, a new category of -the same name is created and becomes the current category. The allows -for the creation of unlooped tag/value lists drawn from the same -category. +cbf_set_datablockname changes the name of the current data block to +datablockname. cbf_set_saveframename changes the name of the current +save frame to saveframename. +If a data block or save frame with this name already exists +(comparison is case-insensitive), the function returns CBF_IDENTICAL. ARGUMENTS -handle CBF handle. categoryname The name of the new -category. +handle CBF handle. datablockname The new data block name. +datablockname The new save frame name. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")force_new_category; - void force_new_category(const char* arg){ - cbf_failnez(cbf_force_new_category(self,arg));} +")set_saveframename; + void set_saveframename(const char* arg){ + cbf_failnez(cbf_set_saveframename(self,arg));} -/* cfunc cbf_force_new_saveframe pyfunc force_new_saveframe - arg cbf_handle handle arg const char *saveframename */ +/* cfunc cbf_reset_datablocks pyfunc reset_datablocks + arg cbf_handle handle */ %feature("autodoc", " -Returns : string +Returns : *args : -C prototype: int cbf_force_new_saveframe (cbf_handle handle, - const char *saveframename); +C prototype: int cbf_reset_datablocks (cbf_handle handle); CBFLib documentation: DESCRIPTION -cbf_force_new_datablock creates a new data block with name -datablockname and makes it the current data block. Duplicate data -block names are allowed. cbf_force_new_saveframe creates a new savew -frame with name saveframename and makes it the current save frame. -Duplicate save frame names are allowed. -Even if a save frame with this name already exists, a new save frame -is created and becomes the current save frame. +cbf_reset_datablocks deletes all categories from all data blocks. +The current data block does not change. ARGUMENTS -handle CBF handle. datablockname The name of the new data -block. saveframename The name of the new save frame. +handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")force_new_saveframe; - void force_new_saveframe(const char* arg){ - cbf_failnez(cbf_force_new_saveframe(self,arg));} +")reset_datablocks; + void reset_datablocks(void){ + cbf_failnez(cbf_reset_datablocks(self));} -/* cfunc cbf_count_datablocks pyfunc count_datablocks - arg cbf_handle handle arg unsigned int *datablocks */ +/* cfunc cbf_reset_datablock pyfunc reset_datablock + arg cbf_handle handle */ %feature("autodoc", " -Returns : Integer +Returns : *args : -C prototype: int cbf_count_datablocks (cbf_handle handle, - unsigned int *datablocks); +C prototype: int cbf_reset_datablock (cbf_handle handle); CBFLib documentation: DESCRIPTION -cbf_count_datablocks puts the number of data blocks in *datablocks . +cbf_reset_datablock deletes all categories from the current data +block. cbf_reset_saveframe deletes all categories from the current +save frame. ARGUMENTS -handle CBF handle. datablocks Pointer to the destination data -block count. +handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")count_datablocks; - unsigned int count_datablocks(void){ - unsigned int result; - cbf_failnez(cbf_count_datablocks(self,&result)); - return result;} +")reset_datablock; + void reset_datablock(void){ + cbf_failnez(cbf_reset_datablock(self));} -/* cfunc cbf_find_row pyfunc find_row - arg cbf_handle handle arg const char *value */ +/* cfunc cbf_reset_saveframe pyfunc reset_saveframe + arg cbf_handle handle */ %feature("autodoc", " -Returns : string +Returns : *args : -C prototype: int cbf_find_row (cbf_handle handle, const char *value); +C prototype: int cbf_reset_saveframe (cbf_handle handle); CBFLib documentation: DESCRIPTION -cbf_find_row makes the first row in the current column with value -value the current row. -The comparison is case-sensitive. -If a matching row does not exist, the function returns CBF_NOTFOUND. -The current column is not affected. +cbf_reset_datablock deletes all categories from the current data +block. cbf_reset_saveframe deletes all categories from the current +save frame. ARGUMENTS -handle CBF handle. value The value of the row to find. +handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")find_row; - void find_row(const char* arg){ - cbf_failnez(cbf_find_row(self,arg));} +")reset_saveframe; + void reset_saveframe(void){ + cbf_failnez(cbf_reset_saveframe(self));} -/* cfunc cbf_select_column pyfunc select_column - arg cbf_handle handle arg unsigned int column */ +/* cfunc cbf_reset_category pyfunc reset_category + arg cbf_handle handle */ %feature("autodoc", " Returns : -*args : Integer +*args : -C prototype: int cbf_select_column (cbf_handle handle, unsigned int column); +C prototype: int cbf_reset_category (cbf_handle handle); CBFLib documentation: DESCRIPTION -cbf_select_column selects column number column in the current -category as the current column. -The first column is number 0. -The current row is not affected -If the column does not exist, the function returns CBF_NOTFOUND. +cbf_reset_category deletes all columns and rows from current category. ARGUMENTS -handle CBF handle. column Number of the column to select. +handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")select_column; - void select_column(unsigned int arg){ - cbf_failnez(cbf_select_column(self,arg));} -%feature("autodoc", " -Returns : pycbf detector object -*args : Integer element_number - -C prototype: int cbf_construct_detector (cbf_handle handle, - cbf_detector *detector, unsigned int element_number); +")reset_category; + void reset_category(void){ + cbf_failnez(cbf_reset_category(self));} -CBFLib documentation: -DESCRIPTION -cbf_construct_detector constructs a detector object for detector -element number element_number using the description in the CBF object -handle and initialises the detector handle *detector. -cbf_construct_reference_detector constructs a detector object for -detector element number element_number using the description in the -CBF object handle and initialises the detector handle *detector using -the reference settings of the axes. cbf_require_reference_detector is -similar, but try to force the creations of missing intermediate -categories needed to construct a detector object. -ARGUMENTS -handle CBF handle. detector Pointer to the -destination detector handle. element_number The number of the -detector element counting from 0 by order of appearance in the -\"diffrn_data_frame \" category. -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")construct_detector; +/* cfunc cbf_remove_datablock pyfunc remove_datablock + arg cbf_handle handle */ - cbf_detector construct_detector(unsigned int element_number){ - cbf_detector detector; - cbf_failnez(cbf_construct_detector(self,&detector,element_number)); - return detector; - } %feature("autodoc", " -Returns : String -*args : String axis_id +Returns : +*args : -C prototype: int cbf_get_axis_depends_on (cbf_handle handle, - const char *axis_id, const char * *depends_on); +C prototype: int cbf_remove_datablock (cbf_handle handle); CBFLib documentation: DESCRIPTION -cbf_count_axis_ancestors sets ancestors to the number of ancestors of -axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor -axis of index ancestor_index of axis axis_id, starting with axis_id -for ancestor_index 0. -cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of -axis_id or to \". \" if there is no such ancestor. -cbf_get_axis_equipment sets *equipment to the equipment of axis_id or -to \". \" if there is no such equipment. -cbf_get_axis_equipment_component sets *equipment_component to the -equipment_component of axis_id or to \". \" if there is no such -equipment_component. -cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the -components of the ofset of axis_id. -cbf_get_axis_rotation sets rotation to the rotation of axis_id or to -0 if there is no such rotation. cbf_get_axis_rotation_axis sets -*rotation_axis to the rotation_axis of axis_id or to \". \" if there -is no such rotation_axis. -cbf_get_axis_setting sets *start and *increment to the corresponding -values of the axis axis_id. Any of the destination pointers may be -NULL. -cbf_get_axis_type sets axis_type to the type of axis_id. -cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the -components of the vector of axis_id. -The parameter reserved is presently unused and should be set to 0. +cbf_remove_datablock deletes the current data block. +cbf_remove_saveframe deletes the current save frame. +The current data block becomes undefined. ARGUMENTS -handle CBF handle. reserved Unused. Any -value other than 0 is invalid. axis_id Axis id. -ancestor_index Integer index of the desired ancestor, starting -with 0 for the current axis_id. ancestor Pointer to -destination ancestor name pointer. depends_on Pointer to -destination depends_on name pointer. equipment Pointer to -destination equipment name pointer. equipment_component Pointer to -destination equipment_component name pointer. offset1 -Pointer to destination first offset component value. offset2 - Pointer to destination second offset component value. offset3 - Pointer to destination third offset component value. -rotation Pointer to destination rotation value. -rotation_axis Pointer to destination rotation_axisn name -pointer. start Pointer to the destination start -value. increment Pointer to the destination increment -value. type Pointer to destination axis type of type -. vector1 Pointer to destination first vector component -value. vector2 Pointer to destination second vector -component value. vector3 Pointer to destination third -vector component value. +handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_axis_depends_on; +SEE ALSO +")remove_datablock; + void remove_datablock(void){ + cbf_failnez(cbf_remove_datablock(self));} - const char * get_axis_depends_on(const char *axis_id){ - const char* dep_on; - cbf_failnez(cbf_get_axis_depends_on(self,axis_id, - &dep_on)); - return dep_on; - } - -/* cfunc cbf_rewind_column pyfunc rewind_column +/* cfunc cbf_remove_saveframe pyfunc remove_saveframe arg cbf_handle handle */ %feature("autodoc", " Returns : *args : -C prototype: int cbf_rewind_column (cbf_handle handle); +C prototype: int cbf_remove_saveframe (cbf_handle handle); CBFLib documentation: DESCRIPTION -cbf_rewind_column makes the first column in the current category the -current column. -If there are no columns, the function returns CBF_NOTFOUND. -The current row is not affected. +cbf_remove_datablock deletes the current data block. +cbf_remove_saveframe deletes the current save frame. +The current data block becomes undefined. ARGUMENTS handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")rewind_column; - void rewind_column(void){ - cbf_failnez(cbf_rewind_column(self));} +")remove_saveframe; + void remove_saveframe(void){ + cbf_failnez(cbf_remove_saveframe(self));} + +/* cfunc cbf_remove_category pyfunc remove_category + arg cbf_handle handle */ + %feature("autodoc", " -Returns : pycbf positioner object -*args : String axis_id +Returns : +*args : -C prototype: int cbf_construct_reference_positioner (cbf_handle handle, - cbf_positioner *positioner, const char *axis_id); +C prototype: int cbf_remove_category (cbf_handle handle); CBFLib documentation: DESCRIPTION -cbf_construct_positioner constructs a positioner object for the axis -given by axis_id using the description in the CBF object handle and -initialises the positioner handle *positioner. -cbf_construct_reference positioner constructs a positioner object for -the axis given by axis_id using the description in the CBF object -handle and initialises the detector handle *detector using the -reference settings of the axes. +cbf_remove_category deletes the current category. +The current category becomes undefined. ARGUMENTS -handle CBF handle. detector Pointer to the destination detector -handle. axis_id The identifier of the axis in the \"axis \" -category. +handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")construct_reference_positioner; +SEE ALSO +")remove_category; + void remove_category(void){ + cbf_failnez(cbf_remove_category(self));} + +/* cfunc cbf_remove_column pyfunc remove_column + arg cbf_handle handle */ - cbf_positioner construct_reference_positioner(const char* axis_id){ - cbf_positioner positioner; - cbf_failnez(cbf_construct_reference_positioner(self,&positioner,axis_id)); - return positioner; - } %feature("autodoc", " -Returns : Float defaultvalue -*args : String columnname,Float Value +Returns : +*args : -C prototype: int cbf_require_column_doublevalue (cbf_handle handle, - const char *columnname, double *number, - const double defaultvalue); +C prototype: int cbf_remove_column (cbf_handle handle); CBFLib documentation: DESCRIPTION -cbf_require_column_doublevalue sets *number to the value of the ASCII -item at the current row for the column given with the name given by -*columnname, with the value interpreted as a decimal floating-point -number, or to the number given by defaultvalue if the item cannot be -found. +cbf_remove_column deletes the current column. +The current column becomes undefined. ARGUMENTS -handle CBF handle. columnname Name of the column -containing the number. number pointer to the location to -receive the floating-point value. defaultvalue Value to use if the -requested column and value cannot be found. +handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")require_column_doublevalue; +")remove_column; + void remove_column(void){ + cbf_failnez(cbf_remove_column(self));} + +/* cfunc cbf_remove_row pyfunc remove_row + arg cbf_handle handle */ -%apply double *OUTPUT { double *number} require_column_doublevalue; -void require_column_doublevalue(const char *columnname, double * number, - const double defaultvalue){ - cbf_failnez(cbf_require_column_doublevalue(self, - columnname,number,defaultvalue)); - } %feature("autodoc", " -Returns : int year,int month,int day,int hour,int minute,double second, - int timezone +Returns : *args : -C prototype: int cbf_get_datestamp (cbf_handle handle, unsigned int reserved, - int *year, int *month, int *day, int *hour, int *minute, - double *second, int *timezone); +C prototype: int cbf_remove_row (cbf_handle handle); CBFLib documentation: DESCRIPTION -cbf_get_datestamp sets *year, *month, *day, *hour, *minute and -*second to the corresponding values of the collection timestamp. -*timezone is set to timezone difference from UTC in minutes. The -parameter < i>reserved is presently unused and should be set to 0. -Any of the destination pointers may be NULL. +cbf_remove_row deletes the current row in the current category. +If the current row was the last row, it will move down by 1, +otherwise, it will remain the same. ARGUMENTS -handle CBF handle. reserved Unused. Any value other than 0 is -invalid. year Pointer to the destination timestamp year. month - Pointer to the destination timestamp month (1-12). day -Pointer to the destination timestamp day (1-31). hour Pointer -to the destination timestamp hour (0-23). minute Pointer to the -destination timestamp minute (0-59). second Pointer to the -destination timestamp second (0-60.0). timezone Pointer to the -destination timezone difference from UTC in minutes. +handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_datestamp; - -%apply int *OUTPUT {int *year, int *month, int *day, int *hour, - int *minute, double *second, int *timezone} get_datestamp; - void get_datestamp(int *year, int *month, int *day, int *hour, - int *minute, double *second, int *timezone){ - unsigned int reserved; - reserved = 0; - cbf_failnez(cbf_get_datestamp(self,reserved, - year,month,day,hour,minute,second,timezone)); - } +SEE ALSO +")remove_row; + void remove_row(void){ + cbf_failnez(cbf_remove_row(self));} -/* cfunc cbf_get_integervalue pyfunc get_integervalue - arg cbf_handle handle arg int *number */ +/* cfunc cbf_rewind_datablock pyfunc rewind_datablock + arg cbf_handle handle */ %feature("autodoc", " -Returns : int +Returns : *args : -C prototype: int cbf_get_integervalue (cbf_handle handle, int *number); +C prototype: int cbf_rewind_datablock (cbf_handle handle); CBFLib documentation: DESCRIPTION -cbf_get_integervalue sets *number to the value of the ASCII item at -the current column and row interpreted as a decimal integer. -cbf_require_integervalue sets *number to the value of the ASCII item -at the current column and row interpreted as a decimal integer, -setting it to defaultvalue if necessary. -If the value is not ASCII, the function returns CBF_BINARY. +cbf_rewind_datablock makes the first data block the current data +block. +If there are no data blocks, the function returns CBF_NOTFOUND. +The current category becomes undefined. ARGUMENTS -handle CBF handle. number pointer to the number. -defaultvalue default number value. +handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")get_integervalue; - int get_integervalue(void){ - int result; - cbf_failnez(cbf_get_integervalue(self,&result)); - return result;} +")rewind_datablock; + void rewind_datablock(void){ + cbf_failnez(cbf_rewind_datablock(self));} -/* cfunc cbf_get_crystal_id pyfunc get_crystal_id - arg cbf_handle handle arg const char **crystal_id */ +/* cfunc cbf_rewind_category pyfunc rewind_category + arg cbf_handle handle */ %feature("autodoc", " Returns : -*args : string +*args : -C prototype: int cbf_get_crystal_id (cbf_handle handle, - const char **crystal_id); +C prototype: int cbf_rewind_category (cbf_handle handle); CBFLib documentation: DESCRIPTION -cbf_get_crystal_id sets *crystal_id to point to the ASCII value of -the \"diffrn.crystal_id \" entry. -If the value is not ASCII, the function returns CBF_BINARY. -The value will be valid as long as the item exists and has not been -set to a new value. -The value must not be modified by the program in any way. +cbf_rewind_category makes the first category in the current data +block the current category. cbf_rewind_saveframe makes the first +saveframe in the current data block the current saveframe. +cbf_rewind_blockitem makes the first blockitem (category or +saveframe) in the current data block the current blockitem. The type +of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type. +If there are no categories, saveframes or blockitems the function +returns CBF_NOTFOUND. +The current column and row become undefined. ARGUMENTS -handle CBF handle. crystal_id Pointer to the destination -value pointer. +handle CBF handle. type CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_crystal_id; - const char* get_crystal_id(void){ - const char* result; - cbf_failnez(cbf_get_crystal_id(self, &result)); - return result;} +SEE ALSO +")rewind_category; + void rewind_category(void){ + cbf_failnez(cbf_rewind_category(self));} -/* cfunc cbf_get_doublevalue pyfunc get_doublevalue - arg cbf_handle handle arg double *number */ +/* cfunc cbf_rewind_saveframe pyfunc rewind_saveframe + arg cbf_handle handle */ %feature("autodoc", " -Returns : double +Returns : *args : -C prototype: int cbf_get_doublevalue (cbf_handle handle, double *number); +C prototype: int cbf_rewind_saveframe (cbf_handle handle); CBFLib documentation: DESCRIPTION -cbf_get_doublevalue sets *number to the value of the ASCII item at -the current column and row interpreted as a decimal floating-point -number. cbf_require_doublevalue sets *number to the value of the -ASCII item at the current column and row interpreted as a decimal -floating-point number, setting it to defaultvalue if necessary. -If the value is not ASCII, the function returns CBF_BINARY. +cbf_rewind_category makes the first category in the current data +block the current category. cbf_rewind_saveframe makes the first +saveframe in the current data block the current saveframe. +cbf_rewind_blockitem makes the first blockitem (category or +saveframe) in the current data block the current blockitem. The type +of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type. +If there are no categories, saveframes or blockitems the function +returns CBF_NOTFOUND. +The current column and row become undefined. ARGUMENTS -handle CBF handle. number Pointer to the destination -number. defaultvalue default number value. +handle CBF handle. type CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")get_doublevalue; - double get_doublevalue(void){ - double result; - cbf_failnez(cbf_get_doublevalue(self,&result)); - return result;} +")rewind_saveframe; + void rewind_saveframe(void){ + cbf_failnez(cbf_rewind_saveframe(self));} + +/* cfunc cbf_rewind_blockitem pyfunc rewind_blockitem + arg cbf_handle handle arg CBF_NODETYPE * type */ + %feature("autodoc", " -Returns : Float a,Float b,Float c,Float alpha,Float beta,Float gamma +Returns : CBF_NODETYPE *args : -C prototype: int cbf_get_unit_cell (cbf_handle handle, double cell[6], - double cell_esd[6] ); +C prototype: int cbf_rewind_blockitem (cbf_handle handle, + CBF_NODETYPE * type); CBFLib documentation: DESCRIPTION -cbf_get_unit_cell sets cell[0:2] to the double values of the cell -edge lengths a, b and c in AAngstroms, cell[3:5] to the double values -of the cell angles a, b and g in degrees, cell_esd[0:2] to the double -values of the estimated strandard deviations of the cell edge lengths -a, b and c in AAngstroms, cell_esd[3:5] to the double values of the -estimated standard deviations of the the cell angles a, b and g in -degrees. -The values returned are retrieved from the first row of the \"cell -\" category. The value of \"_cell.entry_id \" is ignored. -cell or cell_esd may be NULL. -If cell is NULL, the cell parameters are not retrieved. -If cell_esd is NULL, the cell parameter esds are not retrieved. -If the \"cell \" category is present, but some of the values are -missing, zeros are returned for the missing values. +cbf_rewind_category makes the first category in the current data +block the current category. cbf_rewind_saveframe makes the first +saveframe in the current data block the current saveframe. +cbf_rewind_blockitem makes the first blockitem (category or +saveframe) in the current data block the current blockitem. The type +of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type. +If there are no categories, saveframes or blockitems the function +returns CBF_NOTFOUND. +The current column and row become undefined. ARGUMENTS -handle CBF handle. cell Pointer to the destination array of -6 doubles for the cell parameters. cell_esd Pointer to the -destination array of 6 doubles for the cell parameter esds. +handle CBF handle. type CBF handle. RETURN VALUE -Returns an error code on failure or 0 for success. No errors is -returned for missing values if the \"cell \" category exists. +Returns an error code on failure or 0 for success. SEE ALSO -")get_unit_cell; +")rewind_blockitem; + CBF_NODETYPE rewind_blockitem(void){ + CBF_NODETYPE result; + cbf_failnez(cbf_rewind_blockitem(self,&result)); + return result;} + +/* cfunc cbf_rewind_column pyfunc rewind_column + arg cbf_handle handle */ -%apply double *OUTPUT {double *a, double *b, double *c, - double *alpha, double *beta, double *gamma} get_unit_cell; - void get_unit_cell(double *a, double *b, double *c, - double *alpha, double *beta, double *gamma) { - double cell[6]; - cbf_failnez(cbf_get_unit_cell(self,cell,NULL)); - *a = cell[0]; - *b = cell[1]; - *c = cell[2]; - *alpha = cell[3]; - *beta = cell[4]; - *gamma = cell[5]; - } %feature("autodoc", " -Returns : doubleArray cell +Returns : *args : -C prototype: int cbf_get_unit_cell (cbf_handle handle, double cell[6], - double cell_esd[6] ); +C prototype: int cbf_rewind_column (cbf_handle handle); CBFLib documentation: DESCRIPTION -cbf_get_unit_cell sets cell[0:2] to the double values of the cell -edge lengths a, b and c in AAngstroms, cell[3:5] to the double values -of the cell angles a, b and g in degrees, cell_esd[0:2] to the double -values of the estimated strandard deviations of the cell edge lengths -a, b and c in AAngstroms, cell_esd[3:5] to the double values of the -estimated standard deviations of the the cell angles a, b and g in -degrees. -The values returned are retrieved from the first row of the \"cell -\" category. The value of \"_cell.entry_id \" is ignored. -cell or cell_esd may be NULL. -If cell is NULL, the cell parameters are not retrieved. -If cell_esd is NULL, the cell parameter esds are not retrieved. -If the \"cell \" category is present, but some of the values are -missing, zeros are returned for the missing values. +cbf_rewind_column makes the first column in the current category the +current column. +If there are no columns, the function returns CBF_NOTFOUND. +The current row is not affected. ARGUMENTS -handle CBF handle. cell Pointer to the destination array of -6 doubles for the cell parameters. cell_esd Pointer to the -destination array of 6 doubles for the cell parameter esds. +handle CBF handle. RETURN VALUE -Returns an error code on failure or 0 for success. No errors is -returned for missing values if the \"cell \" category exists. +Returns an error code on failure or 0 for success. SEE ALSO -")get_unit_cell; +")rewind_column; + void rewind_column(void){ + cbf_failnez(cbf_rewind_column(self));} + +/* cfunc cbf_rewind_row pyfunc rewind_row + arg cbf_handle handle */ -%apply double *OUTPUT {double *a_esd, double *b_esd, double *c_esd, - double *alpha_esd, double *beta_esd, double *gamma_esd} get_unit_cell_esd; - void get_unit_cell_esd(double *a_esd, double *b_esd, double *c_esd, - double *alpha_esd, double *beta_esd, double *gamma_esd) { - double cell_esd[6]; - cbf_failnez(cbf_get_unit_cell(self,NULL,cell_esd)); - *a_esd = cell_esd[0]; - *b_esd = cell_esd[1]; - *c_esd = cell_esd[2]; - *alpha_esd = cell_esd[3]; - *beta_esd = cell_esd[4]; - *gamma_esd = cell_esd[5]; - } %feature("autodoc", " -Returns : String -*args : String axis_id +Returns : +*args : -C prototype: int cbf_get_axis_type (cbf_handle handle, const char *axis_id, - cbf_axis_type *axis_type); +C prototype: int cbf_rewind_row (cbf_handle handle); CBFLib documentation: DESCRIPTION -cbf_count_axis_ancestors sets ancestors to the number of ancestors of -axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor -axis of index ancestor_index of axis axis_id, starting with axis_id -for ancestor_index 0. -cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of -axis_id or to \". \" if there is no such ancestor. -cbf_get_axis_equipment sets *equipment to the equipment of axis_id or -to \". \" if there is no such equipment. -cbf_get_axis_equipment_component sets *equipment_component to the -equipment_component of axis_id or to \". \" if there is no such -equipment_component. -cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the -components of the ofset of axis_id. -cbf_get_axis_rotation sets rotation to the rotation of axis_id or to -0 if there is no such rotation. cbf_get_axis_rotation_axis sets -*rotation_axis to the rotation_axis of axis_id or to \". \" if there -is no such rotation_axis. -cbf_get_axis_setting sets *start and *increment to the corresponding -values of the axis axis_id. Any of the destination pointers may be -NULL. -cbf_get_axis_type sets axis_type to the type of axis_id. -cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the -components of the vector of axis_id. -The parameter reserved is presently unused and should be set to 0. +cbf_rewind_row makes the first row in the current category the +current row. +If there are no rows, the function returns CBF_NOTFOUND. +The current column is not affected. ARGUMENTS -handle CBF handle. reserved Unused. Any -value other than 0 is invalid. axis_id Axis id. -ancestor_index Integer index of the desired ancestor, starting -with 0 for the current axis_id. ancestor Pointer to -destination ancestor name pointer. depends_on Pointer to -destination depends_on name pointer. equipment Pointer to -destination equipment name pointer. equipment_component Pointer to -destination equipment_component name pointer. offset1 -Pointer to destination first offset component value. offset2 - Pointer to destination second offset component value. offset3 - Pointer to destination third offset component value. -rotation Pointer to destination rotation value. -rotation_axis Pointer to destination rotation_axisn name -pointer. start Pointer to the destination start -value. increment Pointer to the destination increment -value. type Pointer to destination axis type of type -. vector1 Pointer to destination first vector component -value. vector2 Pointer to destination second vector -component value. vector3 Pointer to destination third -vector component value. +handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_axis_type; +SEE ALSO +")rewind_row; + void rewind_row(void){ + cbf_failnez(cbf_rewind_row(self));} - const char * get_axis_type(const char *axis_id){ - cbf_axis_type axis_type; - cbf_failnez(cbf_get_axis_type(self,axis_id, - &axis_type)); - if (axis_type == CBF_TRANSLATION_AXIS) return "translation"; - if (axis_type == CBF_ROTATION_AXIS) return "rotation"; - return "general"; - } - -/* cfunc cbf_remove_column pyfunc remove_column +/* cfunc cbf_next_datablock pyfunc next_datablock arg cbf_handle handle */ %feature("autodoc", " Returns : *args : -C prototype: int cbf_remove_column (cbf_handle handle); +C prototype: int cbf_next_datablock (cbf_handle handle); CBFLib documentation: DESCRIPTION -cbf_remove_column deletes the current column. -The current column becomes undefined. +cbf_next_datablock makes the data block following the current data +block the current data block. +If there are no more data blocks, the function returns CBF_NOTFOUND. +The current category becomes undefined. ARGUMENTS handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")remove_column; - void remove_column(void){ - cbf_failnez(cbf_remove_column(self));} +")next_datablock; + void next_datablock(void){ + cbf_failnez(cbf_next_datablock(self));} -/* cfunc cbf_rewind_blockitem pyfunc rewind_blockitem - arg cbf_handle handle arg CBF_NODETYPE * type */ +/* cfunc cbf_next_category pyfunc next_category + arg cbf_handle handle */ %feature("autodoc", " -Returns : CBF_NODETYPE +Returns : *args : -C prototype: int cbf_rewind_blockitem (cbf_handle handle, - CBF_NODETYPE * type); +C prototype: int cbf_next_category (cbf_handle handle); CBFLib documentation: DESCRIPTION -cbf_rewind_category makes the first category in the current data -block the current category. cbf_rewind_saveframe makes the first -saveframe in the current data block the current saveframe. -cbf_rewind_blockitem makes the first blockitem (category or -saveframe) in the current data block the current blockitem. The type -of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type. -If there are no categories, saveframes or blockitems the function -returns CBF_NOTFOUND. +cbf_next_category makes the category following the current category +in the current data block the current category. +If there are no more categories, the function returns CBF_NOTFOUND. The current column and row become undefined. ARGUMENTS -handle CBF handle. type CBF handle. +handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")rewind_blockitem; - CBF_NODETYPE rewind_blockitem(void){ - CBF_NODETYPE result; - cbf_failnez(cbf_rewind_blockitem(self,&result)); - return result;} +")next_category; + void next_category(void){ + cbf_failnez(cbf_next_category(self));} -/* cfunc cbf_get_value pyfunc get_value - arg cbf_handle handle arg const char **value */ +/* cfunc cbf_next_column pyfunc next_column + arg cbf_handle handle */ %feature("autodoc", " Returns : -*args : string +*args : -C prototype: int cbf_get_value (cbf_handle handle, const char **value); +C prototype: int cbf_next_column (cbf_handle handle); CBFLib documentation: DESCRIPTION -cbf_get_value sets *value to point to the ASCII value of the item at -the current column and row. cbf_require_value sets *value to point to -the ASCII value of the item at the current column and row, creating -the data item if necessary and initializing it to a copy of -defaultvalue. -If the value is not ASCII, the function returns CBF_BINARY. -The value will be valid as long as the item exists and has not been -set to a new value. -The value must not be modified by the program in any way. +cbf_next_column makes the column following the current column in the +current category the current column. +If there are no more columns, the function returns CBF_NOTFOUND. +The current row is not affected. ARGUMENTS -handle CBF handle. value Pointer to the destination -value pointer. defaultvalue Default value character string. +handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")get_value; - const char* get_value(void){ - const char* result; - cbf_failnez(cbf_get_value(self, &result)); - return result;} +")next_column; + void next_column(void){ + cbf_failnez(cbf_next_column(self));} -/* cfunc cbf_count_categories pyfunc count_categories - arg cbf_handle handle arg unsigned int *categories */ +/* cfunc cbf_next_row pyfunc next_row + arg cbf_handle handle */ %feature("autodoc", " -Returns : Integer +Returns : *args : -C prototype: int cbf_count_categories (cbf_handle handle, - unsigned int *categories); +C prototype: int cbf_next_row (cbf_handle handle); CBFLib documentation: DESCRIPTION -cbf_count_categories puts the number of categories in the current -data block in *categories. +cbf_next_row makes the row following the current row in the current +category the current row. +If there are no more rows, the function returns CBF_NOTFOUND. +The current column is not affected. ARGUMENTS -handle CBF handle. categories Pointer to the destination -category count. +handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")count_categories; - unsigned int count_categories(void){ - unsigned int result; - cbf_failnez(cbf_count_categories(self,&result)); - return result;} +")next_row; + void next_row(void){ + cbf_failnez(cbf_next_row(self));} + +/* cfunc cbf_find_datablock pyfunc find_datablock + arg cbf_handle handle arg const char *datablockname */ + %feature("autodoc", " -Returns : -*args : String filename,Integer headers +Returns : string +*args : -C prototype: int cbf_read_widefile (cbf_handle handle, FILE *file, int flags); +C prototype: int cbf_find_datablock (cbf_handle handle, + const char *datablockname); CBFLib documentation: DESCRIPTION -cbf_read_file reads the CBF or CIF file file into the CBF object -specified by handle, using the CIF 1.0 convention of 80 character -lines. cbf_read_widefile reads the CBF or CIF file file into the CBF -object specified by handle, using the CIF 1.1 convention of 2048 -character lines. A warning is issued to stderr for ascii lines over -the limit. No test is performed on binary sections. -Validation is performed in three ways levels: during the lexical -scan, during the parse, and, if a dictionary was converted, against -the value types, value enumerations, categories and parent-child -relationships specified in the dictionary. -flags controls the interpretation of binary section headers, the -parsing of brackets constructs and the parsing of treble-quoted -strings. -MSG_DIGEST: Instructs CBFlib to check that the digest -of the binary section matches any header digest value. If the digests -do not match, the call will return CBF_FORMAT. This evaluation and -comparison is delayed (a \"lazy \" evaluation) to ensure maximal -processing efficiency. If an immediately evaluation is required, see -MSG_DIGESTNOW, below. MSG_DIGESTNOW: Instructs CBFlib to -check that the digest of the binary section matches any header -digeste value. If the digests do not match, the call will return -CBF_FORMAT. This evaluation and comparison is performed during -initial parsing of the section to ensure timely error reporting at -the expense of processing efficiency. If a more efficient delayed ( -\"lazy \") evaluation is required, see MSG_DIGEST, above. -MSG_DIGESTWARN: Instructs CBFlib to check that the digest -of the binary section matches any header digeste value. If the -digests do not match, a warning message will be sent to stderr, but -processing will attempt to continue. This evaluation and comparison -is first performed during initial parsing of the section to ensure -timely error reporting at the expense of processing efficiency. An -mismatch of the message digest usually indicates a serious error, but -it is sometimes worth continuing processing to try to isolate the -cause of the error. Use this option with caution. MSG_NODIGEST: - Do not check the digest (default). PARSE_BRACKETS: -Accept DDLm bracket-delimited [item,item,...item] or -{item,item,...item} or (item,item,...item) constructs as valid, -stripping non-quoted embedded whitespace and comments. These -constructs may span multiple lines. PARSE_LIBERAL_BRACKETS: Accept -DDLm bracket-delimited [item,item,...item] or {item,item,...item} or -(item,item,...item) constructs as valid, stripping embedded -non-quoted, non-separating whitespace and comments. These constructs -may span multiple lines. In this case, whitespace may be used as an -alternative to the comma. PARSE_TRIPLE_QUOTES: Accept DDLm -triple-quoted \" \" \"item,item,...item \" \" \" or -'''item,item,...item''' constructs as valid, stripping embedded -whitespace and comments. These constructs may span multiple lines. If -this flag is set, then ''' will not be interpreted as a quoted -apoptrophe and \" \" \" will not be interpreted as a quoted double -quote mark and PARSE_NOBRACKETS: Do not accept DDLm -bracket-delimited [item,item,...item] or {item,item,...item} or -(item,item,...item) constructs as valid, stripping non-quoted -embedded whitespace and comments. These constructs may span multiple -lines. PARSE_NOTRIPLE_QUOTES: No not accept DDLm triple-quoted \" -\" \"item,item,...item \" \" \" or '''item,item,...item''' constructs -as valid, stripping embedded whitespace and comments. These -constructs may span multiple lines. If this flag is set, then ''' -will be interpreted as a quoted apostrophe and \" \" \" will be -interpreted as a quoted double quote mark. -CBFlib defers reading binary sections as long as possible. In the -current version of CBFlib, this means that: -1. The file must be a random-access file opened in binary mode (fopen -( , -")read_widefile; - - void read_widefile(char* filename, int headers){ - /* CBFlib needs a stream that will remain open - hence DO NOT open from python */ - FILE *stream; - if ( ! ( stream = fopen (filename, "rb")) ){ - cbf_failnez(CBF_FILEOPEN); - } - else{ - cbf_failnez(cbf_read_widefile(self, stream, headers)); - } - } +cbf_find_datablock makes the data block with name datablockname the +current data block. +The comparison is case-insensitive. +If the data block does not exist, the function returns CBF_NOTFOUND. +The current category becomes undefined. +ARGUMENTS +handle CBF handle. datablockname The name of the data +block to find. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")find_datablock; + void find_datablock(const char* arg){ + cbf_failnez(cbf_find_datablock(self,arg));} -/* cfunc cbf_set_wavelength pyfunc set_wavelength - arg cbf_handle handle arg double wavelength */ +/* cfunc cbf_find_category pyfunc find_category + arg cbf_handle handle arg const char *categoryname */ %feature("autodoc", " -Returns : double wavelength +Returns : string *args : -C prototype: int cbf_set_wavelength (cbf_handle handle, double wavelength); +C prototype: int cbf_find_category (cbf_handle handle, + const char *categoryname); CBFLib documentation: DESCRIPTION -cbf_set_wavelength sets the current wavelength in AA to wavelength. +cbf_find_category makes the category in the current data block with +name categoryname the current category. +The comparison is case-insensitive. +If the category does not exist, the function returns CBF_NOTFOUND. +The current column and row become undefined. ARGUMENTS -handle CBF handle. wavelength Wavelength in AA. +handle CBF handle. categoryname The name of the category to +find. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")set_wavelength; - void set_wavelength(double wavelength){ - cbf_failnez(cbf_set_wavelength(self,wavelength));} +SEE ALSO +")find_category; + void find_category(const char* arg){ + cbf_failnez(cbf_find_category(self,arg));} + +/* cfunc cbf_find_column pyfunc find_column + arg cbf_handle handle arg const char *columnname */ + %feature("autodoc", " -Returns : Float vector1,Float vector2,Float vector3 -*args : String axis_id +Returns : string +*args : -C prototype: int cbf_get_axis_vector (cbf_handle handle, const char *axis_id, - double *vector1, double *vector2, double *vector3); +C prototype: int cbf_find_column (cbf_handle handle, const char *columnname); CBFLib documentation: DESCRIPTION -cbf_count_axis_ancestors sets ancestors to the number of ancestors of -axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor -axis of index ancestor_index of axis axis_id, starting with axis_id -for ancestor_index 0. -cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of -axis_id or to \". \" if there is no such ancestor. -cbf_get_axis_equipment sets *equipment to the equipment of axis_id or -to \". \" if there is no such equipment. -cbf_get_axis_equipment_component sets *equipment_component to the -equipment_component of axis_id or to \". \" if there is no such -equipment_component. -cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the -components of the ofset of axis_id. -cbf_get_axis_rotation sets rotation to the rotation of axis_id or to -0 if there is no such rotation. cbf_get_axis_rotation_axis sets -*rotation_axis to the rotation_axis of axis_id or to \". \" if there -is no such rotation_axis. -cbf_get_axis_setting sets *start and *increment to the corresponding -values of the axis axis_id. Any of the destination pointers may be -NULL. -cbf_get_axis_type sets axis_type to the type of axis_id. -cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the -components of the vector of axis_id. -The parameter reserved is presently unused and should be set to 0. +cbf_find_column makes the columns in the current category with name +columnname the current column. +The comparison is case-insensitive. +If the column does not exist, the function returns CBF_NOTFOUND. +The current row is not affected. ARGUMENTS -handle CBF handle. reserved Unused. Any -value other than 0 is invalid. axis_id Axis id. -ancestor_index Integer index of the desired ancestor, starting -with 0 for the current axis_id. ancestor Pointer to -destination ancestor name pointer. depends_on Pointer to -destination depends_on name pointer. equipment Pointer to -destination equipment name pointer. equipment_component Pointer to -destination equipment_component name pointer. offset1 -Pointer to destination first offset component value. offset2 - Pointer to destination second offset component value. offset3 - Pointer to destination third offset component value. -rotation Pointer to destination rotation value. -rotation_axis Pointer to destination rotation_axisn name -pointer. start Pointer to the destination start -value. increment Pointer to the destination increment -value. type Pointer to destination axis type of type -. vector1 Pointer to destination first vector component -value. vector2 Pointer to destination second vector -component value. vector3 Pointer to destination third -vector component value. +handle CBF handle. columnname The name of column to find. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_axis_vector; - - %apply double *OUTPUT {double *vector1, double *vector2, double vector3} get_axis_vector; - void get_axis_vector(const char *axis_id, - double *vector1, double *vector2, double *vector3){ - cbf_failnez(cbf_get_axis_vector(self,axis_id, - vector1, vector2,vector3)); - } - %feature("autodoc", " -Returns : -*args : Int element_number,Int axis_number,Float pixel size - -C prototype: int cbf_set_pixel_size_sf(cbf_handle handle, - unsigned int element_number, int axis_number, - double psize); - -CBFLib documentation: -DESCRIPTION -cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the -"e;size"e; column of the \"array_structure_list \" category -at the row which matches axis axis_number of the detector element -element_number converting the double pixel size psize from meters to -millimeters in storing it in the \"size \" column for the axis -axis_number of the detector element element_number. The axis_number -is numbered from 1, starting with the slowest axis. -cbf_set_pixel_size_fs sets the item -")set_pixel_size_sf; - - void set_pixel_size_sf (unsigned int element_number, - unsigned int axis_number, double psize){ - cbf_failnez(cbf_set_pixel_size_sf(self, - element_number, - axis_number, - psize)); - } +SEE ALSO +")find_column; + void find_column(const char* arg){ + cbf_failnez(cbf_find_column(self,arg));} -/* cfunc cbf_get_diffrn_id pyfunc get_diffrn_id - arg cbf_handle handle arg const char **diffrn_id */ +/* cfunc cbf_find_row pyfunc find_row + arg cbf_handle handle arg const char *value */ %feature("autodoc", " -Returns : -*args : string +Returns : string +*args : -C prototype: int cbf_get_diffrn_id (cbf_handle handle, - const char **diffrn_id); +C prototype: int cbf_find_row (cbf_handle handle, const char *value); CBFLib documentation: DESCRIPTION -cbf_get_diffrn_id sets *diffrn_id to point to the ASCII value of the -\"diffrn.id \" entry. cbf_require_diffrn_id also sets *diffrn_id to -point to the ASCII value of the \"diffrn.id \" entry, but, if the -\"diffrn.id \" entry does not exist, it sets the value in the CBF and -in*diffrn_id to the character string given by default_id, creating -the category and column is necessary. -The diffrn_id will be valid as long as the item exists and has not -been set to a new value. -The diffrn_id must not be modified by the program in any way. +cbf_find_row makes the first row in the current column with value +value the current row. +The comparison is case-sensitive. +If a matching row does not exist, the function returns CBF_NOTFOUND. +The current column is not affected. ARGUMENTS -handle CBF handle. diffrn_id Pointer to the destination -value pointer. default_id Character string default value. +handle CBF handle. value The value of the row to find. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_diffrn_id; - const char* get_diffrn_id(void){ - const char* result; - cbf_failnez(cbf_get_diffrn_id(self, &result)); - return result;} +SEE ALSO +")find_row; + void find_row(const char* arg){ + cbf_failnez(cbf_find_row(self,arg));} + +/* cfunc cbf_find_nextrow pyfunc find_nextrow + arg cbf_handle handle arg const char *value */ + %feature("autodoc", " -Returns : Float -*args : String axis_id +Returns : string +*args : -C prototype: int cbf_get_axis_rotation (cbf_handle handle, - const char *axis_id, double *rotation); +C prototype: int cbf_find_nextrow (cbf_handle handle, const char *value); CBFLib documentation: DESCRIPTION -cbf_count_axis_ancestors sets ancestors to the number of ancestors of -axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor -axis of index ancestor_index of axis axis_id, starting with axis_id -for ancestor_index 0. -cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of -axis_id or to \". \" if there is no such ancestor. -cbf_get_axis_equipment sets *equipment to the equipment of axis_id or -to \". \" if there is no such equipment. -cbf_get_axis_equipment_component sets *equipment_component to the -equipment_component of axis_id or to \". \" if there is no such -equipment_component. -cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the -components of the ofset of axis_id. -cbf_get_axis_rotation sets rotation to the rotation of axis_id or to -0 if there is no such rotation. cbf_get_axis_rotation_axis sets -*rotation_axis to the rotation_axis of axis_id or to \". \" if there -is no such rotation_axis. -cbf_get_axis_setting sets *start and *increment to the corresponding -values of the axis axis_id. Any of the destination pointers may be -NULL. -cbf_get_axis_type sets axis_type to the type of axis_id. -cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the -components of the vector of axis_id. -The parameter reserved is presently unused and should be set to 0. +cbf_find_nextrow makes the makes the next row in the current column +with value value the current row. The search starts from the row +following the last row found with cbf_find_row or cbf_find_nextrow, +or from the current row if the current row was defined using any +other function. +The comparison is case-sensitive. +If no more matching rows exist, the function returns CBF_NOTFOUND. +The current column is not affected. ARGUMENTS -handle CBF handle. reserved Unused. Any -value other than 0 is invalid. axis_id Axis id. -ancestor_index Integer index of the desired ancestor, starting -with 0 for the current axis_id. ancestor Pointer to -destination ancestor name pointer. depends_on Pointer to -destination depends_on name pointer. equipment Pointer to -destination equipment name pointer. equipment_component Pointer to -destination equipment_component name pointer. offset1 -Pointer to destination first offset component value. offset2 - Pointer to destination second offset component value. offset3 - Pointer to destination third offset component value. -rotation Pointer to destination rotation value. -rotation_axis Pointer to destination rotation_axisn name -pointer. start Pointer to the destination start -value. increment Pointer to the destination increment -value. type Pointer to destination axis type of type -. vector1 Pointer to destination first vector component -value. vector2 Pointer to destination second vector -component value. vector3 Pointer to destination third -vector component value. +handle CBF handle. value the value to search for. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_axis_rotation; +SEE ALSO +")find_nextrow; + void find_nextrow(const char* arg){ + cbf_failnez(cbf_find_nextrow(self,arg));} - %apply double *OUTPUT {double *rotation} get_axis_rotation; - void get_axis_rotation(const char *axis_id, - double *rotation){ - cbf_failnez(cbf_get_axis_rotation(self,axis_id, - rotation)); - } - -/* cfunc cbf_find_datablock pyfunc find_datablock - arg cbf_handle handle arg const char *datablockname */ +/* cfunc cbf_count_datablocks pyfunc count_datablocks + arg cbf_handle handle arg unsigned int *datablocks */ %feature("autodoc", " -Returns : string +Returns : Integer *args : -C prototype: int cbf_find_datablock (cbf_handle handle, - const char *datablockname); +C prototype: int cbf_count_datablocks (cbf_handle handle, + unsigned int *datablocks); CBFLib documentation: DESCRIPTION -cbf_find_datablock makes the data block with name datablockname the -current data block. -The comparison is case-insensitive. -If the data block does not exist, the function returns CBF_NOTFOUND. -The current category becomes undefined. +cbf_count_datablocks puts the number of data blocks in *datablocks . ARGUMENTS -handle CBF handle. datablockname The name of the data -block to find. +handle CBF handle. datablocks Pointer to the destination data +block count. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")find_datablock; - void find_datablock(const char* arg){ - cbf_failnez(cbf_find_datablock(self,arg));} +")count_datablocks; + unsigned int count_datablocks(void){ + unsigned int result; + cbf_failnez(cbf_count_datablocks(self,&result)); + return result;} + +/* cfunc cbf_count_categories pyfunc count_categories + arg cbf_handle handle arg unsigned int *categories */ + %feature("autodoc", " -Returns : float polarizn_source_ratio,float polarizn_source_norm +Returns : Integer *args : -C prototype: int cbf_get_polarization (cbf_handle handle, - double *polarizn_source_ratio, - double *polarizn_source_norm); +C prototype: int cbf_count_categories (cbf_handle handle, + unsigned int *categories); CBFLib documentation: DESCRIPTION -cbf_get_polarization sets *polarizn_source_ratio and -*polarizn_source_norm to the corresponding source polarization -parameters. -Either destination pointer may be NULL. +cbf_count_categories puts the number of categories in the current +data block in *categories. ARGUMENTS -handle CBF handle. polarizn_source_ratio Pointer -to the destination polarizn_source_ratio. polarizn_source_norm -Pointer to the destination polarizn_source_norm. +handle CBF handle. categories Pointer to the destination +category count. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_polarization; +SEE ALSO +")count_categories; + unsigned int count_categories(void){ + unsigned int result; + cbf_failnez(cbf_count_categories(self,&result)); + return result;} - /* Returns a pair of double values */ -%apply double *OUTPUT { double *in1, double *in2 }; - void get_polarization(double *in1,double *in2){ - cbf_failnez(cbf_get_polarization (self, in1, in2)); - } +/* cfunc cbf_count_columns pyfunc count_columns + arg cbf_handle handle arg unsigned int *columns */ + +%feature("autodoc", " +Returns : Integer +*args : + +C prototype: int cbf_count_columns (cbf_handle handle, unsigned int *columns); + +CBFLib documentation: +DESCRIPTION +cbf_count_columns puts the number of columns in the current category +in *columns. +ARGUMENTS +handle CBF handle. columns Pointer to the destination column +count. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")count_columns; + unsigned int count_columns(void){ + unsigned int result; + cbf_failnez(cbf_count_columns(self,&result)); + return result;} + +/* cfunc cbf_count_rows pyfunc count_rows + arg cbf_handle handle arg unsigned int *rows */ + +%feature("autodoc", " +Returns : Integer +*args : + +C prototype: int cbf_count_rows (cbf_handle handle, unsigned int *rows); + +CBFLib documentation: +DESCRIPTION +cbf_count_rows puts the number of rows in the current category in +*rows . +ARGUMENTS +handle CBF handle. rows Pointer to the destination row count. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")count_rows; + unsigned int count_rows(void){ + unsigned int result; + cbf_failnez(cbf_count_rows(self,&result)); + return result;} + +/* cfunc cbf_select_datablock pyfunc select_datablock + arg cbf_handle handle arg unsigned int datablock */ + +%feature("autodoc", " +Returns : +*args : Integer + +C prototype: int cbf_select_datablock (cbf_handle handle, + unsigned int datablock); + +CBFLib documentation: +DESCRIPTION +cbf_select_datablock selects data block number datablock as the +current data block. +The first data block is number 0. +If the data block does not exist, the function returns CBF_NOTFOUND. +ARGUMENTS +handle CBF handle. datablock Number of the data block to +select. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")select_datablock; + void select_datablock(unsigned int arg){ + cbf_failnez(cbf_select_datablock(self,arg));} /* cfunc cbf_select_category pyfunc select_category arg cbf_handle handle arg unsigned int category */ @@ -1654,201 +1356,56 @@ SEE ALSO ")select_category; void select_category(unsigned int arg){ cbf_failnez(cbf_select_category(self,arg));} + +/* cfunc cbf_select_column pyfunc select_column + arg cbf_handle handle arg unsigned int column */ + %feature("autodoc", " -Returns : Float pixel_size -*args : Int element_number,Int axis_number +Returns : +*args : Integer -C prototype: int cbf_get_pixel_size_fs(cbf_handle handle, - unsigned int element_number, int axis_number, - double *psize); +C prototype: int cbf_select_column (cbf_handle handle, unsigned int column); CBFLib documentation: DESCRIPTION -cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to -the double value in millimeters of the axis axis_number of the -detector element element_number. The axis_number is numbered from 1, -starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to -point to the double value in millimeters of the axis axis_number of -the detector element element_number. The axis_number is numbered from -1, starting with the fastest axis. -If a negative axis number is given, the order of axes is reversed, so -that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the -fastest axis for cbf_get_pixel_size_sf. -If the pixel size is not given explcitly in the \"array_element_size -\" category, the function returns CBF_NOTFOUND. +cbf_select_column selects column number column in the current +category as the current column. +The first column is number 0. +The current row is not affected +If the column does not exist, the function returns CBF_NOTFOUND. ARGUMENTS -handle CBF handle. element_number The number of the -detector element counting from 0 by order of appearance in the -\"diffrn_data_frame \" category. axis_number The number of the -axis, starting from 1 for the fastest for cbf_get_pixel_size and -cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. -psize Pointer to the destination pixel size. +handle CBF handle. column Number of the column to select. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_pixel_size_fs; +SEE ALSO +")select_column; + void select_column(unsigned int arg){ + cbf_failnez(cbf_select_column(self,arg));} + +/* cfunc cbf_select_row pyfunc select_row + arg cbf_handle handle arg unsigned int row */ -%apply double *OUTPUT {double *psize} get_pixel_size; - void get_pixel_size_fs(unsigned int element_number, - unsigned int axis_number, double *psize){ - cbf_failnez(cbf_get_pixel_size_fs(self, - element_number, - axis_number, - psize)); - } %feature("autodoc", " -Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2, - Float offset3,Float angle -*args : Float ratio,String axis_id,String frame_id +Returns : +*args : Integer -C prototype: int cbf_get_axis_poise(cbf_handle handle, double ratio, - double * vector1, double * vector2, double * vector3, - double * offset1, double * offset2, double * offset3, - double * angle, const char * axis_id, - const char * frame_id); +C prototype: int cbf_select_row (cbf_handle handle, unsigned int row); CBFLib documentation: DESCRIPTION -cbf_get_axis_poise sets vector1, vector2, vector3 to point to the -components of the axis vector for axis axis_id, offset1, offset2, -offset3 to point to the components of the axis base offset vector for -axis axis_id, and angle to point to the angle of rotation of axis -axis_id after application of the axis settings for frame frame_id, -using ratio, a value between 0 and 1, indicating how far into the -internal motion in the frame to go. If frame_id is the string \". -\", the first frame found is used. If there is more than one frame, -which frame will be found is indeterminate. If frame_id is NULL, the -overall setting for the scan are used, rather than those for any -particular frame. The vector and offset reported are the reference -vector and offset of the axis axis_id transformed by application of -all motions of the axes on which axis_id depends. -cbf_get_goniometer_poise vector1, vector2, vector3 to point to the -components of the axis vector for the goniometer axis, offset1, -offset2, offset3 to point to the components of the axis base offset -vector for the goniometer axis, and angle to point to the angle of -rotation of the goniometer axis after application of all axis -settings in the goniometer deriving the vector, offset and angle from -the resulting matrix. Calculation of the vector is indeterminate if -the angle is zero. -cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point -to the components of the axis vector for axis axis_id, offset1, -offset2, offset3 to point to the components of the axis base offset -vector for axis axis_id unmodified by axis rotations. Any of the -pointers may be specified as NULL. +cbf_select_row selects row number row in the current category as the +current row. +The first row is number 0. +The current column is not affected +If the row does not exist, the function returns CBF_NOTFOUND. ARGUMENTS -handle CBF handle. ratio A number between 0 and 1 -indication how far into the frame to go vector1 Pointer to the -first component of the axis vector vector2 Pointer to the second -component of the axis vector vector3 Pointer to the third -component of the axis vector offset1 Pointer to the first -component of the axis offset offset2 Pointer to the second -component of the axis offset offset3 Pointer to the third -component of the axis offset angle Pointer to the rotation -angle axis_id The specified axis frame_id The specified -frame positioner CBF goniometer +handle CBF handle. row Number of the row to select. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_axis_poise; - - %apply double *OUTPUT {double *vector1, double *vector2, double *vector3, - double *offset1, double *offset2, double *offset3, double *angle}; - - void get_axis_poise(double ratio, - double *vector1, double *vector2, double *vector3, - double *offset1, double *offset2, double *offset3, - double *angle, - const char *axis_id, const char *frame_id){ - cbf_failnez(cbf_get_axis_poise(self, ratio, - vector1, vector2, vector3, - offset1, offset2, offset3, angle, - axis_id, frame_id)); - } - -%feature("autodoc", " -Returns : -*args : String filename,Integer headers - -C prototype: int cbf_read_file (cbf_handle handle, FILE *file, int flags); - -CBFLib documentation: -DESCRIPTION -cbf_read_file reads the CBF or CIF file file into the CBF object -specified by handle, using the CIF 1.0 convention of 80 character -lines. cbf_read_widefile reads the CBF or CIF file file into the CBF -object specified by handle, using the CIF 1.1 convention of 2048 -character lines. A warning is issued to stderr for ascii lines over -the limit. No test is performed on binary sections. -Validation is performed in three ways levels: during the lexical -scan, during the parse, and, if a dictionary was converted, against -the value types, value enumerations, categories and parent-child -relationships specified in the dictionary. -flags controls the interpretation of binary section headers, the -parsing of brackets constructs and the parsing of treble-quoted -strings. -MSG_DIGEST: Instructs CBFlib to check that the digest -of the binary section matches any header digest value. If the digests -do not match, the call will return CBF_FORMAT. This evaluation and -comparison is delayed (a \"lazy \" evaluation) to ensure maximal -processing efficiency. If an immediately evaluation is required, see -MSG_DIGESTNOW, below. MSG_DIGESTNOW: Instructs CBFlib to -check that the digest of the binary section matches any header -digeste value. If the digests do not match, the call will return -CBF_FORMAT. This evaluation and comparison is performed during -initial parsing of the section to ensure timely error reporting at -the expense of processing efficiency. If a more efficient delayed ( -\"lazy \") evaluation is required, see MSG_DIGEST, above. -MSG_DIGESTWARN: Instructs CBFlib to check that the digest -of the binary section matches any header digeste value. If the -digests do not match, a warning message will be sent to stderr, but -processing will attempt to continue. This evaluation and comparison -is first performed during initial parsing of the section to ensure -timely error reporting at the expense of processing efficiency. An -mismatch of the message digest usually indicates a serious error, but -it is sometimes worth continuing processing to try to isolate the -cause of the error. Use this option with caution. MSG_NODIGEST: - Do not check the digest (default). PARSE_BRACKETS: -Accept DDLm bracket-delimited [item,item,...item] or -{item,item,...item} or (item,item,...item) constructs as valid, -stripping non-quoted embedded whitespace and comments. These -constructs may span multiple lines. PARSE_LIBERAL_BRACKETS: Accept -DDLm bracket-delimited [item,item,...item] or {item,item,...item} or -(item,item,...item) constructs as valid, stripping embedded -non-quoted, non-separating whitespace and comments. These constructs -may span multiple lines. In this case, whitespace may be used as an -alternative to the comma. PARSE_TRIPLE_QUOTES: Accept DDLm -triple-quoted \" \" \"item,item,...item \" \" \" or -'''item,item,...item''' constructs as valid, stripping embedded -whitespace and comments. These constructs may span multiple lines. If -this flag is set, then ''' will not be interpreted as a quoted -apoptrophe and \" \" \" will not be interpreted as a quoted double -quote mark and PARSE_NOBRACKETS: Do not accept DDLm -bracket-delimited [item,item,...item] or {item,item,...item} or -(item,item,...item) constructs as valid, stripping non-quoted -embedded whitespace and comments. These constructs may span multiple -lines. PARSE_NOTRIPLE_QUOTES: No not accept DDLm triple-quoted \" -\" \"item,item,...item \" \" \" or '''item,item,...item''' constructs -as valid, stripping embedded whitespace and comments. These -constructs may span multiple lines. If this flag is set, then ''' -will be interpreted as a quoted apostrophe and \" \" \" will be -interpreted as a quoted double quote mark. -CBFlib defers reading binary sections as long as possible. In the -current version of CBFlib, this means that: -1. The file must be a random-access file opened in binary mode (fopen -( , -")read_file; - - void read_file(char* filename, int headers){ - /* CBFlib needs a stream that will remain open - hence DO NOT open from python */ - FILE *stream; - if ( ! ( stream = fopen (filename, "rb")) ){ - cbf_failnez(CBF_FILEOPEN); - } - else{ - cbf_failnez(cbf_read_file(self, stream, headers)); - } - } +SEE ALSO +")select_row; + void select_row(unsigned int arg){ + cbf_failnez(cbf_select_row(self,arg));} /* cfunc cbf_datablock_name pyfunc datablock_name arg cbf_handle handle arg const char **datablockname */ @@ -1878,2738 +1435,3503 @@ SEE ALSO const char* result; cbf_failnez(cbf_datablock_name(self, &result)); return result;} + +/* cfunc cbf_category_name pyfunc category_name + arg cbf_handle handle arg const char **categoryname */ + %feature("autodoc", " Returns : -*args : int compression,int binary_id,(binary) String data,int elsize, - int elements,String byteorder,int dimfast,int dimmid,int dimslow, - int padding +*args : string -C prototype: int cbf_set_realarray_wdims (cbf_handle handle, - unsigned int compression, int binary_id, void *array, - size_t elsize, size_t elements, const char *byteorder, - size_t dimfast, size_t dimmid, size_t dimslow, - size_t padding); +C prototype: int cbf_category_name (cbf_handle handle, + const char **categoryname); CBFLib documentation: DESCRIPTION -cbf_set_integerarray sets the binary value of the item at the current -column and row to an integer array. The array consists of elements -elements of elsize bytes each, starting at array. The elements are -signed if elsigned is non-0 and unsigned otherwise. binary_id is the -binary section identifier. cbf_set_realarray sets the binary value of -the item at the current column and row to an integer array. The array -consists of elements elements of elsize bytes each, starting at -array. binary_id is the binary section identifier. -The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, -cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, -cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants -allow the data header values of byteorder, dimfast, dimmid, dimslow -and padding to be set to the data byte order, the fastest, second -fastest and third fastest array dimensions and the size in byte of -the post data padding to be used. -The array will be compressed using the compression scheme specifed by -compression. Currently, the available schemes are: -CBF_CANONICAL Canonical-code compression (section 3.3.1) -CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple -\"nibble_offset \" compression. CBF_NONE No compression. -NOTE: This scheme is by far the slowest of the four and uses much -more disk space. It is intended for routine use with small arrays -only. With large arrays (like images) it should be used only for -debugging. -The values compressed are limited to 64 bits. If any element in the -array is larger than 64 bits, the value compressed is the nearest -64-bit value. -Currently, the source array must consist of chars, shorts or ints -(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or -floats for cbf_set_realarray. If elsize is not equal to sizeof -(char), sizeof (short) or sizeof (int), the function returns -CBF_ARGUMENT. +cbf_category_name sets *categoryname to point to the name of the +current category of the current data block. +The category name will be valid as long as the category exists. +The name must not be modified by the program in any way. ARGUMENTS -handle CBF handle. compression Compression method to use. -binary_id Integer binary identifier. array Pointer to the -source array. elsize Size in bytes of each source array -element. elsigned Set to non-0 if the source array elements are -signed. elements: The number of elements in the array. +handle CBF handle. categoryname Pointer to the destination +category name pointer. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")set_realarray_wdims; - - /* CBFlib must NOT modify the data string nor the byteorder string - which belongs to the scripting - language we will get and check the length via a typemap */ +")category_name; + const char* category_name(void){ + const char* result; + cbf_failnez(cbf_category_name(self, &result)); + return result;} -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray_wdims; -%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_realarray_wdims; +/* cfunc cbf_column_name pyfunc column_name + arg cbf_handle handle arg const char **columnname */ - void set_realarray_wdims(unsigned int compression, int binary_id, - char *data, int len, int elsize, int elements, - char *bo, int bolen, int dimfast, int dimmid, int dimslow, int padding){ - /* safety check on args */ - size_t els, ele; - void *array; - char byteorder[15]; - if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ - array = data; - els = elsize; - ele = elements; - strncpy(byteorder,bo,bolen<15?bolen:14); - byteorder[bolen<15?bolen:14] = 0; - cbf_failnez(cbf_set_realarray_wdims (self, compression, binary_id, - (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder, - (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding)); - }else{ - cbf_failnez(CBF_ARGUMENT); - } - } %feature("autodoc", " -Returns : pycbf detector object -*args : Integer element_number +Returns : +*args : string -C prototype: int cbf_construct_reference_detector (cbf_handle handle, - cbf_detector *detector, unsigned int element_number); +C prototype: int cbf_column_name (cbf_handle handle, const char **columnname); CBFLib documentation: DESCRIPTION -cbf_construct_detector constructs a detector object for detector -element number element_number using the description in the CBF object -handle and initialises the detector handle *detector. -cbf_construct_reference_detector constructs a detector object for -detector element number element_number using the description in the -CBF object handle and initialises the detector handle *detector using -the reference settings of the axes. cbf_require_reference_detector is -similar, but try to force the creations of missing intermediate -categories needed to construct a detector object. +cbf_column_name sets *columnname to point to the name of the current +column of the current category. +The column name will be valid as long as the column exists. +The name must not be modified by the program in any way. +cbf_set_column_name sets the name of the current column to +newcolumnname ARGUMENTS -handle CBF handle. detector Pointer to the -destination detector handle. element_number The number of the -detector element counting from 0 by order of appearance in the -\"diffrn_data_frame \" category. +handle CBF handle. columnname Pointer to the +destination column name pointer. newcolumnname New column name +pointer. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")construct_reference_detector; +SEE ALSO +")column_name; + const char* column_name(void){ + const char* result; + cbf_failnez(cbf_column_name(self, &result)); + return result;} - cbf_detector construct_reference_detector(unsigned int element_number){ - cbf_detector detector; - cbf_failnez(cbf_construct_reference_detector(self,&detector,element_number)); - return detector; +/* cfunc cbf_row_number pyfunc row_number + arg cbf_handle handle arg unsigned int *row */ + +%feature("autodoc", " +Returns : Integer +*args : + +C prototype: int cbf_row_number (cbf_handle handle, unsigned int *row); + +CBFLib documentation: +DESCRIPTION +cbf_row_number sets *row to the number of the current row of the +current category. +ARGUMENTS +handle CBF handle. row Pointer to the destination row number. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")row_number; + unsigned int row_number(void){ + unsigned int result; + cbf_failnez(cbf_row_number(self,&result)); + return result;} + +/* cfunc cbf_get_value pyfunc get_value + arg cbf_handle handle arg const char **value */ + +%feature("autodoc", " +Returns : +*args : string + +C prototype: int cbf_get_value (cbf_handle handle, const char **value); + +CBFLib documentation: +DESCRIPTION +cbf_get_value sets *value to point to the ASCII value of the item at +the current column and row. cbf_require_value sets *value to point to +the ASCII value of the item at the current column and row, creating +the data item if necessary and initializing it to a copy of +defaultvalue. +If the value is not ASCII, the function returns CBF_BINARY. +The value will be valid as long as the item exists and has not been +set to a new value. +The value must not be modified by the program in any way. +ARGUMENTS +handle CBF handle. value Pointer to the destination +value pointer. defaultvalue Default value character string. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")get_value; + const char* get_value(void){ + const char* result; + cbf_failnez(cbf_get_value(self, &result)); + return result;} +%feature("autodoc", " +Returns : String Value +*args : String defaultvalue + +C prototype: int cbf_require_value (cbf_handle handle, const char **value, + const char *defaultvalue ); + +CBFLib documentation: +DESCRIPTION +cbf_get_value sets *value to point to the ASCII value of the item at +the current column and row. cbf_require_value sets *value to point to +the ASCII value of the item at the current column and row, creating +the data item if necessary and initializing it to a copy of +defaultvalue. +If the value is not ASCII, the function returns CBF_BINARY. +The value will be valid as long as the item exists and has not been +set to a new value. +The value must not be modified by the program in any way. +ARGUMENTS +handle CBF handle. value Pointer to the destination +value pointer. defaultvalue Default value character string. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")require_value; + + + const char* require_value(const char* defaultvalue){ + const char * result; + cbf_failnez(cbf_require_value(self, &result, defaultvalue)); + return result; } + +/* cfunc cbf_set_value pyfunc set_value + arg cbf_handle handle arg const char *value */ + %feature("autodoc", " -Returns : (Binary)String -*args : int element_number,int elsize,int ndimfast,int ndimmid,int ndimslow +Returns : string +*args : -C prototype: int cbf_get_real_3d_image_fs (cbf_handle handle, - unsigned int reserved, unsigned int element_number, - void *array, size_t elsize, size_t ndimfast, - size_t ndimmid, size_t ndimslow); +C prototype: int cbf_set_value (cbf_handle handle, const char *value); CBFLib documentation: DESCRIPTION -cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image -array for element number element_number into an array. The array -consists of ndimslow *ndimfast elements of elsize bytes each, -starting at array. The elements are signed if elsign is non-0 and -unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and -cbf_get_real_image_sf read the image array of IEEE doubles or floats -for element number element_number into an array. A real array is -always signed. cbf_get_3d_image, cbf_get_3d_image_fs and -cbf_get_3d_image_sf read the 3D image array for element number -element_number into an array. The array consists of ndimslow *ndimmid -*ndimfast elements of elsize bytes each, starting at array. The -elements are signed if elsign is non-0 and unsigned otherwise. -cbf_get_real_3d_image, cbf_get_real_3d_image_fs, -cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or -floats for element number element_number into an array. A real array -is always signed. -The _fs calls give the dimensions in a fast-to-slow order. The calls -with no suffix and the calls _sf calls give the dimensions in -slow-to-fast order -The structure of the array as a 1-, 2- or 3-dimensional array should -agree with the structure of the array given in the -ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, -ndimslow should be the array size and ndimfast and, for the 3D calls, -ndimmid, should be set to 1 both in the call and in the imgCIF data -being processed. If the array is 2-dimensional and a 3D call is used, -ndimslow and ndimmid should be the -")get_real_3d_image_fs_as_string; +cbf_set_value sets the item at the current column and row to the +ASCII value value. +ARGUMENTS +handle CBF handle. value ASCII value. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")set_value; + void set_value(const char* arg){ + cbf_failnez(cbf_set_value(self,arg));} -// Ensure we free the local temporary +/* cfunc cbf_get_typeofvalue pyfunc get_typeofvalue + arg cbf_handle handle arg const char **typeofvalue */ + +%feature("autodoc", " +Returns : +*args : string + +C prototype: int cbf_get_typeofvalue (cbf_handle handle, + const char **typeofvalue); + +CBFLib documentation: +DESCRIPTION +cbf_get_value sets *typeofvalue to point an ASCII descriptor of the +value of the item at the current column and row. The strings that may +be returned are: + \"null \" for a null value indicated by a \". \" or a \"? \" +\"bnry \" for a binary value \"word \" for an unquoted string +\"dblq \" for a double-quoted string \"sglq \" for a single-quoted +string \"text \" for a semicolon-quoted string (multiline text +field) \"prns \" for a parenthesis-bracketed string (multiline text +field) \"brcs \" for a brace-bracketed string (multiline text field) + \"bkts \" for a square-bracket-bracketed string (multiline text +field) \"tsqs \" for a treble-single-quote quoted string (multiline +text field) \"tdqs \" for a treble-double-quote quoted string +(multiline text field) +Not all types are valid for all type of CIF files. In partcular the +types \"prns \", \"brcs \", \"bkts \" were introduced with DDLm +and are not valid in DDL1 or DDL2 CIFS. The types \"tsqs \" and +\"tdqs \" are not formally part of the CIF syntax. A field for which +no value has been set sets *typeofvalue to NULL rather than to the +string \"null \". +The typeofvalue must not be modified by the program in any way. +ARGUMENTS +handle CBF handle. typeofvalue Pointer to the destination +type-of-value string pointer. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")get_typeofvalue; + const char* get_typeofvalue(void){ + const char* result; + cbf_failnez(cbf_get_typeofvalue(self, &result)); + return result;} + +/* cfunc cbf_set_typeofvalue pyfunc set_typeofvalue + arg cbf_handle handle arg const char *typeofvalue */ + +%feature("autodoc", " +Returns : string +*args : + +C prototype: int cbf_set_typeofvalue (cbf_handle handle, + const char *typeofvalue); + +CBFLib documentation: +DESCRIPTION +cbf_set_typeofvalue sets the type of the item at the current column +and row to the type specified by the ASCII character string given by +typeofvalue. The strings that may be used are: + \"null \" for a null value indicated by a \". \" or a \"? \" +\"bnry \" for a binary value \"word \" for an unquoted string +\"dblq \" for a double-quoted string \"sglq \" for a single-quoted +string \"text \" for a semicolon-quoted string (multiline text +field) \"prns \" for a parenthesis-bracketed string (multiline text +field) \"brcs \" for a brace-bracketed string (multiline text field) + \"bkts \" for a square-bracket-bracketed string (multiline text +field) \"tsqs \" for a treble-single-quote quoted string (multiline +text field) \"tdqs \" for a treble-double-quote quoted string +(multiline text field) +Not all types may be used for all values. Not all types are valid for +all type of CIF files. In partcular the types \"prns \", \"brcs \", + \"bkts \" were introduced with DDLm and are not valid in DDL1 or +DDL2 CIFS. The types \"tsqs \" and \"tdqs \" are not formally part +of the CIF syntax. No changes may be made to the type of binary +values. You may not set the type of a string that contains a single +quote followed by a blank or a tab or which contains multiple lines +to \"sglq \". You may not set the type of a string that contains a +double quote followed by a blank or a tab or which contains multiple +lines to \"dblq \". +ARGUMENTS +handle CBF handle. typeofvalue ASCII string for desired type +of value. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")set_typeofvalue; + void set_typeofvalue(const char* arg){ + cbf_failnez(cbf_set_typeofvalue(self,arg));} + +/* cfunc cbf_get_integervalue pyfunc get_integervalue + arg cbf_handle handle arg int *number */ + +%feature("autodoc", " +Returns : int +*args : + +C prototype: int cbf_get_integervalue (cbf_handle handle, int *number); + +CBFLib documentation: +DESCRIPTION +cbf_get_integervalue sets *number to the value of the ASCII item at +the current column and row interpreted as a decimal integer. +cbf_require_integervalue sets *number to the value of the ASCII item +at the current column and row interpreted as a decimal integer, +setting it to defaultvalue if necessary. +If the value is not ASCII, the function returns CBF_BINARY. +ARGUMENTS +handle CBF handle. number pointer to the number. +defaultvalue default number value. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")get_integervalue; + int get_integervalue(void){ + int result; + cbf_failnez(cbf_get_integervalue(self,&result)); + return result;} +%feature("autodoc", " +Returns : Int number +*args : Int thedefault + +C prototype: int cbf_require_integervalue (cbf_handle handle, int *number, + int defaultvalue); + +CBFLib documentation: +DESCRIPTION +cbf_get_integervalue sets *number to the value of the ASCII item at +the current column and row interpreted as a decimal integer. +cbf_require_integervalue sets *number to the value of the ASCII item +at the current column and row interpreted as a decimal integer, +setting it to defaultvalue if necessary. +If the value is not ASCII, the function returns CBF_BINARY. +ARGUMENTS +handle CBF handle. number pointer to the number. +defaultvalue default number value. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")require_integervalue; + +%apply int *OUTPUT {int *number} require_integervalue; + + void require_integervalue(int *number, int thedefault){ + + cbf_failnez(cbf_require_integervalue(self,number,thedefault)); + + } + +/* cfunc cbf_set_integervalue pyfunc set_integervalue + arg cbf_handle handle arg int number */ + +%feature("autodoc", " +Returns : int number +*args : + +C prototype: int cbf_set_integervalue (cbf_handle handle, int number); + +CBFLib documentation: +DESCRIPTION +cbf_set_integervalue sets the item at the current column and row to +the integer value number written as a decimal ASCII string. +ARGUMENTS +handle CBF handle. number Integer value. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")set_integervalue; + void set_integervalue(int number){ + cbf_failnez(cbf_set_integervalue(self,number));} + +/* cfunc cbf_get_doublevalue pyfunc get_doublevalue + arg cbf_handle handle arg double *number */ + +%feature("autodoc", " +Returns : double +*args : + +C prototype: int cbf_get_doublevalue (cbf_handle handle, double *number); + +CBFLib documentation: +DESCRIPTION +cbf_get_doublevalue sets *number to the value of the ASCII item at +the current column and row interpreted as a decimal floating-point +number. cbf_require_doublevalue sets *number to the value of the +ASCII item at the current column and row interpreted as a decimal +floating-point number, setting it to defaultvalue if necessary. +If the value is not ASCII, the function returns CBF_BINARY. +ARGUMENTS +handle CBF handle. number Pointer to the destination +number. defaultvalue default number value. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")get_doublevalue; + double get_doublevalue(void){ + double result; + cbf_failnez(cbf_get_doublevalue(self,&result)); + return result;} +%feature("autodoc", " +Returns : Float Number +*args : Float Default + +C prototype: int cbf_require_doublevalue (cbf_handle handle, double *number, + double defaultvalue); + +CBFLib documentation: +DESCRIPTION +cbf_get_doublevalue sets *number to the value of the ASCII item at +the current column and row interpreted as a decimal floating-point +number. cbf_require_doublevalue sets *number to the value of the +ASCII item at the current column and row interpreted as a decimal +floating-point number, setting it to defaultvalue if necessary. +If the value is not ASCII, the function returns CBF_BINARY. +ARGUMENTS +handle CBF handle. number Pointer to the destination +number. defaultvalue default number value. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")require_doublevalue; + +%apply double *OUTPUT {double *number} require_doublevalue; +void require_doublevalue(double *number, double defaultvalue){ + cbf_failnez(cbf_require_doublevalue(self,number,defaultvalue)); +} +%feature("autodoc", " +Returns : +*args : String format,Float number + +C prototype: int cbf_set_doublevalue (cbf_handle handle, const char *format, + double number); + +CBFLib documentation: +DESCRIPTION +cbf_set_doublevalue sets the item at the current column and row to +the floating-point value number written as an ASCII string with the +format specified by format as appropriate for the printf function. +ARGUMENTS +handle CBF handle. format Format for the number. number +Floating-point value. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")set_doublevalue; + + void set_doublevalue(const char *format, double number){ + cbf_failnez(cbf_set_doublevalue(self,format,number));} +%feature("autodoc", " +Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, + int elements,int minelement,int maxelement +*args : + +C prototype: int cbf_get_integerarrayparameters (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + int *elsigned, int *elunsigned, size_t *elements, + int *minelement, int *maxelement); + +CBFLib documentation: +DESCRIPTION +cbf_get_integerarrayparameters sets *compression, *binary_id, +*elsize, *elsigned, *elunsigned, *elements, *minelement and +*maxelement to values read from the binary value of the item at the +current column and row. This provides all the arguments needed for a +subsequent call to cbf_set_integerarray, if a copy of the array is to +be made into another CIF or CBF. cbf_get_realarrayparameters sets +*compression, *binary_id, *elsize, *elements to values read from the +binary value of the item at the current column and row. This provides +all the arguments needed for a subsequent call to cbf_set_realarray, +if a copy of the arry is to be made into another CIF or CBF. +The variants cbf_get_integerarrayparameters_wdims, +cbf_get_integerarrayparameters_wdims_fs, +cbf_get_integerarrayparameters_wdims_sf, +cbf_get_realarrayparameters_wdims, +cbf_get_realarrayparameters_wdims_fs, +cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, +*dimmid, *dimslow, and *padding as well, providing the additional +parameters needed for a subsequent call to cbf_set_integerarray_wdims +or cbf_set_realarray_wdims. +The value returned in *byteorder is a pointer either to the string +\"little_endian \" or to the string \"big_endian \". This should be +the byte order of the data, not necessarily of the host machine. No +attempt should be made to modify this string. At this time only +\"little_endian \" will be returned. +The values returned in *dimfast, *dimmid and *dimslow are the sizes +of the fastest changing, second fastest changing and third fastest +changing dimensions of the array, if specified, or zero, if not +specified. +The value returned in *padding is the size of the post-data padding, +if any and if specified in the data header. The value is given as a +count of octets. +If the value is not binary, the function returns CBF_ASCII. +ARGUMENTS +handle CBF handle. compression Compression method used. +elsize Size in bytes of each array element. binary_id +Pointer to the destination integer binary identifier. elsigned +Pointer to an integer. Set to 1 if the elements can be read as signed +integers. elunsigned Pointer to an integer. Set to 1 if the +elements can be read as unsigned integers. elements Pointer to +the destination number of elements. minelement Pointer to the +destination smallest element. maxelement Pointer to the +destination largest element. byteorder Pointer to the destination +byte order. dimfast Pointer to the destination fastest +dimension. dimmid Pointer to the destination second fastest +dimension. dimslow Pointer to the destination third fastest +dimension. padding Pointer to the destination padding size. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")get_integerarrayparameters; + +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement} + get_integerarrayparameters; + + void get_integerarrayparameters(int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement){ + unsigned int comp; + size_t elsiz, elem; + cbf_failnez(cbf_get_integerarrayparameters(self, + &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, + minelement, maxelement)); + *compression = comp; /* FIXME - does this convert in C? */ + *elsize = elsiz; + *elements = elem; + } +%feature("autodoc", " +Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, + int elements,int minelement,int maxelement,char **bo,int *bolen, + int dimfast,int dimmid,int dimslow,int padding +*args : + +C prototype: int cbf_get_integerarrayparameters_wdims (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + int *elsigned, int *elunsigned, size_t *elements, + int *minelement, int *maxelement, const char **byteorder, + size_t *dimfast, size_t *dimmid, size_t *dimslow, + size_t *padding); + +CBFLib documentation: +DESCRIPTION +cbf_get_integerarrayparameters sets *compression, *binary_id, +*elsize, *elsigned, *elunsigned, *elements, *minelement and +*maxelement to values read from the binary value of the item at the +current column and row. This provides all the arguments needed for a +subsequent call to cbf_set_integerarray, if a copy of the array is to +be made into another CIF or CBF. cbf_get_realarrayparameters sets +*compression, *binary_id, *elsize, *elements to values read from the +binary value of the item at the current column and row. This provides +all the arguments needed for a subsequent call to cbf_set_realarray, +if a copy of the arry is to be made into another CIF or CBF. +The variants cbf_get_integerarrayparameters_wdims, +cbf_get_integerarrayparameters_wdims_fs, +cbf_get_integerarrayparameters_wdims_sf, +cbf_get_realarrayparameters_wdims, +cbf_get_realarrayparameters_wdims_fs, +cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, +*dimmid, *dimslow, and *padding as well, providing the additional +parameters needed for a subsequent call to cbf_set_integerarray_wdims +or cbf_set_realarray_wdims. +The value returned in *byteorder is a pointer either to the string +\"little_endian \" or to the string \"big_endian \". This should be +the byte order of the data, not necessarily of the host machine. No +attempt should be made to modify this string. At this time only +\"little_endian \" will be returned. +The values returned in *dimfast, *dimmid and *dimslow are the sizes +of the fastest changing, second fastest changing and third fastest +changing dimensions of the array, if specified, or zero, if not +specified. +The value returned in *padding is the size of the post-data padding, +if any and if specified in the data header. The value is given as a +count of octets. +If the value is not binary, the function returns CBF_ASCII. +ARGUMENTS +handle CBF handle. compression Compression method used. +elsize Size in bytes of each array element. binary_id +Pointer to the destination integer binary identifier. elsigned +Pointer to an integer. Set to 1 if the elements can be read as signed +integers. elunsigned Pointer to an integer. Set to 1 if the +elements can be read as unsigned integers. elements Pointer to +the destination number of elements. minelement Pointer to the +destination smallest element. maxelement Pointer to the +destination largest element. byteorder Pointer to the destination +byte order. dimfast Pointer to the destination fastest +dimension. dimmid Pointer to the destination second fastest +dimension. dimslow Pointer to the destination third fastest +dimension. padding Pointer to the destination padding size. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")get_integerarrayparameters_wdims; + +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement, + int *dimfast, int *dimmid, int *dimslow, int *padding} + get_integerarrayparameters_wdims; + + void get_integerarrayparameters_wdims(int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement, + char **bo, int *bolen, + int *dimfast, int *dimmid, int *dimslow, int *padding + ){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + cbf_failnez(cbf_get_integerarrayparameters_wdims(self, + &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, + minelement, maxelement, &byteorder,&df,&dm,&ds,&pd )); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +%feature("autodoc", " +Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, + int elements,int minelement,int maxelement,char **bo,int *bolen, + int dimfast,int dimmid,int dimslow,int padding +*args : + +C prototype: int cbf_get_integerarrayparameters_wdims_fs (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + int *elsigned, int *elunsigned, size_t *elements, + int *minelement, int *maxelement, const char **byteorder, + size_t *dimfast, size_t *dimmid, size_t *dimslow, + size_t *padding); + +CBFLib documentation: +DESCRIPTION +cbf_get_integerarrayparameters sets *compression, *binary_id, +*elsize, *elsigned, *elunsigned, *elements, *minelement and +*maxelement to values read from the binary value of the item at the +current column and row. This provides all the arguments needed for a +subsequent call to cbf_set_integerarray, if a copy of the array is to +be made into another CIF or CBF. cbf_get_realarrayparameters sets +*compression, *binary_id, *elsize, *elements to values read from the +binary value of the item at the current column and row. This provides +all the arguments needed for a subsequent call to cbf_set_realarray, +if a copy of the arry is to be made into another CIF or CBF. +The variants cbf_get_integerarrayparameters_wdims, +cbf_get_integerarrayparameters_wdims_fs, +cbf_get_integerarrayparameters_wdims_sf, +cbf_get_realarrayparameters_wdims, +cbf_get_realarrayparameters_wdims_fs, +cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, +*dimmid, *dimslow, and *padding as well, providing the additional +parameters needed for a subsequent call to cbf_set_integerarray_wdims +or cbf_set_realarray_wdims. +The value returned in *byteorder is a pointer either to the string +\"little_endian \" or to the string \"big_endian \". This should be +the byte order of the data, not necessarily of the host machine. No +attempt should be made to modify this string. At this time only +\"little_endian \" will be returned. +The values returned in *dimfast, *dimmid and *dimslow are the sizes +of the fastest changing, second fastest changing and third fastest +changing dimensions of the array, if specified, or zero, if not +specified. +The value returned in *padding is the size of the post-data padding, +if any and if specified in the data header. The value is given as a +count of octets. +If the value is not binary, the function returns CBF_ASCII. +ARGUMENTS +handle CBF handle. compression Compression method used. +elsize Size in bytes of each array element. binary_id +Pointer to the destination integer binary identifier. elsigned +Pointer to an integer. Set to 1 if the elements can be read as signed +integers. elunsigned Pointer to an integer. Set to 1 if the +elements can be read as unsigned integers. elements Pointer to +the destination number of elements. minelement Pointer to the +destination smallest element. maxelement Pointer to the +destination largest element. byteorder Pointer to the destination +byte order. dimfast Pointer to the destination fastest +dimension. dimmid Pointer to the destination second fastest +dimension. dimslow Pointer to the destination third fastest +dimension. padding Pointer to the destination padding size. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")get_integerarrayparameters_wdims_fs; + +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement, + int *dimfast, int *dimmid, int *dimslow, int *padding} + get_integerarrayparameters_wdims_fs; + + void get_integerarrayparameters_wdims_fs(int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement, + char **bo, int *bolen, + int *dimfast, int *dimmid, int *dimslow, int *padding + ){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + cbf_failnez(cbf_get_integerarrayparameters_wdims_fs(self, + &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, + minelement, maxelement, &byteorder,&df,&dm,&ds,&pd )); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +%feature("autodoc", " +Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, + int elements,int minelement,int maxelement,char **bo,int *bolen, + int dimslow,int dimmid,int dimfast,int padding +*args : + +C prototype: int cbf_get_integerarrayparameters_wdims_sf (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + int *elsigned, int *elunsigned, size_t *elements, + int *minelement, int *maxelement, const char **byteorder, + size_t *dimslow, size_t *dimmid, size_t *dimfast, + size_t *padding); + +CBFLib documentation: +DESCRIPTION +cbf_get_integerarrayparameters sets *compression, *binary_id, +*elsize, *elsigned, *elunsigned, *elements, *minelement and +*maxelement to values read from the binary value of the item at the +current column and row. This provides all the arguments needed for a +subsequent call to cbf_set_integerarray, if a copy of the array is to +be made into another CIF or CBF. cbf_get_realarrayparameters sets +*compression, *binary_id, *elsize, *elements to values read from the +binary value of the item at the current column and row. This provides +all the arguments needed for a subsequent call to cbf_set_realarray, +if a copy of the arry is to be made into another CIF or CBF. +The variants cbf_get_integerarrayparameters_wdims, +cbf_get_integerarrayparameters_wdims_fs, +cbf_get_integerarrayparameters_wdims_sf, +cbf_get_realarrayparameters_wdims, +cbf_get_realarrayparameters_wdims_fs, +cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, +*dimmid, *dimslow, and *padding as well, providing the additional +parameters needed for a subsequent call to cbf_set_integerarray_wdims +or cbf_set_realarray_wdims. +The value returned in *byteorder is a pointer either to the string +\"little_endian \" or to the string \"big_endian \". This should be +the byte order of the data, not necessarily of the host machine. No +attempt should be made to modify this string. At this time only +\"little_endian \" will be returned. +The values returned in *dimfast, *dimmid and *dimslow are the sizes +of the fastest changing, second fastest changing and third fastest +changing dimensions of the array, if specified, or zero, if not +specified. +The value returned in *padding is the size of the post-data padding, +if any and if specified in the data header. The value is given as a +count of octets. +If the value is not binary, the function returns CBF_ASCII. +ARGUMENTS +handle CBF handle. compression Compression method used. +elsize Size in bytes of each array element. binary_id +Pointer to the destination integer binary identifier. elsigned +Pointer to an integer. Set to 1 if the elements can be read as signed +integers. elunsigned Pointer to an integer. Set to 1 if the +elements can be read as unsigned integers. elements Pointer to +the destination number of elements. minelement Pointer to the +destination smallest element. maxelement Pointer to the +destination largest element. byteorder Pointer to the destination +byte order. dimfast Pointer to the destination fastest +dimension. dimmid Pointer to the destination second fastest +dimension. dimslow Pointer to the destination third fastest +dimension. padding Pointer to the destination padding size. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")get_integerarrayparameters_wdims_sf; + +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement, + int *dimslow, int *dimmid, int *dimfast, int *padding} + get_integerarrayparameters_wdims_sf; + + void get_integerarrayparameters_wdims_sf(int *compression,int *binary_id, + int *elsize, int *elsigned, int *elunsigned, + int *elements, int *minelement, int *maxelement, + char **bo, int *bolen, + int *dimslow, int *dimmid, int *dimfast, int *padding + ){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + cbf_failnez(cbf_get_integerarrayparameters_wdims_sf(self, + &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, + minelement, maxelement, &byteorder,&ds,&dm,&df,&pd )); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +%feature("autodoc", " +Returns : int compression,int binary_id,int elsize,int elements +*args : -%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) - get_real_3d_image_fs_as_string; +C prototype: int cbf_get_realarrayparameters (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + size_t *elements); -// Get the length correct +CBFLib documentation: +DESCRIPTION +cbf_get_integerarrayparameters sets *compression, *binary_id, +*elsize, *elsigned, *elunsigned, *elements, *minelement and +*maxelement to values read from the binary value of the item at the +current column and row. This provides all the arguments needed for a +subsequent call to cbf_set_integerarray, if a copy of the array is to +be made into another CIF or CBF. cbf_get_realarrayparameters sets +*compression, *binary_id, *elsize, *elements to values read from the +binary value of the item at the current column and row. This provides +all the arguments needed for a subsequent call to cbf_set_realarray, +if a copy of the arry is to be made into another CIF or CBF. +The variants cbf_get_integerarrayparameters_wdims, +cbf_get_integerarrayparameters_wdims_fs, +cbf_get_integerarrayparameters_wdims_sf, +cbf_get_realarrayparameters_wdims, +cbf_get_realarrayparameters_wdims_fs, +cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, +*dimmid, *dimslow, and *padding as well, providing the additional +parameters needed for a subsequent call to cbf_set_integerarray_wdims +or cbf_set_realarray_wdims. +The value returned in *byteorder is a pointer either to the string +\"little_endian \" or to the string \"big_endian \". This should be +the byte order of the data, not necessarily of the host machine. No +attempt should be made to modify this string. At this time only +\"little_endian \" will be returned. +The values returned in *dimfast, *dimmid and *dimslow are the sizes +of the fastest changing, second fastest changing and third fastest +changing dimensions of the array, if specified, or zero, if not +specified. +The value returned in *padding is the size of the post-data padding, +if any and if specified in the data header. The value is given as a +count of octets. +If the value is not binary, the function returns CBF_ASCII. +ARGUMENTS +handle CBF handle. compression Compression method used. +elsize Size in bytes of each array element. binary_id +Pointer to the destination integer binary identifier. elsigned +Pointer to an integer. Set to 1 if the elements can be read as signed +integers. elunsigned Pointer to an integer. Set to 1 if the +elements can be read as unsigned integers. elements Pointer to +the destination number of elements. minelement Pointer to the +destination smallest element. maxelement Pointer to the +destination largest element. byteorder Pointer to the destination +byte order. dimfast Pointer to the destination fastest +dimension. dimmid Pointer to the destination second fastest +dimension. dimslow Pointer to the destination third fastest +dimension. padding Pointer to the destination padding size. +RETURN VALUE +Returns an error code on failure or 0 for success. +SEE ALSO +")get_realarrayparameters; - void get_real_3d_image_fs_as_string(int element_number, char **s, int *slen, - int elsize, int ndimfast, int ndimmid, int ndimslow){ - void *array; - int reserved = 0; - *slen = 0; /* Initialise in case of problems */ - if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { - cbf_failnez (cbf_get_real_3d_image_fs(self, - reserved, (unsigned int)element_number, - (void *)array, (size_t)elsize, - (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow)); - }else{ - cbf_failnez(CBF_ALLOC); - } - *slen = elsize*ndimfast*ndimmid*ndimslow; - *s = (char *) array; - } +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, int *elements} get_realarrayparameters; -/* cfunc cbf_rewind_row pyfunc rewind_row - arg cbf_handle handle */ + void get_realarrayparameters(int *compression,int *binary_id, + int *elsize, int *elements){ + unsigned int comp; + size_t elsiz, elem; + cbf_failnez(cbf_get_realarrayparameters(self, + &comp ,binary_id, &elsiz, &elem )); + *compression = comp; /* FIXME - does this convert in C? */ + *elsize = elsiz; + *elements = elem; + } %feature("autodoc", " -Returns : +Returns : int compression,int binary_id,int elsize,int elements,char **bo, + int *bolen,int dimfast,int dimmid,int dimslow,int padding *args : -C prototype: int cbf_rewind_row (cbf_handle handle); +C prototype: int cbf_get_realarrayparameters_wdims (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + size_t *elements, const char **byteorder, size_t *dimfast, + size_t *dimmid, size_t *dimslow, size_t *padding); CBFLib documentation: DESCRIPTION -cbf_rewind_row makes the first row in the current category the -current row. -If there are no rows, the function returns CBF_NOTFOUND. -The current column is not affected. +cbf_get_integerarrayparameters sets *compression, *binary_id, +*elsize, *elsigned, *elunsigned, *elements, *minelement and +*maxelement to values read from the binary value of the item at the +current column and row. This provides all the arguments needed for a +subsequent call to cbf_set_integerarray, if a copy of the array is to +be made into another CIF or CBF. cbf_get_realarrayparameters sets +*compression, *binary_id, *elsize, *elements to values read from the +binary value of the item at the current column and row. This provides +all the arguments needed for a subsequent call to cbf_set_realarray, +if a copy of the arry is to be made into another CIF or CBF. +The variants cbf_get_integerarrayparameters_wdims, +cbf_get_integerarrayparameters_wdims_fs, +cbf_get_integerarrayparameters_wdims_sf, +cbf_get_realarrayparameters_wdims, +cbf_get_realarrayparameters_wdims_fs, +cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, +*dimmid, *dimslow, and *padding as well, providing the additional +parameters needed for a subsequent call to cbf_set_integerarray_wdims +or cbf_set_realarray_wdims. +The value returned in *byteorder is a pointer either to the string +\"little_endian \" or to the string \"big_endian \". This should be +the byte order of the data, not necessarily of the host machine. No +attempt should be made to modify this string. At this time only +\"little_endian \" will be returned. +The values returned in *dimfast, *dimmid and *dimslow are the sizes +of the fastest changing, second fastest changing and third fastest +changing dimensions of the array, if specified, or zero, if not +specified. +The value returned in *padding is the size of the post-data padding, +if any and if specified in the data header. The value is given as a +count of octets. +If the value is not binary, the function returns CBF_ASCII. ARGUMENTS -handle CBF handle. +handle CBF handle. compression Compression method used. +elsize Size in bytes of each array element. binary_id +Pointer to the destination integer binary identifier. elsigned +Pointer to an integer. Set to 1 if the elements can be read as signed +integers. elunsigned Pointer to an integer. Set to 1 if the +elements can be read as unsigned integers. elements Pointer to +the destination number of elements. minelement Pointer to the +destination smallest element. maxelement Pointer to the +destination largest element. byteorder Pointer to the destination +byte order. dimfast Pointer to the destination fastest +dimension. dimmid Pointer to the destination second fastest +dimension. dimslow Pointer to the destination third fastest +dimension. padding Pointer to the destination padding size. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")rewind_row; - void rewind_row(void){ - cbf_failnez(cbf_rewind_row(self));} +")get_realarrayparameters_wdims; + +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, + int *elements, + int *dimslow, int *dimmid, int *dimfast, int *padding} + get_realarrayparameters_wdims; + + void get_realarrayparameters_wdims(int *compression,int *binary_id, + int *elsize, + int *elements, + char **bo, int *bolen, + int *dimfast, int *dimmid, int *dimslow, int *padding + ){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + cbf_failnez(cbf_get_realarrayparameters_wdims(self, + &comp,binary_id, &elsiz, &elem, + &byteorder,&df,&dm,&ds,&pd )); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } %feature("autodoc", " -Returns : Float start,Float increment -*args : String axis_id +Returns : int compression,int binary_id,int elsize,int elements,char **bo, + int *bolen,int dimfast,int dimmid,int dimslow,int padding +*args : -C prototype: int cbf_get_axis_setting (cbf_handle handle, - unsigned int reserved, const char *axis_id, double *start, - double *increment); +C prototype: int cbf_get_realarrayparameters_wdims_fs (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + size_t *elements, const char **byteorder, size_t *dimfast, + size_t *dimmid, size_t *dimslow, size_t *padding); CBFLib documentation: DESCRIPTION -cbf_count_axis_ancestors sets ancestors to the number of ancestors of -axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor -axis of index ancestor_index of axis axis_id, starting with axis_id -for ancestor_index 0. -cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of -axis_id or to \". \" if there is no such ancestor. -cbf_get_axis_equipment sets *equipment to the equipment of axis_id or -to \". \" if there is no such equipment. -cbf_get_axis_equipment_component sets *equipment_component to the -equipment_component of axis_id or to \". \" if there is no such -equipment_component. -cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the -components of the ofset of axis_id. -cbf_get_axis_rotation sets rotation to the rotation of axis_id or to -0 if there is no such rotation. cbf_get_axis_rotation_axis sets -*rotation_axis to the rotation_axis of axis_id or to \". \" if there -is no such rotation_axis. -cbf_get_axis_setting sets *start and *increment to the corresponding -values of the axis axis_id. Any of the destination pointers may be -NULL. -cbf_get_axis_type sets axis_type to the type of axis_id. -cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the -components of the vector of axis_id. -The parameter reserved is presently unused and should be set to 0. -ARGUMENTS -handle CBF handle. reserved Unused. Any -value other than 0 is invalid. axis_id Axis id. -ancestor_index Integer index of the desired ancestor, starting -with 0 for the current axis_id. ancestor Pointer to -destination ancestor name pointer. depends_on Pointer to -destination depends_on name pointer. equipment Pointer to -destination equipment name pointer. equipment_component Pointer to -destination equipment_component name pointer. offset1 -Pointer to destination first offset component value. offset2 - Pointer to destination second offset component value. offset3 - Pointer to destination third offset component value. -rotation Pointer to destination rotation value. -rotation_axis Pointer to destination rotation_axisn name -pointer. start Pointer to the destination start -value. increment Pointer to the destination increment -value. type Pointer to destination axis type of type -. vector1 Pointer to destination first vector component -value. vector2 Pointer to destination second vector -component value. vector3 Pointer to destination third -vector component value. +cbf_get_integerarrayparameters sets *compression, *binary_id, +*elsize, *elsigned, *elunsigned, *elements, *minelement and +*maxelement to values read from the binary value of the item at the +current column and row. This provides all the arguments needed for a +subsequent call to cbf_set_integerarray, if a copy of the array is to +be made into another CIF or CBF. cbf_get_realarrayparameters sets +*compression, *binary_id, *elsize, *elements to values read from the +binary value of the item at the current column and row. This provides +all the arguments needed for a subsequent call to cbf_set_realarray, +if a copy of the arry is to be made into another CIF or CBF. +The variants cbf_get_integerarrayparameters_wdims, +cbf_get_integerarrayparameters_wdims_fs, +cbf_get_integerarrayparameters_wdims_sf, +cbf_get_realarrayparameters_wdims, +cbf_get_realarrayparameters_wdims_fs, +cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, +*dimmid, *dimslow, and *padding as well, providing the additional +parameters needed for a subsequent call to cbf_set_integerarray_wdims +or cbf_set_realarray_wdims. +The value returned in *byteorder is a pointer either to the string +\"little_endian \" or to the string \"big_endian \". This should be +the byte order of the data, not necessarily of the host machine. No +attempt should be made to modify this string. At this time only +\"little_endian \" will be returned. +The values returned in *dimfast, *dimmid and *dimslow are the sizes +of the fastest changing, second fastest changing and third fastest +changing dimensions of the array, if specified, or zero, if not +specified. +The value returned in *padding is the size of the post-data padding, +if any and if specified in the data header. The value is given as a +count of octets. +If the value is not binary, the function returns CBF_ASCII. +ARGUMENTS +handle CBF handle. compression Compression method used. +elsize Size in bytes of each array element. binary_id +Pointer to the destination integer binary identifier. elsigned +Pointer to an integer. Set to 1 if the elements can be read as signed +integers. elunsigned Pointer to an integer. Set to 1 if the +elements can be read as unsigned integers. elements Pointer to +the destination number of elements. minelement Pointer to the +destination smallest element. maxelement Pointer to the +destination largest element. byteorder Pointer to the destination +byte order. dimfast Pointer to the destination fastest +dimension. dimmid Pointer to the destination second fastest +dimension. dimslow Pointer to the destination third fastest +dimension. padding Pointer to the destination padding size. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_axis_setting; - -%apply double *OUTPUT {double *start, double *increment} get_axis_setting; - void get_axis_setting(const char *axis_id, - double *start, double *increment){ - unsigned int reserved; - reserved = 0; - cbf_failnez(cbf_get_axis_setting(self,reserved,axis_id, - start,increment)); - } +SEE ALSO +")get_realarrayparameters_wdims_fs; -/* cfunc cbf_require_column pyfunc require_column - arg cbf_handle handle arg const char *columnname */ +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, + int *elements, + int *dimslow, int *dimmid, int *dimfast, int *padding} + get_realarrayparameters_wdims_fs; + void get_realarrayparameters_wdims_fs(int *compression,int *binary_id, + int *elsize, + int *elements, + char **bo, int *bolen, + int *dimfast, int *dimmid, int *dimslow, int *padding + ){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + cbf_failnez(cbf_get_realarrayparameters_wdims_fs(self, + &comp,binary_id, &elsiz, &elem, + &byteorder,&df,&dm,&ds,&pd )); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } %feature("autodoc", " -Returns : string +Returns : int compression,int binary_id,int elsize,int elements,char **bo, + int *bolen,int dimslow,int dimmid,int dimfast,int padding *args : -C prototype: int cbf_require_column (cbf_handle handle, - const char *columnname); +C prototype: int cbf_get_realarrayparameters_wdims_sf (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + size_t *elements, const char **byteorder, size_t *dimslow, + size_t *dimmid, size_t *dimfast, size_t *padding); CBFLib documentation: DESCRIPTION -cbf_require_column makes the columns in the current category with -name columnname the current column, if it exists, or creates it if it -does not. -The comparison is case-insensitive. -The current row is not affected. +cbf_get_integerarrayparameters sets *compression, *binary_id, +*elsize, *elsigned, *elunsigned, *elements, *minelement and +*maxelement to values read from the binary value of the item at the +current column and row. This provides all the arguments needed for a +subsequent call to cbf_set_integerarray, if a copy of the array is to +be made into another CIF or CBF. cbf_get_realarrayparameters sets +*compression, *binary_id, *elsize, *elements to values read from the +binary value of the item at the current column and row. This provides +all the arguments needed for a subsequent call to cbf_set_realarray, +if a copy of the arry is to be made into another CIF or CBF. +The variants cbf_get_integerarrayparameters_wdims, +cbf_get_integerarrayparameters_wdims_fs, +cbf_get_integerarrayparameters_wdims_sf, +cbf_get_realarrayparameters_wdims, +cbf_get_realarrayparameters_wdims_fs, +cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, +*dimmid, *dimslow, and *padding as well, providing the additional +parameters needed for a subsequent call to cbf_set_integerarray_wdims +or cbf_set_realarray_wdims. +The value returned in *byteorder is a pointer either to the string +\"little_endian \" or to the string \"big_endian \". This should be +the byte order of the data, not necessarily of the host machine. No +attempt should be made to modify this string. At this time only +\"little_endian \" will be returned. +The values returned in *dimfast, *dimmid and *dimslow are the sizes +of the fastest changing, second fastest changing and third fastest +changing dimensions of the array, if specified, or zero, if not +specified. +The value returned in *padding is the size of the post-data padding, +if any and if specified in the data header. The value is given as a +count of octets. +If the value is not binary, the function returns CBF_ASCII. ARGUMENTS -handle CBF handle. columnname The name of column to find. +handle CBF handle. compression Compression method used. +elsize Size in bytes of each array element. binary_id +Pointer to the destination integer binary identifier. elsigned +Pointer to an integer. Set to 1 if the elements can be read as signed +integers. elunsigned Pointer to an integer. Set to 1 if the +elements can be read as unsigned integers. elements Pointer to +the destination number of elements. minelement Pointer to the +destination smallest element. maxelement Pointer to the +destination largest element. byteorder Pointer to the destination +byte order. dimfast Pointer to the destination fastest +dimension. dimmid Pointer to the destination second fastest +dimension. dimslow Pointer to the destination third fastest +dimension. padding Pointer to the destination padding size. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")require_column; - void require_column(const char* arg){ - cbf_failnez(cbf_require_column(self,arg));} +")get_realarrayparameters_wdims_sf; + +%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); +%apply int *OUTPUT {int *compression,int *binary_id, + int *elsize, + int *elements, + int *dimslow, int *dimmid, int *dimfast, int *padding} + get_realarrayparameters_wdims_sf; + + void get_realarrayparameters_wdims_sf(int *compression,int *binary_id, + int *elsize, + int *elements, + char **bo, int *bolen, + int *dimslow, int *dimmid, int *dimfast, int *padding + ){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + cbf_failnez(cbf_get_realarrayparameters_wdims_sf(self, + &comp,binary_id, &elsiz, &elem, + &byteorder,&ds,&dm,&df,&pd )); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } %feature("autodoc", " -Returns : Float time,Integer timezone +Returns : (Binary)String *args : -C prototype: int cbf_get_timestamp (cbf_handle handle, unsigned int reserved, - double *time, int *timezone); +C prototype: int cbf_get_integerarray (cbf_handle handle, int *binary_id, + void *array, size_t elsize, int elsigned, size_t elements, + size_t *elements_read); CBFLib documentation: DESCRIPTION -cbf_get_timestamp sets *time to the collection timestamp in seconds -since January 1 1970. *timezone is set to timezone difference from -UTC in minutes. The parameter reserved is presently unused and should -be set to 0. -Either of the destination pointers may be NULL. +cbf_get_integerarray reads the binary value of the item at the +current column and row into an integer array. The array consists of +elements elements of elsize bytes each, starting at array. The +elements are signed if elsigned is non-0 and unsigned otherwise. +*binary_id is set to the binary section identifier and *elements_read +to the number of elements actually read. cbf_get_realarray reads the +binary value of the item at the current column and row into a real +array. The array consists of elements elements of elsize bytes each, +starting at array. *binary_id is set to the binary section identifier +and *elements_read to the number of elements actually read. +If any element in the integer binary data cant fit into the +destination element, the destination is set the nearest possible +value. +If the value is not binary, the function returns CBF_ASCII. +If the requested number of elements cant be read, the function will +read as many as it can and then return CBF_ENDOFDATA. +Currently, the destination array must consist of chars, shorts or +ints (signed or unsigned). If elsize is not equal to sizeof (char), +sizeof (short) or sizeof (int), for cbf_get_integerarray, or +sizeof(double) or sizeof(float), for cbf_get_realarray the function +returns CBF_ARGUMENT. +An additional restriction in the current version of CBFlib is that +values too large to fit in an int are not correctly decompressed. As +an example, if the machine with 32-bit ints is reading an array +containing a value outside the range 0 .. 2^32-1 (unsigned) or -2^31 +.. 2^31-1 (signed), the array will not be correctly decompressed. +This restriction will be removed in a future release. For +cbf_get_realarray, only IEEE format is supported. No conversion to +other floating point formats is done at this time. ARGUMENTS -handle CBF handle. reserved Unused. Any value other than 0 is -invalid. time Pointer to the destination collection timestamp. -timezone Pointer to the destination timezone difference. +handle CBF handle. binary_id Pointer to the +destination integer binary identifier. array Pointer to the +destination array. elsize Size in bytes of each destination +array element. elsigned Set to non-0 if the destination array +elements are signed. elements The number of elements to read. +elements_read Pointer to the destination number of elements +actually read. RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_timestamp; +Returns an error code on failure or 0 for success. SEE ALSO +")get_integerarray_as_string; -%apply double *OUTPUT {double *time} get_timestamp; -%apply int *OUTPUT {int *timezone} get_timestamp; - void get_timestamp(double *time, int *timezone){ - unsigned int reserved; - reserved = 0; - cbf_failnez(cbf_get_timestamp(self,reserved,time,timezone)); - } +// Ensure we free the local temporary -/* cfunc cbf_find_nextrow pyfunc find_nextrow - arg cbf_handle handle arg const char *value */ +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_integerarray_as_string; +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} +// Get the length correct + + void get_integerarray_as_string(char **s, int *slen){ + int binary_id, elsigned, elunsigned; + size_t elements, elements_read, elsize; + int minelement, maxelement; + unsigned int compression; + void * array; + *slen = 0; /* Initialise in case of problems */ + cbf_failnez(cbf_get_integerarrayparameters(self, &compression, + &binary_id, &elsize, &elsigned, &elunsigned, + &elements, &minelement, &maxelement)); + if ((array=malloc(elsize*elements))) { + /* cbf_failnez (cbf_select_column(cbf,colnum)) */ + cbf_failnez (cbf_get_integerarray(self, &binary_id, + (void *)array, elsize, elsigned, + elements, &elements_read)); + + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*elements; + *s = (char *) array; + } %feature("autodoc", " -Returns : string +Returns : (Binary)String *args : -C prototype: int cbf_find_nextrow (cbf_handle handle, const char *value); +C prototype: int cbf_get_realarray (cbf_handle handle, int *binary_id, + void *array, size_t elsize, size_t elements, + size_t *elements_read); CBFLib documentation: DESCRIPTION -cbf_find_nextrow makes the makes the next row in the current column -with value value the current row. The search starts from the row -following the last row found with cbf_find_row or cbf_find_nextrow, -or from the current row if the current row was defined using any -other function. -The comparison is case-sensitive. -If no more matching rows exist, the function returns CBF_NOTFOUND. -The current column is not affected. +cbf_get_integerarray reads the binary value of the item at the +current column and row into an integer array. The array consists of +elements elements of elsize bytes each, starting at array. The +elements are signed if elsigned is non-0 and unsigned otherwise. +*binary_id is set to the binary section identifier and *elements_read +to the number of elements actually read. cbf_get_realarray reads the +binary value of the item at the current column and row into a real +array. The array consists of elements elements of elsize bytes each, +starting at array. *binary_id is set to the binary section identifier +and *elements_read to the number of elements actually read. +If any element in the integer binary data cant fit into the +destination element, the destination is set the nearest possible +value. +If the value is not binary, the function returns CBF_ASCII. +If the requested number of elements cant be read, the function will +read as many as it can and then return CBF_ENDOFDATA. +Currently, the destination array must consist of chars, shorts or +ints (signed or unsigned). If elsize is not equal to sizeof (char), +sizeof (short) or sizeof (int), for cbf_get_integerarray, or +sizeof(double) or sizeof(float), for cbf_get_realarray the function +returns CBF_ARGUMENT. +An additional restriction in the current version of CBFlib is that +values too large to fit in an int are not correctly decompressed. As +an example, if the machine with 32-bit ints is reading an array +containing a value outside the range 0 .. 2^32-1 (unsigned) or -2^31 +.. 2^31-1 (signed), the array will not be correctly decompressed. +This restriction will be removed in a future release. For +cbf_get_realarray, only IEEE format is supported. No conversion to +other floating point formats is done at this time. ARGUMENTS -handle CBF handle. value the value to search for. +handle CBF handle. binary_id Pointer to the +destination integer binary identifier. array Pointer to the +destination array. elsize Size in bytes of each destination +array element. elsigned Set to non-0 if the destination array +elements are signed. elements The number of elements to read. +elements_read Pointer to the destination number of elements +actually read. RETURN VALUE -Returns an error code on failure or 0 for success. -SEE ALSO -")find_nextrow; - void find_nextrow(const char* arg){ - cbf_failnez(cbf_find_nextrow(self,arg));} +Returns an error code on failure or 0 for success. SEE ALSO +")get_realarray_as_string; + +// Ensure we free the local temporary +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_realarray_as_string; +// Get the length correct + + void get_realarray_as_string(char **s, int *slen){ + int binary_id; + size_t elements, elements_read, elsize; + unsigned int compression; + void * array; + *slen = 0; /* Initialise in case of problems */ + cbf_failnez(cbf_get_realarrayparameters(self, &compression, + &binary_id, &elsize, + &elements)); + + if ((array=malloc(elsize*elements))) { + /* cbf_failnez (cbf_select_column(cbf,colnum)) */ + cbf_failnez (cbf_get_realarray(self, &binary_id, + (void *)array, elsize, + elements, &elements_read)); + + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*elements; + *s = (char *) array; + } %feature("autodoc", " -Returns : String -*args : String axis_id +Returns : +*args : int compression,int binary_id,(binary) String data,int elsize, + int elsigned,int elements -C prototype: int cbf_get_axis_equipment_component (cbf_handle handle, - const char *axis_id, const char * *equipment_component); +C prototype: int cbf_set_integerarray (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, int elsigned, size_t elements); CBFLib documentation: DESCRIPTION -cbf_count_axis_ancestors sets ancestors to the number of ancestors of -axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor -axis of index ancestor_index of axis axis_id, starting with axis_id -for ancestor_index 0. -cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of -axis_id or to \". \" if there is no such ancestor. -cbf_get_axis_equipment sets *equipment to the equipment of axis_id or -to \". \" if there is no such equipment. -cbf_get_axis_equipment_component sets *equipment_component to the -equipment_component of axis_id or to \". \" if there is no such -equipment_component. -cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the -components of the ofset of axis_id. -cbf_get_axis_rotation sets rotation to the rotation of axis_id or to -0 if there is no such rotation. cbf_get_axis_rotation_axis sets -*rotation_axis to the rotation_axis of axis_id or to \". \" if there -is no such rotation_axis. -cbf_get_axis_setting sets *start and *increment to the corresponding -values of the axis axis_id. Any of the destination pointers may be -NULL. -cbf_get_axis_type sets axis_type to the type of axis_id. -cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the -components of the vector of axis_id. -The parameter reserved is presently unused and should be set to 0. +cbf_set_integerarray sets the binary value of the item at the current +column and row to an integer array. The array consists of elements +elements of elsize bytes each, starting at array. The elements are +signed if elsigned is non-0 and unsigned otherwise. binary_id is the +binary section identifier. cbf_set_realarray sets the binary value of +the item at the current column and row to an integer array. The array +consists of elements elements of elsize bytes each, starting at +array. binary_id is the binary section identifier. +The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, +cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, +cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants +allow the data header values of byteorder, dimfast, dimmid, dimslow +and padding to be set to the data byte order, the fastest, second +fastest and third fastest array dimensions and the size in byte of +the post data padding to be used. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +NOTE: This scheme is by far the slowest of the four and uses much +more disk space. It is intended for routine use with small arrays +only. With large arrays (like images) it should be used only for +debugging. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or +floats for cbf_set_realarray. If elsize is not equal to sizeof +(char), sizeof (short) or sizeof (int), the function returns +CBF_ARGUMENT. ARGUMENTS -handle CBF handle. reserved Unused. Any -value other than 0 is invalid. axis_id Axis id. -ancestor_index Integer index of the desired ancestor, starting -with 0 for the current axis_id. ancestor Pointer to -destination ancestor name pointer. depends_on Pointer to -destination depends_on name pointer. equipment Pointer to -destination equipment name pointer. equipment_component Pointer to -destination equipment_component name pointer. offset1 -Pointer to destination first offset component value. offset2 - Pointer to destination second offset component value. offset3 - Pointer to destination third offset component value. -rotation Pointer to destination rotation value. -rotation_axis Pointer to destination rotation_axisn name -pointer. start Pointer to the destination start -value. increment Pointer to the destination increment -value. type Pointer to destination axis type of type -. vector1 Pointer to destination first vector component -value. vector2 Pointer to destination second vector -component value. vector3 Pointer to destination third -vector component value. +handle CBF handle. compression Compression method to use. +binary_id Integer binary identifier. array Pointer to the +source array. elsize Size in bytes of each source array +element. elsigned Set to non-0 if the source array elements are +signed. elements: The number of elements in the array. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_axis_equipment_component; +SEE ALSO +")set_integerarray; - const char * get_axis_equipment_component(const char *axis_id){ - const char* equip_comp; - cbf_failnez(cbf_get_axis_equipment_component(self,axis_id, - &equip_comp)); - return equip_comp; - } - %feature("autodoc", " -Returns : int compression,int binary_id,int elsize,int elements,char **bo, - int *bolen,int dimslow,int dimmid,int dimfast,int padding -*args : + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ -C prototype: int cbf_get_realarrayparameters_wdims_sf (cbf_handle handle, - unsigned int *compression, int *binary_id, size_t *elsize, - size_t *elements, const char **byteorder, size_t *dimslow, - size_t *dimmid, size_t *dimfast, size_t *padding); +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray; -CBFLib documentation: -DESCRIPTION -cbf_get_integerarrayparameters sets *compression, *binary_id, -*elsize, *elsigned, *elunsigned, *elements, *minelement and -*maxelement to values read from the binary value of the item at the -current column and row. This provides all the arguments needed for a -subsequent call to cbf_set_integerarray, if a copy of the array is to -be made into another CIF or CBF. cbf_get_realarrayparameters sets -*compression, *binary_id, *elsize, *elements to values read from the -binary value of the item at the current column and row. This provides -all the arguments needed for a subsequent call to cbf_set_realarray, -if a copy of the arry is to be made into another CIF or CBF. -The variants cbf_get_integerarrayparameters_wdims, -cbf_get_integerarrayparameters_wdims_fs, -cbf_get_integerarrayparameters_wdims_sf, -cbf_get_realarrayparameters_wdims, -cbf_get_realarrayparameters_wdims_fs, -cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, -*dimmid, *dimslow, and *padding as well, providing the additional -parameters needed for a subsequent call to cbf_set_integerarray_wdims -or cbf_set_realarray_wdims. -The value returned in *byteorder is a pointer either to the string -\"little_endian \" or to the string \"big_endian \". This should be -the byte order of the data, not necessarily of the host machine. No -attempt should be made to modify this string. At this time only -\"little_endian \" will be returned. -The values returned in *dimfast, *dimmid and *dimslow are the sizes -of the fastest changing, second fastest changing and third fastest -changing dimensions of the array, if specified, or zero, if not -specified. -The value returned in *padding is the size of the post-data padding, -if any and if specified in the data header. The value is given as a -count of octets. -If the value is not binary, the function returns CBF_ASCII. + void set_integerarray(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elsigned, int elements){ + /* safety check on args */ + size_t els, ele; + void *array; + if(len == elsize*elements){ + array = data; + els = elsize; + ele = elements; + cbf_failnez(cbf_set_integerarray (self, compression, binary_id, + (void *) data, (size_t) elsize, elsigned, (size_t) elements)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +%feature("autodoc", " +Returns : +*args : int compression,int binary_id,(binary) String data,int elsize, + int elsigned,int elements,String byteorder,int dimfast,int dimmid, + int dimslow,int padding + +C prototype: int cbf_set_integerarray_wdims (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, int elsigned, size_t elements, + const char *byteorder, size_t dimfast, size_t dimmid, + size_t dimslow, size_t padding); + +CBFLib documentation: +DESCRIPTION +cbf_set_integerarray sets the binary value of the item at the current +column and row to an integer array. The array consists of elements +elements of elsize bytes each, starting at array. The elements are +signed if elsigned is non-0 and unsigned otherwise. binary_id is the +binary section identifier. cbf_set_realarray sets the binary value of +the item at the current column and row to an integer array. The array +consists of elements elements of elsize bytes each, starting at +array. binary_id is the binary section identifier. +The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, +cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, +cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants +allow the data header values of byteorder, dimfast, dimmid, dimslow +and padding to be set to the data byte order, the fastest, second +fastest and third fastest array dimensions and the size in byte of +the post data padding to be used. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +NOTE: This scheme is by far the slowest of the four and uses much +more disk space. It is intended for routine use with small arrays +only. With large arrays (like images) it should be used only for +debugging. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or +floats for cbf_set_realarray. If elsize is not equal to sizeof +(char), sizeof (short) or sizeof (int), the function returns +CBF_ARGUMENT. ARGUMENTS -handle CBF handle. compression Compression method used. -elsize Size in bytes of each array element. binary_id -Pointer to the destination integer binary identifier. elsigned -Pointer to an integer. Set to 1 if the elements can be read as signed -integers. elunsigned Pointer to an integer. Set to 1 if the -elements can be read as unsigned integers. elements Pointer to -the destination number of elements. minelement Pointer to the -destination smallest element. maxelement Pointer to the -destination largest element. byteorder Pointer to the destination -byte order. dimfast Pointer to the destination fastest -dimension. dimmid Pointer to the destination second fastest -dimension. dimslow Pointer to the destination third fastest -dimension. padding Pointer to the destination padding size. +handle CBF handle. compression Compression method to use. +binary_id Integer binary identifier. array Pointer to the +source array. elsize Size in bytes of each source array +element. elsigned Set to non-0 if the source array elements are +signed. elements: The number of elements in the array. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")get_realarrayparameters_wdims_sf; - -%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); -%apply int *OUTPUT {int *compression,int *binary_id, - int *elsize, - int *elements, - int *dimslow, int *dimmid, int *dimfast, int *padding} - get_realarrayparameters_wdims_sf; +")set_integerarray_wdims; - void get_realarrayparameters_wdims_sf(int *compression,int *binary_id, - int *elsize, - int *elements, - char **bo, int *bolen, - int *dimslow, int *dimmid, int *dimfast, int *padding - ){ - unsigned int comp; - size_t elsiz, elem, df,dm,ds,pd; - const char * byteorder; - char * bot; - cbf_failnez(cbf_get_realarrayparameters_wdims_sf(self, - &comp,binary_id, &elsiz, &elem, - &byteorder,&ds,&dm,&df,&pd )); - *bolen = strlen(byteorder); - if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} - strncpy(bot,byteorder,*bolen); - *bo = bot; - *compression = comp; - *elsize = elsiz; - *elements = elem; - *dimfast = df; - *dimmid = dm; - *dimslow = ds; - *padding = pd; - - } + /* CBFlib must NOT modify the data string nor the byteorder string + which belongs to the scripting + language we will get and check the length via a typemap */ -/* cfunc cbf_reset_datablock pyfunc reset_datablock - arg cbf_handle handle */ +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray_wdims; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_integerarray_wdims; + void set_integerarray_wdims(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elsigned, int elements, + char *bo, int bolen, int dimfast, int dimmid, int dimslow, int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + cbf_failnez(cbf_set_integerarray_wdims (self, compression, binary_id, + (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder, + (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } %feature("autodoc", " Returns : -*args : +*args : int compression,int binary_id,(binary) String data,int elsize, + int elsigned,int elements,String byteorder,int dimfast,int dimmid, + int dimslow,int padding -C prototype: int cbf_reset_datablock (cbf_handle handle); +C prototype: int cbf_set_integerarray_wdims_fs (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, int elsigned, size_t elements, + const char *byteorder, size_t dimfast, size_t dimmid, + size_t dimslow, size_t padding); CBFLib documentation: DESCRIPTION -cbf_reset_datablock deletes all categories from the current data -block. cbf_reset_saveframe deletes all categories from the current -save frame. +cbf_set_integerarray sets the binary value of the item at the current +column and row to an integer array. The array consists of elements +elements of elsize bytes each, starting at array. The elements are +signed if elsigned is non-0 and unsigned otherwise. binary_id is the +binary section identifier. cbf_set_realarray sets the binary value of +the item at the current column and row to an integer array. The array +consists of elements elements of elsize bytes each, starting at +array. binary_id is the binary section identifier. +The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, +cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, +cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants +allow the data header values of byteorder, dimfast, dimmid, dimslow +and padding to be set to the data byte order, the fastest, second +fastest and third fastest array dimensions and the size in byte of +the post data padding to be used. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +NOTE: This scheme is by far the slowest of the four and uses much +more disk space. It is intended for routine use with small arrays +only. With large arrays (like images) it should be used only for +debugging. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or +floats for cbf_set_realarray. If elsize is not equal to sizeof +(char), sizeof (short) or sizeof (int), the function returns +CBF_ARGUMENT. ARGUMENTS -handle CBF handle. +handle CBF handle. compression Compression method to use. +binary_id Integer binary identifier. array Pointer to the +source array. elsize Size in bytes of each source array +element. elsigned Set to non-0 if the source array elements are +signed. elements: The number of elements in the array. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")reset_datablock; - void reset_datablock(void){ - cbf_failnez(cbf_reset_datablock(self));} +")set_integerarray_wdims_fs; + + /* CBFlib must NOT modify the data string nor the byteorder string + which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray_wdims_fs; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_integerarray_wdims_fs; + + void set_integerarray_wdims_fs(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elsigned, int elements, + char *bo, int bolen, int dimfast, int dimmid, int dimslow, int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + cbf_failnez(cbf_set_integerarray_wdims_fs (self, compression, binary_id, + (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder, + (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } %feature("autodoc", " Returns : -*args : int element_number,int compression,(binary) String data,int elsize, - int elsign,int dimfast,int dimmid,int dimslow +*args : int compression,int binary_id,(binary) String data,int elsize, + int elsigned,int elements,String byteorder,int dimslow,int dimmid, + int dimfast,int padding -C prototype: int cbf_set_3d_image_fs(cbf_handle handle, unsigned int reserved, - unsigned int element_number, unsigned int compression, - void *array, size_t elsize, int elsign, size_t ndimfast, - size_t ndimmid, size_t ndimslow); +C prototype: int cbf_set_integerarray_wdims_sf (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, int elsigned, size_t elements, + const char *byteorder, size_t dimslow, size_t dimmid, + size_t dimfast, size_t padding); CBFLib documentation: DESCRIPTION -cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image -array for element number element_number. The array consists of -ndimfast *ndimslow elements of elsize bytes each, starting at array. -The elements are signed if elsign is non-zero and unsigned otherwise. -cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf -write the image array for element number element_number. The array -consists of ndimfast *ndimslow IEEE double or float elements of -elsize bytes each, starting at array. cbf_set_3d_image, -cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array -for element number element_number. The array consists of ndimfast -*ndimmid *ndimslow elements of elsize bytes each, starting at array. -The elements are signed if elsign is non-0 and unsigned otherwise. -cbf_set_real_3d_image, cbf_set_real_3d_image_fs and -cbf_set_real_3d_image_sf writes the 3D image array for element number -element_number. The array consists of ndimfast *ndimmid *ndimslow -IEEE double or float elements of elsize bytes each, starting at -array. -The _fs calls give the dimensions in a fast-to-slow order. The calls -with no suffix and the calls _sf calls give the dimensions in -slow-to-fast order -If the array is 1-dimensional, ndimslow should be the array size and -ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the -array is 2-dimensional and the 3D calls are used, ndimslow and -ndimmid should be used for the array dimensions and ndimfast should -be set to 1. +cbf_set_integerarray sets the binary value of the item at the current +column and row to an integer array. The array consists of elements +elements of elsize bytes each, starting at array. The elements are +signed if elsigned is non-0 and unsigned otherwise. binary_id is the +binary section identifier. cbf_set_realarray sets the binary value of +the item at the current column and row to an integer array. The array +consists of elements elements of elsize bytes each, starting at +array. binary_id is the binary section identifier. +The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, +cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, +cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants +allow the data header values of byteorder, dimfast, dimmid, dimslow +and padding to be set to the data byte order, the fastest, second +fastest and third fastest array dimensions and the size in byte of +the post data padding to be used. The array will be compressed using the compression scheme specifed by compression. Currently, the available schemes are: -CBF_CANONICAL Canonical-code compression (section 3.3.1) -CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET -Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple -\"nibble_offset \" compression. CBF_NONE No compression. +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +NOTE: This scheme is by far the slowest of the four and uses much +more disk space. It is intended for routine use with small arrays +only. With large arrays (like images) it should be used only for +debugging. The values compressed are limited to 64 bits. If any element in the array is larger than 64 bits, the value compressed is the nearest 64-bit value. Currently, the source array must consist of chars, shorts or ints -(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for -cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof -(int), sizeof(double) or sizeof(float), the function returns +(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or +floats for cbf_set_realarray. If elsize is not equal to sizeof +(char), sizeof (short) or sizeof (int), the function returns CBF_ARGUMENT. -The parameter reserved is presently unused and should be set to 0. ARGUMENTS -handle CBF handle. reserved Unused. Any value other -than 0 is invalid. element_number The number of the detector -element counting from 0 by order of appearance in the -\"diffrn_data_frame \" category. compression Compression type. -array Pointer to the image array. elsize Size in -bytes of each image array element. elsigned Set to non-0 if -the image array elements are signed. ndimslow Slowest array -dimension. ndimmid Second slowest array dimension. ndimfast - Fastest array dimension. +handle CBF handle. compression Compression method to use. +binary_id Integer binary identifier. array Pointer to the +source array. elsize Size in bytes of each source array +element. elsigned Set to non-0 if the source array elements are +signed. elements: The number of elements in the array. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")set_3d_image_fs; +SEE ALSO +")set_integerarray_wdims_sf; - /* CBFlib must NOT modify the data string which belongs to the scripting + /* CBFlib must NOT modify the data string nor the byteorder string + which belongs to the scripting language we will get and check the length via a typemap */ -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_3d_image; +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray_wdims_sf; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_integerarray_wdims_sf; - void set_3d_image_fs(unsigned int element_number, - unsigned int compression, - char *data, int len, int elsize, int elsign, int ndimfast, int ndimmid, int ndimslow){ + void set_integerarray_wdims_sf(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elsigned, int elements, + char *bo, int bolen, int dimslow, int dimmid, int dimfast, int padding){ /* safety check on args */ - size_t els; - unsigned int reserved; + size_t els, ele; void *array; - if(len == elsize*ndimslow*ndimmid*ndimfast){ + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ array = data; els = elsize; - reserved = 0; - cbf_failnez(cbf_set_3d_image_fs (self, reserved, element_number, compression, - (void *) data, (size_t) elsize, elsign, (size_t) ndimfast, (size_t) ndimmid, (size_t)ndimslow)); + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + cbf_failnez(cbf_set_integerarray_wdims_sf (self, compression, binary_id, + (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder, + (size_t)dimslow, (size_t)dimmid, (size_t)dimfast, (size_t)padding)); }else{ cbf_failnez(CBF_ARGUMENT); } } - -/* cfunc cbf_set_saveframename pyfunc set_saveframename - arg cbf_handle handle arg const char *saveframename */ - %feature("autodoc", " -Returns : string -*args : +Returns : +*args : int compression,int binary_id,(binary) String data,int elsize, + int elements -C prototype: int cbf_set_saveframename (cbf_handle handle, - const char *saveframename); +C prototype: int cbf_set_realarray (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, size_t elements); CBFLib documentation: DESCRIPTION -cbf_set_datablockname changes the name of the current data block to -datablockname. cbf_set_saveframename changes the name of the current -save frame to saveframename. -If a data block or save frame with this name already exists -(comparison is case-insensitive), the function returns CBF_IDENTICAL. +cbf_set_integerarray sets the binary value of the item at the current +column and row to an integer array. The array consists of elements +elements of elsize bytes each, starting at array. The elements are +signed if elsigned is non-0 and unsigned otherwise. binary_id is the +binary section identifier. cbf_set_realarray sets the binary value of +the item at the current column and row to an integer array. The array +consists of elements elements of elsize bytes each, starting at +array. binary_id is the binary section identifier. +The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, +cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, +cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants +allow the data header values of byteorder, dimfast, dimmid, dimslow +and padding to be set to the data byte order, the fastest, second +fastest and third fastest array dimensions and the size in byte of +the post data padding to be used. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +NOTE: This scheme is by far the slowest of the four and uses much +more disk space. It is intended for routine use with small arrays +only. With large arrays (like images) it should be used only for +debugging. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or +floats for cbf_set_realarray. If elsize is not equal to sizeof +(char), sizeof (short) or sizeof (int), the function returns +CBF_ARGUMENT. ARGUMENTS -handle CBF handle. datablockname The new data block name. -datablockname The new save frame name. +handle CBF handle. compression Compression method to use. +binary_id Integer binary identifier. array Pointer to the +source array. elsize Size in bytes of each source array +element. elsigned Set to non-0 if the source array elements are +signed. elements: The number of elements in the array. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")set_saveframename; - void set_saveframename(const char* arg){ - cbf_failnez(cbf_set_saveframename(self,arg));} +")set_realarray; + + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray; + + void set_realarray(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elements){ + /* safety check on args */ + size_t els, ele; + void *array; + if(len == elsize*elements){ + array = data; + els = elsize; + ele = elements; + cbf_failnez(cbf_set_realarray (self, compression, binary_id, + (void *) data, (size_t) elsize, (size_t) elements)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } %feature("autodoc", " -Returns : Int number -*args : Int thedefault +Returns : +*args : int compression,int binary_id,(binary) String data,int elsize, + int elements,String byteorder,int dimfast,int dimmid,int dimslow, + int padding -C prototype: int cbf_require_integervalue (cbf_handle handle, int *number, - int defaultvalue); +C prototype: int cbf_set_realarray_wdims (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, size_t elements, const char *byteorder, + size_t dimfast, size_t dimmid, size_t dimslow, + size_t padding); CBFLib documentation: DESCRIPTION -cbf_get_integervalue sets *number to the value of the ASCII item at -the current column and row interpreted as a decimal integer. -cbf_require_integervalue sets *number to the value of the ASCII item -at the current column and row interpreted as a decimal integer, -setting it to defaultvalue if necessary. -If the value is not ASCII, the function returns CBF_BINARY. +cbf_set_integerarray sets the binary value of the item at the current +column and row to an integer array. The array consists of elements +elements of elsize bytes each, starting at array. The elements are +signed if elsigned is non-0 and unsigned otherwise. binary_id is the +binary section identifier. cbf_set_realarray sets the binary value of +the item at the current column and row to an integer array. The array +consists of elements elements of elsize bytes each, starting at +array. binary_id is the binary section identifier. +The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, +cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, +cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants +allow the data header values of byteorder, dimfast, dimmid, dimslow +and padding to be set to the data byte order, the fastest, second +fastest and third fastest array dimensions and the size in byte of +the post data padding to be used. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +NOTE: This scheme is by far the slowest of the four and uses much +more disk space. It is intended for routine use with small arrays +only. With large arrays (like images) it should be used only for +debugging. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or +floats for cbf_set_realarray. If elsize is not equal to sizeof +(char), sizeof (short) or sizeof (int), the function returns +CBF_ARGUMENT. ARGUMENTS -handle CBF handle. number pointer to the number. -defaultvalue default number value. +handle CBF handle. compression Compression method to use. +binary_id Integer binary identifier. array Pointer to the +source array. elsize Size in bytes of each source array +element. elsigned Set to non-0 if the source array elements are +signed. elements: The number of elements in the array. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")require_integervalue; - -%apply int *OUTPUT {int *number} require_integervalue; +")set_realarray_wdims; - void require_integervalue(int *number, int thedefault){ + /* CBFlib must NOT modify the data string nor the byteorder string + which belongs to the scripting + language we will get and check the length via a typemap */ - cbf_failnez(cbf_require_integervalue(self,number,thedefault)); +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray_wdims; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_realarray_wdims; - } -%feature("autodoc", " -Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, - int elements,int minelement,int maxelement -*args : + void set_realarray_wdims(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elements, + char *bo, int bolen, int dimfast, int dimmid, int dimslow, int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + cbf_failnez(cbf_set_realarray_wdims (self, compression, binary_id, + (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder, + (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } +%feature("autodoc", " +Returns : +*args : int compression,int binary_id,(binary) String data,int elsize, + int elements,String byteorder,int dimfast,int dimmid,int dimslow, + int padding -C prototype: int cbf_get_integerarrayparameters (cbf_handle handle, - unsigned int *compression, int *binary_id, size_t *elsize, - int *elsigned, int *elunsigned, size_t *elements, - int *minelement, int *maxelement); +C prototype: int cbf_set_realarray_wdims_fs (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, size_t elements, const char *byteorder, + size_t dimfast, size_t dimmid, size_t dimslow, + size_t padding); CBFLib documentation: DESCRIPTION -cbf_get_integerarrayparameters sets *compression, *binary_id, -*elsize, *elsigned, *elunsigned, *elements, *minelement and -*maxelement to values read from the binary value of the item at the -current column and row. This provides all the arguments needed for a -subsequent call to cbf_set_integerarray, if a copy of the array is to -be made into another CIF or CBF. cbf_get_realarrayparameters sets -*compression, *binary_id, *elsize, *elements to values read from the -binary value of the item at the current column and row. This provides -all the arguments needed for a subsequent call to cbf_set_realarray, -if a copy of the arry is to be made into another CIF or CBF. -The variants cbf_get_integerarrayparameters_wdims, -cbf_get_integerarrayparameters_wdims_fs, -cbf_get_integerarrayparameters_wdims_sf, -cbf_get_realarrayparameters_wdims, -cbf_get_realarrayparameters_wdims_fs, -cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, -*dimmid, *dimslow, and *padding as well, providing the additional -parameters needed for a subsequent call to cbf_set_integerarray_wdims -or cbf_set_realarray_wdims. -The value returned in *byteorder is a pointer either to the string -\"little_endian \" or to the string \"big_endian \". This should be -the byte order of the data, not necessarily of the host machine. No -attempt should be made to modify this string. At this time only -\"little_endian \" will be returned. -The values returned in *dimfast, *dimmid and *dimslow are the sizes -of the fastest changing, second fastest changing and third fastest -changing dimensions of the array, if specified, or zero, if not -specified. -The value returned in *padding is the size of the post-data padding, -if any and if specified in the data header. The value is given as a -count of octets. -If the value is not binary, the function returns CBF_ASCII. +cbf_set_integerarray sets the binary value of the item at the current +column and row to an integer array. The array consists of elements +elements of elsize bytes each, starting at array. The elements are +signed if elsigned is non-0 and unsigned otherwise. binary_id is the +binary section identifier. cbf_set_realarray sets the binary value of +the item at the current column and row to an integer array. The array +consists of elements elements of elsize bytes each, starting at +array. binary_id is the binary section identifier. +The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, +cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, +cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants +allow the data header values of byteorder, dimfast, dimmid, dimslow +and padding to be set to the data byte order, the fastest, second +fastest and third fastest array dimensions and the size in byte of +the post data padding to be used. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +NOTE: This scheme is by far the slowest of the four and uses much +more disk space. It is intended for routine use with small arrays +only. With large arrays (like images) it should be used only for +debugging. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or +floats for cbf_set_realarray. If elsize is not equal to sizeof +(char), sizeof (short) or sizeof (int), the function returns +CBF_ARGUMENT. ARGUMENTS -handle CBF handle. compression Compression method used. -elsize Size in bytes of each array element. binary_id -Pointer to the destination integer binary identifier. elsigned -Pointer to an integer. Set to 1 if the elements can be read as signed -integers. elunsigned Pointer to an integer. Set to 1 if the -elements can be read as unsigned integers. elements Pointer to -the destination number of elements. minelement Pointer to the -destination smallest element. maxelement Pointer to the -destination largest element. byteorder Pointer to the destination -byte order. dimfast Pointer to the destination fastest -dimension. dimmid Pointer to the destination second fastest -dimension. dimslow Pointer to the destination third fastest -dimension. padding Pointer to the destination padding size. +handle CBF handle. compression Compression method to use. +binary_id Integer binary identifier. array Pointer to the +source array. elsize Size in bytes of each source array +element. elsigned Set to non-0 if the source array elements are +signed. elements: The number of elements in the array. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")get_integerarrayparameters; +")set_realarray_wdims_fs; -%apply int *OUTPUT {int *compression,int *binary_id, - int *elsize, int *elsigned, int *elunsigned, - int *elements, int *minelement, int *maxelement} - get_integerarrayparameters; + /* CBFlib must NOT modify the data string nor the byteorder string + which belongs to the scripting + language we will get and check the length via a typemap */ - void get_integerarrayparameters(int *compression,int *binary_id, - int *elsize, int *elsigned, int *elunsigned, - int *elements, int *minelement, int *maxelement){ - unsigned int comp; - size_t elsiz, elem; - cbf_failnez(cbf_get_integerarrayparameters(self, - &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, - minelement, maxelement)); - *compression = comp; /* FIXME - does this convert in C? */ - *elsize = elsiz; - *elements = elem; +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray_wdims_fs; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_realarray_wdims_fs; + + void set_realarray_wdims_fs(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elements, + char *bo, int bolen, int dimfast, int dimmid, int dimslow, int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + cbf_failnez(cbf_set_realarray_wdims_fs (self, compression, binary_id, + (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder, + (size_t) dimfast, (size_t) dimmid, (size_t) dimslow, (size_t)padding)); + }else{ + cbf_failnez(CBF_ARGUMENT); } + } %feature("autodoc", " Returns : -*args : int element_number,int compression,(binary) String data,int elsize, - int dimslow,int dimmid,int dimfast +*args : int compression,int binary_id,(binary) String data,int elsize, + int elements,String byteorder,int dimslow,int dimmid,int dimfast, + int padding -C prototype: int cbf_set_real_3d_image_sf(cbf_handle handle, - unsigned int reserved, unsigned int element_number, - unsigned int compression, void *array,size_t elsize, - size_t ndimslow, size_t ndimmid, size_t ndimfast); +C prototype: int cbf_set_realarray_wdims_sf (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, size_t elements, const char *byteorder, + size_t dimslow, size_t dimmid, size_t dimfast, + size_t padding); CBFLib documentation: DESCRIPTION -cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image -array for element number element_number. The array consists of -ndimfast *ndimslow elements of elsize bytes each, starting at array. -The elements are signed if elsign is non-zero and unsigned otherwise. -cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf -write the image array for element number element_number. The array -consists of ndimfast *ndimslow IEEE double or float elements of -elsize bytes each, starting at array. cbf_set_3d_image, -cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array -for element number element_number. The array consists of ndimfast -*ndimmid *ndimslow elements of elsize bytes each, starting at array. -The elements are signed if elsign is non-0 and unsigned otherwise. -cbf_set_real_3d_image, cbf_set_real_3d_image_fs and -cbf_set_real_3d_image_sf writes the 3D image array for element number -element_number. The array consists of ndimfast *ndimmid *ndimslow -IEEE double or float elements of elsize bytes each, starting at -array. -The _fs calls give the dimensions in a fast-to-slow order. The calls -with no suffix and the calls _sf calls give the dimensions in -slow-to-fast order -If the array is 1-dimensional, ndimslow should be the array size and -ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the -array is 2-dimensional and the 3D calls are used, ndimslow and -ndimmid should be used for the array dimensions and ndimfast should -be set to 1. +cbf_set_integerarray sets the binary value of the item at the current +column and row to an integer array. The array consists of elements +elements of elsize bytes each, starting at array. The elements are +signed if elsigned is non-0 and unsigned otherwise. binary_id is the +binary section identifier. cbf_set_realarray sets the binary value of +the item at the current column and row to an integer array. The array +consists of elements elements of elsize bytes each, starting at +array. binary_id is the binary section identifier. +The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, +cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, +cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants +allow the data header values of byteorder, dimfast, dimmid, dimslow +and padding to be set to the data byte order, the fastest, second +fastest and third fastest array dimensions and the size in byte of +the post data padding to be used. The array will be compressed using the compression scheme specifed by compression. Currently, the available schemes are: -CBF_CANONICAL Canonical-code compression (section 3.3.1) -CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET -Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple -\"nibble_offset \" compression. CBF_NONE No compression. +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +NOTE: This scheme is by far the slowest of the four and uses much +more disk space. It is intended for routine use with small arrays +only. With large arrays (like images) it should be used only for +debugging. The values compressed are limited to 64 bits. If any element in the array is larger than 64 bits, the value compressed is the nearest 64-bit value. Currently, the source array must consist of chars, shorts or ints -(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for -cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof -(int), sizeof(double) or sizeof(float), the function returns +(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or +floats for cbf_set_realarray. If elsize is not equal to sizeof +(char), sizeof (short) or sizeof (int), the function returns CBF_ARGUMENT. -The parameter reserved is presently unused and should be set to 0. ARGUMENTS -handle CBF handle. reserved Unused. Any value other -than 0 is invalid. element_number The number of the detector -element counting from 0 by order of appearance in the -\"diffrn_data_frame \" category. compression Compression type. -array Pointer to the image array. elsize Size in -bytes of each image array element. elsigned Set to non-0 if -the image array elements are signed. ndimslow Slowest array -dimension. ndimmid Second slowest array dimension. ndimfast - Fastest array dimension. +handle CBF handle. compression Compression method to use. +binary_id Integer binary identifier. array Pointer to the +source array. elsize Size in bytes of each source array +element. elsigned Set to non-0 if the source array elements are +signed. elements: The number of elements in the array. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")set_real_3d_image_sf; +SEE ALSO +")set_realarray_wdims_sf; - /* CBFlib must NOT modify the data string which belongs to the scripting + /* CBFlib must NOT modify the data string nor the byteorder string + which belongs to the scripting language we will get and check the length via a typemap */ -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_3d_image_sf; +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray_wdims_sf; +%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_realarray_wdims_sf; - void set_real_3d_image_sf(unsigned int element_number, - unsigned int compression, - char *data, int len, int elsize, int ndimslow, int ndimmid, int ndimfast){ + void set_realarray_wdims_sf(unsigned int compression, int binary_id, + char *data, int len, int elsize, int elements, + char *bo, int bolen, int dimslow, int dimmid, int dimfast, int padding){ /* safety check on args */ - size_t els; - unsigned int reserved; + size_t els, ele; void *array; - if(len == elsize*ndimslow*ndimmid*ndimfast){ + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ array = data; els = elsize; - reserved = 0; - cbf_failnez(cbf_set_real_3d_image_sf (self, reserved, element_number, compression, - (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + cbf_failnez(cbf_set_realarray_wdims_sf (self, compression, binary_id, + (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder, + (size_t) dimslow, (size_t) dimmid, (size_t) dimfast, (size_t)padding)); }else{ cbf_failnez(CBF_ARGUMENT); } } -%feature("autodoc", " -Returns : -*args : String filename,Integer ciforcbf,Integer Headers,Integer encoding -C prototype: int cbf_write_file (cbf_handle handle, FILE *file, int readable, - int ciforcbf, int flags, int encoding); - -CBFLib documentation: -DESCRIPTION -cbf_write_file writes the CBF object specified by handle into the -file file, following CIF 1.0 conventions of 80 character lines. -cbf_write_widefile writes the CBF object specified by handle into the -file file, following CIF 1.1 conventions of 2048 character lines. A -warning is issued to stderr for ascii lines over the limit, and an -attempt is made to fold lines to fit. No test is performed on binary -sections. -If a dictionary has been provided, aliases will be applied on output. -Unlike cbf_read_file, the file does not have to be random-access. -If the file is random-access and readable, readable can be set to -non-0 to indicate to CBFlib that the file can be used as a buffer to -conserve disk space. If the file is not random-access or not -readable, readable must be 0. -")write_file; +/* cfunc cbf_require_datablock pyfunc require_datablock + arg cbf_handle handle arg const char *datablockname */ - void write_file(const char* filename, int ciforcbf, int headers, - int encoding){ - FILE *stream; - int readable; - /* Make readable false so we can close the file immediately */ - readable = 0; - if ( ! ( stream = fopen (filename, "w+b")) ){ - cbf_failnez(CBF_FILEOPEN); - } - else{ - cbf_failnez(cbf_write_file(self, stream, readable, - ciforcbf, headers, encoding)); - fclose(stream); - } - } %feature("autodoc", " -Returns : -*args : Float div_x_source,Float div_y_source,Float div_x_y_source +Returns : string +*args : -C prototype: int cbf_set_divergence (cbf_handle handle, double div_x_source, - double div_y_source, double div_x_y_source); +C prototype: int cbf_require_datablock (cbf_handle handle, + const char *datablockname); CBFLib documentation: DESCRIPTION -cbf_set_divergence sets the source divergence parameters to the -values specified by div_x_source, div_y_source and div_x_y_source. +cbf_require_datablock makes the data block with name datablockname +the current data block, if it exists, or creates it if it does not. +The comparison is case-insensitive. +The current category becomes undefined. ARGUMENTS -handle CBF handle. div_x_source New value of -div_x_source. div_y_source New value of div_y_source. -div_x_y_source New value of div_x_y_source. +handle CBF handle. datablockname The name of the data +block to find or create. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")set_divergence; - - void set_divergence ( double div_x_source, double div_y_source, - double div_x_y_source){ - cbf_failnez(cbf_set_divergence (self, div_x_source, - div_y_source,div_x_y_source)); - } +SEE ALSO +")require_datablock; + void require_datablock(const char* arg){ + cbf_failnez(cbf_require_datablock(self,arg));} -/* cfunc cbf_remove_datablock pyfunc remove_datablock - arg cbf_handle handle */ +/* cfunc cbf_require_category pyfunc require_category + arg cbf_handle handle arg const char *categoryname */ %feature("autodoc", " -Returns : +Returns : string *args : -C prototype: int cbf_remove_datablock (cbf_handle handle); +C prototype: int cbf_require_category (cbf_handle handle, + const char *categoryname); CBFLib documentation: DESCRIPTION -cbf_remove_datablock deletes the current data block. -cbf_remove_saveframe deletes the current save frame. -The current data block becomes undefined. +cbf_rewuire_category makes the category in the current data block +with name categoryname the current category, if it exists, or creates +the catagory if it does not exist. +The comparison is case-insensitive. +The current column and row become undefined. ARGUMENTS -handle CBF handle. +handle CBF handle. categoryname The name of the category to +find. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")remove_datablock; - void remove_datablock(void){ - cbf_failnez(cbf_remove_datablock(self));} +")require_category; + void require_category(const char* arg){ + cbf_failnez(cbf_require_category(self,arg));} -/* cfunc cbf_count_elements pyfunc count_elements - arg cbf_handle handle arg unsigned int *elements */ +/* cfunc cbf_require_column pyfunc require_column + arg cbf_handle handle arg const char *columnname */ %feature("autodoc", " -Returns : Integer +Returns : string *args : -C prototype: int cbf_count_elements (cbf_handle handle, - unsigned int *elements); +C prototype: int cbf_require_column (cbf_handle handle, + const char *columnname); CBFLib documentation: DESCRIPTION -cbf_count_elements sets *elements to the number of detector elements. +cbf_require_column makes the columns in the current category with +name columnname the current column, if it exists, or creates it if it +does not. +The comparison is case-insensitive. +The current row is not affected. ARGUMENTS -handle CBF handle. elements Pointer to the destination count. +handle CBF handle. columnname The name of column to find. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")count_elements; - unsigned int count_elements(void){ - unsigned int result; - cbf_failnez(cbf_count_elements(self,&result)); - return result;} +SEE ALSO +")require_column; + void require_column(const char* arg){ + cbf_failnez(cbf_require_column(self,arg));} %feature("autodoc", " -Returns : -*args : int element_number,int compression,(binary) String data,int elsize, - int elsign,int dimfast,int dimslow +Returns : String Name +*args : String columnnanme,String Default -C prototype: int cbf_set_image_fs(cbf_handle handle, unsigned int reserved, - unsigned int element_number, unsigned int compression, - void *array, size_t elsize, int elsign, size_t ndimfast, - size_t ndimslow); +C prototype: int cbf_require_column_value (cbf_handle handle, + const char *columnname, const char **value, + const char *defaultvalue); CBFLib documentation: DESCRIPTION -cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image -array for element number element_number. The array consists of -ndimfast *ndimslow elements of elsize bytes each, starting at array. -The elements are signed if elsign is non-zero and unsigned otherwise. -cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf -write the image array for element number element_number. The array -consists of ndimfast *ndimslow IEEE double or float elements of -elsize bytes each, starting at array. cbf_set_3d_image, -cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array -for element number element_number. The array consists of ndimfast -*ndimmid *ndimslow elements of elsize bytes each, starting at array. -The elements are signed if elsign is non-0 and unsigned otherwise. -cbf_set_real_3d_image, cbf_set_real_3d_image_fs and -cbf_set_real_3d_image_sf writes the 3D image array for element number -element_number. The array consists of ndimfast *ndimmid *ndimslow -IEEE double or float elements of elsize bytes each, starting at -array. -The _fs calls give the dimensions in a fast-to-slow order. The calls -with no suffix and the calls _sf calls give the dimensions in -slow-to-fast order -If the array is 1-dimensional, ndimslow should be the array size and -ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the -array is 2-dimensional and the 3D calls are used, ndimslow and -ndimmid should be used for the array dimensions and ndimfast should -be set to 1. -The array will be compressed using the compression scheme specifed by -compression. Currently, the available schemes are: -CBF_CANONICAL Canonical-code compression (section 3.3.1) -CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET -Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple -\"nibble_offset \" compression. CBF_NONE No compression. -The values compressed are limited to 64 bits. If any element in the -array is larger than 64 bits, the value compressed is the nearest -64-bit value. -Currently, the source array must consist of chars, shorts or ints -(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for -cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof -(int), sizeof(double) or sizeof(float), the function returns -CBF_ARGUMENT. -The parameter reserved is presently unused and should be set to 0. +cbf_require_column_doublevalue sets *value to the ASCII item at the +current row for the column given with the name given by *columnname, +or to the string given by defaultvalue if the item cannot be found. ARGUMENTS -handle CBF handle. reserved Unused. Any value other -than 0 is invalid. element_number The number of the detector -element counting from 0 by order of appearance in the -\"diffrn_data_frame \" category. compression Compression type. -array Pointer to the image array. elsize Size in -bytes of each image array element. elsigned Set to non-0 if -the image array elements are signed. ndimslow Slowest array -dimension. ndimmid Second slowest array dimension. ndimfast - Fastest array dimension. +handle CBF handle. columnname Name of the column +containing the number. value pointer to the location to +receive the value. defaultvalue Value to use if the requested +column and value cannot be found. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")set_image_fs; - - /* CBFlib must NOT modify the data string which belongs to the scripting - language we will get and check the length via a typemap */ - -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_image; +SEE ALSO +")require_column_value; - void set_image_fs(unsigned int element_number, - unsigned int compression, - char *data, int len, int elsize, int elsign, int ndimfast, int ndimslow){ - /* safety check on args */ - size_t els; - unsigned int reserved; - void *array; - if(len == elsize*ndimslow*ndimfast){ - array = data; - els = elsize; - reserved = 0; - cbf_failnez(cbf_set_image (self, reserved, element_number, compression, - (void *) data, (size_t) elsize, elsign, (size_t) ndimfast, (size_t)ndimslow)); - }else{ - cbf_failnez(CBF_ARGUMENT); - } - } + const char* require_column_value(const char *columnname, + const char *defaultvalue){ + const char * result; + cbf_failnez(cbf_require_column_value(self,columnname, + &result,defaultvalue)); + return result; +} %feature("autodoc", " -Returns : pycbf detector object -*args : Integer element_number +Returns : Int Value +*args : String Columnvalue,Int default -C prototype: int cbf_require_reference_detector (cbf_handle handle, - cbf_detector *detector, unsigned int element_number); +C prototype: int cbf_require_column_integervalue (cbf_handle handle, + const char *columnname, int *number, + const int defaultvalue); CBFLib documentation: DESCRIPTION -cbf_construct_detector constructs a detector object for detector -element number element_number using the description in the CBF object -handle and initialises the detector handle *detector. -cbf_construct_reference_detector constructs a detector object for -detector element number element_number using the description in the -CBF object handle and initialises the detector handle *detector using -the reference settings of the axes. cbf_require_reference_detector is -similar, but try to force the creations of missing intermediate -categories needed to construct a detector object. +cbf_require_column_doublevalue sets *number to the value of the ASCII +item at the current row for the column given with the name given by +*columnname, with the value interpreted as an integer number, or to +the number given by defaultvalue if the item cannot be found. ARGUMENTS -handle CBF handle. detector Pointer to the -destination detector handle. element_number The number of the -detector element counting from 0 by order of appearance in the -\"diffrn_data_frame \" category. +handle CBF handle. columnname Name of the column +containing the number. number pointer to the location to +receive the integer value. defaultvalue Value to use if the +requested column and value cannot be found. RETURN VALUE Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")require_reference_detector; +SEE ALSO +")require_column_integervalue; - cbf_detector require_reference_detector(unsigned int element_number){ - cbf_detector detector; - cbf_failnez(cbf_require_reference_detector(self,&detector,element_number)); - return detector; +%apply int *OUTPUT {int *number} require_column_integervalue; +void require_column_integervalue(const char *columnname, + int *number, const int defaultvalue){ + cbf_failnez(cbf_require_column_integervalue(self, + columnname, number,defaultvalue)); } - -/* cfunc cbf_next_category pyfunc next_category - arg cbf_handle handle */ - %feature("autodoc", " -Returns : -*args : +Returns : Float defaultvalue +*args : String columnname,Float Value -C prototype: int cbf_next_category (cbf_handle handle); +C prototype: int cbf_require_column_doublevalue (cbf_handle handle, + const char *columnname, double *number, + const double defaultvalue); CBFLib documentation: DESCRIPTION -cbf_next_category makes the category following the current category -in the current data block the current category. -If there are no more categories, the function returns CBF_NOTFOUND. -The current column and row become undefined. +cbf_require_column_doublevalue sets *number to the value of the ASCII +item at the current row for the column given with the name given by +*columnname, with the value interpreted as a decimal floating-point +number, or to the number given by defaultvalue if the item cannot be +found. ARGUMENTS -handle CBF handle. +handle CBF handle. columnname Name of the column +containing the number. number pointer to the location to +receive the floating-point value. defaultvalue Value to use if the +requested column and value cannot be found. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")next_category; - void next_category(void){ - cbf_failnez(cbf_next_category(self));} - -/* cfunc cbf_set_diffrn_id pyfunc set_diffrn_id - arg cbf_handle handle arg const char *diffrn_id */ +")require_column_doublevalue; +%apply double *OUTPUT { double *number} require_column_doublevalue; +void require_column_doublevalue(const char *columnname, double * number, + const double defaultvalue){ + cbf_failnez(cbf_require_column_doublevalue(self, + columnname,number,defaultvalue)); + } %feature("autodoc", " -Returns : string +Returns : CBFHandle dictionary *args : -C prototype: int cbf_set_diffrn_id (cbf_handle handle, const char *diffrn_id); +C prototype: int cbf_get_dictionary (cbf_handle handle, + cbf_handle * dictionary); CBFLib documentation: DESCRIPTION -cbf_set_diffrn_id sets the \"diffrn.id \" entry of the current -datablock to the ASCII value diffrn_id. -This function also changes corresponding \"diffrn_id \" entries in -the \"diffrn_source \", \"diffrn_radiation \", \"diffrn_detector -\" and \"diffrn_measurement \" categories. +cbf_get_dictionary sets *dictionary to the handle of a CBF which has +been associated with the CBF handle by cbf_set_dictionary. +cbf_set_dictionary associates the CBF handle dictionary_in with +handle as its dictionary. cbf_require_dictionary sets *dictionary to +the handle of a CBF which has been associated with the CBF handle by +cbf_set_dictionary or creates a new empty CBF and associates it with +handle, returning the new handle in *dictionary. ARGUMENTS -handle CBF handle. diffrn_id ASCII value. +handle CBF handle. dictionary Pointer to CBF handle of +dictionary. dictionary_in CBF handle of dcitionary. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")set_diffrn_id; - void set_diffrn_id(const char* arg){ - cbf_failnez(cbf_set_diffrn_id(self,arg));} -%feature("autodoc", " -Returns : -*args : Float time,Integer timezone,Float precision - -C prototype: int cbf_set_timestamp (cbf_handle handle, unsigned int reserved, - double time, int timezone, double precision); - -CBFLib documentation: -DESCRIPTION -cbf_set_timestamp sets the collection timestamp in seconds since -January 1 1970 to the value specified by time. The timezone -difference from UTC -")set_timestamp; +")get_dictionary; - void set_timestamp(double time, int timezone, double precision){ - unsigned int reserved; - reserved = 0; - cbf_failnez(cbf_set_timestamp(self,reserved,time,timezone,precision)); - } +cbf_handle get_dictionary(){ + cbf_handle temp; + cbf_failnez(cbf_get_dictionary(self,&temp)); + return temp; +} %feature("autodoc", " -Returns : Float matrix_0,Float matrix_1,Float matrix_2,Float matrix_3, - Float matrix_4,Float matrix_5,Float matrix_6,Float matrix_7, - Float matrix_8 -*args : +Returns : +*args : CBFHandle dictionary -C prototype: int cbf_get_orientation_matrix (cbf_handle handle, - double ub_matrix[9]); +C prototype: int cbf_set_dictionary (cbf_handle handle, + cbf_handle dictionary_in); CBFLib documentation: DESCRIPTION -cbf_get_orientation_matrix sets ub_matrix to point to the array of -orientation matrix entries in the \"diffrn \" category in the order -of columns: - \"UB[1][1] \" \"UB[1][2] \" \"UB[1][3] \" \"UB[2][1] \" -\"UB[2][2] \" \"UB[2][3] \" \"UB[3][1] \" \"UB[3][2] \" -\"UB[3][3] \" -cbf_set_orientation_matrix sets the values in the \"diffrn \" -category to the values pointed to by ub_matrix. +cbf_get_dictionary sets *dictionary to the handle of a CBF which has +been associated with the CBF handle by cbf_set_dictionary. +cbf_set_dictionary associates the CBF handle dictionary_in with +handle as its dictionary. cbf_require_dictionary sets *dictionary to +the handle of a CBF which has been associated with the CBF handle by +cbf_set_dictionary or creates a new empty CBF and associates it with +handle, returning the new handle in *dictionary. ARGUMENTS -handle CBF handle. ubmatric Source or destination array of 9 -doubles giving the orientation matrix parameters. +handle CBF handle. dictionary Pointer to CBF handle of +dictionary. dictionary_in CBF handle of dcitionary. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_orientation_matrix; +")set_dictionary; -%apply double *OUTPUT {double *m0,double *m1,double *m2, -double *m3,double *m4, double *m5,double *m6, -double *m7,double *m8 } get_orientation_matrix; - void get_orientation_matrix( double *m0,double *m1, -double *m2,double *m3,double *m4,double *m5,double *m6, -double *m7,double *m8){ - double m[9]; - cbf_failnez(cbf_get_orientation_matrix(self,m)); - *m0 = m[0]; *m1=m[1] ; *m2=m[2] ; - *m3 = m[3]; *m4=m[4] ; *m5=m[5] ; - *m6 = m[6]; *m7=m[7] ; *m8=m[8] ; - } +void set_dictionary(cbf_handle other){ + cbf_failnez(cbf_set_dictionary(self,other)); +} %feature("autodoc", " -Returns : size_t ndimfast,size_t ndimslow -*args : Integer element_number +Returns : String categoryroot +*args : String categoryname -C prototype: int cbf_get_image_size_fs (cbf_handle handle, - unsigned int reserved, unsigned int element_number, - size_t *ndimfast, size_t *ndimslow); +C prototype: int cbf_find_category_root (cbf_handle handle, + const char* categoryname, const char** categoryroot); CBFLib documentation: DESCRIPTION -cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf -set *ndimslow and *ndimfast to the slow and fast dimensions of the -image array for element number element_number. If the array is -1-dimensional, *ndimslow will be set to the array size and *ndimfast -will be set to 1. If the array is 3-dimensional an error code will be -returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and -cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the -slowest, next fastest and fastest dimensions, respectively, of the 3D -image array for element number element_number. If the array is -1-dimensional, *ndimslow will be set to the array size and *ndimmid -and -")get_image_size_fs; +cbf_find_category_root sets *categoryroot to the root category of +which categoryname is an alias. cbf_set_category_root sets +categoryname_in as an alias of categoryroot in the dictionary +associated with handle, creating the dictionary if necessary. +cbf_require_category_root sets *categoryroot to the root category of +which categoryname is an alias, if there is one, or to the value of +categoryname, if categoryname is not an alias. +A returned categoryroot string must not be modified in any way. +ARGUMENTS +handle CBF handle. categoryname category name which +may be an alias. categoryroot pointer to a returned category +root name. categoryroot_in input category root name. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")find_category_root; -%apply int *OUTPUT {int *ndimfast, int *ndimslow} get_image_size_fs; - void get_image_size_fs(unsigned int element_number, int *ndimfast, int *ndimslow){ - unsigned int reserved; - size_t infast, inslow; - reserved = 0; - cbf_failnez(cbf_get_image_size_fs(self,reserved,element_number,&infast,&inslow)); - *ndimfast = (int)infast; /* FIXME - is that how to convert? */ - *ndimslow = (int)inslow; - } +const char* find_category_root(const char* categoryname){ + const char * result; + cbf_failnez(cbf_find_category_root(self,categoryname,&result)); + return result; +} %feature("autodoc", " -Returns : Float div_x_source,Float div_y_source,Float div_x_y_source -*args : +Returns : +*args : String categoryname,String categoryroot -C prototype: int cbf_get_divergence (cbf_handle handle, double *div_x_source, - double *div_y_source, double *div_x_y_source); +C prototype: int cbf_set_category_root (cbf_handle handle, + const char* categoryname_in, const char*categoryroot); CBFLib documentation: DESCRIPTION -cbf_get_divergence sets *div_x_source, *div_y_source and -*div_x_y_source to the corresponding source divergence parameters. -Any of the destination pointers may be NULL. +cbf_find_category_root sets *categoryroot to the root category of +which categoryname is an alias. cbf_set_category_root sets +categoryname_in as an alias of categoryroot in the dictionary +associated with handle, creating the dictionary if necessary. +cbf_require_category_root sets *categoryroot to the root category of +which categoryname is an alias, if there is one, or to the value of +categoryname, if categoryname is not an alias. +A returned categoryroot string must not be modified in any way. ARGUMENTS -handle CBF handle. div_x_source Pointer to the -destination div_x_source. div_y_source Pointer to the destination -div_y_source. div_x_y_source Pointer to the destination -div_x_y_source. +handle CBF handle. categoryname category name which +may be an alias. categoryroot pointer to a returned category +root name. categoryroot_in input category root name. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_divergence; +")set_category_root; -%apply double *OUTPUT {double *div_x_source, double *div_y_source, - double *div_x_y_source } get_divergence; - void get_divergence(double *div_x_source, double *div_y_source, - double *div_x_y_source){ - cbf_failnez(cbf_get_divergence(self, - div_x_source, - div_y_source, - div_x_y_source)); - } +void set_category_root(const char* categoryname, const char* categoryroot){ + cbf_failnez(cbf_set_category_root(self,categoryname,categoryroot)); +} +%feature("autodoc", " +Returns : String categoryroot +*args : String Categoryname -/* cfunc cbf_rewind_category pyfunc rewind_category - arg cbf_handle handle */ +C prototype: int cbf_require_category_root (cbf_handle handle, + const char* categoryname, const char** categoryroot); + +CBFLib documentation: +DESCRIPTION +cbf_find_category_root sets *categoryroot to the root category of +which categoryname is an alias. cbf_set_category_root sets +categoryname_in as an alias of categoryroot in the dictionary +associated with handle, creating the dictionary if necessary. +cbf_require_category_root sets *categoryroot to the root category of +which categoryname is an alias, if there is one, or to the value of +categoryname, if categoryname is not an alias. +A returned categoryroot string must not be modified in any way. +ARGUMENTS +handle CBF handle. categoryname category name which +may be an alias. categoryroot pointer to a returned category +root name. categoryroot_in input category root name. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")cbf_require_category_root; +const char* require_category_root (const char* categoryname){ + const char* result; + cbf_failnez(cbf_require_category_root(self,categoryname, &result)); + return result; +} %feature("autodoc", " -Returns : -*args : +Returns : String tagroot +*args : String tagname -C prototype: int cbf_rewind_category (cbf_handle handle); +C prototype: int cbf_find_tag_root (cbf_handle handle, const char* tagname, + const char** tagroot); CBFLib documentation: DESCRIPTION -cbf_rewind_category makes the first category in the current data -block the current category. cbf_rewind_saveframe makes the first -saveframe in the current data block the current saveframe. -cbf_rewind_blockitem makes the first blockitem (category or -saveframe) in the current data block the current blockitem. The type -of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type. -If there are no categories, saveframes or blockitems the function -returns CBF_NOTFOUND. -The current column and row become undefined. +cbf_find_tag_root sets *tagroot to the root tag of which tagname is +an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in +the dictionary associated with handle, creating the dictionary if +necessary. cbf_require_tag_root sets *tagroot to the root tag of +which tagname is an alias, if there is one, or to the value of +tagname, if tagname is not an alias. +A returned tagroot string must not be modified in any way. ARGUMENTS -handle CBF handle. type CBF handle. +handle CBF handle. tagname tag name which may be an alias. +tagroot pointer to a returned tag root name. tagroot_in input +tag root name. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")rewind_category; - void rewind_category(void){ - cbf_failnez(cbf_rewind_category(self));} +---------------------------------------------------------------------- +")find_tag_root; + +const char * find_tag_root(const char* tagname){ + const char* result; + cbf_failnez(cbf_find_tag_root(self,tagname,&result)); + return result; +} %feature("autodoc", " Returns : -*args : String filename +*args : String tagname,String tagroot_in -C prototype: int cbf_read_template (cbf_handle handle, FILE *file); +C prototype: int cbf_set_tag_root (cbf_handle handle, const char* tagname, + const char*tagroot_in); CBFLib documentation: DESCRIPTION -cbf_read_template reads the CBF or CIF file file into the CBF object -specified by handle and selects the first datablock as the current -datablock. +cbf_find_tag_root sets *tagroot to the root tag of which tagname is +an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in +the dictionary associated with handle, creating the dictionary if +necessary. cbf_require_tag_root sets *tagroot to the root tag of +which tagname is an alias, if there is one, or to the value of +tagname, if tagname is not an alias. +A returned tagroot string must not be modified in any way. ARGUMENTS -handle Pointer to a CBF handle. file Pointer to a file -descriptor. +handle CBF handle. tagname tag name which may be an alias. +tagroot pointer to a returned tag root name. tagroot_in input +tag root name. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")read_template; - - void read_template(char* filename){ - /* CBFlib needs a stream that will remain open - hence DO NOT open from python */ - FILE *stream; - if ( ! ( stream = fopen (filename, "rb")) ){ - cbf_failnez(CBF_FILEOPEN); - } - else{ - cbf_failnez(cbf_read_template (self, stream)); } - } - - -/* cfunc cbf_select_row pyfunc select_row - arg cbf_handle handle arg unsigned int row */ +")set_tag_root; +void set_tag_root(const char* tagname, const char* tagroot_in){ + cbf_failnez(cbf_set_tag_root(self,tagname,tagroot_in)); +} %feature("autodoc", " -Returns : -*args : Integer +Returns : String tagroot +*args : String tagname -C prototype: int cbf_select_row (cbf_handle handle, unsigned int row); +C prototype: int cbf_require_tag_root (cbf_handle handle, const char* tagname, + const char** tagroot); CBFLib documentation: DESCRIPTION -cbf_select_row selects row number row in the current category as the -current row. -The first row is number 0. -The current column is not affected -If the row does not exist, the function returns CBF_NOTFOUND. +cbf_find_tag_root sets *tagroot to the root tag of which tagname is +an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in +the dictionary associated with handle, creating the dictionary if +necessary. cbf_require_tag_root sets *tagroot to the root tag of +which tagname is an alias, if there is one, or to the value of +tagname, if tagname is not an alias. +A returned tagroot string must not be modified in any way. ARGUMENTS -handle CBF handle. row Number of the row to select. +handle CBF handle. tagname tag name which may be an alias. +tagroot pointer to a returned tag root name. tagroot_in input +tag root name. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")select_row; - void select_row(unsigned int arg){ - cbf_failnez(cbf_select_row(self,arg));} +---------------------------------------------------------------------- +")require_tag_root; + +const char* require_tag_root(const char* tagname){ + const char* result; + cbf_failnez(cbf_require_tag_root(self,tagname,&result)); + return result; + } %feature("autodoc", " -Returns : (Binary)String -*args : int element_number,int elsize,int elsign,int ndimfast,int ndimslow +Returns : String categoryname +*args : String tagname -C prototype: int cbf_get_image_fs (cbf_handle handle, unsigned int reserved, - unsigned int element_number, void *array, size_t elsize, - int elsign, size_t ndimfast, size_t ndimslow); +C prototype: int cbf_find_tag_category (cbf_handle handle, + const char* tagname, const char** categoryname); CBFLib documentation: DESCRIPTION -cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image -array for element number element_number into an array. The array -consists of ndimslow *ndimfast elements of elsize bytes each, -starting at array. The elements are signed if elsign is non-0 and -unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and -cbf_get_real_image_sf read the image array of IEEE doubles or floats -for element number element_number into an array. A real array is -always signed. cbf_get_3d_image, cbf_get_3d_image_fs and -cbf_get_3d_image_sf read the 3D image array for element number -element_number into an array. The array consists of ndimslow *ndimmid -*ndimfast elements of elsize bytes each, starting at array. The -elements are signed if elsign is non-0 and unsigned otherwise. -cbf_get_real_3d_image, cbf_get_real_3d_image_fs, -cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or -floats for element number element_number into an array. A real array -is always signed. -The _fs calls give the dimensions in a fast-to-slow order. The calls -with no suffix and the calls _sf calls give the dimensions in -slow-to-fast order -The structure of the array as a 1-, 2- or 3-dimensional array should -agree with the structure of the array given in the -ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, -ndimslow should be the array size and ndimfast and, for the 3D calls, -ndimmid, should be set to 1 both in the call and in the imgCIF data -being processed. If the array is 2-dimensional and a 3D call is used, -ndimslow and ndimmid should be the -")get_image_fs_as_string; - -// Ensure we free the local temporary - -%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) - get_image_fs_as_string; +cbf_find_tag_category sets categoryname to the category associated +with tagname in the dictionary associated with handle. +cbf_set_tag_category upddates the dictionary associated with handle +to indicated that tagname is in category categoryname_in. +ARGUMENTS +handle CBF handle. tagname tag name. +categoryname pointer to a returned category name. +categoryname_in input category name. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")find_tag_category; -// Get the length correct - void get_image_fs_as_string(int element_number, char **s, int *slen, - int elsize, int elsign, int ndimfast, int ndimslow){ - void *array; - int reserved = 0; - *slen = 0; /* Initialise in case of problems */ - if ((array=malloc(elsize*ndimfast*ndimslow))) { - cbf_failnez (cbf_get_image_fs(self, - reserved, (unsigned int)element_number, - (void *)array, (size_t)elsize, elsign, - (size_t) ndimfast, (size_t)ndimslow)); - }else{ - cbf_failnez(CBF_ALLOC); - } - *slen = elsize*ndimfast*ndimslow; - *s = (char *) array; - } + const char * find_tag_category(const char *tagname){ + const char * result; + cbf_failnez(cbf_find_tag_category(self,tagname, &result)); + return result; + } %feature("autodoc", " -Returns : size_t ndimslow,size_t ndimfast -*args : Integer element_number +Returns : +*args : String tagname,String categoryname_in -C prototype: int cbf_get_image_size_sf (cbf_handle handle, - unsigned int reserved, unsigned int element_number, - size_t *ndimslow, size_t *ndimfast); +C prototype: int cbf_set_tag_category (cbf_handle handle, const char* tagname, + const char* categoryname_in); CBFLib documentation: DESCRIPTION -cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf -set *ndimslow and *ndimfast to the slow and fast dimensions of the -image array for element number element_number. If the array is -1-dimensional, *ndimslow will be set to the array size and *ndimfast -will be set to 1. If the array is 3-dimensional an error code will be -returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and -cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the -slowest, next fastest and fastest dimensions, respectively, of the 3D -image array for element number element_number. If the array is -1-dimensional, *ndimslow will be set to the array size and *ndimmid -and -")get_image_size_sf; +cbf_find_tag_category sets categoryname to the category associated +with tagname in the dictionary associated with handle. +cbf_set_tag_category upddates the dictionary associated with handle +to indicated that tagname is in category categoryname_in. +ARGUMENTS +handle CBF handle. tagname tag name. +categoryname pointer to a returned category name. +categoryname_in input category name. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_tag_category; -%apply int *OUTPUT {int *ndimslow, int *ndimfast} get_image_size_sf; - void get_image_size_sf(unsigned int element_number, int *ndimslow, int *ndimfast){ - unsigned int reserved; - size_t inslow, infast; - reserved = 0; - cbf_failnez(cbf_get_image_size(self,reserved,element_number,&inslow,&infast)); - *ndimslow = (int)inslow; - *ndimfast = (int)infast; - } + void set_tag_category(const char *tagname, const char* categoryname_in){ + cbf_failnez(cbf_set_tag_category(self,tagname, categoryname_in)); + } %feature("autodoc", " -Returns : (Binary)String -*args : int element_number,int elsize,int ndimfast,int ndimslow - -C prototype: int cbf_get_real_image_fs (cbf_handle handle, - unsigned int reserved, unsigned int element_number, - void *array, size_t elsize, size_t ndimfast, - size_t ndimslow); +Returns : +*args : String filename + +C prototype: int cbf_read_template (cbf_handle handle, FILE *file); CBFLib documentation: DESCRIPTION -cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image -array for element number element_number into an array. The array -consists of ndimslow *ndimfast elements of elsize bytes each, -starting at array. The elements are signed if elsign is non-0 and -unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and -cbf_get_real_image_sf read the image array of IEEE doubles or floats -for element number element_number into an array. A real array is -always signed. cbf_get_3d_image, cbf_get_3d_image_fs and -cbf_get_3d_image_sf read the 3D image array for element number -element_number into an array. The array consists of ndimslow *ndimmid -*ndimfast elements of elsize bytes each, starting at array. The -elements are signed if elsign is non-0 and unsigned otherwise. -cbf_get_real_3d_image, cbf_get_real_3d_image_fs, -cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or -floats for element number element_number into an array. A real array -is always signed. -The _fs calls give the dimensions in a fast-to-slow order. The calls -with no suffix and the calls _sf calls give the dimensions in -slow-to-fast order -The structure of the array as a 1-, 2- or 3-dimensional array should -agree with the structure of the array given in the -ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, -ndimslow should be the array size and ndimfast and, for the 3D calls, -ndimmid, should be set to 1 both in the call and in the imgCIF data -being processed. If the array is 2-dimensional and a 3D call is used, -ndimslow and ndimmid should be the -")get_real_image_fs_as_string; - -// Ensure we free the local temporary - -%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) - get_real_image_fs_as_string; +cbf_read_template reads the CBF or CIF file file into the CBF object +specified by handle and selects the first datablock as the current +datablock. +ARGUMENTS +handle Pointer to a CBF handle. file Pointer to a file +descriptor. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")read_template; -// Get the length correct + void read_template(char* filename){ + /* CBFlib needs a stream that will remain open + hence DO NOT open from python */ + FILE *stream; + if ( ! ( stream = fopen (filename, "rb")) ){ + cbf_failnez(CBF_FILEOPEN); + } + else{ + cbf_failnez(cbf_read_template (self, stream)); } + } - void get_real_image_fs_as_string(int element_number, char **s, int *slen, - int elsize, int ndimfast, int ndimslow){ - void *array; - int reserved = 0; - *slen = 0; /* Initialise in case of problems */ - if ((array=malloc(elsize*ndimfast*ndimslow))) { - cbf_failnez (cbf_get_real_image_fs(self, - reserved, (unsigned int)element_number, - (void *)array, (size_t)elsize, - (size_t) ndimfast, (size_t)ndimslow)); - }else{ - cbf_failnez(CBF_ALLOC); - } - *slen = elsize*ndimfast*ndimslow; - *s = (char *) array; - } -/* cfunc cbf_count_columns pyfunc count_columns - arg cbf_handle handle arg unsigned int *columns */ +/* cfunc cbf_get_diffrn_id pyfunc get_diffrn_id + arg cbf_handle handle arg const char **diffrn_id */ %feature("autodoc", " -Returns : Integer -*args : +Returns : +*args : string -C prototype: int cbf_count_columns (cbf_handle handle, unsigned int *columns); +C prototype: int cbf_get_diffrn_id (cbf_handle handle, + const char **diffrn_id); CBFLib documentation: DESCRIPTION -cbf_count_columns puts the number of columns in the current category -in *columns. +cbf_get_diffrn_id sets *diffrn_id to point to the ASCII value of the +\"diffrn.id \" entry. cbf_require_diffrn_id also sets *diffrn_id to +point to the ASCII value of the \"diffrn.id \" entry, but, if the +\"diffrn.id \" entry does not exist, it sets the value in the CBF and +in*diffrn_id to the character string given by default_id, creating +the category and column is necessary. +The diffrn_id will be valid as long as the item exists and has not +been set to a new value. +The diffrn_id must not be modified by the program in any way. ARGUMENTS -handle CBF handle. columns Pointer to the destination column -count. +handle CBF handle. diffrn_id Pointer to the destination +value pointer. default_id Character string default value. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")count_columns; - unsigned int count_columns(void){ - unsigned int result; - cbf_failnez(cbf_count_columns(self,&result)); - return result;} +---------------------------------------------------------------------- +")get_diffrn_id; + const char* get_diffrn_id(void){ + const char* result; + cbf_failnez(cbf_get_diffrn_id(self, &result)); + return result;} + +/* cfunc cbf_set_diffrn_id pyfunc set_diffrn_id + arg cbf_handle handle arg const char *diffrn_id */ + %feature("autodoc", " -Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, - int elements,int minelement,int maxelement,char **bo,int *bolen, - int dimfast,int dimmid,int dimslow,int padding +Returns : string *args : -C prototype: int cbf_get_integerarrayparameters_wdims (cbf_handle handle, - unsigned int *compression, int *binary_id, size_t *elsize, - int *elsigned, int *elunsigned, size_t *elements, - int *minelement, int *maxelement, const char **byteorder, - size_t *dimfast, size_t *dimmid, size_t *dimslow, - size_t *padding); +C prototype: int cbf_set_diffrn_id (cbf_handle handle, const char *diffrn_id); CBFLib documentation: DESCRIPTION -cbf_get_integerarrayparameters sets *compression, *binary_id, -*elsize, *elsigned, *elunsigned, *elements, *minelement and -*maxelement to values read from the binary value of the item at the -current column and row. This provides all the arguments needed for a -subsequent call to cbf_set_integerarray, if a copy of the array is to -be made into another CIF or CBF. cbf_get_realarrayparameters sets -*compression, *binary_id, *elsize, *elements to values read from the -binary value of the item at the current column and row. This provides -all the arguments needed for a subsequent call to cbf_set_realarray, -if a copy of the arry is to be made into another CIF or CBF. -The variants cbf_get_integerarrayparameters_wdims, -cbf_get_integerarrayparameters_wdims_fs, -cbf_get_integerarrayparameters_wdims_sf, -cbf_get_realarrayparameters_wdims, -cbf_get_realarrayparameters_wdims_fs, -cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, -*dimmid, *dimslow, and *padding as well, providing the additional -parameters needed for a subsequent call to cbf_set_integerarray_wdims -or cbf_set_realarray_wdims. -The value returned in *byteorder is a pointer either to the string -\"little_endian \" or to the string \"big_endian \". This should be -the byte order of the data, not necessarily of the host machine. No -attempt should be made to modify this string. At this time only -\"little_endian \" will be returned. -The values returned in *dimfast, *dimmid and *dimslow are the sizes -of the fastest changing, second fastest changing and third fastest -changing dimensions of the array, if specified, or zero, if not -specified. -The value returned in *padding is the size of the post-data padding, -if any and if specified in the data header. The value is given as a -count of octets. -If the value is not binary, the function returns CBF_ASCII. +cbf_set_diffrn_id sets the \"diffrn.id \" entry of the current +datablock to the ASCII value diffrn_id. +This function also changes corresponding \"diffrn_id \" entries in +the \"diffrn_source \", \"diffrn_radiation \", \"diffrn_detector +\" and \"diffrn_measurement \" categories. ARGUMENTS -handle CBF handle. compression Compression method used. -elsize Size in bytes of each array element. binary_id -Pointer to the destination integer binary identifier. elsigned -Pointer to an integer. Set to 1 if the elements can be read as signed -integers. elunsigned Pointer to an integer. Set to 1 if the -elements can be read as unsigned integers. elements Pointer to -the destination number of elements. minelement Pointer to the -destination smallest element. maxelement Pointer to the -destination largest element. byteorder Pointer to the destination -byte order. dimfast Pointer to the destination fastest -dimension. dimmid Pointer to the destination second fastest -dimension. dimslow Pointer to the destination third fastest -dimension. padding Pointer to the destination padding size. +handle CBF handle. diffrn_id ASCII value. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")get_integerarrayparameters_wdims; +---------------------------------------------------------------------- +")set_diffrn_id; + void set_diffrn_id(const char* arg){ + cbf_failnez(cbf_set_diffrn_id(self,arg));} -%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); -%apply int *OUTPUT {int *compression,int *binary_id, - int *elsize, int *elsigned, int *elunsigned, - int *elements, int *minelement, int *maxelement, - int *dimfast, int *dimmid, int *dimslow, int *padding} - get_integerarrayparameters_wdims; +/* cfunc cbf_get_crystal_id pyfunc get_crystal_id + arg cbf_handle handle arg const char **crystal_id */ - void get_integerarrayparameters_wdims(int *compression,int *binary_id, - int *elsize, int *elsigned, int *elunsigned, - int *elements, int *minelement, int *maxelement, - char **bo, int *bolen, - int *dimfast, int *dimmid, int *dimslow, int *padding - ){ - unsigned int comp; - size_t elsiz, elem, df,dm,ds,pd; - const char * byteorder; - char * bot; - cbf_failnez(cbf_get_integerarrayparameters_wdims(self, - &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, - minelement, maxelement, &byteorder,&df,&dm,&ds,&pd )); - *bolen = strlen(byteorder); - if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} - strncpy(bot,byteorder,*bolen); - *bo = bot; - *compression = comp; - *elsize = elsiz; - *elements = elem; - *dimfast = df; - *dimmid = dm; - *dimslow = ds; - *padding = pd; - - } %feature("autodoc", " -Returns : Float gain,Float gain_esd -*args : +Returns : +*args : string -C prototype: int cbf_get_gain (cbf_handle handle, unsigned int element_number, - double *gain, double *gain_esd); +C prototype: int cbf_get_crystal_id (cbf_handle handle, + const char **crystal_id); CBFLib documentation: DESCRIPTION -cbf_get_gain sets *gain and *gain_esd to the corresponding gain -parameters for element number element_number. -Either of the destination pointers may be NULL. +cbf_get_crystal_id sets *crystal_id to point to the ASCII value of +the \"diffrn.crystal_id \" entry. +If the value is not ASCII, the function returns CBF_BINARY. +The value will be valid as long as the item exists and has not been +set to a new value. +The value must not be modified by the program in any way. ARGUMENTS -handle CBF handle. element_number The number of the -detector element counting from 0 by order of appearance in the -\"diffrn_data_frame \" category. gain Pointer to the -destination gain. gain_esd Pointer to the destination -gain_esd. +handle CBF handle. crystal_id Pointer to the destination +value pointer. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_gain; - -%apply double *OUTPUT {double *gain, double *gain_esd} get_gain; - void get_gain (unsigned int element_number, double *gain, - double *gain_esd){ - cbf_failnez(cbf_get_gain (self, element_number, gain, gain_esd)); - } - -/* cfunc cbf_new_saveframe pyfunc new_saveframe - arg cbf_handle handle arg const char *saveframename */ +")get_crystal_id; + const char* get_crystal_id(void){ + const char* result; + cbf_failnez(cbf_get_crystal_id(self, &result)); + return result;} + +/* cfunc cbf_set_crystal_id pyfunc set_crystal_id + arg cbf_handle handle arg const char *crystal_id */ %feature("autodoc", " Returns : string *args : -C prototype: int cbf_new_saveframe (cbf_handle handle, - const char *saveframename); +C prototype: int cbf_set_crystal_id (cbf_handle handle, + const char *crystal_id); CBFLib documentation: DESCRIPTION -cbf_new_datablock creates a new data block with name datablockname -and makes it the current data block. cbf_new_saveframe creates a new -save frame with name saveframename within the current data block and -makes the new save frame the current save frame. -If a data block or save frame with this name already exists, the -existing data block or save frame becomes the current data block or -save frame. +cbf_set_crystal_id sets the \"diffrn.crystal_id \" entry to the +ASCII value crystal_id. ARGUMENTS -handle CBF handle. datablockname The name of the new data -block. saveframename The name of the new save frame. +handle CBF handle. crystal_id ASCII value. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")new_saveframe; - void new_saveframe(const char* arg){ - cbf_failnez(cbf_new_saveframe(self,arg));} +---------------------------------------------------------------------- +")set_crystal_id; + void set_crystal_id(const char* arg){ + cbf_failnez(cbf_set_crystal_id(self,arg));} + +/* cfunc cbf_get_wavelength pyfunc get_wavelength + arg cbf_handle handle arg double *wavelength */ + %feature("autodoc", " -Returns : -*args : Float polarizn_source_ratio,Float polarizn_source_norm +Returns : double +*args : -C prototype: int cbf_set_polarization (cbf_handle handle, - double polarizn_source_ratio, - double polarizn_source_norm); +C prototype: int cbf_get_wavelength (cbf_handle handle, double *wavelength); CBFLib documentation: DESCRIPTION -cbf_set_polarization sets the source polarization to the values -specified by polarizn_source_ratio and polarizn_source_norm. +cbf_get_wavelength sets *wavelength to the current wavelength in AA. ARGUMENTS -handle CBF handle. polarizn_source_ratio New value -of polarizn_source_ratio. polarizn_source_norm New value of -polarizn_source_norm. +handle CBF handle. wavelength Pointer to the destination. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")set_polarization; +")get_wavelength; + double get_wavelength(void){ + double result; + cbf_failnez(cbf_get_wavelength(self,&result)); + return result;} + +/* cfunc cbf_set_wavelength pyfunc set_wavelength + arg cbf_handle handle arg double wavelength */ - void set_polarization (double polarizn_source_ratio, - double polarizn_source_norm){ - cbf_failnez(cbf_set_polarization(self, - polarizn_source_ratio, - polarizn_source_norm)); - } %feature("autodoc", " -Returns : -*args : int element_number,int compression,(binary) String data,int elsize, - int dimslow,int dimmid,int dimfast +Returns : double wavelength +*args : -C prototype: int cbf_set_real_3d_image (cbf_handle handle, - unsigned int reserved, unsigned int element_number, - unsigned int compression, void *array,size_t elsize, - size_t ndimslow, size_t ndimmid, size_t ndimfast); +C prototype: int cbf_set_wavelength (cbf_handle handle, double wavelength); CBFLib documentation: DESCRIPTION -cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image -array for element number element_number. The array consists of -ndimfast *ndimslow elements of elsize bytes each, starting at array. -The elements are signed if elsign is non-zero and unsigned otherwise. -cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf -write the image array for element number element_number. The array -consists of ndimfast *ndimslow IEEE double or float elements of -elsize bytes each, starting at array. cbf_set_3d_image, -cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array -for element number element_number. The array consists of ndimfast -*ndimmid *ndimslow elements of elsize bytes each, starting at array. -The elements are signed if elsign is non-0 and unsigned otherwise. -cbf_set_real_3d_image, cbf_set_real_3d_image_fs and -cbf_set_real_3d_image_sf writes the 3D image array for element number -element_number. The array consists of ndimfast *ndimmid *ndimslow -IEEE double or float elements of elsize bytes each, starting at -array. -The _fs calls give the dimensions in a fast-to-slow order. The calls -with no suffix and the calls _sf calls give the dimensions in -slow-to-fast order -If the array is 1-dimensional, ndimslow should be the array size and -ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the -array is 2-dimensional and the 3D calls are used, ndimslow and -ndimmid should be used for the array dimensions and ndimfast should -be set to 1. -The array will be compressed using the compression scheme specifed by -compression. Currently, the available schemes are: -CBF_CANONICAL Canonical-code compression (section 3.3.1) -CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET -Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple -\"nibble_offset \" compression. CBF_NONE No compression. -The values compressed are limited to 64 bits. If any element in the -array is larger than 64 bits, the value compressed is the nearest -64-bit value. -Currently, the source array must consist of chars, shorts or ints -(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for -cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof -(int), sizeof(double) or sizeof(float), the function returns -CBF_ARGUMENT. -The parameter reserved is presently unused and should be set to 0. +cbf_set_wavelength sets the current wavelength in AA to wavelength. ARGUMENTS -handle CBF handle. reserved Unused. Any value other -than 0 is invalid. element_number The number of the detector -element counting from 0 by order of appearance in the -\"diffrn_data_frame \" category. compression Compression type. -array Pointer to the image array. elsize Size in -bytes of each image array element. elsigned Set to non-0 if -the image array elements are signed. ndimslow Slowest array -dimension. ndimmid Second slowest array dimension. ndimfast - Fastest array dimension. +handle CBF handle. wavelength Wavelength in AA. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")set_real_3d_image; - - /* CBFlib must NOT modify the data string which belongs to the scripting - language we will get and check the length via a typemap */ - -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_3d_image_sf; - - void set_real_3d_image(unsigned int element_number, - unsigned int compression, - char *data, int len, int elsize, int ndimslow, int ndimmid, int ndimfast){ - /* safety check on args */ - size_t els; - unsigned int reserved; - void *array; - if(len == elsize*ndimslow*ndimmid*ndimfast){ - array = data; - els = elsize; - reserved = 0; - cbf_failnez(cbf_set_real_3d_image (self, reserved, element_number, compression, - (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); - }else{ - cbf_failnez(CBF_ARGUMENT); - } - } - -/* cfunc cbf_delete_row pyfunc delete_row - arg cbf_handle handle arg unsigned int rownumber */ - +")set_wavelength; + void set_wavelength(double wavelength){ + cbf_failnez(cbf_set_wavelength(self,wavelength));} %feature("autodoc", " -Returns : -*args : Integer +Returns : float polarizn_source_ratio,float polarizn_source_norm +*args : -C prototype: int cbf_delete_row (cbf_handle handle, unsigned int rownumber); +C prototype: int cbf_get_polarization (cbf_handle handle, + double *polarizn_source_ratio, + double *polarizn_source_norm); CBFLib documentation: DESCRIPTION -cbf_delete_row deletes a row from the current category. Rows starting -from rownumber +1 are moved down by 1. If the current row was higher -than rownumber, or if the current row is the last row, it will also -move down by 1. -The row numbers start from 0. +cbf_get_polarization sets *polarizn_source_ratio and +*polarizn_source_norm to the corresponding source polarization +parameters. +Either destination pointer may be NULL. ARGUMENTS -handle CBF handle. rownumber The number of the row to delete. +handle CBF handle. polarizn_source_ratio Pointer +to the destination polarizn_source_ratio. polarizn_source_norm +Pointer to the destination polarizn_source_norm. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")delete_row; - void delete_row(unsigned int arg){ - cbf_failnez(cbf_delete_row(self,arg));} - -/* cfunc cbf_column_name pyfunc column_name - arg cbf_handle handle arg const char **columnname */ +---------------------------------------------------------------------- +")get_polarization; + /* Returns a pair of double values */ +%apply double *OUTPUT { double *in1, double *in2 }; + void get_polarization(double *in1,double *in2){ + cbf_failnez(cbf_get_polarization (self, in1, in2)); + } %feature("autodoc", " Returns : -*args : string +*args : Float polarizn_source_ratio,Float polarizn_source_norm -C prototype: int cbf_column_name (cbf_handle handle, const char **columnname); +C prototype: int cbf_set_polarization (cbf_handle handle, + double polarizn_source_ratio, + double polarizn_source_norm); CBFLib documentation: DESCRIPTION -cbf_column_name sets *columnname to point to the name of the current -column of the current category. -The column name will be valid as long as the column exists. -The name must not be modified by the program in any way. -cbf_set_column_name sets the name of the current column to -newcolumnname +cbf_set_polarization sets the source polarization to the values +specified by polarizn_source_ratio and polarizn_source_norm. ARGUMENTS -handle CBF handle. columnname Pointer to the -destination column name pointer. newcolumnname New column name -pointer. +handle CBF handle. polarizn_source_ratio New value +of polarizn_source_ratio. polarizn_source_norm New value of +polarizn_source_norm. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")column_name; - const char* column_name(void){ - const char* result; - cbf_failnez(cbf_column_name(self, &result)); - return result;} - -/* cfunc cbf_remove_saveframe pyfunc remove_saveframe - arg cbf_handle handle */ +---------------------------------------------------------------------- +")set_polarization; + void set_polarization (double polarizn_source_ratio, + double polarizn_source_norm){ + cbf_failnez(cbf_set_polarization(self, + polarizn_source_ratio, + polarizn_source_norm)); + } %feature("autodoc", " -Returns : +Returns : Float div_x_source,Float div_y_source,Float div_x_y_source *args : -C prototype: int cbf_remove_saveframe (cbf_handle handle); +C prototype: int cbf_get_divergence (cbf_handle handle, double *div_x_source, + double *div_y_source, double *div_x_y_source); CBFLib documentation: DESCRIPTION -cbf_remove_datablock deletes the current data block. -cbf_remove_saveframe deletes the current save frame. -The current data block becomes undefined. +cbf_get_divergence sets *div_x_source, *div_y_source and +*div_x_y_source to the corresponding source divergence parameters. +Any of the destination pointers may be NULL. ARGUMENTS -handle CBF handle. +handle CBF handle. div_x_source Pointer to the +destination div_x_source. div_y_source Pointer to the destination +div_y_source. div_x_y_source Pointer to the destination +div_x_y_source. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")remove_saveframe; - void remove_saveframe(void){ - cbf_failnez(cbf_remove_saveframe(self));} +---------------------------------------------------------------------- +")get_divergence; + +%apply double *OUTPUT {double *div_x_source, double *div_y_source, + double *div_x_y_source } get_divergence; + void get_divergence(double *div_x_source, double *div_y_source, + double *div_x_y_source){ + cbf_failnez(cbf_get_divergence(self, + div_x_source, + div_y_source, + div_x_y_source)); + } %feature("autodoc", " Returns : -*args : int compression,int binary_id,(binary) String data,int elsize, - int elsigned,int elements,String byteorder,int dimslow,int dimmid, - int dimfast,int padding +*args : Float div_x_source,Float div_y_source,Float div_x_y_source -C prototype: int cbf_set_integerarray_wdims_sf (cbf_handle handle, - unsigned int compression, int binary_id, void *array, - size_t elsize, int elsigned, size_t elements, - const char *byteorder, size_t dimslow, size_t dimmid, - size_t dimfast, size_t padding); +C prototype: int cbf_set_divergence (cbf_handle handle, double div_x_source, + double div_y_source, double div_x_y_source); CBFLib documentation: DESCRIPTION -cbf_set_integerarray sets the binary value of the item at the current -column and row to an integer array. The array consists of elements -elements of elsize bytes each, starting at array. The elements are -signed if elsigned is non-0 and unsigned otherwise. binary_id is the -binary section identifier. cbf_set_realarray sets the binary value of -the item at the current column and row to an integer array. The array -consists of elements elements of elsize bytes each, starting at -array. binary_id is the binary section identifier. -The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, -cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, -cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants -allow the data header values of byteorder, dimfast, dimmid, dimslow -and padding to be set to the data byte order, the fastest, second -fastest and third fastest array dimensions and the size in byte of -the post data padding to be used. -The array will be compressed using the compression scheme specifed by -compression. Currently, the available schemes are: -CBF_CANONICAL Canonical-code compression (section 3.3.1) -CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple -\"nibble_offset \" compression. CBF_NONE No compression. -NOTE: This scheme is by far the slowest of the four and uses much -more disk space. It is intended for routine use with small arrays -only. With large arrays (like images) it should be used only for -debugging. -The values compressed are limited to 64 bits. If any element in the -array is larger than 64 bits, the value compressed is the nearest -64-bit value. -Currently, the source array must consist of chars, shorts or ints -(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or -floats for cbf_set_realarray. If elsize is not equal to sizeof -(char), sizeof (short) or sizeof (int), the function returns -CBF_ARGUMENT. +cbf_set_divergence sets the source divergence parameters to the +values specified by div_x_source, div_y_source and div_x_y_source. ARGUMENTS -handle CBF handle. compression Compression method to use. -binary_id Integer binary identifier. array Pointer to the -source array. elsize Size in bytes of each source array -element. elsigned Set to non-0 if the source array elements are -signed. elements: The number of elements in the array. +handle CBF handle. div_x_source New value of +div_x_source. div_y_source New value of div_y_source. +div_x_y_source New value of div_x_y_source. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")set_integerarray_wdims_sf; +---------------------------------------------------------------------- +")set_divergence; - /* CBFlib must NOT modify the data string nor the byteorder string - which belongs to the scripting - language we will get and check the length via a typemap */ + void set_divergence ( double div_x_source, double div_y_source, + double div_x_y_source){ + cbf_failnez(cbf_set_divergence (self, div_x_source, + div_y_source,div_x_y_source)); + } -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray_wdims_sf; -%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_integerarray_wdims_sf; +/* cfunc cbf_count_elements pyfunc count_elements + arg cbf_handle handle arg unsigned int *elements */ - void set_integerarray_wdims_sf(unsigned int compression, int binary_id, - char *data, int len, int elsize, int elsigned, int elements, - char *bo, int bolen, int dimslow, int dimmid, int dimfast, int padding){ - /* safety check on args */ - size_t els, ele; - void *array; - char byteorder[15]; - if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ - array = data; - els = elsize; - ele = elements; - strncpy(byteorder,bo,bolen<15?bolen:14); - byteorder[bolen<15?bolen:14] = 0; - cbf_failnez(cbf_set_integerarray_wdims_sf (self, compression, binary_id, - (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder, - (size_t)dimslow, (size_t)dimmid, (size_t)dimfast, (size_t)padding)); - }else{ - cbf_failnez(CBF_ARGUMENT); - } - } %feature("autodoc", " -Returns : String Value -*args : String defaultvalue +Returns : Integer +*args : -C prototype: int cbf_require_value (cbf_handle handle, const char **value, - const char *defaultvalue ); +C prototype: int cbf_count_elements (cbf_handle handle, + unsigned int *elements); CBFLib documentation: DESCRIPTION -cbf_get_value sets *value to point to the ASCII value of the item at -the current column and row. cbf_require_value sets *value to point to -the ASCII value of the item at the current column and row, creating -the data item if necessary and initializing it to a copy of -defaultvalue. -If the value is not ASCII, the function returns CBF_BINARY. -The value will be valid as long as the item exists and has not been -set to a new value. -The value must not be modified by the program in any way. +cbf_count_elements sets *elements to the number of detector elements. ARGUMENTS -handle CBF handle. value Pointer to the destination -value pointer. defaultvalue Default value character string. +handle CBF handle. elements Pointer to the destination count. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")require_value; +---------------------------------------------------------------------- +")count_elements; + unsigned int count_elements(void){ + unsigned int result; + cbf_failnez(cbf_count_elements(self,&result)); + return result;} +/* cfunc cbf_get_element_number pyfunc get_element_number + arg cbf_handle handle arg const char *element_id arg const char *array_id arg const char *array_section_id arg unsigned int *element_number */ - const char* require_value(const char* defaultvalue){ - const char * result; - cbf_failnez(cbf_require_value(self, &result, defaultvalue)); - return result; - } + void get_element_number(void){ + cbf_failnez(CBF_NOTIMPLEMENTED);} %feature("autodoc", " -Returns : Int Value -*args : String Columnvalue,Int default +Returns : String +*args : Integer element_number -C prototype: int cbf_require_column_integervalue (cbf_handle handle, - const char *columnname, int *number, - const int defaultvalue); +C prototype: int cbf_get_element_id (cbf_handle handle, + unsigned int element_number, const char **element_id); CBFLib documentation: DESCRIPTION -cbf_require_column_doublevalue sets *number to the value of the ASCII -item at the current row for the column given with the name given by -*columnname, with the value interpreted as an integer number, or to -the number given by defaultvalue if the item cannot be found. +cbf_get_element_number sets element_number to a number that can be +used in other cbf_simple calls to identify the detector element +element_id and optionally the specific array_id> and +array_section_id. cbf_get_element_id sets *element_id to point to the +ASCII value of the element_number'th +\"diffrn_data_frame.detector_element_id \" entry, counting from 0. +The element_number is the ordinal of the detector element in the +DIFFRN_DETECTOR_ELEMENT category. If an array_section_id is specified +(i.e. is not NULL), the element_number is the sum of the ordinal of +the detector element plus the number of detector elements multiplied +by the ordinal of array_section_id for the specified array_id> in the +ARRAY_STRUCTURE_LIST_SECTION category. +If the detector element does not exist, the function returns +CBF_NOTFOUND. +The element_id will be valid as long as the item exists and has not +been set to a new value. +The element_id must not be modified by the program in any way. ARGUMENTS -handle CBF handle. columnname Name of the column -containing the number. number pointer to the location to -receive the integer value. defaultvalue Value to use if the -requested column and value cannot be found. +handle CBF handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. element_id Pointer to the +destination string for cbf_get_element_id, but the string itself for +cbf_get_element_number. array_id The optional array id or +NULL. array_section_id The optional array_section_id or NULL. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")require_column_integervalue; +---------------------------------------------------------------------- +")get_element_id; -%apply int *OUTPUT {int *number} require_column_integervalue; -void require_column_integervalue(const char *columnname, - int *number, const int defaultvalue){ - cbf_failnez(cbf_require_column_integervalue(self, - columnname, number,defaultvalue)); - } + const char * get_element_id(unsigned int element_number){ + const char * result; + cbf_failnez(cbf_get_element_id (self, element_number, &result)); + return result; + } %feature("autodoc", " -Returns : -*args : Int element_number,Int axis_number,Float pixel size +Returns : Float gain,Float gain_esd +*args : -C prototype: int cbf_set_pixel_size (cbf_handle handle, - unsigned int element_number, int axis_number, - double psize); +C prototype: int cbf_get_gain (cbf_handle handle, unsigned int element_number, + double *gain, double *gain_esd); CBFLib documentation: DESCRIPTION -cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the -"e;size"e; column of the \"array_structure_list \" category -at the row which matches axis axis_number of the detector element -element_number converting the double pixel size psize from meters to -millimeters in storing it in the \"size \" column for the axis -axis_number of the detector element element_number. The axis_number -is numbered from 1, starting with the slowest axis. -cbf_set_pixel_size_fs sets the item -")set_pixel_size; - - void set_pixel_size (unsigned int element_number, - unsigned int axis_number, double psize){ - cbf_failnez(cbf_set_pixel_size(self, - element_number, - axis_number, - psize)); - } - -/* cfunc cbf_next_column pyfunc next_column - arg cbf_handle handle */ +cbf_get_gain sets *gain and *gain_esd to the corresponding gain +parameters for element number element_number. +Either of the destination pointers may be NULL. +ARGUMENTS +handle CBF handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. gain Pointer to the +destination gain. gain_esd Pointer to the destination +gain_esd. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_gain; +%apply double *OUTPUT {double *gain, double *gain_esd} get_gain; + void get_gain (unsigned int element_number, double *gain, + double *gain_esd){ + cbf_failnez(cbf_get_gain (self, element_number, gain, gain_esd)); + } %feature("autodoc", " Returns : -*args : +*args : Float gain,Float gain_esd + +C prototype: int cbf_set_gain (cbf_handle handle, unsigned int element_number, + double gain, double gain_esd); + +CBFLib documentation: +DESCRIPTION +cbf_set_gain sets the gain of element number element_number to the +values specified by gain and gain_esd. +ARGUMENTS +handle CBF handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. gain New gain value. +gain_esd New gain_esd value. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_gain; + + void set_gain (unsigned int element_number, double gain, double gain_esd){ + cbf_failnez(cbf_set_gain (self, element_number, gain, gain_esd)); + } +%feature("autodoc", " +Returns : Float overload +*args : Integer element_number -C prototype: int cbf_next_column (cbf_handle handle); +C prototype: int cbf_get_overload (cbf_handle handle, + unsigned int element_number, double *overload); CBFLib documentation: DESCRIPTION -cbf_next_column makes the column following the current column in the -current category the current column. -If there are no more columns, the function returns CBF_NOTFOUND. -The current row is not affected. +cbf_get_overload sets *overload to the overload value for element +number element_number. ARGUMENTS -handle CBF handle. +handle CBF handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. overload Pointer to the +destination overload. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")next_column; - void next_column(void){ - cbf_failnez(cbf_next_column(self));} +---------------------------------------------------------------------- +")get_overload; + +%apply double *OUTPUT {double *overload} get_overload; + void get_overload(unsigned int element_number, double *overload){ + cbf_failnez(cbf_get_overload(self,element_number,overload)); + } %feature("autodoc", " -Returns : size_t ndimslow,size_t ndimmid,size_t ndimfast -*args : Integer element_number +Returns : +*args : Integer element_number,Float overload -C prototype: int cbf_get_3d_image_size_sf (cbf_handle handle, - unsigned int reserved, unsigned int element_number, - size_t *ndimslow, size_t *ndimmid, size_t *ndimfast); +C prototype: int cbf_set_overload (cbf_handle handle, + unsigned int element_number, double overload); CBFLib documentation: DESCRIPTION -cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf -set *ndimslow and *ndimfast to the slow and fast dimensions of the -image array for element number element_number. If the array is -1-dimensional, *ndimslow will be set to the array size and *ndimfast -will be set to 1. If the array is 3-dimensional an error code will be -returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and -cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the -slowest, next fastest and fastest dimensions, respectively, of the 3D -image array for element number element_number. If the array is -1-dimensional, *ndimslow will be set to the array size and *ndimmid -and -")get_3d_image_size_sf; +cbf_set_overload sets the overload value of element number +element_number to overload. +ARGUMENTS +handle CBF handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. overload New overload value. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_overload; -%apply int *OUTPUT {int *ndimslow, int *ndimmid, int *ndimfast} get_3d_image_size_sf; - void get_3d_image_size_sf(unsigned int element_number, int *ndimslow, int *ndimmid, int *ndimfast){ - unsigned int reserved; - size_t inslow, inmid, infast; - reserved = 0; - cbf_failnez(cbf_get_3d_image_size_sf(self,reserved,element_number,&inslow,&inmid,&infast)); - *ndimslow = (int)inslow; /* FIXME - is that how to convert? */ - *ndimmid = (int)inmid; - *ndimfast = (int)infast; + void set_overload(unsigned int element_number, double overload){ + cbf_failnez(cbf_set_overload(self,element_number,overload)); } %feature("autodoc", " -Returns : int compression,int binary_id,int elsize,int elements,char **bo, - int *bolen,int dimfast,int dimmid,int dimslow,int padding +Returns : Float time *args : -C prototype: int cbf_get_realarrayparameters_wdims_fs (cbf_handle handle, - unsigned int *compression, int *binary_id, size_t *elsize, - size_t *elements, const char **byteorder, size_t *dimfast, - size_t *dimmid, size_t *dimslow, size_t *padding); +C prototype: int cbf_get_integration_time (cbf_handle handle, + unsigned int reserved, double *time); CBFLib documentation: DESCRIPTION -cbf_get_integerarrayparameters sets *compression, *binary_id, -*elsize, *elsigned, *elunsigned, *elements, *minelement and -*maxelement to values read from the binary value of the item at the -current column and row. This provides all the arguments needed for a -subsequent call to cbf_set_integerarray, if a copy of the array is to -be made into another CIF or CBF. cbf_get_realarrayparameters sets -*compression, *binary_id, *elsize, *elements to values read from the -binary value of the item at the current column and row. This provides -all the arguments needed for a subsequent call to cbf_set_realarray, -if a copy of the arry is to be made into another CIF or CBF. -The variants cbf_get_integerarrayparameters_wdims, -cbf_get_integerarrayparameters_wdims_fs, -cbf_get_integerarrayparameters_wdims_sf, -cbf_get_realarrayparameters_wdims, -cbf_get_realarrayparameters_wdims_fs, -cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, -*dimmid, *dimslow, and *padding as well, providing the additional -parameters needed for a subsequent call to cbf_set_integerarray_wdims -or cbf_set_realarray_wdims. -The value returned in *byteorder is a pointer either to the string -\"little_endian \" or to the string \"big_endian \". This should be -the byte order of the data, not necessarily of the host machine. No -attempt should be made to modify this string. At this time only -\"little_endian \" will be returned. -The values returned in *dimfast, *dimmid and *dimslow are the sizes -of the fastest changing, second fastest changing and third fastest -changing dimensions of the array, if specified, or zero, if not -specified. -The value returned in *padding is the size of the post-data padding, -if any and if specified in the data header. The value is given as a -count of octets. -If the value is not binary, the function returns CBF_ASCII. +cbf_get_integration_time sets *time to the integration time in +seconds. The parameter reserved is presently unused and should be set +to 0. ARGUMENTS -handle CBF handle. compression Compression method used. -elsize Size in bytes of each array element. binary_id -Pointer to the destination integer binary identifier. elsigned -Pointer to an integer. Set to 1 if the elements can be read as signed -integers. elunsigned Pointer to an integer. Set to 1 if the -elements can be read as unsigned integers. elements Pointer to -the destination number of elements. minelement Pointer to the -destination smallest element. maxelement Pointer to the -destination largest element. byteorder Pointer to the destination -byte order. dimfast Pointer to the destination fastest -dimension. dimmid Pointer to the destination second fastest -dimension. dimslow Pointer to the destination third fastest -dimension. padding Pointer to the destination padding size. +handle CBF handle. reserved Unused. Any value other than 0 is +invalid. time Pointer to the destination time. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")get_realarrayparameters_wdims_fs; - -%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); -%apply int *OUTPUT {int *compression,int *binary_id, - int *elsize, - int *elements, - int *dimslow, int *dimmid, int *dimfast, int *padding} - get_realarrayparameters_wdims_fs; +---------------------------------------------------------------------- +")get_integration_time; - void get_realarrayparameters_wdims_fs(int *compression,int *binary_id, - int *elsize, - int *elements, - char **bo, int *bolen, - int *dimfast, int *dimmid, int *dimslow, int *padding - ){ - unsigned int comp; - size_t elsiz, elem, df,dm,ds,pd; - const char * byteorder; - char * bot; - cbf_failnez(cbf_get_realarrayparameters_wdims_fs(self, - &comp,binary_id, &elsiz, &elem, - &byteorder,&df,&dm,&ds,&pd )); - *bolen = strlen(byteorder); - if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} - strncpy(bot,byteorder,*bolen); - *bo = bot; - *compression = comp; - *elsize = elsiz; - *elements = elem; - *dimfast = df; - *dimmid = dm; - *dimslow = ds; - *padding = pd; - +%apply double *OUTPUT {double *time} get_integration_time; + void get_integration_time( double *time ){ + unsigned int reserved; + double tim; + reserved = 0; + cbf_failnez(cbf_get_integration_time(self,reserved,&tim)); + *time = tim; } %feature("autodoc", " -Returns : (Binary)String -*args : +Returns : +*args : Float time -C prototype: int cbf_get_realarray (cbf_handle handle, int *binary_id, - void *array, size_t elsize, size_t elements, - size_t *elements_read); +C prototype: int cbf_set_integration_time (cbf_handle handle, + unsigned int reserved, double time); CBFLib documentation: DESCRIPTION -cbf_get_integerarray reads the binary value of the item at the -current column and row into an integer array. The array consists of -elements elements of elsize bytes each, starting at array. The -elements are signed if elsigned is non-0 and unsigned otherwise. -*binary_id is set to the binary section identifier and *elements_read -to the number of elements actually read. cbf_get_realarray reads the -binary value of the item at the current column and row into a real -array. The array consists of elements elements of elsize bytes each, -starting at array. *binary_id is set to the binary section identifier -and *elements_read to the number of elements actually read. -If any element in the integer binary data cant fit into the -destination element, the destination is set the nearest possible -value. -If the value is not binary, the function returns CBF_ASCII. -If the requested number of elements cant be read, the function will -read as many as it can and then return CBF_ENDOFDATA. -Currently, the destination array must consist of chars, shorts or -ints (signed or unsigned). If elsize is not equal to sizeof (char), -sizeof (short) or sizeof (int), for cbf_get_integerarray, or -sizeof(double) or sizeof(float), for cbf_get_realarray the function -returns CBF_ARGUMENT. -An additional restriction in the current version of CBFlib is that -values too large to fit in an int are not correctly decompressed. As -an example, if the machine with 32-bit ints is reading an array -containing a value outside the range 0 .. 2^32-1 (unsigned) or -2^31 -.. 2^31-1 (signed), the array will not be correctly decompressed. -This restriction will be removed in a future release. For -cbf_get_realarray, only IEEE format is supported. No conversion to -other floating point formats is done at this time. +cbf_set_integration_time sets the integration time in seconds to the +value specified by time. The parameter reserved is presently unused +and should be set to 0. ARGUMENTS -handle CBF handle. binary_id Pointer to the -destination integer binary identifier. array Pointer to the -destination array. elsize Size in bytes of each destination -array element. elsigned Set to non-0 if the destination array -elements are signed. elements The number of elements to read. -elements_read Pointer to the destination number of elements -actually read. +handle CBF handle. reserved Unused. Any value +other than 0 is invalid. time Integration time in seconds. RETURN VALUE -Returns an error code on failure or 0 for success. SEE ALSO -")get_realarray_as_string; - -// Ensure we free the local temporary - -%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) - get_realarray_as_string; - -// Get the length correct - - void get_realarray_as_string(char **s, int *slen){ - int binary_id; - size_t elements, elements_read, elsize; - unsigned int compression; - void * array; - *slen = 0; /* Initialise in case of problems */ - cbf_failnez(cbf_get_realarrayparameters(self, &compression, - &binary_id, &elsize, - &elements)); - - if ((array=malloc(elsize*elements))) { - /* cbf_failnez (cbf_select_column(cbf,colnum)) */ - cbf_failnez (cbf_get_realarray(self, &binary_id, - (void *)array, elsize, - elements, &elements_read)); +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_integration_time; - }else{ - cbf_failnez(CBF_ALLOC); - } - *slen = elsize*elements; - *s = (char *) array; - } + void set_integration_time(double time){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_set_integration_time(self,reserved,time)); + } %feature("autodoc", " -Returns : Float slowbinsize,Float fastbinsize -*args : Integer element_number +Returns : Float time,Integer timezone +*args : -C prototype: int cbf_get_bin_sizes(cbf_handle handle, - unsigned int element_number, double * slowbinsize, - double * fastbinsize); +C prototype: int cbf_get_timestamp (cbf_handle handle, unsigned int reserved, + double *time, int *timezone); CBFLib documentation: DESCRIPTION -cbf_get_bin_sizes sets slowbinsize to point to the value of the -number of pixels composing one array element in the dimension that -changes at the second-fastest rate and fastbinsize to point to the -value of the number of pixels composing one array element in the -dimension that changes at the fastest rate for the dectector element -with the ordinal element_number. cbf_set_bin_sizes sets the the pixel -bin sizes in the \"array_intensities \" category to the values of -slowbinsize_in for the number of pixels composing one array element -in the dimension that changes at the second-fastest rate and -fastbinsize_in for the number of pixels composing one array element -in the dimension that changes at the fastest rate for the dectector -element with the ordinal element_number. -In order to allow for software binning involving fractions of pixels, -the bin sizes are doubles rather than ints. +cbf_get_timestamp sets *time to the collection timestamp in seconds +since January 1 1970. *timezone is set to timezone difference from +UTC in minutes. The parameter reserved is presently unused and should +be set to 0. +Either of the destination pointers may be NULL. ARGUMENTS -handle CBF handle. element_number The number of the -detector element counting from 0 by order of appearance in the -\"diffrn_data_frame \" category. slowbinsize Pointer to the -returned number of pixels composing one array element in the -dimension that changes at the second-fastest rate. fastbinsize -Pointer to the returned number of pixels composing one array element -in the dimension that changes at the fastest rate. slowbinsize_in -The number of pixels composing one array element in the dimension -that changes at the second-fastest rate. fastbinsize_in The number -of pixels composing one array element in the dimension that changes -at the fastest rate. +handle CBF handle. reserved Unused. Any value other than 0 is +invalid. time Pointer to the destination collection timestamp. +timezone Pointer to the destination timezone difference. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_bin_sizes; +")get_timestamp; -%apply double *OUTPUT {double *slowbinsize,double *fastbinsize}; - void get_bin_sizes(int element_number, double *slowbinsize, double *fastbinsize) { - cbf_failnez(cbf_get_bin_sizes (self, (unsigned int)element_number, slowbinsize, fastbinsize)); - } +%apply double *OUTPUT {double *time} get_timestamp; +%apply int *OUTPUT {int *timezone} get_timestamp; + void get_timestamp(double *time, int *timezone){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_get_timestamp(self,reserved,time,timezone)); + } +%feature("autodoc", " +Returns : +*args : Float time,Integer timezone,Float precision -/* cfunc cbf_reset_category pyfunc reset_category - arg cbf_handle handle */ +C prototype: int cbf_set_timestamp (cbf_handle handle, unsigned int reserved, + double time, int timezone, double precision); + +CBFLib documentation: +DESCRIPTION +cbf_set_timestamp sets the collection timestamp in seconds since +January 1 1970 to the value specified by time. The timezone +difference from UTC +")set_timestamp; + void set_timestamp(double time, int timezone, double precision){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_set_timestamp(self,reserved,time,timezone,precision)); + } %feature("autodoc", " -Returns : +Returns : int year,int month,int day,int hour,int minute,double second, + int timezone *args : -C prototype: int cbf_reset_category (cbf_handle handle); +C prototype: int cbf_get_datestamp (cbf_handle handle, unsigned int reserved, + int *year, int *month, int *day, int *hour, int *minute, + double *second, int *timezone); CBFLib documentation: DESCRIPTION -cbf_reset_category deletes all columns and rows from current category. +cbf_get_datestamp sets *year, *month, *day, *hour, *minute and +*second to the corresponding values of the collection timestamp. +*timezone is set to timezone difference from UTC in minutes. The +parameter < i>reserved is presently unused and should be set to 0. +Any of the destination pointers may be NULL. ARGUMENTS -handle CBF handle. +handle CBF handle. reserved Unused. Any value other than 0 is +invalid. year Pointer to the destination timestamp year. month + Pointer to the destination timestamp month (1-12). day +Pointer to the destination timestamp day (1-31). hour Pointer +to the destination timestamp hour (0-23). minute Pointer to the +destination timestamp minute (0-59). second Pointer to the +destination timestamp second (0-60.0). timezone Pointer to the +destination timezone difference from UTC in minutes. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")reset_category; - void reset_category(void){ - cbf_failnez(cbf_reset_category(self));} +---------------------------------------------------------------------- +")get_datestamp; + +%apply int *OUTPUT {int *year, int *month, int *day, int *hour, + int *minute, double *second, int *timezone} get_datestamp; + void get_datestamp(int *year, int *month, int *day, int *hour, + int *minute, double *second, int *timezone){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_get_datestamp(self,reserved, + year,month,day,hour,minute,second,timezone)); + } %feature("autodoc", " -Returns : Integer -*args : String axis_id +Returns : +*args : int year,int month,int day,int hour,int minute,double second, + int timezone,Float precision -C prototype: int cbf_count_axis_ancestors (cbf_handle handle, - const char *axis_id, unsigned int *ancestors); +C prototype: int cbf_set_datestamp (cbf_handle handle, unsigned int reserved, + int year, int month, int day, int hour, int minute, + double second, int timezone, double precision); CBFLib documentation: DESCRIPTION -cbf_count_axis_ancestors sets ancestors to the number of ancestors of -axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor -axis of index ancestor_index of axis axis_id, starting with axis_id -for ancestor_index 0. -cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of -axis_id or to \". \" if there is no such ancestor. -cbf_get_axis_equipment sets *equipment to the equipment of axis_id or -to \". \" if there is no such equipment. -cbf_get_axis_equipment_component sets *equipment_component to the -equipment_component of axis_id or to \". \" if there is no such -equipment_component. -cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the -components of the ofset of axis_id. -cbf_get_axis_rotation sets rotation to the rotation of axis_id or to -0 if there is no such rotation. cbf_get_axis_rotation_axis sets -*rotation_axis to the rotation_axis of axis_id or to \". \" if there -is no such rotation_axis. -cbf_get_axis_setting sets *start and *increment to the corresponding -values of the axis axis_id. Any of the destination pointers may be -NULL. -cbf_get_axis_type sets axis_type to the type of axis_id. -cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the -components of the vector of axis_id. +cbf_set_datestamp sets the collection timestamp in seconds since +January 1 1970 to the value specified by time. The timezone +difference from UTC +")set_datestamp; + + void set_datestamp(int year, int month, int day, int hour, + int minute, double second, int timezone, + double precision){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_set_datestamp(self,reserved, + year,month,day,hour,minute,second,timezone,precision)); + } +%feature("autodoc", " +Returns : +*args : Integer timezone + +C prototype: int cbf_set_current_timestamp (cbf_handle handle, + unsigned int reserved, int timezone); + +CBFLib documentation: +DESCRIPTION +cbf_set_current_timestamp sets the collection timestamp to the +current time. The timezone difference from UTC in minutes is set to +timezone. If no timezone is desired, timezone should be +CBF_NOTIMEZONE. If no timezone is used, the timest amp will be UTC. The parameter reserved is presently unused and should be set to 0. +The new timestamp will have a precision of 1 second. ARGUMENTS -handle CBF handle. reserved Unused. Any -value other than 0 is invalid. axis_id Axis id. -ancestor_index Integer index of the desired ancestor, starting -with 0 for the current axis_id. ancestor Pointer to -destination ancestor name pointer. depends_on Pointer to -destination depends_on name pointer. equipment Pointer to -destination equipment name pointer. equipment_component Pointer to -destination equipment_component name pointer. offset1 -Pointer to destination first offset component value. offset2 - Pointer to destination second offset component value. offset3 - Pointer to destination third offset component value. -rotation Pointer to destination rotation value. -rotation_axis Pointer to destination rotation_axisn name -pointer. start Pointer to the destination start -value. increment Pointer to the destination increment -value. type Pointer to destination axis type of type -. vector1 Pointer to destination first vector component -value. vector2 Pointer to destination second vector -component value. vector3 Pointer to destination third -vector component value. +handle CBF handle. reserved Unused. Any value other than 0 is +invalid. timezone Timezone difference from UTC in minutes or +CBF_NOTIMEZONE. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")count_axis_ancestors; +")set_current_timestamp; + + void set_current_timestamp(int timezone){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_set_current_timestamp(self,reserved,timezone)); + } +%feature("autodoc", " +Returns : size_t ndim1,size_t ndim2 +*args : Integer element_number + +C prototype: int cbf_get_image_size (cbf_handle handle, unsigned int reserved, + unsigned int element_number, size_t *ndimslow, + size_t *ndimfast); + +CBFLib documentation: +DESCRIPTION +cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf +set *ndimslow and *ndimfast to the slow and fast dimensions of the +image array for element number element_number. If the array is +1-dimensional, *ndimslow will be set to the array size and *ndimfast +will be set to 1. If the array is 3-dimensional an error code will be +returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and +cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the +slowest, next fastest and fastest dimensions, respectively, of the 3D +image array for element number element_number. If the array is +1-dimensional, *ndimslow will be set to the array size and *ndimmid +and +")get_image_size; + +%apply int *OUTPUT {int *ndimslow, int *ndimfast} get_image_size; + void get_image_size(unsigned int element_number, int *ndimslow, int *ndimfast){ + unsigned int reserved; + size_t inslow, infast; + reserved = 0; + cbf_failnez(cbf_get_image_size(self,reserved,element_number,&inslow,&infast)); + *ndimslow = (int)inslow; + *ndimfast = (int)infast; + } +%feature("autodoc", " +Returns : size_t ndimfast,size_t ndimslow +*args : Integer element_number + +C prototype: int cbf_get_image_size_fs (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + size_t *ndimfast, size_t *ndimslow); + +CBFLib documentation: +DESCRIPTION +cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf +set *ndimslow and *ndimfast to the slow and fast dimensions of the +image array for element number element_number. If the array is +1-dimensional, *ndimslow will be set to the array size and *ndimfast +will be set to 1. If the array is 3-dimensional an error code will be +returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and +cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the +slowest, next fastest and fastest dimensions, respectively, of the 3D +image array for element number element_number. If the array is +1-dimensional, *ndimslow will be set to the array size and *ndimmid +and +")get_image_size_fs; - %apply int *OUTPUT {int *ancestors} count_axis_ancestors; - void count_axis_ancestors(const char *axis_id, - int *ancestors){ - unsigned int anc; - cbf_failnez(cbf_count_axis_ancestors(self,axis_id,&anc)); - *ancestors = anc; - } - %feature("autodoc", " -Returns : pycbf goniometer object -*args : +%apply int *OUTPUT {int *ndimfast, int *ndimslow} get_image_size_fs; + void get_image_size_fs(unsigned int element_number, int *ndimfast, int *ndimslow){ + unsigned int reserved; + size_t infast, inslow; + reserved = 0; + cbf_failnez(cbf_get_image_size_fs(self,reserved,element_number,&infast,&inslow)); + *ndimfast = (int)infast; /* FIXME - is that how to convert? */ + *ndimslow = (int)inslow; + } +%feature("autodoc", " +Returns : size_t ndimslow,size_t ndimfast +*args : Integer element_number -C prototype: int cbf_construct_goniometer (cbf_handle handle, - cbf_goniometer *goniometer); +C prototype: int cbf_get_image_size_sf (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + size_t *ndimslow, size_t *ndimfast); CBFLib documentation: DESCRIPTION -cbf_construct_goniometer constructs a goniometer object using the -description in the CBF object handle and initialises the goniometer -handle *goniometer. -ARGUMENTS -handle CBF handle. goniometer Pointer to the destination -goniometer handle. -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")construct_goniometer; - - cbf_goniometer construct_goniometer(){ - cbf_goniometer goniometer; - cbf_failnez(cbf_construct_goniometer(self,&goniometer)); - return goniometer; - } - -/* cfunc cbf_set_datablockname pyfunc set_datablockname - arg cbf_handle handle arg const char *datablockname */ +cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf +set *ndimslow and *ndimfast to the slow and fast dimensions of the +image array for element number element_number. If the array is +1-dimensional, *ndimslow will be set to the array size and *ndimfast +will be set to 1. If the array is 3-dimensional an error code will be +returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and +cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the +slowest, next fastest and fastest dimensions, respectively, of the 3D +image array for element number element_number. If the array is +1-dimensional, *ndimslow will be set to the array size and *ndimmid +and +")get_image_size_sf; +%apply int *OUTPUT {int *ndimslow, int *ndimfast} get_image_size_sf; + void get_image_size_sf(unsigned int element_number, int *ndimslow, int *ndimfast){ + unsigned int reserved; + size_t inslow, infast; + reserved = 0; + cbf_failnez(cbf_get_image_size(self,reserved,element_number,&inslow,&infast)); + *ndimslow = (int)inslow; + *ndimfast = (int)infast; + } %feature("autodoc", " -Returns : string -*args : +Returns : size_t ndimslow,size_t ndimmid,size_t ndimfast +*args : Integer element_number -C prototype: int cbf_set_datablockname (cbf_handle handle, - const char *datablockname); +C prototype: int cbf_get_3d_image_size (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + size_t *ndimslow, size_t *ndimmid, size_t *ndimfast); CBFLib documentation: DESCRIPTION -cbf_set_datablockname changes the name of the current data block to -datablockname. cbf_set_saveframename changes the name of the current -save frame to saveframename. -If a data block or save frame with this name already exists -(comparison is case-insensitive), the function returns CBF_IDENTICAL. -ARGUMENTS -handle CBF handle. datablockname The new data block name. -datablockname The new save frame name. -RETURN VALUE -Returns an error code on failure or 0 for success. -SEE ALSO -")set_datablockname; - void set_datablockname(const char* arg){ - cbf_failnez(cbf_set_datablockname(self,arg));} +cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf +set *ndimslow and *ndimfast to the slow and fast dimensions of the +image array for element number element_number. If the array is +1-dimensional, *ndimslow will be set to the array size and *ndimfast +will be set to 1. If the array is 3-dimensional an error code will be +returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and +cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the +slowest, next fastest and fastest dimensions, respectively, of the 3D +image array for element number element_number. If the array is +1-dimensional, *ndimslow will be set to the array size and *ndimmid +and +")get_3d_image_size; -/* cfunc cbf_get_element_number pyfunc get_element_number - arg cbf_handle handle arg const char *element_id arg const char *array_id arg const char *array_section_id arg unsigned int *element_number */ +%apply int *OUTPUT {int *ndimslow, int *ndimmid, int *ndimfast} get_3d_image_size; + void get_3d_image_size(unsigned int element_number, int *ndimslow, int *ndimmid, int *ndimfast){ + unsigned int reserved; + size_t inslow, inmid, infast; + reserved = 0; + cbf_failnez(cbf_get_3d_image_size(self,reserved,element_number,&inslow,&inmid,&infast)); + *ndimslow = (int)inslow; /* FIXME - is that how to convert? */ + *ndimmid = (int)inmid; + *ndimfast = (int)infast; + } +%feature("autodoc", " +Returns : size_t ndimfast,size_t ndimmid,size_t ndimslow +*args : Integer element_number - void get_element_number(void){ - cbf_failnez(CBF_NOTIMPLEMENTED);} +C prototype: int cbf_get_3d_image_size_fs (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + size_t *ndimfast, size_t *ndimmid, size_t *ndimslow); -/* cfunc cbf_set_crystal_id pyfunc set_crystal_id - arg cbf_handle handle arg const char *crystal_id */ +CBFLib documentation: +DESCRIPTION +cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf +set *ndimslow and *ndimfast to the slow and fast dimensions of the +image array for element number element_number. If the array is +1-dimensional, *ndimslow will be set to the array size and *ndimfast +will be set to 1. If the array is 3-dimensional an error code will be +returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and +cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the +slowest, next fastest and fastest dimensions, respectively, of the 3D +image array for element number element_number. If the array is +1-dimensional, *ndimslow will be set to the array size and *ndimmid +and +")get_3d_image_size; +%apply int *OUTPUT {int *ndimslow, int *ndimmid, int *ndimfast} get_3d_image_size; + void get_3d_image_size_fs(unsigned int element_number, int *ndimfast, int *ndimmid, int *ndimslow){ + unsigned int reserved; + size_t inslow, inmid, infast; + reserved = 0; + cbf_failnez(cbf_get_3d_image_size_fs(self,reserved,element_number,&infast,&inmid,&inslow)); + *ndimslow = (int)inslow; /* FIXME - is that how to convert? */ + *ndimmid = (int)inmid; + *ndimfast = (int)infast; + } %feature("autodoc", " -Returns : string -*args : +Returns : size_t ndimslow,size_t ndimmid,size_t ndimfast +*args : Integer element_number -C prototype: int cbf_set_crystal_id (cbf_handle handle, - const char *crystal_id); +C prototype: int cbf_get_3d_image_size_sf (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + size_t *ndimslow, size_t *ndimmid, size_t *ndimfast); CBFLib documentation: DESCRIPTION -cbf_set_crystal_id sets the \"diffrn.crystal_id \" entry to the -ASCII value crystal_id. -ARGUMENTS -handle CBF handle. crystal_id ASCII value. -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")set_crystal_id; - void set_crystal_id(const char* arg){ - cbf_failnez(cbf_set_crystal_id(self,arg));} +cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf +set *ndimslow and *ndimfast to the slow and fast dimensions of the +image array for element number element_number. If the array is +1-dimensional, *ndimslow will be set to the array size and *ndimfast +will be set to 1. If the array is 3-dimensional an error code will be +returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and +cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the +slowest, next fastest and fastest dimensions, respectively, of the 3D +image array for element number element_number. If the array is +1-dimensional, *ndimslow will be set to the array size and *ndimmid +and +")get_3d_image_size_sf; + +%apply int *OUTPUT {int *ndimslow, int *ndimmid, int *ndimfast} get_3d_image_size_sf; + void get_3d_image_size_sf(unsigned int element_number, int *ndimslow, int *ndimmid, int *ndimfast){ + unsigned int reserved; + size_t inslow, inmid, infast; + reserved = 0; + cbf_failnez(cbf_get_3d_image_size_sf(self,reserved,element_number,&inslow,&inmid,&infast)); + *ndimslow = (int)inslow; /* FIXME - is that how to convert? */ + *ndimmid = (int)inmid; + *ndimfast = (int)infast; + } %feature("autodoc", " Returns : (Binary)String -*args : +*args : int element_number,int elsize,int elsign,int ndimslow,int ndimfast -C prototype: int cbf_get_integerarray (cbf_handle handle, int *binary_id, - void *array, size_t elsize, int elsigned, size_t elements, - size_t *elements_read); +C prototype: int cbf_get_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, + int elsign, size_t ndimslow, size_t ndimfast); CBFLib documentation: DESCRIPTION -cbf_get_integerarray reads the binary value of the item at the -current column and row into an integer array. The array consists of -elements elements of elsize bytes each, starting at array. The -elements are signed if elsigned is non-0 and unsigned otherwise. -*binary_id is set to the binary section identifier and *elements_read -to the number of elements actually read. cbf_get_realarray reads the -binary value of the item at the current column and row into a real -array. The array consists of elements elements of elsize bytes each, -starting at array. *binary_id is set to the binary section identifier -and *elements_read to the number of elements actually read. -If any element in the integer binary data cant fit into the -destination element, the destination is set the nearest possible -value. -If the value is not binary, the function returns CBF_ASCII. -If the requested number of elements cant be read, the function will -read as many as it can and then return CBF_ENDOFDATA. -Currently, the destination array must consist of chars, shorts or -ints (signed or unsigned). If elsize is not equal to sizeof (char), -sizeof (short) or sizeof (int), for cbf_get_integerarray, or -sizeof(double) or sizeof(float), for cbf_get_realarray the function -returns CBF_ARGUMENT. -An additional restriction in the current version of CBFlib is that -values too large to fit in an int are not correctly decompressed. As -an example, if the machine with 32-bit ints is reading an array -containing a value outside the range 0 .. 2^32-1 (unsigned) or -2^31 -.. 2^31-1 (signed), the array will not be correctly decompressed. -This restriction will be removed in a future release. For -cbf_get_realarray, only IEEE format is supported. No conversion to -other floating point formats is done at this time. -ARGUMENTS -handle CBF handle. binary_id Pointer to the -destination integer binary identifier. array Pointer to the -destination array. elsize Size in bytes of each destination -array element. elsigned Set to non-0 if the destination array -elements are signed. elements The number of elements to read. -elements_read Pointer to the destination number of elements -actually read. -RETURN VALUE -Returns an error code on failure or 0 for success. SEE ALSO -")get_integerarray_as_string; +cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image +array for element number element_number into an array. The array +consists of ndimslow *ndimfast elements of elsize bytes each, +starting at array. The elements are signed if elsign is non-0 and +unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and +cbf_get_real_image_sf read the image array of IEEE doubles or floats +for element number element_number into an array. A real array is +always signed. cbf_get_3d_image, cbf_get_3d_image_fs and +cbf_get_3d_image_sf read the 3D image array for element number +element_number into an array. The array consists of ndimslow *ndimmid +*ndimfast elements of elsize bytes each, starting at array. The +elements are signed if elsign is non-0 and unsigned otherwise. +cbf_get_real_3d_image, cbf_get_real_3d_image_fs, +cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or +floats for element number element_number into an array. A real array +is always signed. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +The structure of the array as a 1-, 2- or 3-dimensional array should +agree with the structure of the array given in the +ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, +ndimslow should be the array size and ndimfast and, for the 3D calls, +ndimmid, should be set to 1 both in the call and in the imgCIF data +being processed. If the array is 2-dimensional and a 3D call is used, +ndimslow and ndimmid should be the +")get_image_as_string; // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) - get_integerarray_as_string; - + get_image_as_string; // Get the length correct - void get_integerarray_as_string(char **s, int *slen){ - int binary_id, elsigned, elunsigned; - size_t elements, elements_read, elsize; - int minelement, maxelement; - unsigned int compression; - void * array; + void get_image_as_string(int element_number, char **s, int *slen, + int elsize, int elsign, int ndimslow, int ndimfast){ + void *array; + int reserved = 0; *slen = 0; /* Initialise in case of problems */ - cbf_failnez(cbf_get_integerarrayparameters(self, &compression, - &binary_id, &elsize, &elsigned, &elunsigned, - &elements, &minelement, &maxelement)); - - if ((array=malloc(elsize*elements))) { - /* cbf_failnez (cbf_select_column(cbf,colnum)) */ - cbf_failnez (cbf_get_integerarray(self, &binary_id, - (void *)array, elsize, elsigned, - elements, &elements_read)); - + if ((array=malloc(elsize*ndimfast*ndimslow))) { + cbf_failnez (cbf_get_image(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimslow, (size_t)ndimfast)); }else{ cbf_failnez(CBF_ALLOC); } - *slen = elsize*elements; + *slen = elsize*ndimfast*ndimslow; *s = (char *) array; } %feature("autodoc", " -Returns : -*args : int element_number,int compression,(binary) String data,int elsize, - int elsign,int dimslow,int dimmid,int dimfast +Returns : (Binary)String +*args : int element_number,int elsize,int elsign,int ndimfast,int ndimslow -C prototype: int cbf_set_3d_image (cbf_handle handle, unsigned int reserved, - unsigned int element_number, unsigned int compression, - void *array, size_t elsize, int elsign, size_t ndimslow, - size_t ndimmid, size_t ndimfast); +C prototype: int cbf_get_image_fs (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, + int elsign, size_t ndimfast, size_t ndimslow); CBFLib documentation: DESCRIPTION -cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image -array for element number element_number. The array consists of -ndimfast *ndimslow elements of elsize bytes each, starting at array. -The elements are signed if elsign is non-zero and unsigned otherwise. -cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf -write the image array for element number element_number. The array -consists of ndimfast *ndimslow IEEE double or float elements of -elsize bytes each, starting at array. cbf_set_3d_image, -cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array -for element number element_number. The array consists of ndimfast -*ndimmid *ndimslow elements of elsize bytes each, starting at array. -The elements are signed if elsign is non-0 and unsigned otherwise. -cbf_set_real_3d_image, cbf_set_real_3d_image_fs and -cbf_set_real_3d_image_sf writes the 3D image array for element number -element_number. The array consists of ndimfast *ndimmid *ndimslow -IEEE double or float elements of elsize bytes each, starting at -array. +cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image +array for element number element_number into an array. The array +consists of ndimslow *ndimfast elements of elsize bytes each, +starting at array. The elements are signed if elsign is non-0 and +unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and +cbf_get_real_image_sf read the image array of IEEE doubles or floats +for element number element_number into an array. A real array is +always signed. cbf_get_3d_image, cbf_get_3d_image_fs and +cbf_get_3d_image_sf read the 3D image array for element number +element_number into an array. The array consists of ndimslow *ndimmid +*ndimfast elements of elsize bytes each, starting at array. The +elements are signed if elsign is non-0 and unsigned otherwise. +cbf_get_real_3d_image, cbf_get_real_3d_image_fs, +cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or +floats for element number element_number into an array. A real array +is always signed. The _fs calls give the dimensions in a fast-to-slow order. The calls with no suffix and the calls _sf calls give the dimensions in slow-to-fast order -If the array is 1-dimensional, ndimslow should be the array size and -ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the -array is 2-dimensional and the 3D calls are used, ndimslow and -ndimmid should be used for the array dimensions and ndimfast should -be set to 1. -The array will be compressed using the compression scheme specifed by -compression. Currently, the available schemes are: -CBF_CANONICAL Canonical-code compression (section 3.3.1) -CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET -Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple -\"nibble_offset \" compression. CBF_NONE No compression. -The values compressed are limited to 64 bits. If any element in the -array is larger than 64 bits, the value compressed is the nearest -64-bit value. -Currently, the source array must consist of chars, shorts or ints -(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for -cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof -(int), sizeof(double) or sizeof(float), the function returns -CBF_ARGUMENT. -The parameter reserved is presently unused and should be set to 0. -ARGUMENTS -handle CBF handle. reserved Unused. Any value other -than 0 is invalid. element_number The number of the detector -element counting from 0 by order of appearance in the -\"diffrn_data_frame \" category. compression Compression type. -array Pointer to the image array. elsize Size in -bytes of each image array element. elsigned Set to non-0 if -the image array elements are signed. ndimslow Slowest array -dimension. ndimmid Second slowest array dimension. ndimfast - Fastest array dimension. -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")set_3d_image; - - /* CBFlib must NOT modify the data string which belongs to the scripting - language we will get and check the length via a typemap */ +The structure of the array as a 1-, 2- or 3-dimensional array should +agree with the structure of the array given in the +ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, +ndimslow should be the array size and ndimfast and, for the 3D calls, +ndimmid, should be set to 1 both in the call and in the imgCIF data +being processed. If the array is 2-dimensional and a 3D call is used, +ndimslow and ndimmid should be the +")get_image_fs_as_string; -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_3d_image; +// Ensure we free the local temporary +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_image_fs_as_string; +// Get the length correct - void set_3d_image(unsigned int element_number, - unsigned int compression, - char *data, int len, int elsize, int elsign, int ndimslow, int ndimmid, int ndimfast){ - /* safety check on args */ - size_t els; - unsigned int reserved; + void get_image_fs_as_string(int element_number, char **s, int *slen, + int elsize, int elsign, int ndimfast, int ndimslow){ void *array; - if(len == elsize*ndimslow*ndimmid*ndimfast){ - array = data; - els = elsize; - reserved = 0; - cbf_failnez(cbf_set_3d_image (self, reserved, element_number, compression, - (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t) ndimmid, (size_t)ndimfast)); - }else{ - cbf_failnez(CBF_ARGUMENT); - } - } -%feature("autodoc", " -Returns : -*args : CBFHandle dictionary - -C prototype: int cbf_set_dictionary (cbf_handle handle, - cbf_handle dictionary_in); - -CBFLib documentation: -DESCRIPTION -cbf_get_dictionary sets *dictionary to the handle of a CBF which has -been associated with the CBF handle by cbf_set_dictionary. -cbf_set_dictionary associates the CBF handle dictionary_in with -handle as its dictionary. cbf_require_dictionary sets *dictionary to -the handle of a CBF which has been associated with the CBF handle by -cbf_set_dictionary or creates a new empty CBF and associates it with -handle, returning the new handle in *dictionary. -ARGUMENTS -handle CBF handle. dictionary Pointer to CBF handle of -dictionary. dictionary_in CBF handle of dcitionary. -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")set_dictionary; - -void set_dictionary(cbf_handle other){ - cbf_failnez(cbf_set_dictionary(self,other)); -} + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + cbf_failnez (cbf_get_image_fs(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimfast, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } %feature("autodoc", " -Returns : String categoryname -*args : String tagname +Returns : (Binary)String +*args : int element_number,int elsize,int elsign,int ndimslow,int ndimfast -C prototype: int cbf_find_tag_category (cbf_handle handle, - const char* tagname, const char** categoryname); +C prototype: int cbf_get_image_sf (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, + int elsign, size_t ndimslow, size_t ndimfast); CBFLib documentation: DESCRIPTION -cbf_find_tag_category sets categoryname to the category associated -with tagname in the dictionary associated with handle. -cbf_set_tag_category upddates the dictionary associated with handle -to indicated that tagname is in category categoryname_in. -ARGUMENTS -handle CBF handle. tagname tag name. -categoryname pointer to a returned category name. -categoryname_in input category name. -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")find_tag_category; +cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image +array for element number element_number into an array. The array +consists of ndimslow *ndimfast elements of elsize bytes each, +starting at array. The elements are signed if elsign is non-0 and +unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and +cbf_get_real_image_sf read the image array of IEEE doubles or floats +for element number element_number into an array. A real array is +always signed. cbf_get_3d_image, cbf_get_3d_image_fs and +cbf_get_3d_image_sf read the 3D image array for element number +element_number into an array. The array consists of ndimslow *ndimmid +*ndimfast elements of elsize bytes each, starting at array. The +elements are signed if elsign is non-0 and unsigned otherwise. +cbf_get_real_3d_image, cbf_get_real_3d_image_fs, +cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or +floats for element number element_number into an array. A real array +is always signed. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +The structure of the array as a 1-, 2- or 3-dimensional array should +agree with the structure of the array given in the +ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, +ndimslow should be the array size and ndimfast and, for the 3D calls, +ndimmid, should be set to 1 both in the call and in the imgCIF data +being processed. If the array is 2-dimensional and a 3D call is used, +ndimslow and ndimmid should be the +")get_image_sf_as_string; +// Ensure we free the local temporary +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_image_fs_as_string; +// Get the length correct - const char * find_tag_category(const char *tagname){ - const char * result; - cbf_failnez(cbf_find_tag_category(self,tagname, &result)); - return result; - } + void get_image_sf_as_string(int element_number, char **s, int *slen, + int elsize, int elsign, int ndimslow, int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + cbf_failnez (cbf_get_image_sf(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } %feature("autodoc", " Returns : (Binary)String -*args : int element_number,int elsize,int ndimslow,int ndimmid,int ndimfast +*args : int element_number,int elsize,int ndimslow,int ndimfast -C prototype: int cbf_get_real_3d_image_sf (cbf_handle handle, - unsigned int reserved, unsigned int element_number, - void *array, size_t elsize, size_t ndimslow, - size_t ndimmid, size_t ndimfast); +C prototype: int cbf_get_real_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, + size_t ndimslow, size_t ndimfast); CBFLib documentation: DESCRIPTION @@ -4639,288 +4961,103 @@ ndimslow should be the array size and ndimfast and, for the 3D calls, ndimmid, should be set to 1 both in the call and in the imgCIF data being processed. If the array is 2-dimensional and a 3D call is used, ndimslow and ndimmid should be the -")get_real_3d_image_sf_as_string; +")get_real_image_as_string; // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) - get_real_3d_image_sf_as_string; - + get_real_image_as_string; // Get the length correct - void get_real_3d_image_sf_as_string(int element_number, char **s, int *slen, - int elsize, int ndimslow, int ndimmid, int ndimfast){ + void get_real_image_as_string(int element_number, char **s, int *slen, + int elsize, int ndimslow, int ndimfast){ void *array; int reserved = 0; *slen = 0; /* Initialise in case of problems */ - if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { - cbf_failnez (cbf_get_real_3d_image_sf(self, + if ((array=malloc(elsize*ndimfast*ndimslow))) { + cbf_failnez (cbf_get_real_image(self, reserved, (unsigned int)element_number, - (void *)array, (size_t)elsize, - (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); - }else{ - cbf_failnez(CBF_ALLOC); - } - *slen = elsize*ndimfast*ndimmid*ndimslow; - *s = (char *) array; - } - -/* cfunc cbf_set_typeofvalue pyfunc set_typeofvalue - arg cbf_handle handle arg const char *typeofvalue */ - -%feature("autodoc", " -Returns : string -*args : - -C prototype: int cbf_set_typeofvalue (cbf_handle handle, - const char *typeofvalue); - -CBFLib documentation: -DESCRIPTION -cbf_set_typeofvalue sets the type of the item at the current column -and row to the type specified by the ASCII character string given by -typeofvalue. The strings that may be used are: - \"null \" for a null value indicated by a \". \" or a \"? \" -\"bnry \" for a binary value \"word \" for an unquoted string -\"dblq \" for a double-quoted string \"sglq \" for a single-quoted -string \"text \" for a semicolon-quoted string (multiline text -field) \"prns \" for a parenthesis-bracketed string (multiline text -field) \"brcs \" for a brace-bracketed string (multiline text field) - \"bkts \" for a square-bracket-bracketed string (multiline text -field) \"tsqs \" for a treble-single-quote quoted string (multiline -text field) \"tdqs \" for a treble-double-quote quoted string -(multiline text field) -Not all types may be used for all values. Not all types are valid for -all type of CIF files. In partcular the types \"prns \", \"brcs \", - \"bkts \" were introduced with DDLm and are not valid in DDL1 or -DDL2 CIFS. The types \"tsqs \" and \"tdqs \" are not formally part -of the CIF syntax. No changes may be made to the type of binary -values. You may not set the type of a string that contains a single -quote followed by a blank or a tab or which contains multiple lines -to \"sglq \". You may not set the type of a string that contains a -double quote followed by a blank or a tab or which contains multiple -lines to \"dblq \". -ARGUMENTS -handle CBF handle. typeofvalue ASCII string for desired type -of value. -RETURN VALUE -Returns an error code on failure or 0 for success. -SEE ALSO -")set_typeofvalue; - void set_typeofvalue(const char* arg){ - cbf_failnez(cbf_set_typeofvalue(self,arg));} -%feature("autodoc", " -Returns : String -*args : String axis_id - -C prototype: int cbf_get_axis_rotation_axis (cbf_handle handle, - const char *axis_id, const char * *rotation_axis); - -CBFLib documentation: -DESCRIPTION -cbf_count_axis_ancestors sets ancestors to the number of ancestors of -axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor -axis of index ancestor_index of axis axis_id, starting with axis_id -for ancestor_index 0. -cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of -axis_id or to \". \" if there is no such ancestor. -cbf_get_axis_equipment sets *equipment to the equipment of axis_id or -to \". \" if there is no such equipment. -cbf_get_axis_equipment_component sets *equipment_component to the -equipment_component of axis_id or to \". \" if there is no such -equipment_component. -cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the -components of the ofset of axis_id. -cbf_get_axis_rotation sets rotation to the rotation of axis_id or to -0 if there is no such rotation. cbf_get_axis_rotation_axis sets -*rotation_axis to the rotation_axis of axis_id or to \". \" if there -is no such rotation_axis. -cbf_get_axis_setting sets *start and *increment to the corresponding -values of the axis axis_id. Any of the destination pointers may be -NULL. -cbf_get_axis_type sets axis_type to the type of axis_id. -cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the -components of the vector of axis_id. -The parameter reserved is presently unused and should be set to 0. -ARGUMENTS -handle CBF handle. reserved Unused. Any -value other than 0 is invalid. axis_id Axis id. -ancestor_index Integer index of the desired ancestor, starting -with 0 for the current axis_id. ancestor Pointer to -destination ancestor name pointer. depends_on Pointer to -destination depends_on name pointer. equipment Pointer to -destination equipment name pointer. equipment_component Pointer to -destination equipment_component name pointer. offset1 -Pointer to destination first offset component value. offset2 - Pointer to destination second offset component value. offset3 - Pointer to destination third offset component value. -rotation Pointer to destination rotation value. -rotation_axis Pointer to destination rotation_axisn name -pointer. start Pointer to the destination start -value. increment Pointer to the destination increment -value. type Pointer to destination axis type of type -. vector1 Pointer to destination first vector component -value. vector2 Pointer to destination second vector -component value. vector3 Pointer to destination third -vector component value. -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_axis_rotation_axis; - - const char * get_axis_rotation_axis(const char *axis_id){ - const char* rot_axis; - cbf_failnez(cbf_get_axis_rotation_axis(self,axis_id, - &rot_axis)); - return rot_axis; - } - %feature("autodoc", " -Returns : -*args : int compression,int binary_id,(binary) String data,int elsize, - int elsigned,int elements,String byteorder,int dimfast,int dimmid, - int dimslow,int padding - -C prototype: int cbf_set_integerarray_wdims (cbf_handle handle, - unsigned int compression, int binary_id, void *array, - size_t elsize, int elsigned, size_t elements, - const char *byteorder, size_t dimfast, size_t dimmid, - size_t dimslow, size_t padding); - -CBFLib documentation: -DESCRIPTION -cbf_set_integerarray sets the binary value of the item at the current -column and row to an integer array. The array consists of elements -elements of elsize bytes each, starting at array. The elements are -signed if elsigned is non-0 and unsigned otherwise. binary_id is the -binary section identifier. cbf_set_realarray sets the binary value of -the item at the current column and row to an integer array. The array -consists of elements elements of elsize bytes each, starting at -array. binary_id is the binary section identifier. -The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, -cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, -cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants -allow the data header values of byteorder, dimfast, dimmid, dimslow -and padding to be set to the data byte order, the fastest, second -fastest and third fastest array dimensions and the size in byte of -the post data padding to be used. -The array will be compressed using the compression scheme specifed by -compression. Currently, the available schemes are: -CBF_CANONICAL Canonical-code compression (section 3.3.1) -CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple -\"nibble_offset \" compression. CBF_NONE No compression. -NOTE: This scheme is by far the slowest of the four and uses much -more disk space. It is intended for routine use with small arrays -only. With large arrays (like images) it should be used only for -debugging. -The values compressed are limited to 64 bits. If any element in the -array is larger than 64 bits, the value compressed is the nearest -64-bit value. -Currently, the source array must consist of chars, shorts or ints -(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or -floats for cbf_set_realarray. If elsize is not equal to sizeof -(char), sizeof (short) or sizeof (int), the function returns -CBF_ARGUMENT. -ARGUMENTS -handle CBF handle. compression Compression method to use. -binary_id Integer binary identifier. array Pointer to the -source array. elsize Size in bytes of each source array -element. elsigned Set to non-0 if the source array elements are -signed. elements: The number of elements in the array. -RETURN VALUE -Returns an error code on failure or 0 for success. -SEE ALSO -")set_integerarray_wdims; - - /* CBFlib must NOT modify the data string nor the byteorder string - which belongs to the scripting - language we will get and check the length via a typemap */ - -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray_wdims; -%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_integerarray_wdims; - - void set_integerarray_wdims(unsigned int compression, int binary_id, - char *data, int len, int elsize, int elsigned, int elements, - char *bo, int bolen, int dimfast, int dimmid, int dimslow, int padding){ - /* safety check on args */ - size_t els, ele; - void *array; - char byteorder[15]; - if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ - array = data; - els = elsize; - ele = elements; - strncpy(byteorder,bo,bolen<15?bolen:14); - byteorder[bolen<15?bolen:14] = 0; - cbf_failnez(cbf_set_integerarray_wdims (self, compression, binary_id, - (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder, - (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding)); - }else{ - cbf_failnez(CBF_ARGUMENT); - } - } -%feature("autodoc", " -Returns : -*args : Float time - -C prototype: int cbf_set_integration_time (cbf_handle handle, - unsigned int reserved, double time); - -CBFLib documentation: -DESCRIPTION -cbf_set_integration_time sets the integration time in seconds to the -value specified by time. The parameter reserved is presently unused -and should be set to 0. -ARGUMENTS -handle CBF handle. reserved Unused. Any value -other than 0 is invalid. time Integration time in seconds. -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")set_integration_time; - - void set_integration_time(double time){ - unsigned int reserved; - reserved = 0; - cbf_failnez(cbf_set_integration_time(self,reserved,time)); - } + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } %feature("autodoc", " -Returns : -*args : String axis_id,Float start,Float increment +Returns : (Binary)String +*args : int element_number,int elsize,int ndimfast,int ndimslow -C prototype: int cbf_set_axis_setting (cbf_handle handle, - unsigned int reserved, const char *axis_id, double start, - double increment); +C prototype: int cbf_get_real_image_fs (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + void *array, size_t elsize, size_t ndimfast, + size_t ndimslow); CBFLib documentation: DESCRIPTION -cbf_set_axis_setting sets the starting and increment values of the -axis axis_id to start and increment. -The parameter reserved is presently unused and should be set to 0. -ARGUMENTS -handle CBF handle. reserved Unused. Any value other than 0 is -invalid. axis_id Axis id. start Start value. increment -Increment value. -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")set_axis_setting; +cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image +array for element number element_number into an array. The array +consists of ndimslow *ndimfast elements of elsize bytes each, +starting at array. The elements are signed if elsign is non-0 and +unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and +cbf_get_real_image_sf read the image array of IEEE doubles or floats +for element number element_number into an array. A real array is +always signed. cbf_get_3d_image, cbf_get_3d_image_fs and +cbf_get_3d_image_sf read the 3D image array for element number +element_number into an array. The array consists of ndimslow *ndimmid +*ndimfast elements of elsize bytes each, starting at array. The +elements are signed if elsign is non-0 and unsigned otherwise. +cbf_get_real_3d_image, cbf_get_real_3d_image_fs, +cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or +floats for element number element_number into an array. A real array +is always signed. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +The structure of the array as a 1-, 2- or 3-dimensional array should +agree with the structure of the array given in the +ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, +ndimslow should be the array size and ndimfast and, for the 3D calls, +ndimmid, should be set to 1 both in the call and in the imgCIF data +being processed. If the array is 2-dimensional and a 3D call is used, +ndimslow and ndimmid should be the +")get_real_image_fs_as_string; - void set_axis_setting(const char *axis_id, - double start, double increment){ - unsigned int reserved; - reserved = 0; - cbf_failnez(cbf_set_axis_setting(self,reserved, - axis_id,start,increment)); - } +// Ensure we free the local temporary +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_real_image_fs_as_string; +// Get the length correct + + void get_real_image_fs_as_string(int element_number, char **s, int *slen, + int elsize, int ndimfast, int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + cbf_failnez (cbf_get_real_image_fs(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimfast, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } %feature("autodoc", " Returns : (Binary)String *args : int element_number,int elsize,int ndimslow,int ndimfast -C prototype: int cbf_get_real_image (cbf_handle handle, unsigned int reserved, - unsigned int element_number, void *array, size_t elsize, - size_t ndimslow, size_t ndimfast); +C prototype: int cbf_get_real_image_sf (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + void *array, size_t elsize, size_t ndimslow, + size_t ndimfast); CBFLib documentation: DESCRIPTION @@ -4950,22 +5087,23 @@ ndimslow should be the array size and ndimfast and, for the 3D calls, ndimmid, should be set to 1 both in the call and in the imgCIF data being processed. If the array is 2-dimensional and a 3D call is used, ndimslow and ndimmid should be the -")get_real_image_as_string; +")get_real_image_sf_as_string; // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) - get_real_image_as_string; - + get_real_image_sf_as_string; // Get the length correct - void get_real_image_as_string(int element_number, char **s, int *slen, + void get_real_image_sf_as_string(int element_number, char **s, int *slen, int elsize, int ndimslow, int ndimfast){ void *array; int reserved = 0; *slen = 0; /* Initialise in case of problems */ if ((array=malloc(elsize*ndimfast*ndimslow))) { - cbf_failnez (cbf_get_real_image(self, + cbf_failnez (cbf_get_real_image_sf(self, reserved, (unsigned int)element_number, (void *)array, (size_t)elsize, (size_t) ndimslow, (size_t)ndimfast)); @@ -4976,73 +5114,134 @@ ndimslow and ndimmid should be the *s = (char *) array; } %feature("autodoc", " -Returns : String -*args : String axis_id,Integer ancestor_index +Returns : (Binary)String +*args : int element_number,int elsize,int elsign,int ndimslow,int ndimmid, + int ndimfast -C prototype: int cbf_get_axis_ancestor (cbf_handle handle, - const char *axis_id, const unsigned int ancestor_index, - const char * *ancestor); +C prototype: int cbf_get_3d_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, + int elsign, size_t ndimslow, size_t ndimmid, + size_t ndimfast); CBFLib documentation: DESCRIPTION -cbf_count_axis_ancestors sets ancestors to the number of ancestors of -axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor -axis of index ancestor_index of axis axis_id, starting with axis_id -for ancestor_index 0. -cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of -axis_id or to \". \" if there is no such ancestor. -cbf_get_axis_equipment sets *equipment to the equipment of axis_id or -to \". \" if there is no such equipment. -cbf_get_axis_equipment_component sets *equipment_component to the -equipment_component of axis_id or to \". \" if there is no such -equipment_component. -cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the -components of the ofset of axis_id. -cbf_get_axis_rotation sets rotation to the rotation of axis_id or to -0 if there is no such rotation. cbf_get_axis_rotation_axis sets -*rotation_axis to the rotation_axis of axis_id or to \". \" if there -is no such rotation_axis. -cbf_get_axis_setting sets *start and *increment to the corresponding -values of the axis axis_id. Any of the destination pointers may be -NULL. -cbf_get_axis_type sets axis_type to the type of axis_id. -cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the -components of the vector of axis_id. -The parameter reserved is presently unused and should be set to 0. -ARGUMENTS -handle CBF handle. reserved Unused. Any -value other than 0 is invalid. axis_id Axis id. -ancestor_index Integer index of the desired ancestor, starting -with 0 for the current axis_id. ancestor Pointer to -destination ancestor name pointer. depends_on Pointer to -destination depends_on name pointer. equipment Pointer to -destination equipment name pointer. equipment_component Pointer to -destination equipment_component name pointer. offset1 -Pointer to destination first offset component value. offset2 - Pointer to destination second offset component value. offset3 - Pointer to destination third offset component value. -rotation Pointer to destination rotation value. -rotation_axis Pointer to destination rotation_axisn name -pointer. start Pointer to the destination start -value. increment Pointer to the destination increment -value. type Pointer to destination axis type of type -. vector1 Pointer to destination first vector component -value. vector2 Pointer to destination second vector -component value. vector3 Pointer to destination third -vector component value. -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_axis_ancestor; +cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image +array for element number element_number into an array. The array +consists of ndimslow *ndimfast elements of elsize bytes each, +starting at array. The elements are signed if elsign is non-0 and +unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and +cbf_get_real_image_sf read the image array of IEEE doubles or floats +for element number element_number into an array. A real array is +always signed. cbf_get_3d_image, cbf_get_3d_image_fs and +cbf_get_3d_image_sf read the 3D image array for element number +element_number into an array. The array consists of ndimslow *ndimmid +*ndimfast elements of elsize bytes each, starting at array. The +elements are signed if elsign is non-0 and unsigned otherwise. +cbf_get_real_3d_image, cbf_get_real_3d_image_fs, +cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or +floats for element number element_number into an array. A real array +is always signed. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +The structure of the array as a 1-, 2- or 3-dimensional array should +agree with the structure of the array given in the +ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, +ndimslow should be the array size and ndimfast and, for the 3D calls, +ndimmid, should be set to 1 both in the call and in the imgCIF data +being processed. If the array is 2-dimensional and a 3D call is used, +ndimslow and ndimmid should be the +")get_3d_image_as_string; + +// Ensure we free the local temporary +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_3d_image_as_string; +// Get the length correct + + void get_3d_image_as_string(int element_number, char **s, int *slen, + int elsize, int elsign, int ndimfast, int ndimmid, int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + cbf_failnez (cbf_get_3d_image(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } +%feature("autodoc", " +Returns : (Binary)String +*args : int element_number,int elsize,int elsign,int ndimfast,int ndimmid, + int ndimslow + +C prototype: int cbf_get_3d_image_fs (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + void *array, size_t elsize, int elsign, size_t ndimfast, + size_t ndimmid, size_t ndimslow); + +CBFLib documentation: +DESCRIPTION +cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image +array for element number element_number into an array. The array +consists of ndimslow *ndimfast elements of elsize bytes each, +starting at array. The elements are signed if elsign is non-0 and +unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and +cbf_get_real_image_sf read the image array of IEEE doubles or floats +for element number element_number into an array. A real array is +always signed. cbf_get_3d_image, cbf_get_3d_image_fs and +cbf_get_3d_image_sf read the 3D image array for element number +element_number into an array. The array consists of ndimslow *ndimmid +*ndimfast elements of elsize bytes each, starting at array. The +elements are signed if elsign is non-0 and unsigned otherwise. +cbf_get_real_3d_image, cbf_get_real_3d_image_fs, +cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or +floats for element number element_number into an array. A real array +is always signed. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +The structure of the array as a 1-, 2- or 3-dimensional array should +agree with the structure of the array given in the +ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, +ndimslow should be the array size and ndimfast and, for the 3D calls, +ndimmid, should be set to 1 both in the call and in the imgCIF data +being processed. If the array is 2-dimensional and a 3D call is used, +ndimslow and ndimmid should be the +")get_3d_image_fs_as_string; + +// Ensure we free the local temporary +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_3d_image_fs_as_string; +// Get the length correct - const char * get_axis_ancestor(const char *axis_id, - int ancestor_index){ - const char* anc; - cbf_failnez(cbf_get_axis_ancestor(self,axis_id, - (unsigned int)ancestor_index,&anc)); - return anc; - } - %feature("autodoc", " + void get_3d_image_fs_as_string(int element_number, char **s, int *slen, + int elsize, int elsign, int ndimfast, int ndimmid, int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + cbf_failnez (cbf_get_3d_image_fs(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } +%feature("autodoc", " Returns : (Binary)String *args : int element_number,int elsize,int elsign,int ndimslow,int ndimmid, int ndimfast @@ -5083,9 +5282,11 @@ ndimslow and ndimmid should be the ")get_3d_image_sf_as_string; // Ensure we free the local temporary - %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_3d_image_sf_as_string; +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} // Get the length correct @@ -5106,536 +5307,645 @@ ndimslow and ndimmid should be the *s = (char *) array; } %feature("autodoc", " -Returns : -*args : int element_number,int compression,(binary) String data,int elsize, - int dimfast,int dimslow +Returns : (Binary)String +*args : int element_number,int elsize,int ndimslow,int ndimmid,int ndimfast -C prototype: int cbf_set_real_image_fs(cbf_handle handle, +C prototype: int cbf_get_real_3d_image (cbf_handle handle, unsigned int reserved, unsigned int element_number, - unsigned int compression, void *array,size_t elsize, - size_t ndimfast, size_t ndimslow); + void *array, size_t elsize, size_t ndimslow, + size_t ndimmid, size_t ndimfast); CBFLib documentation: DESCRIPTION -cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image -array for element number element_number. The array consists of -ndimfast *ndimslow elements of elsize bytes each, starting at array. -The elements are signed if elsign is non-zero and unsigned otherwise. -cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf -write the image array for element number element_number. The array -consists of ndimfast *ndimslow IEEE double or float elements of -elsize bytes each, starting at array. cbf_set_3d_image, -cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array -for element number element_number. The array consists of ndimfast -*ndimmid *ndimslow elements of elsize bytes each, starting at array. -The elements are signed if elsign is non-0 and unsigned otherwise. -cbf_set_real_3d_image, cbf_set_real_3d_image_fs and -cbf_set_real_3d_image_sf writes the 3D image array for element number -element_number. The array consists of ndimfast *ndimmid *ndimslow -IEEE double or float elements of elsize bytes each, starting at -array. +cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image +array for element number element_number into an array. The array +consists of ndimslow *ndimfast elements of elsize bytes each, +starting at array. The elements are signed if elsign is non-0 and +unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and +cbf_get_real_image_sf read the image array of IEEE doubles or floats +for element number element_number into an array. A real array is +always signed. cbf_get_3d_image, cbf_get_3d_image_fs and +cbf_get_3d_image_sf read the 3D image array for element number +element_number into an array. The array consists of ndimslow *ndimmid +*ndimfast elements of elsize bytes each, starting at array. The +elements are signed if elsign is non-0 and unsigned otherwise. +cbf_get_real_3d_image, cbf_get_real_3d_image_fs, +cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or +floats for element number element_number into an array. A real array +is always signed. The _fs calls give the dimensions in a fast-to-slow order. The calls with no suffix and the calls _sf calls give the dimensions in slow-to-fast order -If the array is 1-dimensional, ndimslow should be the array size and -ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the -array is 2-dimensional and the 3D calls are used, ndimslow and -ndimmid should be used for the array dimensions and ndimfast should -be set to 1. -The array will be compressed using the compression scheme specifed by -compression. Currently, the available schemes are: -CBF_CANONICAL Canonical-code compression (section 3.3.1) -CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET -Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple -\"nibble_offset \" compression. CBF_NONE No compression. -The values compressed are limited to 64 bits. If any element in the -array is larger than 64 bits, the value compressed is the nearest -64-bit value. -Currently, the source array must consist of chars, shorts or ints -(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for -cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof -(int), sizeof(double) or sizeof(float), the function returns -CBF_ARGUMENT. -The parameter reserved is presently unused and should be set to 0. -ARGUMENTS -handle CBF handle. reserved Unused. Any value other -than 0 is invalid. element_number The number of the detector -element counting from 0 by order of appearance in the -\"diffrn_data_frame \" category. compression Compression type. -array Pointer to the image array. elsize Size in -bytes of each image array element. elsigned Set to non-0 if -the image array elements are signed. ndimslow Slowest array -dimension. ndimmid Second slowest array dimension. ndimfast - Fastest array dimension. -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")set_real_image_fs; - - /* CBFlib must NOT modify the data string which belongs to the scripting - language we will get and check the length via a typemap */ - -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_image; - - void set_real_image_fs(unsigned int element_number, - unsigned int compression, - char *data, int len, int elsize, int ndimfast, int ndimslow){ - /* safety check on args */ - size_t els; - unsigned int reserved; - void *array; - if(len == elsize*ndimslow*ndimfast){ - array = data; - els = elsize; - reserved = 0; - cbf_failnez(cbf_set_real_image_fs (self, reserved, element_number, compression, - (void *) data, (size_t) elsize, (size_t) ndimfast, (size_t)ndimslow)); - }else{ - cbf_failnez(CBF_ARGUMENT); - } - } -%feature("autodoc", " -Returns : Float overload -*args : Integer element_number - -C prototype: int cbf_get_overload (cbf_handle handle, - unsigned int element_number, double *overload); - -CBFLib documentation: -DESCRIPTION -cbf_get_overload sets *overload to the overload value for element -number element_number. -ARGUMENTS -handle CBF handle. element_number The number of the -detector element counting from 0 by order of appearance in the -\"diffrn_data_frame \" category. overload Pointer to the -destination overload. -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_overload; - -%apply double *OUTPUT {double *overload} get_overload; - void get_overload(unsigned int element_number, double *overload){ - cbf_failnez(cbf_get_overload(self,element_number,overload)); - } - -/* cfunc cbf_get_wavelength pyfunc get_wavelength - arg cbf_handle handle arg double *wavelength */ - -%feature("autodoc", " -Returns : double -*args : - -C prototype: int cbf_get_wavelength (cbf_handle handle, double *wavelength); - -CBFLib documentation: -DESCRIPTION -cbf_get_wavelength sets *wavelength to the current wavelength in AA. -ARGUMENTS -handle CBF handle. wavelength Pointer to the destination. -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_wavelength; - double get_wavelength(void){ - double result; - cbf_failnez(cbf_get_wavelength(self,&result)); - return result;} - -/* cfunc cbf_next_datablock pyfunc next_datablock - arg cbf_handle handle */ - -%feature("autodoc", " -Returns : -*args : - -C prototype: int cbf_next_datablock (cbf_handle handle); - -CBFLib documentation: -DESCRIPTION -cbf_next_datablock makes the data block following the current data -block the current data block. -If there are no more data blocks, the function returns CBF_NOTFOUND. -The current category becomes undefined. -ARGUMENTS -handle CBF handle. -RETURN VALUE -Returns an error code on failure or 0 for success. -SEE ALSO -")next_datablock; - void next_datablock(void){ - cbf_failnez(cbf_next_datablock(self));} -%feature("autodoc", " -Returns : int compression,int binary_id,int elsize,int elements,char **bo, - int *bolen,int dimfast,int dimmid,int dimslow,int padding -*args : - -C prototype: int cbf_get_realarrayparameters_wdims (cbf_handle handle, - unsigned int *compression, int *binary_id, size_t *elsize, - size_t *elements, const char **byteorder, size_t *dimfast, - size_t *dimmid, size_t *dimslow, size_t *padding); - -CBFLib documentation: -DESCRIPTION -cbf_get_integerarrayparameters sets *compression, *binary_id, -*elsize, *elsigned, *elunsigned, *elements, *minelement and -*maxelement to values read from the binary value of the item at the -current column and row. This provides all the arguments needed for a -subsequent call to cbf_set_integerarray, if a copy of the array is to -be made into another CIF or CBF. cbf_get_realarrayparameters sets -*compression, *binary_id, *elsize, *elements to values read from the -binary value of the item at the current column and row. This provides -all the arguments needed for a subsequent call to cbf_set_realarray, -if a copy of the arry is to be made into another CIF or CBF. -The variants cbf_get_integerarrayparameters_wdims, -cbf_get_integerarrayparameters_wdims_fs, -cbf_get_integerarrayparameters_wdims_sf, -cbf_get_realarrayparameters_wdims, -cbf_get_realarrayparameters_wdims_fs, -cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, -*dimmid, *dimslow, and *padding as well, providing the additional -parameters needed for a subsequent call to cbf_set_integerarray_wdims -or cbf_set_realarray_wdims. -The value returned in *byteorder is a pointer either to the string -\"little_endian \" or to the string \"big_endian \". This should be -the byte order of the data, not necessarily of the host machine. No -attempt should be made to modify this string. At this time only -\"little_endian \" will be returned. -The values returned in *dimfast, *dimmid and *dimslow are the sizes -of the fastest changing, second fastest changing and third fastest -changing dimensions of the array, if specified, or zero, if not -specified. -The value returned in *padding is the size of the post-data padding, -if any and if specified in the data header. The value is given as a -count of octets. -If the value is not binary, the function returns CBF_ASCII. -ARGUMENTS -handle CBF handle. compression Compression method used. -elsize Size in bytes of each array element. binary_id -Pointer to the destination integer binary identifier. elsigned -Pointer to an integer. Set to 1 if the elements can be read as signed -integers. elunsigned Pointer to an integer. Set to 1 if the -elements can be read as unsigned integers. elements Pointer to -the destination number of elements. minelement Pointer to the -destination smallest element. maxelement Pointer to the -destination largest element. byteorder Pointer to the destination -byte order. dimfast Pointer to the destination fastest -dimension. dimmid Pointer to the destination second fastest -dimension. dimslow Pointer to the destination third fastest -dimension. padding Pointer to the destination padding size. -RETURN VALUE -Returns an error code on failure or 0 for success. -SEE ALSO -")get_realarrayparameters_wdims; +The structure of the array as a 1-, 2- or 3-dimensional array should +agree with the structure of the array given in the +ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, +ndimslow should be the array size and ndimfast and, for the 3D calls, +ndimmid, should be set to 1 both in the call and in the imgCIF data +being processed. If the array is 2-dimensional and a 3D call is used, +ndimslow and ndimmid should be the +")get_real_3d_image_as_string; -%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); -%apply int *OUTPUT {int *compression,int *binary_id, - int *elsize, - int *elements, - int *dimslow, int *dimmid, int *dimfast, int *padding} - get_realarrayparameters_wdims; +// Ensure we free the local temporary +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_real_3d_image_as_string; +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} - void get_realarrayparameters_wdims(int *compression,int *binary_id, - int *elsize, - int *elements, - char **bo, int *bolen, - int *dimfast, int *dimmid, int *dimslow, int *padding - ){ - unsigned int comp; - size_t elsiz, elem, df,dm,ds,pd; - const char * byteorder; - char * bot; - cbf_failnez(cbf_get_realarrayparameters_wdims(self, - &comp,binary_id, &elsiz, &elem, - &byteorder,&df,&dm,&ds,&pd )); - *bolen = strlen(byteorder); - if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} - strncpy(bot,byteorder,*bolen); - *bo = bot; - *compression = comp; - *elsize = elsiz; - *elements = elem; - *dimfast = df; - *dimmid = dm; - *dimslow = ds; - *padding = pd; - - } +// Get the length correct + + void get_real_3d_image_as_string(int element_number, char **s, int *slen, + int elsize, int ndimslow, int ndimmid, int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + cbf_failnez (cbf_get_real_3d_image(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } %feature("autodoc", " -Returns : -*args : Float matrix_0,Float matrix_1,Float matrix_2,Float matrix_3, - Float matrix_4,Float matrix_5,Float matrix_6,Float matrix_7, - Float matrix_8 +Returns : (Binary)String +*args : int element_number,int elsize,int ndimfast,int ndimmid,int ndimslow -C prototype: int cbf_set_orientation_matrix (cbf_handle handle, - double ub_matrix[9]); +C prototype: int cbf_get_real_3d_image_fs (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + void *array, size_t elsize, size_t ndimfast, + size_t ndimmid, size_t ndimslow); CBFLib documentation: DESCRIPTION -cbf_get_orientation_matrix sets ub_matrix to point to the array of -orientation matrix entries in the \"diffrn \" category in the order -of columns: - \"UB[1][1] \" \"UB[1][2] \" \"UB[1][3] \" \"UB[2][1] \" -\"UB[2][2] \" \"UB[2][3] \" \"UB[3][1] \" \"UB[3][2] \" -\"UB[3][3] \" -cbf_set_orientation_matrix sets the values in the \"diffrn \" -category to the values pointed to by ub_matrix. -ARGUMENTS -handle CBF handle. ubmatric Source or destination array of 9 -doubles giving the orientation matrix parameters. -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")set_orientation_matrix; - - void set_orientation_matrix( double m0,double m1, -double m2,double m3,double m4,double m5,double m6, -double m7,double m8){ - double m[9]; - m[0] = m0; m[1]=m1 ; m[2]=m2 ; - m[3] = m3; m[4]=m4 ; m[5]=m5 ; - m[6] = m6; m[7]=m7 ; m[8]=m8 ; - cbf_failnez(cbf_get_orientation_matrix(self,m)); - } +cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image +array for element number element_number into an array. The array +consists of ndimslow *ndimfast elements of elsize bytes each, +starting at array. The elements are signed if elsign is non-0 and +unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and +cbf_get_real_image_sf read the image array of IEEE doubles or floats +for element number element_number into an array. A real array is +always signed. cbf_get_3d_image, cbf_get_3d_image_fs and +cbf_get_3d_image_sf read the 3D image array for element number +element_number into an array. The array consists of ndimslow *ndimmid +*ndimfast elements of elsize bytes each, starting at array. The +elements are signed if elsign is non-0 and unsigned otherwise. +cbf_get_real_3d_image, cbf_get_real_3d_image_fs, +cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or +floats for element number element_number into an array. A real array +is always signed. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +The structure of the array as a 1-, 2- or 3-dimensional array should +agree with the structure of the array given in the +ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, +ndimslow should be the array size and ndimfast and, for the 3D calls, +ndimmid, should be set to 1 both in the call and in the imgCIF data +being processed. If the array is 2-dimensional and a 3D call is used, +ndimslow and ndimmid should be the +")get_real_3d_image_fs_as_string; -/* cfunc cbf_new_category pyfunc new_category - arg cbf_handle handle arg const char *categoryname */ +// Ensure we free the local temporary +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_real_3d_image_fs_as_string; +// Get the length correct + void get_real_3d_image_fs_as_string(int element_number, char **s, int *slen, + int elsize, int ndimfast, int ndimmid, int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + cbf_failnez (cbf_get_real_3d_image_fs(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } %feature("autodoc", " -Returns : string -*args : +Returns : (Binary)String +*args : int element_number,int elsize,int ndimslow,int ndimmid,int ndimfast -C prototype: int cbf_new_category (cbf_handle handle, - const char *categoryname); +C prototype: int cbf_get_real_3d_image_sf (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + void *array, size_t elsize, size_t ndimslow, + size_t ndimmid, size_t ndimfast); CBFLib documentation: DESCRIPTION -cbf_new_category creates a new category in the current data block -with name categoryname and makes it the current category. -If a category with this name already exists, the existing category -becomes the current category. -ARGUMENTS -handle CBF handle. categoryname The name of the new -category. -RETURN VALUE -Returns an error code on failure or 0 for success. -SEE ALSO -")new_category; - void new_category(const char* arg){ - cbf_failnez(cbf_new_category(self,arg));} +cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image +array for element number element_number into an array. The array +consists of ndimslow *ndimfast elements of elsize bytes each, +starting at array. The elements are signed if elsign is non-0 and +unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and +cbf_get_real_image_sf read the image array of IEEE doubles or floats +for element number element_number into an array. A real array is +always signed. cbf_get_3d_image, cbf_get_3d_image_fs and +cbf_get_3d_image_sf read the 3D image array for element number +element_number into an array. The array consists of ndimslow *ndimmid +*ndimfast elements of elsize bytes each, starting at array. The +elements are signed if elsign is non-0 and unsigned otherwise. +cbf_get_real_3d_image, cbf_get_real_3d_image_fs, +cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or +floats for element number element_number into an array. A real array +is always signed. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +The structure of the array as a 1-, 2- or 3-dimensional array should +agree with the structure of the array given in the +ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, +ndimslow should be the array size and ndimfast and, for the 3D calls, +ndimmid, should be set to 1 both in the call and in the imgCIF data +being processed. If the array is 2-dimensional and a 3D call is used, +ndimslow and ndimmid should be the +")get_real_3d_image_sf_as_string; + +// Ensure we free the local temporary +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} +%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) + get_real_3d_image_sf_as_string; + +// Get the length correct + + void get_real_3d_image_sf_as_string(int element_number, char **s, int *slen, + int elsize, int ndimslow, int ndimmid, int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + cbf_failnez (cbf_get_real_3d_image_sf(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ALLOC); + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } %feature("autodoc", " Returns : -*args : Float gain,Float gain_esd +*args : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimslow,int dimfast -C prototype: int cbf_set_gain (cbf_handle handle, unsigned int element_number, - double gain, double gain_esd); +C prototype: int cbf_set_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array, size_t elsize, int elsign, size_t ndimslow, + size_t ndimfast); CBFLib documentation: DESCRIPTION -cbf_set_gain sets the gain of element number element_number to the -values specified by gain and gain_esd. +cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image +array for element number element_number. The array consists of +ndimfast *ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-zero and unsigned otherwise. +cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf +write the image array for element number element_number. The array +consists of ndimfast *ndimslow IEEE double or float elements of +elsize bytes each, starting at array. cbf_set_3d_image, +cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array +for element number element_number. The array consists of ndimfast +*ndimmid *ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-0 and unsigned otherwise. +cbf_set_real_3d_image, cbf_set_real_3d_image_fs and +cbf_set_real_3d_image_sf writes the 3D image array for element number +element_number. The array consists of ndimfast *ndimmid *ndimslow +IEEE double or float elements of elsize bytes each, starting at +array. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +If the array is 1-dimensional, ndimslow should be the array size and +ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the +array is 2-dimensional and the 3D calls are used, ndimslow and +ndimmid should be used for the array dimensions and ndimfast should +be set to 1. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET +Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for +cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof +(int), sizeof(double) or sizeof(float), the function returns +CBF_ARGUMENT. +The parameter reserved is presently unused and should be set to 0. ARGUMENTS -handle CBF handle. element_number The number of the -detector element counting from 0 by order of appearance in the -\"diffrn_data_frame \" category. gain New gain value. -gain_esd New gain_esd value. +handle CBF handle. reserved Unused. Any value other +than 0 is invalid. element_number The number of the detector +element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. compression Compression type. +array Pointer to the image array. elsize Size in +bytes of each image array element. elsigned Set to non-0 if +the image array elements are signed. ndimslow Slowest array +dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")set_gain; +")set_image; - void set_gain (unsigned int element_number, double gain, double gain_esd){ - cbf_failnez(cbf_set_gain (self, element_number, gain, gain_esd)); - } + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ -/* cfunc cbf_find_column pyfunc find_column - arg cbf_handle handle arg const char *columnname */ +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_image; + void set_image(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int elsign, int ndimslow, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } %feature("autodoc", " -Returns : string -*args : +Returns : +*args : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimfast,int dimslow -C prototype: int cbf_find_column (cbf_handle handle, const char *columnname); +C prototype: int cbf_set_image_fs(cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array, size_t elsize, int elsign, size_t ndimfast, + size_t ndimslow); CBFLib documentation: DESCRIPTION -cbf_find_column makes the columns in the current category with name -columnname the current column. -The comparison is case-insensitive. -If the column does not exist, the function returns CBF_NOTFOUND. -The current row is not affected. +cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image +array for element number element_number. The array consists of +ndimfast *ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-zero and unsigned otherwise. +cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf +write the image array for element number element_number. The array +consists of ndimfast *ndimslow IEEE double or float elements of +elsize bytes each, starting at array. cbf_set_3d_image, +cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array +for element number element_number. The array consists of ndimfast +*ndimmid *ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-0 and unsigned otherwise. +cbf_set_real_3d_image, cbf_set_real_3d_image_fs and +cbf_set_real_3d_image_sf writes the 3D image array for element number +element_number. The array consists of ndimfast *ndimmid *ndimslow +IEEE double or float elements of elsize bytes each, starting at +array. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +If the array is 1-dimensional, ndimslow should be the array size and +ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the +array is 2-dimensional and the 3D calls are used, ndimslow and +ndimmid should be used for the array dimensions and ndimfast should +be set to 1. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET +Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for +cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof +(int), sizeof(double) or sizeof(float), the function returns +CBF_ARGUMENT. +The parameter reserved is presently unused and should be set to 0. ARGUMENTS -handle CBF handle. columnname The name of column to find. +handle CBF handle. reserved Unused. Any value other +than 0 is invalid. element_number The number of the detector +element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. compression Compression type. +array Pointer to the image array. elsize Size in +bytes of each image array element. elsigned Set to non-0 if +the image array elements are signed. ndimslow Slowest array +dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")find_column; - void find_column(const char* arg){ - cbf_failnez(cbf_find_column(self,arg));} +---------------------------------------------------------------------- +")set_image_fs; -/* cfunc cbf_remove_category pyfunc remove_category - arg cbf_handle handle */ + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_image; + void set_image_fs(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int elsign, int ndimfast, int ndimslow){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimfast, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } %feature("autodoc", " Returns : -*args : +*args : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimslow,int dimfast -C prototype: int cbf_remove_category (cbf_handle handle); +C prototype: int cbf_set_image_sf(cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array, size_t elsize, int elsign, size_t ndimslow, + size_t ndimfast); CBFLib documentation: DESCRIPTION -cbf_remove_category deletes the current category. -The current category becomes undefined. +cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image +array for element number element_number. The array consists of +ndimfast *ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-zero and unsigned otherwise. +cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf +write the image array for element number element_number. The array +consists of ndimfast *ndimslow IEEE double or float elements of +elsize bytes each, starting at array. cbf_set_3d_image, +cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array +for element number element_number. The array consists of ndimfast +*ndimmid *ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-0 and unsigned otherwise. +cbf_set_real_3d_image, cbf_set_real_3d_image_fs and +cbf_set_real_3d_image_sf writes the 3D image array for element number +element_number. The array consists of ndimfast *ndimmid *ndimslow +IEEE double or float elements of elsize bytes each, starting at +array. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +If the array is 1-dimensional, ndimslow should be the array size and +ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the +array is 2-dimensional and the 3D calls are used, ndimslow and +ndimmid should be used for the array dimensions and ndimfast should +be set to 1. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET +Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for +cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof +(int), sizeof(double) or sizeof(float), the function returns +CBF_ARGUMENT. +The parameter reserved is presently unused and should be set to 0. ARGUMENTS -handle CBF handle. +handle CBF handle. reserved Unused. Any value other +than 0 is invalid. element_number The number of the detector +element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. compression Compression type. +array Pointer to the image array. elsize Size in +bytes of each image array element. elsigned Set to non-0 if +the image array elements are signed. ndimslow Slowest array +dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")remove_category; - void remove_category(void){ - cbf_failnez(cbf_remove_category(self));} +---------------------------------------------------------------------- +")set_image_sf; + + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_image_sf; + + void set_image_sf(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int elsign, int ndimslow, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_image_sf (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } %feature("autodoc", " -Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, - int elements,int minelement,int maxelement,char **bo,int *bolen, - int dimslow,int dimmid,int dimfast,int padding -*args : +Returns : +*args : int element_number,int compression,(binary) String data,int elsize, + int dimslow,int dimfast -C prototype: int cbf_get_integerarrayparameters_wdims_sf (cbf_handle handle, - unsigned int *compression, int *binary_id, size_t *elsize, - int *elsigned, int *elunsigned, size_t *elements, - int *minelement, int *maxelement, const char **byteorder, - size_t *dimslow, size_t *dimmid, size_t *dimfast, - size_t *padding); +C prototype: int cbf_set_real_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array,size_t elsize, size_t ndimslow, + size_t ndimfast); CBFLib documentation: DESCRIPTION -cbf_get_integerarrayparameters sets *compression, *binary_id, -*elsize, *elsigned, *elunsigned, *elements, *minelement and -*maxelement to values read from the binary value of the item at the -current column and row. This provides all the arguments needed for a -subsequent call to cbf_set_integerarray, if a copy of the array is to -be made into another CIF or CBF. cbf_get_realarrayparameters sets -*compression, *binary_id, *elsize, *elements to values read from the -binary value of the item at the current column and row. This provides -all the arguments needed for a subsequent call to cbf_set_realarray, -if a copy of the arry is to be made into another CIF or CBF. -The variants cbf_get_integerarrayparameters_wdims, -cbf_get_integerarrayparameters_wdims_fs, -cbf_get_integerarrayparameters_wdims_sf, -cbf_get_realarrayparameters_wdims, -cbf_get_realarrayparameters_wdims_fs, -cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, -*dimmid, *dimslow, and *padding as well, providing the additional -parameters needed for a subsequent call to cbf_set_integerarray_wdims -or cbf_set_realarray_wdims. -The value returned in *byteorder is a pointer either to the string -\"little_endian \" or to the string \"big_endian \". This should be -the byte order of the data, not necessarily of the host machine. No -attempt should be made to modify this string. At this time only -\"little_endian \" will be returned. -The values returned in *dimfast, *dimmid and *dimslow are the sizes -of the fastest changing, second fastest changing and third fastest -changing dimensions of the array, if specified, or zero, if not -specified. -The value returned in *padding is the size of the post-data padding, -if any and if specified in the data header. The value is given as a -count of octets. -If the value is not binary, the function returns CBF_ASCII. +cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image +array for element number element_number. The array consists of +ndimfast *ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-zero and unsigned otherwise. +cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf +write the image array for element number element_number. The array +consists of ndimfast *ndimslow IEEE double or float elements of +elsize bytes each, starting at array. cbf_set_3d_image, +cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array +for element number element_number. The array consists of ndimfast +*ndimmid *ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-0 and unsigned otherwise. +cbf_set_real_3d_image, cbf_set_real_3d_image_fs and +cbf_set_real_3d_image_sf writes the 3D image array for element number +element_number. The array consists of ndimfast *ndimmid *ndimslow +IEEE double or float elements of elsize bytes each, starting at +array. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +If the array is 1-dimensional, ndimslow should be the array size and +ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the +array is 2-dimensional and the 3D calls are used, ndimslow and +ndimmid should be used for the array dimensions and ndimfast should +be set to 1. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET +Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for +cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof +(int), sizeof(double) or sizeof(float), the function returns +CBF_ARGUMENT. +The parameter reserved is presently unused and should be set to 0. ARGUMENTS -handle CBF handle. compression Compression method used. -elsize Size in bytes of each array element. binary_id -Pointer to the destination integer binary identifier. elsigned -Pointer to an integer. Set to 1 if the elements can be read as signed -integers. elunsigned Pointer to an integer. Set to 1 if the -elements can be read as unsigned integers. elements Pointer to -the destination number of elements. minelement Pointer to the -destination smallest element. maxelement Pointer to the -destination largest element. byteorder Pointer to the destination -byte order. dimfast Pointer to the destination fastest -dimension. dimmid Pointer to the destination second fastest -dimension. dimslow Pointer to the destination third fastest -dimension. padding Pointer to the destination padding size. +handle CBF handle. reserved Unused. Any value other +than 0 is invalid. element_number The number of the detector +element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. compression Compression type. +array Pointer to the image array. elsize Size in +bytes of each image array element. elsigned Set to non-0 if +the image array elements are signed. ndimslow Slowest array +dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")get_integerarrayparameters_wdims_sf; +---------------------------------------------------------------------- +")set_real_image; -%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); -%apply int *OUTPUT {int *compression,int *binary_id, - int *elsize, int *elsigned, int *elunsigned, - int *elements, int *minelement, int *maxelement, - int *dimslow, int *dimmid, int *dimfast, int *padding} - get_integerarrayparameters_wdims_sf; + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ - void get_integerarrayparameters_wdims_sf(int *compression,int *binary_id, - int *elsize, int *elsigned, int *elunsigned, - int *elements, int *minelement, int *maxelement, - char **bo, int *bolen, - int *dimslow, int *dimmid, int *dimfast, int *padding - ){ - unsigned int comp; - size_t elsiz, elem, df,dm,ds,pd; - const char * byteorder; - char * bot; - cbf_failnez(cbf_get_integerarrayparameters_wdims_sf(self, - &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, - minelement, maxelement, &byteorder,&ds,&dm,&df,&pd )); - *bolen = strlen(byteorder); - if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} - strncpy(bot,byteorder,*bolen); - *bo = bot; - *compression = comp; - *elsize = elsiz; - *elements = elem; - *dimfast = df; - *dimmid = dm; - *dimslow = ds; - *padding = pd; - +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_image; + + void set_real_image(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int ndimslow, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_real_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); } + } %feature("autodoc", " -Returns : Float pixel_size -*args : Int element_number,Int axis_number +Returns : +*args : int element_number,int compression,(binary) String data,int elsize, + int dimfast,int dimslow -C prototype: int cbf_get_pixel_size (cbf_handle handle, - unsigned int element_number, int axis_number, - double *psize); +C prototype: int cbf_set_real_image_fs(cbf_handle handle, + unsigned int reserved, unsigned int element_number, + unsigned int compression, void *array,size_t elsize, + size_t ndimfast, size_t ndimslow); CBFLib documentation: DESCRIPTION -cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to -the double value in millimeters of the axis axis_number of the -detector element element_number. The axis_number is numbered from 1, -starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to -point to the double value in millimeters of the axis axis_number of -the detector element element_number. The axis_number is numbered from -1, starting with the fastest axis. -If a negative axis number is given, the order of axes is reversed, so -that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the -fastest axis for cbf_get_pixel_size_sf. -If the pixel size is not given explcitly in the \"array_element_size -\" category, the function returns CBF_NOTFOUND. +cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image +array for element number element_number. The array consists of +ndimfast *ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-zero and unsigned otherwise. +cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf +write the image array for element number element_number. The array +consists of ndimfast *ndimslow IEEE double or float elements of +elsize bytes each, starting at array. cbf_set_3d_image, +cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array +for element number element_number. The array consists of ndimfast +*ndimmid *ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-0 and unsigned otherwise. +cbf_set_real_3d_image, cbf_set_real_3d_image_fs and +cbf_set_real_3d_image_sf writes the 3D image array for element number +element_number. The array consists of ndimfast *ndimmid *ndimslow +IEEE double or float elements of elsize bytes each, starting at +array. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +If the array is 1-dimensional, ndimslow should be the array size and +ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the +array is 2-dimensional and the 3D calls are used, ndimslow and +ndimmid should be used for the array dimensions and ndimfast should +be set to 1. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET +Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for +cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof +(int), sizeof(double) or sizeof(float), the function returns +CBF_ARGUMENT. +The parameter reserved is presently unused and should be set to 0. ARGUMENTS -handle CBF handle. element_number The number of the -detector element counting from 0 by order of appearance in the -\"diffrn_data_frame \" category. axis_number The number of the -axis, starting from 1 for the fastest for cbf_get_pixel_size and -cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. -psize Pointer to the destination pixel size. +handle CBF handle. reserved Unused. Any value other +than 0 is invalid. element_number The number of the detector +element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. compression Compression type. +array Pointer to the image array. elsize Size in +bytes of each image array element. elsigned Set to non-0 if +the image array elements are signed. ndimslow Slowest array +dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_pixel_size; +")set_real_image_fs; -%apply double *OUTPUT {double *psize} get_pixel_size; - void get_pixel_size(unsigned int element_number, - unsigned int axis_number, double *psize){ - cbf_failnez(cbf_get_pixel_size(self, - element_number, - axis_number, - psize)); + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_image; + + void set_real_image_fs(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int ndimfast, int ndimslow){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_real_image_fs (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimfast, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } } %feature("autodoc", " Returns : @@ -5727,415 +6037,195 @@ Returns an error code on failure or 0 for success. cbf_failnez(CBF_ARGUMENT); } } - -/* cfunc cbf_require_category pyfunc require_category - arg cbf_handle handle arg const char *categoryname */ - -%feature("autodoc", " -Returns : string -*args : - -C prototype: int cbf_require_category (cbf_handle handle, - const char *categoryname); - -CBFLib documentation: -DESCRIPTION -cbf_rewuire_category makes the category in the current data block -with name categoryname the current category, if it exists, or creates -the catagory if it does not exist. -The comparison is case-insensitive. -The current column and row become undefined. -ARGUMENTS -handle CBF handle. categoryname The name of the category to -find. -RETURN VALUE -Returns an error code on failure or 0 for success. -SEE ALSO -")require_category; - void require_category(const char* arg){ - cbf_failnez(cbf_require_category(self,arg));} -%feature("autodoc", " -Returns : Float astar,Float bstar,Float cstar,Float alphastar,Float betastar, - Float gammastar -*args : - -C prototype: int cbf_get_reciprocal_cell (cbf_handle handle, double cell[6], - double cell_esd[6] ); - -CBFLib documentation: -DESCRIPTION -cbf_get_reciprocal_cell sets cell[0:2] to the double values of the -reciprocal cell edge lengths a*, b* and c* in AAngstroms-1, cell[3:5] -to the double values of the reciprocal cell angles a*, b* and g* in -degrees, cell_esd[0:2] to the double values of the estimated -strandard deviations of the reciprocal cell edge lengths a*, b* and -c* in AAngstroms-1, cell_esd[3:5] to the double values of the -estimated standard deviations of the the reciprocal cell angles a*, -b* and g* in degrees. -The values returned are retrieved from the first row of the \"cell -\" category. The value of \"_cell.entry_id \" is ignored. -cell or cell_esd may be NULL. -If cell is NULL, the reciprocal cell parameters are not retrieved. -If cell_esd is NULL, the reciprocal cell parameter esds are not -retrieved. -If the \"cell \" category is present, but some of the values are -missing, zeros are returned for the missing values. -ARGUMENTS -handle CBF handle. cell Pointer to the destination array of -6 doubles for the reciprocal cell parameters. cell_esd Pointer to -the destination array of 6 doubles for the reciprocal cell parameter -esds. -RETURN VALUE -Returns an error code on failure or 0 for success. No errors is -returned for missing values if the \"cell \" category exists. -SEE ALSO -")get_reciprocal_cell; - -%apply double *OUTPUT {double *astar, double *bstar, double *cstar, - double *alphastar, double *betastar, double *gammastar} get_reciprocal_cell; - void get_reciprocal_cell(double *astar, double *bstar, double *cstar, - double *alphastar, double *betastar, double *gammastar) { - double rcell[6]; - cbf_failnez(cbf_get_reciprocal_cell(self,rcell,NULL)); - *astar = rcell[0]; - *bstar = rcell[1]; - *cstar = rcell[2]; - *alphastar = rcell[3]; - *betastar = rcell[4]; - *gammastar = rcell[5]; - } -%feature("autodoc", " -Returns : doubleArray cell -*args : - -C prototype: int cbf_get_reciprocal_cell (cbf_handle handle, double cell[6], - double cell_esd[6] ); - -CBFLib documentation: -DESCRIPTION -cbf_get_reciprocal_cell sets cell[0:2] to the double values of the -reciprocal cell edge lengths a*, b* and c* in AAngstroms-1, cell[3:5] -to the double values of the reciprocal cell angles a*, b* and g* in -degrees, cell_esd[0:2] to the double values of the estimated -strandard deviations of the reciprocal cell edge lengths a*, b* and -c* in AAngstroms-1, cell_esd[3:5] to the double values of the -estimated standard deviations of the the reciprocal cell angles a*, -b* and g* in degrees. -The values returned are retrieved from the first row of the \"cell -\" category. The value of \"_cell.entry_id \" is ignored. -cell or cell_esd may be NULL. -If cell is NULL, the reciprocal cell parameters are not retrieved. -If cell_esd is NULL, the reciprocal cell parameter esds are not -retrieved. -If the \"cell \" category is present, but some of the values are -missing, zeros are returned for the missing values. -ARGUMENTS -handle CBF handle. cell Pointer to the destination array of -6 doubles for the reciprocal cell parameters. cell_esd Pointer to -the destination array of 6 doubles for the reciprocal cell parameter -esds. -RETURN VALUE -Returns an error code on failure or 0 for success. No errors is -returned for missing values if the \"cell \" category exists. -SEE ALSO -")get_reciprocal_cell; - -%apply double *OUTPUT {double *a_esd, double *b_esd, double *c_esd, - double *alpha_esd, double *beta_esd, double *gamma_esd} get_reciprocal_cell_esd; - void get_reciprocal_cell_esd(double *a_esd, double *b_esd, double *c_esd, - double *alpha_esd, double *beta_esd, double *gamma_esd) { - double cell_esd[6]; - cbf_failnez(cbf_get_reciprocal_cell(self,NULL,cell_esd)); - *a_esd = cell_esd[0]; - *b_esd = cell_esd[1]; - *c_esd = cell_esd[2]; - *alpha_esd = cell_esd[3]; - *beta_esd = cell_esd[4]; - *gamma_esd = cell_esd[5]; - } -%feature("autodoc", " -Returns : size_t ndimslow,size_t ndimmid,size_t ndimfast -*args : Integer element_number - -C prototype: int cbf_get_3d_image_size (cbf_handle handle, - unsigned int reserved, unsigned int element_number, - size_t *ndimslow, size_t *ndimmid, size_t *ndimfast); - -CBFLib documentation: -DESCRIPTION -cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf -set *ndimslow and *ndimfast to the slow and fast dimensions of the -image array for element number element_number. If the array is -1-dimensional, *ndimslow will be set to the array size and *ndimfast -will be set to 1. If the array is 3-dimensional an error code will be -returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and -cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the -slowest, next fastest and fastest dimensions, respectively, of the 3D -image array for element number element_number. If the array is -1-dimensional, *ndimslow will be set to the array size and *ndimmid -and -")get_3d_image_size; - -%apply int *OUTPUT {int *ndimslow, int *ndimmid, int *ndimfast} get_3d_image_size; - void get_3d_image_size(unsigned int element_number, int *ndimslow, int *ndimmid, int *ndimfast){ - unsigned int reserved; - size_t inslow, inmid, infast; - reserved = 0; - cbf_failnez(cbf_get_3d_image_size(self,reserved,element_number,&inslow,&inmid,&infast)); - *ndimslow = (int)inslow; /* FIXME - is that how to convert? */ - *ndimmid = (int)inmid; - *ndimfast = (int)infast; - } -%feature("autodoc", " -Returns : String tagroot -*args : String tagname - -C prototype: int cbf_find_tag_root (cbf_handle handle, const char* tagname, - const char** tagroot); - -CBFLib documentation: -DESCRIPTION -cbf_find_tag_root sets *tagroot to the root tag of which tagname is -an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in -the dictionary associated with handle, creating the dictionary if -necessary. cbf_require_tag_root sets *tagroot to the root tag of -which tagname is an alias, if there is one, or to the value of -tagname, if tagname is not an alias. -A returned tagroot string must not be modified in any way. -ARGUMENTS -handle CBF handle. tagname tag name which may be an alias. -tagroot pointer to a returned tag root name. tagroot_in input -tag root name. -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")find_tag_root; - -const char * find_tag_root(const char* tagname){ - const char* result; - cbf_failnez(cbf_find_tag_root(self,tagname,&result)); - return result; -} -%feature("autodoc", " -Returns : String categoryroot -*args : String Categoryname - -C prototype: int cbf_require_category_root (cbf_handle handle, - const char* categoryname, const char** categoryroot); - -CBFLib documentation: -DESCRIPTION -cbf_find_category_root sets *categoryroot to the root category of -which categoryname is an alias. cbf_set_category_root sets -categoryname_in as an alias of categoryroot in the dictionary -associated with handle, creating the dictionary if necessary. -cbf_require_category_root sets *categoryroot to the root category of -which categoryname is an alias, if there is one, or to the value of -categoryname, if categoryname is not an alias. -A returned categoryroot string must not be modified in any way. -ARGUMENTS -handle CBF handle. categoryname category name which -may be an alias. categoryroot pointer to a returned category -root name. categoryroot_in input category root name. -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")cbf_require_category_root; - -const char* require_category_root (const char* categoryname){ - const char* result; - cbf_failnez(cbf_require_category_root(self,categoryname, &result)); - return result; -} %feature("autodoc", " Returns : -*args : int compression,int binary_id,(binary) String data,int elsize, - int elements,String byteorder,int dimslow,int dimmid,int dimfast, - int padding +*args : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimslow,int dimmid,int dimfast -C prototype: int cbf_set_realarray_wdims_sf (cbf_handle handle, - unsigned int compression, int binary_id, void *array, - size_t elsize, size_t elements, const char *byteorder, - size_t dimslow, size_t dimmid, size_t dimfast, - size_t padding); +C prototype: int cbf_set_3d_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array, size_t elsize, int elsign, size_t ndimslow, + size_t ndimmid, size_t ndimfast); CBFLib documentation: DESCRIPTION -cbf_set_integerarray sets the binary value of the item at the current -column and row to an integer array. The array consists of elements -elements of elsize bytes each, starting at array. The elements are -signed if elsigned is non-0 and unsigned otherwise. binary_id is the -binary section identifier. cbf_set_realarray sets the binary value of -the item at the current column and row to an integer array. The array -consists of elements elements of elsize bytes each, starting at -array. binary_id is the binary section identifier. -The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, -cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, -cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants -allow the data header values of byteorder, dimfast, dimmid, dimslow -and padding to be set to the data byte order, the fastest, second -fastest and third fastest array dimensions and the size in byte of -the post data padding to be used. +cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image +array for element number element_number. The array consists of +ndimfast *ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-zero and unsigned otherwise. +cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf +write the image array for element number element_number. The array +consists of ndimfast *ndimslow IEEE double or float elements of +elsize bytes each, starting at array. cbf_set_3d_image, +cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array +for element number element_number. The array consists of ndimfast +*ndimmid *ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-0 and unsigned otherwise. +cbf_set_real_3d_image, cbf_set_real_3d_image_fs and +cbf_set_real_3d_image_sf writes the 3D image array for element number +element_number. The array consists of ndimfast *ndimmid *ndimslow +IEEE double or float elements of elsize bytes each, starting at +array. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +If the array is 1-dimensional, ndimslow should be the array size and +ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the +array is 2-dimensional and the 3D calls are used, ndimslow and +ndimmid should be used for the array dimensions and ndimfast should +be set to 1. The array will be compressed using the compression scheme specifed by compression. Currently, the available schemes are: -CBF_CANONICAL Canonical-code compression (section 3.3.1) -CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple -\"nibble_offset \" compression. CBF_NONE No compression. -NOTE: This scheme is by far the slowest of the four and uses much -more disk space. It is intended for routine use with small arrays -only. With large arrays (like images) it should be used only for -debugging. +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET +Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. The values compressed are limited to 64 bits. If any element in the array is larger than 64 bits, the value compressed is the nearest 64-bit value. Currently, the source array must consist of chars, shorts or ints -(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or -floats for cbf_set_realarray. If elsize is not equal to sizeof -(char), sizeof (short) or sizeof (int), the function returns +(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for +cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof +(int), sizeof(double) or sizeof(float), the function returns CBF_ARGUMENT. +The parameter reserved is presently unused and should be set to 0. ARGUMENTS -handle CBF handle. compression Compression method to use. -binary_id Integer binary identifier. array Pointer to the -source array. elsize Size in bytes of each source array -element. elsigned Set to non-0 if the source array elements are -signed. elements: The number of elements in the array. +handle CBF handle. reserved Unused. Any value other +than 0 is invalid. element_number The number of the detector +element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. compression Compression type. +array Pointer to the image array. elsize Size in +bytes of each image array element. elsigned Set to non-0 if +the image array elements are signed. ndimslow Slowest array +dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")set_realarray_wdims_sf; +---------------------------------------------------------------------- +")set_3d_image; - /* CBFlib must NOT modify the data string nor the byteorder string - which belongs to the scripting + /* CBFlib must NOT modify the data string which belongs to the scripting language we will get and check the length via a typemap */ -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray_wdims_sf; -%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_realarray_wdims_sf; +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_3d_image; - void set_realarray_wdims_sf(unsigned int compression, int binary_id, - char *data, int len, int elsize, int elements, - char *bo, int bolen, int dimslow, int dimmid, int dimfast, int padding){ + void set_3d_image(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int elsign, int ndimslow, int ndimmid, int ndimfast){ /* safety check on args */ - size_t els, ele; + size_t els; + unsigned int reserved; void *array; - char byteorder[15]; - if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + if(len == elsize*ndimslow*ndimmid*ndimfast){ array = data; els = elsize; - ele = elements; - strncpy(byteorder,bo,bolen<15?bolen:14); - byteorder[bolen<15?bolen:14] = 0; - cbf_failnez(cbf_set_realarray_wdims_sf (self, compression, binary_id, - (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder, - (size_t) dimslow, (size_t) dimmid, (size_t) dimfast, (size_t)padding)); + reserved = 0; + cbf_failnez(cbf_set_3d_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t) ndimmid, (size_t)ndimfast)); }else{ cbf_failnez(CBF_ARGUMENT); } } - -/* cfunc cbf_set_integervalue pyfunc set_integervalue - arg cbf_handle handle arg int number */ - -%feature("autodoc", " -Returns : int number -*args : - -C prototype: int cbf_set_integervalue (cbf_handle handle, int number); - -CBFLib documentation: -DESCRIPTION -cbf_set_integervalue sets the item at the current column and row to -the integer value number written as a decimal ASCII string. -ARGUMENTS -handle CBF handle. number Integer value. -RETURN VALUE -Returns an error code on failure or 0 for success. -SEE ALSO -")set_integervalue; - void set_integervalue(int number){ - cbf_failnez(cbf_set_integervalue(self,number));} - -/* cfunc cbf_category_name pyfunc category_name - arg cbf_handle handle arg const char **categoryname */ - %feature("autodoc", " Returns : -*args : string +*args : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimfast,int dimmid,int dimslow -C prototype: int cbf_category_name (cbf_handle handle, - const char **categoryname); +C prototype: int cbf_set_3d_image_fs(cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array, size_t elsize, int elsign, size_t ndimfast, + size_t ndimmid, size_t ndimslow); CBFLib documentation: DESCRIPTION -cbf_category_name sets *categoryname to point to the name of the -current category of the current data block. -The category name will be valid as long as the category exists. -The name must not be modified by the program in any way. +cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image +array for element number element_number. The array consists of +ndimfast *ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-zero and unsigned otherwise. +cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf +write the image array for element number element_number. The array +consists of ndimfast *ndimslow IEEE double or float elements of +elsize bytes each, starting at array. cbf_set_3d_image, +cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array +for element number element_number. The array consists of ndimfast +*ndimmid *ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-0 and unsigned otherwise. +cbf_set_real_3d_image, cbf_set_real_3d_image_fs and +cbf_set_real_3d_image_sf writes the 3D image array for element number +element_number. The array consists of ndimfast *ndimmid *ndimslow +IEEE double or float elements of elsize bytes each, starting at +array. +The _fs calls give the dimensions in a fast-to-slow order. The calls +with no suffix and the calls _sf calls give the dimensions in +slow-to-fast order +If the array is 1-dimensional, ndimslow should be the array size and +ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the +array is 2-dimensional and the 3D calls are used, ndimslow and +ndimmid should be used for the array dimensions and ndimfast should +be set to 1. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET +Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for +cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof +(int), sizeof(double) or sizeof(float), the function returns +CBF_ARGUMENT. +The parameter reserved is presently unused and should be set to 0. ARGUMENTS -handle CBF handle. categoryname Pointer to the destination -category name pointer. +handle CBF handle. reserved Unused. Any value other +than 0 is invalid. element_number The number of the detector +element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. compression Compression type. +array Pointer to the image array. elsize Size in +bytes of each image array element. elsigned Set to non-0 if +the image array elements are signed. ndimslow Slowest array +dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")category_name; - const char* category_name(void){ - const char* result; - cbf_failnez(cbf_category_name(self, &result)); - return result;} - -/* cfunc cbf_get_typeofvalue pyfunc get_typeofvalue - arg cbf_handle handle arg const char **typeofvalue */ +---------------------------------------------------------------------- +")set_3d_image_fs; -%feature("autodoc", " -Returns : -*args : string + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ -C prototype: int cbf_get_typeofvalue (cbf_handle handle, - const char **typeofvalue); +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_3d_image; -CBFLib documentation: -DESCRIPTION -cbf_get_value sets *typeofvalue to point an ASCII descriptor of the -value of the item at the current column and row. The strings that may -be returned are: - \"null \" for a null value indicated by a \". \" or a \"? \" -\"bnry \" for a binary value \"word \" for an unquoted string -\"dblq \" for a double-quoted string \"sglq \" for a single-quoted -string \"text \" for a semicolon-quoted string (multiline text -field) \"prns \" for a parenthesis-bracketed string (multiline text -field) \"brcs \" for a brace-bracketed string (multiline text field) - \"bkts \" for a square-bracket-bracketed string (multiline text -field) \"tsqs \" for a treble-single-quote quoted string (multiline -text field) \"tdqs \" for a treble-double-quote quoted string -(multiline text field) -Not all types are valid for all type of CIF files. In partcular the -types \"prns \", \"brcs \", \"bkts \" were introduced with DDLm -and are not valid in DDL1 or DDL2 CIFS. The types \"tsqs \" and -\"tdqs \" are not formally part of the CIF syntax. A field for which -no value has been set sets *typeofvalue to NULL rather than to the -string \"null \". -The typeofvalue must not be modified by the program in any way. -ARGUMENTS -handle CBF handle. typeofvalue Pointer to the destination -type-of-value string pointer. -RETURN VALUE -Returns an error code on failure or 0 for success. -SEE ALSO -")get_typeofvalue; - const char* get_typeofvalue(void){ - const char* result; - cbf_failnez(cbf_get_typeofvalue(self, &result)); - return result;} + void set_3d_image_fs(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int elsign, int ndimfast, int ndimmid, int ndimslow){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_3d_image_fs (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimfast, (size_t) ndimmid, (size_t)ndimslow)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } %feature("autodoc", " Returns : *args : int element_number,int compression,(binary) String data,int elsize, - int dimslow,int dimfast + int elsign,int dimslow,int dimmid,int dimfast -C prototype: int cbf_set_real_image (cbf_handle handle, unsigned int reserved, - unsigned int element_number, unsigned int compression, - void *array,size_t elsize, size_t ndimslow, - size_t ndimfast); +C prototype: int cbf_set_3d_image_sf(cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array, size_t elsize, int elsign, size_t ndimslow, + size_t ndimmid, size_t ndimfast); CBFLib documentation: DESCRIPTION @@ -6193,246 +6283,129 @@ dimension. ndimmid Second slowest array dimension. ndimfast RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")set_real_image; +")set_3d_image_sf; /* CBFlib must NOT modify the data string which belongs to the scripting language we will get and check the length via a typemap */ -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_image; +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_3d_image; - void set_real_image(unsigned int element_number, + void set_3d_image_sf(unsigned int element_number, unsigned int compression, - char *data, int len, int elsize, int ndimslow, int ndimfast){ + char *data, int len, int elsize, int elsign, int ndimslow, int ndimmid, int ndimfast){ /* safety check on args */ size_t els; unsigned int reserved; void *array; - if(len == elsize*ndimslow*ndimfast){ + if(len == elsize*ndimslow*ndimmid*ndimfast){ array = data; els = elsize; reserved = 0; - cbf_failnez(cbf_set_real_image (self, reserved, element_number, compression, - (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimfast)); + cbf_failnez(cbf_set_3d_image_sf (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t) ndimmid, (size_t)ndimfast)); }else{ cbf_failnez(CBF_ARGUMENT); } } %feature("autodoc", " -Returns : (Binary)String -*args : int element_number,int elsize,int elsign,int ndimslow,int ndimmid, - int ndimfast +Returns : +*args : int element_number,int compression,(binary) String data,int elsize, + int dimslow,int dimmid,int dimfast -C prototype: int cbf_get_3d_image (cbf_handle handle, unsigned int reserved, - unsigned int element_number, void *array, size_t elsize, - int elsign, size_t ndimslow, size_t ndimmid, - size_t ndimfast); +C prototype: int cbf_set_real_3d_image (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + unsigned int compression, void *array,size_t elsize, + size_t ndimslow, size_t ndimmid, size_t ndimfast); CBFLib documentation: DESCRIPTION -cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image -array for element number element_number into an array. The array -consists of ndimslow *ndimfast elements of elsize bytes each, -starting at array. The elements are signed if elsign is non-0 and -unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and -cbf_get_real_image_sf read the image array of IEEE doubles or floats -for element number element_number into an array. A real array is -always signed. cbf_get_3d_image, cbf_get_3d_image_fs and -cbf_get_3d_image_sf read the 3D image array for element number -element_number into an array. The array consists of ndimslow *ndimmid -*ndimfast elements of elsize bytes each, starting at array. The -elements are signed if elsign is non-0 and unsigned otherwise. -cbf_get_real_3d_image, cbf_get_real_3d_image_fs, -cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or -floats for element number element_number into an array. A real array -is always signed. +cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image +array for element number element_number. The array consists of +ndimfast *ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-zero and unsigned otherwise. +cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf +write the image array for element number element_number. The array +consists of ndimfast *ndimslow IEEE double or float elements of +elsize bytes each, starting at array. cbf_set_3d_image, +cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array +for element number element_number. The array consists of ndimfast +*ndimmid *ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-0 and unsigned otherwise. +cbf_set_real_3d_image, cbf_set_real_3d_image_fs and +cbf_set_real_3d_image_sf writes the 3D image array for element number +element_number. The array consists of ndimfast *ndimmid *ndimslow +IEEE double or float elements of elsize bytes each, starting at +array. The _fs calls give the dimensions in a fast-to-slow order. The calls with no suffix and the calls _sf calls give the dimensions in slow-to-fast order -The structure of the array as a 1-, 2- or 3-dimensional array should -agree with the structure of the array given in the -ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, -ndimslow should be the array size and ndimfast and, for the 3D calls, -ndimmid, should be set to 1 both in the call and in the imgCIF data -being processed. If the array is 2-dimensional and a 3D call is used, -ndimslow and ndimmid should be the -")get_3d_image_as_string; - -// Ensure we free the local temporary - -%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) - get_3d_image_as_string; - -// Get the length correct - - void get_3d_image_as_string(int element_number, char **s, int *slen, - int elsize, int elsign, int ndimfast, int ndimmid, int ndimslow){ - void *array; - int reserved = 0; - *slen = 0; /* Initialise in case of problems */ - if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { - cbf_failnez (cbf_get_3d_image(self, - reserved, (unsigned int)element_number, - (void *)array, (size_t)elsize, elsign, - (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); - }else{ - cbf_failnez(CBF_ALLOC); - } - *slen = elsize*ndimfast*ndimmid*ndimslow; - *s = (char *) array; - } -%feature("autodoc", " -Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2, - Float offset3 -*args : String axis_id - -C prototype: int cbf_get_axis_reference_poise(cbf_handle handle, - double * vector1, double * vector2, double * vector3, - double * offset1, double * offset2, double * offset3, - const char * axis_id); - -CBFLib documentation: -DESCRIPTION -cbf_get_axis_poise sets vector1, vector2, vector3 to point to the -components of the axis vector for axis axis_id, offset1, offset2, -offset3 to point to the components of the axis base offset vector for -axis axis_id, and angle to point to the angle of rotation of axis -axis_id after application of the axis settings for frame frame_id, -using ratio, a value between 0 and 1, indicating how far into the -internal motion in the frame to go. If frame_id is the string \". -\", the first frame found is used. If there is more than one frame, -which frame will be found is indeterminate. If frame_id is NULL, the -overall setting for the scan are used, rather than those for any -particular frame. The vector and offset reported are the reference -vector and offset of the axis axis_id transformed by application of -all motions of the axes on which axis_id depends. -cbf_get_goniometer_poise vector1, vector2, vector3 to point to the -components of the axis vector for the goniometer axis, offset1, -offset2, offset3 to point to the components of the axis base offset -vector for the goniometer axis, and angle to point to the angle of -rotation of the goniometer axis after application of all axis -settings in the goniometer deriving the vector, offset and angle from -the resulting matrix. Calculation of the vector is indeterminate if -the angle is zero. -cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point -to the components of the axis vector for axis axis_id, offset1, -offset2, offset3 to point to the components of the axis base offset -vector for axis axis_id unmodified by axis rotations. Any of the -pointers may be specified as NULL. -ARGUMENTS -handle CBF handle. ratio A number between 0 and 1 -indication how far into the frame to go vector1 Pointer to the -first component of the axis vector vector2 Pointer to the second -component of the axis vector vector3 Pointer to the third -component of the axis vector offset1 Pointer to the first -component of the axis offset offset2 Pointer to the second -component of the axis offset offset3 Pointer to the third -component of the axis offset angle Pointer to the rotation -angle axis_id The specified axis frame_id The specified -frame positioner CBF goniometer -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_axis_reference_poise; - - %apply double *OUTPUT {double *vector1, double *vector2, double *vector3, - double *offset1, double *offset2, double *offset3}; - - void get_axis_reference_poise(double *vector1, double *vector2, double *vector3, - double *offset1, double *offset2, double *offset3, - const char *axis_id){ - cbf_failnez(cbf_get_axis_reference_poise(self, - vector1, vector2, vector3, - offset1, offset2, offset3, - axis_id)); - } - - -/* cfunc cbf_remove_row pyfunc remove_row - arg cbf_handle handle */ - -%feature("autodoc", " -Returns : -*args : - -C prototype: int cbf_remove_row (cbf_handle handle); - -CBFLib documentation: -DESCRIPTION -cbf_remove_row deletes the current row in the current category. -If the current row was the last row, it will move down by 1, -otherwise, it will remain the same. -ARGUMENTS -handle CBF handle. -RETURN VALUE -Returns an error code on failure or 0 for success. -SEE ALSO -")remove_row; - void remove_row(void){ - cbf_failnez(cbf_remove_row(self));} -%feature("autodoc", " -Returns : -*args : Integer element_number,Float overload - -C prototype: int cbf_set_overload (cbf_handle handle, - unsigned int element_number, double overload); - -CBFLib documentation: -DESCRIPTION -cbf_set_overload sets the overload value of element number -element_number to overload. +If the array is 1-dimensional, ndimslow should be the array size and +ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the +array is 2-dimensional and the 3D calls are used, ndimslow and +ndimmid should be used for the array dimensions and ndimfast should +be set to 1. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET +Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for +cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof +(int), sizeof(double) or sizeof(float), the function returns +CBF_ARGUMENT. +The parameter reserved is presently unused and should be set to 0. ARGUMENTS -handle CBF handle. element_number The number of the -detector element counting from 0 by order of appearance in the -\"diffrn_data_frame \" category. overload New overload value. +handle CBF handle. reserved Unused. Any value other +than 0 is invalid. element_number The number of the detector +element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. compression Compression type. +array Pointer to the image array. elsize Size in +bytes of each image array element. elsigned Set to non-0 if +the image array elements are signed. ndimslow Slowest array +dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")set_overload; - - void set_overload(unsigned int element_number, double overload){ - cbf_failnez(cbf_set_overload(self,element_number,overload)); - } -%feature("autodoc", " -Returns : size_t ndim1,size_t ndim2 -*args : Integer element_number - -C prototype: int cbf_get_image_size (cbf_handle handle, unsigned int reserved, - unsigned int element_number, size_t *ndimslow, - size_t *ndimfast); - -CBFLib documentation: -DESCRIPTION -cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf -set *ndimslow and *ndimfast to the slow and fast dimensions of the -image array for element number element_number. If the array is -1-dimensional, *ndimslow will be set to the array size and *ndimfast -will be set to 1. If the array is 3-dimensional an error code will be -returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and -cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the -slowest, next fastest and fastest dimensions, respectively, of the 3D -image array for element number element_number. If the array is -1-dimensional, *ndimslow will be set to the array size and *ndimmid -and -")get_image_size; +")set_real_3d_image; -%apply int *OUTPUT {int *ndimslow, int *ndimfast} get_image_size; - void get_image_size(unsigned int element_number, int *ndimslow, int *ndimfast){ + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ + +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_3d_image_sf; + + void set_real_3d_image(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int ndimslow, int ndimmid, int ndimfast){ + /* safety check on args */ + size_t els; unsigned int reserved; - size_t inslow, infast; - reserved = 0; - cbf_failnez(cbf_get_image_size(self,reserved,element_number,&inslow,&infast)); - *ndimslow = (int)inslow; - *ndimfast = (int)infast; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_real_3d_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); } + } %feature("autodoc", " Returns : *args : int element_number,int compression,(binary) String data,int elsize, - int elsign,int dimslow,int dimmid,int dimfast + int dimfast,int dimmid,int dimslow -C prototype: int cbf_set_3d_image_sf(cbf_handle handle, unsigned int reserved, - unsigned int element_number, unsigned int compression, - void *array, size_t elsize, int elsign, size_t ndimslow, - size_t ndimmid, size_t ndimfast); +C prototype: int cbf_set_real_3d_image_fs(cbf_handle handle, + unsigned int reserved, unsigned int element_number, + unsigned int compression, void *array,size_t elsize, + size_t ndimfast, size_t ndimmid, size_t ndimslow); CBFLib documentation: DESCRIPTION @@ -6490,16 +6463,16 @@ dimension. ndimmid Second slowest array dimension. ndimfast RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")set_3d_image_sf; +")set_real_3d_image_fs; /* CBFlib must NOT modify the data string which belongs to the scripting language we will get and check the length via a typemap */ -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_3d_image; +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_3d_image_fs; - void set_3d_image_sf(unsigned int element_number, + void set_real_3d_image_fs(unsigned int element_number, unsigned int compression, - char *data, int len, int elsize, int elsign, int ndimslow, int ndimmid, int ndimfast){ + char *data, int len, int elsize, int ndimfast, int ndimmid, int ndimslow){ /* safety check on args */ size_t els; unsigned int reserved; @@ -6508,441 +6481,699 @@ Returns an error code on failure or 0 for success. array = data; els = elsize; reserved = 0; - cbf_failnez(cbf_set_3d_image_sf (self, reserved, element_number, compression, - (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t) ndimmid, (size_t)ndimfast)); + cbf_failnez(cbf_set_real_3d_image_fs (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow)); }else{ cbf_failnez(CBF_ARGUMENT); } } %feature("autodoc", " -Returns : (Binary)String -*args : int element_number,int elsize,int ndimslow,int ndimfast +Returns : +*args : int element_number,int compression,(binary) String data,int elsize, + int dimslow,int dimmid,int dimfast -C prototype: int cbf_get_real_image_sf (cbf_handle handle, +C prototype: int cbf_set_real_3d_image_sf(cbf_handle handle, unsigned int reserved, unsigned int element_number, - void *array, size_t elsize, size_t ndimslow, - size_t ndimfast); - -CBFLib documentation: -DESCRIPTION -cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image -array for element number element_number into an array. The array -consists of ndimslow *ndimfast elements of elsize bytes each, -starting at array. The elements are signed if elsign is non-0 and -unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and -cbf_get_real_image_sf read the image array of IEEE doubles or floats -for element number element_number into an array. A real array is -always signed. cbf_get_3d_image, cbf_get_3d_image_fs and -cbf_get_3d_image_sf read the 3D image array for element number -element_number into an array. The array consists of ndimslow *ndimmid -*ndimfast elements of elsize bytes each, starting at array. The -elements are signed if elsign is non-0 and unsigned otherwise. -cbf_get_real_3d_image, cbf_get_real_3d_image_fs, -cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or -floats for element number element_number into an array. A real array -is always signed. -The _fs calls give the dimensions in a fast-to-slow order. The calls -with no suffix and the calls _sf calls give the dimensions in -slow-to-fast order -The structure of the array as a 1-, 2- or 3-dimensional array should -agree with the structure of the array given in the -ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, -ndimslow should be the array size and ndimfast and, for the 3D calls, -ndimmid, should be set to 1 both in the call and in the imgCIF data -being processed. If the array is 2-dimensional and a 3D call is used, -ndimslow and ndimmid should be the -")get_real_image_sf_as_string; - -// Ensure we free the local temporary - -%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) - get_real_image_sf_as_string; - -// Get the length correct - - void get_real_image_sf_as_string(int element_number, char **s, int *slen, - int elsize, int ndimslow, int ndimfast){ - void *array; - int reserved = 0; - *slen = 0; /* Initialise in case of problems */ - if ((array=malloc(elsize*ndimfast*ndimslow))) { - cbf_failnez (cbf_get_real_image_sf(self, - reserved, (unsigned int)element_number, - (void *)array, (size_t)elsize, - (size_t) ndimslow, (size_t)ndimfast)); - }else{ - cbf_failnez(CBF_ALLOC); - } - *slen = elsize*ndimfast*ndimslow; - *s = (char *) array; - } -%feature("autodoc", " -Returns : (Binary)String -*args : int element_number,int elsize,int elsign,int ndimslow,int ndimfast - -C prototype: int cbf_get_image (cbf_handle handle, unsigned int reserved, - unsigned int element_number, void *array, size_t elsize, - int elsign, size_t ndimslow, size_t ndimfast); + unsigned int compression, void *array,size_t elsize, + size_t ndimslow, size_t ndimmid, size_t ndimfast); CBFLib documentation: DESCRIPTION -cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image -array for element number element_number into an array. The array -consists of ndimslow *ndimfast elements of elsize bytes each, -starting at array. The elements are signed if elsign is non-0 and -unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and -cbf_get_real_image_sf read the image array of IEEE doubles or floats -for element number element_number into an array. A real array is -always signed. cbf_get_3d_image, cbf_get_3d_image_fs and -cbf_get_3d_image_sf read the 3D image array for element number -element_number into an array. The array consists of ndimslow *ndimmid -*ndimfast elements of elsize bytes each, starting at array. The -elements are signed if elsign is non-0 and unsigned otherwise. -cbf_get_real_3d_image, cbf_get_real_3d_image_fs, -cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or -floats for element number element_number into an array. A real array -is always signed. +cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image +array for element number element_number. The array consists of +ndimfast *ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-zero and unsigned otherwise. +cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf +write the image array for element number element_number. The array +consists of ndimfast *ndimslow IEEE double or float elements of +elsize bytes each, starting at array. cbf_set_3d_image, +cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array +for element number element_number. The array consists of ndimfast +*ndimmid *ndimslow elements of elsize bytes each, starting at array. +The elements are signed if elsign is non-0 and unsigned otherwise. +cbf_set_real_3d_image, cbf_set_real_3d_image_fs and +cbf_set_real_3d_image_sf writes the 3D image array for element number +element_number. The array consists of ndimfast *ndimmid *ndimslow +IEEE double or float elements of elsize bytes each, starting at +array. The _fs calls give the dimensions in a fast-to-slow order. The calls with no suffix and the calls _sf calls give the dimensions in slow-to-fast order -The structure of the array as a 1-, 2- or 3-dimensional array should -agree with the structure of the array given in the -ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, -ndimslow should be the array size and ndimfast and, for the 3D calls, -ndimmid, should be set to 1 both in the call and in the imgCIF data -being processed. If the array is 2-dimensional and a 3D call is used, -ndimslow and ndimmid should be the -")get_image_as_string; - -// Ensure we free the local temporary +If the array is 1-dimensional, ndimslow should be the array size and +ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the +array is 2-dimensional and the 3D calls are used, ndimslow and +ndimmid should be used for the array dimensions and ndimfast should +be set to 1. +The array will be compressed using the compression scheme specifed by +compression. Currently, the available schemes are: +CBF_CANONICAL Canonical-code compression (section 3.3.1) +CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET +Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple +\"nibble_offset \" compression. CBF_NONE No compression. +The values compressed are limited to 64 bits. If any element in the +array is larger than 64 bits, the value compressed is the nearest +64-bit value. +Currently, the source array must consist of chars, shorts or ints +(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for +cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof +(int), sizeof(double) or sizeof(float), the function returns +CBF_ARGUMENT. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any value other +than 0 is invalid. element_number The number of the detector +element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. compression Compression type. +array Pointer to the image array. elsize Size in +bytes of each image array element. elsigned Set to non-0 if +the image array elements are signed. ndimslow Slowest array +dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")set_real_3d_image_sf; -%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) - get_image_as_string; + /* CBFlib must NOT modify the data string which belongs to the scripting + language we will get and check the length via a typemap */ -// Get the length correct +%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_3d_image_sf; - void get_image_as_string(int element_number, char **s, int *slen, - int elsize, int elsign, int ndimslow, int ndimfast){ + void set_real_3d_image_sf(unsigned int element_number, + unsigned int compression, + char *data, int len, int elsize, int ndimslow, int ndimmid, int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; void *array; - int reserved = 0; - *slen = 0; /* Initialise in case of problems */ - if ((array=malloc(elsize*ndimfast*ndimslow))) { - cbf_failnez (cbf_get_image(self, - reserved, (unsigned int)element_number, - (void *)array, (size_t)elsize, elsign, - (size_t) ndimslow, (size_t)ndimfast)); - }else{ - cbf_failnez(CBF_ALLOC); - } - *slen = elsize*ndimfast*ndimslow; - *s = (char *) array; - } + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + cbf_failnez(cbf_set_real_3d_image_sf (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); + }else{ + cbf_failnez(CBF_ARGUMENT); + } + } %feature("autodoc", " -Returns : -*args : String tagname,String tagroot_in +Returns : Integer +*args : String axis_id -C prototype: int cbf_set_tag_root (cbf_handle handle, const char* tagname, - const char*tagroot_in); +C prototype: int cbf_count_axis_ancestors (cbf_handle handle, + const char *axis_id, unsigned int *ancestors); CBFLib documentation: DESCRIPTION -cbf_find_tag_root sets *tagroot to the root tag of which tagname is -an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in -the dictionary associated with handle, creating the dictionary if -necessary. cbf_require_tag_root sets *tagroot to the root tag of -which tagname is an alias, if there is one, or to the value of -tagname, if tagname is not an alias. -A returned tagroot string must not be modified in any way. +cbf_count_axis_ancestors sets ancestors to the number of ancestors of +axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor +axis of index ancestor_index of axis axis_id, starting with axis_id +for ancestor_index 0. +cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of +axis_id or to \". \" if there is no such ancestor. +cbf_get_axis_equipment sets *equipment to the equipment of axis_id or +to \". \" if there is no such equipment. +cbf_get_axis_equipment_component sets *equipment_component to the +equipment_component of axis_id or to \". \" if there is no such +equipment_component. +cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the +components of the ofset of axis_id. +cbf_get_axis_rotation sets rotation to the rotation of axis_id or to +0 if there is no such rotation. cbf_get_axis_rotation_axis sets +*rotation_axis to the rotation_axis of axis_id or to \". \" if there +is no such rotation_axis. +cbf_get_axis_setting sets *start and *increment to the corresponding +values of the axis axis_id. Any of the destination pointers may be +NULL. +cbf_get_axis_type sets axis_type to the type of axis_id. +cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the +components of the vector of axis_id. +The parameter reserved is presently unused and should be set to 0. ARGUMENTS -handle CBF handle. tagname tag name which may be an alias. -tagroot pointer to a returned tag root name. tagroot_in input -tag root name. +handle CBF handle. reserved Unused. Any +value other than 0 is invalid. axis_id Axis id. +ancestor_index Integer index of the desired ancestor, starting +with 0 for the current axis_id. ancestor Pointer to +destination ancestor name pointer. depends_on Pointer to +destination depends_on name pointer. equipment Pointer to +destination equipment name pointer. equipment_component Pointer to +destination equipment_component name pointer. offset1 +Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. +rotation Pointer to destination rotation value. +rotation_axis Pointer to destination rotation_axisn name +pointer. start Pointer to the destination start +value. increment Pointer to the destination increment +value. type Pointer to destination axis type of type +. vector1 Pointer to destination first vector component +value. vector2 Pointer to destination second vector +component value. vector3 Pointer to destination third +vector component value. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")set_tag_root; +")count_axis_ancestors; -void set_tag_root(const char* tagname, const char* tagroot_in){ - cbf_failnez(cbf_set_tag_root(self,tagname,tagroot_in)); -} +%apply int *OUTPUT {int *ancestors} count_axis_ancestors; + void count_axis_ancestors(const char *axis_id, + int *ancestors){ + unsigned int anc; + cbf_failnez(cbf_count_axis_ancestors(self,axis_id,&anc)); + *ancestors = anc; + } %feature("autodoc", " -Returns : -*args : String filename,Integer ciforcbf,Integer Headers,Integer encoding +Returns : String +*args : String axis_id,Integer ancestor_index -C prototype: int cbf_write_widefile (cbf_handle handle, FILE *file, - int readable, int ciforcbf, int flags, int encoding); +C prototype: int cbf_get_axis_ancestor (cbf_handle handle, + const char *axis_id, const unsigned int ancestor_index, + const char * *ancestor); CBFLib documentation: DESCRIPTION -cbf_write_file writes the CBF object specified by handle into the -file file, following CIF 1.0 conventions of 80 character lines. -cbf_write_widefile writes the CBF object specified by handle into the -file file, following CIF 1.1 conventions of 2048 character lines. A -warning is issued to stderr for ascii lines over the limit, and an -attempt is made to fold lines to fit. No test is performed on binary -sections. -If a dictionary has been provided, aliases will be applied on output. -Unlike cbf_read_file, the file does not have to be random-access. -If the file is random-access and readable, readable can be set to -non-0 to indicate to CBFlib that the file can be used as a buffer to -conserve disk space. If the file is not random-access or not -readable, readable must be 0. -")write_widefile; - - void write_widefile(const char* filename, int ciforcbf, int headers, - int encoding){ - FILE *stream; - int readable; - /* Make readable false so we can close the file immediately */ - readable = 0; - if ( ! ( stream = fopen (filename, "w+b")) ){ - cbf_failnez(CBF_FILEOPEN); - } - else{ - cbf_failnez(cbf_write_widefile(self, stream, readable, - ciforcbf, headers, encoding)); - fclose(stream); +cbf_count_axis_ancestors sets ancestors to the number of ancestors of +axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor +axis of index ancestor_index of axis axis_id, starting with axis_id +for ancestor_index 0. +cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of +axis_id or to \". \" if there is no such ancestor. +cbf_get_axis_equipment sets *equipment to the equipment of axis_id or +to \". \" if there is no such equipment. +cbf_get_axis_equipment_component sets *equipment_component to the +equipment_component of axis_id or to \". \" if there is no such +equipment_component. +cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the +components of the ofset of axis_id. +cbf_get_axis_rotation sets rotation to the rotation of axis_id or to +0 if there is no such rotation. cbf_get_axis_rotation_axis sets +*rotation_axis to the rotation_axis of axis_id or to \". \" if there +is no such rotation_axis. +cbf_get_axis_setting sets *start and *increment to the corresponding +values of the axis axis_id. Any of the destination pointers may be +NULL. +cbf_get_axis_type sets axis_type to the type of axis_id. +cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the +components of the vector of axis_id. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any +value other than 0 is invalid. axis_id Axis id. +ancestor_index Integer index of the desired ancestor, starting +with 0 for the current axis_id. ancestor Pointer to +destination ancestor name pointer. depends_on Pointer to +destination depends_on name pointer. equipment Pointer to +destination equipment name pointer. equipment_component Pointer to +destination equipment_component name pointer. offset1 +Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. +rotation Pointer to destination rotation value. +rotation_axis Pointer to destination rotation_axisn name +pointer. start Pointer to the destination start +value. increment Pointer to the destination increment +value. type Pointer to destination axis type of type +. vector1 Pointer to destination first vector component +value. vector2 Pointer to destination second vector +component value. vector3 Pointer to destination third +vector component value. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_axis_ancestor; + const char * get_axis_ancestor(const char *axis_id, + int ancestor_index){ + const char* anc; + cbf_failnez(cbf_get_axis_ancestor(self,axis_id, + (unsigned int)ancestor_index,&anc)); + return anc; } - } - -/* cfunc cbf_count_rows pyfunc count_rows - arg cbf_handle handle arg unsigned int *rows */ - %feature("autodoc", " -Returns : Integer -*args : +Returns : String +*args : String axis_id -C prototype: int cbf_count_rows (cbf_handle handle, unsigned int *rows); +C prototype: int cbf_get_axis_depends_on (cbf_handle handle, + const char *axis_id, const char * *depends_on); CBFLib documentation: DESCRIPTION -cbf_count_rows puts the number of rows in the current category in -*rows . +cbf_count_axis_ancestors sets ancestors to the number of ancestors of +axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor +axis of index ancestor_index of axis axis_id, starting with axis_id +for ancestor_index 0. +cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of +axis_id or to \". \" if there is no such ancestor. +cbf_get_axis_equipment sets *equipment to the equipment of axis_id or +to \". \" if there is no such equipment. +cbf_get_axis_equipment_component sets *equipment_component to the +equipment_component of axis_id or to \". \" if there is no such +equipment_component. +cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the +components of the ofset of axis_id. +cbf_get_axis_rotation sets rotation to the rotation of axis_id or to +0 if there is no such rotation. cbf_get_axis_rotation_axis sets +*rotation_axis to the rotation_axis of axis_id or to \". \" if there +is no such rotation_axis. +cbf_get_axis_setting sets *start and *increment to the corresponding +values of the axis axis_id. Any of the destination pointers may be +NULL. +cbf_get_axis_type sets axis_type to the type of axis_id. +cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the +components of the vector of axis_id. +The parameter reserved is presently unused and should be set to 0. ARGUMENTS -handle CBF handle. rows Pointer to the destination row count. +handle CBF handle. reserved Unused. Any +value other than 0 is invalid. axis_id Axis id. +ancestor_index Integer index of the desired ancestor, starting +with 0 for the current axis_id. ancestor Pointer to +destination ancestor name pointer. depends_on Pointer to +destination depends_on name pointer. equipment Pointer to +destination equipment name pointer. equipment_component Pointer to +destination equipment_component name pointer. offset1 +Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. +rotation Pointer to destination rotation value. +rotation_axis Pointer to destination rotation_axisn name +pointer. start Pointer to the destination start +value. increment Pointer to the destination increment +value. type Pointer to destination axis type of type +. vector1 Pointer to destination first vector component +value. vector2 Pointer to destination second vector +component value. vector3 Pointer to destination third +vector component value. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")count_rows; - unsigned int count_rows(void){ - unsigned int result; - cbf_failnez(cbf_count_rows(self,&result)); - return result;} - -/* cfunc cbf_require_datablock pyfunc require_datablock - arg cbf_handle handle arg const char *datablockname */ +---------------------------------------------------------------------- +")get_axis_depends_on; + const char * get_axis_depends_on(const char *axis_id){ + const char* dep_on; + cbf_failnez(cbf_get_axis_depends_on(self,axis_id, + &dep_on)); + return dep_on; + } %feature("autodoc", " -Returns : string -*args : +Returns : String +*args : String axis_id -C prototype: int cbf_require_datablock (cbf_handle handle, - const char *datablockname); +C prototype: int cbf_get_axis_equipment (cbf_handle handle, + const char *axis_id, const char * *equipment); CBFLib documentation: DESCRIPTION -cbf_require_datablock makes the data block with name datablockname -the current data block, if it exists, or creates it if it does not. -The comparison is case-insensitive. -The current category becomes undefined. +cbf_count_axis_ancestors sets ancestors to the number of ancestors of +axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor +axis of index ancestor_index of axis axis_id, starting with axis_id +for ancestor_index 0. +cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of +axis_id or to \". \" if there is no such ancestor. +cbf_get_axis_equipment sets *equipment to the equipment of axis_id or +to \". \" if there is no such equipment. +cbf_get_axis_equipment_component sets *equipment_component to the +equipment_component of axis_id or to \". \" if there is no such +equipment_component. +cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the +components of the ofset of axis_id. +cbf_get_axis_rotation sets rotation to the rotation of axis_id or to +0 if there is no such rotation. cbf_get_axis_rotation_axis sets +*rotation_axis to the rotation_axis of axis_id or to \". \" if there +is no such rotation_axis. +cbf_get_axis_setting sets *start and *increment to the corresponding +values of the axis axis_id. Any of the destination pointers may be +NULL. +cbf_get_axis_type sets axis_type to the type of axis_id. +cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the +components of the vector of axis_id. +The parameter reserved is presently unused and should be set to 0. ARGUMENTS -handle CBF handle. datablockname The name of the data -block to find or create. +handle CBF handle. reserved Unused. Any +value other than 0 is invalid. axis_id Axis id. +ancestor_index Integer index of the desired ancestor, starting +with 0 for the current axis_id. ancestor Pointer to +destination ancestor name pointer. depends_on Pointer to +destination depends_on name pointer. equipment Pointer to +destination equipment name pointer. equipment_component Pointer to +destination equipment_component name pointer. offset1 +Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. +rotation Pointer to destination rotation value. +rotation_axis Pointer to destination rotation_axisn name +pointer. start Pointer to the destination start +value. increment Pointer to the destination increment +value. type Pointer to destination axis type of type +. vector1 Pointer to destination first vector component +value. vector2 Pointer to destination second vector +component value. vector3 Pointer to destination third +vector component value. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")require_datablock; - void require_datablock(const char* arg){ - cbf_failnez(cbf_require_datablock(self,arg));} +---------------------------------------------------------------------- +")get_axis_equipment; + + const char * get_axis_equipment(const char *axis_id){ + const char* equip; + cbf_failnez(cbf_get_axis_equipment(self,axis_id, + &equip)); + return equip; + } %feature("autodoc", " -Returns : -*args : int compression,int binary_id,(binary) String data,int elsize, - int elsigned,int elements +Returns : String +*args : String axis_id -C prototype: int cbf_set_integerarray (cbf_handle handle, - unsigned int compression, int binary_id, void *array, - size_t elsize, int elsigned, size_t elements); +C prototype: int cbf_get_axis_equipment_component (cbf_handle handle, + const char *axis_id, const char * *equipment_component); CBFLib documentation: DESCRIPTION -cbf_set_integerarray sets the binary value of the item at the current -column and row to an integer array. The array consists of elements -elements of elsize bytes each, starting at array. The elements are -signed if elsigned is non-0 and unsigned otherwise. binary_id is the -binary section identifier. cbf_set_realarray sets the binary value of -the item at the current column and row to an integer array. The array -consists of elements elements of elsize bytes each, starting at -array. binary_id is the binary section identifier. -The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, -cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, -cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants -allow the data header values of byteorder, dimfast, dimmid, dimslow -and padding to be set to the data byte order, the fastest, second -fastest and third fastest array dimensions and the size in byte of -the post data padding to be used. -The array will be compressed using the compression scheme specifed by -compression. Currently, the available schemes are: -CBF_CANONICAL Canonical-code compression (section 3.3.1) -CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple -\"nibble_offset \" compression. CBF_NONE No compression. -NOTE: This scheme is by far the slowest of the four and uses much -more disk space. It is intended for routine use with small arrays -only. With large arrays (like images) it should be used only for -debugging. -The values compressed are limited to 64 bits. If any element in the -array is larger than 64 bits, the value compressed is the nearest -64-bit value. -Currently, the source array must consist of chars, shorts or ints -(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or -floats for cbf_set_realarray. If elsize is not equal to sizeof -(char), sizeof (short) or sizeof (int), the function returns -CBF_ARGUMENT. +cbf_count_axis_ancestors sets ancestors to the number of ancestors of +axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor +axis of index ancestor_index of axis axis_id, starting with axis_id +for ancestor_index 0. +cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of +axis_id or to \". \" if there is no such ancestor. +cbf_get_axis_equipment sets *equipment to the equipment of axis_id or +to \". \" if there is no such equipment. +cbf_get_axis_equipment_component sets *equipment_component to the +equipment_component of axis_id or to \". \" if there is no such +equipment_component. +cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the +components of the ofset of axis_id. +cbf_get_axis_rotation sets rotation to the rotation of axis_id or to +0 if there is no such rotation. cbf_get_axis_rotation_axis sets +*rotation_axis to the rotation_axis of axis_id or to \". \" if there +is no such rotation_axis. +cbf_get_axis_setting sets *start and *increment to the corresponding +values of the axis axis_id. Any of the destination pointers may be +NULL. +cbf_get_axis_type sets axis_type to the type of axis_id. +cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the +components of the vector of axis_id. +The parameter reserved is presently unused and should be set to 0. ARGUMENTS -handle CBF handle. compression Compression method to use. -binary_id Integer binary identifier. array Pointer to the -source array. elsize Size in bytes of each source array -element. elsigned Set to non-0 if the source array elements are -signed. elements: The number of elements in the array. +handle CBF handle. reserved Unused. Any +value other than 0 is invalid. axis_id Axis id. +ancestor_index Integer index of the desired ancestor, starting +with 0 for the current axis_id. ancestor Pointer to +destination ancestor name pointer. depends_on Pointer to +destination depends_on name pointer. equipment Pointer to +destination equipment name pointer. equipment_component Pointer to +destination equipment_component name pointer. offset1 +Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. +rotation Pointer to destination rotation value. +rotation_axis Pointer to destination rotation_axisn name +pointer. start Pointer to the destination start +value. increment Pointer to the destination increment +value. type Pointer to destination axis type of type +. vector1 Pointer to destination first vector component +value. vector2 Pointer to destination second vector +component value. vector3 Pointer to destination third +vector component value. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")set_integerarray; - - /* CBFlib must NOT modify the data string which belongs to the scripting - language we will get and check the length via a typemap */ - -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray; +---------------------------------------------------------------------- +")get_axis_equipment_component; - void set_integerarray(unsigned int compression, int binary_id, - char *data, int len, int elsize, int elsigned, int elements){ - /* safety check on args */ - size_t els, ele; - void *array; - if(len == elsize*elements){ - array = data; - els = elsize; - ele = elements; - cbf_failnez(cbf_set_integerarray (self, compression, binary_id, - (void *) data, (size_t) elsize, elsigned, (size_t) elements)); - }else{ - cbf_failnez(CBF_ARGUMENT); + const char * get_axis_equipment_component(const char *axis_id){ + const char* equip_comp; + cbf_failnez(cbf_get_axis_equipment_component(self,axis_id, + &equip_comp)); + return equip_comp; } - } - -/* cfunc cbf_new_datablock pyfunc new_datablock - arg cbf_handle handle arg const char *datablockname */ - %feature("autodoc", " -Returns : string -*args : +Returns : Float offset1,Float offset2,Float offset3 +*args : String axis_id -C prototype: int cbf_new_datablock (cbf_handle handle, - const char *datablockname); +C prototype: int cbf_get_axis_offset (cbf_handle handle, const char *axis_id, + double *offset1, double *offset2, double *offset3); CBFLib documentation: DESCRIPTION -cbf_new_datablock creates a new data block with name datablockname -and makes it the current data block. cbf_new_saveframe creates a new -save frame with name saveframename within the current data block and -makes the new save frame the current save frame. -If a data block or save frame with this name already exists, the -existing data block or save frame becomes the current data block or -save frame. +cbf_count_axis_ancestors sets ancestors to the number of ancestors of +axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor +axis of index ancestor_index of axis axis_id, starting with axis_id +for ancestor_index 0. +cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of +axis_id or to \". \" if there is no such ancestor. +cbf_get_axis_equipment sets *equipment to the equipment of axis_id or +to \". \" if there is no such equipment. +cbf_get_axis_equipment_component sets *equipment_component to the +equipment_component of axis_id or to \". \" if there is no such +equipment_component. +cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the +components of the ofset of axis_id. +cbf_get_axis_rotation sets rotation to the rotation of axis_id or to +0 if there is no such rotation. cbf_get_axis_rotation_axis sets +*rotation_axis to the rotation_axis of axis_id or to \". \" if there +is no such rotation_axis. +cbf_get_axis_setting sets *start and *increment to the corresponding +values of the axis axis_id. Any of the destination pointers may be +NULL. +cbf_get_axis_type sets axis_type to the type of axis_id. +cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the +components of the vector of axis_id. +The parameter reserved is presently unused and should be set to 0. ARGUMENTS -handle CBF handle. datablockname The name of the new data -block. saveframename The name of the new save frame. +handle CBF handle. reserved Unused. Any +value other than 0 is invalid. axis_id Axis id. +ancestor_index Integer index of the desired ancestor, starting +with 0 for the current axis_id. ancestor Pointer to +destination ancestor name pointer. depends_on Pointer to +destination depends_on name pointer. equipment Pointer to +destination equipment name pointer. equipment_component Pointer to +destination equipment_component name pointer. offset1 +Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. +rotation Pointer to destination rotation value. +rotation_axis Pointer to destination rotation_axisn name +pointer. start Pointer to the destination start +value. increment Pointer to the destination increment +value. type Pointer to destination axis type of type +. vector1 Pointer to destination first vector component +value. vector2 Pointer to destination second vector +component value. vector3 Pointer to destination third +vector component value. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")new_datablock; - void new_datablock(const char* arg){ - cbf_failnez(cbf_new_datablock(self,arg));} +---------------------------------------------------------------------- +")get_axis_offset; + +%apply double *OUTPUT {double *offset1, double *offset2, double offset3} get_axis_offset; + void get_axis_offset(const char *axis_id, + double *offset1, double *offset2, double*offset3){ + cbf_failnez(cbf_get_axis_offset(self,axis_id, + offset1, offset2,offset3)); + } %feature("autodoc", " -Returns : -*args : int year,int month,int day,int hour,int minute,double second, - int timezone,Float precision +Returns : Float +*args : String axis_id -C prototype: int cbf_set_datestamp (cbf_handle handle, unsigned int reserved, - int year, int month, int day, int hour, int minute, - double second, int timezone, double precision); +C prototype: int cbf_get_axis_rotation (cbf_handle handle, + const char *axis_id, double *rotation); CBFLib documentation: DESCRIPTION -cbf_set_datestamp sets the collection timestamp in seconds since -January 1 1970 to the value specified by time. The timezone -difference from UTC -")set_datestamp; +cbf_count_axis_ancestors sets ancestors to the number of ancestors of +axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor +axis of index ancestor_index of axis axis_id, starting with axis_id +for ancestor_index 0. +cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of +axis_id or to \". \" if there is no such ancestor. +cbf_get_axis_equipment sets *equipment to the equipment of axis_id or +to \". \" if there is no such equipment. +cbf_get_axis_equipment_component sets *equipment_component to the +equipment_component of axis_id or to \". \" if there is no such +equipment_component. +cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the +components of the ofset of axis_id. +cbf_get_axis_rotation sets rotation to the rotation of axis_id or to +0 if there is no such rotation. cbf_get_axis_rotation_axis sets +*rotation_axis to the rotation_axis of axis_id or to \". \" if there +is no such rotation_axis. +cbf_get_axis_setting sets *start and *increment to the corresponding +values of the axis axis_id. Any of the destination pointers may be +NULL. +cbf_get_axis_type sets axis_type to the type of axis_id. +cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the +components of the vector of axis_id. +The parameter reserved is presently unused and should be set to 0. +ARGUMENTS +handle CBF handle. reserved Unused. Any +value other than 0 is invalid. axis_id Axis id. +ancestor_index Integer index of the desired ancestor, starting +with 0 for the current axis_id. ancestor Pointer to +destination ancestor name pointer. depends_on Pointer to +destination depends_on name pointer. equipment Pointer to +destination equipment name pointer. equipment_component Pointer to +destination equipment_component name pointer. offset1 +Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. +rotation Pointer to destination rotation value. +rotation_axis Pointer to destination rotation_axisn name +pointer. start Pointer to the destination start +value. increment Pointer to the destination increment +value. type Pointer to destination axis type of type +. vector1 Pointer to destination first vector component +value. vector2 Pointer to destination second vector +component value. vector3 Pointer to destination third +vector component value. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")get_axis_rotation; - void set_datestamp(int year, int month, int day, int hour, - int minute, double second, int timezone, - double precision){ - unsigned int reserved; - reserved = 0; - cbf_failnez(cbf_set_datestamp(self,reserved, - year,month,day,hour,minute,second,timezone,precision)); +%apply double *OUTPUT {double *rotation} get_axis_rotation; + void get_axis_rotation(const char *axis_id, + double *rotation){ + cbf_failnez(cbf_get_axis_rotation(self,axis_id, + rotation)); } - -/* cfunc cbf_next_row pyfunc next_row - arg cbf_handle handle */ - %feature("autodoc", " -Returns : -*args : +Returns : String +*args : String axis_id -C prototype: int cbf_next_row (cbf_handle handle); +C prototype: int cbf_get_axis_rotation_axis (cbf_handle handle, + const char *axis_id, const char * *rotation_axis); CBFLib documentation: DESCRIPTION -cbf_next_row makes the row following the current row in the current -category the current row. -If there are no more rows, the function returns CBF_NOTFOUND. -The current column is not affected. +cbf_count_axis_ancestors sets ancestors to the number of ancestors of +axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor +axis of index ancestor_index of axis axis_id, starting with axis_id +for ancestor_index 0. +cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of +axis_id or to \". \" if there is no such ancestor. +cbf_get_axis_equipment sets *equipment to the equipment of axis_id or +to \". \" if there is no such equipment. +cbf_get_axis_equipment_component sets *equipment_component to the +equipment_component of axis_id or to \". \" if there is no such +equipment_component. +cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the +components of the ofset of axis_id. +cbf_get_axis_rotation sets rotation to the rotation of axis_id or to +0 if there is no such rotation. cbf_get_axis_rotation_axis sets +*rotation_axis to the rotation_axis of axis_id or to \". \" if there +is no such rotation_axis. +cbf_get_axis_setting sets *start and *increment to the corresponding +values of the axis axis_id. Any of the destination pointers may be +NULL. +cbf_get_axis_type sets axis_type to the type of axis_id. +cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the +components of the vector of axis_id. +The parameter reserved is presently unused and should be set to 0. ARGUMENTS -handle CBF handle. +handle CBF handle. reserved Unused. Any +value other than 0 is invalid. axis_id Axis id. +ancestor_index Integer index of the desired ancestor, starting +with 0 for the current axis_id. ancestor Pointer to +destination ancestor name pointer. depends_on Pointer to +destination depends_on name pointer. equipment Pointer to +destination equipment name pointer. equipment_component Pointer to +destination equipment_component name pointer. offset1 +Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. +rotation Pointer to destination rotation value. +rotation_axis Pointer to destination rotation_axisn name +pointer. start Pointer to the destination start +value. increment Pointer to the destination increment +value. type Pointer to destination axis type of type +. vector1 Pointer to destination first vector component +value. vector2 Pointer to destination second vector +component value. vector3 Pointer to destination third +vector component value. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")next_row; - void next_row(void){ - cbf_failnez(cbf_next_row(self));} +---------------------------------------------------------------------- +")get_axis_rotation_axis; + + const char * get_axis_rotation_axis(const char *axis_id){ + const char* rot_axis; + cbf_failnez(cbf_get_axis_rotation_axis(self,axis_id, + &rot_axis)); + return rot_axis; + } %feature("autodoc", " -Returns : -*args : String categoryname,String categoryroot +Returns : Float start,Float increment +*args : String axis_id -C prototype: int cbf_set_category_root (cbf_handle handle, - const char* categoryname_in, const char*categoryroot); +C prototype: int cbf_get_axis_setting (cbf_handle handle, + unsigned int reserved, const char *axis_id, double *start, + double *increment); CBFLib documentation: DESCRIPTION -cbf_find_category_root sets *categoryroot to the root category of -which categoryname is an alias. cbf_set_category_root sets -categoryname_in as an alias of categoryroot in the dictionary -associated with handle, creating the dictionary if necessary. -cbf_require_category_root sets *categoryroot to the root category of -which categoryname is an alias, if there is one, or to the value of -categoryname, if categoryname is not an alias. -A returned categoryroot string must not be modified in any way. +cbf_count_axis_ancestors sets ancestors to the number of ancestors of +axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor +axis of index ancestor_index of axis axis_id, starting with axis_id +for ancestor_index 0. +cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of +axis_id or to \". \" if there is no such ancestor. +cbf_get_axis_equipment sets *equipment to the equipment of axis_id or +to \". \" if there is no such equipment. +cbf_get_axis_equipment_component sets *equipment_component to the +equipment_component of axis_id or to \". \" if there is no such +equipment_component. +cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the +components of the ofset of axis_id. +cbf_get_axis_rotation sets rotation to the rotation of axis_id or to +0 if there is no such rotation. cbf_get_axis_rotation_axis sets +*rotation_axis to the rotation_axis of axis_id or to \". \" if there +is no such rotation_axis. +cbf_get_axis_setting sets *start and *increment to the corresponding +values of the axis axis_id. Any of the destination pointers may be +NULL. +cbf_get_axis_type sets axis_type to the type of axis_id. +cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the +components of the vector of axis_id. +The parameter reserved is presently unused and should be set to 0. ARGUMENTS -handle CBF handle. categoryname category name which -may be an alias. categoryroot pointer to a returned category -root name. categoryroot_in input category root name. +handle CBF handle. reserved Unused. Any +value other than 0 is invalid. axis_id Axis id. +ancestor_index Integer index of the desired ancestor, starting +with 0 for the current axis_id. ancestor Pointer to +destination ancestor name pointer. depends_on Pointer to +destination depends_on name pointer. equipment Pointer to +destination equipment name pointer. equipment_component Pointer to +destination equipment_component name pointer. offset1 +Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. +rotation Pointer to destination rotation value. +rotation_axis Pointer to destination rotation_axisn name +pointer. start Pointer to the destination start +value. increment Pointer to the destination increment +value. type Pointer to destination axis type of type +. vector1 Pointer to destination first vector component +value. vector2 Pointer to destination second vector +component value. vector3 Pointer to destination third +vector component value. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")set_category_root; +")get_axis_setting; -void set_category_root(const char* categoryname, const char* categoryroot){ - cbf_failnez(cbf_set_category_root(self,categoryname,categoryroot)); -} +%apply double *OUTPUT {double *start, double *increment} get_axis_setting; + void get_axis_setting(const char *axis_id, + double *start, double *increment){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_get_axis_setting(self,reserved,axis_id, + start,increment)); + } %feature("autodoc", " -Returns : Float offset1,Float offset2,Float offset3 +Returns : String *args : String axis_id -C prototype: int cbf_get_axis_offset (cbf_handle handle, const char *axis_id, - double *offset1, double *offset2, double *offset3); +C prototype: int cbf_get_axis_type (cbf_handle handle, const char *axis_id, + cbf_axis_type *axis_type); CBFLib documentation: DESCRIPTION @@ -6994,361 +7225,234 @@ vector component value. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_axis_offset; - - %apply double *OUTPUT {double *offset1, double *offset2, double offset3} get_axis_offset; - void get_axis_offset(const char *axis_id, - double *offset1, double *offset2, double*offset3){ - cbf_failnez(cbf_get_axis_offset(self,axis_id, - offset1, offset2,offset3)); - } - %feature("autodoc", " -Returns : -*args : Int element_number,Int axis_number,Float pixel size - -C prototype: int cbf_set_pixel_size_fs(cbf_handle handle, - unsigned int element_number, int axis_number, - double psize); - -CBFLib documentation: -DESCRIPTION -cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the -"e;size"e; column of the \"array_structure_list \" category -at the row which matches axis axis_number of the detector element -element_number converting the double pixel size psize from meters to -millimeters in storing it in the \"size \" column for the axis -axis_number of the detector element element_number. The axis_number -is numbered from 1, starting with the slowest axis. -cbf_set_pixel_size_fs sets the item -")set_pixel_size_fs; - - void set_pixel_size_fs (unsigned int element_number, - unsigned int axis_number, double psize){ - cbf_failnez(cbf_set_pixel_size_fs(self, - element_number, - axis_number, - psize)); - } - -/* cfunc cbf_insert_row pyfunc insert_row - arg cbf_handle handle arg unsigned int rownumber */ +")get_axis_type; + const char * get_axis_type(const char *axis_id){ + cbf_axis_type axis_type; + cbf_failnez(cbf_get_axis_type(self,axis_id, + &axis_type)); + if (axis_type == CBF_TRANSLATION_AXIS) return "translation"; + if (axis_type == CBF_ROTATION_AXIS) return "rotation"; + return "general"; + } %feature("autodoc", " -Returns : -*args : Integer +Returns : Float vector1,Float vector2,Float vector3 +*args : String axis_id -C prototype: int cbf_insert_row (cbf_handle handle, unsigned int rownumber); +C prototype: int cbf_get_axis_vector (cbf_handle handle, const char *axis_id, + double *vector1, double *vector2, double *vector3); CBFLib documentation: DESCRIPTION -cbf_insert_row adds a new row to the current category. The new row is -inserted as row rownumber and existing rows starting from rownumber -are moved up by 1. The new row becomes the current row. -If the category has fewer than rownumber rows, the function returns -CBF_NOTFOUND. -The row numbers start from 0. +cbf_count_axis_ancestors sets ancestors to the number of ancestors of +axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor +axis of index ancestor_index of axis axis_id, starting with axis_id +for ancestor_index 0. +cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of +axis_id or to \". \" if there is no such ancestor. +cbf_get_axis_equipment sets *equipment to the equipment of axis_id or +to \". \" if there is no such equipment. +cbf_get_axis_equipment_component sets *equipment_component to the +equipment_component of axis_id or to \". \" if there is no such +equipment_component. +cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the +components of the ofset of axis_id. +cbf_get_axis_rotation sets rotation to the rotation of axis_id or to +0 if there is no such rotation. cbf_get_axis_rotation_axis sets +*rotation_axis to the rotation_axis of axis_id or to \". \" if there +is no such rotation_axis. +cbf_get_axis_setting sets *start and *increment to the corresponding +values of the axis axis_id. Any of the destination pointers may be +NULL. +cbf_get_axis_type sets axis_type to the type of axis_id. +cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the +components of the vector of axis_id. +The parameter reserved is presently unused and should be set to 0. ARGUMENTS -handle CBF handle. rownumber The row number of the new row. +handle CBF handle. reserved Unused. Any +value other than 0 is invalid. axis_id Axis id. +ancestor_index Integer index of the desired ancestor, starting +with 0 for the current axis_id. ancestor Pointer to +destination ancestor name pointer. depends_on Pointer to +destination depends_on name pointer. equipment Pointer to +destination equipment name pointer. equipment_component Pointer to +destination equipment_component name pointer. offset1 +Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. +rotation Pointer to destination rotation value. +rotation_axis Pointer to destination rotation_axisn name +pointer. start Pointer to the destination start +value. increment Pointer to the destination increment +value. type Pointer to destination axis type of type +. vector1 Pointer to destination first vector component +value. vector2 Pointer to destination second vector +component value. vector3 Pointer to destination third +vector component value. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")insert_row; - void insert_row(unsigned int arg){ - cbf_failnez(cbf_insert_row(self,arg));} - -/* cfunc cbf_new_column pyfunc new_column - arg cbf_handle handle arg const char *columnname */ +---------------------------------------------------------------------- +")get_axis_vector; +%apply double *OUTPUT {double *vector1, double *vector2, double vector3} get_axis_vector; + void get_axis_vector(const char *axis_id, + double *vector1, double *vector2, double *vector3){ + cbf_failnez(cbf_get_axis_vector(self,axis_id, + vector1, vector2,vector3)); + } %feature("autodoc", " -Returns : string -*args : +Returns : +*args : String axis_id,Float start,Float increment -C prototype: int cbf_new_column (cbf_handle handle, const char *columnname); +C prototype: int cbf_set_axis_setting (cbf_handle handle, + unsigned int reserved, const char *axis_id, double start, + double increment); CBFLib documentation: DESCRIPTION -cbf_new_column creates a new column in the current category with name -columnname and makes it the current column. -If a column with this name already exists, the existing column -becomes the current category. +cbf_set_axis_setting sets the starting and increment values of the +axis axis_id to start and increment. +The parameter reserved is presently unused and should be set to 0. ARGUMENTS -handle CBF handle. columnname The name of the new column. +handle CBF handle. reserved Unused. Any value other than 0 is +invalid. axis_id Axis id. start Start value. increment +Increment value. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")new_column; - void new_column(const char* arg){ - cbf_failnez(cbf_new_column(self,arg));} -%feature("autodoc", " -Returns : (Binary)String -*args : int element_number,int elsize,int ndimslow,int ndimmid,int ndimfast - -C prototype: int cbf_get_real_3d_image (cbf_handle handle, - unsigned int reserved, unsigned int element_number, - void *array, size_t elsize, size_t ndimslow, - size_t ndimmid, size_t ndimfast); - -CBFLib documentation: -DESCRIPTION -cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image -array for element number element_number into an array. The array -consists of ndimslow *ndimfast elements of elsize bytes each, -starting at array. The elements are signed if elsign is non-0 and -unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and -cbf_get_real_image_sf read the image array of IEEE doubles or floats -for element number element_number into an array. A real array is -always signed. cbf_get_3d_image, cbf_get_3d_image_fs and -cbf_get_3d_image_sf read the 3D image array for element number -element_number into an array. The array consists of ndimslow *ndimmid -*ndimfast elements of elsize bytes each, starting at array. The -elements are signed if elsign is non-0 and unsigned otherwise. -cbf_get_real_3d_image, cbf_get_real_3d_image_fs, -cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or -floats for element number element_number into an array. A real array -is always signed. -The _fs calls give the dimensions in a fast-to-slow order. The calls -with no suffix and the calls _sf calls give the dimensions in -slow-to-fast order -The structure of the array as a 1-, 2- or 3-dimensional array should -agree with the structure of the array given in the -ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, -ndimslow should be the array size and ndimfast and, for the 3D calls, -ndimmid, should be set to 1 both in the call and in the imgCIF data -being processed. If the array is 2-dimensional and a 3D call is used, -ndimslow and ndimmid should be the -")get_real_3d_image_as_string; - -// Ensure we free the local temporary - -%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) - get_real_3d_image_as_string; - -// Get the length correct +---------------------------------------------------------------------- +")set_axis_setting; - void get_real_3d_image_as_string(int element_number, char **s, int *slen, - int elsize, int ndimslow, int ndimmid, int ndimfast){ - void *array; - int reserved = 0; - *slen = 0; /* Initialise in case of problems */ - if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { - cbf_failnez (cbf_get_real_3d_image(self, - reserved, (unsigned int)element_number, - (void *)array, (size_t)elsize, - (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast)); - }else{ - cbf_failnez(CBF_ALLOC); - } - *slen = elsize*ndimfast*ndimmid*ndimslow; - *s = (char *) array; - } + void set_axis_setting(const char *axis_id, + double start, double increment){ + unsigned int reserved; + reserved = 0; + cbf_failnez(cbf_set_axis_setting(self,reserved, + axis_id,start,increment)); + } %feature("autodoc", " -Returns : Float time +Returns : pycbf goniometer object *args : -C prototype: int cbf_get_integration_time (cbf_handle handle, - unsigned int reserved, double *time); +C prototype: int cbf_construct_goniometer (cbf_handle handle, + cbf_goniometer *goniometer); CBFLib documentation: DESCRIPTION -cbf_get_integration_time sets *time to the integration time in -seconds. The parameter reserved is presently unused and should be set -to 0. +cbf_construct_goniometer constructs a goniometer object using the +description in the CBF object handle and initialises the goniometer +handle *goniometer. ARGUMENTS -handle CBF handle. reserved Unused. Any value other than 0 is -invalid. time Pointer to the destination time. +handle CBF handle. goniometer Pointer to the destination +goniometer handle. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_integration_time; +")construct_goniometer; -%apply double *OUTPUT {double *time} get_integration_time; - void get_integration_time( double *time ){ - unsigned int reserved; - double tim; - reserved = 0; - cbf_failnez(cbf_get_integration_time(self,reserved,&tim)); - *time = tim; - } + cbf_goniometer construct_goniometer(){ + cbf_goniometer goniometer; + cbf_failnez(cbf_construct_goniometer(self,&goniometer)); + return goniometer; + } %feature("autodoc", " -Returns : -*args : int compression,int binary_id,(binary) String data,int elsize, - int elements +Returns : pycbf detector object +*args : Integer element_number -C prototype: int cbf_set_realarray (cbf_handle handle, - unsigned int compression, int binary_id, void *array, - size_t elsize, size_t elements); +C prototype: int cbf_construct_detector (cbf_handle handle, + cbf_detector *detector, unsigned int element_number); CBFLib documentation: DESCRIPTION -cbf_set_integerarray sets the binary value of the item at the current -column and row to an integer array. The array consists of elements -elements of elsize bytes each, starting at array. The elements are -signed if elsigned is non-0 and unsigned otherwise. binary_id is the -binary section identifier. cbf_set_realarray sets the binary value of -the item at the current column and row to an integer array. The array -consists of elements elements of elsize bytes each, starting at -array. binary_id is the binary section identifier. -The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, -cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, -cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants -allow the data header values of byteorder, dimfast, dimmid, dimslow -and padding to be set to the data byte order, the fastest, second -fastest and third fastest array dimensions and the size in byte of -the post data padding to be used. -The array will be compressed using the compression scheme specifed by -compression. Currently, the available schemes are: -CBF_CANONICAL Canonical-code compression (section 3.3.1) -CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple -\"nibble_offset \" compression. CBF_NONE No compression. -NOTE: This scheme is by far the slowest of the four and uses much -more disk space. It is intended for routine use with small arrays -only. With large arrays (like images) it should be used only for -debugging. -The values compressed are limited to 64 bits. If any element in the -array is larger than 64 bits, the value compressed is the nearest -64-bit value. -Currently, the source array must consist of chars, shorts or ints -(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or -floats for cbf_set_realarray. If elsize is not equal to sizeof -(char), sizeof (short) or sizeof (int), the function returns -CBF_ARGUMENT. +cbf_construct_detector constructs a detector object for detector +element number element_number using the description in the CBF object +handle and initialises the detector handle *detector. +cbf_construct_reference_detector constructs a detector object for +detector element number element_number using the description in the +CBF object handle and initialises the detector handle *detector using +the reference settings of the axes. cbf_require_reference_detector is +similar, but try to force the creations of missing intermediate +categories needed to construct a detector object. ARGUMENTS -handle CBF handle. compression Compression method to use. -binary_id Integer binary identifier. array Pointer to the -source array. elsize Size in bytes of each source array -element. elsigned Set to non-0 if the source array elements are -signed. elements: The number of elements in the array. +handle CBF handle. detector Pointer to the +destination detector handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")set_realarray; - - /* CBFlib must NOT modify the data string which belongs to the scripting - language we will get and check the length via a typemap */ - -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray; +---------------------------------------------------------------------- +")construct_detector; - void set_realarray(unsigned int compression, int binary_id, - char *data, int len, int elsize, int elements){ - /* safety check on args */ - size_t els, ele; - void *array; - if(len == elsize*elements){ - array = data; - els = elsize; - ele = elements; - cbf_failnez(cbf_set_realarray (self, compression, binary_id, - (void *) data, (size_t) elsize, (size_t) elements)); - }else{ - cbf_failnez(CBF_ARGUMENT); - } + cbf_detector construct_detector(unsigned int element_number){ + cbf_detector detector; + cbf_failnez(cbf_construct_detector(self,&detector,element_number)); + return detector; } %feature("autodoc", " -Returns : String +Returns : pycbf detector object *args : Integer element_number -C prototype: int cbf_get_element_id (cbf_handle handle, - unsigned int element_number, const char **element_id); +C prototype: int cbf_construct_reference_detector (cbf_handle handle, + cbf_detector *detector, unsigned int element_number); CBFLib documentation: DESCRIPTION -cbf_get_element_number sets element_number to a number that can be -used in other cbf_simple calls to identify the detector element -element_id and optionally the specific array_id> and -array_section_id. cbf_get_element_id sets *element_id to point to the -ASCII value of the element_number'th -\"diffrn_data_frame.detector_element_id \" entry, counting from 0. -The element_number is the ordinal of the detector element in the -DIFFRN_DETECTOR_ELEMENT category. If an array_section_id is specified -(i.e. is not NULL), the element_number is the sum of the ordinal of -the detector element plus the number of detector elements multiplied -by the ordinal of array_section_id for the specified array_id> in the -ARRAY_STRUCTURE_LIST_SECTION category. -If the detector element does not exist, the function returns -CBF_NOTFOUND. -The element_id will be valid as long as the item exists and has not -been set to a new value. -The element_id must not be modified by the program in any way. +cbf_construct_detector constructs a detector object for detector +element number element_number using the description in the CBF object +handle and initialises the detector handle *detector. +cbf_construct_reference_detector constructs a detector object for +detector element number element_number using the description in the +CBF object handle and initialises the detector handle *detector using +the reference settings of the axes. cbf_require_reference_detector is +similar, but try to force the creations of missing intermediate +categories needed to construct a detector object. ARGUMENTS -handle CBF handle. element_number The number of the +handle CBF handle. detector Pointer to the +destination detector handle. element_number The number of the detector element counting from 0 by order of appearance in the -\"diffrn_data_frame \" category. element_id Pointer to the -destination string for cbf_get_element_id, but the string itself for -cbf_get_element_number. array_id The optional array id or -NULL. array_section_id The optional array_section_id or NULL. +\"diffrn_data_frame \" category. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_element_id; +")construct_reference_detector; - const char * get_element_id(unsigned int element_number){ - const char * result; - cbf_failnez(cbf_get_element_id (self, element_number, &result)); - return result; - } + cbf_detector construct_reference_detector(unsigned int element_number){ + cbf_detector detector; + cbf_failnez(cbf_construct_reference_detector(self,&detector,element_number)); + return detector; + } %feature("autodoc", " -Returns : (Binary)String -*args : int element_number,int elsize,int elsign,int ndimslow,int ndimfast +Returns : pycbf detector object +*args : Integer element_number -C prototype: int cbf_get_image_sf (cbf_handle handle, unsigned int reserved, - unsigned int element_number, void *array, size_t elsize, - int elsign, size_t ndimslow, size_t ndimfast); +C prototype: int cbf_require_reference_detector (cbf_handle handle, + cbf_detector *detector, unsigned int element_number); CBFLib documentation: DESCRIPTION -cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image -array for element number element_number into an array. The array -consists of ndimslow *ndimfast elements of elsize bytes each, -starting at array. The elements are signed if elsign is non-0 and -unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and -cbf_get_real_image_sf read the image array of IEEE doubles or floats -for element number element_number into an array. A real array is -always signed. cbf_get_3d_image, cbf_get_3d_image_fs and -cbf_get_3d_image_sf read the 3D image array for element number -element_number into an array. The array consists of ndimslow *ndimmid -*ndimfast elements of elsize bytes each, starting at array. The -elements are signed if elsign is non-0 and unsigned otherwise. -cbf_get_real_3d_image, cbf_get_real_3d_image_fs, -cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or -floats for element number element_number into an array. A real array -is always signed. -The _fs calls give the dimensions in a fast-to-slow order. The calls -with no suffix and the calls _sf calls give the dimensions in -slow-to-fast order -The structure of the array as a 1-, 2- or 3-dimensional array should -agree with the structure of the array given in the -ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, -ndimslow should be the array size and ndimfast and, for the 3D calls, -ndimmid, should be set to 1 both in the call and in the imgCIF data -being processed. If the array is 2-dimensional and a 3D call is used, -ndimslow and ndimmid should be the -")get_image_sf_as_string; - -// Ensure we free the local temporary - -%cstring_output_allocate_size(char ** s, int *slen, free(*$1)) - get_image_fs_as_string; - -// Get the length correct +cbf_construct_detector constructs a detector object for detector +element number element_number using the description in the CBF object +handle and initialises the detector handle *detector. +cbf_construct_reference_detector constructs a detector object for +detector element number element_number using the description in the +CBF object handle and initialises the detector handle *detector using +the reference settings of the axes. cbf_require_reference_detector is +similar, but try to force the creations of missing intermediate +categories needed to construct a detector object. +ARGUMENTS +handle CBF handle. detector Pointer to the +destination detector handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")require_reference_detector; - void get_image_sf_as_string(int element_number, char **s, int *slen, - int elsize, int elsign, int ndimslow, int ndimfast){ - void *array; - int reserved = 0; - *slen = 0; /* Initialise in case of problems */ - if ((array=malloc(elsize*ndimfast*ndimslow))) { - cbf_failnez (cbf_get_image_sf(self, - reserved, (unsigned int)element_number, - (void *)array, (size_t)elsize, elsign, - (size_t) ndimslow, (size_t)ndimfast)); - }else{ - cbf_failnez(CBF_ALLOC); - } - *slen = elsize*ndimfast*ndimslow; - *s = (char *) array; - } + cbf_detector require_reference_detector(unsigned int element_number){ + cbf_detector detector; + cbf_failnez(cbf_require_reference_detector(self,&detector,element_number)); + return detector; + } %feature("autodoc", " Returns : pycbf positioner object *args : String axis_id @@ -7380,965 +7484,879 @@ Returns an error code on failure or 0 for success. return positioner; } %feature("autodoc", " -Returns : size_t ndimfast,size_t ndimmid,size_t ndimslow -*args : Integer element_number +Returns : pycbf positioner object +*args : String axis_id -C prototype: int cbf_get_3d_image_size_fs (cbf_handle handle, - unsigned int reserved, unsigned int element_number, - size_t *ndimfast, size_t *ndimmid, size_t *ndimslow); +C prototype: int cbf_construct_reference_positioner (cbf_handle handle, + cbf_positioner *positioner, const char *axis_id); CBFLib documentation: DESCRIPTION -cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf -set *ndimslow and *ndimfast to the slow and fast dimensions of the -image array for element number element_number. If the array is -1-dimensional, *ndimslow will be set to the array size and *ndimfast -will be set to 1. If the array is 3-dimensional an error code will be -returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and -cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the -slowest, next fastest and fastest dimensions, respectively, of the 3D -image array for element number element_number. If the array is -1-dimensional, *ndimslow will be set to the array size and *ndimmid -and -")get_3d_image_size; - -%apply int *OUTPUT {int *ndimslow, int *ndimmid, int *ndimfast} get_3d_image_size; - void get_3d_image_size_fs(unsigned int element_number, int *ndimfast, int *ndimmid, int *ndimslow){ - unsigned int reserved; - size_t inslow, inmid, infast; - reserved = 0; - cbf_failnez(cbf_get_3d_image_size_fs(self,reserved,element_number,&infast,&inmid,&inslow)); - *ndimslow = (int)inslow; /* FIXME - is that how to convert? */ - *ndimmid = (int)inmid; - *ndimfast = (int)infast; - } - -/* cfunc cbf_set_value pyfunc set_value - arg cbf_handle handle arg const char *value */ +cbf_construct_positioner constructs a positioner object for the axis +given by axis_id using the description in the CBF object handle and +initialises the positioner handle *positioner. +cbf_construct_reference positioner constructs a positioner object for +the axis given by axis_id using the description in the CBF object +handle and initialises the detector handle *detector using the +reference settings of the axes. +ARGUMENTS +handle CBF handle. detector Pointer to the destination detector +handle. axis_id The identifier of the axis in the \"axis \" +category. +RETURN VALUE +Returns an error code on failure or 0 for success. +---------------------------------------------------------------------- +")construct_reference_positioner; + cbf_positioner construct_reference_positioner(const char* axis_id){ + cbf_positioner positioner; + cbf_failnez(cbf_construct_reference_positioner(self,&positioner,axis_id)); + return positioner; + } %feature("autodoc", " -Returns : string -*args : +Returns : Float pixel_size +*args : Int element_number,Int axis_number -C prototype: int cbf_set_value (cbf_handle handle, const char *value); +C prototype: int cbf_get_pixel_size (cbf_handle handle, + unsigned int element_number, int axis_number, + double *psize); CBFLib documentation: DESCRIPTION -cbf_set_value sets the item at the current column and row to the -ASCII value value. +cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to +the double value in millimeters of the axis axis_number of the +detector element element_number. The axis_number is numbered from 1, +starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to +point to the double value in millimeters of the axis axis_number of +the detector element element_number. The axis_number is numbered from +1, starting with the fastest axis. +If a negative axis number is given, the order of axes is reversed, so +that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the +fastest axis for cbf_get_pixel_size_sf. +If the pixel size is not given explcitly in the \"array_element_size +\" category, the function returns CBF_NOTFOUND. ARGUMENTS -handle CBF handle. value ASCII value. +handle CBF handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. axis_number The number of the +axis, starting from 1 for the fastest for cbf_get_pixel_size and +cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. +psize Pointer to the destination pixel size. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")set_value; - void set_value(const char* arg){ - cbf_failnez(cbf_set_value(self,arg));} +---------------------------------------------------------------------- +")get_pixel_size; + +%apply double *OUTPUT {double *psize} get_pixel_size; + void get_pixel_size(unsigned int element_number, + unsigned int axis_number, double *psize){ + cbf_failnez(cbf_get_pixel_size(self, + element_number, + axis_number, + psize)); + } %feature("autodoc", " -Returns : -*args : Integer timezone +Returns : Float pixel_size +*args : Int element_number,Int axis_number -C prototype: int cbf_set_current_timestamp (cbf_handle handle, - unsigned int reserved, int timezone); +C prototype: int cbf_get_pixel_size_fs(cbf_handle handle, + unsigned int element_number, int axis_number, + double *psize); CBFLib documentation: DESCRIPTION -cbf_set_current_timestamp sets the collection timestamp to the -current time. The timezone difference from UTC in minutes is set to -timezone. If no timezone is desired, timezone should be -CBF_NOTIMEZONE. If no timezone is used, the timest amp will be UTC. -The parameter reserved is presently unused and should be set to 0. -The new timestamp will have a precision of 1 second. +cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to +the double value in millimeters of the axis axis_number of the +detector element element_number. The axis_number is numbered from 1, +starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to +point to the double value in millimeters of the axis axis_number of +the detector element element_number. The axis_number is numbered from +1, starting with the fastest axis. +If a negative axis number is given, the order of axes is reversed, so +that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the +fastest axis for cbf_get_pixel_size_sf. +If the pixel size is not given explcitly in the \"array_element_size +\" category, the function returns CBF_NOTFOUND. ARGUMENTS -handle CBF handle. reserved Unused. Any value other than 0 is -invalid. timezone Timezone difference from UTC in minutes or -CBF_NOTIMEZONE. +handle CBF handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. axis_number The number of the +axis, starting from 1 for the fastest for cbf_get_pixel_size and +cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. +psize Pointer to the destination pixel size. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")set_current_timestamp; +")get_pixel_size_fs; - void set_current_timestamp(int timezone){ - unsigned int reserved; - reserved = 0; - cbf_failnez(cbf_set_current_timestamp(self,reserved,timezone)); - } +%apply double *OUTPUT {double *psize} get_pixel_size; + void get_pixel_size_fs(unsigned int element_number, + unsigned int axis_number, double *psize){ + cbf_failnez(cbf_get_pixel_size_fs(self, + element_number, + axis_number, + psize)); + } %feature("autodoc", " -Returns : Float Number -*args : Float Default +Returns : Float pixel_size +*args : Int element_number,Int axis_number -C prototype: int cbf_require_doublevalue (cbf_handle handle, double *number, - double defaultvalue); +C prototype: int cbf_get_pixel_size_sf(cbf_handle handle, + unsigned int element_number, int axis_number, + double *psize); CBFLib documentation: DESCRIPTION -cbf_get_doublevalue sets *number to the value of the ASCII item at -the current column and row interpreted as a decimal floating-point -number. cbf_require_doublevalue sets *number to the value of the -ASCII item at the current column and row interpreted as a decimal -floating-point number, setting it to defaultvalue if necessary. -If the value is not ASCII, the function returns CBF_BINARY. +cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to +the double value in millimeters of the axis axis_number of the +detector element element_number. The axis_number is numbered from 1, +starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to +point to the double value in millimeters of the axis axis_number of +the detector element element_number. The axis_number is numbered from +1, starting with the fastest axis. +If a negative axis number is given, the order of axes is reversed, so +that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the +fastest axis for cbf_get_pixel_size_sf. +If the pixel size is not given explcitly in the \"array_element_size +\" category, the function returns CBF_NOTFOUND. ARGUMENTS -handle CBF handle. number Pointer to the destination -number. defaultvalue default number value. +handle CBF handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. axis_number The number of the +axis, starting from 1 for the fastest for cbf_get_pixel_size and +cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. +psize Pointer to the destination pixel size. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")require_doublevalue; +---------------------------------------------------------------------- +")get_pixel_size_sf; -%apply double *OUTPUT {double *number} require_doublevalue; -void require_doublevalue(double *number, double defaultvalue){ - cbf_failnez(cbf_require_doublevalue(self,number,defaultvalue)); -} +%apply double *OUTPUT {double *psize} get_pixel_size; + void get_pixel_size_sf(unsigned int element_number, + unsigned int axis_number, double *psize){ + cbf_failnez(cbf_get_pixel_size_sf(self, + element_number, + axis_number, + psize)); + } +%feature("autodoc", " +Returns : +*args : Int element_number,Int axis_number,Float pixel size -/* cfunc cbf_rewind_datablock pyfunc rewind_datablock - arg cbf_handle handle */ +C prototype: int cbf_set_pixel_size (cbf_handle handle, + unsigned int element_number, int axis_number, + double psize); + +CBFLib documentation: +DESCRIPTION +cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the +"e;size"e; column of the \"array_structure_list \" category +at the row which matches axis axis_number of the detector element +element_number converting the double pixel size psize from meters to +millimeters in storing it in the \"size \" column for the axis +axis_number of the detector element element_number. The axis_number +is numbered from 1, starting with the slowest axis. +cbf_set_pixel_size_fs sets the item +")set_pixel_size; + void set_pixel_size (unsigned int element_number, + unsigned int axis_number, double psize){ + cbf_failnez(cbf_set_pixel_size(self, + element_number, + axis_number, + psize)); + } %feature("autodoc", " Returns : -*args : +*args : Int element_number,Int axis_number,Float pixel size -C prototype: int cbf_rewind_datablock (cbf_handle handle); +C prototype: int cbf_set_pixel_size_fs(cbf_handle handle, + unsigned int element_number, int axis_number, + double psize); CBFLib documentation: DESCRIPTION -cbf_rewind_datablock makes the first data block the current data -block. -If there are no data blocks, the function returns CBF_NOTFOUND. -The current category becomes undefined. -ARGUMENTS -handle CBF handle. -RETURN VALUE -Returns an error code on failure or 0 for success. -SEE ALSO -")rewind_datablock; - void rewind_datablock(void){ - cbf_failnez(cbf_rewind_datablock(self));} +cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the +"e;size"e; column of the \"array_structure_list \" category +at the row which matches axis axis_number of the detector element +element_number converting the double pixel size psize from meters to +millimeters in storing it in the \"size \" column for the axis +axis_number of the detector element element_number. The axis_number +is numbered from 1, starting with the slowest axis. +cbf_set_pixel_size_fs sets the item +")set_pixel_size_fs; + + void set_pixel_size_fs (unsigned int element_number, + unsigned int axis_number, double psize){ + cbf_failnez(cbf_set_pixel_size_fs(self, + element_number, + axis_number, + psize)); + } %feature("autodoc", " -Returns : String Name -*args : String columnnanme,String Default +Returns : +*args : Int element_number,Int axis_number,Float pixel size -C prototype: int cbf_require_column_value (cbf_handle handle, - const char *columnname, const char **value, - const char *defaultvalue); +C prototype: int cbf_set_pixel_size_sf(cbf_handle handle, + unsigned int element_number, int axis_number, + double psize); CBFLib documentation: DESCRIPTION -cbf_require_column_doublevalue sets *value to the ASCII item at the -current row for the column given with the name given by *columnname, -or to the string given by defaultvalue if the item cannot be found. -ARGUMENTS -handle CBF handle. columnname Name of the column -containing the number. value pointer to the location to -receive the value. defaultvalue Value to use if the requested -column and value cannot be found. -RETURN VALUE -Returns an error code on failure or 0 for success. -SEE ALSO -")require_column_value; +cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the +"e;size"e; column of the \"array_structure_list \" category +at the row which matches axis axis_number of the detector element +element_number converting the double pixel size psize from meters to +millimeters in storing it in the \"size \" column for the axis +axis_number of the detector element element_number. The axis_number +is numbered from 1, starting with the slowest axis. +cbf_set_pixel_size_fs sets the item +")set_pixel_size_sf; - const char* require_column_value(const char *columnname, - const char *defaultvalue){ - const char * result; - cbf_failnez(cbf_require_column_value(self,columnname, - &result,defaultvalue)); - return result; -} + void set_pixel_size_sf (unsigned int element_number, + unsigned int axis_number, double psize){ + cbf_failnez(cbf_set_pixel_size_sf(self, + element_number, + axis_number, + psize)); + } %feature("autodoc", " -Returns : CBFHandle dictionary +Returns : Float a,Float b,Float c,Float alpha,Float beta,Float gamma *args : -C prototype: int cbf_get_dictionary (cbf_handle handle, - cbf_handle * dictionary); +C prototype: int cbf_get_unit_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); CBFLib documentation: DESCRIPTION -cbf_get_dictionary sets *dictionary to the handle of a CBF which has -been associated with the CBF handle by cbf_set_dictionary. -cbf_set_dictionary associates the CBF handle dictionary_in with -handle as its dictionary. cbf_require_dictionary sets *dictionary to -the handle of a CBF which has been associated with the CBF handle by -cbf_set_dictionary or creates a new empty CBF and associates it with -handle, returning the new handle in *dictionary. +cbf_get_unit_cell sets cell[0:2] to the double values of the cell +edge lengths a, b and c in AAngstroms, cell[3:5] to the double values +of the cell angles a, b and g in degrees, cell_esd[0:2] to the double +values of the estimated strandard deviations of the cell edge lengths +a, b and c in AAngstroms, cell_esd[3:5] to the double values of the +estimated standard deviations of the the cell angles a, b and g in +degrees. +The values returned are retrieved from the first row of the \"cell +\" category. The value of \"_cell.entry_id \" is ignored. +cell or cell_esd may be NULL. +If cell is NULL, the cell parameters are not retrieved. +If cell_esd is NULL, the cell parameter esds are not retrieved. +If the \"cell \" category is present, but some of the values are +missing, zeros are returned for the missing values. ARGUMENTS -handle CBF handle. dictionary Pointer to CBF handle of -dictionary. dictionary_in CBF handle of dcitionary. +handle CBF handle. cell Pointer to the destination array of +6 doubles for the cell parameters. cell_esd Pointer to the +destination array of 6 doubles for the cell parameter esds. RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")get_dictionary; - -cbf_handle get_dictionary(){ - cbf_handle temp; - cbf_failnez(cbf_get_dictionary(self,&temp)); - return temp; -} - -/* cfunc cbf_reset_saveframe pyfunc reset_saveframe - arg cbf_handle handle */ +Returns an error code on failure or 0 for success. No errors is +returned for missing values if the \"cell \" category exists. +SEE ALSO +")get_unit_cell; +%apply double *OUTPUT {double *a, double *b, double *c, + double *alpha, double *beta, double *gamma} get_unit_cell; + void get_unit_cell(double *a, double *b, double *c, + double *alpha, double *beta, double *gamma) { + double cell[6]; + cbf_failnez(cbf_get_unit_cell(self,cell,NULL)); + *a = cell[0]; + *b = cell[1]; + *c = cell[2]; + *alpha = cell[3]; + *beta = cell[4]; + *gamma = cell[5]; + } %feature("autodoc", " -Returns : +Returns : doubleArray cell *args : -C prototype: int cbf_reset_saveframe (cbf_handle handle); +C prototype: int cbf_get_unit_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); CBFLib documentation: DESCRIPTION -cbf_reset_datablock deletes all categories from the current data -block. cbf_reset_saveframe deletes all categories from the current -save frame. +cbf_get_unit_cell sets cell[0:2] to the double values of the cell +edge lengths a, b and c in AAngstroms, cell[3:5] to the double values +of the cell angles a, b and g in degrees, cell_esd[0:2] to the double +values of the estimated strandard deviations of the cell edge lengths +a, b and c in AAngstroms, cell_esd[3:5] to the double values of the +estimated standard deviations of the the cell angles a, b and g in +degrees. +The values returned are retrieved from the first row of the \"cell +\" category. The value of \"_cell.entry_id \" is ignored. +cell or cell_esd may be NULL. +If cell is NULL, the cell parameters are not retrieved. +If cell_esd is NULL, the cell parameter esds are not retrieved. +If the \"cell \" category is present, but some of the values are +missing, zeros are returned for the missing values. ARGUMENTS -handle CBF handle. +handle CBF handle. cell Pointer to the destination array of +6 doubles for the cell parameters. cell_esd Pointer to the +destination array of 6 doubles for the cell parameter esds. RETURN VALUE -Returns an error code on failure or 0 for success. +Returns an error code on failure or 0 for success. No errors is +returned for missing values if the \"cell \" category exists. SEE ALSO -")reset_saveframe; - void reset_saveframe(void){ - cbf_failnez(cbf_reset_saveframe(self));} +")get_unit_cell; + +%apply double *OUTPUT {double *a_esd, double *b_esd, double *c_esd, + double *alpha_esd, double *beta_esd, double *gamma_esd} get_unit_cell_esd; + void get_unit_cell_esd(double *a_esd, double *b_esd, double *c_esd, + double *alpha_esd, double *beta_esd, double *gamma_esd) { + double cell_esd[6]; + cbf_failnez(cbf_get_unit_cell(self,NULL,cell_esd)); + *a_esd = cell_esd[0]; + *b_esd = cell_esd[1]; + *c_esd = cell_esd[2]; + *alpha_esd = cell_esd[3]; + *beta_esd = cell_esd[4]; + *gamma_esd = cell_esd[5]; + } %feature("autodoc", " Returns : *args : double cell[6] -C prototype: int cbf_set_reciprocal_cell (cbf_handle handle, double cell[6], +C prototype: int cbf_set_unit_cell (cbf_handle handle, double cell[6], double cell_esd[6] ); CBFLib documentation: DESCRIPTION -cbf_set_reciprocal_cell sets the reciprocal cell parameters to the -double values given in cell[0:2] for the reciprocal cell edge lengths -a*, b* and c* in AAngstroms-1, the double values given in cell[3:5] -for the reciprocal cell angles a*, b* and g* in degrees, the double -values given in cell_esd[0:2] for the estimated strandard deviations -of the reciprocal cell edge lengths a*, b* and c* in AAngstroms, and -the double values given in cell_esd[3:5] for the estimated standard -deviations of the reciprocal cell angles a*, b* and g* in degrees. +cbf_set_unit_cell sets the cell parameters to the double values given +in cell[0:2] for the cell edge lengths a, b and c in AAngstroms, the +double values given in cell[3:5] for the cell angles a, b and g in +degrees, the double values given in cell_esd[0:2] for the estimated +strandard deviations of the cell edge lengths a, b and c in +AAngstroms, and the double values given in cell_esd[3:5] for the +estimated standard deviations of the the cell angles a, b and g in +degrees. The values are placed in the first row of the \"cell \" category. If no value has been given for \"_cell.entry_id \", it is set to the value of the \"diffrn.id \" entry of the current data block. cell or cell_esd may be NULL. -If cell is NULL, the reciprocal cell parameters are not set. -If cell_esd is NULL, the reciprocal cell parameter esds are not set. +If cell is NULL, the cell parameters are not set. +If cell_esd is NULL, the cell parameter esds are not set. If the \"cell \" category is not present, it is created. If any of the necessary columns are not present, they are created. ARGUMENTS handle CBF handle. cell Pointer to the array of 6 doubles -for the reciprocal cell parameters. cell_esd Pointer to the array -of 6 doubles for the reciprocal cell parameter esds. +for the cell parameters. cell_esd Pointer to the array of 6 doubles +for the cell parameter esds. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")set_reciprocal_cell; +")set_unit_cell; - void set_reciprocal_cell(double cell[6]) { - cbf_failnez(cbf_set_reciprocal_cell(self,cell,NULL)); + void set_unit_cell(double cell[6]) { + cbf_failnez(cbf_set_unit_cell(self,cell,NULL)); } %feature("autodoc", " Returns : *args : double cell_esd[6] -C prototype: int cbf_set_reciprocal_cell (cbf_handle handle, double cell[6], +C prototype: int cbf_set_unit_cell (cbf_handle handle, double cell[6], double cell_esd[6] ); CBFLib documentation: DESCRIPTION -cbf_set_reciprocal_cell sets the reciprocal cell parameters to the -double values given in cell[0:2] for the reciprocal cell edge lengths -a*, b* and c* in AAngstroms-1, the double values given in cell[3:5] -for the reciprocal cell angles a*, b* and g* in degrees, the double -values given in cell_esd[0:2] for the estimated strandard deviations -of the reciprocal cell edge lengths a*, b* and c* in AAngstroms, and -the double values given in cell_esd[3:5] for the estimated standard -deviations of the reciprocal cell angles a*, b* and g* in degrees. +cbf_set_unit_cell sets the cell parameters to the double values given +in cell[0:2] for the cell edge lengths a, b and c in AAngstroms, the +double values given in cell[3:5] for the cell angles a, b and g in +degrees, the double values given in cell_esd[0:2] for the estimated +strandard deviations of the cell edge lengths a, b and c in +AAngstroms, and the double values given in cell_esd[3:5] for the +estimated standard deviations of the the cell angles a, b and g in +degrees. The values are placed in the first row of the \"cell \" category. If no value has been given for \"_cell.entry_id \", it is set to the value of the \"diffrn.id \" entry of the current data block. cell or cell_esd may be NULL. -If cell is NULL, the reciprocal cell parameters are not set. -If cell_esd is NULL, the reciprocal cell parameter esds are not set. +If cell is NULL, the cell parameters are not set. +If cell_esd is NULL, the cell parameter esds are not set. If the \"cell \" category is not present, it is created. If any of the necessary columns are not present, they are created. ARGUMENTS handle CBF handle. cell Pointer to the array of 6 doubles -for the reciprocal cell parameters. cell_esd Pointer to the array -of 6 doubles for the reciprocal cell parameter esds. +for the cell parameters. cell_esd Pointer to the array of 6 doubles +for the cell parameter esds. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")set_reciprocal_cell_esd; +")set_unit_cell_esd; - void set_reciprocal_cell_esd(double cell_esd[6]) { - cbf_failnez(cbf_set_reciprocal_cell(self,NULL,cell_esd)); + void set_unit_cell_esd(double cell_esd[6]) { + cbf_failnez(cbf_set_unit_cell(self,NULL,cell_esd)); } %feature("autodoc", " -Returns : -*args : int element_number,int compression,(binary) String data,int elsize, - int dimfast,int dimmid,int dimslow - -C prototype: int cbf_set_real_3d_image_fs(cbf_handle handle, - unsigned int reserved, unsigned int element_number, - unsigned int compression, void *array,size_t elsize, - size_t ndimfast, size_t ndimmid, size_t ndimslow); - -CBFLib documentation: -DESCRIPTION -cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image -array for element number element_number. The array consists of -ndimfast *ndimslow elements of elsize bytes each, starting at array. -The elements are signed if elsign is non-zero and unsigned otherwise. -cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf -write the image array for element number element_number. The array -consists of ndimfast *ndimslow IEEE double or float elements of -elsize bytes each, starting at array. cbf_set_3d_image, -cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array -for element number element_number. The array consists of ndimfast -*ndimmid *ndimslow elements of elsize bytes each, starting at array. -The elements are signed if elsign is non-0 and unsigned otherwise. -cbf_set_real_3d_image, cbf_set_real_3d_image_fs and -cbf_set_real_3d_image_sf writes the 3D image array for element number -element_number. The array consists of ndimfast *ndimmid *ndimslow -IEEE double or float elements of elsize bytes each, starting at -array. -The _fs calls give the dimensions in a fast-to-slow order. The calls -with no suffix and the calls _sf calls give the dimensions in -slow-to-fast order -If the array is 1-dimensional, ndimslow should be the array size and -ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the -array is 2-dimensional and the 3D calls are used, ndimslow and -ndimmid should be used for the array dimensions and ndimfast should -be set to 1. -The array will be compressed using the compression scheme specifed by -compression. Currently, the available schemes are: -CBF_CANONICAL Canonical-code compression (section 3.3.1) -CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET -Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple -\"nibble_offset \" compression. CBF_NONE No compression. -The values compressed are limited to 64 bits. If any element in the -array is larger than 64 bits, the value compressed is the nearest -64-bit value. -Currently, the source array must consist of chars, shorts or ints -(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for -cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof -(int), sizeof(double) or sizeof(float), the function returns -CBF_ARGUMENT. -The parameter reserved is presently unused and should be set to 0. -ARGUMENTS -handle CBF handle. reserved Unused. Any value other -than 0 is invalid. element_number The number of the detector -element counting from 0 by order of appearance in the -\"diffrn_data_frame \" category. compression Compression type. -array Pointer to the image array. elsize Size in -bytes of each image array element. elsigned Set to non-0 if -the image array elements are signed. ndimslow Slowest array -dimension. ndimmid Second slowest array dimension. ndimfast - Fastest array dimension. -RETURN VALUE -Returns an error code on failure or 0 for success. ----------------------------------------------------------------------- -")set_real_3d_image_fs; - - /* CBFlib must NOT modify the data string which belongs to the scripting - language we will get and check the length via a typemap */ - -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_real_3d_image_fs; - - void set_real_3d_image_fs(unsigned int element_number, - unsigned int compression, - char *data, int len, int elsize, int ndimfast, int ndimmid, int ndimslow){ - /* safety check on args */ - size_t els; - unsigned int reserved; - void *array; - if(len == elsize*ndimslow*ndimmid*ndimfast){ - array = data; - els = elsize; - reserved = 0; - cbf_failnez(cbf_set_real_3d_image_fs (self, reserved, element_number, compression, - (void *) data, (size_t) elsize, (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow)); - }else{ - cbf_failnez(CBF_ARGUMENT); - } - } -%feature("autodoc", " -Returns : -*args : String format,Float number +Returns : Float astar,Float bstar,Float cstar,Float alphastar,Float betastar, + Float gammastar +*args : -C prototype: int cbf_set_doublevalue (cbf_handle handle, const char *format, - double number); +C prototype: int cbf_get_reciprocal_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); CBFLib documentation: DESCRIPTION -cbf_set_doublevalue sets the item at the current column and row to -the floating-point value number written as an ASCII string with the -format specified by format as appropriate for the printf function. +cbf_get_reciprocal_cell sets cell[0:2] to the double values of the +reciprocal cell edge lengths a*, b* and c* in AAngstroms-1, cell[3:5] +to the double values of the reciprocal cell angles a*, b* and g* in +degrees, cell_esd[0:2] to the double values of the estimated +strandard deviations of the reciprocal cell edge lengths a*, b* and +c* in AAngstroms-1, cell_esd[3:5] to the double values of the +estimated standard deviations of the the reciprocal cell angles a*, +b* and g* in degrees. +The values returned are retrieved from the first row of the \"cell +\" category. The value of \"_cell.entry_id \" is ignored. +cell or cell_esd may be NULL. +If cell is NULL, the reciprocal cell parameters are not retrieved. +If cell_esd is NULL, the reciprocal cell parameter esds are not +retrieved. +If the \"cell \" category is present, but some of the values are +missing, zeros are returned for the missing values. ARGUMENTS -handle CBF handle. format Format for the number. number -Floating-point value. +handle CBF handle. cell Pointer to the destination array of +6 doubles for the reciprocal cell parameters. cell_esd Pointer to +the destination array of 6 doubles for the reciprocal cell parameter +esds. RETURN VALUE -Returns an error code on failure or 0 for success. +Returns an error code on failure or 0 for success. No errors is +returned for missing values if the \"cell \" category exists. SEE ALSO -")set_doublevalue; - - void set_doublevalue(const char *format, double number){ - cbf_failnez(cbf_set_doublevalue(self,format,number));} - -/* cfunc cbf_find_category pyfunc find_category - arg cbf_handle handle arg const char *categoryname */ +")get_reciprocal_cell; +%apply double *OUTPUT {double *astar, double *bstar, double *cstar, + double *alphastar, double *betastar, double *gammastar} get_reciprocal_cell; + void get_reciprocal_cell(double *astar, double *bstar, double *cstar, + double *alphastar, double *betastar, double *gammastar) { + double rcell[6]; + cbf_failnez(cbf_get_reciprocal_cell(self,rcell,NULL)); + *astar = rcell[0]; + *bstar = rcell[1]; + *cstar = rcell[2]; + *alphastar = rcell[3]; + *betastar = rcell[4]; + *gammastar = rcell[5]; + } %feature("autodoc", " -Returns : string +Returns : doubleArray cell *args : -C prototype: int cbf_find_category (cbf_handle handle, - const char *categoryname); +C prototype: int cbf_get_reciprocal_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); CBFLib documentation: DESCRIPTION -cbf_find_category makes the category in the current data block with -name categoryname the current category. -The comparison is case-insensitive. -If the category does not exist, the function returns CBF_NOTFOUND. -The current column and row become undefined. +cbf_get_reciprocal_cell sets cell[0:2] to the double values of the +reciprocal cell edge lengths a*, b* and c* in AAngstroms-1, cell[3:5] +to the double values of the reciprocal cell angles a*, b* and g* in +degrees, cell_esd[0:2] to the double values of the estimated +strandard deviations of the reciprocal cell edge lengths a*, b* and +c* in AAngstroms-1, cell_esd[3:5] to the double values of the +estimated standard deviations of the the reciprocal cell angles a*, +b* and g* in degrees. +The values returned are retrieved from the first row of the \"cell +\" category. The value of \"_cell.entry_id \" is ignored. +cell or cell_esd may be NULL. +If cell is NULL, the reciprocal cell parameters are not retrieved. +If cell_esd is NULL, the reciprocal cell parameter esds are not +retrieved. +If the \"cell \" category is present, but some of the values are +missing, zeros are returned for the missing values. ARGUMENTS -handle CBF handle. categoryname The name of the category to -find. +handle CBF handle. cell Pointer to the destination array of +6 doubles for the reciprocal cell parameters. cell_esd Pointer to +the destination array of 6 doubles for the reciprocal cell parameter +esds. RETURN VALUE -Returns an error code on failure or 0 for success. +Returns an error code on failure or 0 for success. No errors is +returned for missing values if the \"cell \" category exists. SEE ALSO -")find_category; - void find_category(const char* arg){ - cbf_failnez(cbf_find_category(self,arg));} +")get_reciprocal_cell; + +%apply double *OUTPUT {double *a_esd, double *b_esd, double *c_esd, + double *alpha_esd, double *beta_esd, double *gamma_esd} get_reciprocal_cell_esd; + void get_reciprocal_cell_esd(double *a_esd, double *b_esd, double *c_esd, + double *alpha_esd, double *beta_esd, double *gamma_esd) { + double cell_esd[6]; + cbf_failnez(cbf_get_reciprocal_cell(self,NULL,cell_esd)); + *a_esd = cell_esd[0]; + *b_esd = cell_esd[1]; + *c_esd = cell_esd[2]; + *alpha_esd = cell_esd[3]; + *beta_esd = cell_esd[4]; + *gamma_esd = cell_esd[5]; + } %feature("autodoc", " -Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, - int elements,int minelement,int maxelement,char **bo,int *bolen, - int dimfast,int dimmid,int dimslow,int padding -*args : +Returns : +*args : double cell[6] -C prototype: int cbf_get_integerarrayparameters_wdims_fs (cbf_handle handle, - unsigned int *compression, int *binary_id, size_t *elsize, - int *elsigned, int *elunsigned, size_t *elements, - int *minelement, int *maxelement, const char **byteorder, - size_t *dimfast, size_t *dimmid, size_t *dimslow, - size_t *padding); +C prototype: int cbf_set_reciprocal_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); CBFLib documentation: DESCRIPTION -cbf_get_integerarrayparameters sets *compression, *binary_id, -*elsize, *elsigned, *elunsigned, *elements, *minelement and -*maxelement to values read from the binary value of the item at the -current column and row. This provides all the arguments needed for a -subsequent call to cbf_set_integerarray, if a copy of the array is to -be made into another CIF or CBF. cbf_get_realarrayparameters sets -*compression, *binary_id, *elsize, *elements to values read from the -binary value of the item at the current column and row. This provides -all the arguments needed for a subsequent call to cbf_set_realarray, -if a copy of the arry is to be made into another CIF or CBF. -The variants cbf_get_integerarrayparameters_wdims, -cbf_get_integerarrayparameters_wdims_fs, -cbf_get_integerarrayparameters_wdims_sf, -cbf_get_realarrayparameters_wdims, -cbf_get_realarrayparameters_wdims_fs, -cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, -*dimmid, *dimslow, and *padding as well, providing the additional -parameters needed for a subsequent call to cbf_set_integerarray_wdims -or cbf_set_realarray_wdims. -The value returned in *byteorder is a pointer either to the string -\"little_endian \" or to the string \"big_endian \". This should be -the byte order of the data, not necessarily of the host machine. No -attempt should be made to modify this string. At this time only -\"little_endian \" will be returned. -The values returned in *dimfast, *dimmid and *dimslow are the sizes -of the fastest changing, second fastest changing and third fastest -changing dimensions of the array, if specified, or zero, if not -specified. -The value returned in *padding is the size of the post-data padding, -if any and if specified in the data header. The value is given as a -count of octets. -If the value is not binary, the function returns CBF_ASCII. +cbf_set_reciprocal_cell sets the reciprocal cell parameters to the +double values given in cell[0:2] for the reciprocal cell edge lengths +a*, b* and c* in AAngstroms-1, the double values given in cell[3:5] +for the reciprocal cell angles a*, b* and g* in degrees, the double +values given in cell_esd[0:2] for the estimated strandard deviations +of the reciprocal cell edge lengths a*, b* and c* in AAngstroms, and +the double values given in cell_esd[3:5] for the estimated standard +deviations of the reciprocal cell angles a*, b* and g* in degrees. +The values are placed in the first row of the \"cell \" category. If +no value has been given for \"_cell.entry_id \", it is set to the +value of the \"diffrn.id \" entry of the current data block. +cell or cell_esd may be NULL. +If cell is NULL, the reciprocal cell parameters are not set. +If cell_esd is NULL, the reciprocal cell parameter esds are not set. +If the \"cell \" category is not present, it is created. If any of +the necessary columns are not present, they are created. ARGUMENTS -handle CBF handle. compression Compression method used. -elsize Size in bytes of each array element. binary_id -Pointer to the destination integer binary identifier. elsigned -Pointer to an integer. Set to 1 if the elements can be read as signed -integers. elunsigned Pointer to an integer. Set to 1 if the -elements can be read as unsigned integers. elements Pointer to -the destination number of elements. minelement Pointer to the -destination smallest element. maxelement Pointer to the -destination largest element. byteorder Pointer to the destination -byte order. dimfast Pointer to the destination fastest -dimension. dimmid Pointer to the destination second fastest -dimension. dimslow Pointer to the destination third fastest -dimension. padding Pointer to the destination padding size. +handle CBF handle. cell Pointer to the array of 6 doubles +for the reciprocal cell parameters. cell_esd Pointer to the array +of 6 doubles for the reciprocal cell parameter esds. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")get_integerarrayparameters_wdims_fs; - -%cstring_output_allocate_size(char **bo, int *bolen, free(*$1)); -%apply int *OUTPUT {int *compression,int *binary_id, - int *elsize, int *elsigned, int *elunsigned, - int *elements, int *minelement, int *maxelement, - int *dimfast, int *dimmid, int *dimslow, int *padding} - get_integerarrayparameters_wdims_fs; +")set_reciprocal_cell; - void get_integerarrayparameters_wdims_fs(int *compression,int *binary_id, - int *elsize, int *elsigned, int *elunsigned, - int *elements, int *minelement, int *maxelement, - char **bo, int *bolen, - int *dimfast, int *dimmid, int *dimslow, int *padding - ){ - unsigned int comp; - size_t elsiz, elem, df,dm,ds,pd; - const char * byteorder; - char * bot; - cbf_failnez(cbf_get_integerarrayparameters_wdims_fs(self, - &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, - minelement, maxelement, &byteorder,&df,&dm,&ds,&pd )); - *bolen = strlen(byteorder); - if (!(bot = (char *)malloc(*bolen))) {cbf_failnez(CBF_ALLOC)} - strncpy(bot,byteorder,*bolen); - *bo = bot; - *compression = comp; - *elsize = elsiz; - *elements = elem; - *dimfast = df; - *dimmid = dm; - *dimslow = ds; - *padding = pd; - - } + void set_reciprocal_cell(double cell[6]) { + cbf_failnez(cbf_set_reciprocal_cell(self,cell,NULL)); + } %feature("autodoc", " Returns : -*args : int compression,int binary_id,(binary) String data,int elsize, - int elements,String byteorder,int dimfast,int dimmid,int dimslow, - int padding +*args : double cell_esd[6] -C prototype: int cbf_set_realarray_wdims_fs (cbf_handle handle, - unsigned int compression, int binary_id, void *array, - size_t elsize, size_t elements, const char *byteorder, - size_t dimfast, size_t dimmid, size_t dimslow, - size_t padding); +C prototype: int cbf_set_reciprocal_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); CBFLib documentation: DESCRIPTION -cbf_set_integerarray sets the binary value of the item at the current -column and row to an integer array. The array consists of elements -elements of elsize bytes each, starting at array. The elements are -signed if elsigned is non-0 and unsigned otherwise. binary_id is the -binary section identifier. cbf_set_realarray sets the binary value of -the item at the current column and row to an integer array. The array -consists of elements elements of elsize bytes each, starting at -array. binary_id is the binary section identifier. -The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, -cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, -cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants -allow the data header values of byteorder, dimfast, dimmid, dimslow -and padding to be set to the data byte order, the fastest, second -fastest and third fastest array dimensions and the size in byte of -the post data padding to be used. -The array will be compressed using the compression scheme specifed by -compression. Currently, the available schemes are: -CBF_CANONICAL Canonical-code compression (section 3.3.1) -CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple -\"nibble_offset \" compression. CBF_NONE No compression. -NOTE: This scheme is by far the slowest of the four and uses much -more disk space. It is intended for routine use with small arrays -only. With large arrays (like images) it should be used only for -debugging. -The values compressed are limited to 64 bits. If any element in the -array is larger than 64 bits, the value compressed is the nearest -64-bit value. -Currently, the source array must consist of chars, shorts or ints -(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or -floats for cbf_set_realarray. If elsize is not equal to sizeof -(char), sizeof (short) or sizeof (int), the function returns -CBF_ARGUMENT. +cbf_set_reciprocal_cell sets the reciprocal cell parameters to the +double values given in cell[0:2] for the reciprocal cell edge lengths +a*, b* and c* in AAngstroms-1, the double values given in cell[3:5] +for the reciprocal cell angles a*, b* and g* in degrees, the double +values given in cell_esd[0:2] for the estimated strandard deviations +of the reciprocal cell edge lengths a*, b* and c* in AAngstroms, and +the double values given in cell_esd[3:5] for the estimated standard +deviations of the reciprocal cell angles a*, b* and g* in degrees. +The values are placed in the first row of the \"cell \" category. If +no value has been given for \"_cell.entry_id \", it is set to the +value of the \"diffrn.id \" entry of the current data block. +cell or cell_esd may be NULL. +If cell is NULL, the reciprocal cell parameters are not set. +If cell_esd is NULL, the reciprocal cell parameter esds are not set. +If the \"cell \" category is not present, it is created. If any of +the necessary columns are not present, they are created. ARGUMENTS -handle CBF handle. compression Compression method to use. -binary_id Integer binary identifier. array Pointer to the -source array. elsize Size in bytes of each source array -element. elsigned Set to non-0 if the source array elements are -signed. elements: The number of elements in the array. +handle CBF handle. cell Pointer to the array of 6 doubles +for the reciprocal cell parameters. cell_esd Pointer to the array +of 6 doubles for the reciprocal cell parameter esds. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO -")set_realarray_wdims_fs; - - /* CBFlib must NOT modify the data string nor the byteorder string - which belongs to the scripting - language we will get and check the length via a typemap */ - -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_realarray_wdims_fs; -%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_realarray_wdims_fs; +")set_reciprocal_cell_esd; - void set_realarray_wdims_fs(unsigned int compression, int binary_id, - char *data, int len, int elsize, int elements, - char *bo, int bolen, int dimfast, int dimmid, int dimslow, int padding){ - /* safety check on args */ - size_t els, ele; - void *array; - char byteorder[15]; - if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ - array = data; - els = elsize; - ele = elements; - strncpy(byteorder,bo,bolen<15?bolen:14); - byteorder[bolen<15?bolen:14] = 0; - cbf_failnez(cbf_set_realarray_wdims_fs (self, compression, binary_id, - (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder, - (size_t) dimfast, (size_t) dimmid, (size_t) dimslow, (size_t)padding)); - }else{ - cbf_failnez(CBF_ARGUMENT); - } - } + void set_reciprocal_cell_esd(double cell_esd[6]) { + cbf_failnez(cbf_set_reciprocal_cell(self,NULL,cell_esd)); + } %feature("autodoc", " -Returns : String categoryroot -*args : String categoryname - -C prototype: int cbf_find_category_root (cbf_handle handle, - const char* categoryname, const char** categoryroot); - -CBFLib documentation: -DESCRIPTION -cbf_find_category_root sets *categoryroot to the root category of -which categoryname is an alias. cbf_set_category_root sets -categoryname_in as an alias of categoryroot in the dictionary -associated with handle, creating the dictionary if necessary. -cbf_require_category_root sets *categoryroot to the root category of -which categoryname is an alias, if there is one, or to the value of -categoryname, if categoryname is not an alias. -A returned categoryroot string must not be modified in any way. +Returns : Float matrix_0,Float matrix_1,Float matrix_2,Float matrix_3, + Float matrix_4,Float matrix_5,Float matrix_6,Float matrix_7, + Float matrix_8 +*args : + +C prototype: int cbf_get_orientation_matrix (cbf_handle handle, + double ub_matrix[9]); + +CBFLib documentation: +DESCRIPTION +cbf_get_orientation_matrix sets ub_matrix to point to the array of +orientation matrix entries in the \"diffrn \" category in the order +of columns: + \"UB[1][1] \" \"UB[1][2] \" \"UB[1][3] \" \"UB[2][1] \" +\"UB[2][2] \" \"UB[2][3] \" \"UB[3][1] \" \"UB[3][2] \" +\"UB[3][3] \" +cbf_set_orientation_matrix sets the values in the \"diffrn \" +category to the values pointed to by ub_matrix. ARGUMENTS -handle CBF handle. categoryname category name which -may be an alias. categoryroot pointer to a returned category -root name. categoryroot_in input category root name. +handle CBF handle. ubmatric Source or destination array of 9 +doubles giving the orientation matrix parameters. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")find_category_root; +")get_orientation_matrix; -const char* find_category_root(const char* categoryname){ - const char * result; - cbf_failnez(cbf_find_category_root(self,categoryname,&result)); - return result; -} +%apply double *OUTPUT {double *m0,double *m1,double *m2, +double *m3,double *m4, double *m5,double *m6, +double *m7,double *m8 } get_orientation_matrix; + void get_orientation_matrix( double *m0,double *m1, +double *m2,double *m3,double *m4,double *m5,double *m6, +double *m7,double *m8){ + double m[9]; + cbf_failnez(cbf_get_orientation_matrix(self,m)); + *m0 = m[0]; *m1=m[1] ; *m2=m[2] ; + *m3 = m[3]; *m4=m[4] ; *m5=m[5] ; + *m6 = m[6]; *m7=m[7] ; *m8=m[8] ; + } %feature("autodoc", " Returns : -*args : int compression,int binary_id,(binary) String data,int elsize, - int elsigned,int elements,String byteorder,int dimfast,int dimmid, - int dimslow,int padding +*args : Float matrix_0,Float matrix_1,Float matrix_2,Float matrix_3, + Float matrix_4,Float matrix_5,Float matrix_6,Float matrix_7, + Float matrix_8 -C prototype: int cbf_set_integerarray_wdims_fs (cbf_handle handle, - unsigned int compression, int binary_id, void *array, - size_t elsize, int elsigned, size_t elements, - const char *byteorder, size_t dimfast, size_t dimmid, - size_t dimslow, size_t padding); +C prototype: int cbf_set_orientation_matrix (cbf_handle handle, + double ub_matrix[9]); CBFLib documentation: DESCRIPTION -cbf_set_integerarray sets the binary value of the item at the current -column and row to an integer array. The array consists of elements -elements of elsize bytes each, starting at array. The elements are -signed if elsigned is non-0 and unsigned otherwise. binary_id is the -binary section identifier. cbf_set_realarray sets the binary value of -the item at the current column and row to an integer array. The array -consists of elements elements of elsize bytes each, starting at -array. binary_id is the binary section identifier. -The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, -cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, -cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants -allow the data header values of byteorder, dimfast, dimmid, dimslow -and padding to be set to the data byte order, the fastest, second -fastest and third fastest array dimensions and the size in byte of -the post data padding to be used. -The array will be compressed using the compression scheme specifed by -compression. Currently, the available schemes are: -CBF_CANONICAL Canonical-code compression (section 3.3.1) -CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple -\"nibble_offset \" compression. CBF_NONE No compression. -NOTE: This scheme is by far the slowest of the four and uses much -more disk space. It is intended for routine use with small arrays -only. With large arrays (like images) it should be used only for -debugging. -The values compressed are limited to 64 bits. If any element in the -array is larger than 64 bits, the value compressed is the nearest -64-bit value. -Currently, the source array must consist of chars, shorts or ints -(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or -floats for cbf_set_realarray. If elsize is not equal to sizeof -(char), sizeof (short) or sizeof (int), the function returns -CBF_ARGUMENT. +cbf_get_orientation_matrix sets ub_matrix to point to the array of +orientation matrix entries in the \"diffrn \" category in the order +of columns: + \"UB[1][1] \" \"UB[1][2] \" \"UB[1][3] \" \"UB[2][1] \" +\"UB[2][2] \" \"UB[2][3] \" \"UB[3][1] \" \"UB[3][2] \" +\"UB[3][3] \" +cbf_set_orientation_matrix sets the values in the \"diffrn \" +category to the values pointed to by ub_matrix. ARGUMENTS -handle CBF handle. compression Compression method to use. -binary_id Integer binary identifier. array Pointer to the -source array. elsize Size in bytes of each source array -element. elsigned Set to non-0 if the source array elements are -signed. elements: The number of elements in the array. +handle CBF handle. ubmatric Source or destination array of 9 +doubles giving the orientation matrix parameters. RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")set_integerarray_wdims_fs; - - /* CBFlib must NOT modify the data string nor the byteorder string - which belongs to the scripting - language we will get and check the length via a typemap */ - -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_integerarray_wdims_fs; -%apply (char *STRING, int LENGTH) { (char *bo, int bolen) } set_integerarray_wdims_fs; +---------------------------------------------------------------------- +")set_orientation_matrix; - void set_integerarray_wdims_fs(unsigned int compression, int binary_id, - char *data, int len, int elsize, int elsigned, int elements, - char *bo, int bolen, int dimfast, int dimmid, int dimslow, int padding){ - /* safety check on args */ - size_t els, ele; - void *array; - char byteorder[15]; - if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ - array = data; - els = elsize; - ele = elements; - strncpy(byteorder,bo,bolen<15?bolen:14); - byteorder[bolen<15?bolen:14] = 0; - cbf_failnez(cbf_set_integerarray_wdims_fs (self, compression, binary_id, - (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder, - (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding)); - }else{ - cbf_failnez(CBF_ARGUMENT); + void set_orientation_matrix( double m0,double m1, +double m2,double m3,double m4,double m5,double m6, +double m7,double m8){ + double m[9]; + m[0] = m0; m[1]=m1 ; m[2]=m2 ; + m[3] = m3; m[4]=m4 ; m[5]=m5 ; + m[6] = m6; m[7]=m7 ; m[8]=m8 ; + cbf_failnez(cbf_get_orientation_matrix(self,m)); } - } %feature("autodoc", " -Returns : -*args : int element_number,int compression,(binary) String data,int elsize, - int elsign,int dimslow,int dimfast +Returns : Float slowbinsize,Float fastbinsize +*args : Integer element_number -C prototype: int cbf_set_image_sf(cbf_handle handle, unsigned int reserved, - unsigned int element_number, unsigned int compression, - void *array, size_t elsize, int elsign, size_t ndimslow, - size_t ndimfast); +C prototype: int cbf_get_bin_sizes(cbf_handle handle, + unsigned int element_number, double * slowbinsize, + double * fastbinsize); CBFLib documentation: DESCRIPTION -cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image -array for element number element_number. The array consists of -ndimfast *ndimslow elements of elsize bytes each, starting at array. -The elements are signed if elsign is non-zero and unsigned otherwise. -cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf -write the image array for element number element_number. The array -consists of ndimfast *ndimslow IEEE double or float elements of -elsize bytes each, starting at array. cbf_set_3d_image, -cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array -for element number element_number. The array consists of ndimfast -*ndimmid *ndimslow elements of elsize bytes each, starting at array. -The elements are signed if elsign is non-0 and unsigned otherwise. -cbf_set_real_3d_image, cbf_set_real_3d_image_fs and -cbf_set_real_3d_image_sf writes the 3D image array for element number -element_number. The array consists of ndimfast *ndimmid *ndimslow -IEEE double or float elements of elsize bytes each, starting at -array. -The _fs calls give the dimensions in a fast-to-slow order. The calls -with no suffix and the calls _sf calls give the dimensions in -slow-to-fast order -If the array is 1-dimensional, ndimslow should be the array size and -ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the -array is 2-dimensional and the 3D calls are used, ndimslow and -ndimmid should be used for the array dimensions and ndimfast should -be set to 1. -The array will be compressed using the compression scheme specifed by -compression. Currently, the available schemes are: -CBF_CANONICAL Canonical-code compression (section 3.3.1) -CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET -Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple -\"nibble_offset \" compression. CBF_NONE No compression. -The values compressed are limited to 64 bits. If any element in the -array is larger than 64 bits, the value compressed is the nearest -64-bit value. -Currently, the source array must consist of chars, shorts or ints -(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for -cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof -(int), sizeof(double) or sizeof(float), the function returns -CBF_ARGUMENT. -The parameter reserved is presently unused and should be set to 0. +cbf_get_bin_sizes sets slowbinsize to point to the value of the +number of pixels composing one array element in the dimension that +changes at the second-fastest rate and fastbinsize to point to the +value of the number of pixels composing one array element in the +dimension that changes at the fastest rate for the dectector element +with the ordinal element_number. cbf_set_bin_sizes sets the the pixel +bin sizes in the \"array_intensities \" category to the values of +slowbinsize_in for the number of pixels composing one array element +in the dimension that changes at the second-fastest rate and +fastbinsize_in for the number of pixels composing one array element +in the dimension that changes at the fastest rate for the dectector +element with the ordinal element_number. +In order to allow for software binning involving fractions of pixels, +the bin sizes are doubles rather than ints. ARGUMENTS -handle CBF handle. reserved Unused. Any value other -than 0 is invalid. element_number The number of the detector -element counting from 0 by order of appearance in the -\"diffrn_data_frame \" category. compression Compression type. -array Pointer to the image array. elsize Size in -bytes of each image array element. elsigned Set to non-0 if -the image array elements are signed. ndimslow Slowest array -dimension. ndimmid Second slowest array dimension. ndimfast - Fastest array dimension. +handle CBF handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. slowbinsize Pointer to the +returned number of pixels composing one array element in the +dimension that changes at the second-fastest rate. fastbinsize +Pointer to the returned number of pixels composing one array element +in the dimension that changes at the fastest rate. slowbinsize_in +The number of pixels composing one array element in the dimension +that changes at the second-fastest rate. fastbinsize_in The number +of pixels composing one array element in the dimension that changes +at the fastest rate. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")set_image_sf; - - /* CBFlib must NOT modify the data string which belongs to the scripting - language we will get and check the length via a typemap */ - -%apply (char *STRING, int LENGTH) { (char *data, int len) } set_image_sf; +")get_bin_sizes; - void set_image_sf(unsigned int element_number, - unsigned int compression, - char *data, int len, int elsize, int elsign, int ndimslow, int ndimfast){ - /* safety check on args */ - size_t els; - unsigned int reserved; - void *array; - if(len == elsize*ndimslow*ndimfast){ - array = data; - els = elsize; - reserved = 0; - cbf_failnez(cbf_set_image_sf (self, reserved, element_number, compression, - (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t)ndimfast)); - }else{ - cbf_failnez(CBF_ARGUMENT); - } - } +%apply double *OUTPUT {double *slowbinsize,double *fastbinsize}; + void get_bin_sizes(int element_number, double *slowbinsize, double *fastbinsize) { + cbf_failnez(cbf_get_bin_sizes (self, (unsigned int)element_number, slowbinsize, fastbinsize)); + } %feature("autodoc", " -Returns : String -*args : String axis_id +Returns : +*args : Integer element_number,Float slowbinsize_in,Float fastbinsize_in -C prototype: int cbf_get_axis_equipment (cbf_handle handle, - const char *axis_id, const char * *equipment); +C prototype: int cbf_set_bin_sizes(cbf_handle handle, + unsigned int element_number, double slowbinsize_in, + double fastbinsize_in); CBFLib documentation: DESCRIPTION -cbf_count_axis_ancestors sets ancestors to the number of ancestors of -axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor -axis of index ancestor_index of axis axis_id, starting with axis_id -for ancestor_index 0. -cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of -axis_id or to \". \" if there is no such ancestor. -cbf_get_axis_equipment sets *equipment to the equipment of axis_id or -to \". \" if there is no such equipment. -cbf_get_axis_equipment_component sets *equipment_component to the -equipment_component of axis_id or to \". \" if there is no such -equipment_component. -cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the -components of the ofset of axis_id. -cbf_get_axis_rotation sets rotation to the rotation of axis_id or to -0 if there is no such rotation. cbf_get_axis_rotation_axis sets -*rotation_axis to the rotation_axis of axis_id or to \". \" if there -is no such rotation_axis. -cbf_get_axis_setting sets *start and *increment to the corresponding -values of the axis axis_id. Any of the destination pointers may be -NULL. -cbf_get_axis_type sets axis_type to the type of axis_id. -cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the -components of the vector of axis_id. -The parameter reserved is presently unused and should be set to 0. +cbf_get_bin_sizes sets slowbinsize to point to the value of the +number of pixels composing one array element in the dimension that +changes at the second-fastest rate and fastbinsize to point to the +value of the number of pixels composing one array element in the +dimension that changes at the fastest rate for the dectector element +with the ordinal element_number. cbf_set_bin_sizes sets the the pixel +bin sizes in the \"array_intensities \" category to the values of +slowbinsize_in for the number of pixels composing one array element +in the dimension that changes at the second-fastest rate and +fastbinsize_in for the number of pixels composing one array element +in the dimension that changes at the fastest rate for the dectector +element with the ordinal element_number. +In order to allow for software binning involving fractions of pixels, +the bin sizes are doubles rather than ints. ARGUMENTS -handle CBF handle. reserved Unused. Any -value other than 0 is invalid. axis_id Axis id. -ancestor_index Integer index of the desired ancestor, starting -with 0 for the current axis_id. ancestor Pointer to -destination ancestor name pointer. depends_on Pointer to -destination depends_on name pointer. equipment Pointer to -destination equipment name pointer. equipment_component Pointer to -destination equipment_component name pointer. offset1 -Pointer to destination first offset component value. offset2 - Pointer to destination second offset component value. offset3 - Pointer to destination third offset component value. -rotation Pointer to destination rotation value. -rotation_axis Pointer to destination rotation_axisn name -pointer. start Pointer to the destination start -value. increment Pointer to the destination increment -value. type Pointer to destination axis type of type -. vector1 Pointer to destination first vector component -value. vector2 Pointer to destination second vector -component value. vector3 Pointer to destination third -vector component value. +handle CBF handle. element_number The number of the +detector element counting from 0 by order of appearance in the +\"diffrn_data_frame \" category. slowbinsize Pointer to the +returned number of pixels composing one array element in the +dimension that changes at the second-fastest rate. fastbinsize +Pointer to the returned number of pixels composing one array element +in the dimension that changes at the fastest rate. slowbinsize_in +The number of pixels composing one array element in the dimension +that changes at the second-fastest rate. fastbinsize_in The number +of pixels composing one array element in the dimension that changes +at the fastest rate. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- -")get_axis_equipment; +")set_bin_sizes; - const char * get_axis_equipment(const char *axis_id){ - const char* equip; - cbf_failnez(cbf_get_axis_equipment(self,axis_id, - &equip)); - return equip; - } - %feature("autodoc", " -Returns : -*args : double cell[6] + void set_bin_sizes( int element_number, double slowbinsize_in, double fastbinsize_in) { + cbf_failnez(cbf_set_bin_sizes(self,element_number,slowbinsize_in,fastbinsize_in)); + } +%feature("autodoc", " +Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2, + Float offset3,Float angle +*args : Float ratio,String axis_id,String frame_id -C prototype: int cbf_set_unit_cell (cbf_handle handle, double cell[6], - double cell_esd[6] ); +C prototype: int cbf_get_axis_poise(cbf_handle handle, double ratio, + double * vector1, double * vector2, double * vector3, + double * offset1, double * offset2, double * offset3, + double * angle, const char * axis_id, + const char * frame_id); CBFLib documentation: DESCRIPTION -cbf_set_unit_cell sets the cell parameters to the double values given -in cell[0:2] for the cell edge lengths a, b and c in AAngstroms, the -double values given in cell[3:5] for the cell angles a, b and g in -degrees, the double values given in cell_esd[0:2] for the estimated -strandard deviations of the cell edge lengths a, b and c in -AAngstroms, and the double values given in cell_esd[3:5] for the -estimated standard deviations of the the cell angles a, b and g in -degrees. -The values are placed in the first row of the \"cell \" category. If -no value has been given for \"_cell.entry_id \", it is set to the -value of the \"diffrn.id \" entry of the current data block. -cell or cell_esd may be NULL. -If cell is NULL, the cell parameters are not set. -If cell_esd is NULL, the cell parameter esds are not set. -If the \"cell \" category is not present, it is created. If any of -the necessary columns are not present, they are created. +cbf_get_axis_poise sets vector1, vector2, vector3 to point to the +components of the axis vector for axis axis_id, offset1, offset2, +offset3 to point to the components of the axis base offset vector for +axis axis_id, and angle to point to the angle of rotation of axis +axis_id after application of the axis settings for frame frame_id, +using ratio, a value between 0 and 1, indicating how far into the +internal motion in the frame to go. If frame_id is the string \". +\", the first frame found is used. If there is more than one frame, +which frame will be found is indeterminate. If frame_id is NULL, the +overall setting for the scan are used, rather than those for any +particular frame. The vector and offset reported are the reference +vector and offset of the axis axis_id transformed by application of +all motions of the axes on which axis_id depends. +cbf_get_goniometer_poise vector1, vector2, vector3 to point to the +components of the axis vector for the goniometer axis, offset1, +offset2, offset3 to point to the components of the axis base offset +vector for the goniometer axis, and angle to point to the angle of +rotation of the goniometer axis after application of all axis +settings in the goniometer deriving the vector, offset and angle from +the resulting matrix. Calculation of the vector is indeterminate if +the angle is zero. +cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point +to the components of the axis vector for axis axis_id, offset1, +offset2, offset3 to point to the components of the axis base offset +vector for axis axis_id unmodified by axis rotations. Any of the +pointers may be specified as NULL. ARGUMENTS -handle CBF handle. cell Pointer to the array of 6 doubles -for the cell parameters. cell_esd Pointer to the array of 6 doubles -for the cell parameter esds. +handle CBF handle. ratio A number between 0 and 1 +indication how far into the frame to go vector1 Pointer to the +first component of the axis vector vector2 Pointer to the second +component of the axis vector vector3 Pointer to the third +component of the axis vector offset1 Pointer to the first +component of the axis offset offset2 Pointer to the second +component of the axis offset offset3 Pointer to the third +component of the axis offset angle Pointer to the rotation +angle axis_id The specified axis frame_id The specified +frame positioner CBF goniometer RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")set_unit_cell; +---------------------------------------------------------------------- +")get_axis_poise; + + %apply double *OUTPUT {double *vector1, double *vector2, double *vector3, + double *offset1, double *offset2, double *offset3, double *angle}; + + void get_axis_poise(double ratio, + double *vector1, double *vector2, double *vector3, + double *offset1, double *offset2, double *offset3, + double *angle, + const char *axis_id, const char *frame_id){ + cbf_failnez(cbf_get_axis_poise(self, ratio, + vector1, vector2, vector3, + offset1, offset2, offset3, angle, + axis_id, frame_id)); + } - void set_unit_cell(double cell[6]) { - cbf_failnez(cbf_set_unit_cell(self,cell,NULL)); - } %feature("autodoc", " -Returns : -*args : double cell_esd[6] +Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2, + Float offset3 +*args : String axis_id -C prototype: int cbf_set_unit_cell (cbf_handle handle, double cell[6], - double cell_esd[6] ); +C prototype: int cbf_get_axis_reference_poise(cbf_handle handle, + double * vector1, double * vector2, double * vector3, + double * offset1, double * offset2, double * offset3, + const char * axis_id); CBFLib documentation: DESCRIPTION -cbf_set_unit_cell sets the cell parameters to the double values given -in cell[0:2] for the cell edge lengths a, b and c in AAngstroms, the -double values given in cell[3:5] for the cell angles a, b and g in -degrees, the double values given in cell_esd[0:2] for the estimated -strandard deviations of the cell edge lengths a, b and c in -AAngstroms, and the double values given in cell_esd[3:5] for the -estimated standard deviations of the the cell angles a, b and g in -degrees. -The values are placed in the first row of the \"cell \" category. If -no value has been given for \"_cell.entry_id \", it is set to the -value of the \"diffrn.id \" entry of the current data block. -cell or cell_esd may be NULL. -If cell is NULL, the cell parameters are not set. -If cell_esd is NULL, the cell parameter esds are not set. -If the \"cell \" category is not present, it is created. If any of -the necessary columns are not present, they are created. +cbf_get_axis_poise sets vector1, vector2, vector3 to point to the +components of the axis vector for axis axis_id, offset1, offset2, +offset3 to point to the components of the axis base offset vector for +axis axis_id, and angle to point to the angle of rotation of axis +axis_id after application of the axis settings for frame frame_id, +using ratio, a value between 0 and 1, indicating how far into the +internal motion in the frame to go. If frame_id is the string \". +\", the first frame found is used. If there is more than one frame, +which frame will be found is indeterminate. If frame_id is NULL, the +overall setting for the scan are used, rather than those for any +particular frame. The vector and offset reported are the reference +vector and offset of the axis axis_id transformed by application of +all motions of the axes on which axis_id depends. +cbf_get_goniometer_poise vector1, vector2, vector3 to point to the +components of the axis vector for the goniometer axis, offset1, +offset2, offset3 to point to the components of the axis base offset +vector for the goniometer axis, and angle to point to the angle of +rotation of the goniometer axis after application of all axis +settings in the goniometer deriving the vector, offset and angle from +the resulting matrix. Calculation of the vector is indeterminate if +the angle is zero. +cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point +to the components of the axis vector for axis axis_id, offset1, +offset2, offset3 to point to the components of the axis base offset +vector for axis axis_id unmodified by axis rotations. Any of the +pointers may be specified as NULL. ARGUMENTS -handle CBF handle. cell Pointer to the array of 6 doubles -for the cell parameters. cell_esd Pointer to the array of 6 doubles -for the cell parameter esds. +handle CBF handle. ratio A number between 0 and 1 +indication how far into the frame to go vector1 Pointer to the +first component of the axis vector vector2 Pointer to the second +component of the axis vector vector3 Pointer to the third +component of the axis vector offset1 Pointer to the first +component of the axis offset offset2 Pointer to the second +component of the axis offset offset3 Pointer to the third +component of the axis offset angle Pointer to the rotation +angle axis_id The specified axis frame_id The specified +frame positioner CBF goniometer RETURN VALUE Returns an error code on failure or 0 for success. -SEE ALSO -")set_unit_cell_esd; +---------------------------------------------------------------------- +")get_axis_reference_poise; + + %apply double *OUTPUT {double *vector1, double *vector2, double *vector3, + double *offset1, double *offset2, double *offset3}; + + void get_axis_reference_poise(double *vector1, double *vector2, double *vector3, + double *offset1, double *offset2, double *offset3, + const char *axis_id){ + cbf_failnez(cbf_get_axis_reference_poise(self, + vector1, vector2, vector3, + offset1, offset2, offset3, + axis_id)); + } - void set_unit_cell_esd(double cell_esd[6]) { - cbf_failnez(cbf_set_unit_cell(self,NULL,cell_esd)); - } }; // End of cbf_handle_struct diff --git a/pycbf/linux.sh b/pycbf/linux.sh index 35355d3d..52490e63 100644 --- a/pycbf/linux.sh +++ b/pycbf/linux.sh @@ -1,17 +1,17 @@ - -nuweb pycbf -latex pycbf -nuweb pycbf -latex pycbf -dvipdfm pycbf -nuweb pycbf -lynx -dump CBFlib.html > CBFlib.txt -python make_pycbf.py -swig -python pycbf.i -python setup.py build -rm _pycbf.so -cp build/lib.linux-i686-2.4/_pycbf.so . -python pycbf_test1.py -python pycbf_test2.py -pydoc -w pycbf -python makeflatascii.py pycbf_ascii_help.txt + +nuweb pycbf +latex pycbf +nuweb pycbf +latex pycbf +dvipdfm pycbf +nuweb pycbf +lynx -dump CBFlib.html > CBFlib.txt +python make_pycbf.py +swig -python pycbf.i +python setup.py build +rm _pycbf.so +cp build/lib.linux-i686-2.4/_pycbf.so . +python pycbf_test1.py +python pycbf_test2.py +pydoc -w pycbf +python makeflatascii.py pycbf_ascii_help.txt diff --git a/pycbf/make_pycbf.py b/pycbf/make_pycbf.py index 4fffac00..90c9a0d0 100644 --- a/pycbf/make_pycbf.py +++ b/pycbf/make_pycbf.py @@ -1,7 +1,7 @@ -print "\\begin{verbatim}" -print "This output comes from make_pycbf.py which generates the wrappers" -print "pycbf Copyright (C) 2005 Jonathan Wright, no warranty, LGPL" +print("\\begin{verbatim}") +print("This output comes from make_pycbf.py which generates the wrappers") +print("pycbf Copyright (C) 2005 Jonathan Wright, no warranty, LGPL") ###################################################################### @@ -84,12 +84,12 @@ if line.find("int cbf_")>=0: # We found a function # keep going up to DESCRIPTION prototypes+=""+lines[i].rstrip()+" " - # print lines[i].rstrip() + # print(lines[i].rstrip()) check=0 while lines[i+1].find("DESCRIPTION")==-1 and lines[i+1].find("int cbf_")==-1: i=i+1 prototypes+=lines[i].rstrip()+" " # lose the \n - # print lines[i].rstrip() + # print(lines[i].rstrip()) check+=1 if check>50: raise Exception("Runaway prototype "+prototypes) @@ -117,16 +117,16 @@ line.find("________")>=0 or \ line.find("--------")>=0: if len(docstring)>0: - # print "Prototypes: ",prototypes + # print("Prototypes: ",prototypes) docstring = docstring.replace("\"", " \\\"") # escape the quotes for prototype in prototypes.strip().split(";")[:-1]: name = prototype.split("(")[0].strip() cname = name.split()[1].strip() prototype = prototype.strip()+";" name_dict[cname]=[prototype,docstring] - # print "Prototype: ","::",cname,"::",name,"::", prototype + # print("Prototype: ","::",cname,"::",name,"::", prototype) prototypes = "" - # print "Found ",prototype + # print("Found ",prototype) docstring="\n" prototype="" cname="" @@ -214,7 +214,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): } ""","get_integerarrayparameters",[],["int compression","int binary_id", "int elsize", "int elsigned", "int elunsigned", - "int elements", "int minelement", "int maxelement"]], + "int elements", "int minelement", "int maxelement"],], "cbf_get_integerarrayparameters_wdims":[""" @@ -254,7 +254,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): ""","get_integerarrayparameters_wdims",[],["int compression","int binary_id", "int elsize", "int elsigned", "int elunsigned", "int elements", "int minelement", "int maxelement", "char **bo", "int *bolen", - "int dimfast", "int dimmid", "int dimslow", "int padding"]], + "int dimfast", "int dimmid", "int dimslow", "int padding"],], "cbf_get_integerarrayparameters_wdims_fs":[""" @@ -294,7 +294,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): ""","get_integerarrayparameters_wdims_fs",[],["int compression","int binary_id", "int elsize", "int elsigned", "int elunsigned", "int elements", "int minelement", "int maxelement", "char **bo", "int *bolen", - "int dimfast", "int dimmid", "int dimslow", "int padding"]], + "int dimfast", "int dimmid", "int dimslow", "int padding"],], "cbf_get_integerarrayparameters_wdims_sf":[""" @@ -334,7 +334,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): ""","get_integerarrayparameters_wdims_sf",[],["int compression","int binary_id", "int elsize", "int elsigned", "int elunsigned", "int elements", "int minelement", "int maxelement", "char **bo", "int *bolen", - "int dimslow", "int dimmid", "int dimfast", "int padding"]], + "int dimslow", "int dimmid", "int dimfast", "int padding"],], "cbf_get_realarrayparameters":[""" @@ -353,7 +353,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): *elements = elem; } ""","get_realarrayparameters",[],["int compression","int binary_id", - "int elsize", "int elements"]], + "int elsize", "int elements"],], "cbf_get_realarrayparameters_wdims":[""" @@ -393,7 +393,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): ""","get_realarrayparameters_wdims",[],["int compression","int binary_id", "int elsize", "int elements", "char **bo", "int *bolen", - "int dimfast", "int dimmid", "int dimslow", "int padding"]], + "int dimfast", "int dimmid", "int dimslow", "int padding"],], "cbf_get_realarrayparameters_wdims_fs":[""" @@ -433,7 +433,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): ""","get_realarrayparameters_wdims_fs",[],["int compression","int binary_id", "int elsize", "int elements", "char **bo", "int *bolen", - "int dimfast", "int dimmid", "int dimslow", "int padding"]], + "int dimfast", "int dimmid", "int dimslow", "int padding"],], "cbf_get_realarrayparameters_wdims_sf":[""" @@ -473,7 +473,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): ""","get_realarrayparameters_wdims_sf",[],["int compression","int binary_id", "int elsize", "int elements", "char **bo", "int *bolen", - "int dimslow", "int dimmid", "int dimfast", "int padding"]], + "int dimslow", "int dimmid", "int dimfast", "int padding"],], "cbf_get_integerarray":[""" @@ -481,7 +481,9 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_integerarray_as_string; - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} // Get the length correct void get_integerarray_as_string(char **s, int *slen){ @@ -509,13 +511,13 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): } ""","get_integerarray_as_string",[],["(Binary)String"] ], - "cbf_get_image":[""" // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_image_as_string; - // Get the length correct void get_image_as_string(int element_number, char **s, int *slen, @@ -540,10 +542,11 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): "cbf_get_image_fs":[""" // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_image_fs_as_string; - // Get the length correct void get_image_fs_as_string(int element_number, char **s, int *slen, @@ -568,10 +571,11 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): "cbf_get_image_sf":[""" // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_image_fs_as_string; - // Get the length correct void get_image_sf_as_string(int element_number, char **s, int *slen, @@ -596,10 +600,11 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): "cbf_get_real_image":[""" // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_real_image_as_string; - // Get the length correct void get_real_image_as_string(int element_number, char **s, int *slen, @@ -624,10 +629,11 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): "cbf_get_real_image_fs":[""" // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_real_image_fs_as_string; - // Get the length correct void get_real_image_fs_as_string(int element_number, char **s, int *slen, @@ -652,10 +658,11 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): "cbf_get_real_image_sf":[""" // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_real_image_sf_as_string; - // Get the length correct void get_real_image_sf_as_string(int element_number, char **s, int *slen, @@ -680,10 +687,11 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): "cbf_get_3d_image":[""" // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_3d_image_as_string; - // Get the length correct void get_3d_image_as_string(int element_number, char **s, int *slen, @@ -708,10 +716,11 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): "cbf_get_3d_image_fs":[""" // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_3d_image_fs_as_string; - // Get the length correct void get_3d_image_fs_as_string(int element_number, char **s, int *slen, @@ -736,9 +745,11 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): "cbf_get_3d_image_sf":[""" // Ensure we free the local temporary - %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_3d_image_sf_as_string; +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} // Get the length correct @@ -764,9 +775,11 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): "cbf_get_real_3d_image":[""" // Ensure we free the local temporary - %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_real_3d_image_as_string; +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} // Get the length correct @@ -792,10 +805,11 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): "cbf_get_real_3d_image_fs":[""" // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_real_3d_image_fs_as_string; - // Get the length correct void get_real_3d_image_fs_as_string(int element_number, char **s, int *slen, @@ -819,7 +833,9 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): "cbf_get_real_3d_image_sf":[""" // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_real_3d_image_sf_as_string; @@ -847,10 +863,11 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): "cbf_get_realarray":[""" // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_realarray_as_string; - // Get the length correct void get_realarray_as_string(char **s, int *slen){ @@ -901,7 +918,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): } ""","set_integerarray", [ "int compression", "int binary_id","(binary) String data", - "int elsize", "int elsigned","int elements"],[]], + "int elsize", "int elsigned","int elements"],[],], "cbf_set_integerarray_wdims":[""" @@ -934,7 +951,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): } ""","set_integerarray_wdims", [ "int compression", "int binary_id","(binary) String data", - "int elsize", "int elsigned", "int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]], + "int elsize", "int elsigned", "int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[],], "cbf_set_integerarray_wdims_sf":[""" @@ -967,7 +984,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): } ""","set_integerarray_wdims_sf", [ "int compression", "int binary_id","(binary) String data", - "int elsize","int elsigned","int elements", "String byteorder", "int dimslow", "int dimmid", "int dimfast", "int padding"],[]], + "int elsize","int elsigned","int elements", "String byteorder", "int dimslow", "int dimmid", "int dimfast", "int padding"],[],], "cbf_set_integerarray_wdims_fs":[""" /* CBFlib must NOT modify the data string nor the byteorder string @@ -999,7 +1016,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): } ""","set_integerarray_wdims_fs", [ "int compression", "int binary_id","(binary) String data", - "int elsize","int elsigned","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]], + "int elsize","int elsigned","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[],], "cbf_set_realarray":[""" @@ -1025,7 +1042,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): } ""","set_realarray", [ "int compression", "int binary_id","(binary) String data", - "int elsize","int elements"],[]], + "int elsize","int elements"],[],], "cbf_set_realarray_wdims":[""" @@ -1058,7 +1075,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): } ""","set_realarray_wdims", [ "int compression", "int binary_id","(binary) String data", - "int elsize","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]], + "int elsize","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[],], "cbf_set_realarray_wdims_sf":[""" @@ -1091,7 +1108,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): } ""","set_realarray_wdims_sf", [ "int compression", "int binary_id","(binary) String data", - "int elsize","int elements", "String byteorder", "int dimslow", "int dimmid", "int dimfast", "int padding"],[]], + "int elsize","int elements", "String byteorder", "int dimslow", "int dimmid", "int dimfast", "int padding"],[],], "cbf_set_realarray_wdims_fs":[""" @@ -1124,7 +1141,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): } ""","set_realarray_wdims_fs", [ "int compression", "int binary_id","(binary) String data", - "int elsize","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]], + "int elsize","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[],], "cbf_set_image":[""" @@ -1152,7 +1169,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): } ""","set_image", [ "int element_number","int compression","(binary) String data", - "int elsize", "int elsign", "int dimslow", "int dimfast"],[]], + "int elsize", "int elsign", "int dimslow", "int dimfast"],[],], "cbf_set_image_fs":[""" @@ -1180,7 +1197,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): } ""","set_image_fs", [ "int element_number","int compression","(binary) String data", - "int elsize", "int elsign", "int dimfast", "int dimslow"],[]], + "int elsize", "int elsign", "int dimfast", "int dimslow"],[],], "cbf_set_image_sf":[""" @@ -1208,7 +1225,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): } ""","set_image_sf", [ "int element_number","int compression","(binary) String data", - "int elsize", "int elsign", "int dimslow", "int dimfast"],[]], + "int elsize", "int elsign", "int dimslow", "int dimfast"],[],], "cbf_set_real_image":[""" @@ -1236,7 +1253,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): } ""","set_real_image", [ "int element_number","int compression","(binary) String data", - "int elsize", "int dimslow", "int dimfast"],[]], + "int elsize", "int dimslow", "int dimfast"],[],], "cbf_set_real_image_fs":[""" @@ -1264,7 +1281,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): } ""","set_real_image_fs", [ "int element_number","int compression","(binary) String data", - "int elsize", "int dimfast", "int dimslow"],[]], + "int elsize", "int dimfast", "int dimslow"],[],], "cbf_set_real_image_sf":[""" @@ -1292,7 +1309,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): } ""","set_real_image_sf", [ "int element_number","int compression","(binary) String data", - "int elsize", "int dimslow", "int dimfast"],[]], + "int elsize", "int dimslow", "int dimfast"],[],], "cbf_set_3d_image":[""" @@ -1320,7 +1337,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): } ""","set_3d_image", [ "int element_number","int compression","(binary) String data", - "int elsize", "int elsign", "int dimslow", "int dimmid", "int dimfast"],[]], + "int elsize", "int elsign", "int dimslow", "int dimmid", "int dimfast"],[],], "cbf_set_3d_image_fs":[""" @@ -1348,7 +1365,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): } ""","set_3d_image_fs", [ "int element_number","int compression","(binary) String data", - "int elsize", "int elsign", "int dimfast", "int dimmid", "int dimslow"],[]], + "int elsize", "int elsign", "int dimfast", "int dimmid", "int dimslow"],[],], "cbf_set_3d_image_sf":[""" @@ -1376,7 +1393,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): } ""","set_3d_image_sf", [ "int element_number","int compression","(binary) String data", - "int elsize", "int elsign", "int dimslow", "int dimmid", "int dimfast"],[]], + "int elsize", "int elsign", "int dimslow", "int dimmid", "int dimfast"],[],], "cbf_set_real_3d_image":[""" @@ -1404,7 +1421,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): } ""","set_real_3d_image", [ "int element_number","int compression","(binary) String data", - "int elsize", "int dimslow", "int dimmid", "int dimfast"],[]], + "int elsize", "int dimslow", "int dimmid", "int dimfast"],[],], "cbf_set_real_3d_image_fs":[""" @@ -1432,7 +1449,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): } ""","set_real_3d_image_fs", [ "int element_number","int compression","(binary) String data", - "int elsize", "int dimfast", "int dimmid", "int dimslow"],[]], + "int elsize", "int dimfast", "int dimmid", "int dimslow"],[],], "cbf_set_real_3d_image_sf":[""" @@ -1460,7 +1477,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): } ""","set_real_3d_image_sf", [ "int element_number","int compression","(binary) String data", - "int elsize", "int dimslow", "int dimmid", "int dimfast"],[]], + "int elsize", "int dimslow", "int dimmid", "int dimfast"],[],], "cbf_get_image_size": [""" @@ -1473,7 +1490,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): *ndimslow = (int)inslow; *ndimfast = (int)infast; } -""","get_image_size",["Integer element_number"],["size_t ndim1","size_t ndim2"]], +""","get_image_size",["Integer element_number"],["size_t ndim1","size_t ndim2"],], "cbf_get_image_size_fs": [""" @@ -1486,7 +1503,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): *ndimfast = (int)infast; /* FIXME - is that how to convert? */ *ndimslow = (int)inslow; } -""","get_image_size_fs",["Integer element_number"],["size_t ndimfast","size_t ndimslow"]], +""","get_image_size_fs",["Integer element_number"],["size_t ndimfast","size_t ndimslow"],], "cbf_get_image_size_sf": [""" @@ -1499,7 +1516,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): *ndimslow = (int)inslow; *ndimfast = (int)infast; } -""","get_image_size_sf",["Integer element_number"],["size_t ndimslow","size_t ndimfast"]], +""","get_image_size_sf",["Integer element_number"],["size_t ndimslow","size_t ndimfast"],], "cbf_get_3d_image_size": [""" @@ -1513,7 +1530,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): *ndimmid = (int)inmid; *ndimfast = (int)infast; } -""","get_3d_image_size",["Integer element_number"],["size_t ndimslow","size_t ndimmid","size_t ndimfast"]], +""","get_3d_image_size",["Integer element_number"],["size_t ndimslow","size_t ndimmid","size_t ndimfast"],], "cbf_get_3d_image_size_fs": [""" @@ -1527,7 +1544,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): *ndimmid = (int)inmid; *ndimfast = (int)infast; } -""","get_3d_image_size",["Integer element_number"],["size_t ndimfast","size_t ndimmid","size_t ndimslow"]], +""","get_3d_image_size",["Integer element_number"],["size_t ndimfast","size_t ndimmid","size_t ndimslow"],], "cbf_get_3d_image_size_sf": [""" @@ -1541,7 +1558,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): *ndimmid = (int)inmid; *ndimfast = (int)infast; } -""","get_3d_image_size_sf",["Integer element_number"],["size_t ndimslow","size_t ndimmid","size_t ndimfast"]], +""","get_3d_image_size_sf",["Integer element_number"],["size_t ndimslow","size_t ndimmid","size_t ndimfast"],], "cbf_get_pixel_size" : [""" @@ -1592,7 +1609,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): psize)); } ""","set_pixel_size", - ["Int element_number","Int axis_number","Float pixel size"],[]], + ["Int element_number","Int axis_number","Float pixel size"],[],], "cbf_set_pixel_size_fs":[""" @@ -1604,7 +1621,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): psize)); } ""","set_pixel_size_fs", - ["Int element_number","Int axis_number","Float pixel size"],[]], + ["Int element_number","Int axis_number","Float pixel size"],[],], "cbf_set_pixel_size_sf":[""" @@ -1616,11 +1633,11 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): psize)); } ""","set_pixel_size_sf", - ["Int element_number","Int axis_number","Float pixel size"],[]], + ["Int element_number","Int axis_number","Float pixel size"],[],], "cbf_write_file" : [""" - void write_file(const char* filename, int ciforcbf, int headers, + void write_file(char* filename, int ciforcbf, int headers, int encoding){ FILE *stream; int readable; @@ -1636,11 +1653,11 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): } } ""","write_file",["String filename","Integer ciforcbf","Integer Headers", - "Integer encoding"],[]], + "Integer encoding"],[],], "cbf_write_widefile" : [""" - void write_widefile(const char* filename, int ciforcbf, int headers, + void write_widefile(char* filename, int ciforcbf, int headers, int encoding){ FILE *stream; int readable; @@ -1657,7 +1674,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): } } ""","write_widefile",["String filename","Integer ciforcbf","Integer Headers", - "Integer encoding"],[]], + "Integer encoding"],[],], "cbf_read_template":[""" @@ -1672,7 +1689,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): cbf_failnez(cbf_read_template (self, stream)); } } -""","read_template",["String filename"],[]], +""","read_template",["String filename"],[],], "cbf_read_file" : [""" @@ -1687,7 +1704,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): cbf_failnez(cbf_read_file(self, stream, headers)); } } -""","read_file",["String filename","Integer headers"],[]], +""","read_file",["String filename","Integer headers"],[],], @@ -1703,13 +1720,13 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): cbf_failnez(cbf_read_widefile(self, stream, headers)); } } -""","read_widefile",["String filename","Integer headers"],[]], +""","read_widefile",["String filename","Integer headers"],[],], "cbf_set_doublevalue":[""" void set_doublevalue(const char *format, double number){ cbf_failnez(cbf_set_doublevalue(self,format,number));} -""","set_doublevalue",["String format","Float number"],[]], +""","set_doublevalue",["String format","Float number"],[],], "cbf_require_integervalue":[""" @@ -1720,7 +1737,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): cbf_failnez(cbf_require_integervalue(self,number,thedefault)); } -""","require_integervalue", ["Int thedefault"],["Int number"]], +""","require_integervalue", ["Int thedefault"],["Int number"],], "cbf_require_doublevalue":[""" @@ -1728,7 +1745,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): void require_doublevalue(double *number, double defaultvalue){ cbf_failnez(cbf_require_doublevalue(self,number,defaultvalue)); } -""","require_doublevalue",["Float Default"],["Float Number"]], +""","require_doublevalue",["Float Default"],["Float Number"],], "cbf_require_column_value":[""" @@ -1740,7 +1757,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): return result; } ""","require_column_value", - ["String columnnanme","String Default"],["String Name"]], + ["String columnnanme","String Default"],["String Name"],], "cbf_require_column_doublevalue":[""" @@ -1751,7 +1768,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): columnname,number,defaultvalue)); } ""","require_column_doublevalue",["String columnname","Float Value"], - ["Float defaultvalue"]], + ["Float defaultvalue"],], "cbf_require_column_integervalue":[""" @@ -1762,7 +1779,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): columnname, number,defaultvalue)); } ""","require_column_integervalue",["String Columnvalue","Int default"], - ["Int Value"]], + ["Int Value"],], @@ -1783,7 +1800,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): cbf_failnez(cbf_require_diffrn_id(self,&id,defaultid)); return id; } -""","require_diffrn_id", ["String Default_id"],["String diffrn_id"]], +""","require_diffrn_id", ["String Default_id"],["String diffrn_id"],], @@ -1794,7 +1811,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): cbf_failnez(cbf_get_polarization (self, in1, in2)); } ""","get_polarization",[], - ["float polarizn_source_ratio","float polarizn_source_norm"]], + ["float polarizn_source_ratio","float polarizn_source_norm"],], "cbf_set_polarization":[""" @@ -1805,7 +1822,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): polarizn_source_norm)); } ""","set_polarization", - ["Float polarizn_source_ratio","Float polarizn_source_norm"],[]], + ["Float polarizn_source_ratio","Float polarizn_source_norm"],[],], "cbf_get_divergence":[""" @@ -1819,7 +1836,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): div_x_y_source)); } ""","get_divergence",[], - ["Float div_x_source","Float div_y_source","Float div_x_y_source"]], + ["Float div_x_source","Float div_y_source","Float div_x_y_source"],], "cbf_set_divergence":[""" @@ -1829,7 +1846,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): div_y_source,div_x_y_source)); } ""","set_divergence", - ["Float div_x_source","Float div_y_source","Float div_x_y_source"],[]], + ["Float div_x_source","Float div_y_source","Float div_x_y_source"],[],], "cbf_get_gain":[""" %apply double *OUTPUT {double *gain, double *gain_esd} get_gain; @@ -1838,14 +1855,14 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): cbf_failnez(cbf_get_gain (self, element_number, gain, gain_esd)); } ""","get_gain", - [],["Float gain", "Float gain_esd"]], + [],["Float gain", "Float gain_esd"],], "cbf_set_gain":[""" void set_gain (unsigned int element_number, double gain, double gain_esd){ cbf_failnez(cbf_set_gain (self, element_number, gain, gain_esd)); } -""","set_gain",["Float gain", "Float gain_esd"],[]], +""","set_gain",["Float gain", "Float gain_esd"],[],], "cbf_get_element_id":[""" const char * get_element_id(unsigned int element_number){ @@ -1853,7 +1870,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): cbf_failnez(cbf_get_element_id (self, element_number, &result)); return result; } -""","get_element_id", ["Integer element_number"],["String"]], +""","get_element_id", ["Integer element_number"],["String"],], @@ -1866,110 +1883,110 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): axis_id,start,increment)); } ""","set_axis_setting",["String axis_id", "Float start", "Float increment"], - []], + [],], "cbf_count_axis_ancestors":[""" - %apply int *OUTPUT {int *ancestors} count_axis_ancestors; - void count_axis_ancestors(const char *axis_id, - int *ancestors){ - unsigned int anc; - cbf_failnez(cbf_count_axis_ancestors(self,axis_id,&anc)); - *ancestors = anc; - } - ""","count_axis_ancestors",["String axis_id"],["Integer"],], +%apply int *OUTPUT {int *ancestors} count_axis_ancestors; + void count_axis_ancestors(const char *axis_id, + int *ancestors){ + unsigned int anc; + cbf_failnez(cbf_count_axis_ancestors(self,axis_id,&anc)); + *ancestors = anc; + } +""","count_axis_ancestors",["String axis_id"],["Integer"],], "cbf_get_axis_ancestor":[""" - const char * get_axis_ancestor(const char *axis_id, - int ancestor_index){ - const char* anc; - cbf_failnez(cbf_get_axis_ancestor(self,axis_id, - (unsigned int)ancestor_index,&anc)); - return anc; - } - ""","get_axis_ancestor",["String axis_id", "Integer ancestor_index"],["String"],], + const char * get_axis_ancestor(const char *axis_id, + int ancestor_index){ + const char* anc; + cbf_failnez(cbf_get_axis_ancestor(self,axis_id, + (unsigned int)ancestor_index,&anc)); + return anc; + } +""","get_axis_ancestor",["String axis_id", "Integer ancestor_index"],["String"],], "cbf_get_axis_depends_on":[""" - const char * get_axis_depends_on(const char *axis_id){ - const char* dep_on; - cbf_failnez(cbf_get_axis_depends_on(self,axis_id, - &dep_on)); - return dep_on; - } - ""","get_axis_depends_on",["String axis_id"],["String"],], + const char * get_axis_depends_on(const char *axis_id){ + const char* dep_on; + cbf_failnez(cbf_get_axis_depends_on(self,axis_id, + &dep_on)); + return dep_on; + } +""","get_axis_depends_on",["String axis_id"],["String"],], "cbf_get_axis_equipment":[""" - const char * get_axis_equipment(const char *axis_id){ - const char* equip; - cbf_failnez(cbf_get_axis_equipment(self,axis_id, - &equip)); - return equip; - } - ""","get_axis_equipment",["String axis_id"],["String"],], + const char * get_axis_equipment(const char *axis_id){ + const char* equip; + cbf_failnez(cbf_get_axis_equipment(self,axis_id, + &equip)); + return equip; + } +""","get_axis_equipment",["String axis_id"],["String"],], "cbf_get_axis_equipment_component":[""" - const char * get_axis_equipment_component(const char *axis_id){ - const char* equip_comp; - cbf_failnez(cbf_get_axis_equipment_component(self,axis_id, - &equip_comp)); - return equip_comp; - } - ""","get_axis_equipment_component",["String axis_id"],["String"],], + const char * get_axis_equipment_component(const char *axis_id){ + const char* equip_comp; + cbf_failnez(cbf_get_axis_equipment_component(self,axis_id, + &equip_comp)); + return equip_comp; + } +""","get_axis_equipment_component",["String axis_id"],["String"],], "cbf_get_axis_offset":[""" - %apply double *OUTPUT {double *offset1, double *offset2, double offset3} get_axis_offset; - void get_axis_offset(const char *axis_id, - double *offset1, double *offset2, double*offset3){ - cbf_failnez(cbf_get_axis_offset(self,axis_id, - offset1, offset2,offset3)); - } - ""","get_axis_offset",["String axis_id"], - ["Float offset1", "Float offset2", "Float offset3"],], +%apply double *OUTPUT {double *offset1, double *offset2, double offset3} get_axis_offset; + void get_axis_offset(const char *axis_id, + double *offset1, double *offset2, double*offset3){ + cbf_failnez(cbf_get_axis_offset(self,axis_id, + offset1, offset2,offset3)); + } +""","get_axis_offset",["String axis_id"], + ["Float offset1", "Float offset2", "Float offset3"],], "cbf_get_axis_rotation":[""" - %apply double *OUTPUT {double *rotation} get_axis_rotation; - void get_axis_rotation(const char *axis_id, - double *rotation){ - cbf_failnez(cbf_get_axis_rotation(self,axis_id, - rotation)); - } - ""","get_axis_rotation",["String axis_id"], - ["Float"],], +%apply double *OUTPUT {double *rotation} get_axis_rotation; + void get_axis_rotation(const char *axis_id, + double *rotation){ + cbf_failnez(cbf_get_axis_rotation(self,axis_id, + rotation)); + } +""","get_axis_rotation",["String axis_id"], + ["Float"],], "cbf_get_axis_rotation_axis":[""" - const char * get_axis_rotation_axis(const char *axis_id){ - const char* rot_axis; - cbf_failnez(cbf_get_axis_rotation_axis(self,axis_id, - &rot_axis)); - return rot_axis; - } - ""","get_axis_rotation_axis",["String axis_id"],["String"],], + const char * get_axis_rotation_axis(const char *axis_id){ + const char* rot_axis; + cbf_failnez(cbf_get_axis_rotation_axis(self,axis_id, + &rot_axis)); + return rot_axis; + } +""","get_axis_rotation_axis",["String axis_id"],["String"],], "cbf_get_axis_type":[""" - const char * get_axis_type(const char *axis_id){ - cbf_axis_type axis_type; - cbf_failnez(cbf_get_axis_type(self,axis_id, - &axis_type)); - if (axis_type == CBF_TRANSLATION_AXIS) return "translation"; - if (axis_type == CBF_ROTATION_AXIS) return "rotation"; - return "general"; - } - ""","get_axis_type",["String axis_id"],["String"],], + const char * get_axis_type(const char *axis_id){ + cbf_axis_type axis_type; + cbf_failnez(cbf_get_axis_type(self,axis_id, + &axis_type)); + if (axis_type == CBF_TRANSLATION_AXIS) return "translation"; + if (axis_type == CBF_ROTATION_AXIS) return "rotation"; + return "general"; + } +""","get_axis_type",["String axis_id"],["String"],], "cbf_get_axis_vector":[""" - %apply double *OUTPUT {double *vector1, double *vector2, double vector3} get_axis_vector; - void get_axis_vector(const char *axis_id, - double *vector1, double *vector2, double *vector3){ - cbf_failnez(cbf_get_axis_vector(self,axis_id, - vector1, vector2,vector3)); - } - ""","get_axis_vector",["String axis_id"], - ["Float vector1", "Float vector2", "Float vector3"],], +%apply double *OUTPUT {double *vector1, double *vector2, double vector3} get_axis_vector; + void get_axis_vector(const char *axis_id, + double *vector1, double *vector2, double *vector3){ + cbf_failnez(cbf_get_axis_vector(self,axis_id, + vector1, vector2,vector3)); + } +""","get_axis_vector",["String axis_id"], + ["Float vector1", "Float vector2", "Float vector3"],], "cbf_get_axis_setting":[""" %apply double *OUTPUT {double *start, double *increment} get_axis_setting; @@ -1995,7 +2012,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): year,month,day,hour,minute,second,timezone)); } ""","get_datestamp",[],["int year", "int month", "int day", "int hour", -"int minute", "double second", "int timezone"]], +"int minute", "double second", "int timezone"],], @@ -2009,7 +2026,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): year,month,day,hour,minute,second,timezone,precision)); } ""","set_datestamp",["int year", "int month", "int day", "int hour", -"int minute", "double second", "int timezone","Float precision"],[]], +"int minute", "double second", "int timezone","Float precision"],[],], "cbf_get_timestamp":[""" @@ -2020,7 +2037,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): reserved = 0; cbf_failnez(cbf_get_timestamp(self,reserved,time,timezone)); } -""","get_timestamp",[],["Float time","Integer timezone"]], +""","get_timestamp",[],["Float time","Integer timezone"],], @@ -2030,7 +2047,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): reserved = 0; cbf_failnez(cbf_set_timestamp(self,reserved,time,timezone,precision)); } -""","set_timestamp",["Float time","Integer timezone","Float precision"],[]], +""","set_timestamp",["Float time","Integer timezone","Float precision"],[],], "cbf_set_current_timestamp":[""" @@ -2039,7 +2056,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): reserved = 0; cbf_failnez(cbf_set_current_timestamp(self,reserved,timezone)); } -""","set_current_timestamp",["Integer timezone"],[]], +""","set_current_timestamp",["Integer timezone"],[],], @@ -2048,13 +2065,13 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): void get_overload(unsigned int element_number, double *overload){ cbf_failnez(cbf_get_overload(self,element_number,overload)); } -""","get_overload",["Integer element_number"],["Float overload"]], +""","get_overload",["Integer element_number"],["Float overload"],], "cbf_set_overload":[""" void set_overload(unsigned int element_number, double overload){ cbf_failnez(cbf_set_overload(self,element_number,overload)); } -""","set_overload",["Integer element_number","Float overload"],[]], +""","set_overload",["Integer element_number","Float overload"],[],], "cbf_set_integration_time":[""" @@ -2063,7 +2080,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): reserved = 0; cbf_failnez(cbf_set_integration_time(self,reserved,time)); } -""","set_integration_time",["Float time"],[]], +""","set_integration_time",["Float time"],[],], @@ -2076,7 +2093,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): cbf_failnez(cbf_get_integration_time(self,reserved,&tim)); *time = tim; } -""","get_integration_time",[],["Float time"]], +""","get_integration_time",[],["Float time"],], "cbf_get_orientation_matrix":[""" %apply double *OUTPUT {double *m0,double *m1,double *m2, @@ -2219,7 +2236,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): cbf_failnez(cbf_require_tag_root(self,tagname,&result)); return result; } -""","require_tag_root",["String tagname"],["String tagroot"]], +""","require_tag_root",["String tagname"],["String tagroot"],], "cbf_find_tag_root":[""" const char * find_tag_root(const char* tagname){ @@ -2227,20 +2244,20 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): cbf_failnez(cbf_find_tag_root(self,tagname,&result)); return result; } -""","find_tag_root",["String tagname"],["String tagroot"]], +""","find_tag_root",["String tagname"],["String tagroot"],], "cbf_set_tag_root":[""" void set_tag_root(const char* tagname, const char* tagroot_in){ cbf_failnez(cbf_set_tag_root(self,tagname,tagroot_in)); } -""","set_tag_root",["String tagname","String tagroot_in"],[]], +""","set_tag_root",["String tagname","String tagroot_in"],[],], "cbf_set_category_root":[""" void set_category_root(const char* categoryname, const char* categoryroot){ cbf_failnez(cbf_set_category_root(self,categoryname,categoryroot)); } -""","set_category_root",["String categoryname","String categoryroot"],[]], +""","set_category_root",["String categoryname","String categoryroot"],[],], "cbf_find_category_root":[""" @@ -2249,7 +2266,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): cbf_failnez(cbf_find_category_root(self,categoryname,&result)); return result; } -""","find_category_root",["String categoryname"],["String categoryroot"]], +""","find_category_root",["String categoryname"],["String categoryroot"],], @@ -2262,7 +2279,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): cbf_failnez(cbf_require_category_root(self,categoryname, &result)); return result; } -""","cbf_require_category_root",["String Categoryname"],["String categoryroot"]], +""","cbf_require_category_root",["String Categoryname"],["String categoryroot"],], "cbf_set_orientation_matrix":[""" @@ -2276,7 +2293,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): cbf_failnez(cbf_get_orientation_matrix(self,m)); } ""","set_orientation_matrix", - [ "Float matrix_%d"%(ind) for ind in range(9) ] ,[]], + [ "Float matrix_%d"%(ind) for ind in range(9) ] ,[],], "cbf_set_bin_sizes":[""" void set_bin_sizes( int element_number, double slowbinsize_in, double fastbinsize_in) { @@ -2303,7 +2320,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): cbf_failnez(cbf_require_dictionary(self,&temp)); return temp; } -""","require_dictionary",[],["CBFHandle dictionary"]], +""","require_dictionary",[],["CBFHandle dictionary"],], "cbf_get_dictionary":[""" @@ -2312,7 +2329,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): cbf_failnez(cbf_get_dictionary(self,&temp)); return temp; } -""","get_dictionary",[],["CBFHandle dictionary"]], +""","get_dictionary",[],["CBFHandle dictionary"],], @@ -2320,7 +2337,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): void set_dictionary(cbf_handle other){ cbf_failnez(cbf_set_dictionary(self,other)); } -""","set_dictionary",["CBFHandle dictionary"],[]], +""","set_dictionary",["CBFHandle dictionary"],[],], @@ -2328,7 +2345,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): void convert_dictionary(cbf_handle other){ cbf_failnez(cbf_convert_dictionary(self,other)); } -""","convert_dictionary",["CBFHandle dictionary"],[]], +""","convert_dictionary",["CBFHandle dictionary"],[],], "cbf_construct_detector":[""" @@ -2337,7 +2354,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): cbf_failnez(cbf_construct_detector(self,&detector,element_number)); return detector; } -""","construct_detector",["Integer element_number"],["pycbf detector object"]], +""","construct_detector",["Integer element_number"],["pycbf detector object"],], "cbf_construct_reference_detector":[""" cbf_detector construct_reference_detector(unsigned int element_number){ @@ -2345,7 +2362,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): cbf_failnez(cbf_construct_reference_detector(self,&detector,element_number)); return detector; } -""","construct_reference_detector",["Integer element_number"],["pycbf detector object"]], +""","construct_reference_detector",["Integer element_number"],["pycbf detector object"],], "cbf_require_reference_detector":[""" cbf_detector require_reference_detector(unsigned int element_number){ @@ -2353,7 +2370,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): cbf_failnez(cbf_require_reference_detector(self,&detector,element_number)); return detector; } -""","require_reference_detector",["Integer element_number"],["pycbf detector object"]], +""","require_reference_detector",["Integer element_number"],["pycbf detector object"],], "cbf_construct_goniometer":[""" @@ -2362,7 +2379,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): cbf_failnez(cbf_construct_goniometer(self,&goniometer)); return goniometer; } -""","construct_goniometer",[],["pycbf goniometer object"]], +""","construct_goniometer",[],["pycbf goniometer object"],], "cbf_construct_positioner":[""" cbf_positioner construct_positioner(const char* axis_id){ @@ -2370,7 +2387,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): cbf_failnez(cbf_construct_positioner(self,&positioner,axis_id)); return positioner; } -""","construct_positioner",["String axis_id"],["pycbf positioner object"]], +""","construct_positioner",["String axis_id"],["pycbf positioner object"],], "cbf_construct_reference_positioner":[""" cbf_positioner construct_reference_positioner(const char* axis_id){ @@ -2378,7 +2395,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): cbf_failnez(cbf_construct_reference_positioner(self,&positioner,axis_id)); return positioner; } -""","construct_reference_positioner",["String axis_id"],["pycbf positioner object"]], +""","construct_reference_positioner",["String axis_id"],["pycbf positioner object"],], "cbf_get_axis_reference_poise":[""" %apply double *OUTPUT {double *vector1, double *vector2, double *vector3, @@ -2395,7 +2412,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): ""","get_axis_reference_poise",["String axis_id"], ["Float vector1","Float vector2","Float vector3", - "Float offset1","Float offset2","Float offset3"]], + "Float offset1","Float offset2","Float offset3"],], "cbf_get_axis_poise":[""" %apply double *OUTPUT {double *vector1, double *vector2, double *vector3, @@ -2415,7 +2432,7 @@ def docstringwrite(pyfunc,input,output,prototype,cbflibdoc): ""","get_axis_poise", ["Float ratio", "String axis_id", "String frame_id"], ["Float vector1","Float vector2","Float vector3", - "Float offset1","Float offset2","Float offset3","Float angle"]], + "Float offset1","Float offset2","Float offset3","Float angle"],], } @@ -2481,7 +2498,7 @@ def __init__(self): def get_code(self): return self.code+self.tail def wrap(self,cfunc,prototype,args,docstring): - # print "cfunc: ", cfunc + # print("cfunc: ", cfunc) pyfunc = cfunc.replace("cbf_","") # Insert a comment for debugging this script code = "\n/* cfunc %s pyfunc %s \n"%(cfunc,pyfunc) @@ -2493,7 +2510,7 @@ def wrap(self,cfunc,prototype,args,docstring): # Constructor and destructor done in headers return if args[0] != "cbf_handle handle": # Must be for cbfhandle - print "problem",cfunc,pyfunc,args + print("problem",cfunc,pyfunc,args) return if len(args)==1: # Only takes CBFhandle arg code+= docstringwrite(pyfunc,[],[],prototype,docstring) @@ -2511,11 +2528,11 @@ def wrap(self,cfunc,prototype,args,docstring): return except KeyError: not_found = 1 - # print "KeyError" + # print("KeyError") except ValueError: - print "problem in",cfunc + print("problem in",cfunc) for item in cbfhandle_specials[cfunc]: - print "***",item + print("***",item) raise if len(args)==2: if args[1].find("const char")>-1 and \ @@ -2582,12 +2599,12 @@ def wrap(self,cfunc,prototype,args,docstring): code+= " void %s(void){\n"%(pyfunc) code +=" cbf_failnez(CBF_NOTIMPLEMENTED);}\n" self.code=self.code+code - print "Have not implemented: cbfhandle.%s"%(pyfunc) - print " ",cfunc - print " args:" + print("Have not implemented: cbfhandle.%s"%(pyfunc)) + print(" ",cfunc) + print(" args:") for a in args: - print " ",a - print + print(" ",a) + print() return @@ -2604,7 +2621,7 @@ def wrap(self,cfunc,prototype,args,docstring): reserved = 0; cbf_failnez(cbf_get_rotation_range (self,reserved, start,increment)); } -""","get_rotation_range",[],["Float start","Float increment"]], +""","get_rotation_range",[],["Float start","Float increment"],], "cbf_rotate_vector":[""" @@ -2670,7 +2687,7 @@ def wrap(self,cfunc,prototype,args,docstring): ""","get_goniometer_poise",["Float ratio"], ["Float vector1","Float vector2","Float vector3", "Float offset1","Float offset2","Float offset3", - "Float angle"]], + "Float angle"],], } @@ -2731,7 +2748,7 @@ def wrap(self,cfunc,prototype,args,docstring): self.code += docstringwrite(pyname,input,output, prototype,docstring)+ code except KeyError: - print "TODO: Goniometer:",prototype + print("TODO: Goniometer:",prototype) def get_code(self): return self.code+self.tail @@ -2840,19 +2857,19 @@ def get_code(self): "cbf_get_detector_surface_axes":[""" - const char * get_detector_surface_axes (int index ){ - const char * axis_id1; - const char * axis_id2; - cbf_failnez(cbf_get_detector_surface_axes(self, - &axis_id1, &axis_id2)); - if (index == 0) return axis_id1; - if (index == 1) return axis_id2; - return "."; - } - - - ""","cbf_get_detector_surface_axes", ["Integer index" ], - ["String" ] ], + const char * get_detector_surface_axes (int index ){ + const char * axis_id1; + const char * axis_id2; + cbf_failnez(cbf_get_detector_surface_axes(self, + &axis_id1, &axis_id2)); + if (index == 0) return axis_id1; + if (index == 1) return axis_id2; + return "."; + } + + +""","cbf_get_detector_surface_axes", ["Integer index" ], + ["String" ] ], "cbf_get_pixel_area":[""" @@ -2893,7 +2910,7 @@ def get_code(self): void get_detector_distance (double *distance){ cbf_failnez(cbf_get_detector_distance(self,distance)); } -""","get_detector_distance",[],["double distance"]], +""","get_detector_distance",[],["double distance"],], "cbf_get_detector_normal":[""" @@ -2905,7 +2922,7 @@ def get_code(self): normal1, normal2, normal3)); } ""","get_detector_normal",[], -["double normal1", "double normal2", "double normal3"]], +["double normal1", "double normal2", "double normal3"],], "cbf_get_pixel_coordinates":[""" @@ -2957,7 +2974,7 @@ def get_code(self): center1, center2)); } ""","get_beam_center",[], -["double index1", "double index2", "double center1","double center2"]], +["double index1", "double index2", "double center1","double center2"],], "cbf_get_beam_center_fs":[""" @@ -2965,11 +2982,11 @@ def get_code(self): double *centerfast,double *centerslow}; void get_beam_center_fs(double *indexfast, double *indexslow, double *centerfast,double *centerslow){ - cbf_failnez(cbf_get_beam_center_fs(self, indexfast, indexslow, + cbf_failnez(cbf_get_beam_center_fs(self, indexfast, indexslow, centerfast, centerslow)); } ""","get_beam_center_fs",[], -["double indexfast", "double indexslow", "double centerfast","double centerslow"]], +["double indexfast", "double indexslow", "double centerfast","double centerslow"],], "cbf_get_beam_center_sf":[""" @@ -2981,7 +2998,7 @@ def get_code(self): centerslow, centerfast)); } ""","get_beam_center_sf",[], -["double indexslow", "double indexfast", "double centerslow","double centerfast"]], +["double indexslow", "double indexfast", "double centerslow","double centerfast"],], "cbf_set_beam_center":[""" @@ -2991,7 +3008,7 @@ def get_code(self): centerslow, centerfast)); } ""","set_beam_center", -["double indexslow", "double indexfast", "double centerslow","double centerfast"],[]], +["double indexslow", "double indexfast", "double centerslow","double centerfast"],[],], "cbf_set_beam_center_fs":[""" @@ -3001,7 +3018,7 @@ def get_code(self): centerfast, centerslow)); } ""","set_beam_center_fs", -["double indexfast", "double indexslow", "double centerfast","double centerslow"],[]], +["double indexfast", "double indexslow", "double centerfast","double centerslow"],[],], "cbf_set_beam_center_sf":[""" @@ -3011,7 +3028,7 @@ def get_code(self): centerslow, centerfast)); } ""","set_beam_center_sf", -["double indexslow", "double indexfast", "double centerslow","double centerfast"],[]], +["double indexslow", "double indexfast", "double centerslow","double centerfast"],[],], "cbf_set_reference_beam_center":[""" @@ -3021,7 +3038,7 @@ def get_code(self): centerslow, centerfast)); } ""","set_reference_beam_center", -["double indexslow", "double indexfast", "double centerslow","double centerfast"],[]], +["double indexslow", "double indexfast", "double centerslow","double centerfast"],[],], "cbf_set_reference_beam_center_fs":[""" @@ -3031,7 +3048,7 @@ def get_code(self): centerfast, centerslow)); } ""","set_reference_beam_center_fs", -["double indexfast", "double indexslow", "double centerfast","double centerslow"],[]], +["double indexfast", "double indexslow", "double centerfast","double centerslow"],[],], "cbf_set_reference_beam_center_sf":[""" @@ -3041,7 +3058,7 @@ def get_code(self): centerslow, centerfast)); } ""","set_reference_beam_center_sf", -["double indexslow", "double indexfast", "double centerslow","double centerfast"],[]], +["double indexslow", "double indexfast", "double centerslow","double centerfast"],[],], "cbf_get_inferred_pixel_size" : [""" @@ -3116,7 +3133,7 @@ def wrap(self,cfunc,prototype,args,docstring): self.code += docstringwrite(pyname,input,output, prototype,docstring)+ code except KeyError: - print "TODO: Detector:",prototype + print("TODO: Detector:",prototype) def get_code(self): return self.code+self.tail @@ -3171,7 +3188,7 @@ def wrap(self,cfunc,prototype,args,docstring): self.code += docstringwrite(pyname,input,output, prototype,docstring)+ code except KeyError: - print "TODO: Positioner:",prototype + print("TODO: Positioner:",prototype) def get_code(self): return self.code+self.tail @@ -3192,7 +3209,7 @@ def get_code(self): *bo = bot; } } -""","get_local_integer_byte_order",[],["char **bo", "int *bolen"]], +""","get_local_integer_byte_order",[],["char **bo", "int *bolen"],], "cbf_get_local_real_format":[""" @@ -3208,7 +3225,7 @@ def get_code(self): *rf = rft; } } -""","get_local_real_format",[],["char **rf", "int *rflen"]], +""","get_local_real_format",[],["char **rf", "int *rflen"],], "cbf_get_local_real_byte_order":[""" @@ -3224,7 +3241,7 @@ def get_code(self): *bo = bot; } } -""","get_local_real_byte_order",[],["char **bo", "int *bolen"]], +""","get_local_real_byte_order",[],["char **bo", "int *bolen"],], "cbf_compute_cell_volume":[""" @@ -3235,7 +3252,7 @@ def get_code(self): cbf_failnez(cbf_compute_cell_volume(cell,volume)); } } -""","compute_cell_volume",["double cell[6]"],["Float volume"]], +""","compute_cell_volume",["double cell[6]"],["Float volume"],], "cbf_compute_reciprocal_cell":[""" @@ -3314,11 +3331,11 @@ def wrap(self,cfunc,prototype,args,docstring): return except KeyError: not_found = 1 - # print "KeyError" + # print("KeyError") except ValueError: - print "problem in generic",cfunc + print("problem in generic",cfunc) for item in cbfgeneric_specials[cfunc]: - print "***",item + print("***",item) raise if len(args)==1 and args[0].find("char")>-1 and \ args[0].find("**")>-1 :# return string @@ -3337,10 +3354,10 @@ def wrap(self,cfunc,prototype,args,docstring): # code+= " void %s(void){\n"%(pyfunc) # code +=" cbf_failnez(CBF_NOTIMPLEMENTED);}\n" # self.code=self.code+code - print "Have not implemented:" + print("Have not implemented:") for s in [cfunc, pyfunc] + args: - print "\t",s - print + print("\t",s) + print() return @@ -3348,22 +3365,22 @@ def wrap(self,cfunc,prototype,args,docstring): def generate_wrappers(name_dict): - names = name_dict.keys() + names = list(name_dict.keys()) for cname in names: prototype = name_dict[cname][0] docstring = name_dict[cname][1] - # print "Generate wrappers: ", "::",cname,"::", prototype,"::", docstring + # print("Generate wrappers: ", "::",cname,"::", prototype,"::", docstring) # Check prototype begins with "int cbf_" if prototype.find("int cbf_")!=0: - print "problem with:",prototype + print("problem with:",prototype) # Get arguments from prototypes try: args = prototype.split("(")[1].split(")")[0].split(",") args = [ s.lstrip().rstrip() for s in args ] # strip spaces off ends - # print "Args: ", args + # print("Args: ", args) except: - # print cname - # print prototype + # print(cname) + # print(prototype) raise if args[0].find("cbf_handle")>=0: # This is for the cbfhandle object cbf_handle_wrapper.wrap(cname,prototype,args,docstring) @@ -3395,5 +3412,5 @@ def generate_wrappers(name_dict): open("cbfhandlewrappers.i","w").write(cbf_handle_wrapper.get_code()) open("cbfgenericwrappers.i","w").write(generic_wrapper.get_code()) -print "End of output from make_pycbf.py" -print "\\end{verbatim}" +print("End of output from make_pycbf.py") +print("\\end{verbatim}") diff --git a/pycbf/make_pycbf.w b/pycbf/make_pycbf.w index 018f92f5..e3a14f41 100644 --- a/pycbf/make_pycbf.w +++ b/pycbf/make_pycbf.w @@ -66,11 +66,11 @@ The program that does the conversion from CBFlib.txt to the SWIG input files is a python script named make\_pycbf.py. -@O make_pycbf.py +@o make_pycbf.py -i -t @{ -print "\\begin{verbatim}" -print "This output comes from make_pycbf.py which generates the wrappers" -print "pycbf Copyright (C) 2005 Jonathan Wright, no warranty, LGPL" +print("\\begin{verbatim}") +print("This output comes from make_pycbf.py which generates the wrappers") +print("pycbf Copyright (C) 2005 Jonathan Wright, no warranty, LGPL") ###################################################################### @@ -153,12 +153,12 @@ while i=0: # We found a function # keep going up to DESCRIPTION prototypes+=""+lines[i].rstrip()+" " - # print lines[i].rstrip() + # print(lines[i].rstrip()) check=0 while lines[i+1].find("DESCRIPTION")==-1 and lines[i+1].find("int cbf_")==-1: i=i+1 prototypes+=lines[i].rstrip()+" " # lose the \n - # print lines[i].rstrip() + # print(lines[i].rstrip()) check+=1 if check>50: raise Exception("Runaway prototype "+prototypes) @@ -186,16 +186,16 @@ while i=0 or \ line.find("--------")>=0: if len(docstring)>0: - # print "Prototypes: ",prototypes + # print("Prototypes: ",prototypes) docstring = docstring.replace("\"", " \\\"") # escape the quotes for prototype in prototypes.strip().split(";")[:-1]: name = prototype.split("(")[0].strip() cname = name.split()[1].strip() prototype = prototype.strip()+";" name_dict[cname]=[prototype,docstring] - # print "Prototype: ","::",cname,"::",name,"::", prototype + # print("Prototype: ","::",cname,"::",name,"::", prototype) prototypes = "" - # print "Found ",prototype + # print("Found ",prototype) docstring="\n" prototype="" cname="" @@ -283,7 +283,7 @@ cbfhandle_specials = { } ""","get_integerarrayparameters",[],["int compression","int binary_id", "int elsize", "int elsigned", "int elunsigned", - "int elements", "int minelement", "int maxelement"]], + "int elements", "int minelement", "int maxelement"],], "cbf_get_integerarrayparameters_wdims":[""" @@ -323,7 +323,7 @@ cbfhandle_specials = { ""","get_integerarrayparameters_wdims",[],["int compression","int binary_id", "int elsize", "int elsigned", "int elunsigned", "int elements", "int minelement", "int maxelement", "char **bo", "int *bolen", - "int dimfast", "int dimmid", "int dimslow", "int padding"]], + "int dimfast", "int dimmid", "int dimslow", "int padding"],], "cbf_get_integerarrayparameters_wdims_fs":[""" @@ -363,7 +363,7 @@ cbfhandle_specials = { ""","get_integerarrayparameters_wdims_fs",[],["int compression","int binary_id", "int elsize", "int elsigned", "int elunsigned", "int elements", "int minelement", "int maxelement", "char **bo", "int *bolen", - "int dimfast", "int dimmid", "int dimslow", "int padding"]], + "int dimfast", "int dimmid", "int dimslow", "int padding"],], "cbf_get_integerarrayparameters_wdims_sf":[""" @@ -403,7 +403,7 @@ cbfhandle_specials = { ""","get_integerarrayparameters_wdims_sf",[],["int compression","int binary_id", "int elsize", "int elsigned", "int elunsigned", "int elements", "int minelement", "int maxelement", "char **bo", "int *bolen", - "int dimslow", "int dimmid", "int dimfast", "int padding"]], + "int dimslow", "int dimmid", "int dimfast", "int padding"],], "cbf_get_realarrayparameters":[""" @@ -422,7 +422,7 @@ cbfhandle_specials = { *elements = elem; } ""","get_realarrayparameters",[],["int compression","int binary_id", - "int elsize", "int elements"]], + "int elsize", "int elements"],], "cbf_get_realarrayparameters_wdims":[""" @@ -462,7 +462,7 @@ cbfhandle_specials = { ""","get_realarrayparameters_wdims",[],["int compression","int binary_id", "int elsize", "int elements", "char **bo", "int *bolen", - "int dimfast", "int dimmid", "int dimslow", "int padding"]], + "int dimfast", "int dimmid", "int dimslow", "int padding"],], "cbf_get_realarrayparameters_wdims_fs":[""" @@ -502,7 +502,7 @@ cbfhandle_specials = { ""","get_realarrayparameters_wdims_fs",[],["int compression","int binary_id", "int elsize", "int elements", "char **bo", "int *bolen", - "int dimfast", "int dimmid", "int dimslow", "int padding"]], + "int dimfast", "int dimmid", "int dimslow", "int padding"],], "cbf_get_realarrayparameters_wdims_sf":[""" @@ -542,7 +542,7 @@ cbfhandle_specials = { ""","get_realarrayparameters_wdims_sf",[],["int compression","int binary_id", "int elsize", "int elements", "char **bo", "int *bolen", - "int dimslow", "int dimmid", "int dimfast", "int padding"]], + "int dimslow", "int dimmid", "int dimfast", "int padding"],], "cbf_get_integerarray":[""" @@ -550,7 +550,9 @@ cbfhandle_specials = { %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_integerarray_as_string; - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} // Get the length correct void get_integerarray_as_string(char **s, int *slen){ @@ -578,13 +580,13 @@ cbfhandle_specials = { } ""","get_integerarray_as_string",[],["(Binary)String"] ], - "cbf_get_image":[""" // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_image_as_string; - // Get the length correct void get_image_as_string(int element_number, char **s, int *slen, @@ -609,10 +611,11 @@ cbfhandle_specials = { "cbf_get_image_fs":[""" // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_image_fs_as_string; - // Get the length correct void get_image_fs_as_string(int element_number, char **s, int *slen, @@ -637,10 +640,11 @@ cbfhandle_specials = { "cbf_get_image_sf":[""" // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_image_fs_as_string; - // Get the length correct void get_image_sf_as_string(int element_number, char **s, int *slen, @@ -665,10 +669,11 @@ cbfhandle_specials = { "cbf_get_real_image":[""" // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_real_image_as_string; - // Get the length correct void get_real_image_as_string(int element_number, char **s, int *slen, @@ -693,10 +698,11 @@ cbfhandle_specials = { "cbf_get_real_image_fs":[""" // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_real_image_fs_as_string; - // Get the length correct void get_real_image_fs_as_string(int element_number, char **s, int *slen, @@ -721,10 +727,11 @@ cbfhandle_specials = { "cbf_get_real_image_sf":[""" // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_real_image_sf_as_string; - // Get the length correct void get_real_image_sf_as_string(int element_number, char **s, int *slen, @@ -749,10 +756,11 @@ cbfhandle_specials = { "cbf_get_3d_image":[""" // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_3d_image_as_string; - // Get the length correct void get_3d_image_as_string(int element_number, char **s, int *slen, @@ -777,10 +785,11 @@ cbfhandle_specials = { "cbf_get_3d_image_fs":[""" // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_3d_image_fs_as_string; - // Get the length correct void get_3d_image_fs_as_string(int element_number, char **s, int *slen, @@ -805,9 +814,11 @@ cbfhandle_specials = { "cbf_get_3d_image_sf":[""" // Ensure we free the local temporary - %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_3d_image_sf_as_string; +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} // Get the length correct @@ -833,9 +844,11 @@ cbfhandle_specials = { "cbf_get_real_3d_image":[""" // Ensure we free the local temporary - %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_real_3d_image_as_string; +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} // Get the length correct @@ -861,10 +874,11 @@ cbfhandle_specials = { "cbf_get_real_3d_image_fs":[""" // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_real_3d_image_fs_as_string; - // Get the length correct void get_real_3d_image_fs_as_string(int element_number, char **s, int *slen, @@ -888,7 +902,9 @@ cbfhandle_specials = { "cbf_get_real_3d_image_sf":[""" // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_real_3d_image_sf_as_string; @@ -916,10 +932,11 @@ cbfhandle_specials = { "cbf_get_realarray":[""" // Ensure we free the local temporary - +%{ +#define SWIG_PYTHON_STRICT_BYTE_CHAR +%} %cstring_output_allocate_size(char ** s, int *slen, free(*$1)) get_realarray_as_string; - // Get the length correct void get_realarray_as_string(char **s, int *slen){ @@ -970,7 +987,7 @@ cbfhandle_specials = { } ""","set_integerarray", [ "int compression", "int binary_id","(binary) String data", - "int elsize", "int elsigned","int elements"],[]], + "int elsize", "int elsigned","int elements"],[],], "cbf_set_integerarray_wdims":[""" @@ -1003,7 +1020,7 @@ cbfhandle_specials = { } ""","set_integerarray_wdims", [ "int compression", "int binary_id","(binary) String data", - "int elsize", "int elsigned", "int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]], + "int elsize", "int elsigned", "int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[],], "cbf_set_integerarray_wdims_sf":[""" @@ -1036,7 +1053,7 @@ cbfhandle_specials = { } ""","set_integerarray_wdims_sf", [ "int compression", "int binary_id","(binary) String data", - "int elsize","int elsigned","int elements", "String byteorder", "int dimslow", "int dimmid", "int dimfast", "int padding"],[]], + "int elsize","int elsigned","int elements", "String byteorder", "int dimslow", "int dimmid", "int dimfast", "int padding"],[],], "cbf_set_integerarray_wdims_fs":[""" /* CBFlib must NOT modify the data string nor the byteorder string @@ -1068,7 +1085,7 @@ cbfhandle_specials = { } ""","set_integerarray_wdims_fs", [ "int compression", "int binary_id","(binary) String data", - "int elsize","int elsigned","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]], + "int elsize","int elsigned","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[],], "cbf_set_realarray":[""" @@ -1094,7 +1111,7 @@ cbfhandle_specials = { } ""","set_realarray", [ "int compression", "int binary_id","(binary) String data", - "int elsize","int elements"],[]], + "int elsize","int elements"],[],], "cbf_set_realarray_wdims":[""" @@ -1127,7 +1144,7 @@ cbfhandle_specials = { } ""","set_realarray_wdims", [ "int compression", "int binary_id","(binary) String data", - "int elsize","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]], + "int elsize","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[],], "cbf_set_realarray_wdims_sf":[""" @@ -1160,7 +1177,7 @@ cbfhandle_specials = { } ""","set_realarray_wdims_sf", [ "int compression", "int binary_id","(binary) String data", - "int elsize","int elements", "String byteorder", "int dimslow", "int dimmid", "int dimfast", "int padding"],[]], + "int elsize","int elements", "String byteorder", "int dimslow", "int dimmid", "int dimfast", "int padding"],[],], "cbf_set_realarray_wdims_fs":[""" @@ -1193,7 +1210,7 @@ cbfhandle_specials = { } ""","set_realarray_wdims_fs", [ "int compression", "int binary_id","(binary) String data", - "int elsize","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]], + "int elsize","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[],], "cbf_set_image":[""" @@ -1221,7 +1238,7 @@ cbfhandle_specials = { } ""","set_image", [ "int element_number","int compression","(binary) String data", - "int elsize", "int elsign", "int dimslow", "int dimfast"],[]], + "int elsize", "int elsign", "int dimslow", "int dimfast"],[],], "cbf_set_image_fs":[""" @@ -1249,7 +1266,7 @@ cbfhandle_specials = { } ""","set_image_fs", [ "int element_number","int compression","(binary) String data", - "int elsize", "int elsign", "int dimfast", "int dimslow"],[]], + "int elsize", "int elsign", "int dimfast", "int dimslow"],[],], "cbf_set_image_sf":[""" @@ -1277,7 +1294,7 @@ cbfhandle_specials = { } ""","set_image_sf", [ "int element_number","int compression","(binary) String data", - "int elsize", "int elsign", "int dimslow", "int dimfast"],[]], + "int elsize", "int elsign", "int dimslow", "int dimfast"],[],], "cbf_set_real_image":[""" @@ -1305,7 +1322,7 @@ cbfhandle_specials = { } ""","set_real_image", [ "int element_number","int compression","(binary) String data", - "int elsize", "int dimslow", "int dimfast"],[]], + "int elsize", "int dimslow", "int dimfast"],[],], "cbf_set_real_image_fs":[""" @@ -1333,7 +1350,7 @@ cbfhandle_specials = { } ""","set_real_image_fs", [ "int element_number","int compression","(binary) String data", - "int elsize", "int dimfast", "int dimslow"],[]], + "int elsize", "int dimfast", "int dimslow"],[],], "cbf_set_real_image_sf":[""" @@ -1361,7 +1378,7 @@ cbfhandle_specials = { } ""","set_real_image_sf", [ "int element_number","int compression","(binary) String data", - "int elsize", "int dimslow", "int dimfast"],[]], + "int elsize", "int dimslow", "int dimfast"],[],], "cbf_set_3d_image":[""" @@ -1389,7 +1406,7 @@ cbfhandle_specials = { } ""","set_3d_image", [ "int element_number","int compression","(binary) String data", - "int elsize", "int elsign", "int dimslow", "int dimmid", "int dimfast"],[]], + "int elsize", "int elsign", "int dimslow", "int dimmid", "int dimfast"],[],], "cbf_set_3d_image_fs":[""" @@ -1417,7 +1434,7 @@ cbfhandle_specials = { } ""","set_3d_image_fs", [ "int element_number","int compression","(binary) String data", - "int elsize", "int elsign", "int dimfast", "int dimmid", "int dimslow"],[]], + "int elsize", "int elsign", "int dimfast", "int dimmid", "int dimslow"],[],], "cbf_set_3d_image_sf":[""" @@ -1445,7 +1462,7 @@ cbfhandle_specials = { } ""","set_3d_image_sf", [ "int element_number","int compression","(binary) String data", - "int elsize", "int elsign", "int dimslow", "int dimmid", "int dimfast"],[]], + "int elsize", "int elsign", "int dimslow", "int dimmid", "int dimfast"],[],], "cbf_set_real_3d_image":[""" @@ -1473,7 +1490,7 @@ cbfhandle_specials = { } ""","set_real_3d_image", [ "int element_number","int compression","(binary) String data", - "int elsize", "int dimslow", "int dimmid", "int dimfast"],[]], + "int elsize", "int dimslow", "int dimmid", "int dimfast"],[],], "cbf_set_real_3d_image_fs":[""" @@ -1501,7 +1518,7 @@ cbfhandle_specials = { } ""","set_real_3d_image_fs", [ "int element_number","int compression","(binary) String data", - "int elsize", "int dimfast", "int dimmid", "int dimslow"],[]], + "int elsize", "int dimfast", "int dimmid", "int dimslow"],[],], "cbf_set_real_3d_image_sf":[""" @@ -1529,7 +1546,7 @@ cbfhandle_specials = { } ""","set_real_3d_image_sf", [ "int element_number","int compression","(binary) String data", - "int elsize", "int dimslow", "int dimmid", "int dimfast"],[]], + "int elsize", "int dimslow", "int dimmid", "int dimfast"],[],], "cbf_get_image_size": [""" @@ -1542,7 +1559,7 @@ cbfhandle_specials = { *ndimslow = (int)inslow; *ndimfast = (int)infast; } -""","get_image_size",["Integer element_number"],["size_t ndim1","size_t ndim2"]], +""","get_image_size",["Integer element_number"],["size_t ndim1","size_t ndim2"],], "cbf_get_image_size_fs": [""" @@ -1555,7 +1572,7 @@ cbfhandle_specials = { *ndimfast = (int)infast; /* FIXME - is that how to convert? */ *ndimslow = (int)inslow; } -""","get_image_size_fs",["Integer element_number"],["size_t ndimfast","size_t ndimslow"]], +""","get_image_size_fs",["Integer element_number"],["size_t ndimfast","size_t ndimslow"],], "cbf_get_image_size_sf": [""" @@ -1568,7 +1585,7 @@ cbfhandle_specials = { *ndimslow = (int)inslow; *ndimfast = (int)infast; } -""","get_image_size_sf",["Integer element_number"],["size_t ndimslow","size_t ndimfast"]], +""","get_image_size_sf",["Integer element_number"],["size_t ndimslow","size_t ndimfast"],], "cbf_get_3d_image_size": [""" @@ -1582,7 +1599,7 @@ cbfhandle_specials = { *ndimmid = (int)inmid; *ndimfast = (int)infast; } -""","get_3d_image_size",["Integer element_number"],["size_t ndimslow","size_t ndimmid","size_t ndimfast"]], +""","get_3d_image_size",["Integer element_number"],["size_t ndimslow","size_t ndimmid","size_t ndimfast"],], "cbf_get_3d_image_size_fs": [""" @@ -1596,7 +1613,7 @@ cbfhandle_specials = { *ndimmid = (int)inmid; *ndimfast = (int)infast; } -""","get_3d_image_size",["Integer element_number"],["size_t ndimfast","size_t ndimmid","size_t ndimslow"]], +""","get_3d_image_size",["Integer element_number"],["size_t ndimfast","size_t ndimmid","size_t ndimslow"],], "cbf_get_3d_image_size_sf": [""" @@ -1610,7 +1627,7 @@ cbfhandle_specials = { *ndimmid = (int)inmid; *ndimfast = (int)infast; } -""","get_3d_image_size_sf",["Integer element_number"],["size_t ndimslow","size_t ndimmid","size_t ndimfast"]], +""","get_3d_image_size_sf",["Integer element_number"],["size_t ndimslow","size_t ndimmid","size_t ndimfast"],], "cbf_get_pixel_size" : [""" @@ -1661,7 +1678,7 @@ cbfhandle_specials = { psize)); } ""","set_pixel_size", - ["Int element_number","Int axis_number","Float pixel size"],[]], + ["Int element_number","Int axis_number","Float pixel size"],[],], "cbf_set_pixel_size_fs":[""" @@ -1673,7 +1690,7 @@ cbfhandle_specials = { psize)); } ""","set_pixel_size_fs", - ["Int element_number","Int axis_number","Float pixel size"],[]], + ["Int element_number","Int axis_number","Float pixel size"],[],], "cbf_set_pixel_size_sf":[""" @@ -1685,11 +1702,11 @@ cbfhandle_specials = { psize)); } ""","set_pixel_size_sf", - ["Int element_number","Int axis_number","Float pixel size"],[]], + ["Int element_number","Int axis_number","Float pixel size"],[],], "cbf_write_file" : [""" - void write_file(const char* filename, int ciforcbf, int headers, + void write_file(char* filename, int ciforcbf, int headers, int encoding){ FILE *stream; int readable; @@ -1705,11 +1722,11 @@ cbfhandle_specials = { } } ""","write_file",["String filename","Integer ciforcbf","Integer Headers", - "Integer encoding"],[]], + "Integer encoding"],[],], "cbf_write_widefile" : [""" - void write_widefile(const char* filename, int ciforcbf, int headers, + void write_widefile(char* filename, int ciforcbf, int headers, int encoding){ FILE *stream; int readable; @@ -1726,7 +1743,7 @@ cbfhandle_specials = { } } ""","write_widefile",["String filename","Integer ciforcbf","Integer Headers", - "Integer encoding"],[]], + "Integer encoding"],[],], "cbf_read_template":[""" @@ -1741,7 +1758,7 @@ cbfhandle_specials = { cbf_failnez(cbf_read_template (self, stream)); } } -""","read_template",["String filename"],[]], +""","read_template",["String filename"],[],], "cbf_read_file" : [""" @@ -1756,7 +1773,7 @@ cbfhandle_specials = { cbf_failnez(cbf_read_file(self, stream, headers)); } } -""","read_file",["String filename","Integer headers"],[]], +""","read_file",["String filename","Integer headers"],[],], @@ -1772,13 +1789,13 @@ cbfhandle_specials = { cbf_failnez(cbf_read_widefile(self, stream, headers)); } } -""","read_widefile",["String filename","Integer headers"],[]], +""","read_widefile",["String filename","Integer headers"],[],], "cbf_set_doublevalue":[""" void set_doublevalue(const char *format, double number){ cbf_failnez(cbf_set_doublevalue(self,format,number));} -""","set_doublevalue",["String format","Float number"],[]], +""","set_doublevalue",["String format","Float number"],[],], "cbf_require_integervalue":[""" @@ -1789,7 +1806,7 @@ cbfhandle_specials = { cbf_failnez(cbf_require_integervalue(self,number,thedefault)); } -""","require_integervalue", ["Int thedefault"],["Int number"]], +""","require_integervalue", ["Int thedefault"],["Int number"],], "cbf_require_doublevalue":[""" @@ -1797,7 +1814,7 @@ cbfhandle_specials = { void require_doublevalue(double *number, double defaultvalue){ cbf_failnez(cbf_require_doublevalue(self,number,defaultvalue)); } -""","require_doublevalue",["Float Default"],["Float Number"]], +""","require_doublevalue",["Float Default"],["Float Number"],], "cbf_require_column_value":[""" @@ -1809,7 +1826,7 @@ void require_doublevalue(double *number, double defaultvalue){ return result; } ""","require_column_value", - ["String columnnanme","String Default"],["String Name"]], + ["String columnnanme","String Default"],["String Name"],], "cbf_require_column_doublevalue":[""" @@ -1820,7 +1837,7 @@ void require_column_doublevalue(const char *columnname, double * number, columnname,number,defaultvalue)); } ""","require_column_doublevalue",["String columnname","Float Value"], - ["Float defaultvalue"]], + ["Float defaultvalue"],], "cbf_require_column_integervalue":[""" @@ -1831,7 +1848,7 @@ void require_column_integervalue(const char *columnname, columnname, number,defaultvalue)); } ""","require_column_integervalue",["String Columnvalue","Int default"], - ["Int Value"]], + ["Int Value"],], @@ -1852,7 +1869,7 @@ void require_column_integervalue(const char *columnname, cbf_failnez(cbf_require_diffrn_id(self,&id,defaultid)); return id; } -""","require_diffrn_id", ["String Default_id"],["String diffrn_id"]], +""","require_diffrn_id", ["String Default_id"],["String diffrn_id"],], @@ -1863,7 +1880,7 @@ void require_column_integervalue(const char *columnname, cbf_failnez(cbf_get_polarization (self, in1, in2)); } ""","get_polarization",[], - ["float polarizn_source_ratio","float polarizn_source_norm"]], + ["float polarizn_source_ratio","float polarizn_source_norm"],], "cbf_set_polarization":[""" @@ -1874,7 +1891,7 @@ void require_column_integervalue(const char *columnname, polarizn_source_norm)); } ""","set_polarization", - ["Float polarizn_source_ratio","Float polarizn_source_norm"],[]], + ["Float polarizn_source_ratio","Float polarizn_source_norm"],[],], "cbf_get_divergence":[""" @@ -1888,7 +1905,7 @@ void require_column_integervalue(const char *columnname, div_x_y_source)); } ""","get_divergence",[], - ["Float div_x_source","Float div_y_source","Float div_x_y_source"]], + ["Float div_x_source","Float div_y_source","Float div_x_y_source"],], "cbf_set_divergence":[""" @@ -1898,7 +1915,7 @@ void require_column_integervalue(const char *columnname, div_y_source,div_x_y_source)); } ""","set_divergence", - ["Float div_x_source","Float div_y_source","Float div_x_y_source"],[]], + ["Float div_x_source","Float div_y_source","Float div_x_y_source"],[],], "cbf_get_gain":[""" %apply double *OUTPUT {double *gain, double *gain_esd} get_gain; @@ -1907,14 +1924,14 @@ void require_column_integervalue(const char *columnname, cbf_failnez(cbf_get_gain (self, element_number, gain, gain_esd)); } ""","get_gain", - [],["Float gain", "Float gain_esd"]], + [],["Float gain", "Float gain_esd"],], "cbf_set_gain":[""" void set_gain (unsigned int element_number, double gain, double gain_esd){ cbf_failnez(cbf_set_gain (self, element_number, gain, gain_esd)); } -""","set_gain",["Float gain", "Float gain_esd"],[]], +""","set_gain",["Float gain", "Float gain_esd"],[],], "cbf_get_element_id":[""" const char * get_element_id(unsigned int element_number){ @@ -1922,7 +1939,7 @@ void require_column_integervalue(const char *columnname, cbf_failnez(cbf_get_element_id (self, element_number, &result)); return result; } -""","get_element_id", ["Integer element_number"],["String"]], +""","get_element_id", ["Integer element_number"],["String"],], @@ -1935,7 +1952,7 @@ void require_column_integervalue(const char *columnname, axis_id,start,increment)); } ""","set_axis_setting",["String axis_id", "Float start", "Float increment"], - []], + [],], @@ -2064,7 +2081,7 @@ void require_column_integervalue(const char *columnname, year,month,day,hour,minute,second,timezone)); } ""","get_datestamp",[],["int year", "int month", "int day", "int hour", -"int minute", "double second", "int timezone"]], +"int minute", "double second", "int timezone"],], @@ -2078,7 +2095,7 @@ void require_column_integervalue(const char *columnname, year,month,day,hour,minute,second,timezone,precision)); } ""","set_datestamp",["int year", "int month", "int day", "int hour", -"int minute", "double second", "int timezone","Float precision"],[]], +"int minute", "double second", "int timezone","Float precision"],[],], "cbf_get_timestamp":[""" @@ -2089,7 +2106,7 @@ void require_column_integervalue(const char *columnname, reserved = 0; cbf_failnez(cbf_get_timestamp(self,reserved,time,timezone)); } -""","get_timestamp",[],["Float time","Integer timezone"]], +""","get_timestamp",[],["Float time","Integer timezone"],], @@ -2099,7 +2116,7 @@ void require_column_integervalue(const char *columnname, reserved = 0; cbf_failnez(cbf_set_timestamp(self,reserved,time,timezone,precision)); } -""","set_timestamp",["Float time","Integer timezone","Float precision"],[]], +""","set_timestamp",["Float time","Integer timezone","Float precision"],[],], "cbf_set_current_timestamp":[""" @@ -2108,7 +2125,7 @@ void require_column_integervalue(const char *columnname, reserved = 0; cbf_failnez(cbf_set_current_timestamp(self,reserved,timezone)); } -""","set_current_timestamp",["Integer timezone"],[]], +""","set_current_timestamp",["Integer timezone"],[],], @@ -2117,13 +2134,13 @@ void require_column_integervalue(const char *columnname, void get_overload(unsigned int element_number, double *overload){ cbf_failnez(cbf_get_overload(self,element_number,overload)); } -""","get_overload",["Integer element_number"],["Float overload"]], +""","get_overload",["Integer element_number"],["Float overload"],], "cbf_set_overload":[""" void set_overload(unsigned int element_number, double overload){ cbf_failnez(cbf_set_overload(self,element_number,overload)); } -""","set_overload",["Integer element_number","Float overload"],[]], +""","set_overload",["Integer element_number","Float overload"],[],], "cbf_set_integration_time":[""" @@ -2132,7 +2149,7 @@ void require_column_integervalue(const char *columnname, reserved = 0; cbf_failnez(cbf_set_integration_time(self,reserved,time)); } -""","set_integration_time",["Float time"],[]], +""","set_integration_time",["Float time"],[],], @@ -2145,7 +2162,7 @@ void require_column_integervalue(const char *columnname, cbf_failnez(cbf_get_integration_time(self,reserved,&tim)); *time = tim; } -""","get_integration_time",[],["Float time"]], +""","get_integration_time",[],["Float time"],], "cbf_get_orientation_matrix":[""" %apply double *OUTPUT {double *m0,double *m1,double *m2, @@ -2288,7 +2305,7 @@ const char* require_tag_root(const char* tagname){ cbf_failnez(cbf_require_tag_root(self,tagname,&result)); return result; } -""","require_tag_root",["String tagname"],["String tagroot"]], +""","require_tag_root",["String tagname"],["String tagroot"],], "cbf_find_tag_root":[""" const char * find_tag_root(const char* tagname){ @@ -2296,20 +2313,20 @@ const char * find_tag_root(const char* tagname){ cbf_failnez(cbf_find_tag_root(self,tagname,&result)); return result; } -""","find_tag_root",["String tagname"],["String tagroot"]], +""","find_tag_root",["String tagname"],["String tagroot"],], "cbf_set_tag_root":[""" void set_tag_root(const char* tagname, const char* tagroot_in){ cbf_failnez(cbf_set_tag_root(self,tagname,tagroot_in)); } -""","set_tag_root",["String tagname","String tagroot_in"],[]], +""","set_tag_root",["String tagname","String tagroot_in"],[],], "cbf_set_category_root":[""" void set_category_root(const char* categoryname, const char* categoryroot){ cbf_failnez(cbf_set_category_root(self,categoryname,categoryroot)); } -""","set_category_root",["String categoryname","String categoryroot"],[]], +""","set_category_root",["String categoryname","String categoryroot"],[],], "cbf_find_category_root":[""" @@ -2318,7 +2335,7 @@ const char* find_category_root(const char* categoryname){ cbf_failnez(cbf_find_category_root(self,categoryname,&result)); return result; } -""","find_category_root",["String categoryname"],["String categoryroot"]], +""","find_category_root",["String categoryname"],["String categoryroot"],], @@ -2331,7 +2348,7 @@ const char* require_category_root (const char* categoryname){ cbf_failnez(cbf_require_category_root(self,categoryname, &result)); return result; } -""","cbf_require_category_root",["String Categoryname"],["String categoryroot"]], +""","cbf_require_category_root",["String Categoryname"],["String categoryroot"],], "cbf_set_orientation_matrix":[""" @@ -2345,7 +2362,7 @@ double m7,double m8){ cbf_failnez(cbf_get_orientation_matrix(self,m)); } ""","set_orientation_matrix", - [ "Float matrix_%d"%(ind) for ind in range(9) ] ,[]], + [ "Float matrix_%d"%(ind) for ind in range(9) ] ,[],], "cbf_set_bin_sizes":[""" void set_bin_sizes( int element_number, double slowbinsize_in, double fastbinsize_in) { @@ -2372,7 +2389,7 @@ cbf_handle require_dictionary(){ cbf_failnez(cbf_require_dictionary(self,&temp)); return temp; } -""","require_dictionary",[],["CBFHandle dictionary"]], +""","require_dictionary",[],["CBFHandle dictionary"],], "cbf_get_dictionary":[""" @@ -2381,7 +2398,7 @@ cbf_handle get_dictionary(){ cbf_failnez(cbf_get_dictionary(self,&temp)); return temp; } -""","get_dictionary",[],["CBFHandle dictionary"]], +""","get_dictionary",[],["CBFHandle dictionary"],], @@ -2389,7 +2406,7 @@ cbf_handle get_dictionary(){ void set_dictionary(cbf_handle other){ cbf_failnez(cbf_set_dictionary(self,other)); } -""","set_dictionary",["CBFHandle dictionary"],[]], +""","set_dictionary",["CBFHandle dictionary"],[],], @@ -2397,7 +2414,7 @@ void set_dictionary(cbf_handle other){ void convert_dictionary(cbf_handle other){ cbf_failnez(cbf_convert_dictionary(self,other)); } -""","convert_dictionary",["CBFHandle dictionary"],[]], +""","convert_dictionary",["CBFHandle dictionary"],[],], "cbf_construct_detector":[""" @@ -2406,7 +2423,7 @@ void convert_dictionary(cbf_handle other){ cbf_failnez(cbf_construct_detector(self,&detector,element_number)); return detector; } -""","construct_detector",["Integer element_number"],["pycbf detector object"]], +""","construct_detector",["Integer element_number"],["pycbf detector object"],], "cbf_construct_reference_detector":[""" cbf_detector construct_reference_detector(unsigned int element_number){ @@ -2414,7 +2431,7 @@ void convert_dictionary(cbf_handle other){ cbf_failnez(cbf_construct_reference_detector(self,&detector,element_number)); return detector; } -""","construct_reference_detector",["Integer element_number"],["pycbf detector object"]], +""","construct_reference_detector",["Integer element_number"],["pycbf detector object"],], "cbf_require_reference_detector":[""" cbf_detector require_reference_detector(unsigned int element_number){ @@ -2422,7 +2439,7 @@ void convert_dictionary(cbf_handle other){ cbf_failnez(cbf_require_reference_detector(self,&detector,element_number)); return detector; } -""","require_reference_detector",["Integer element_number"],["pycbf detector object"]], +""","require_reference_detector",["Integer element_number"],["pycbf detector object"],], "cbf_construct_goniometer":[""" @@ -2431,7 +2448,7 @@ void convert_dictionary(cbf_handle other){ cbf_failnez(cbf_construct_goniometer(self,&goniometer)); return goniometer; } -""","construct_goniometer",[],["pycbf goniometer object"]], +""","construct_goniometer",[],["pycbf goniometer object"],], "cbf_construct_positioner":[""" cbf_positioner construct_positioner(const char* axis_id){ @@ -2439,7 +2456,7 @@ void convert_dictionary(cbf_handle other){ cbf_failnez(cbf_construct_positioner(self,&positioner,axis_id)); return positioner; } -""","construct_positioner",["String axis_id"],["pycbf positioner object"]], +""","construct_positioner",["String axis_id"],["pycbf positioner object"],], "cbf_construct_reference_positioner":[""" cbf_positioner construct_reference_positioner(const char* axis_id){ @@ -2447,7 +2464,7 @@ void convert_dictionary(cbf_handle other){ cbf_failnez(cbf_construct_reference_positioner(self,&positioner,axis_id)); return positioner; } -""","construct_reference_positioner",["String axis_id"],["pycbf positioner object"]], +""","construct_reference_positioner",["String axis_id"],["pycbf positioner object"],], "cbf_get_axis_reference_poise":[""" %apply double *OUTPUT {double *vector1, double *vector2, double *vector3, @@ -2464,7 +2481,7 @@ void convert_dictionary(cbf_handle other){ ""","get_axis_reference_poise",["String axis_id"], ["Float vector1","Float vector2","Float vector3", - "Float offset1","Float offset2","Float offset3"]], + "Float offset1","Float offset2","Float offset3"],], "cbf_get_axis_poise":[""" %apply double *OUTPUT {double *vector1, double *vector2, double *vector3, @@ -2484,7 +2501,7 @@ void convert_dictionary(cbf_handle other){ ""","get_axis_poise", ["Float ratio", "String axis_id", "String frame_id"], ["Float vector1","Float vector2","Float vector3", - "Float offset1","Float offset2","Float offset3","Float angle"]], + "Float offset1","Float offset2","Float offset3","Float angle"],], } @@ -2550,7 +2567,7 @@ typedef cbf_handle_struct handle; def get_code(self): return self.code+self.tail def wrap(self,cfunc,prototype,args,docstring): - # print "cfunc: ", cfunc + # print("cfunc: ", cfunc) pyfunc = cfunc.replace("cbf_","") # Insert a comment for debugging this script code = "\n/* cfunc %s pyfunc %s \n"%(cfunc,pyfunc) @@ -2562,7 +2579,7 @@ typedef cbf_handle_struct handle; # Constructor and destructor done in headers return if args[0] != "cbf_handle handle": # Must be for cbfhandle - print "problem",cfunc,pyfunc,args + print("problem",cfunc,pyfunc,args) return if len(args)==1: # Only takes CBFhandle arg code+= docstringwrite(pyfunc,[],[],prototype,docstring) @@ -2580,11 +2597,11 @@ typedef cbf_handle_struct handle; return except KeyError: not_found = 1 - # print "KeyError" + # print("KeyError") except ValueError: - print "problem in",cfunc + print("problem in",cfunc) for item in cbfhandle_specials[cfunc]: - print "***",item + print("***",item) raise if len(args)==2: if args[1].find("const char")>-1 and \ @@ -2651,12 +2668,12 @@ typedef cbf_handle_struct handle; code+= " void %s(void){\n"%(pyfunc) code +=" cbf_failnez(CBF_NOTIMPLEMENTED);}\n" self.code=self.code+code - print "Have not implemented: cbfhandle.%s"%(pyfunc) - print " ",cfunc - print " args:" + print("Have not implemented: cbfhandle.%s"%(pyfunc)) + print(" ",cfunc) + print(" args:") for a in args: - print " ",a - print + print(" ",a) + print() return @@ -2673,7 +2690,7 @@ cbf_goniometer_specials = { reserved = 0; cbf_failnez(cbf_get_rotation_range (self,reserved, start,increment)); } -""","get_rotation_range",[],["Float start","Float increment"]], +""","get_rotation_range",[],["Float start","Float increment"],], "cbf_rotate_vector":[""" @@ -2739,7 +2756,7 @@ void get_rotation_axis (double *vector1, double *vector2, double *vector3){ ""","get_goniometer_poise",["Float ratio"], ["Float vector1","Float vector2","Float vector3", "Float offset1","Float offset2","Float offset3", - "Float angle"]], + "Float angle"],], } @@ -2800,7 +2817,7 @@ typedef cbf_positioner_struct *cbf_goniometer; self.code += docstringwrite(pyname,input,output, prototype,docstring)+ code except KeyError: - print "TODO: Goniometer:",prototype + print("TODO: Goniometer:",prototype) def get_code(self): return self.code+self.tail @@ -2962,7 +2979,7 @@ cbf_detector_specials = { void get_detector_distance (double *distance){ cbf_failnez(cbf_get_detector_distance(self,distance)); } -""","get_detector_distance",[],["double distance"]], +""","get_detector_distance",[],["double distance"],], "cbf_get_detector_normal":[""" @@ -2974,7 +2991,7 @@ cbf_detector_specials = { normal1, normal2, normal3)); } ""","get_detector_normal",[], -["double normal1", "double normal2", "double normal3"]], +["double normal1", "double normal2", "double normal3"],], "cbf_get_pixel_coordinates":[""" @@ -3026,7 +3043,7 @@ cbf_detector_specials = { center1, center2)); } ""","get_beam_center",[], -["double index1", "double index2", "double center1","double center2"]], +["double index1", "double index2", "double center1","double center2"],], "cbf_get_beam_center_fs":[""" @@ -3038,7 +3055,7 @@ cbf_detector_specials = { centerfast, centerslow)); } ""","get_beam_center_fs",[], -["double indexfast", "double indexslow", "double centerfast","double centerslow"]], +["double indexfast", "double indexslow", "double centerfast","double centerslow"],], "cbf_get_beam_center_sf":[""" @@ -3050,7 +3067,7 @@ cbf_detector_specials = { centerslow, centerfast)); } ""","get_beam_center_sf",[], -["double indexslow", "double indexfast", "double centerslow","double centerfast"]], +["double indexslow", "double indexfast", "double centerslow","double centerfast"],], "cbf_set_beam_center":[""" @@ -3060,7 +3077,7 @@ cbf_detector_specials = { centerslow, centerfast)); } ""","set_beam_center", -["double indexslow", "double indexfast", "double centerslow","double centerfast"],[]], +["double indexslow", "double indexfast", "double centerslow","double centerfast"],[],], "cbf_set_beam_center_fs":[""" @@ -3070,7 +3087,7 @@ cbf_detector_specials = { centerfast, centerslow)); } ""","set_beam_center_fs", -["double indexfast", "double indexslow", "double centerfast","double centerslow"],[]], +["double indexfast", "double indexslow", "double centerfast","double centerslow"],[],], "cbf_set_beam_center_sf":[""" @@ -3080,7 +3097,7 @@ cbf_detector_specials = { centerslow, centerfast)); } ""","set_beam_center_sf", -["double indexslow", "double indexfast", "double centerslow","double centerfast"],[]], +["double indexslow", "double indexfast", "double centerslow","double centerfast"],[],], "cbf_set_reference_beam_center":[""" @@ -3090,7 +3107,7 @@ cbf_detector_specials = { centerslow, centerfast)); } ""","set_reference_beam_center", -["double indexslow", "double indexfast", "double centerslow","double centerfast"],[]], +["double indexslow", "double indexfast", "double centerslow","double centerfast"],[],], "cbf_set_reference_beam_center_fs":[""" @@ -3100,7 +3117,7 @@ cbf_detector_specials = { centerfast, centerslow)); } ""","set_reference_beam_center_fs", -["double indexfast", "double indexslow", "double centerfast","double centerslow"],[]], +["double indexfast", "double indexslow", "double centerfast","double centerslow"],[],], "cbf_set_reference_beam_center_sf":[""" @@ -3110,7 +3127,7 @@ cbf_detector_specials = { centerslow, centerfast)); } ""","set_reference_beam_center_sf", -["double indexslow", "double indexfast", "double centerslow","double centerfast"],[]], +["double indexslow", "double indexfast", "double centerslow","double centerfast"],[],], "cbf_get_inferred_pixel_size" : [""" @@ -3185,7 +3202,7 @@ typedef cbf_detector_struct *cbf_detector; self.code += docstringwrite(pyname,input,output, prototype,docstring)+ code except KeyError: - print "TODO: Detector:",prototype + print("TODO: Detector:",prototype) def get_code(self): return self.code+self.tail @@ -3240,7 +3257,7 @@ typedef cbf_positioner_struct *cbf_positioner; self.code += docstringwrite(pyname,input,output, prototype,docstring)+ code except KeyError: - print "TODO: Positioner:",prototype + print("TODO: Positioner:",prototype) def get_code(self): return self.code+self.tail @@ -3261,7 +3278,7 @@ cbfgeneric_specials = { *bo = bot; } } -""","get_local_integer_byte_order",[],["char **bo", "int *bolen"]], +""","get_local_integer_byte_order",[],["char **bo", "int *bolen"],], "cbf_get_local_real_format":[""" @@ -3277,7 +3294,7 @@ cbfgeneric_specials = { *rf = rft; } } -""","get_local_real_format",[],["char **rf", "int *rflen"]], +""","get_local_real_format",[],["char **rf", "int *rflen"],], "cbf_get_local_real_byte_order":[""" @@ -3293,7 +3310,7 @@ cbfgeneric_specials = { *bo = bot; } } -""","get_local_real_byte_order",[],["char **bo", "int *bolen"]], +""","get_local_real_byte_order",[],["char **bo", "int *bolen"],], "cbf_compute_cell_volume":[""" @@ -3304,7 +3321,7 @@ cbfgeneric_specials = { cbf_failnez(cbf_compute_cell_volume(cell,volume)); } } -""","compute_cell_volume",["double cell[6]"],["Float volume"]], +""","compute_cell_volume",["double cell[6]"],["Float volume"],], "cbf_compute_reciprocal_cell":[""" @@ -3343,12 +3360,12 @@ cbf_failnez(cbf_airy_disk(x,y,cenx,ceny,volume,fwhm,value)); %apply double *OUTPUT {double *volumeout}; %inline { void airy_disk_volume(double xlo, double ylo, double xhi, double yhi, -double cenx, double ceny, double volume, double fwhm, double * volumeout) { -cbf_failnez(cbf_airy_disk_volume(xlo,ylo,xhi,yhi,cenx,ceny,volume,fwhm,volumeout)); +double cenx, double ceny, double volumein, double fwhm, double * volumeout) { +cbf_failnez(cbf_airy_disk_volume(xlo,ylo,xhi,yhi,cenx,ceny,volumein,fwhm,volumeout)); } } -""","airy_disk_volume",["double xlo", "double ylo", "double xhi", "double yhi", "double cenx", "double ceny", "double volume", "double fwhm"], +""","airy_disk_volume",["double xlo", "double ylo", "double xhi", "double yhi", "double cenx", "double ceny", "double volumein", "double fwhm"], ["Float volumeout"] ] @@ -3383,11 +3400,11 @@ class genericwrapper: return except KeyError: not_found = 1 - # print "KeyError" + # print("KeyError") except ValueError: - print "problem in generic",cfunc + print("problem in generic",cfunc) for item in cbfgeneric_specials[cfunc]: - print "***",item + print("***",item) raise if len(args)==1 and args[0].find("char")>-1 and \ args[0].find("**")>-1 :# return string @@ -3406,10 +3423,10 @@ class genericwrapper: # code+= " void %s(void){\n"%(pyfunc) # code +=" cbf_failnez(CBF_NOTIMPLEMENTED);}\n" # self.code=self.code+code - print "Have not implemented:" + print("Have not implemented:") for s in [cfunc, pyfunc] + args: - print "\t",s - print + print("\t",s) + print() return @@ -3417,22 +3434,22 @@ generic_wrapper = genericwrapper() def generate_wrappers(name_dict): - names = name_dict.keys() + names = list(name_dict.keys()) for cname in names: prototype = name_dict[cname][0] docstring = name_dict[cname][1] - # print "Generate wrappers: ", "::",cname,"::", prototype,"::", docstring + # print("Generate wrappers: ", "::",cname,"::", prototype,"::", docstring) # Check prototype begins with "int cbf_" if prototype.find("int cbf_")!=0: - print "problem with:",prototype + print("problem with:",prototype) # Get arguments from prototypes try: args = prototype.split("(")[1].split(")")[0].split(",") args = [ s.lstrip().rstrip() for s in args ] # strip spaces off ends - # print "Args: ", args + # print("Args: ", args) except: - # print cname - # print prototype + # print(cname) + # print(prototype) raise if args[0].find("cbf_handle")>=0: # This is for the cbfhandle object cbf_handle_wrapper.wrap(cname,prototype,args,docstring) @@ -3464,7 +3481,7 @@ open("cbfpositionerwrappers.i","w").write(cbf_positioner_wrapper.get_code()) open("cbfhandlewrappers.i","w").write(cbf_handle_wrapper.get_code()) open("cbfgenericwrappers.i","w").write(generic_wrapper.get_code()) -print "End of output from make_pycbf.py" -print "\\end{verbatim}" +print("End of output from make_pycbf.py") +print("\\end{verbatim}") @} diff --git a/pycbf/makeflatascii.py b/pycbf/makeflatascii.py index 3f027fce..10685cb1 100644 --- a/pycbf/makeflatascii.py +++ b/pycbf/makeflatascii.py @@ -1,6 +1,6 @@ - -import pydoc, pycbf, sys -f = open(sys.argv[1],"w") -pydoc.pager=lambda text: f.write(text) -pydoc.TextDoc.bold = lambda self,text : text -pydoc.help(pycbf) + +import pydoc, pycbf, sys +f = open(sys.argv[1],"w") +pydoc.pager=lambda text: f.write(text) +pydoc.TextDoc.bold = lambda self,text : text +pydoc.help(pycbf) diff --git a/pycbf/pycbf.aux b/pycbf/pycbf.aux index 19fc3de6..c76b5b37 100644 --- a/pycbf/pycbf.aux +++ b/pycbf/pycbf.aux @@ -12,7 +12,7 @@ \fi \@writefile{toc}{\contentsline {section}{\numberline {1}Introduction}{2}{section.1}} -\@writefile{toc}{\contentsline {section}{\numberline {2}Installation prerequisites}{2}{section.2}} +\@writefile{toc}{\contentsline {section}{\numberline {2}Installation prerequisites}{3}{section.2}} \@writefile{toc}{\contentsline {section}{\numberline {3}Generating the c interface - the SWIG file}{3}{section.3}} \newlabel{scrap1}{{3}{3}{Generating the c interface - the SWIG file\relax }{section.3}{}} \newlabel{scrap2}{{3}{3}{Generating the c interface - the SWIG file\relax }{section.3}{}} @@ -22,29 +22,34 @@ \newlabel{scrap5}{{3.1}{5}{Exceptions\relax }{subsection.3.1}{}} \newlabel{scrap6}{{3.1}{5}{Exceptions\relax }{subsection.3.1}{}} \newlabel{scrap7}{{3.1}{9}{Exceptions\relax }{subsection.3.1}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Exceptions}{9}{subsection.3.2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Exceptions}{10}{subsection.3.2}} \@writefile{toc}{\contentsline {section}{\numberline {4}Docstrings}{10}{section.4}} \@writefile{toc}{\contentsline {section}{\numberline {5}Wrappers}{10}{section.5}} \newlabel{scrap8}{{5}{10}{Wrappers\relax }{section.5}{}} -\@writefile{toc}{\contentsline {section}{\numberline {6}Building python extensions - the setup file}{62}{section.6}} -\newlabel{scrap9}{{6}{62}{Building python extensions - the setup file\relax }{section.6}{}} -\@writefile{toc}{\contentsline {section}{\numberline {7}Building and testing the resulting package}{62}{section.7}} -\newlabel{scrap10}{{7}{62}{Building and testing the resulting package\relax }{section.7}{}} -\newlabel{scrap11}{{7}{63}{Building and testing the resulting package\relax }{section.7}{}} -\newlabel{scrap12}{{7}{63}{Building and testing the resulting package\relax }{section.7}{}} -\@writefile{toc}{\contentsline {section}{\numberline {8}Debugging compiled extensions}{63}{section.8}} -\@writefile{toc}{\contentsline {section}{\numberline {9}Things which are currently missing}{64}{section.9}} -\@writefile{toc}{\contentsline {section}{\numberline {10}Testing}{64}{section.10}} -\@writefile{toc}{\contentsline {subsection}{\numberline {10.1}Read a file based on cif2cbf.c}{64}{subsection.10.1}} -\newlabel{scrap13}{{10.1}{64}{Read a file based on cif2cbf.c\relax }{subsection.10.1}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {10.2}Try to test the goniometer and detector}{65}{subsection.10.2}} -\newlabel{scrap14}{{10.2}{65}{Try to test the goniometer and detector\relax }{subsection.10.2}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {10.3}Test cases for the generics}{66}{subsection.10.3}} -\newlabel{scrap15}{{10.3}{66}{Test cases for the generics\relax }{subsection.10.3}{}} -\@writefile{toc}{\contentsline {section}{\numberline {11}Worked example 1 : xmas beamline + mar ccd detector at the ESRF}{66}{section.11}} -\@writefile{toc}{\contentsline {subsection}{\numberline {11.1}Reading marccd headers}{66}{subsection.11.1}} -\newlabel{scrap16}{{11.1}{66}{Reading marccd headers\relax }{subsection.11.1}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {11.2}Writing out cif files for fit2d/xmas}{72}{subsection.11.2}} -\newlabel{scrap17}{{11.2}{72}{Writing out cif files for fit2d/xmas\relax }{subsection.11.2}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {11.3}A template cif file for the xmas beamline}{76}{subsection.11.3}} -\newlabel{scrap18}{{11.3}{76}{A template cif file for the xmas beamline\relax }{subsection.11.3}{}} +\@writefile{toc}{\contentsline {section}{\numberline {6}Building python extensions - the setup file}{10}{section.6}} +\newlabel{scrap9}{{6}{11}{Building python extensions - the setup file\relax }{section.6}{}} +\@writefile{toc}{\contentsline {section}{\numberline {7}Building and testing the resulting package}{11}{section.7}} +\newlabel{scrap10}{{7}{11}{Building and testing the resulting package\relax }{section.7}{}} +\newlabel{scrap11}{{7}{12}{Building and testing the resulting package\relax }{section.7}{}} +\newlabel{scrap12}{{7}{12}{Building and testing the resulting package\relax }{section.7}{}} +\@writefile{toc}{\contentsline {section}{\numberline {8}Debugging compiled extensions}{12}{section.8}} +\@writefile{toc}{\contentsline {section}{\numberline {9}Things which are currently missing}{13}{section.9}} +\@writefile{toc}{\contentsline {section}{\numberline {10}Testing}{13}{section.10}} +\@writefile{toc}{\contentsline {subsection}{\numberline {10.1}Read a file based on cif2cbf.c}{13}{subsection.10.1}} +\newlabel{scrap13}{{10.1}{14}{Read a file based on cif2cbf.c\relax }{subsection.10.1}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {10.2}Try to test the goniometer and detector}{15}{subsection.10.2}} +\newlabel{scrap14}{{10.2}{15}{Try to test the goniometer and detector\relax }{subsection.10.2}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {10.3}Test cases for the generics}{15}{subsection.10.3}} +\newlabel{scrap15}{{10.3}{15}{Test cases for the generics\relax }{subsection.10.3}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {10.4}Version of pycbf_test1 with write logic added}{17}{subsection.10.4}} +\newlabel{scrap16}{{10.4}{17}{Version of pycbf_test1 with write logic added\relax }{subsection.10.4}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {10.5}Processing of XFEL axes}{18}{subsection.10.5}} +\newlabel{scrap17}{{10.5}{18}{Processing of XFEL axes\relax }{subsection.10.5}{}} +\@writefile{toc}{\contentsline {section}{\numberline {11}Worked example 1 : xmas beamline + mar ccd detector at the ESRF}{18}{section.11}} +\@writefile{toc}{\contentsline {subsection}{\numberline {11.1}Reading marccd headers}{19}{subsection.11.1}} +\newlabel{scrap18}{{11.1}{20}{Reading marccd headers\relax }{subsection.11.1}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {11.2}Writing out cif files for fit2d/xmas}{21}{subsection.11.2}} +\newlabel{scrap19}{{11.2}{22}{Writing out cif files for fit2d/xmas\relax }{subsection.11.2}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {11.3}A template cif file for the xmas beamline}{23}{subsection.11.3}} +\newlabel{scrap20}{{11.3}{24}{A template cif file for the xmas beamline\relax }{subsection.11.3}{}} +\gdef \@abspage@last{24} diff --git a/pycbf/pycbf.dvi b/pycbf/pycbf.dvi index 48c8c54d..64b28c77 100644 Binary files a/pycbf/pycbf.dvi and b/pycbf/pycbf.dvi differ diff --git a/pycbf/pycbf.i b/pycbf/pycbf.i index 7ed5ec65..be53f0d3 100644 --- a/pycbf/pycbf.i +++ b/pycbf/pycbf.i @@ -175,51 +175,52 @@ static int convert_darray(PyObject *input, double *ptr, int size) { static int error_status = 0; -static char error_message[1024] ; // hope that is long enough +static char error_message1[17] ; +static char error_message[1042] ; // hope that is long enough /* prototype */ void get_error_message(void); void get_error_message(){ - sprintf(error_message,"%s","CBFlib Error(s):"); + sprintf(error_message1,"%s","CBFlib Error(s):"); if (error_status & CBF_FORMAT ) - sprintf(error_message,"%s %s",error_message,"CBF_FORMAT "); + sprintf(error_message,"%s %s",error_message1,"CBF_FORMAT "); if (error_status & CBF_ALLOC ) - sprintf(error_message,"%s %s",error_message,"CBF_ALLOC "); + sprintf(error_message,"%s %s",error_message1,"CBF_ALLOC "); if (error_status & CBF_ARGUMENT ) - sprintf(error_message,"%s %s",error_message,"CBF_ARGUMENT "); + sprintf(error_message,"%s %s",error_message1,"CBF_ARGUMENT "); if (error_status & CBF_ASCII ) - sprintf(error_message,"%s %s",error_message,"CBF_ASCII "); + sprintf(error_message,"%s %s",error_message1,"CBF_ASCII "); if (error_status & CBF_BINARY ) - sprintf(error_message,"%s %s",error_message,"CBF_BINARY "); + sprintf(error_message,"%s %s",error_message1,"CBF_BINARY "); if (error_status & CBF_BITCOUNT ) - sprintf(error_message,"%s %s",error_message,"CBF_BITCOUNT "); + sprintf(error_message,"%s %s",error_message1,"CBF_BITCOUNT "); if (error_status & CBF_ENDOFDATA ) - sprintf(error_message,"%s %s",error_message,"CBF_ENDOFDATA "); + sprintf(error_message,"%s %s",error_message1,"CBF_ENDOFDATA "); if (error_status & CBF_FILECLOSE ) - sprintf(error_message,"%s %s",error_message,"CBF_FILECLOSE "); + sprintf(error_message,"%s %s",error_message1,"CBF_FILECLOSE "); if (error_status & CBF_FILEOPEN ) - sprintf(error_message,"%s %s",error_message,"CBF_FILEOPEN "); + sprintf(error_message,"%s %s",error_message1,"CBF_FILEOPEN "); if (error_status & CBF_FILEREAD ) - sprintf(error_message,"%s %s",error_message,"CBF_FILEREAD "); + sprintf(error_message,"%s %s",error_message1,"CBF_FILEREAD "); if (error_status & CBF_FILESEEK ) - sprintf(error_message,"%s %s",error_message,"CBF_FILESEEK "); + sprintf(error_message,"%s %s",error_message1,"CBF_FILESEEK "); if (error_status & CBF_FILETELL ) - sprintf(error_message,"%s %s",error_message,"CBF_FILETELL "); + sprintf(error_message,"%s %s",error_message1,"CBF_FILETELL "); if (error_status & CBF_FILEWRITE ) - sprintf(error_message,"%s %s",error_message,"CBF_FILEWRITE "); + sprintf(error_message,"%s %s",error_message1,"CBF_FILEWRITE "); if (error_status & CBF_IDENTICAL ) - sprintf(error_message,"%s %s",error_message,"CBF_IDENTICAL "); + sprintf(error_message,"%s %s",error_message1,"CBF_IDENTICAL "); if (error_status & CBF_NOTFOUND ) - sprintf(error_message,"%s %s",error_message,"CBF_NOTFOUND "); + sprintf(error_message,"%s %s",error_message1,"CBF_NOTFOUND "); if (error_status & CBF_OVERFLOW ) - sprintf(error_message,"%s %s",error_message,"CBF_OVERFLOW "); + sprintf(error_message,"%s %s",error_message1,"CBF_OVERFLOW "); if (error_status & CBF_UNDEFINED ) - sprintf(error_message,"%s %s",error_message,"CBF_UNDEFINED "); + sprintf(error_message,"%s %s",error_message1,"CBF_UNDEFINED "); if (error_status & CBF_NOTIMPLEMENTED) - sprintf(error_message,"%s %s",error_message,"CBF_NOTIMPLEMENTED"); + sprintf(error_message,"%s %s",error_message1,"CBF_NOTIMPLEMENTED"); if (error_status & CBF_NOCOMPRESSION) - sprintf(error_message,"%s %s",error_message,"CBF_NOCOMPRESSION"); + sprintf(error_message,"%s %s",error_message1,"CBF_NOCOMPRESSION"); } diff --git a/pycbf/pycbf.log b/pycbf/pycbf.log index 510c6d1a..d83f7564 100644 --- a/pycbf/pycbf.log +++ b/pycbf/pycbf.log @@ -1,34 +1,27 @@ -This is pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7) (format=pdflatex 2008.8.22) 14 OCT 2013 12:35 +This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021) (preloaded format=latex 2021.6.28) 1 JUL 2021 20:50 entering extended mode - file:line:error style messages enabled. + restricted \write18 enabled. %&-line parsing enabled. -**pycbf.tex +**pycbf (./pycbf.tex -LaTeX2e <2005/12/01> -Babel and hyphenation patterns for english, usenglishmax, dumylang, noh -yphenation, german-x-2008-06-18, ngerman-x-2008-06-18, ancientgreek, ibycus, ar -abic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danish, dutc -h, esperanto, estonian, farsi, finnish, french, galician, german, ngerman, mono -greek, greek, hungarian, icelandic, indonesian, interlingua, irish, italian, la -tin, mongolian, mongolian2a, bokmal, nynorsk, polish, portuguese, romanian, rus -sian, sanskrit, serbian, slovak, slovenian, spanish, swedish, turkish, ukenglis -h, ukrainian, uppersorbian, welsh, loaded. -(/usr/local/texlive/2008/texmf-dist/tex/latex/base/article.cls -Document Class: article 2005/09/16 v1.4f Standard LaTeX document class -(/usr/local/texlive/2008/texmf-dist/tex/latex/base/size10.clo -File: size10.clo 2005/09/16 v1.4f Standard LaTeX file (size option) +LaTeX2e <2020-10-01> patch level 4 +L3 programming layer <2021-02-18> +(/usr/local/texlive/2021/texmf-dist/tex/latex/base/article.cls +Document Class: article 2020/04/10 v1.4m Standard LaTeX document class +(/usr/local/texlive/2021/texmf-dist/tex/latex/base/size10.clo +File: size10.clo 2020/04/10 v1.4m Standard LaTeX file (size option) ) -\c@part=\count79 -\c@section=\count80 -\c@subsection=\count81 -\c@subsubsection=\count82 -\c@paragraph=\count83 -\c@subparagraph=\count84 -\c@figure=\count85 -\c@table=\count86 -\abovecaptionskip=\skip41 -\belowcaptionskip=\skip42 -\bibindent=\dimen102 +\c@part=\count179 +\c@section=\count180 +\c@subsection=\count181 +\c@subsubsection=\count182 +\c@paragraph=\count183 +\c@subparagraph=\count184 +\c@figure=\count185 +\c@table=\count186 +\abovecaptionskip=\skip47 +\belowcaptionskip=\skip48 +\bibindent=\dimen138 ) (/Users/yaya/Library/texmf/tex/latex/iucr/utilities/graphics/graphics.sty Package: graphics 1999/02/16 v1.0l Standard LaTeX Graphics (DPC,SPQR) @@ -36,52 +29,53 @@ Package: graphics 1999/02/16 v1.0l Standard LaTeX Graphics (DPC,SPQR) (/Users/yaya/Library/texmf/tex/latex/iucr/utilities/graphics/trig.sty Package: trig 1999/03/16 v1.09 sin cos tan (DPC) ) -(/usr/local/texlive/2008/texmf/tex/latex/config/graphics.cfg -File: graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive +(/usr/local/texlive/2021/texmf-dist/tex/latex/graphics-cfg/graphics.cfg +File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration ) -Package graphics Info: Driver file: pdftex.def on input line 80. +Package graphics Info: Driver file: dvips.def on input line 80. -(/Users/yaya/Library/texmf/tex/latex/iucr/utilities/graphics/pdftex.def -File: pdftex.def 1999/01/26 v0.02l graphics/color for pdftex -\Gread@gobject=\count87 +(/Users/yaya/Library/texmf/tex/latex/iucr/utilities/graphics/dvips.def +File: dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR) )) -(/usr/local/texlive/2008/texmf-dist/tex/latex/anysize/anysize.sty +(/usr/local/texlive/2021/texmf-dist/tex/latex/anysize/anysize.sty Package: anysize 1994/08/13 setting margin sizes document style option `anysize' loaded Michael Salzenberg, Thomas Esser, Dirk Hillbrecht Version 1.0, Aug 13, 1994 -\@Leftmargin=\dimen103 -\@Rightmargin=\dimen104 -\@Topmargin=\dimen105 -\@Bottommargin=\dimen106 -) (/usr/local/texlive/2008/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty -\fancy@headwidth=\skip43 -\f@ncyO@elh=\skip44 -\f@ncyO@erh=\skip45 -\f@ncyO@olh=\skip46 -\f@ncyO@orh=\skip47 -\f@ncyO@elf=\skip48 -\f@ncyO@erf=\skip49 -\f@ncyO@olf=\skip50 -\f@ncyO@orf=\skip51 +\@Leftmargin=\dimen139 +\@Rightmargin=\dimen140 +\@Topmargin=\dimen141 +\@Bottommargin=\dimen142 +) (/usr/local/texlive/2021/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty +Package: fancyhdr 2021/01/28 v4.0.1 Extensive control of page headers and foote +rs +\f@nch@headwidth=\skip49 +\f@nch@O@elh=\skip50 +\f@nch@O@erh=\skip51 +\f@nch@O@olh=\skip52 +\f@nch@O@orh=\skip53 +\f@nch@O@elf=\skip54 +\f@nch@O@erf=\skip55 +\f@nch@O@olf=\skip56 +\f@nch@O@orf=\skip57 ) (/Users/yaya/Library/texmf/tex/latex/hyperref/hyperref.sty Package: hyperref 2003/11/30 v6.74m Hypertext links for LaTeX (/Users/yaya/Library/texmf/tex/latex/iucr/utilities/graphics/keyval.sty Package: keyval 1999/03/16 v1.13 key=value parser (DPC) -\KV@toks@=\toks14 +\KV@toks@=\toks15 ) -\@linkdim=\dimen107 -\Hy@linkcounter=\count88 -\Hy@pagecounter=\count89 +\@linkdim=\dimen143 +\Hy@linkcounter=\count187 +\Hy@pagecounter=\count188 (/Users/yaya/Library/texmf/tex/latex/hyperref/pd1enc.def File: pd1enc.def 2003/11/30 v6.74m Hyperref: PDFDocEncoding definition (HO) -) -(/usr/local/texlive/2008/texmf/tex/latex/config/hyperref.cfg -File: hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive +Now handling font encoding PD1 ... +... no UTF-8 mapping file for font encoding PD1 +LaTeX Info: Composite with undeclared \k in encoding PD1 on input line 227. ) Package hyperref Info: Option `bookmarks' set `true' on input line 1830. Package hyperref Info: Option `bookmarksnumbered' set `true' on input line 1830 @@ -97,1196 +91,1293 @@ Package hyperref Info: Bookmarks ON on input line 2004. (/Users/yaya/Library/texmf/tex/latex/hyperref/backref.sty Package: backref 2003/03/20 v1.23 Bibliographical back referencing ) -(/usr/local/texlive/2008/texmf-dist/tex/latex/ltxmisc/url.sty -\Urlmuskip=\muskip10 -Package: url 2006/04/12 ver 3.3 Verb mode for urls, etc. +(/usr/local/texlive/2021/texmf-dist/tex/latex/url/url.sty +\Urlmuskip=\muskip16 +Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. ) LaTeX Info: Redefining \url on input line 2143. -\Fld@menulength=\count90 -\Field@Width=\dimen108 -\Fld@charsize=\dimen109 -\Choice@toks=\toks15 -\Field@toks=\toks16 +\Fld@menulength=\count189 +\Field@Width=\dimen144 +\Fld@charsize=\dimen145 +\Choice@toks=\toks16 +\Field@toks=\toks17 Package hyperref Info: Hyper figures OFF on input line 2618. Package hyperref Info: Link nesting OFF on input line 2623. Package hyperref Info: Hyper index ON on input line 2626. Package hyperref Info: backreferencing ON on input line 2631. Package hyperref Info: Link coloring OFF on input line 2638. -\c@Item=\count91 -\c@Hfootnote=\count92 +\c@Item=\count190 +\c@Hfootnote=\count191 ) *hyperref using driver hdvipdfm* (/Users/yaya/Library/texmf/tex/latex/hyperref/hdvipdfm.def File: hdvipdfm.def 2003/11/30 v6.74m Hyperref driver for dvipdfm -\pdfm@box=\box26 -\Fld@listcount=\count93 +\pdfm@box=\box47 +\Fld@listcount=\count192 \@outlinefile=\write3 -) (./pycbf.aux) +) +(/usr/local/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-dvips.def +File: l3backend-dvips.def 2021-03-18 L3 backend support: dvips +\l__pdf_internal_box=\box48 +\g__pdf_backend_object_int=\count193 +\l__pdf_backend_content_box=\box49 +\l__pdf_backend_model_box=\box50 +\g__pdf_backend_annotation_int=\count194 +\g__pdf_backend_link_int=\count195 +\g__pdf_backend_link_sf_int=\count196 +) +(./pycbf.aux) \openout1 = `pycbf.aux'. -LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 97. -LaTeX Font Info: ... okay on input line 97. -LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 97. -LaTeX Font Info: ... okay on input line 97. -LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 97. -LaTeX Font Info: ... okay on input line 97. -LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 97. -LaTeX Font Info: ... okay on input line 97. -LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 97. -LaTeX Font Info: ... okay on input line 97. -LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 97. -LaTeX Font Info: ... okay on input line 97. -LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 97. -LaTeX Font Info: ... okay on input line 97. - -(/usr/local/texlive/2008/texmf-dist/tex/context/base/supp-pdf.tex -[Loading MPS to PDF converter (version 2006.09.02).] -\scratchcounter=\count94 -\scratchdimen=\dimen110 -\scratchbox=\box27 -\nofMPsegments=\count95 -\nofMParguments=\count96 -\everyMPshowfont=\toks17 -\MPscratchCnt=\count97 -\MPscratchDim=\dimen111 -\MPnumerator=\count98 -\everyMPtoPDFconversion=\toks18 -) -Package hyperref Info: Link coloring OFF on input line 97. -(/Users/yaya/Library/texmf/tex/latex/hyperref/nameref.sty +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 102. +LaTeX Font Info: ... okay on input line 102. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 102. +LaTeX Font Info: ... okay on input line 102. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 102. +LaTeX Font Info: ... okay on input line 102. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 102. +LaTeX Font Info: ... okay on input line 102. +LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 102. +LaTeX Font Info: ... okay on input line 102. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 102. +LaTeX Font Info: ... okay on input line 102. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 102. +LaTeX Font Info: ... okay on input line 102. +LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 102. +LaTeX Font Info: ... okay on input line 102. +Package hyperref Info: Link coloring OFF on input line 102. + (/Users/yaya/Library/texmf/tex/latex/hyperref/nameref.sty Package: nameref 2003/12/03 v2.21 Cross-referencing by name of section -\c@section@level=\count99 +\c@section@level=\count197 ) -LaTeX Info: Redefining \ref on input line 97. -LaTeX Info: Redefining \pageref on input line 97. - (./pycbf.out) -(./pycbf.out) +LaTeX Info: Redefining \ref on input line 102. +LaTeX Info: Redefining \pageref on input line 102. \openout3 = `pycbf.out'. LaTeX Font Info: External font `cmex10' loaded for size -(Font) <12> on input line 127. +(Font) <12> on input line 132. LaTeX Font Info: External font `cmex10' loaded for size -(Font) <8> on input line 127. +(Font) <8> on input line 132. LaTeX Font Info: External font `cmex10' loaded for size -(Font) <6> on input line 127. - (./pycbf.toc +(Font) <6> on input line 132. + +(./pycbf.toc LaTeX Font Info: External font `cmex10' loaded for size (Font) <9> on input line 4. LaTeX Font Info: External font `cmex10' loaded for size (Font) <5> on input line 4. + +! Missing $ inserted. + + $ +l.16 ...th write logic added}{17}{subsection.10.4} + +? +! Extra }, or forgotten $. + ... pycbf_test1 with write logic added} + \hyper@linkend +l.16 ...th write logic added}{17}{subsection.10.4} + +? +! Missing $ inserted. + + $ +l.16 ...th write logic added}{17}{subsection.10.4} + +? +! Missing } inserted. + + } +l.16 ...th write logic added}{17}{subsection.10.4} + +? ) \tf@toc=\write4 \openout4 = `pycbf.toc'. [1 -{/usr/local/texlive/2008/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] -LaTeX Font Info: Try loading font information for OMS+cmr on input line 177. - - -(/usr/local/texlive/2008/texmf-dist/tex/latex/base/omscmr.fd -File: omscmr.fd 1999/05/25 v2.5h Standard LaTeX font definitions -) -LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <9> not available -(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 177. - -Overfull \hbox (10.09409pt too wide) in paragraph at lines 206--212 +] +Overfull \hbox (10.09409pt too wide) in paragraph at lines 213--219 []\OT1/cmr/m/n/9 The li-brary ap-pears to de-fine (at least) three ob-jects. Th e one we started on was the cbf[]handle[]struct [] [2] [3] -Overfull \hbox (27.82617pt too wide) in paragraph at lines 402--402 -[][][]\OT1/cmtt/m/n/9 #define CBF_PARSE_TQ 0x0800 /* PARSE treble quotes "" -"...""" and '''...''' */ +Overfull \hbox (27.82617pt too wide) in paragraph at lines 415--415 +[][][][]\OT1/cmtt/m/n/9 #define CBF_PARSE_TQ 0x0800 /* PARSE treble quotes +"""...""" and '''...''' */ [] -Overfull \hbox (4.20145pt too wide) in paragraph at lines 414--414 -[][][]\OT1/cmtt/m/n/9 #define CBF_PARSE_WIDE 0x4000 /* PARSE wide files - */ +Overfull \hbox (4.20145pt too wide) in paragraph at lines 427--427 +[][][][]\OT1/cmtt/m/n/9 #define CBF_PARSE_WIDE 0x4000 /* PARSE wide files + */ [] -Overfull \hbox (4.20145pt too wide) in paragraph at lines 416--416 -[][][]\OT1/cmtt/m/n/9 #define CBF_PARSE_UTF8 0x10000 /* PARSE UTF-8 - */ +Overfull \hbox (4.20145pt too wide) in paragraph at lines 429--429 +[][][][]\OT1/cmtt/m/n/9 #define CBF_PARSE_UTF8 0x10000 /* PARSE UTF-8 + */ [] [4] [5] Underfull \vbox (badness 10000) has occurred while \output is active [] [6] -Overfull \hbox (42.001pt too wide) in paragraph at lines 642--642 -[][][] \OT1/cmtt/m/n/9 PyErr_SetString(PyExc_ValueError,"Expecti -ng a sequence of long integers"); +Overfull \hbox (42.001pt too wide) in paragraph at lines 664--664 +[][][] []\OT1/cmtt/m/n/9 PyErr_SetString(PyExc_ValueError,"Expec +ting a sequence of long integers"); [] Underfull \vbox (badness 10000) has occurred while \output is active [] [7] -Overfull \hbox (42.001pt too wide) in paragraph at lines 674--674 -[][][] \OT1/cmtt/m/n/9 PyErr_SetString(PyExc_ValueError,"Expecti -ng a sequence of long integers"); +Overfull \hbox (42.001pt too wide) in paragraph at lines 696--696 +[][][] []\OT1/cmtt/m/n/9 PyErr_SetString(PyExc_ValueError,"Expec +ting a sequence of long integers"); [] Underfull \vbox (badness 10000) has occurred while \output is active [] [8] -[9] [10] -Overfull \hbox (8.92639pt too wide) in paragraph at lines 995--995 -[][][] \OT1/cmtt/m/n/9 while lines[i+1].find("DESCRIPTION")==-1 and lines[ -i+1].find("int cbf_")==-1: +[9] +Overfull \hbox (11.92642pt too wide) in paragraph at lines 1027--1027 +[][][] []\OT1/cmtt/m/n/9 while lines[i+1].find("DESCRIPTION")==-1 and line +s[i+1].find("int cbf_")==-1: [] -Underfull \vbox (badness 10000) has occurred while \output is active [] - - [11] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (11.92642pt too wide) in paragraph at lines 1194--1194 +[][][] []\OT1/cmtt/m/n/9 "int elements", "int minelement", "int maxelement" +, "char **bo", "int *bolen", + [] - [12] -Underfull \vbox (badness 10000) has occurred while \output is active [] - [13] -Overfull \hbox (8.92639pt too wide) in paragraph at lines 1162--1162 -[][][] \OT1/cmtt/m/n/9 "int elements", "int minelement", "int maxelement", -"char **bo", "int *bolen", +Overfull \hbox (11.92642pt too wide) in paragraph at lines 1234--1234 +[][][] []\OT1/cmtt/m/n/9 "int elements", "int minelement", "int maxelement" +, "char **bo", "int *bolen", [] -Overfull \hbox (8.92639pt too wide) in paragraph at lines 1202--1202 -[][][] \OT1/cmtt/m/n/9 "int elements", "int minelement", "int maxelement", -"char **bo", "int *bolen", +Overfull \hbox (11.92642pt too wide) in paragraph at lines 1274--1274 +[][][] []\OT1/cmtt/m/n/9 "int elements", "int minelement", "int maxelement" +, "char **bo", "int *bolen", [] -Underfull \vbox (badness 10000) has occurred while \output is active [] - - [14] -Overfull \hbox (8.92639pt too wide) in paragraph at lines 1242--1242 -[][][] \OT1/cmtt/m/n/9 "int elements", "int minelement", "int maxelement", -"char **bo", "int *bolen", +Overfull \hbox (21.37631pt too wide) in paragraph at lines 1478--1478 +[][][] []\OT1/cmtt/m/n/9 "int elsize", "int elsign", "int ndimslow", "int nd +imfast"],["(Binary)String"] ], [] -Underfull \vbox (badness 10000) has occurred while \output is active [] - - [15] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (21.37631pt too wide) in paragraph at lines 1507--1507 +[][][] []\OT1/cmtt/m/n/9 "int elsize", "int elsign", "int ndimfast", "int nd +imslow"],["(Binary)String"] ], + [] - [16] -Underfull \vbox (badness 10000) has occurred while \output is active [] - [17] -Overfull \hbox (18.37628pt too wide) in paragraph at lines 1444--1444 -[][][] \OT1/cmtt/m/n/9 "int elsize", "int elsign", "int ndimslow", "int ndim -fast"],["(Binary)String"] ], +Overfull \hbox (21.37631pt too wide) in paragraph at lines 1536--1536 +[][][] []\OT1/cmtt/m/n/9 "int elsize", "int elsign", "int ndimslow", "int nd +imfast"],["(Binary)String"] ], [] -Underfull \vbox (badness 10000) has occurred while \output is active [] - - [18] -Overfull \hbox (18.37628pt too wide) in paragraph at lines 1472--1472 -[][][] \OT1/cmtt/m/n/9 "int elsize", "int elsign", "int ndimfast", "int ndim -slow"],["(Binary)String"] ], +Overfull \hbox (92.25049pt too wide) in paragraph at lines 1652--1652 +[][][] []\OT1/cmtt/m/n/9 "int elsize", "int elsign", "int ndimslow", "int nd +immid", "int ndimfast"],["(Binary)String"] ], [] -Overfull \hbox (18.37628pt too wide) in paragraph at lines 1500--1500 -[][][] \OT1/cmtt/m/n/9 "int elsize", "int elsign", "int ndimslow", "int ndim -fast"],["(Binary)String"] ], +Overfull \hbox (92.25049pt too wide) in paragraph at lines 1681--1681 +[][][] []\OT1/cmtt/m/n/9 "int elsize", "int elsign", "int ndimfast", "int nd +immid", "int ndimslow"],["(Binary)String"] ], [] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (92.25049pt too wide) in paragraph at lines 1711--1711 +[][][] []\OT1/cmtt/m/n/9 "int elsize", "int elsign", "int ndimslow", "int nd +immid", "int ndimfast"],["(Binary)String"] ], + [] - [19] -Underfull \vbox (badness 10000) has occurred while \output is active [] - [20] -Overfull \hbox (89.25046pt too wide) in paragraph at lines 1612--1612 -[][][] \OT1/cmtt/m/n/9 "int elsize", "int elsign", "int ndimslow", "int ndim -mid", "int ndimfast"],["(Binary)String"] ], +Overfull \hbox (26.10126pt too wide) in paragraph at lines 1741--1741 +[][][] []\OT1/cmtt/m/n/9 "int elsize", "int ndimslow", "int ndimmid", "int n +dimfast"],["(Binary)String"] ], [] -Overfull \hbox (89.25046pt too wide) in paragraph at lines 1640--1640 -[][][] \OT1/cmtt/m/n/9 "int elsize", "int elsign", "int ndimfast", "int ndim -mid", "int ndimslow"],["(Binary)String"] ], +Overfull \hbox (26.10126pt too wide) in paragraph at lines 1770--1770 +[][][] []\OT1/cmtt/m/n/9 "int elsize", "int ndimfast", "int ndimmid", "int n +dimslow"],["(Binary)String"] ], [] -Underfull \vbox (badness 10000) has occurred while \output is active [] - - [21] -Overfull \hbox (89.25046pt too wide) in paragraph at lines 1668--1668 -[][][] \OT1/cmtt/m/n/9 "int elsize", "int elsign", "int ndimslow", "int ndim -mid", "int ndimfast"],["(Binary)String"] ], +Overfull \hbox (26.10126pt too wide) in paragraph at lines 1799--1799 +[][][] []\OT1/cmtt/m/n/9 "int elsize", "int ndimslow", "int ndimmid", "int n +dimfast"],["(Binary)String"] ], [] -Overfull \hbox (23.10123pt too wide) in paragraph at lines 1696--1696 -[][][] \OT1/cmtt/m/n/9 "int elsize", "int ndimslow", "int ndimmid", "int ndi -mfast"],["(Binary)String"] ], +Overfull \hbox (11.92642pt too wide) in paragraph at lines 1867--1867 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *data, int le +n) } set_integerarray_wdims; [] -Underfull \vbox (badness 10000) has occurred while \output is active [] - - [22] -Overfull \hbox (23.10123pt too wide) in paragraph at lines 1724--1724 -[][][] \OT1/cmtt/m/n/9 "int elsize", "int ndimfast", "int ndimmid", "int ndi -mslow"],["(Binary)String"] ], +Overfull \hbox (11.92642pt too wide) in paragraph at lines 1868--1868 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *bo, int bole +n) } set_integerarray_wdims; [] -Overfull \hbox (23.10123pt too wide) in paragraph at lines 1751--1751 -[][][] \OT1/cmtt/m/n/9 "int elsize", "int ndimslow", "int ndimmid", "int ndi -mfast"],["(Binary)String"] ], +Overfull \hbox (21.37631pt too wide) in paragraph at lines 1872--1872 +[][][] []\OT1/cmtt/m/n/9 char *bo, int bolen, int dimfast, int dimm +id, int dimslow, int padding){ [] -Underfull \vbox (badness 10000) has occurred while \output is active [] - - [23] -Overfull \hbox (8.92639pt too wide) in paragraph at lines 1818--1818 -[][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *data, int len) - } set_integerarray_wdims; +Overfull \hbox (78.07565pt too wide) in paragraph at lines 1884--1884 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsigned, ( +size_t) elements, (const char *)byteorder, [] -Overfull \hbox (8.92639pt too wide) in paragraph at lines 1819--1819 -[][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *bo, int bolen) - } set_integerarray_wdims; +Overfull \hbox (238.72379pt too wide) in paragraph at lines 1892--1892 +[][][] []\OT1/cmtt/m/n/9 "int elsize", "int elsigned", "int elements", "String +byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[],], [] -Overfull \hbox (18.37628pt too wide) in paragraph at lines 1823--1823 -[][][] \OT1/cmtt/m/n/9 char *bo, int bolen, int dimfast, int dimmid -, int dimslow, int padding){ +Overfull \hbox (26.10126pt too wide) in paragraph at lines 1900--1900 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *data, int le +n) } set_integerarray_wdims_sf; [] -Underfull \vbox (badness 10000) has occurred while \output is active [] - - [24] -Overfull \hbox (75.07562pt too wide) in paragraph at lines 1835--1835 -[][][] \OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsigned, (si -ze_t) elements, (const char *)byteorder, +Overfull \hbox (26.10126pt too wide) in paragraph at lines 1901--1901 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *bo, int bole +n) } set_integerarray_wdims_sf; [] -Overfull \hbox (230.99881pt too wide) in paragraph at lines 1843--1843 -[][][] \OT1/cmtt/m/n/9 "int elsize", "int elsigned", "int elements", "String by -teorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]], +Overfull \hbox (21.37631pt too wide) in paragraph at lines 1905--1905 +[][][] []\OT1/cmtt/m/n/9 char *bo, int bolen, int dimslow, int dimm +id, int dimfast, int padding){ [] -Overfull \hbox (23.10123pt too wide) in paragraph at lines 1851--1851 -[][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *data, int len) - } set_integerarray_wdims_sf; +Overfull \hbox (11.92642pt too wide) in paragraph at lines 1916--1916 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_integerarray_wdims_sf (s +elf, compression, binary_id, [] -Overfull \hbox (23.10123pt too wide) in paragraph at lines 1852--1852 -[][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *bo, int bolen) - } set_integerarray_wdims_sf; +Overfull \hbox (78.07565pt too wide) in paragraph at lines 1917--1917 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsigned, ( +size_t) elements, (const char *)byteorder, [] -Overfull \hbox (18.37628pt too wide) in paragraph at lines 1856--1856 -[][][] \OT1/cmtt/m/n/9 char *bo, int bolen, int dimslow, int dimmid -, int dimfast, int padding){ +Overfull \hbox (229.2739pt too wide) in paragraph at lines 1925--1925 +[][][] []\OT1/cmtt/m/n/9 "int elsize","int elsigned","int elements", "String by +teorder", "int dimslow", "int dimmid", "int dimfast", "int padding"],[],], [] -Overfull \hbox (8.92639pt too wide) in paragraph at lines 1867--1867 -[][][] \OT1/cmtt/m/n/9 cbf_failnez(cbf_set_integerarray_wdims_sf (sel -f, compression, binary_id, +Overfull \hbox (26.10126pt too wide) in paragraph at lines 1932--1932 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *data, int le +n) } set_integerarray_wdims_fs; [] -Overfull \hbox (75.07562pt too wide) in paragraph at lines 1868--1868 -[][][] \OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsigned, (si -ze_t) elements, (const char *)byteorder, +Overfull \hbox (26.10126pt too wide) in paragraph at lines 1933--1933 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *bo, int bole +n) } set_integerarray_wdims_fs; [] -Overfull \hbox (221.54892pt too wide) in paragraph at lines 1876--1876 -[][][] \OT1/cmtt/m/n/9 "int elsize","int elsigned","int elements", "String byte -order", "int dimslow", "int dimmid", "int dimfast", "int padding"],[]], +Overfull \hbox (21.37631pt too wide) in paragraph at lines 1937--1937 +[][][] []\OT1/cmtt/m/n/9 char *bo, int bolen, int dimfast, int dimm +id, int dimslow, int padding){ [] -Overfull \hbox (23.10123pt too wide) in paragraph at lines 1883--1883 -[][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *data, int len) - } set_integerarray_wdims_fs; +Overfull \hbox (11.92642pt too wide) in paragraph at lines 1948--1948 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_integerarray_wdims_fs (s +elf, compression, binary_id, [] -Overfull \hbox (23.10123pt too wide) in paragraph at lines 1884--1884 -[][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *bo, int bolen) - } set_integerarray_wdims_fs; +Overfull \hbox (78.07565pt too wide) in paragraph at lines 1949--1949 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsigned, ( +size_t) elements, (const char *)byteorder, [] -Overfull \hbox (18.37628pt too wide) in paragraph at lines 1888--1888 -[][][] \OT1/cmtt/m/n/9 char *bo, int bolen, int dimfast, int dimmid -, int dimslow, int padding){ +Overfull \hbox (229.2739pt too wide) in paragraph at lines 1957--1957 +[][][] []\OT1/cmtt/m/n/9 "int elsize","int elsigned","int elements", "String by +teorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[],], [] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (21.37631pt too wide) in paragraph at lines 1996--1996 +[][][] []\OT1/cmtt/m/n/9 char *bo, int bolen, int dimfast, int dimm +id, int dimslow, int padding){ + [] + - [25] -Overfull \hbox (8.92639pt too wide) in paragraph at lines 1899--1899 -[][][] \OT1/cmtt/m/n/9 cbf_failnez(cbf_set_integerarray_wdims_fs (sel -f, compression, binary_id, +Overfull \hbox (30.8262pt too wide) in paragraph at lines 2008--2008 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) el +ements, (const char *)byteorder, [] -Overfull \hbox (75.07562pt too wide) in paragraph at lines 1900--1900 -[][][] \OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsigned, (si -ze_t) elements, (const char *)byteorder, +Overfull \hbox (158.39972pt too wide) in paragraph at lines 2016--2016 +[][][] []\OT1/cmtt/m/n/9 "int elsize","int elements", "String byteorder", "int +dimfast", "int dimmid", "int dimslow", "int padding"],[],], [] -Overfull \hbox (221.54892pt too wide) in paragraph at lines 1908--1908 -[][][] \OT1/cmtt/m/n/9 "int elsize","int elsigned","int elements", "String byte -order", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]], +Overfull \hbox (11.92642pt too wide) in paragraph at lines 2024--2024 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *data, int le +n) } set_realarray_wdims_sf; [] -Overfull \hbox (18.37628pt too wide) in paragraph at lines 1947--1947 -[][][] \OT1/cmtt/m/n/9 char *bo, int bolen, int dimfast, int dimmid -, int dimslow, int padding){ +Overfull \hbox (11.92642pt too wide) in paragraph at lines 2025--2025 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *bo, int bole +n) } set_realarray_wdims_sf; [] -Overfull \hbox (27.82617pt too wide) in paragraph at lines 1959--1959 -[][][] \OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) elem -ents, (const char *)byteorder, +Overfull \hbox (21.37631pt too wide) in paragraph at lines 2029--2029 +[][][] []\OT1/cmtt/m/n/9 char *bo, int bolen, int dimslow, int dimm +id, int dimfast, int padding){ [] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (30.8262pt too wide) in paragraph at lines 2041--2041 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) el +ements, (const char *)byteorder, + [] + - [26] -Overfull \hbox (150.67474pt too wide) in paragraph at lines 1967--1967 -[][][] \OT1/cmtt/m/n/9 "int elsize","int elements", "String byteorder", "int di -mfast", "int dimmid", "int dimslow", "int padding"],[]], +Overfull \hbox (7.20148pt too wide) in paragraph at lines 2042--2042 +[][][] []\OT1/cmtt/m/n/9 (size_t) dimslow, (size_t) dimmid, (size_t) +dimfast, (size_t)padding)); [] -Overfull \hbox (8.92639pt too wide) in paragraph at lines 1975--1975 -[][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *data, int len) - } set_realarray_wdims_sf; +Overfull \hbox (158.39972pt too wide) in paragraph at lines 2049--2049 +[][][] []\OT1/cmtt/m/n/9 "int elsize","int elements", "String byteorder", "int +dimslow", "int dimmid", "int dimfast", "int padding"],[],], [] -Overfull \hbox (8.92639pt too wide) in paragraph at lines 1976--1976 -[][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *bo, int bolen) - } set_realarray_wdims_sf; +Overfull \hbox (11.92642pt too wide) in paragraph at lines 2057--2057 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *data, int le +n) } set_realarray_wdims_fs; [] -Overfull \hbox (18.37628pt too wide) in paragraph at lines 1980--1980 -[][][] \OT1/cmtt/m/n/9 char *bo, int bolen, int dimslow, int dimmid -, int dimfast, int padding){ +Overfull \hbox (11.92642pt too wide) in paragraph at lines 2058--2058 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *bo, int bole +n) } set_realarray_wdims_fs; [] -Overfull \hbox (27.82617pt too wide) in paragraph at lines 1992--1992 -[][][] \OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) elem -ents, (const char *)byteorder, +Overfull \hbox (21.37631pt too wide) in paragraph at lines 2062--2062 +[][][] []\OT1/cmtt/m/n/9 char *bo, int bolen, int dimfast, int dimm +id, int dimslow, int padding){ [] -Overfull \hbox (4.20145pt too wide) in paragraph at lines 1993--1993 -[][][] \OT1/cmtt/m/n/9 (size_t) dimslow, (size_t) dimmid, (size_t) di -mfast, (size_t)padding)); +Overfull \hbox (30.8262pt too wide) in paragraph at lines 2074--2074 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) el +ements, (const char *)byteorder, [] -Overfull \hbox (150.67474pt too wide) in paragraph at lines 2000--2000 -[][][] \OT1/cmtt/m/n/9 "int elsize","int elements", "String byteorder", "int di -mslow", "int dimmid", "int dimfast", "int padding"],[]], +Overfull \hbox (7.20148pt too wide) in paragraph at lines 2075--2075 +[][][] []\OT1/cmtt/m/n/9 (size_t) dimfast, (size_t) dimmid, (size_t) +dimslow, (size_t)padding)); [] -Overfull \hbox (8.92639pt too wide) in paragraph at lines 2008--2008 -[][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *data, int len) - } set_realarray_wdims_fs; +Overfull \hbox (158.39972pt too wide) in paragraph at lines 2082--2082 +[][][] []\OT1/cmtt/m/n/9 "int elsize","int elements", "String byteorder", "int +dimfast", "int dimmid", "int dimslow", "int padding"],[],], [] -Overfull \hbox (8.92639pt too wide) in paragraph at lines 2009--2009 -[][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *bo, int bolen) - } set_realarray_wdims_fs; +Overfull \hbox (26.10126pt too wide) in paragraph at lines 2093--2093 +[][][] []\OT1/cmtt/m/n/9 char *data, int len, int elsize, int elsig +n, int ndimslow, int ndimfast){ [] -Overfull \hbox (18.37628pt too wide) in paragraph at lines 2013--2013 -[][][] \OT1/cmtt/m/n/9 char *bo, int bolen, int dimfast, int dimmid -, int dimslow, int padding){ +Overfull \hbox (7.20148pt too wide) in paragraph at lines 2102--2102 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_image (self, reserved, e +lement_number, compression, [] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (45.00104pt too wide) in paragraph at lines 2103--2103 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsign, (si +ze_t) ndimslow, (size_t)ndimfast)); + [] + - [27] -Overfull \hbox (27.82617pt too wide) in paragraph at lines 2025--2025 -[][][] \OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) elem -ents, (const char *)byteorder, +Overfull \hbox (26.10126pt too wide) in paragraph at lines 2121--2121 +[][][] []\OT1/cmtt/m/n/9 char *data, int len, int elsize, int elsig +n, int ndimfast, int ndimslow){ [] -Overfull \hbox (4.20145pt too wide) in paragraph at lines 2026--2026 -[][][] \OT1/cmtt/m/n/9 (size_t) dimfast, (size_t) dimmid, (size_t) di -mslow, (size_t)padding)); +Overfull \hbox (7.20148pt too wide) in paragraph at lines 2130--2130 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_image (self, reserved, e +lement_number, compression, [] -Overfull \hbox (150.67474pt too wide) in paragraph at lines 2033--2033 -[][][] \OT1/cmtt/m/n/9 "int elsize","int elements", "String byteorder", "int di -mfast", "int dimmid", "int dimslow", "int padding"],[]], +Overfull \hbox (45.00104pt too wide) in paragraph at lines 2131--2131 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsign, (si +ze_t) ndimfast, (size_t)ndimslow)); [] -Overfull \hbox (23.10123pt too wide) in paragraph at lines 2044--2044 -[][][] \OT1/cmtt/m/n/9 char *data, int len, int elsize, int elsign, - int ndimslow, int ndimfast){ +Overfull \hbox (26.10126pt too wide) in paragraph at lines 2149--2149 +[][][] []\OT1/cmtt/m/n/9 char *data, int len, int elsize, int elsig +n, int ndimslow, int ndimfast){ [] -Overfull \hbox (4.20145pt too wide) in paragraph at lines 2053--2053 -[][][] \OT1/cmtt/m/n/9 cbf_failnez(cbf_set_image (self, reserved, ele -ment_number, compression, +Overfull \hbox (21.37631pt too wide) in paragraph at lines 2158--2158 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_image_sf (self, reserved +, element_number, compression, [] -Overfull \hbox (42.001pt too wide) in paragraph at lines 2054--2054 -[][][] \OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsign, (size -_t) ndimslow, (size_t)ndimfast)); +Overfull \hbox (45.00104pt too wide) in paragraph at lines 2159--2159 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsign, (si +ze_t) ndimslow, (size_t)ndimfast)); [] -Overfull \hbox (23.10123pt too wide) in paragraph at lines 2072--2072 -[][][] \OT1/cmtt/m/n/9 char *data, int len, int elsize, int elsign, - int ndimfast, int ndimslow){ +Overfull \hbox (30.8262pt too wide) in paragraph at lines 2186--2186 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_real_image (self, reserv +ed, element_number, compression, [] -Overfull \hbox (4.20145pt too wide) in paragraph at lines 2081--2081 -[][][] \OT1/cmtt/m/n/9 cbf_failnez(cbf_set_image (self, reserved, ele -ment_number, compression, +Overfull \hbox (7.20148pt too wide) in paragraph at lines 2187--2187 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) nd +imslow, (size_t)ndimfast)); [] -Overfull \hbox (42.001pt too wide) in paragraph at lines 2082--2082 -[][][] \OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsign, (size -_t) ndimfast, (size_t)ndimslow)); +Overfull \hbox (45.00104pt too wide) in paragraph at lines 2214--2214 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_real_image_fs (self, res +erved, element_number, compression, [] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (7.20148pt too wide) in paragraph at lines 2215--2215 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) nd +imfast, (size_t)ndimslow)); + [] + - [28] -Overfull \hbox (23.10123pt too wide) in paragraph at lines 2100--2100 -[][][] \OT1/cmtt/m/n/9 char *data, int len, int elsize, int elsign, - int ndimslow, int ndimfast){ +Overfull \hbox (45.00104pt too wide) in paragraph at lines 2242--2242 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_real_image_sf (self, res +erved, element_number, compression, [] -Overfull \hbox (18.37628pt too wide) in paragraph at lines 2109--2109 -[][][] \OT1/cmtt/m/n/9 cbf_failnez(cbf_set_image_sf (self, reserved, -element_number, compression, +Overfull \hbox (7.20148pt too wide) in paragraph at lines 2243--2243 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) nd +imslow, (size_t)ndimfast)); [] -Overfull \hbox (42.001pt too wide) in paragraph at lines 2110--2110 -[][][] \OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsign, (size -_t) ndimslow, (size_t)ndimfast)); +Overfull \hbox (87.52554pt too wide) in paragraph at lines 2261--2261 +[][][] []\OT1/cmtt/m/n/9 char *data, int len, int elsize, int elsig +n, int ndimslow, int ndimmid, int ndimfast){ [] -Overfull \hbox (27.82617pt too wide) in paragraph at lines 2137--2137 -[][][] \OT1/cmtt/m/n/9 cbf_failnez(cbf_set_real_image (self, reserved +Overfull \hbox (21.37631pt too wide) in paragraph at lines 2270--2270 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_3d_image (self, reserved , element_number, compression, [] -Overfull \hbox (4.20145pt too wide) in paragraph at lines 2138--2138 -[][][] \OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) ndim -slow, (size_t)ndimfast)); +Overfull \hbox (130.05005pt too wide) in paragraph at lines 2271--2271 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsign, (si +ze_t) ndimslow, (size_t) ndimmid, (size_t)ndimfast)); [] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (87.52554pt too wide) in paragraph at lines 2289--2289 +[][][] []\OT1/cmtt/m/n/9 char *data, int len, int elsize, int elsig +n, int ndimfast, int ndimmid, int ndimslow){ + [] + - [29] -Overfull \hbox (42.001pt too wide) in paragraph at lines 2165--2165 -[][][] \OT1/cmtt/m/n/9 cbf_failnez(cbf_set_real_image_fs (self, reser +Overfull \hbox (35.55115pt too wide) in paragraph at lines 2298--2298 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_3d_image_fs (self, reser ved, element_number, compression, [] -Overfull \hbox (4.20145pt too wide) in paragraph at lines 2166--2166 -[][][] \OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) ndim -fast, (size_t)ndimslow)); +Overfull \hbox (130.05005pt too wide) in paragraph at lines 2299--2299 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsign, (si +ze_t) ndimfast, (size_t) ndimmid, (size_t)ndimslow)); [] -Overfull \hbox (42.001pt too wide) in paragraph at lines 2193--2193 -[][][] \OT1/cmtt/m/n/9 cbf_failnez(cbf_set_real_image_sf (self, reser +Overfull \hbox (87.52554pt too wide) in paragraph at lines 2317--2317 +[][][] []\OT1/cmtt/m/n/9 char *data, int len, int elsize, int elsig +n, int ndimslow, int ndimmid, int ndimfast){ + [] + + +Overfull \hbox (35.55115pt too wide) in paragraph at lines 2326--2326 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_3d_image_sf (self, reser ved, element_number, compression, [] -Overfull \hbox (4.20145pt too wide) in paragraph at lines 2194--2194 -[][][] \OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) ndim -slow, (size_t)ndimfast)); +Overfull \hbox (130.05005pt too wide) in paragraph at lines 2327--2327 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsign, (si +ze_t) ndimslow, (size_t) ndimmid, (size_t)ndimfast)); [] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (2.47653pt too wide) in paragraph at lines 2341--2341 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *data, int le +n) } set_real_3d_image_sf; + [] - [30] -Overfull \hbox (84.52551pt too wide) in paragraph at lines 2212--2212 -[][][] \OT1/cmtt/m/n/9 char *data, int len, int elsize, int elsign, - int ndimslow, int ndimmid, int ndimfast){ + +Overfull \hbox (30.8262pt too wide) in paragraph at lines 2345--2345 +[][][] []\OT1/cmtt/m/n/9 char *data, int len, int elsize, int ndims +low, int ndimmid, int ndimfast){ [] -Overfull \hbox (18.37628pt too wide) in paragraph at lines 2221--2221 -[][][] \OT1/cmtt/m/n/9 cbf_failnez(cbf_set_3d_image (self, reserved, -element_number, compression, +Overfull \hbox (45.00104pt too wide) in paragraph at lines 2354--2354 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_real_3d_image (self, res +erved, element_number, compression, [] -Overfull \hbox (127.05002pt too wide) in paragraph at lines 2222--2222 -[][][] \OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsign, (size -_t) ndimslow, (size_t) ndimmid, (size_t)ndimfast)); +Overfull \hbox (87.52554pt too wide) in paragraph at lines 2355--2355 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) nd +imslow, (size_t)ndimmid, (size_t)ndimfast)); [] -Overfull \hbox (84.52551pt too wide) in paragraph at lines 2240--2240 -[][][] \OT1/cmtt/m/n/9 char *data, int len, int elsize, int elsign, - int ndimfast, int ndimmid, int ndimslow){ +Overfull \hbox (2.47653pt too wide) in paragraph at lines 2369--2369 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *data, int le +n) } set_real_3d_image_fs; [] -Overfull \hbox (32.55112pt too wide) in paragraph at lines 2249--2249 -[][][] \OT1/cmtt/m/n/9 cbf_failnez(cbf_set_3d_image_fs (self, reserve -d, element_number, compression, +Overfull \hbox (30.8262pt too wide) in paragraph at lines 2373--2373 +[][][] []\OT1/cmtt/m/n/9 char *data, int len, int elsize, int ndimf +ast, int ndimmid, int ndimslow){ [] -Overfull \hbox (127.05002pt too wide) in paragraph at lines 2250--2250 -[][][] \OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsign, (size -_t) ndimfast, (size_t) ndimmid, (size_t)ndimslow)); +Overfull \hbox (59.17587pt too wide) in paragraph at lines 2382--2382 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_real_3d_image_fs (self, +reserved, element_number, compression, [] -Overfull \hbox (84.52551pt too wide) in paragraph at lines 2268--2268 -[][][] \OT1/cmtt/m/n/9 char *data, int len, int elsize, int elsign, - int ndimslow, int ndimmid, int ndimfast){ +Overfull \hbox (87.52554pt too wide) in paragraph at lines 2383--2383 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) nd +imfast, (size_t)ndimmid, (size_t)ndimslow)); [] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (2.47653pt too wide) in paragraph at lines 2397--2397 +[][][][]\OT1/cmtt/m/n/9 %apply (char *STRING, int LENGTH) { (char *data, int le +n) } set_real_3d_image_sf; + [] - [31] -Overfull \hbox (32.55112pt too wide) in paragraph at lines 2277--2277 -[][][] \OT1/cmtt/m/n/9 cbf_failnez(cbf_set_3d_image_sf (self, reserve -d, element_number, compression, + +Overfull \hbox (30.8262pt too wide) in paragraph at lines 2401--2401 +[][][] []\OT1/cmtt/m/n/9 char *data, int len, int elsize, int ndims +low, int ndimmid, int ndimfast){ [] -Overfull \hbox (127.05002pt too wide) in paragraph at lines 2278--2278 -[][][] \OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, elsign, (size -_t) ndimslow, (size_t) ndimmid, (size_t)ndimfast)); +Overfull \hbox (59.17587pt too wide) in paragraph at lines 2410--2410 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_real_3d_image_sf (self, +reserved, element_number, compression, [] -Overfull \hbox (27.82617pt too wide) in paragraph at lines 2296--2296 -[][][] \OT1/cmtt/m/n/9 char *data, int len, int elsize, int ndimslo -w, int ndimmid, int ndimfast){ +Overfull \hbox (87.52554pt too wide) in paragraph at lines 2411--2411 +[][][] []\OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) nd +imslow, (size_t)ndimmid, (size_t)ndimfast)); [] -Overfull \hbox (42.001pt too wide) in paragraph at lines 2305--2305 -[][][] \OT1/cmtt/m/n/9 cbf_failnez(cbf_set_real_3d_image (self, reser -ved, element_number, compression, +Overfull \hbox (16.65137pt too wide) in paragraph at lines 2423--2423 +[][][] []\OT1/cmtt/m/n/9 void get_image_size(unsigned int element_number, i +nt *ndimslow, int *ndimfast){ [] -Overfull \hbox (84.52551pt too wide) in paragraph at lines 2306--2306 -[][][] \OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) ndim -slow, (size_t)ndimmid, (size_t)ndimfast)); +Overfull \hbox (26.10126pt too wide) in paragraph at lines 2427--2427 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_get_image_size(self,reserved,el +ement_number,&inslow,&infast)); [] -Overfull \hbox (27.82617pt too wide) in paragraph at lines 2324--2324 -[][][] \OT1/cmtt/m/n/9 char *data, int len, int elsize, int ndimfas -t, int ndimmid, int ndimslow){ +Overfull \hbox (7.20148pt too wide) in paragraph at lines 2431--2431 +[][][][]\OT1/cmtt/m/n/9 ""","get_image_size",["Integer element_number"],["size_ +t ndim1","size_t ndim2"],], [] -Overfull \hbox (56.17584pt too wide) in paragraph at lines 2333--2333 -[][][] \OT1/cmtt/m/n/9 cbf_failnez(cbf_set_real_3d_image_fs (self, re -served, element_number, compression, +Overfull \hbox (30.8262pt too wide) in paragraph at lines 2436--2436 +[][][] []\OT1/cmtt/m/n/9 void get_image_size_fs(unsigned int element_number +, int *ndimfast, int *ndimslow){ [] -Overfull \hbox (84.52551pt too wide) in paragraph at lines 2334--2334 -[][][] \OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) ndim -fast, (size_t)ndimmid, (size_t)ndimslow)); +Overfull \hbox (40.2761pt too wide) in paragraph at lines 2440--2440 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_get_image_size_fs(self,reserved +,element_number,&infast,&inslow)); [] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (49.72598pt too wide) in paragraph at lines 2444--2444 +[][][][]\OT1/cmtt/m/n/9 ""","get_image_size_fs",["Integer element_number"],["si +ze_t ndimfast","size_t ndimslow"],], + [] + - [32] -Overfull \hbox (27.82617pt too wide) in paragraph at lines 2352--2352 -[][][] \OT1/cmtt/m/n/9 char *data, int len, int elsize, int ndimslo -w, int ndimmid, int ndimfast){ +Overfull \hbox (30.8262pt too wide) in paragraph at lines 2449--2449 +[][][] []\OT1/cmtt/m/n/9 void get_image_size_sf(unsigned int element_number +, int *ndimslow, int *ndimfast){ [] -Overfull \hbox (56.17584pt too wide) in paragraph at lines 2361--2361 -[][][] \OT1/cmtt/m/n/9 cbf_failnez(cbf_set_real_3d_image_sf (self, re -served, element_number, compression, +Overfull \hbox (26.10126pt too wide) in paragraph at lines 2453--2453 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_get_image_size(self,reserved,el +ement_number,&inslow,&infast)); [] -Overfull \hbox (84.52551pt too wide) in paragraph at lines 2362--2362 -[][][] \OT1/cmtt/m/n/9 (void *) data, (size_t) elsize, (size_t) ndim -slow, (size_t)ndimmid, (size_t)ndimfast)); +Overfull \hbox (49.72598pt too wide) in paragraph at lines 2457--2457 +[][][][]\OT1/cmtt/m/n/9 ""","get_image_size_sf",["Integer element_number"],["si +ze_t ndimslow","size_t ndimfast"],], [] -Overfull \hbox (13.65134pt too wide) in paragraph at lines 2374--2374 -[][][] \OT1/cmtt/m/n/9 void get_image_size(unsigned int element_number, int - *ndimslow, int *ndimfast){ +Overfull \hbox (7.20148pt too wide) in paragraph at lines 2461--2461 +[][][][]\OT1/cmtt/m/n/9 %apply int *OUTPUT {int *ndimslow, int *ndimmid, int *n +dimfast} get_3d_image_size; [] -Overfull \hbox (23.10123pt too wide) in paragraph at lines 2378--2378 -[][][] \OT1/cmtt/m/n/9 cbf_failnez(cbf_get_image_size(self,reserved,elem -ent_number,&inslow,&infast)); +Overfull \hbox (96.97543pt too wide) in paragraph at lines 2462--2462 +[][][] []\OT1/cmtt/m/n/9 void get_3d_image_size(unsigned int element_number +, int *ndimslow, int *ndimmid, int *ndimfast){ [] -Overfull \hbox (27.82617pt too wide) in paragraph at lines 2387--2387 -[][][] \OT1/cmtt/m/n/9 void get_image_size_fs(unsigned int element_number, -int *ndimfast, int *ndimslow){ +Overfull \hbox (73.35071pt too wide) in paragraph at lines 2466--2466 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_get_3d_image_size(self,reserved +,element_number,&inslow,&inmid,&infast)); [] -Overfull \hbox (37.27606pt too wide) in paragraph at lines 2391--2391 -[][][] \OT1/cmtt/m/n/9 cbf_failnez(cbf_get_image_size_fs(self,reserved,e -lement_number,&infast,&inslow)); +Overfull \hbox (130.05005pt too wide) in paragraph at lines 2471--2471 +[][][][]\OT1/cmtt/m/n/9 ""","get_3d_image_size",["Integer element_number"],["si +ze_t ndimslow","size_t ndimmid","size_t ndimfast"],], [] -Overfull \hbox (42.001pt too wide) in paragraph at lines 2395--2395 -[][][]\OT1/cmtt/m/n/9 ""","get_image_size_fs",["Integer element_number"],["size -_t ndimfast","size_t ndimslow"]], +Overfull \hbox (7.20148pt too wide) in paragraph at lines 2475--2475 +[][][][]\OT1/cmtt/m/n/9 %apply int *OUTPUT {int *ndimslow, int *ndimmid, int *n +dimfast} get_3d_image_size; [] -Overfull \hbox (27.82617pt too wide) in paragraph at lines 2400--2400 -[][][] \OT1/cmtt/m/n/9 void get_image_size_sf(unsigned int element_number, -int *ndimslow, int *ndimfast){ +Overfull \hbox (111.15027pt too wide) in paragraph at lines 2476--2476 +[][][] []\OT1/cmtt/m/n/9 void get_3d_image_size_fs(unsigned int element_num +ber, int *ndimfast, int *ndimmid, int *ndimslow){ [] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (87.52554pt too wide) in paragraph at lines 2480--2480 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_get_3d_image_size_fs(self,reser +ved,element_number,&infast,&inmid,&inslow)); + [] + - [33] -Overfull \hbox (23.10123pt too wide) in paragraph at lines 2404--2404 -[][][] \OT1/cmtt/m/n/9 cbf_failnez(cbf_get_image_size(self,reserved,elem -ent_number,&inslow,&infast)); +Overfull \hbox (130.05005pt too wide) in paragraph at lines 2485--2485 +[][][][]\OT1/cmtt/m/n/9 ""","get_3d_image_size",["Integer element_number"],["si +ze_t ndimfast","size_t ndimmid","size_t ndimslow"],], [] -Overfull \hbox (42.001pt too wide) in paragraph at lines 2408--2408 -[][][]\OT1/cmtt/m/n/9 ""","get_image_size_sf",["Integer element_number"],["size -_t ndimslow","size_t ndimfast"]], +Overfull \hbox (21.37631pt too wide) in paragraph at lines 2489--2489 +[][][][]\OT1/cmtt/m/n/9 %apply int *OUTPUT {int *ndimslow, int *ndimmid, int *n +dimfast} get_3d_image_size_sf; [] -Overfull \hbox (4.20145pt too wide) in paragraph at lines 2412--2412 -[][][]\OT1/cmtt/m/n/9 %apply int *OUTPUT {int *ndimslow, int *ndimmid, int *ndi -mfast} get_3d_image_size; +Overfull \hbox (111.15027pt too wide) in paragraph at lines 2490--2490 +[][][] []\OT1/cmtt/m/n/9 void get_3d_image_size_sf(unsigned int element_num +ber, int *ndimslow, int *ndimmid, int *ndimfast){ [] -Overfull \hbox (93.9754pt too wide) in paragraph at lines 2413--2413 -[][][] \OT1/cmtt/m/n/9 void get_3d_image_size(unsigned int element_number, -int *ndimslow, int *ndimmid, int *ndimfast){ +Overfull \hbox (87.52554pt too wide) in paragraph at lines 2494--2494 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_get_3d_image_size_sf(self,reser +ved,element_number,&inslow,&inmid,&infast)); [] -Overfull \hbox (70.35068pt too wide) in paragraph at lines 2417--2417 -[][][] \OT1/cmtt/m/n/9 cbf_failnez(cbf_get_3d_image_size(self,reserved,e -lement_number,&inslow,&inmid,&infast)); +Overfull \hbox (144.22488pt too wide) in paragraph at lines 2499--2499 +[][][][]\OT1/cmtt/m/n/9 ""","get_3d_image_size_sf",["Integer element_number"],[ +"size_t ndimslow","size_t ndimmid","size_t ndimfast"],], [] -Overfull \hbox (122.32507pt too wide) in paragraph at lines 2422--2422 -[][][]\OT1/cmtt/m/n/9 ""","get_3d_image_size",["Integer element_number"],["size -_t ndimslow","size_t ndimmid","size_t ndimfast"]], +Overfull \hbox (7.20148pt too wide) in paragraph at lines 2847--2847 +[][][][]\OT1/cmtt/m/n/9 ""","get_axis_ancestor",["String axis_id", "Integer anc +estor_index"],["String"],], [] -Overfull \hbox (4.20145pt too wide) in paragraph at lines 2426--2426 -[][][]\OT1/cmtt/m/n/9 %apply int *OUTPUT {int *ndimslow, int *ndimmid, int *ndi -mfast} get_3d_image_size; +Overfull \hbox (40.2761pt too wide) in paragraph at lines 2879--2879 +[][][][]\OT1/cmtt/m/n/9 %apply double *OUTPUT {double *offset1, double *offset2 +, double offset3} get_axis_offset; [] -Overfull \hbox (108.15024pt too wide) in paragraph at lines 2427--2427 -[][][] \OT1/cmtt/m/n/9 void get_3d_image_size_fs(unsigned int element_numbe -r, int *ndimfast, int *ndimmid, int *ndimslow){ +Overfull \hbox (40.2761pt too wide) in paragraph at lines 2920--2920 +[][][][]\OT1/cmtt/m/n/9 %apply double *OUTPUT {double *vector1, double *vector2 +, double vector3} get_axis_vector; [] -Overfull \hbox (84.52551pt too wide) in paragraph at lines 2431--2431 -[][][] \OT1/cmtt/m/n/9 cbf_failnez(cbf_get_3d_image_size_fs(self,reserve -d,element_number,&infast,&inmid,&inslow)); +Overfull \hbox (35.55115pt too wide) in paragraph at lines 3067--3067 +[][][] []\OT1/cmtt/m/n/9 [],["Float a", "Float b", "Float c", "Float alpha", + "Float beta", "Float gamma" ] ], [] -Overfull \hbox (122.32507pt too wide) in paragraph at lines 2436--2436 -[][][]\OT1/cmtt/m/n/9 ""","get_3d_image_size",["Integer element_number"],["size -_t ndimfast","size_t ndimmid","size_t ndimslow"]], +Overfull \hbox (144.22488pt too wide) in paragraph at lines 3102--3102 +[][][] []\OT1/cmtt/m/n/9 [],["Float astar", "Float bstar", "Float cstar", "F +loat alphastar", "Float betastar", "Float gammastar"] ], [] -Overfull \hbox (18.37628pt too wide) in paragraph at lines 2440--2440 -[][][]\OT1/cmtt/m/n/9 %apply int *OUTPUT {int *ndimslow, int *ndimmid, int *ndi -mfast} get_3d_image_size_sf; +Overfull \hbox (7.20148pt too wide) in paragraph at lines 3106--3106 +[][][] []\OT1/cmtt/m/n/9 double *alpha_esd, double *beta_esd, double *gamma_es +d} get_reciprocal_cell_esd; [] -Overfull \hbox (108.15024pt too wide) in paragraph at lines 2441--2441 -[][][] \OT1/cmtt/m/n/9 void get_3d_image_size_sf(unsigned int element_numbe -r, int *ndimslow, int *ndimmid, int *ndimfast){ +Overfull \hbox (7.20148pt too wide) in paragraph at lines 3220--3220 +[][][][]\OT1/cmtt/m/n/9 ""","cbf_require_category_root",["String Categoryname"] +,["String categoryroot"],], [] -Overfull \hbox (84.52551pt too wide) in paragraph at lines 2445--2445 -[][][] \OT1/cmtt/m/n/9 cbf_failnez(cbf_get_3d_image_size_sf(self,reserve -d,element_number,&inslow,&inmid,&infast)); +Overfull \hbox (45.00104pt too wide) in paragraph at lines 3237--3237 +[][][] []\OT1/cmtt/m/n/9 void set_bin_sizes( int element_number, double slowb +insize_in, double fastbinsize_in) { [] -Overfull \hbox (136.49991pt too wide) in paragraph at lines 2450--2450 -[][][]\OT1/cmtt/m/n/9 ""","get_3d_image_size_sf",["Integer element_number"],["s -ize_t ndimslow","size_t ndimmid","size_t ndimfast"]], +Overfull \hbox (30.8262pt too wide) in paragraph at lines 3238--3238 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_set_bin_sizes(self,element_number, +slowbinsize_in,fastbinsize_in)); [] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (82.8006pt too wide) in paragraph at lines 3240--3240 +[][][][]\OT1/cmtt/m/n/9 ""","set_bin_sizes",["Integer element_number","Float sl +owbinsize_in","Float fastbinsize_in"],[] ], + [] - [34] -Underfull \vbox (badness 10000) has occurred while \output is active [] - [35] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (16.65137pt too wide) in paragraph at lines 3245--3245 +[][][] []\OT1/cmtt/m/n/9 void get_bin_sizes(int element_number, double *slowbi +nsize, double *fastbinsize) { + [] - [36] -Underfull \vbox (badness 10000) has occurred while \output is active [] - [37] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (82.8006pt too wide) in paragraph at lines 3246--3246 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_get_bin_sizes (self, (unsigned int) +element_number, slowbinsize, fastbinsize)); + [] - [38] -Underfull \vbox (badness 10000) has occurred while \output is active [] - [39] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (49.72598pt too wide) in paragraph at lines 3248--3248 +[][][][]\OT1/cmtt/m/n/9 ""","get_bin_sizes",["Integer element_number"],["Float +slowbinsize","Float fastbinsize"] ], + [] - [40] -Underfull \vbox (badness 10000) has occurred while \output is active [] - [41] -Overfull \hbox (32.55112pt too wide) in paragraph at lines 2915--2915 -[][][] \OT1/cmtt/m/n/9 [],["Float a", "Float b", "Float c", "Float alpha", " -Float beta", "Float gamma" ] ], +Overfull \hbox (2.47653pt too wide) in paragraph at lines 3300--3300 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_construct_reference_detector(self,& +detector,element_number)); [] -Overfull \hbox (141.22485pt too wide) in paragraph at lines 2950--2950 -[][][] \OT1/cmtt/m/n/9 [],["Float astar", "Float bstar", "Float cstar", "Flo -at alphastar", "Float betastar", "Float gammastar"] ], +Overfull \hbox (45.00104pt too wide) in paragraph at lines 3303--3303 +[][][][]\OT1/cmtt/m/n/9 ""","construct_reference_detector",["Integer element_nu +mber"],["pycbf detector object"],], [] -Overfull \hbox (4.20145pt too wide) in paragraph at lines 2954--2954 -[][][] \OT1/cmtt/m/n/9 double *alpha_esd, double *beta_esd, double *gamma_esd} - get_reciprocal_cell_esd; +Overfull \hbox (35.55115pt too wide) in paragraph at lines 3311--3311 +[][][][]\OT1/cmtt/m/n/9 ""","require_reference_detector",["Integer element_numb +er"],["pycbf detector object"],], [] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (26.10126pt too wide) in paragraph at lines 3336--3336 +[][][][]\OT1/cmtt/m/n/9 ""","construct_reference_positioner",["String axis_id"] +,["pycbf positioner object"],], + [] - [42] -Underfull \vbox (badness 10000) has occurred while \output is active [] - [43] -Overfull \hbox (42.001pt too wide) in paragraph at lines 3085--3085 -[][][] \OT1/cmtt/m/n/9 void set_bin_sizes( int element_number, double slowbin -size_in, double fastbinsize_in) { +Overfull \hbox (7.20148pt too wide) in paragraph at lines 3342--3342 +[][][] []\OT1/cmtt/m/n/9 void get_axis_reference_poise(double *vector1, double + *vector2, double *vector3, [] -Overfull \hbox (27.82617pt too wide) in paragraph at lines 3086--3086 -[][][] \OT1/cmtt/m/n/9 cbf_failnez(cbf_set_bin_sizes(self,element_number,sl -owbinsize_in,fastbinsize_in)); +Overfull \hbox (2.47653pt too wide) in paragraph at lines 3517--3517 +[][][] []\OT1/cmtt/m/n/9 if args[1].find("cbf")==-1: # but do not try +the goniometer constructor [] -Overfull \hbox (79.80057pt too wide) in paragraph at lines 3088--3088 -[][][]\OT1/cmtt/m/n/9 ""","set_bin_sizes",["Integer element_number","Float slow -binsize_in","Float fastbinsize_in"],[] ], +Overfull \hbox (243.44873pt too wide) in paragraph at lines 3613--3613 +[][][] []\OT1/cmtt/m/n/9 %apply double *OUTPUT {double * vector1, double * vec +tor2, double * vector3, double * offset1, double * offset2, double * offset3, + [] -Overfull \hbox (13.65134pt too wide) in paragraph at lines 3093--3093 -[][][] \OT1/cmtt/m/n/9 void get_bin_sizes(int element_number, double *slowbins -ize, double *fastbinsize) { +Overfull \hbox (7.20148pt too wide) in paragraph at lines 3715--3715 +[][][] []\OT1/cmtt/m/n/9 indexfast,indexslow +,normal1,normal2,normal3)); [] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (7.20148pt too wide) in paragraph at lines 3727--3727 +[][][] []\OT1/cmtt/m/n/9 indexslow,indexfast +,normal1,normal2,normal3)); + [] + - [44] -Overfull \hbox (79.80057pt too wide) in paragraph at lines 3094--3094 -[][][] \OT1/cmtt/m/n/9 cbf_failnez(cbf_get_bin_sizes (self, (unsigned int)el -ement_number, slowbinsize, fastbinsize)); +Overfull \hbox (45.00104pt too wide) in paragraph at lines 3736--3736 +[][][] []\OT1/cmtt/m/n/9 void get_detector_axis_slow ( double *slowaxis1, dou +ble *slowaxis2, double *slowaxis3){ [] -Overfull \hbox (46.72595pt too wide) in paragraph at lines 3096--3096 -[][][]\OT1/cmtt/m/n/9 ""","get_bin_sizes",["Integer element_number"],["Float sl -owbinsize","Float fastbinsize"] ], +Overfull \hbox (45.00104pt too wide) in paragraph at lines 3746--3746 +[][][] []\OT1/cmtt/m/n/9 void get_detector_axis_fast ( double *fastaxis1, dou +ble *fastaxis2, double *fastaxis3){ [] -Overfull \hbox (37.27606pt too wide) in paragraph at lines 3151--3151 -[][][]\OT1/cmtt/m/n/9 ""","construct_reference_detector",["Integer element_numb -er"],["pycbf detector object"]], +Overfull \hbox (16.65137pt too wide) in paragraph at lines 3757--3757 +[][][] []\OT1/cmtt/m/n/9 void get_detector_axes ( double *slowaxis1, double * +slowaxis2, double *slowaxis3, [] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (21.37631pt too wide) in paragraph at lines 3758--3758 +[][][] []\OT1/cmtt/m/n/9 double *fastaxis1, double * +fastaxis2, double *fastaxis3){ + [] - [45] -Overfull \hbox (27.82617pt too wide) in paragraph at lines 3159--3159 -[][][]\OT1/cmtt/m/n/9 ""","require_reference_detector",["Integer element_number -"],["pycbf detector object"]], + +Overfull \hbox (30.8262pt too wide) in paragraph at lines 3771--3771 +[][][] []\OT1/cmtt/m/n/9 void get_detector_axes_fs ( double *fastaxis1, doubl +e *fastaxis2, double *fastaxis3, [] -Overfull \hbox (18.37628pt too wide) in paragraph at lines 3184--3184 -[][][]\OT1/cmtt/m/n/9 ""","construct_reference_positioner",["String axis_id"],[ -"pycbf positioner object"]], +Overfull \hbox (35.55115pt too wide) in paragraph at lines 3772--3772 +[][][] []\OT1/cmtt/m/n/9 double *slowaxis1, doubl +e *slowaxis2, double *slowaxis3){ [] -Overfull \hbox (4.20145pt too wide) in paragraph at lines 3190--3190 -[][][] \OT1/cmtt/m/n/9 void get_axis_reference_poise(double *vector1, double * -vector2, double *vector3, +Overfull \hbox (30.8262pt too wide) in paragraph at lines 3785--3785 +[][][] []\OT1/cmtt/m/n/9 void get_detector_axes_sf ( double *slowaxis1, doubl +e *slowaxis2, double *slowaxis3, [] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (21.37631pt too wide) in paragraph at lines 3786--3786 +[][][] []\OT1/cmtt/m/n/9 double *fastaxis1, double * +fastaxis2, double *fastaxis3){ + [] - [46] -Underfull \vbox (badness 10000) has occurred while \output is active [] - [47] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (11.92642pt too wide) in paragraph at lines 3829--3829 +[][][] []\OT1/cmtt/m/n/9 indexfast, index +slow, area,projected_area)); + [] - [48] -Underfull \vbox (badness 10000) has occurred while \output is active [] - [49] -Overfull \hbox (240.4487pt too wide) in paragraph at lines 3461--3461 -[][][] \OT1/cmtt/m/n/9 %apply double *OUTPUT {double * vector1, double * vecto -r2, double * vector3, double * offset1, double * offset2, double * offset3, +Overfull \hbox (11.92642pt too wide) in paragraph at lines 3840--3840 +[][][] []\OT1/cmtt/m/n/9 indexslow, index +fast, area,projected_area)); [] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (163.12466pt too wide) in paragraph at lines 3887--3887 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_get_pixel_coordinates_fs(self, in +dexfast, indexslow, coordinate1, coordinate2, coordinate3)); + [] - [50] -Underfull \vbox (badness 10000) has occurred while \output is active [] - [51] -Overfull \hbox (4.20145pt too wide) in paragraph at lines 3563--3563 -[][][] \OT1/cmtt/m/n/9 indexfast,indexslow,n -ormal1,normal2,normal3)); +Overfull \hbox (163.12466pt too wide) in paragraph at lines 3900--3900 +[][][] []\OT1/cmtt/m/n/9 cbf_failnez(cbf_get_pixel_coordinates_sf(self, in +dexslow, indexfast, coordinate1, coordinate2, coordinate3)); [] -Overfull \hbox (4.20145pt too wide) in paragraph at lines 3575--3575 -[][][] \OT1/cmtt/m/n/9 indexslow,indexfast,n -ormal1,normal2,normal3)); +Overfull \hbox (16.65137pt too wide) in paragraph at lines 3927--3927 +[][][][]\OT1/cmtt/m/n/9 ["double indexfast", "double indexslow", "double center +fast","double centerslow"],], [] -Overfull \hbox (42.001pt too wide) in paragraph at lines 3584--3584 -[][][] \OT1/cmtt/m/n/9 void get_detector_axis_slow ( double *slowaxis1, doubl -e *slowaxis2, double *slowaxis3){ +Overfull \hbox (16.65137pt too wide) in paragraph at lines 3939--3939 +[][][][]\OT1/cmtt/m/n/9 ["double indexslow", "double indexfast", "double center +slow","double centerfast"],], [] -Overfull \hbox (42.001pt too wide) in paragraph at lines 3594--3594 -[][][] \OT1/cmtt/m/n/9 void get_detector_axis_fast ( double *fastaxis1, doubl -e *fastaxis2, double *fastaxis3){ +Overfull \hbox (30.8262pt too wide) in paragraph at lines 3949--3949 +[][][][]\OT1/cmtt/m/n/9 ["double indexslow", "double indexfast", "double center +slow","double centerfast"],[],], [] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (30.8262pt too wide) in paragraph at lines 3959--3959 +[][][][]\OT1/cmtt/m/n/9 ["double indexfast", "double indexslow", "double center +fast","double centerslow"],[],], + [] + - [52] -Overfull \hbox (13.65134pt too wide) in paragraph at lines 3605--3605 -[][][] \OT1/cmtt/m/n/9 void get_detector_axes ( double *slowaxis1, double *sl -owaxis2, double *slowaxis3, +Overfull \hbox (30.8262pt too wide) in paragraph at lines 3969--3969 +[][][][]\OT1/cmtt/m/n/9 ["double indexslow", "double indexfast", "double center +slow","double centerfast"],[],], [] -Overfull \hbox (18.37628pt too wide) in paragraph at lines 3606--3606 -[][][] \OT1/cmtt/m/n/9 double *fastaxis1, double *fa -staxis2, double *fastaxis3){ +Overfull \hbox (30.8262pt too wide) in paragraph at lines 3979--3979 +[][][][]\OT1/cmtt/m/n/9 ["double indexslow", "double indexfast", "double center +slow","double centerfast"],[],], [] -Overfull \hbox (27.82617pt too wide) in paragraph at lines 3619--3619 -[][][] \OT1/cmtt/m/n/9 void get_detector_axes_fs ( double *fastaxis1, double -*fastaxis2, double *fastaxis3, +Overfull \hbox (30.8262pt too wide) in paragraph at lines 3989--3989 +[][][][]\OT1/cmtt/m/n/9 ["double indexfast", "double indexslow", "double center +fast","double centerslow"],[],], [] -Overfull \hbox (32.55112pt too wide) in paragraph at lines 3620--3620 -[][][] \OT1/cmtt/m/n/9 double *slowaxis1, double -*slowaxis2, double *slowaxis3){ +Overfull \hbox (30.8262pt too wide) in paragraph at lines 3999--3999 +[][][][]\OT1/cmtt/m/n/9 ["double indexslow", "double indexfast", "double center +slow","double centerfast"],[],], [] -Overfull \hbox (27.82617pt too wide) in paragraph at lines 3633--3633 -[][][] \OT1/cmtt/m/n/9 void get_detector_axes_sf ( double *slowaxis1, double -*slowaxis2, double *slowaxis3, +Overfull \hbox (49.72598pt too wide) in paragraph at lines 4200--4200 +[][][] []\OT1/cmtt/m/n/9 void compute_reciprocal_cell(double cell[6], double * +astar, double *bstar, double *cstar, [] -Overfull \hbox (18.37628pt too wide) in paragraph at lines 3634--3634 -[][][] \OT1/cmtt/m/n/9 double *fastaxis1, double *fa -staxis2, double *fastaxis3){ +Overfull \hbox (111.15027pt too wide) in paragraph at lines 4214--4214 +[][][][]\OT1/cmtt/m/n/9 ["Float astar", "Float bstar", "Float cstar", "Float al +phastar", "Float betastar", "Float gammastar"] ], [] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (106.42532pt too wide) in paragraph at lines 4225--4225 +[][][][]\OT1/cmtt/m/n/9 ""","airy_disk",["double x", "double y", "double cenx", + "double ceny", "double volume", "double fwhm"], + [] + - [53] -Overfull \hbox (8.92639pt too wide) in paragraph at lines 3661--3661 -[][][] \OT1/cmtt/m/n/9 indexfast, indexsl -ow, area,projected_area)); +Overfull \hbox (21.37631pt too wide) in paragraph at lines 4233--4233 +[][][][]\OT1/cmtt/m/n/9 cbf_failnez(cbf_airy_disk_volume(xlo,ylo,xhi,yhi,cenx,c +eny,volumein,fwhm,volumeout)); [] -Overfull \hbox (8.92639pt too wide) in paragraph at lines 3672--3672 -[][][] \OT1/cmtt/m/n/9 indexslow, indexfa -st, area,projected_area)); +Overfull \hbox (300.14807pt too wide) in paragraph at lines 4237--4237 +[][][][]\OT1/cmtt/m/n/9 ""","airy_disk_volume",["double xlo", "double ylo", "do +uble xhi", "double yhi", "double cenx", "double ceny", "double volumein", "doub +le fwhm"], [] -Overfull \hbox (160.12463pt too wide) in paragraph at lines 3719--3719 -[][][] \OT1/cmtt/m/n/9 cbf_failnez(cbf_get_pixel_coordinates_fs(self, inde -xfast, indexslow, coordinate1, coordinate2, coordinate3)); +Overfull \hbox (16.65137pt too wide) in paragraph at lines 4326--4326 +[][][] []\OT1/cmtt/m/n/9 cbf_handle_wrapper.wrap("cbf_get_unit_cell_e +sd",prototype,args,docstring) [] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (45.00104pt too wide) in paragraph at lines 4328--4328 +[][][] []\OT1/cmtt/m/n/9 cbf_handle_wrapper.wrap("cbf_get_reciprocal_ +cell_esd",prototype,args,docstring) + [] + - [54] -Overfull \hbox (160.12463pt too wide) in paragraph at lines 3732--3732 -[][][] \OT1/cmtt/m/n/9 cbf_failnez(cbf_get_pixel_coordinates_sf(self, inde -xslow, indexfast, coordinate1, coordinate2, coordinate3)); +Overfull \hbox (16.65137pt too wide) in paragraph at lines 4330--4330 +[][][] []\OT1/cmtt/m/n/9 cbf_handle_wrapper.wrap("cbf_set_unit_cell_e +sd",prototype,args,docstring) [] -Overfull \hbox (8.92639pt too wide) in paragraph at lines 3759--3759 -[][][]\OT1/cmtt/m/n/9 ["double indexfast", "double indexslow", "double centerfa -st","double centerslow"]], +Overfull \hbox (45.00104pt too wide) in paragraph at lines 4332--4332 +[][][] []\OT1/cmtt/m/n/9 cbf_handle_wrapper.wrap("cbf_set_reciprocal_ +cell_esd",prototype,args,docstring) [] +! Dimension too large. +\height ->\ht \@tempboxa + +l.4363 \end{minipage} + \vspace{4ex} +? -Overfull \hbox (8.92639pt too wide) in paragraph at lines 3771--3771 -[][][]\OT1/cmtt/m/n/9 ["double indexslow", "double indexfast", "double centersl -ow","double centerfast"]], +Overfull \hbox (304.87302pt too wide) in paragraph at lines 4392--4392 +[][][] []\OT1/cmtt/m/n/9 'm4_ifelse(regexlibdir,`NOREGEXLIBDIR',`librar +y_dirs=["../solib/","../lib/"],',`library_dirs=["../solib/","../lib/","'regexli +bdir`"],')` [] -Overfull \hbox (23.10123pt too wide) in paragraph at lines 3781--3781 -[][][]\OT1/cmtt/m/n/9 ["double indexslow", "double indexfast", "double centersl -ow","double centerfast"],[]], +Overfull \hbox (399.37192pt too wide) in paragraph at lines 4393--4393 +[][][] []\OT1/cmtt/m/n/9 'm4_ifelse(regexlib,`',`libraries=["cbf"],', ` +m4_ifelse(regexlib2,`',`libraries=["cbf","'regexlib`"],',`libraries=["cbf","'re +gexlib`","'regexlib2`"],')' )` [] +Underfull \vbox (badness 1248) has occurred while \output is active [] + + [10] +Underfull \vbox (badness 10000) has occurred while \output is active [] + + [11] +[12] (./TODO.txt) +Underfull \vbox (badness 10000) has occurred while \output is active [] + + [13] +Overfull \vbox (57.62393pt too high) has occurred while \output is active [] + + +[14] +! Missing $ inserted. + + $ +l.4736 ...n of pycbf_test1 with write logic added} + +? +! Missing $ inserted. + + $ +l.4736 ...n of pycbf_test1 with write logic added} + +? + +Package hyperref Warning: Token not allowed in a PDFDocEncoded string, +(hyperref) removing `subscript' on input line 4736. + + +Underfull \vbox (badness 10000) has occurred while \output is active [] + + [15] Underfull \vbox (badness 10000) has occurred while \output is active [] - [55] -Overfull \hbox (23.10123pt too wide) in paragraph at lines 3791--3791 -[][][]\OT1/cmtt/m/n/9 ["double indexfast", "double indexslow", "double centerfa -st","double centerslow"],[]], + [16] +Overfull \vbox (472.76971pt too high) has occurred while \output is active [] + + +! Missing $ inserted. + + $ +l.4854 \end{flushleft} + +? +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <7> on input line 4854. +! Missing $ inserted. + + $ +l.4854 \end{flushleft} + +? +[17] +Overfull \hbox (68.62576pt too wide) in paragraph at lines 4881--4881 +[][][] []\OT1/cmtt/m/n/9 print('(0, 0) v00 [ %.9f %.9f %.9f ]' %(round(v00[0 +],9), round(v00[1],9), round(v00[2],9))) [] -Overfull \hbox (23.10123pt too wide) in paragraph at lines 3801--3801 -[][][]\OT1/cmtt/m/n/9 ["double indexslow", "double indexfast", "double centersl -ow","double centerfast"],[]], +Overfull \hbox (68.62576pt too wide) in paragraph at lines 4882--4882 +[][][] []\OT1/cmtt/m/n/9 print('(0, 1) v01 [ %.9g %.9g %.9g ]' %(round(v01[0 +],9), round(v01[1],9), round(v01[2],9))) [] -Overfull \hbox (23.10123pt too wide) in paragraph at lines 3811--3811 -[][][]\OT1/cmtt/m/n/9 ["double indexslow", "double indexfast", "double centersl -ow","double centerfast"],[]], +Overfull \hbox (68.62576pt too wide) in paragraph at lines 4883--4883 +[][][] []\OT1/cmtt/m/n/9 print('(1, 0) v10 [ %.9g %.9g %.9g ]' %(round(v10[0 +],9), round(v10[1],9), round(v10[2],9))) [] -Overfull \hbox (23.10123pt too wide) in paragraph at lines 3821--3821 -[][][]\OT1/cmtt/m/n/9 ["double indexfast", "double indexslow", "double centerfa -st","double centerslow"],[]], +Overfull \hbox (68.62576pt too wide) in paragraph at lines 4884--4884 +[][][] []\OT1/cmtt/m/n/9 print('(1, 1) v11 [ %.9g %.9g %.9g ]' %(round(v11[0 +],9), round(v11[1],9), round(v11[2],9))) [] -Overfull \hbox (23.10123pt too wide) in paragraph at lines 3831--3831 -[][][]\OT1/cmtt/m/n/9 ["double indexslow", "double indexfast", "double centersl -ow","double centerfast"],[]], +Overfull \hbox (49.72598pt too wide) in paragraph at lines 4886--4886 +[][][] []\OT1/cmtt/m/n/9 print("surface axes:", d.get_detector_surface_axes +(0), d.get_detector_surface_axes(1)) [] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (182.02444pt too wide) in paragraph at lines 4888--4888 +[][][] []\OT1/cmtt/m/n/9 print(d.get_detector_surface_axes(0), "has", cbf.co +unt_axis_ancestors(d.get_detector_surface_axes(0)), "ancestors") + [] - [56] -Underfull \vbox (badness 10000) has occurred while \output is active [] - [57] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (182.02444pt too wide) in paragraph at lines 4889--4889 +[][][] []\OT1/cmtt/m/n/9 print(d.get_detector_surface_axes(1), "has", cbf.co +unt_axis_ancestors(d.get_detector_surface_axes(1)), "ancestors") + [] - [58] -Overfull \hbox (46.72595pt too wide) in paragraph at lines 4032--4032 -[][][] \OT1/cmtt/m/n/9 void compute_reciprocal_cell(double cell[6], double *as -tar, double *bstar, double *cstar, + +Overfull \hbox (16.65137pt too wide) in paragraph at lines 4898--4898 +[][][] []\OT1/cmtt/m/n/9 print(" equipment_component", cbf.get_axis_e +quipment_component(cur_axis)) [] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (134.775pt too wide) in paragraph at lines 4900--4900 +[][][] []\OT1/cmtt/m/n/9 print(" vector [ %.8g %.8g %.8g ]" % (round( +vector[0],7), round(vector[1],7), round(vector[2],7))) + [] + - [59] -Overfull \hbox (103.4253pt too wide) in paragraph at lines 4046--4046 -[][][]\OT1/cmtt/m/n/9 ["Float astar", "Float bstar", "Float cstar", "Float alph -astar", "Float betastar", "Float gammastar"] ] +Overfull \hbox (134.775pt too wide) in paragraph at lines 4902--4902 +[][][] []\OT1/cmtt/m/n/9 print(" offset [ %.8g %.8g %.8g ]" % (round( +offset[0],7), round(offset[1],7), round(offset[2],7))) [] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Underfull \vbox (badness 6675) has occurred while \output is active [] - [60] -Overfull \hbox (13.65134pt too wide) in paragraph at lines 4131--4131 -[][][] \OT1/cmtt/m/n/9 cbf_handle_wrapper.wrap("cbf_get_unit_cell_esd -",prototype,args,docstring) + [18] +Overfull \hbox (2.47653pt too wide) in paragraph at lines 5047--5047 +[][][] []\OT1/cmtt/m/n/9 UINT32 header_major_version; /* hea +der_major_version (n.) */ [] -Overfull \hbox (42.001pt too wide) in paragraph at lines 4133--4133 -[][][] \OT1/cmtt/m/n/9 cbf_handle_wrapper.wrap("cbf_get_reciprocal_ce -ll_esd",prototype,args,docstring) +Overfull \hbox (2.47653pt too wide) in paragraph at lines 5048--5048 +[][][] []\OT1/cmtt/m/n/9 UINT32 header_minor_version; /* hea +der_minor_version (.n) */ [] -Overfull \hbox (13.65134pt too wide) in paragraph at lines 4135--4135 -[][][] \OT1/cmtt/m/n/9 cbf_handle_wrapper.wrap("cbf_set_unit_cell_esd -",prototype,args,docstring) +Overfull \hbox (2.47653pt too wide) in paragraph at lines 5085--5085 +[][][] []\OT1/cmtt/m/n/9 UINT32 background_applied; /* flags cor +rection has been applied - [] -Overfull \hbox (42.001pt too wide) in paragraph at lines 4137--4137 -[][][] \OT1/cmtt/m/n/9 cbf_handle_wrapper.wrap("cbf_set_reciprocal_ce -ll_esd",prototype,args,docstring) +Overfull \hbox (2.47653pt too wide) in paragraph at lines 5087--5087 +[][][] []\OT1/cmtt/m/n/9 UINT32 bias_applied; /* flags cor +rection has been applied - [] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (2.47653pt too wide) in paragraph at lines 5089--5089 +[][][] []\OT1/cmtt/m/n/9 UINT32 flatfield_applied; /* flags cor +rection has been applied - + [] - [61] -Underfull \vbox (badness 10000) has occurred while \output is active [] - [62] -[63] (./TODO.txt) [64] [65] [66] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (2.47653pt too wide) in paragraph at lines 5091--5091 +[][][] []\OT1/cmtt/m/n/9 UINT32 distortion_applied; /* flags cor +rection has been applied - + [] - [67] -Underfull \vbox (badness 10000) has occurred while \output is active [] -[68] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (2.47653pt too wide) in paragraph at lines 5110--5110 +[][][] []\OT1/cmtt/m/n/9 UINT32 pixel_noise[MAXIMAGES]; /* 1000* +base noise value (ADUs) */ + [] - [69] -Underfull \vbox (badness 10000) has occurred while \output is active [] - [70] -Underfull \vbox (badness 10000) has occurred while \output is active [] +Overfull \hbox (2.47653pt too wide) in paragraph at lines 5154--5154 +[][][] []\OT1/cmtt/m/n/9 INT32 measured_bias[MAXIMAGES]; /* 1000*mean b +ias value for each image*/ + [] - [71] -[72] -Underfull \vbox (badness 10000) has occurred while \output is active [] - [73] Underfull \vbox (badness 10000) has occurred while \output is active [] - [74] -Underfull \vbox (badness 10000) has occurred while \output is active [] + [19] +Overfull \vbox (3050.37395pt too high) has occurred while \output is active [] + - [75] -[76] +[20] Underfull \vbox (badness 10000) has occurred while \output is active [] - [77] + [21] +Overfull \vbox (2159.37395pt too high) has occurred while \output is active [] + + +[22] Underfull \vbox (badness 10000) has occurred while \output is active [] - [78] -[79] (./pycbf.aux) ) -Here is how much of TeX's memory you used: - 2639 strings out of 493886 - 35661 string characters out of 1151099 - 100943 words of memory out of 3000000 - 5916 multiletter control sequences out of 10000+50000 - 9575 words of font info for 34 fonts, out of 3000000 for 5000 - 714 hyphenation exceptions out of 8191 - 25i,11n,43p,224b,365s stack positions out of 5000i,500n,10000p,200000b,50000s - -Output written on pycbf.pdf (79 pages, 218939 bytes). -PDF statistics: - 297 PDF objects out of 1000 (max. 8388607) - 0 named destinations out of 1000 (max. 131072) - 1 words of extra memory for PDF output out of 10000 (max. 10000000) + [23] +Overfull \vbox (1752.37395pt too high) has occurred while \output is active [] + +[24] (./pycbf.aux) ) +Here is how much of TeX's memory you used: + 2545 strings out of 478995 + 37127 string characters out of 5858210 + 1501411 words of memory out of 5000000 + 20043 multiletter control sequences out of 15000+600000 + 410047 words of font info for 49 fonts, out of 8000000 for 9000 + 1141 hyphenation exceptions out of 8191 + 53i,11n,60p,220b,378s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on pycbf.dvi (24 pages, 220452 bytes). diff --git a/pycbf/pycbf.out b/pycbf/pycbf.out index 7a94442e..be00d166 100644 --- a/pycbf/pycbf.out +++ b/pycbf/pycbf.out @@ -1,19 +1,21 @@ -\BOOKMARK [1][-]{section.1}{1 Introduction}{} -\BOOKMARK [1][-]{section.2}{2 Installation prerequisites}{} -\BOOKMARK [1][-]{section.3}{3 Generating the c interface - the SWIG file}{} -\BOOKMARK [2][-]{subsection.3.1}{3.1 Exceptions}{section.3} -\BOOKMARK [2][-]{subsection.3.2}{3.2 Exceptions}{section.3} -\BOOKMARK [1][-]{section.4}{4 Docstrings}{} -\BOOKMARK [1][-]{section.5}{5 Wrappers}{} -\BOOKMARK [1][-]{section.6}{6 Building python extensions - the setup file}{} -\BOOKMARK [1][-]{section.7}{7 Building and testing the resulting package}{} -\BOOKMARK [1][-]{section.8}{8 Debugging compiled extensions}{} -\BOOKMARK [1][-]{section.9}{9 Things which are currently missing}{} -\BOOKMARK [1][-]{section.10}{10 Testing}{} -\BOOKMARK [2][-]{subsection.10.1}{10.1 Read a file based on cif2cbf.c}{section.10} -\BOOKMARK [2][-]{subsection.10.2}{10.2 Try to test the goniometer and detector}{section.10} -\BOOKMARK [2][-]{subsection.10.3}{10.3 Test cases for the generics}{section.10} -\BOOKMARK [1][-]{section.11}{11 Worked example 1 : xmas beamline + mar ccd detector at the ESRF}{} -\BOOKMARK [2][-]{subsection.11.1}{11.1 Reading marccd headers}{section.11} -\BOOKMARK [2][-]{subsection.11.2}{11.2 Writing out cif files for fit2d/xmas}{section.11} -\BOOKMARK [2][-]{subsection.11.3}{11.3 A template cif file for the xmas beamline}{section.11} +\BOOKMARK [1][-]{section.1}{1 Introduction}{} +\BOOKMARK [1][-]{section.2}{2 Installation prerequisites}{} +\BOOKMARK [1][-]{section.3}{3 Generating the c interface - the SWIG file}{} +\BOOKMARK [2][-]{subsection.3.1}{3.1 Exceptions}{section.3} +\BOOKMARK [2][-]{subsection.3.2}{3.2 Exceptions}{section.3} +\BOOKMARK [1][-]{section.4}{4 Docstrings}{} +\BOOKMARK [1][-]{section.5}{5 Wrappers}{} +\BOOKMARK [1][-]{section.6}{6 Building python extensions - the setup file}{} +\BOOKMARK [1][-]{section.7}{7 Building and testing the resulting package}{} +\BOOKMARK [1][-]{section.8}{8 Debugging compiled extensions}{} +\BOOKMARK [1][-]{section.9}{9 Things which are currently missing}{} +\BOOKMARK [1][-]{section.10}{10 Testing}{} +\BOOKMARK [2][-]{subsection.10.1}{10.1 Read a file based on cif2cbf.c}{section.10} +\BOOKMARK [2][-]{subsection.10.2}{10.2 Try to test the goniometer and detector}{section.10} +\BOOKMARK [2][-]{subsection.10.3}{10.3 Test cases for the generics}{section.10} +\BOOKMARK [2][-]{subsection.10.4}{10.4 Version of pycbftest1 with write logic added}{section.10} +\BOOKMARK [2][-]{subsection.10.5}{10.5 Processing of XFEL axes}{section.10} +\BOOKMARK [1][-]{section.11}{11 Worked example 1 : xmas beamline + mar ccd detector at the ESRF}{} +\BOOKMARK [2][-]{subsection.11.1}{11.1 Reading marccd headers}{section.11} +\BOOKMARK [2][-]{subsection.11.2}{11.2 Writing out cif files for fit2d/xmas}{section.11} +\BOOKMARK [2][-]{subsection.11.3}{11.3 A template cif file for the xmas beamline}{section.11} diff --git a/pycbf/pycbf.pdf b/pycbf/pycbf.pdf index a32e37d8..cd48fbc2 100644 Binary files a/pycbf/pycbf.pdf and b/pycbf/pycbf.pdf differ diff --git a/pycbf/pycbf.py b/pycbf/pycbf.py index adba1966..c17b63c4 100644 --- a/pycbf/pycbf.py +++ b/pycbf/pycbf.py @@ -1,102 +1,66 @@ +# coding=utf-8 # This file was automatically generated by SWIG (http://www.swig.org). -# Version 3.0.10 +# Version 4.0.2 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. - - - - from sys import version_info as _swig_python_version_info -if _swig_python_version_info >= (2, 7, 0): - def swig_import_helper(): - import importlib - pkg = __name__.rpartition('.')[0] - mname = '.'.join((pkg, '_pycbf')).lstrip('.') - try: - return importlib.import_module(mname) - except ImportError: - return importlib.import_module('_pycbf') - _pycbf = swig_import_helper() - del swig_import_helper -elif _swig_python_version_info >= (2, 6, 0): - def swig_import_helper(): - from os.path import dirname - import imp - fp = None - try: - fp, pathname, description = imp.find_module('_pycbf', [dirname(__file__)]) - except ImportError: - import _pycbf - return _pycbf - if fp is not None: - try: - _mod = imp.load_module('_pycbf', fp, pathname, description) - finally: - fp.close() - return _mod - _pycbf = swig_import_helper() - del swig_import_helper +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError("Python 2.7 or later required") + +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _pycbf else: import _pycbf -del _swig_python_version_info -try: - _swig_property = property -except NameError: - pass # Python < 2.2 doesn't have 'property'. try: import builtins as __builtin__ except ImportError: import __builtin__ -def _swig_setattr_nondynamic(self, class_type, name, value, static=1): - if (name == "thisown"): - return self.this.own(value) - if (name == "this"): - if type(value).__name__ == 'SwigPyObject': - self.__dict__[name] = value - return - method = class_type.__swig_setmethods__.get(name, None) - if method: - return method(self, value) - if (not static): - if _newclass: - object.__setattr__(self, name, value) +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) else: - self.__dict__[name] = value - else: - raise AttributeError("You cannot add attributes to %s" % self) + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr -def _swig_setattr(self, class_type, name, value): - return _swig_setattr_nondynamic(self, class_type, name, value, 0) +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr -def _swig_getattr(self, class_type, name): - if (name == "thisown"): - return self.this.own() - method = class_type.__swig_getmethods__.get(name, None) - if method: - return method(self) - raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name)) +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper -def _swig_repr(self): - try: - strthis = "proxy of " + self.this.__repr__() - except __builtin__.Exception: - strthis = "" - return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) -try: - _object = object - _newclass = 1 -except __builtin__.Exception: - class _object: - pass - _newclass = 0 __author__ = "Jon Wright " @@ -133,21 +97,13 @@ class _object: """ -class doubleArray(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, doubleArray, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, doubleArray, name) +class doubleArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def __init__(self, nelements): - this = _pycbf.new_doubleArray(nelements) - try: - self.this.append(this) - except __builtin__.Exception: - self.this = this + _pycbf.doubleArray_swiginit(self, _pycbf.new_doubleArray(nelements)) __swig_destroy__ = _pycbf.delete_doubleArray - __del__ = lambda self: None def __getitem__(self, index): return _pycbf.doubleArray___getitem__(self, index) @@ -157,32 +113,24 @@ def __setitem__(self, index, value): def cast(self): return _pycbf.doubleArray_cast(self) - if _newclass: - frompointer = staticmethod(_pycbf.doubleArray_frompointer) - else: - frompointer = _pycbf.doubleArray_frompointer -doubleArray_swigregister = _pycbf.doubleArray_swigregister -doubleArray_swigregister(doubleArray) + + @staticmethod + def frompointer(t): + return _pycbf.doubleArray_frompointer(t) + +# Register doubleArray in _pycbf: +_pycbf.doubleArray_swigregister(doubleArray) def doubleArray_frompointer(t): return _pycbf.doubleArray_frompointer(t) -doubleArray_frompointer = _pycbf.doubleArray_frompointer -class intArray(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, intArray, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, intArray, name) +class intArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def __init__(self, nelements): - this = _pycbf.new_intArray(nelements) - try: - self.this.append(this) - except __builtin__.Exception: - self.this = this + _pycbf.intArray_swiginit(self, _pycbf.new_intArray(nelements)) __swig_destroy__ = _pycbf.delete_intArray - __del__ = lambda self: None def __getitem__(self, index): return _pycbf.intArray___getitem__(self, index) @@ -192,32 +140,24 @@ def __setitem__(self, index, value): def cast(self): return _pycbf.intArray_cast(self) - if _newclass: - frompointer = staticmethod(_pycbf.intArray_frompointer) - else: - frompointer = _pycbf.intArray_frompointer -intArray_swigregister = _pycbf.intArray_swigregister -intArray_swigregister(intArray) + + @staticmethod + def frompointer(t): + return _pycbf.intArray_frompointer(t) + +# Register intArray in _pycbf: +_pycbf.intArray_swigregister(intArray) def intArray_frompointer(t): return _pycbf.intArray_frompointer(t) -intArray_frompointer = _pycbf.intArray_frompointer -class shortArray(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, shortArray, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, shortArray, name) +class shortArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def __init__(self, nelements): - this = _pycbf.new_shortArray(nelements) - try: - self.this.append(this) - except __builtin__.Exception: - self.this = this + _pycbf.shortArray_swiginit(self, _pycbf.new_shortArray(nelements)) __swig_destroy__ = _pycbf.delete_shortArray - __del__ = lambda self: None def __getitem__(self, index): return _pycbf.shortArray___getitem__(self, index) @@ -227,32 +167,24 @@ def __setitem__(self, index, value): def cast(self): return _pycbf.shortArray_cast(self) - if _newclass: - frompointer = staticmethod(_pycbf.shortArray_frompointer) - else: - frompointer = _pycbf.shortArray_frompointer -shortArray_swigregister = _pycbf.shortArray_swigregister -shortArray_swigregister(shortArray) + + @staticmethod + def frompointer(t): + return _pycbf.shortArray_frompointer(t) + +# Register shortArray in _pycbf: +_pycbf.shortArray_swigregister(shortArray) def shortArray_frompointer(t): return _pycbf.shortArray_frompointer(t) -shortArray_frompointer = _pycbf.shortArray_frompointer -class longArray(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, longArray, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, longArray, name) +class longArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def __init__(self, nelements): - this = _pycbf.new_longArray(nelements) - try: - self.this.append(this) - except __builtin__.Exception: - self.this = this + _pycbf.longArray_swiginit(self, _pycbf.new_longArray(nelements)) __swig_destroy__ = _pycbf.delete_longArray - __del__ = lambda self: None def __getitem__(self, index): return _pycbf.longArray___getitem__(self, index) @@ -262,16 +194,16 @@ def __setitem__(self, index, value): def cast(self): return _pycbf.longArray_cast(self) - if _newclass: - frompointer = staticmethod(_pycbf.longArray_frompointer) - else: - frompointer = _pycbf.longArray_frompointer -longArray_swigregister = _pycbf.longArray_swigregister -longArray_swigregister(longArray) + + @staticmethod + def frompointer(t): + return _pycbf.longArray_frompointer(t) + +# Register longArray in _pycbf: +_pycbf.longArray_swigregister(longArray) def longArray_frompointer(t): return _pycbf.longArray_frompointer(t) -longArray_frompointer = _pycbf.longArray_frompointer CBF_INTEGER = _pycbf.CBF_INTEGER CBF_FLOAT = _pycbf.CBF_FLOAT @@ -324,7 +256,7 @@ def longArray_frompointer(t): ENC_DEFAULT = _pycbf.ENC_DEFAULT def get_local_integer_byte_order(): - """ + r""" Returns : char **bo,int *bolen *args : @@ -357,37 +289,13 @@ def get_local_integer_byte_order(): """ return _pycbf.get_local_integer_byte_order() -def compute_cell_volume(cell): - """ - - Returns : Float volume - *args : double cell[6] - - C prototype: int cbf_compute_cell_volume ( double cell[6], double *volume ); - - CBFLib documentation: - DESCRIPTION - cbf_compute_cell_volume sets *volume to point to the volume of the - unit cell computed from the double values in cell[0:2] for the cell - edge lengths a, b and c in AAngstroms and the double values given in - cell[3:5] for the cell angles a, b and g in degrees. - ARGUMENTS - cell Pointer to the array of 6 doubles giving the cell - parameters. volume Pointer to the doubles for cell volume. - RETURN VALUE - Returns an error code on failure or 0 for success. - SEE ALSO - - """ - return _pycbf.compute_cell_volume(cell) - -def get_local_real_format(): - """ +def get_local_real_byte_order(): + r""" - Returns : char **rf,int *rflen + Returns : char **bo,int *bolen *args : - C prototype: int cbf_get_local_real_format (char ** real_format ); + C prototype: int cbf_get_local_real_byte_order (char ** byte_order); CBFLib documentation: DESCRIPTION @@ -413,59 +321,15 @@ def get_local_real_format(): ---------------------------------------------------------------------- """ - return _pycbf.get_local_real_format() - -def airy_disk(x, y, cenx, ceny, volume, fwhm): - """ - - Returns : Float value - *args : double x,double y,double cenx,double ceny,double volume,double fwhm - - C prototype: int cbf_airy_disk(double x, double y, double cenx, double ceny, - double volume, double fwhm, double * value); - - CBFLib documentation: - DESCRIPTION - cbf_airy_disk sets value to point to the value taken at (x,y) of an - truncated Airy function approximation to a point-spread function of - total included volume volume and full width at half max fwhm centered - on (cenx, ceny). - cbf_airy_disk_volume sets to point to the integral in the box with - diagonal corners (xlo, ylo) and of (xhi, yhi) of a truncated Airy - function approximation to a point-spread function of total included - volume volume and full width at half max fwhm centered on (cenx, - ceny). - The Airy function used is an 8-digit approximation up to the first - minimum, after which it is forced to zero, so it cannot be used to - simulate diffraction rings. - ARGUMENTS - x the x-coordinate of a point in the real plane y - the y-coordinate of a point in the real plane xlo the - x-coordinate of a point in the real plane marking the left bound of - integration ylo the y-coordinate of a point in the real plane - marking the bottom bound of integration xhi the x-coordinate - of a point in the real plane marking the right bound of integration - yhi the y-coordinate of a point in the real plane marking the - top bound of integration cenx the x-coordinate of a point in - the real plane marking the PSF center ceny the y-coordinate of - a point in the real plane marking the PSF center volume the - total volume of the PSF fwhm the full-width at half max of the - PSF value Pointer to the value of the Airy function volumeout - Pointer to the value of the integral/TR> - RETURN VALUE - Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- - - """ - return _pycbf.airy_disk(x, y, cenx, ceny, volume, fwhm) + return _pycbf.get_local_real_byte_order() -def get_local_real_byte_order(): - """ +def get_local_real_format(): + r""" - Returns : char **bo,int *bolen + Returns : char **rf,int *rflen *args : - C prototype: int cbf_get_local_real_byte_order (char ** byte_order); + C prototype: int cbf_get_local_real_format (char ** real_format ); CBFLib documentation: DESCRIPTION @@ -491,10 +355,34 @@ def get_local_real_byte_order(): ---------------------------------------------------------------------- """ - return _pycbf.get_local_real_byte_order() + return _pycbf.get_local_real_format() + +def compute_cell_volume(cell): + r""" + + Returns : Float volume + *args : double cell[6] + + C prototype: int cbf_compute_cell_volume ( double cell[6], double *volume ); + + CBFLib documentation: + DESCRIPTION + cbf_compute_cell_volume sets *volume to point to the volume of the + unit cell computed from the double values in cell[0:2] for the cell + edge lengths a, b and c in AAngstroms and the double values given in + cell[3:5] for the cell angles a, b and g in degrees. + ARGUMENTS + cell Pointer to the array of 6 doubles giving the cell + parameters. volume Pointer to the doubles for cell volume. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO -def compute_reciprocal_cell(cell): """ + return _pycbf.compute_cell_volume(cell) + +def compute_reciprocal_cell(cell): + r""" Returns : Float astar,Float bstar,Float cstar,Float alphastar,Float betastar, Float gammastar @@ -524,8 +412,52 @@ def compute_reciprocal_cell(cell): """ return _pycbf.compute_reciprocal_cell(cell) -def airy_disk_volume(xlo, ylo, xhi, yhi, cenx, ceny, volumein, fwhm): +def airy_disk(x, y, cenx, ceny, volume, fwhm): + r""" + + Returns : Float value + *args : double x,double y,double cenx,double ceny,double volume,double fwhm + + C prototype: int cbf_airy_disk(double x, double y, double cenx, double ceny, + double volume, double fwhm, double * value); + + CBFLib documentation: + DESCRIPTION + cbf_airy_disk sets value to point to the value taken at (x,y) of an + truncated Airy function approximation to a point-spread function of + total included volume volume and full width at half max fwhm centered + on (cenx, ceny). + cbf_airy_disk_volume sets to point to the integral in the box with + diagonal corners (xlo, ylo) and of (xhi, yhi) of a truncated Airy + function approximation to a point-spread function of total included + volume volume and full width at half max fwhm centered on (cenx, + ceny). + The Airy function used is an 8-digit approximation up to the first + minimum, after which it is forced to zero, so it cannot be used to + simulate diffraction rings. + ARGUMENTS + x the x-coordinate of a point in the real plane y + the y-coordinate of a point in the real plane xlo the + x-coordinate of a point in the real plane marking the left bound of + integration ylo the y-coordinate of a point in the real plane + marking the bottom bound of integration xhi the x-coordinate + of a point in the real plane marking the right bound of integration + yhi the y-coordinate of a point in the real plane marking the + top bound of integration cenx the x-coordinate of a point in + the real plane marking the PSF center ceny the y-coordinate of + a point in the real plane marking the PSF center volume the + total volume of the PSF fwhm the full-width at half max of the + PSF value Pointer to the value of the Airy function volumeout + Pointer to the value of the integral/TR> + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + """ + return _pycbf.airy_disk(x, y, cenx, ceny, volume, fwhm) + +def airy_disk_volume(xlo, ylo, xhi, yhi, cenx, ceny, volumein, fwhm): + r""" Returns : Float volumeout *args : double xlo,double ylo,double xhi,double yhi,double cenx,double ceny, @@ -569,51 +501,54 @@ def airy_disk_volume(xlo, ylo, xhi, yhi, cenx, ceny, volumein, fwhm): """ return _pycbf.airy_disk_volume(xlo, ylo, xhi, yhi, cenx, ceny, volumein, fwhm) -class cbf_positioner_struct(_object): - """Proxy of C cbf_positioner_struct struct.""" +class cbf_positioner_struct(object): + r"""Proxy of C cbf_positioner_struct struct.""" - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, cbf_positioner_struct, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, cbf_positioner_struct, name) + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr - __swig_setmethods__["matrix"] = _pycbf.cbf_positioner_struct_matrix_set - __swig_getmethods__["matrix"] = _pycbf.cbf_positioner_struct_matrix_get - if _newclass: - matrix = _swig_property(_pycbf.cbf_positioner_struct_matrix_get, _pycbf.cbf_positioner_struct_matrix_set) - __swig_setmethods__["axis"] = _pycbf.cbf_positioner_struct_axis_set - __swig_getmethods__["axis"] = _pycbf.cbf_positioner_struct_axis_get - if _newclass: - axis = _swig_property(_pycbf.cbf_positioner_struct_axis_get, _pycbf.cbf_positioner_struct_axis_set) - __swig_setmethods__["axes"] = _pycbf.cbf_positioner_struct_axes_set - __swig_getmethods__["axes"] = _pycbf.cbf_positioner_struct_axes_get - if _newclass: - axes = _swig_property(_pycbf.cbf_positioner_struct_axes_get, _pycbf.cbf_positioner_struct_axes_set) - __swig_setmethods__["matrix_is_valid"] = _pycbf.cbf_positioner_struct_matrix_is_valid_set - __swig_getmethods__["matrix_is_valid"] = _pycbf.cbf_positioner_struct_matrix_is_valid_get - if _newclass: - matrix_is_valid = _swig_property(_pycbf.cbf_positioner_struct_matrix_is_valid_get, _pycbf.cbf_positioner_struct_matrix_is_valid_set) - __swig_setmethods__["matrix_ratio_used"] = _pycbf.cbf_positioner_struct_matrix_ratio_used_set - __swig_getmethods__["matrix_ratio_used"] = _pycbf.cbf_positioner_struct_matrix_ratio_used_get - if _newclass: - matrix_ratio_used = _swig_property(_pycbf.cbf_positioner_struct_matrix_ratio_used_get, _pycbf.cbf_positioner_struct_matrix_ratio_used_set) - __swig_setmethods__["axis_index_limit"] = _pycbf.cbf_positioner_struct_axis_index_limit_set - __swig_getmethods__["axis_index_limit"] = _pycbf.cbf_positioner_struct_axis_index_limit_get - if _newclass: - axis_index_limit = _swig_property(_pycbf.cbf_positioner_struct_axis_index_limit_get, _pycbf.cbf_positioner_struct_axis_index_limit_set) + matrix = property(_pycbf.cbf_positioner_struct_matrix_get, _pycbf.cbf_positioner_struct_matrix_set, doc=r"""matrix : a(3).a(4).double""") + axis = property(_pycbf.cbf_positioner_struct_axis_get, _pycbf.cbf_positioner_struct_axis_set, doc=r"""axis : p.cbf_axis_struct""") + axes = property(_pycbf.cbf_positioner_struct_axes_get, _pycbf.cbf_positioner_struct_axes_set, doc=r"""axes : size_t""") + matrix_is_valid = property(_pycbf.cbf_positioner_struct_matrix_is_valid_get, _pycbf.cbf_positioner_struct_matrix_is_valid_set, doc=r"""matrix_is_valid : int""") + matrix_ratio_used = property(_pycbf.cbf_positioner_struct_matrix_ratio_used_get, _pycbf.cbf_positioner_struct_matrix_ratio_used_set, doc=r"""matrix_ratio_used : double""") + axis_index_limit = property(_pycbf.cbf_positioner_struct_axis_index_limit_get, _pycbf.cbf_positioner_struct_axis_index_limit_set, doc=r"""axis_index_limit : size_t""") def __init__(self): - """__init__(cbf_positioner_struct self) -> cbf_positioner_struct""" - this = _pycbf.new_cbf_positioner_struct() - try: - self.this.append(this) - except __builtin__.Exception: - self.this = this + r"""__init__(cbf_positioner_struct self) -> cbf_positioner_struct""" + _pycbf.cbf_positioner_struct_swiginit(self, _pycbf.new_cbf_positioner_struct()) __swig_destroy__ = _pycbf.delete_cbf_positioner_struct - __del__ = lambda self: None - def get_rotation_range(self): + def get_rotation_axis(self): + r""" + + Returns : double vector1,double vector2,double vector3 + *args : + + C prototype: int cbf_get_rotation_axis (cbf_goniometer goniometer, + unsigned int reserved, double *vector1, double *vector2, + double *vector3); + + CBFLib documentation: + DESCRIPTION + cbf_get_rotation_axis sets *vector1, *vector2, and *vector3 to the 3 + components of the goniometer rotation axis used for the exposure. + Any of the destination pointers may be NULL. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + goniometer Goniometer handle. reserved Unused. Any value other + than 0 is invalid. vector1 Pointer to the destination x + component of the rotation axis. vector2 Pointer to the + destination y component of the rotation axis. vector3 Pointer to + the destination z component of the rotation axis. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + """ + return _pycbf.cbf_positioner_struct_get_rotation_axis(self) + + def get_rotation_range(self): + r""" Returns : Float start,Float increment *args : @@ -639,9 +574,8 @@ def get_rotation_range(self): """ return _pycbf.cbf_positioner_struct_get_rotation_range(self) - def rotate_vector(self, ratio, initial1, initial2, initial3): - """ + r""" Returns : double final1,double final2,double final3 *args : double ratio,double initial1,double initial2,double initial3 @@ -677,77 +611,17 @@ def rotate_vector(self, ratio, initial1, initial2, initial3): """ return _pycbf.cbf_positioner_struct_rotate_vector(self, ratio, initial1, initial2, initial3) + def get_reciprocal(self, ratio, wavelength, real1, real2, real3): + r""" - def get_goniometer_poise(self, ratio): - """ - - Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2, - Float offset3,Float angle - *args : Float ratio + Returns : double reciprocal1,double reciprocal2,double reciprocal3 + *args : double ratio,double wavelength,double real1,double real2,double real3 - C prototype: int cbf_get_goniometer_poise(cbf_goniometer goniometer, - double ratio, double * vector1, double * vector2, - double * vector3, double * offset1, double * offset2, - double * offset3, double * angle); - - CBFLib documentation: - DESCRIPTION - cbf_get_axis_poise sets vector1, vector2, vector3 to point to the - components of the axis vector for axis axis_id, offset1, offset2, - offset3 to point to the components of the axis base offset vector for - axis axis_id, and angle to point to the angle of rotation of axis - axis_id after application of the axis settings for frame frame_id, - using ratio, a value between 0 and 1, indicating how far into the - internal motion in the frame to go. If frame_id is the string ". - ", the first frame found is used. If there is more than one frame, - which frame will be found is indeterminate. If frame_id is NULL, the - overall setting for the scan are used, rather than those for any - particular frame. The vector and offset reported are the reference - vector and offset of the axis axis_id transformed by application of - all motions of the axes on which axis_id depends. - cbf_get_goniometer_poise vector1, vector2, vector3 to point to the - components of the axis vector for the goniometer axis, offset1, - offset2, offset3 to point to the components of the axis base offset - vector for the goniometer axis, and angle to point to the angle of - rotation of the goniometer axis after application of all axis - settings in the goniometer deriving the vector, offset and angle from - the resulting matrix. Calculation of the vector is indeterminate if - the angle is zero. - cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point - to the components of the axis vector for axis axis_id, offset1, - offset2, offset3 to point to the components of the axis base offset - vector for axis axis_id unmodified by axis rotations. Any of the - pointers may be specified as NULL. - ARGUMENTS - handle CBF handle. ratio A number between 0 and 1 - indication how far into the frame to go vector1 Pointer to the - first component of the axis vector vector2 Pointer to the second - component of the axis vector vector3 Pointer to the third - component of the axis vector offset1 Pointer to the first - component of the axis offset offset2 Pointer to the second - component of the axis offset offset3 Pointer to the third - component of the axis offset angle Pointer to the rotation - angle axis_id The specified axis frame_id The specified - frame positioner CBF goniometer - RETURN VALUE - Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- - - """ - return _pycbf.cbf_positioner_struct_get_goniometer_poise(self, ratio) - - - def get_reciprocal(self, ratio, wavelength, real1, real2, real3): - """ - - Returns : double reciprocal1,double reciprocal2,double reciprocal3 - *args : double ratio,double wavelength,double real1,double real2,double real3 - - C prototype: int cbf_get_reciprocal (cbf_goniometer goniometer, - unsigned int reserved, double ratio, double wavelength, - double real1, double real2, double real3, - double *reciprocal1, double *reciprocal2, - double *reciprocal3); + C prototype: int cbf_get_reciprocal (cbf_goniometer goniometer, + unsigned int reserved, double ratio, double wavelength, + double real1, double real2, double real3, + double *reciprocal1, double *reciprocal2, + double *reciprocal3); CBFLib documentation: DESCRIPTION @@ -779,87 +653,92 @@ def get_reciprocal(self, ratio, wavelength, real1, real2, real3): """ return _pycbf.cbf_positioner_struct_get_reciprocal(self, ratio, wavelength, real1, real2, real3) + def get_goniometer_poise(self, ratio): + r""" - def get_rotation_axis(self): - """ - - Returns : double vector1,double vector2,double vector3 - *args : + Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2, + Float offset3,Float angle + *args : Float ratio - C prototype: int cbf_get_rotation_axis (cbf_goniometer goniometer, - unsigned int reserved, double *vector1, double *vector2, - double *vector3); + C prototype: int cbf_get_goniometer_poise(cbf_goniometer goniometer, + double ratio, double * vector1, double * vector2, + double * vector3, double * offset1, double * offset2, + double * offset3, double * angle); CBFLib documentation: DESCRIPTION - cbf_get_rotation_axis sets *vector1, *vector2, and *vector3 to the 3 - components of the goniometer rotation axis used for the exposure. - Any of the destination pointers may be NULL. - The parameter reserved is presently unused and should be set to 0. + cbf_get_axis_poise sets vector1, vector2, vector3 to point to the + components of the axis vector for axis axis_id, offset1, offset2, + offset3 to point to the components of the axis base offset vector for + axis axis_id, and angle to point to the angle of rotation of axis + axis_id after application of the axis settings for frame frame_id, + using ratio, a value between 0 and 1, indicating how far into the + internal motion in the frame to go. If frame_id is the string ". + ", the first frame found is used. If there is more than one frame, + which frame will be found is indeterminate. If frame_id is NULL, the + overall setting for the scan are used, rather than those for any + particular frame. The vector and offset reported are the reference + vector and offset of the axis axis_id transformed by application of + all motions of the axes on which axis_id depends. + cbf_get_goniometer_poise vector1, vector2, vector3 to point to the + components of the axis vector for the goniometer axis, offset1, + offset2, offset3 to point to the components of the axis base offset + vector for the goniometer axis, and angle to point to the angle of + rotation of the goniometer axis after application of all axis + settings in the goniometer deriving the vector, offset and angle from + the resulting matrix. Calculation of the vector is indeterminate if + the angle is zero. + cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point + to the components of the axis vector for axis axis_id, offset1, + offset2, offset3 to point to the components of the axis base offset + vector for axis axis_id unmodified by axis rotations. Any of the + pointers may be specified as NULL. ARGUMENTS - goniometer Goniometer handle. reserved Unused. Any value other - than 0 is invalid. vector1 Pointer to the destination x - component of the rotation axis. vector2 Pointer to the - destination y component of the rotation axis. vector3 Pointer to - the destination z component of the rotation axis. + handle CBF handle. ratio A number between 0 and 1 + indication how far into the frame to go vector1 Pointer to the + first component of the axis vector vector2 Pointer to the second + component of the axis vector vector3 Pointer to the third + component of the axis vector offset1 Pointer to the first + component of the axis offset offset2 Pointer to the second + component of the axis offset offset3 Pointer to the third + component of the axis offset angle Pointer to the rotation + angle axis_id The specified axis frame_id The specified + frame positioner CBF goniometer RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_positioner_struct_get_rotation_axis(self) + return _pycbf.cbf_positioner_struct_get_goniometer_poise(self, ratio) -cbf_positioner_struct_swigregister = _pycbf.cbf_positioner_struct_swigregister -cbf_positioner_struct_swigregister(cbf_positioner_struct) +# Register cbf_positioner_struct in _pycbf: +_pycbf.cbf_positioner_struct_swigregister(cbf_positioner_struct) -class cbf_detector_struct(_object): - """Proxy of C cbf_detector_struct struct.""" +class cbf_detector_struct(object): + r"""Proxy of C cbf_detector_struct struct.""" - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, cbf_detector_struct, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, cbf_detector_struct, name) + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr - __swig_setmethods__["positioner"] = _pycbf.cbf_detector_struct_positioner_set - __swig_getmethods__["positioner"] = _pycbf.cbf_detector_struct_positioner_get - if _newclass: - positioner = _swig_property(_pycbf.cbf_detector_struct_positioner_get, _pycbf.cbf_detector_struct_positioner_set) - __swig_setmethods__["displacement"] = _pycbf.cbf_detector_struct_displacement_set - __swig_getmethods__["displacement"] = _pycbf.cbf_detector_struct_displacement_get - if _newclass: - displacement = _swig_property(_pycbf.cbf_detector_struct_displacement_get, _pycbf.cbf_detector_struct_displacement_set) - __swig_setmethods__["increment"] = _pycbf.cbf_detector_struct_increment_set - __swig_getmethods__["increment"] = _pycbf.cbf_detector_struct_increment_get - if _newclass: - increment = _swig_property(_pycbf.cbf_detector_struct_increment_get, _pycbf.cbf_detector_struct_increment_set) - __swig_setmethods__["axes"] = _pycbf.cbf_detector_struct_axes_set - __swig_getmethods__["axes"] = _pycbf.cbf_detector_struct_axes_get - if _newclass: - axes = _swig_property(_pycbf.cbf_detector_struct_axes_get, _pycbf.cbf_detector_struct_axes_set) - __swig_setmethods__["index"] = _pycbf.cbf_detector_struct_index_set - __swig_getmethods__["index"] = _pycbf.cbf_detector_struct_index_get - if _newclass: - index = _swig_property(_pycbf.cbf_detector_struct_index_get, _pycbf.cbf_detector_struct_index_set) + positioner = property(_pycbf.cbf_detector_struct_positioner_get, _pycbf.cbf_detector_struct_positioner_set, doc=r"""positioner : cbf_positioner""") + displacement = property(_pycbf.cbf_detector_struct_displacement_get, _pycbf.cbf_detector_struct_displacement_set, doc=r"""displacement : a(2).double""") + increment = property(_pycbf.cbf_detector_struct_increment_get, _pycbf.cbf_detector_struct_increment_set, doc=r"""increment : a(2).double""") + axes = property(_pycbf.cbf_detector_struct_axes_get, _pycbf.cbf_detector_struct_axes_set, doc=r"""axes : size_t""") + index = property(_pycbf.cbf_detector_struct_index_get, _pycbf.cbf_detector_struct_index_set, doc=r"""index : a(2).size_t""") def __init__(self): - """__init__(cbf_detector_struct self) -> cbf_detector_struct""" - this = _pycbf.new_cbf_detector_struct() - try: - self.this.append(this) - except __builtin__.Exception: - self.this = this + r"""__init__(cbf_detector_struct self) -> cbf_detector_struct""" + _pycbf.cbf_detector_struct_swiginit(self, _pycbf.new_cbf_detector_struct()) __swig_destroy__ = _pycbf.delete_cbf_detector_struct - __del__ = lambda self: None - def set_beam_center_fs(self, indexfast, indexslow, centerfast, centerslow): - """ + def get_beam_center(self): + r""" - Returns : - *args : double indexfast,double indexslow,double centerfast,double centerslow + Returns : double index1,double index2,double center1,double center2 + *args : - C prototype: int cbf_set_beam_center_fs (cbf_detector detector, - double *indexfast, double *indexslow, double *centerfast, - double *centerslow); + C prototype: int cbf_get_beam_center (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, + double *centerfast); CBFLib documentation: DESCRIPTION @@ -915,17 +794,16 @@ def set_beam_center_fs(self, indexfast, indexslow, centerfast, centerslow): ---------------------------------------------------------------------- """ - return _pycbf.cbf_detector_struct_set_beam_center_fs(self, indexfast, indexslow, centerfast, centerslow) - + return _pycbf.cbf_detector_struct_get_beam_center(self) - def set_reference_beam_center_fs(self, indexfast, indexslow, centerfast, centerslow): - """ + def get_beam_center_fs(self): + r""" - Returns : - *args : double indexfast,double indexslow,double centerfast,double centerslow + Returns : double indexfast,double indexslow,double centerfast,double centerslow + *args : - C prototype: int cbf_set_reference_beam_center_fs (cbf_detector detector, - double *indexfast, double *indexslow, double *centerfast, + C prototype: int cbf_get_beam_center_fs (cbf_detector detector, + double *indexfast, double *indexslow, double *centerfast, double *centerslow); CBFLib documentation: @@ -982,16 +860,15 @@ def set_reference_beam_center_fs(self, indexfast, indexslow, centerfast, centers ---------------------------------------------------------------------- """ - return _pycbf.cbf_detector_struct_set_reference_beam_center_fs(self, indexfast, indexslow, centerfast, centerslow) - + return _pycbf.cbf_detector_struct_get_beam_center_fs(self) - def get_beam_center(self): - """ + def get_beam_center_sf(self): + r""" - Returns : double index1,double index2,double center1,double center2 + Returns : double indexslow,double indexfast,double centerslow,double centerfast *args : - C prototype: int cbf_get_beam_center (cbf_detector detector, + C prototype: int cbf_get_beam_center_sf (cbf_detector detector, double *indexslow, double *indexfast, double *centerslow, double *centerfast); @@ -1049,196 +926,281 @@ def get_beam_center(self): ---------------------------------------------------------------------- """ - return _pycbf.cbf_detector_struct_get_beam_center(self) - - - def get_pixel_coordinates_fs(self, indexfast, indexslow): - """ - - Returns : double coordinate1,double coordinate2,double coordinate3 - *args : double indexfast,double indexslow - - C prototype: int cbf_get_pixel_coordinates_fs (cbf_detector detector, - double indexfast, double indexslow, double *coordinate1, - double *coordinate2, double *coordinate3); - - CBFLib documentation: - DESCRIPTION - cbf_get_pixel_coordinates, cbf_get_pixel_coordinates_fs and - cbf_get_pixel_coordinates_sf ses *coordinate1, *coordinate2, and - *coordinate3 to the vector position of pixel (indexfast, indexslow) - on the detector surface. If indexslow and indexfast are integers then - the coordinates correspond to the center of a pixel. - Any of the destination pointers may be NULL. - ARGUMENTS - detector Detector handle. indexslow Slow index. indexfast - Fast index. coordinate1 Pointer to the destination x component. - coordinate2 Pointer to the destination y component. coordinate3 - Pointer to the destination z component. - RETURN VALUE - Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- - - """ - return _pycbf.cbf_detector_struct_get_pixel_coordinates_fs(self, indexfast, indexslow) - + return _pycbf.cbf_detector_struct_get_beam_center_sf(self) - def get_inferred_pixel_size(self, axis_number): - """ + def set_beam_center(self): + r""" - Returns : Float pixel size - *args : Int axis_number + Returns : + *args : double indexslow,double indexfast,double centerslow,double centerfast - C prototype: int cbf_get_inferred_pixel_size (cbf_detector detector, - int axis_number, double *psize); + C prototype: int cbf_set_beam_center (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, + double *centerfast); CBFLib documentation: DESCRIPTION - cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_sf set - *psize to point to the double value in millimeters of the pixel size - for the axis axis_number value. The slow index is treated as axis 1 - and the next faster index is treated as axis 2. - cbf_get_inferred_pixel_size_fs sets *psize to point to the double - value in millimeters of the pixel size for the axis axis_number - value. The fast index is treated as axis 1 and the next slower index - is treated as axis 2. - If the axis number is negative, the axes are used in the reverse - order so that an axis_number of -1 indicates the fast axes in a call - to cbf_get_inferred_pixel_size or cbf_get_inferred_pixel_size_sf and - indicates the fast axis in a call to cbf_get_inferred_pixel_size_fs. + cbf_get_beam_center sets *centerfast and *centerslow to the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector and *indexfast and + *indexslow to the corresponding indices. cbf_set_beam_center sets the + offsets in the axis category for the detector element axis with + precedence 1 to place the beam center at the position given in mm by + *centerfast and *centerslow as the displacements in mm along the + detector axes from pixel (0, 0) to the point at which the beam + intersects the detector at the indices given *indexfast and + *indexslow. cbf_set_reference_beam_center sets the displacments in + the array_structure_list_axis category to place the beam center at + the position given in mm by *centerfast and *centerslow as the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector at the indices given + by *indexfast and *indexslow. In order to achieve consistent results, + a reference detector should be used for detector to have all axes at + their reference settings. + Note that the precedence 1 axis is the fastest axis, so that + *centerfast and *indexfast are the fast axis components of the center + and *centerslow and *indexslow are the slow axis components of the + center. + The _fs calls give the displacments in a fast-to-slow order. The + calls with no suffix and the calls _sf calls give the displacements + in slow-to-fast order + Any of the destination pointers may be NULL for getting the beam + center. For setting the beam axis, either the indices of the center + must not be NULL. + The indices are non-negative for beam centers within the detector + surface, but the center for an axis with a negative increment will be + negative for a beam center within the detector surface. + For cbf_set_beam_center if the diffrn_data_frame category exists with + a row for the corresponding element id, the values will be set for + _diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in + millimetres and the value of _diffrn_data_frame.center_units will be + set to 'mm'. + For cbf_set_reference_beam_center if the diffrn_detector_element + category exists with a row for the corresponding element id, the + values will be set for _diffrn_detector_element.reference_center_fast + and _diffrn_detector_element.reference_center_slow in millimetres and + the value of _diffrn_detector_element.reference_units will be set to + 'mm'. ARGUMENTS - detector Detector handle. axis_number The number of the axis. - area Pointer to the destination pizel size in mm. + detector Detector handle. indexfast Pointer to the destination + fast index. indexslow Pointer to the destination slow index. + centerfast Pointer to the destination displacement along the fast + axis. centerslow Pointer to the destination displacement along the + slow axis. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_detector_struct_get_inferred_pixel_size(self, axis_number) - + return _pycbf.cbf_detector_struct_set_beam_center(self) - def get_pixel_area(self, index1, index2): - """ + def set_beam_center_fs(self): + r""" - Returns : double area,double projected_area - *args : double index1,double index2 + Returns : + *args : double indexfast,double indexslow,double centerfast,double centerslow - C prototype: int cbf_get_pixel_area (cbf_detector detector, double indexslow, - double indexfast, double *area, double *projected_area); + C prototype: int cbf_set_beam_center_fs (cbf_detector detector, + double *indexfast, double *indexslow, double *centerfast, + double *centerslow); CBFLib documentation: DESCRIPTION - cbf_get_pixel_area, cbf_get_pixel_area_fs and cbf_get_pixel_area_sf - set *area to the area of the pixel at (indexfast, indexslow) on the - detector surface and *projected_area to the apparent area of the - pixel as viewed from the sample position, with indexslow being the - slow axis and indexfast being the fast axis. - Either of the destination pointers may be NULL. + cbf_get_beam_center sets *centerfast and *centerslow to the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector and *indexfast and + *indexslow to the corresponding indices. cbf_set_beam_center sets the + offsets in the axis category for the detector element axis with + precedence 1 to place the beam center at the position given in mm by + *centerfast and *centerslow as the displacements in mm along the + detector axes from pixel (0, 0) to the point at which the beam + intersects the detector at the indices given *indexfast and + *indexslow. cbf_set_reference_beam_center sets the displacments in + the array_structure_list_axis category to place the beam center at + the position given in mm by *centerfast and *centerslow as the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector at the indices given + by *indexfast and *indexslow. In order to achieve consistent results, + a reference detector should be used for detector to have all axes at + their reference settings. + Note that the precedence 1 axis is the fastest axis, so that + *centerfast and *indexfast are the fast axis components of the center + and *centerslow and *indexslow are the slow axis components of the + center. + The _fs calls give the displacments in a fast-to-slow order. The + calls with no suffix and the calls _sf calls give the displacements + in slow-to-fast order + Any of the destination pointers may be NULL for getting the beam + center. For setting the beam axis, either the indices of the center + must not be NULL. + The indices are non-negative for beam centers within the detector + surface, but the center for an axis with a negative increment will be + negative for a beam center within the detector surface. + For cbf_set_beam_center if the diffrn_data_frame category exists with + a row for the corresponding element id, the values will be set for + _diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in + millimetres and the value of _diffrn_data_frame.center_units will be + set to 'mm'. + For cbf_set_reference_beam_center if the diffrn_detector_element + category exists with a row for the corresponding element id, the + values will be set for _diffrn_detector_element.reference_center_fast + and _diffrn_detector_element.reference_center_slow in millimetres and + the value of _diffrn_detector_element.reference_units will be set to + 'mm'. ARGUMENTS - detector Detector handle. indexfast Fast index. - indexslow Slow index. area Pointer to the - destination area in mm2. projected_area Pointer to the destination - apparent area in mm2. + detector Detector handle. indexfast Pointer to the destination + fast index. indexslow Pointer to the destination slow index. + centerfast Pointer to the destination displacement along the fast + axis. centerslow Pointer to the destination displacement along the + slow axis. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_detector_struct_get_pixel_area(self, index1, index2) + return _pycbf.cbf_detector_struct_set_beam_center_fs(self) + def set_beam_center_sf(self): + r""" - def get_pixel_normal_fs(self, indexfast, indexslow): - """ - - Returns : double normal1,double normal2,double normal3 - *args : double indexfast,double indexslow + Returns : + *args : double indexslow,double indexfast,double centerslow,double centerfast - C prototype: int cbf_get_pixel_normal_fs (cbf_detector detector, - double indexfast, double indexslow, double *normal1, - double *normal2, double *normal3); + C prototype: int cbf_set_beam_center_sf (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, + double *centerfast); CBFLib documentation: DESCRIPTION - cbf_get_detector_normal, cbf_get_pixel_normal_fs and - cbf_get_pixel_normal_sf set *normal1, *normal2, and *normal3 to the 3 - components of the of the normal vector to the pixel at (indexfast, - indexslow). The vector is normalized. - Any of the destination pointers may be NULL. + cbf_get_beam_center sets *centerfast and *centerslow to the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector and *indexfast and + *indexslow to the corresponding indices. cbf_set_beam_center sets the + offsets in the axis category for the detector element axis with + precedence 1 to place the beam center at the position given in mm by + *centerfast and *centerslow as the displacements in mm along the + detector axes from pixel (0, 0) to the point at which the beam + intersects the detector at the indices given *indexfast and + *indexslow. cbf_set_reference_beam_center sets the displacments in + the array_structure_list_axis category to place the beam center at + the position given in mm by *centerfast and *centerslow as the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector at the indices given + by *indexfast and *indexslow. In order to achieve consistent results, + a reference detector should be used for detector to have all axes at + their reference settings. + Note that the precedence 1 axis is the fastest axis, so that + *centerfast and *indexfast are the fast axis components of the center + and *centerslow and *indexslow are the slow axis components of the + center. + The _fs calls give the displacments in a fast-to-slow order. The + calls with no suffix and the calls _sf calls give the displacements + in slow-to-fast order + Any of the destination pointers may be NULL for getting the beam + center. For setting the beam axis, either the indices of the center + must not be NULL. + The indices are non-negative for beam centers within the detector + surface, but the center for an axis with a negative increment will be + negative for a beam center within the detector surface. + For cbf_set_beam_center if the diffrn_data_frame category exists with + a row for the corresponding element id, the values will be set for + _diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in + millimetres and the value of _diffrn_data_frame.center_units will be + set to 'mm'. + For cbf_set_reference_beam_center if the diffrn_detector_element + category exists with a row for the corresponding element id, the + values will be set for _diffrn_detector_element.reference_center_fast + and _diffrn_detector_element.reference_center_slow in millimetres and + the value of _diffrn_detector_element.reference_units will be set to + 'mm'. ARGUMENTS - detector Detector handle. indexslow Slow index. indexfast Fast - index. normal1 Pointer to the destination x component of the - normal vector. normal2 Pointer to the destination y component of - the normal vector. normal3 Pointer to the destination z component - of the normal vector. + detector Detector handle. indexfast Pointer to the destination + fast index. indexslow Pointer to the destination slow index. + centerfast Pointer to the destination displacement along the fast + axis. centerslow Pointer to the destination displacement along the + slow axis. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_detector_struct_get_pixel_normal_fs(self, indexfast, indexslow) - - - def get_detector_surface_axes(self, index): - """get_detector_surface_axes(cbf_detector_struct self, int index) -> char const *""" - return _pycbf.cbf_detector_struct_get_detector_surface_axes(self, index) - + return _pycbf.cbf_detector_struct_set_beam_center_sf(self) - def get_detector_axes(self): - """ + def set_reference_beam_center(self): + r""" - Returns : double slowaxis1,double slowaxis2,double slowaxis3,double fastaxis1, - double fastaxis2,double fastaxis3 - *args : + Returns : + *args : double indexslow,double indexfast,double centerslow,double centerfast - C prototype: int cbf_get_detector_axes (cbf_detector detector, - double *slowaxis1, double *slowaxis2, double *slowaxis3, - double *fastaxis1, double *fastaxis2, double *fastaxis3); + C prototype: int cbf_set_reference_beam_center (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, + double *centerfast); CBFLib documentation: DESCRIPTION - cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and - *slowaxis3 to the 3 components of the slow axis of the specified - detector at the current settings of all axes. - cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and - *fastaxis3 to the 3 components of the fast axis of the specified - detector at the current settings of all axes. cbf_get_detector_axes, - cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set - *slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the - slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 - components of the fast axis of the specified detector at the current - settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 - and *axis_id2 to the names of the two surface axes of the detector or - ". ", - Any of the destination pointers may be NULL. + cbf_get_beam_center sets *centerfast and *centerslow to the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector and *indexfast and + *indexslow to the corresponding indices. cbf_set_beam_center sets the + offsets in the axis category for the detector element axis with + precedence 1 to place the beam center at the position given in mm by + *centerfast and *centerslow as the displacements in mm along the + detector axes from pixel (0, 0) to the point at which the beam + intersects the detector at the indices given *indexfast and + *indexslow. cbf_set_reference_beam_center sets the displacments in + the array_structure_list_axis category to place the beam center at + the position given in mm by *centerfast and *centerslow as the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector at the indices given + by *indexfast and *indexslow. In order to achieve consistent results, + a reference detector should be used for detector to have all axes at + their reference settings. + Note that the precedence 1 axis is the fastest axis, so that + *centerfast and *indexfast are the fast axis components of the center + and *centerslow and *indexslow are the slow axis components of the + center. + The _fs calls give the displacments in a fast-to-slow order. The + calls with no suffix and the calls _sf calls give the displacements + in slow-to-fast order + Any of the destination pointers may be NULL for getting the beam + center. For setting the beam axis, either the indices of the center + must not be NULL. + The indices are non-negative for beam centers within the detector + surface, but the center for an axis with a negative increment will be + negative for a beam center within the detector surface. + For cbf_set_beam_center if the diffrn_data_frame category exists with + a row for the corresponding element id, the values will be set for + _diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in + millimetres and the value of _diffrn_data_frame.center_units will be + set to 'mm'. + For cbf_set_reference_beam_center if the diffrn_detector_element + category exists with a row for the corresponding element id, the + values will be set for _diffrn_detector_element.reference_center_fast + and _diffrn_detector_element.reference_center_slow in millimetres and + the value of _diffrn_detector_element.reference_units will be set to + 'mm'. ARGUMENTS - detector Detector handle. slowaxis1 Pointer to the destination x - component of the slow axis vector. slowaxis2 Pointer to the - destination y component of the slow axis vector. slowaxis3 Pointer - to the destination z component of the slow axis vector. fastaxis1 - Pointer to the destination x component of the fast axis vector. - fastaxis2 Pointer to the destination y component of the fast axis - vector. fastaxis3 Pointer to the destination z component of the - fast axis vector. axis_id1 Pointer to the destination first - surface axis name. axis_id1 Pointer to the destination first - surface axis name. axis_id2 Pointer to the destination second - surface axis name. + detector Detector handle. indexfast Pointer to the destination + fast index. indexslow Pointer to the destination slow index. + centerfast Pointer to the destination displacement along the fast + axis. centerslow Pointer to the destination displacement along the + slow axis. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_detector_struct_get_detector_axes(self) + return _pycbf.cbf_detector_struct_set_reference_beam_center(self) - - def set_reference_beam_center(self, indexslow, indexfast, centerslow, centerfast): - """ + def set_reference_beam_center_fs(self): + r""" Returns : - *args : double indexslow,double indexfast,double centerslow,double centerfast + *args : double indexfast,double indexslow,double centerfast,double centerslow - C prototype: int cbf_set_reference_beam_center (cbf_detector detector, - double *indexslow, double *indexfast, double *centerslow, - double *centerfast); + C prototype: int cbf_set_reference_beam_center_fs (cbf_detector detector, + double *indexfast, double *indexslow, double *centerfast, + double *centerslow); CBFLib documentation: DESCRIPTION @@ -1294,56 +1256,76 @@ def set_reference_beam_center(self, indexslow, indexfast, centerslow, centerfast ---------------------------------------------------------------------- """ - return _pycbf.cbf_detector_struct_set_reference_beam_center(self, indexslow, indexfast, centerslow, centerfast) + return _pycbf.cbf_detector_struct_set_reference_beam_center_fs(self) + def set_reference_beam_center_sf(self): + r""" - def get_detector_axis_slow(self): - """ - - Returns : double slowaxis1,double slowaxis2,double slowaxis3 - *args : + Returns : + *args : double indexslow,double indexfast,double centerslow,double centerfast - C prototype: int cbf_get_detector_axis_slow (cbf_detector detector, - double *slowaxis1, double *slowaxis2, double *slowaxis3); + C prototype: int cbf_set_reference_beam_center_sf (cbf_detector detector, + double *indexslow, double *indexfast, double *centerslow, + double *centerfast); CBFLib documentation: DESCRIPTION - cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and - *slowaxis3 to the 3 components of the slow axis of the specified - detector at the current settings of all axes. - cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and - *fastaxis3 to the 3 components of the fast axis of the specified - detector at the current settings of all axes. cbf_get_detector_axes, - cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set - *slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the - slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 - components of the fast axis of the specified detector at the current - settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 - and *axis_id2 to the names of the two surface axes of the detector or - ". ", - Any of the destination pointers may be NULL. - ARGUMENTS - detector Detector handle. slowaxis1 Pointer to the destination x - component of the slow axis vector. slowaxis2 Pointer to the - destination y component of the slow axis vector. slowaxis3 Pointer - to the destination z component of the slow axis vector. fastaxis1 - Pointer to the destination x component of the fast axis vector. - fastaxis2 Pointer to the destination y component of the fast axis - vector. fastaxis3 Pointer to the destination z component of the - fast axis vector. axis_id1 Pointer to the destination first - surface axis name. axis_id1 Pointer to the destination first - surface axis name. axis_id2 Pointer to the destination second - surface axis name. + cbf_get_beam_center sets *centerfast and *centerslow to the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector and *indexfast and + *indexslow to the corresponding indices. cbf_set_beam_center sets the + offsets in the axis category for the detector element axis with + precedence 1 to place the beam center at the position given in mm by + *centerfast and *centerslow as the displacements in mm along the + detector axes from pixel (0, 0) to the point at which the beam + intersects the detector at the indices given *indexfast and + *indexslow. cbf_set_reference_beam_center sets the displacments in + the array_structure_list_axis category to place the beam center at + the position given in mm by *centerfast and *centerslow as the + displacements in mm along the detector axes from pixel (0, 0) to the + point at which the beam intersects the detector at the indices given + by *indexfast and *indexslow. In order to achieve consistent results, + a reference detector should be used for detector to have all axes at + their reference settings. + Note that the precedence 1 axis is the fastest axis, so that + *centerfast and *indexfast are the fast axis components of the center + and *centerslow and *indexslow are the slow axis components of the + center. + The _fs calls give the displacments in a fast-to-slow order. The + calls with no suffix and the calls _sf calls give the displacements + in slow-to-fast order + Any of the destination pointers may be NULL for getting the beam + center. For setting the beam axis, either the indices of the center + must not be NULL. + The indices are non-negative for beam centers within the detector + surface, but the center for an axis with a negative increment will be + negative for a beam center within the detector surface. + For cbf_set_beam_center if the diffrn_data_frame category exists with + a row for the corresponding element id, the values will be set for + _diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in + millimetres and the value of _diffrn_data_frame.center_units will be + set to 'mm'. + For cbf_set_reference_beam_center if the diffrn_detector_element + category exists with a row for the corresponding element id, the + values will be set for _diffrn_detector_element.reference_center_fast + and _diffrn_detector_element.reference_center_slow in millimetres and + the value of _diffrn_detector_element.reference_units will be set to + 'mm'. + ARGUMENTS + detector Detector handle. indexfast Pointer to the destination + fast index. indexslow Pointer to the destination slow index. + centerfast Pointer to the destination displacement along the fast + axis. centerslow Pointer to the destination displacement along the + slow axis. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_detector_struct_get_detector_axis_slow(self) - + return _pycbf.cbf_detector_struct_set_reference_beam_center_sf(self) def get_detector_distance(self): - """ + r""" Returns : double distance *args : @@ -1365,43 +1347,8 @@ def get_detector_distance(self): """ return _pycbf.cbf_detector_struct_get_detector_distance(self) - - def get_inferred_pixel_size_fs(self, axis_number): - """ - - Returns : Float pixel size - *args : Int axis_number - - C prototype: int cbf_get_inferred_pixel_size_fs(cbf_detector detector, - int axis_number, double *psize); - - CBFLib documentation: - DESCRIPTION - cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_sf set - *psize to point to the double value in millimeters of the pixel size - for the axis axis_number value. The slow index is treated as axis 1 - and the next faster index is treated as axis 2. - cbf_get_inferred_pixel_size_fs sets *psize to point to the double - value in millimeters of the pixel size for the axis axis_number - value. The fast index is treated as axis 1 and the next slower index - is treated as axis 2. - If the axis number is negative, the axes are used in the reverse - order so that an axis_number of -1 indicates the fast axes in a call - to cbf_get_inferred_pixel_size or cbf_get_inferred_pixel_size_sf and - indicates the fast axis in a call to cbf_get_inferred_pixel_size_fs. - ARGUMENTS - detector Detector handle. axis_number The number of the axis. - area Pointer to the destination pizel size in mm. - RETURN VALUE - Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- - - """ - return _pycbf.cbf_detector_struct_get_inferred_pixel_size_fs(self, axis_number) - - def get_detector_normal(self): - """ + r""" Returns : double normal1,double normal2,double normal3 *args : @@ -1427,9 +1374,52 @@ def get_detector_normal(self): """ return _pycbf.cbf_detector_struct_get_detector_normal(self) + def get_detector_axis_slow(self): + r""" + + Returns : double slowaxis1,double slowaxis2,double slowaxis3 + *args : + + C prototype: int cbf_get_detector_axis_slow (cbf_detector detector, + double *slowaxis1, double *slowaxis2, double *slowaxis3); + + CBFLib documentation: + DESCRIPTION + cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and + *slowaxis3 to the 3 components of the slow axis of the specified + detector at the current settings of all axes. + cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and + *fastaxis3 to the 3 components of the fast axis of the specified + detector at the current settings of all axes. cbf_get_detector_axes, + cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set + *slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the + slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 + components of the fast axis of the specified detector at the current + settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 + and *axis_id2 to the names of the two surface axes of the detector or + ". ", + Any of the destination pointers may be NULL. + ARGUMENTS + detector Detector handle. slowaxis1 Pointer to the destination x + component of the slow axis vector. slowaxis2 Pointer to the + destination y component of the slow axis vector. slowaxis3 Pointer + to the destination z component of the slow axis vector. fastaxis1 + Pointer to the destination x component of the fast axis vector. + fastaxis2 Pointer to the destination y component of the fast axis + vector. fastaxis3 Pointer to the destination z component of the + fast axis vector. axis_id1 Pointer to the destination first + surface axis name. axis_id1 Pointer to the destination first + surface axis name. axis_id2 Pointer to the destination second + surface axis name. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- - def get_detector_axis_fast(self): """ + return _pycbf.cbf_detector_struct_get_detector_axis_slow(self) + + def get_detector_axis_fast(self): + r""" Returns : double fastaxis1,double fastaxis2,double fastaxis3 *args : @@ -1472,14 +1462,58 @@ def get_detector_axis_fast(self): """ return _pycbf.cbf_detector_struct_get_detector_axis_fast(self) + def get_detector_axes(self): + r""" + + Returns : double slowaxis1,double slowaxis2,double slowaxis3,double fastaxis1, + double fastaxis2,double fastaxis3 + *args : + + C prototype: int cbf_get_detector_axes (cbf_detector detector, + double *slowaxis1, double *slowaxis2, double *slowaxis3, + double *fastaxis1, double *fastaxis2, double *fastaxis3); + + CBFLib documentation: + DESCRIPTION + cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and + *slowaxis3 to the 3 components of the slow axis of the specified + detector at the current settings of all axes. + cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and + *fastaxis3 to the 3 components of the fast axis of the specified + detector at the current settings of all axes. cbf_get_detector_axes, + cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set + *slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the + slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 + components of the fast axis of the specified detector at the current + settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 + and *axis_id2 to the names of the two surface axes of the detector or + ". ", + Any of the destination pointers may be NULL. + ARGUMENTS + detector Detector handle. slowaxis1 Pointer to the destination x + component of the slow axis vector. slowaxis2 Pointer to the + destination y component of the slow axis vector. slowaxis3 Pointer + to the destination z component of the slow axis vector. fastaxis1 + Pointer to the destination x component of the fast axis vector. + fastaxis2 Pointer to the destination y component of the fast axis + vector. fastaxis3 Pointer to the destination z component of the + fast axis vector. axis_id1 Pointer to the destination first + surface axis name. axis_id1 Pointer to the destination first + surface axis name. axis_id2 Pointer to the destination second + surface axis name. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _pycbf.cbf_detector_struct_get_detector_axes(self) def get_detector_axes_fs(self): - """get_detector_axes_fs(cbf_detector_struct self)""" + r"""get_detector_axes_fs(cbf_detector_struct self)""" return _pycbf.cbf_detector_struct_get_detector_axes_fs(self) - def get_detector_axes_sf(self): - """ + r""" Returns : double slowaxis1,double slowaxis2,double slowaxis3,double fastaxis1, double fastaxis2,double fastaxis3 @@ -1524,9 +1558,72 @@ def get_detector_axes_sf(self): """ return _pycbf.cbf_detector_struct_get_detector_axes_sf(self) + def get_detector_surface_axes(self, index): + r"""get_detector_surface_axes(cbf_detector_struct self, int index) -> char const *""" + return _pycbf.cbf_detector_struct_get_detector_surface_axes(self, index) + + def get_pixel_coordinates(self, index1, index2): + r""" + + Returns : double coordinate1,double coordinate2,double coordinate3 + *args : double index1,double index2 + + C prototype: int cbf_get_pixel_coordinates (cbf_detector detector, + double indexslow, double indexfast, double *coordinate1, + double *coordinate2, double *coordinate3); + + CBFLib documentation: + DESCRIPTION + cbf_get_pixel_coordinates, cbf_get_pixel_coordinates_fs and + cbf_get_pixel_coordinates_sf ses *coordinate1, *coordinate2, and + *coordinate3 to the vector position of pixel (indexfast, indexslow) + on the detector surface. If indexslow and indexfast are integers then + the coordinates correspond to the center of a pixel. + Any of the destination pointers may be NULL. + ARGUMENTS + detector Detector handle. indexslow Slow index. indexfast + Fast index. coordinate1 Pointer to the destination x component. + coordinate2 Pointer to the destination y component. coordinate3 + Pointer to the destination z component. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _pycbf.cbf_detector_struct_get_pixel_coordinates(self, index1, index2) + + def get_pixel_coordinates_fs(self, indexfast, indexslow): + r""" + + Returns : double coordinate1,double coordinate2,double coordinate3 + *args : double indexfast,double indexslow + + C prototype: int cbf_get_pixel_coordinates_fs (cbf_detector detector, + double indexfast, double indexslow, double *coordinate1, + double *coordinate2, double *coordinate3); + + CBFLib documentation: + DESCRIPTION + cbf_get_pixel_coordinates, cbf_get_pixel_coordinates_fs and + cbf_get_pixel_coordinates_sf ses *coordinate1, *coordinate2, and + *coordinate3 to the vector position of pixel (indexfast, indexslow) + on the detector surface. If indexslow and indexfast are integers then + the coordinates correspond to the center of a pixel. + Any of the destination pointers may be NULL. + ARGUMENTS + detector Detector handle. indexslow Slow index. indexfast + Fast index. coordinate1 Pointer to the destination x component. + coordinate2 Pointer to the destination y component. coordinate3 + Pointer to the destination z component. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- - def get_pixel_coordinates_sf(self, indexslow, indexfast): """ + return _pycbf.cbf_detector_struct_get_pixel_coordinates_fs(self, indexfast, indexslow) + + def get_pixel_coordinates_sf(self, indexslow, indexfast): + r""" Returns : double coordinate1,double coordinate2,double coordinate3 *args : double indexslow,double indexfast @@ -1555,76 +1652,97 @@ def get_pixel_coordinates_sf(self, indexslow, indexfast): """ return _pycbf.cbf_detector_struct_get_pixel_coordinates_sf(self, indexslow, indexfast) + def get_pixel_normal(self, index1, index2): + r""" - def set_beam_center(self, indexslow, indexfast, centerslow, centerfast): - """ + Returns : double normal1,double normal2,double normal3 + *args : double index1,double index2 - Returns : - *args : double indexslow,double indexfast,double centerslow,double centerfast + C prototype: int cbf_get_pixel_normal (cbf_detector detector, + double indexslow, double indexfast, double *normal1, + double *normal2, double *normal3); - C prototype: int cbf_set_beam_center (cbf_detector detector, - double *indexslow, double *indexfast, double *centerslow, - double *centerfast); + CBFLib documentation: + DESCRIPTION + cbf_get_detector_normal, cbf_get_pixel_normal_fs and + cbf_get_pixel_normal_sf set *normal1, *normal2, and *normal3 to the 3 + components of the of the normal vector to the pixel at (indexfast, + indexslow). The vector is normalized. + Any of the destination pointers may be NULL. + ARGUMENTS + detector Detector handle. indexslow Slow index. indexfast Fast + index. normal1 Pointer to the destination x component of the + normal vector. normal2 Pointer to the destination y component of + the normal vector. normal3 Pointer to the destination z component + of the normal vector. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- + + """ + return _pycbf.cbf_detector_struct_get_pixel_normal(self, index1, index2) + + def get_pixel_normal_fs(self, indexfast, indexslow): + r""" + + Returns : double normal1,double normal2,double normal3 + *args : double indexfast,double indexslow + + C prototype: int cbf_get_pixel_normal_fs (cbf_detector detector, + double indexfast, double indexslow, double *normal1, + double *normal2, double *normal3); CBFLib documentation: DESCRIPTION - cbf_get_beam_center sets *centerfast and *centerslow to the - displacements in mm along the detector axes from pixel (0, 0) to the - point at which the beam intersects the detector and *indexfast and - *indexslow to the corresponding indices. cbf_set_beam_center sets the - offsets in the axis category for the detector element axis with - precedence 1 to place the beam center at the position given in mm by - *centerfast and *centerslow as the displacements in mm along the - detector axes from pixel (0, 0) to the point at which the beam - intersects the detector at the indices given *indexfast and - *indexslow. cbf_set_reference_beam_center sets the displacments in - the array_structure_list_axis category to place the beam center at - the position given in mm by *centerfast and *centerslow as the - displacements in mm along the detector axes from pixel (0, 0) to the - point at which the beam intersects the detector at the indices given - by *indexfast and *indexslow. In order to achieve consistent results, - a reference detector should be used for detector to have all axes at - their reference settings. - Note that the precedence 1 axis is the fastest axis, so that - *centerfast and *indexfast are the fast axis components of the center - and *centerslow and *indexslow are the slow axis components of the - center. - The _fs calls give the displacments in a fast-to-slow order. The - calls with no suffix and the calls _sf calls give the displacements - in slow-to-fast order - Any of the destination pointers may be NULL for getting the beam - center. For setting the beam axis, either the indices of the center - must not be NULL. - The indices are non-negative for beam centers within the detector - surface, but the center for an axis with a negative increment will be - negative for a beam center within the detector surface. - For cbf_set_beam_center if the diffrn_data_frame category exists with - a row for the corresponding element id, the values will be set for - _diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in - millimetres and the value of _diffrn_data_frame.center_units will be - set to 'mm'. - For cbf_set_reference_beam_center if the diffrn_detector_element - category exists with a row for the corresponding element id, the - values will be set for _diffrn_detector_element.reference_center_fast - and _diffrn_detector_element.reference_center_slow in millimetres and - the value of _diffrn_detector_element.reference_units will be set to - 'mm'. + cbf_get_detector_normal, cbf_get_pixel_normal_fs and + cbf_get_pixel_normal_sf set *normal1, *normal2, and *normal3 to the 3 + components of the of the normal vector to the pixel at (indexfast, + indexslow). The vector is normalized. + Any of the destination pointers may be NULL. ARGUMENTS - detector Detector handle. indexfast Pointer to the destination - fast index. indexslow Pointer to the destination slow index. - centerfast Pointer to the destination displacement along the fast - axis. centerslow Pointer to the destination displacement along the - slow axis. + detector Detector handle. indexslow Slow index. indexfast Fast + index. normal1 Pointer to the destination x component of the + normal vector. normal2 Pointer to the destination y component of + the normal vector. normal3 Pointer to the destination z component + of the normal vector. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_detector_struct_set_beam_center(self, indexslow, indexfast, centerslow, centerfast) + return _pycbf.cbf_detector_struct_get_pixel_normal_fs(self, indexfast, indexslow) + def get_pixel_area(self, index1, index2): + r""" + + Returns : double area,double projected_area + *args : double index1,double index2 + + C prototype: int cbf_get_pixel_area (cbf_detector detector, double indexslow, + double indexfast, double *area, double *projected_area); + + CBFLib documentation: + DESCRIPTION + cbf_get_pixel_area, cbf_get_pixel_area_fs and cbf_get_pixel_area_sf + set *area to the area of the pixel at (indexfast, indexslow) on the + detector surface and *projected_area to the apparent area of the + pixel as viewed from the sample position, with indexslow being the + slow axis and indexfast being the fast axis. + Either of the destination pointers may be NULL. + ARGUMENTS + detector Detector handle. indexfast Fast index. + indexslow Slow index. area Pointer to the + destination area in mm2. projected_area Pointer to the destination + apparent area in mm2. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- - def get_pixel_area_fs(self, indexfast, indexslow): """ + return _pycbf.cbf_detector_struct_get_pixel_area(self, index1, index2) + + def get_pixel_area_fs(self, indexfast, indexslow): + r""" Returns : double area,double projected_area *args : double indexfast,double indexslow @@ -1653,82 +1771,44 @@ def get_pixel_area_fs(self, indexfast, indexslow): """ return _pycbf.cbf_detector_struct_get_pixel_area_fs(self, indexfast, indexslow) + def get_pixel_area_sf(self, indexslow, indexfast): + r""" - def get_beam_center_fs(self): - """ - - Returns : double indexfast,double indexslow,double centerfast,double centerslow - *args : + Returns : double area,double projected_area + *args : double indexslow,double indexfast - C prototype: int cbf_get_beam_center_fs (cbf_detector detector, - double *indexfast, double *indexslow, double *centerfast, - double *centerslow); + C prototype: int cbf_get_pixel_area_sf(cbf_detector detector, + double indexslow, double indexfast, double *area, + double *projected_area); CBFLib documentation: DESCRIPTION - cbf_get_beam_center sets *centerfast and *centerslow to the - displacements in mm along the detector axes from pixel (0, 0) to the - point at which the beam intersects the detector and *indexfast and - *indexslow to the corresponding indices. cbf_set_beam_center sets the - offsets in the axis category for the detector element axis with - precedence 1 to place the beam center at the position given in mm by - *centerfast and *centerslow as the displacements in mm along the - detector axes from pixel (0, 0) to the point at which the beam - intersects the detector at the indices given *indexfast and - *indexslow. cbf_set_reference_beam_center sets the displacments in - the array_structure_list_axis category to place the beam center at - the position given in mm by *centerfast and *centerslow as the - displacements in mm along the detector axes from pixel (0, 0) to the - point at which the beam intersects the detector at the indices given - by *indexfast and *indexslow. In order to achieve consistent results, - a reference detector should be used for detector to have all axes at - their reference settings. - Note that the precedence 1 axis is the fastest axis, so that - *centerfast and *indexfast are the fast axis components of the center - and *centerslow and *indexslow are the slow axis components of the - center. - The _fs calls give the displacments in a fast-to-slow order. The - calls with no suffix and the calls _sf calls give the displacements - in slow-to-fast order - Any of the destination pointers may be NULL for getting the beam - center. For setting the beam axis, either the indices of the center - must not be NULL. - The indices are non-negative for beam centers within the detector - surface, but the center for an axis with a negative increment will be - negative for a beam center within the detector surface. - For cbf_set_beam_center if the diffrn_data_frame category exists with - a row for the corresponding element id, the values will be set for - _diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in - millimetres and the value of _diffrn_data_frame.center_units will be - set to 'mm'. - For cbf_set_reference_beam_center if the diffrn_detector_element - category exists with a row for the corresponding element id, the - values will be set for _diffrn_detector_element.reference_center_fast - and _diffrn_detector_element.reference_center_slow in millimetres and - the value of _diffrn_detector_element.reference_units will be set to - 'mm'. + cbf_get_pixel_area, cbf_get_pixel_area_fs and cbf_get_pixel_area_sf + set *area to the area of the pixel at (indexfast, indexslow) on the + detector surface and *projected_area to the apparent area of the + pixel as viewed from the sample position, with indexslow being the + slow axis and indexfast being the fast axis. + Either of the destination pointers may be NULL. ARGUMENTS - detector Detector handle. indexfast Pointer to the destination - fast index. indexslow Pointer to the destination slow index. - centerfast Pointer to the destination displacement along the fast - axis. centerslow Pointer to the destination displacement along the - slow axis. + detector Detector handle. indexfast Fast index. + indexslow Slow index. area Pointer to the + destination area in mm2. projected_area Pointer to the destination + apparent area in mm2. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_detector_struct_get_beam_center_fs(self) - + return _pycbf.cbf_detector_struct_get_pixel_area_sf(self, indexslow, indexfast) - def get_inferred_pixel_size_sf(self, axis_number): - """ + def get_inferred_pixel_size(self, axis_number): + r""" Returns : Float pixel size *args : Int axis_number - C prototype: int cbf_get_inferred_pixel_size_sf(cbf_detector detector, - int axis_number, double *psize); + C prototype: int cbf_get_inferred_pixel_size (cbf_detector detector, + int axis_number, double *psize); CBFLib documentation: DESCRIPTION @@ -1752,371 +1832,373 @@ def get_inferred_pixel_size_sf(self, axis_number): ---------------------------------------------------------------------- """ - return _pycbf.cbf_detector_struct_get_inferred_pixel_size_sf(self, axis_number) - + return _pycbf.cbf_detector_struct_get_inferred_pixel_size(self, axis_number) - def get_pixel_coordinates(self, index1, index2): - """ + def get_inferred_pixel_size_fs(self, axis_number): + r""" - Returns : double coordinate1,double coordinate2,double coordinate3 - *args : double index1,double index2 + Returns : Float pixel size + *args : Int axis_number - C prototype: int cbf_get_pixel_coordinates (cbf_detector detector, - double indexslow, double indexfast, double *coordinate1, - double *coordinate2, double *coordinate3); + C prototype: int cbf_get_inferred_pixel_size_fs(cbf_detector detector, + int axis_number, double *psize); CBFLib documentation: DESCRIPTION - cbf_get_pixel_coordinates, cbf_get_pixel_coordinates_fs and - cbf_get_pixel_coordinates_sf ses *coordinate1, *coordinate2, and - *coordinate3 to the vector position of pixel (indexfast, indexslow) - on the detector surface. If indexslow and indexfast are integers then - the coordinates correspond to the center of a pixel. - Any of the destination pointers may be NULL. + cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_sf set + *psize to point to the double value in millimeters of the pixel size + for the axis axis_number value. The slow index is treated as axis 1 + and the next faster index is treated as axis 2. + cbf_get_inferred_pixel_size_fs sets *psize to point to the double + value in millimeters of the pixel size for the axis axis_number + value. The fast index is treated as axis 1 and the next slower index + is treated as axis 2. + If the axis number is negative, the axes are used in the reverse + order so that an axis_number of -1 indicates the fast axes in a call + to cbf_get_inferred_pixel_size or cbf_get_inferred_pixel_size_sf and + indicates the fast axis in a call to cbf_get_inferred_pixel_size_fs. ARGUMENTS - detector Detector handle. indexslow Slow index. indexfast - Fast index. coordinate1 Pointer to the destination x component. - coordinate2 Pointer to the destination y component. coordinate3 - Pointer to the destination z component. + detector Detector handle. axis_number The number of the axis. + area Pointer to the destination pizel size in mm. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_detector_struct_get_pixel_coordinates(self, index1, index2) - + return _pycbf.cbf_detector_struct_get_inferred_pixel_size_fs(self, axis_number) - def get_beam_center_sf(self): - """ + def get_inferred_pixel_size_sf(self, axis_number): + r""" - Returns : double indexslow,double indexfast,double centerslow,double centerfast - *args : + Returns : Float pixel size + *args : Int axis_number - C prototype: int cbf_get_beam_center_sf (cbf_detector detector, - double *indexslow, double *indexfast, double *centerslow, - double *centerfast); + C prototype: int cbf_get_inferred_pixel_size_sf(cbf_detector detector, + int axis_number, double *psize); CBFLib documentation: DESCRIPTION - cbf_get_beam_center sets *centerfast and *centerslow to the - displacements in mm along the detector axes from pixel (0, 0) to the - point at which the beam intersects the detector and *indexfast and - *indexslow to the corresponding indices. cbf_set_beam_center sets the - offsets in the axis category for the detector element axis with - precedence 1 to place the beam center at the position given in mm by - *centerfast and *centerslow as the displacements in mm along the - detector axes from pixel (0, 0) to the point at which the beam - intersects the detector at the indices given *indexfast and - *indexslow. cbf_set_reference_beam_center sets the displacments in - the array_structure_list_axis category to place the beam center at - the position given in mm by *centerfast and *centerslow as the - displacements in mm along the detector axes from pixel (0, 0) to the - point at which the beam intersects the detector at the indices given - by *indexfast and *indexslow. In order to achieve consistent results, - a reference detector should be used for detector to have all axes at - their reference settings. - Note that the precedence 1 axis is the fastest axis, so that - *centerfast and *indexfast are the fast axis components of the center - and *centerslow and *indexslow are the slow axis components of the - center. - The _fs calls give the displacments in a fast-to-slow order. The - calls with no suffix and the calls _sf calls give the displacements - in slow-to-fast order - Any of the destination pointers may be NULL for getting the beam - center. For setting the beam axis, either the indices of the center - must not be NULL. - The indices are non-negative for beam centers within the detector - surface, but the center for an axis with a negative increment will be - negative for a beam center within the detector surface. - For cbf_set_beam_center if the diffrn_data_frame category exists with - a row for the corresponding element id, the values will be set for - _diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in - millimetres and the value of _diffrn_data_frame.center_units will be - set to 'mm'. - For cbf_set_reference_beam_center if the diffrn_detector_element - category exists with a row for the corresponding element id, the - values will be set for _diffrn_detector_element.reference_center_fast - and _diffrn_detector_element.reference_center_slow in millimetres and - the value of _diffrn_detector_element.reference_units will be set to - 'mm'. + cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_sf set + *psize to point to the double value in millimeters of the pixel size + for the axis axis_number value. The slow index is treated as axis 1 + and the next faster index is treated as axis 2. + cbf_get_inferred_pixel_size_fs sets *psize to point to the double + value in millimeters of the pixel size for the axis axis_number + value. The fast index is treated as axis 1 and the next slower index + is treated as axis 2. + If the axis number is negative, the axes are used in the reverse + order so that an axis_number of -1 indicates the fast axes in a call + to cbf_get_inferred_pixel_size or cbf_get_inferred_pixel_size_sf and + indicates the fast axis in a call to cbf_get_inferred_pixel_size_fs. ARGUMENTS - detector Detector handle. indexfast Pointer to the destination - fast index. indexslow Pointer to the destination slow index. - centerfast Pointer to the destination displacement along the fast - axis. centerslow Pointer to the destination displacement along the - slow axis. + detector Detector handle. axis_number The number of the axis. + area Pointer to the destination pizel size in mm. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_detector_struct_get_beam_center_sf(self) + return _pycbf.cbf_detector_struct_get_inferred_pixel_size_sf(self, axis_number) +# Register cbf_detector_struct in _pycbf: +_pycbf.cbf_detector_struct_swigregister(cbf_detector_struct) - def get_pixel_area_sf(self, indexslow, indexfast): - """ +CBF_UNDEFNODE = _pycbf.CBF_UNDEFNODE - Returns : double area,double projected_area - *args : double indexslow,double indexfast +CBF_LINK = _pycbf.CBF_LINK - C prototype: int cbf_get_pixel_area_sf(cbf_detector detector, - double indexslow, double indexfast, double *area, - double *projected_area); +CBF_ROOT = _pycbf.CBF_ROOT - CBFLib documentation: - DESCRIPTION - cbf_get_pixel_area, cbf_get_pixel_area_fs and cbf_get_pixel_area_sf - set *area to the area of the pixel at (indexfast, indexslow) on the - detector surface and *projected_area to the apparent area of the - pixel as viewed from the sample position, with indexslow being the - slow axis and indexfast being the fast axis. - Either of the destination pointers may be NULL. - ARGUMENTS - detector Detector handle. indexfast Fast index. - indexslow Slow index. area Pointer to the - destination area in mm2. projected_area Pointer to the destination - apparent area in mm2. - RETURN VALUE - Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- +CBF_DATABLOCK = _pycbf.CBF_DATABLOCK - """ - return _pycbf.cbf_detector_struct_get_pixel_area_sf(self, indexslow, indexfast) +CBF_SAVEFRAME = _pycbf.CBF_SAVEFRAME +CBF_CATEGORY = _pycbf.CBF_CATEGORY - def set_reference_beam_center_sf(self): - """ +CBF_COLUMN = _pycbf.CBF_COLUMN + +class cbf_handle_struct(object): + r"""Proxy of C cbf_handle_struct struct.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + node = property(_pycbf.cbf_handle_struct_node_get, _pycbf.cbf_handle_struct_node_set, doc=r"""node : p.cbf_node""") + row = property(_pycbf.cbf_handle_struct_row_get, _pycbf.cbf_handle_struct_row_set, doc=r"""row : int""") + search_row = property(_pycbf.cbf_handle_struct_search_row_get, _pycbf.cbf_handle_struct_search_row_set, doc=r"""search_row : int""") + + def __init__(self): + r"""__init__(cbf_handle_struct self) -> cbf_handle_struct""" + _pycbf.cbf_handle_struct_swiginit(self, _pycbf.new_cbf_handle_struct()) + __swig_destroy__ = _pycbf.delete_cbf_handle_struct + + def read_file(self, filename, headers): + r""" Returns : - *args : double indexslow,double indexfast,double centerslow,double centerfast + *args : String filename,Integer headers - C prototype: int cbf_set_reference_beam_center_sf (cbf_detector detector, - double *indexslow, double *indexfast, double *centerslow, - double *centerfast); + C prototype: int cbf_read_file (cbf_handle handle, FILE *file, int flags); CBFLib documentation: DESCRIPTION - cbf_get_beam_center sets *centerfast and *centerslow to the - displacements in mm along the detector axes from pixel (0, 0) to the - point at which the beam intersects the detector and *indexfast and - *indexslow to the corresponding indices. cbf_set_beam_center sets the - offsets in the axis category for the detector element axis with - precedence 1 to place the beam center at the position given in mm by - *centerfast and *centerslow as the displacements in mm along the - detector axes from pixel (0, 0) to the point at which the beam - intersects the detector at the indices given *indexfast and - *indexslow. cbf_set_reference_beam_center sets the displacments in - the array_structure_list_axis category to place the beam center at - the position given in mm by *centerfast and *centerslow as the - displacements in mm along the detector axes from pixel (0, 0) to the - point at which the beam intersects the detector at the indices given - by *indexfast and *indexslow. In order to achieve consistent results, - a reference detector should be used for detector to have all axes at - their reference settings. - Note that the precedence 1 axis is the fastest axis, so that - *centerfast and *indexfast are the fast axis components of the center - and *centerslow and *indexslow are the slow axis components of the - center. - The _fs calls give the displacments in a fast-to-slow order. The - calls with no suffix and the calls _sf calls give the displacements - in slow-to-fast order - Any of the destination pointers may be NULL for getting the beam - center. For setting the beam axis, either the indices of the center - must not be NULL. - The indices are non-negative for beam centers within the detector - surface, but the center for an axis with a negative increment will be - negative for a beam center within the detector surface. - For cbf_set_beam_center if the diffrn_data_frame category exists with - a row for the corresponding element id, the values will be set for - _diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in - millimetres and the value of _diffrn_data_frame.center_units will be - set to 'mm'. - For cbf_set_reference_beam_center if the diffrn_detector_element - category exists with a row for the corresponding element id, the - values will be set for _diffrn_detector_element.reference_center_fast - and _diffrn_detector_element.reference_center_slow in millimetres and - the value of _diffrn_detector_element.reference_units will be set to - 'mm'. - ARGUMENTS - detector Detector handle. indexfast Pointer to the destination - fast index. indexslow Pointer to the destination slow index. - centerfast Pointer to the destination displacement along the fast - axis. centerslow Pointer to the destination displacement along the - slow axis. - RETURN VALUE - Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + cbf_read_file reads the CBF or CIF file file into the CBF object + specified by handle, using the CIF 1.0 convention of 80 character + lines. cbf_read_widefile reads the CBF or CIF file file into the CBF + object specified by handle, using the CIF 1.1 convention of 2048 + character lines. A warning is issued to stderr for ascii lines over + the limit. No test is performed on binary sections. + Validation is performed in three ways levels: during the lexical + scan, during the parse, and, if a dictionary was converted, against + the value types, value enumerations, categories and parent-child + relationships specified in the dictionary. + flags controls the interpretation of binary section headers, the + parsing of brackets constructs and the parsing of treble-quoted + strings. + MSG_DIGEST: Instructs CBFlib to check that the digest + of the binary section matches any header digest value. If the digests + do not match, the call will return CBF_FORMAT. This evaluation and + comparison is delayed (a "lazy " evaluation) to ensure maximal + processing efficiency. If an immediately evaluation is required, see + MSG_DIGESTNOW, below. MSG_DIGESTNOW: Instructs CBFlib to + check that the digest of the binary section matches any header + digeste value. If the digests do not match, the call will return + CBF_FORMAT. This evaluation and comparison is performed during + initial parsing of the section to ensure timely error reporting at + the expense of processing efficiency. If a more efficient delayed ( + "lazy ") evaluation is required, see MSG_DIGEST, above. + MSG_DIGESTWARN: Instructs CBFlib to check that the digest + of the binary section matches any header digeste value. If the + digests do not match, a warning message will be sent to stderr, but + processing will attempt to continue. This evaluation and comparison + is first performed during initial parsing of the section to ensure + timely error reporting at the expense of processing efficiency. An + mismatch of the message digest usually indicates a serious error, but + it is sometimes worth continuing processing to try to isolate the + cause of the error. Use this option with caution. MSG_NODIGEST: + Do not check the digest (default). PARSE_BRACKETS: + Accept DDLm bracket-delimited [item,item,...item] or + {item,item,...item} or (item,item,...item) constructs as valid, + stripping non-quoted embedded whitespace and comments. These + constructs may span multiple lines. PARSE_LIBERAL_BRACKETS: Accept + DDLm bracket-delimited [item,item,...item] or {item,item,...item} or + (item,item,...item) constructs as valid, stripping embedded + non-quoted, non-separating whitespace and comments. These constructs + may span multiple lines. In this case, whitespace may be used as an + alternative to the comma. PARSE_TRIPLE_QUOTES: Accept DDLm + triple-quoted " " "item,item,...item " " " or + '''item,item,...item''' constructs as valid, stripping embedded + whitespace and comments. These constructs may span multiple lines. If + this flag is set, then ''' will not be interpreted as a quoted + apoptrophe and " " " will not be interpreted as a quoted double + quote mark and PARSE_NOBRACKETS: Do not accept DDLm + bracket-delimited [item,item,...item] or {item,item,...item} or + (item,item,...item) constructs as valid, stripping non-quoted + embedded whitespace and comments. These constructs may span multiple + lines. PARSE_NOTRIPLE_QUOTES: No not accept DDLm triple-quoted " + " "item,item,...item " " " or '''item,item,...item''' constructs + as valid, stripping embedded whitespace and comments. These + constructs may span multiple lines. If this flag is set, then ''' + will be interpreted as a quoted apostrophe and " " " will be + interpreted as a quoted double quote mark. + CBFlib defers reading binary sections as long as possible. In the + current version of CBFlib, this means that: + 1. The file must be a random-access file opened in binary mode (fopen + ( , """ - return _pycbf.cbf_detector_struct_set_reference_beam_center_sf(self) + return _pycbf.cbf_handle_struct_read_file(self, filename, headers) + + def read_widefile(self, filename, headers): + r""" + Returns : + *args : String filename,Integer headers + + C prototype: int cbf_read_widefile (cbf_handle handle, FILE *file, int flags); + + CBFLib documentation: + DESCRIPTION + cbf_read_file reads the CBF or CIF file file into the CBF object + specified by handle, using the CIF 1.0 convention of 80 character + lines. cbf_read_widefile reads the CBF or CIF file file into the CBF + object specified by handle, using the CIF 1.1 convention of 2048 + character lines. A warning is issued to stderr for ascii lines over + the limit. No test is performed on binary sections. + Validation is performed in three ways levels: during the lexical + scan, during the parse, and, if a dictionary was converted, against + the value types, value enumerations, categories and parent-child + relationships specified in the dictionary. + flags controls the interpretation of binary section headers, the + parsing of brackets constructs and the parsing of treble-quoted + strings. + MSG_DIGEST: Instructs CBFlib to check that the digest + of the binary section matches any header digest value. If the digests + do not match, the call will return CBF_FORMAT. This evaluation and + comparison is delayed (a "lazy " evaluation) to ensure maximal + processing efficiency. If an immediately evaluation is required, see + MSG_DIGESTNOW, below. MSG_DIGESTNOW: Instructs CBFlib to + check that the digest of the binary section matches any header + digeste value. If the digests do not match, the call will return + CBF_FORMAT. This evaluation and comparison is performed during + initial parsing of the section to ensure timely error reporting at + the expense of processing efficiency. If a more efficient delayed ( + "lazy ") evaluation is required, see MSG_DIGEST, above. + MSG_DIGESTWARN: Instructs CBFlib to check that the digest + of the binary section matches any header digeste value. If the + digests do not match, a warning message will be sent to stderr, but + processing will attempt to continue. This evaluation and comparison + is first performed during initial parsing of the section to ensure + timely error reporting at the expense of processing efficiency. An + mismatch of the message digest usually indicates a serious error, but + it is sometimes worth continuing processing to try to isolate the + cause of the error. Use this option with caution. MSG_NODIGEST: + Do not check the digest (default). PARSE_BRACKETS: + Accept DDLm bracket-delimited [item,item,...item] or + {item,item,...item} or (item,item,...item) constructs as valid, + stripping non-quoted embedded whitespace and comments. These + constructs may span multiple lines. PARSE_LIBERAL_BRACKETS: Accept + DDLm bracket-delimited [item,item,...item] or {item,item,...item} or + (item,item,...item) constructs as valid, stripping embedded + non-quoted, non-separating whitespace and comments. These constructs + may span multiple lines. In this case, whitespace may be used as an + alternative to the comma. PARSE_TRIPLE_QUOTES: Accept DDLm + triple-quoted " " "item,item,...item " " " or + '''item,item,...item''' constructs as valid, stripping embedded + whitespace and comments. These constructs may span multiple lines. If + this flag is set, then ''' will not be interpreted as a quoted + apoptrophe and " " " will not be interpreted as a quoted double + quote mark and PARSE_NOBRACKETS: Do not accept DDLm + bracket-delimited [item,item,...item] or {item,item,...item} or + (item,item,...item) constructs as valid, stripping non-quoted + embedded whitespace and comments. These constructs may span multiple + lines. PARSE_NOTRIPLE_QUOTES: No not accept DDLm triple-quoted " + " "item,item,...item " " " or '''item,item,...item''' constructs + as valid, stripping embedded whitespace and comments. These + constructs may span multiple lines. If this flag is set, then ''' + will be interpreted as a quoted apostrophe and " " " will be + interpreted as a quoted double quote mark. + CBFlib defers reading binary sections as long as possible. In the + current version of CBFlib, this means that: + 1. The file must be a random-access file opened in binary mode (fopen + ( , - def set_beam_center_sf(self): """ + return _pycbf.cbf_handle_struct_read_widefile(self, filename, headers) + + def write_file(self, filename, ciforcbf, headers, encoding): + r""" Returns : - *args : double indexslow,double indexfast,double centerslow,double centerfast + *args : String filename,Integer ciforcbf,Integer Headers,Integer encoding - C prototype: int cbf_set_beam_center_sf (cbf_detector detector, - double *indexslow, double *indexfast, double *centerslow, - double *centerfast); + C prototype: int cbf_write_file (cbf_handle handle, FILE *file, int readable, + int ciforcbf, int flags, int encoding); CBFLib documentation: DESCRIPTION - cbf_get_beam_center sets *centerfast and *centerslow to the - displacements in mm along the detector axes from pixel (0, 0) to the - point at which the beam intersects the detector and *indexfast and - *indexslow to the corresponding indices. cbf_set_beam_center sets the - offsets in the axis category for the detector element axis with - precedence 1 to place the beam center at the position given in mm by - *centerfast and *centerslow as the displacements in mm along the - detector axes from pixel (0, 0) to the point at which the beam - intersects the detector at the indices given *indexfast and - *indexslow. cbf_set_reference_beam_center sets the displacments in - the array_structure_list_axis category to place the beam center at - the position given in mm by *centerfast and *centerslow as the - displacements in mm along the detector axes from pixel (0, 0) to the - point at which the beam intersects the detector at the indices given - by *indexfast and *indexslow. In order to achieve consistent results, - a reference detector should be used for detector to have all axes at - their reference settings. - Note that the precedence 1 axis is the fastest axis, so that - *centerfast and *indexfast are the fast axis components of the center - and *centerslow and *indexslow are the slow axis components of the - center. - The _fs calls give the displacments in a fast-to-slow order. The - calls with no suffix and the calls _sf calls give the displacements - in slow-to-fast order - Any of the destination pointers may be NULL for getting the beam - center. For setting the beam axis, either the indices of the center - must not be NULL. - The indices are non-negative for beam centers within the detector - surface, but the center for an axis with a negative increment will be - negative for a beam center within the detector surface. - For cbf_set_beam_center if the diffrn_data_frame category exists with - a row for the corresponding element id, the values will be set for - _diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in - millimetres and the value of _diffrn_data_frame.center_units will be - set to 'mm'. - For cbf_set_reference_beam_center if the diffrn_detector_element - category exists with a row for the corresponding element id, the - values will be set for _diffrn_detector_element.reference_center_fast - and _diffrn_detector_element.reference_center_slow in millimetres and - the value of _diffrn_detector_element.reference_units will be set to - 'mm'. - ARGUMENTS - detector Detector handle. indexfast Pointer to the destination - fast index. indexslow Pointer to the destination slow index. - centerfast Pointer to the destination displacement along the fast - axis. centerslow Pointer to the destination displacement along the - slow axis. - RETURN VALUE - Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + cbf_write_file writes the CBF object specified by handle into the + file file, following CIF 1.0 conventions of 80 character lines. + cbf_write_widefile writes the CBF object specified by handle into the + file file, following CIF 1.1 conventions of 2048 character lines. A + warning is issued to stderr for ascii lines over the limit, and an + attempt is made to fold lines to fit. No test is performed on binary + sections. + If a dictionary has been provided, aliases will be applied on output. + Unlike cbf_read_file, the file does not have to be random-access. + If the file is random-access and readable, readable can be set to + non-0 to indicate to CBFlib that the file can be used as a buffer to + conserve disk space. If the file is not random-access or not + readable, readable must be 0. """ - return _pycbf.cbf_detector_struct_set_beam_center_sf(self) + return _pycbf.cbf_handle_struct_write_file(self, filename, ciforcbf, headers, encoding) + def write_widefile(self, filename, ciforcbf, headers, encoding): + r""" + + Returns : + *args : String filename,Integer ciforcbf,Integer Headers,Integer encoding + + C prototype: int cbf_write_widefile (cbf_handle handle, FILE *file, + int readable, int ciforcbf, int flags, int encoding); + + CBFLib documentation: + DESCRIPTION + cbf_write_file writes the CBF object specified by handle into the + file file, following CIF 1.0 conventions of 80 character lines. + cbf_write_widefile writes the CBF object specified by handle into the + file file, following CIF 1.1 conventions of 2048 character lines. A + warning is issued to stderr for ascii lines over the limit, and an + attempt is made to fold lines to fit. No test is performed on binary + sections. + If a dictionary has been provided, aliases will be applied on output. + Unlike cbf_read_file, the file does not have to be random-access. + If the file is random-access and readable, readable can be set to + non-0 to indicate to CBFlib that the file can be used as a buffer to + conserve disk space. If the file is not random-access or not + readable, readable must be 0. - def get_pixel_normal(self, index1, index2): """ + return _pycbf.cbf_handle_struct_write_widefile(self, filename, ciforcbf, headers, encoding) - Returns : double normal1,double normal2,double normal3 - *args : double index1,double index2 + def new_datablock(self, arg): + r""" - C prototype: int cbf_get_pixel_normal (cbf_detector detector, - double indexslow, double indexfast, double *normal1, - double *normal2, double *normal3); + Returns : string + *args : + + C prototype: int cbf_new_datablock (cbf_handle handle, + const char *datablockname); CBFLib documentation: DESCRIPTION - cbf_get_detector_normal, cbf_get_pixel_normal_fs and - cbf_get_pixel_normal_sf set *normal1, *normal2, and *normal3 to the 3 - components of the of the normal vector to the pixel at (indexfast, - indexslow). The vector is normalized. - Any of the destination pointers may be NULL. + cbf_new_datablock creates a new data block with name datablockname + and makes it the current data block. cbf_new_saveframe creates a new + save frame with name saveframename within the current data block and + makes the new save frame the current save frame. + If a data block or save frame with this name already exists, the + existing data block or save frame becomes the current data block or + save frame. ARGUMENTS - detector Detector handle. indexslow Slow index. indexfast Fast - index. normal1 Pointer to the destination x component of the - normal vector. normal2 Pointer to the destination y component of - the normal vector. normal3 Pointer to the destination z component - of the normal vector. + handle CBF handle. datablockname The name of the new data + block. saveframename The name of the new save frame. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_detector_struct_get_pixel_normal(self, index1, index2) - -cbf_detector_struct_swigregister = _pycbf.cbf_detector_struct_swigregister -cbf_detector_struct_swigregister(cbf_detector_struct) - -CBF_UNDEFNODE = _pycbf.CBF_UNDEFNODE -CBF_LINK = _pycbf.CBF_LINK -CBF_ROOT = _pycbf.CBF_ROOT -CBF_DATABLOCK = _pycbf.CBF_DATABLOCK -CBF_SAVEFRAME = _pycbf.CBF_SAVEFRAME -CBF_CATEGORY = _pycbf.CBF_CATEGORY -CBF_COLUMN = _pycbf.CBF_COLUMN -class cbf_handle_struct(_object): - """Proxy of C cbf_handle_struct struct.""" - - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, cbf_handle_struct, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, cbf_handle_struct, name) - __repr__ = _swig_repr - __swig_setmethods__["node"] = _pycbf.cbf_handle_struct_node_set - __swig_getmethods__["node"] = _pycbf.cbf_handle_struct_node_get - if _newclass: - node = _swig_property(_pycbf.cbf_handle_struct_node_get, _pycbf.cbf_handle_struct_node_set) - __swig_setmethods__["row"] = _pycbf.cbf_handle_struct_row_set - __swig_getmethods__["row"] = _pycbf.cbf_handle_struct_row_get - if _newclass: - row = _swig_property(_pycbf.cbf_handle_struct_row_get, _pycbf.cbf_handle_struct_row_set) - __swig_setmethods__["search_row"] = _pycbf.cbf_handle_struct_search_row_set - __swig_getmethods__["search_row"] = _pycbf.cbf_handle_struct_search_row_get - if _newclass: - search_row = _swig_property(_pycbf.cbf_handle_struct_search_row_get, _pycbf.cbf_handle_struct_search_row_set) - - def __init__(self): - """__init__(cbf_handle_struct self) -> cbf_handle_struct""" - this = _pycbf.new_cbf_handle_struct() - try: - self.this.append(this) - except __builtin__.Exception: - self.this = this - __swig_destroy__ = _pycbf.delete_cbf_handle_struct - __del__ = lambda self: None + return _pycbf.cbf_handle_struct_new_datablock(self, arg) - def select_datablock(self, arg): - """ + def new_saveframe(self, arg): + r""" - Returns : - *args : Integer + Returns : string + *args : - C prototype: int cbf_select_datablock (cbf_handle handle, - unsigned int datablock); + C prototype: int cbf_new_saveframe (cbf_handle handle, + const char *saveframename); CBFLib documentation: DESCRIPTION - cbf_select_datablock selects data block number datablock as the - current data block. - The first data block is number 0. - If the data block does not exist, the function returns CBF_NOTFOUND. + cbf_new_datablock creates a new data block with name datablockname + and makes it the current data block. cbf_new_saveframe creates a new + save frame with name saveframename within the current data block and + makes the new save frame the current save frame. + If a data block or save frame with this name already exists, the + existing data block or save frame becomes the current data block or + save frame. ARGUMENTS - handle CBF handle. datablock Number of the data block to - select. + handle CBF handle. datablockname The name of the new data + block. saveframename The name of the new save frame. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_select_datablock(self, arg) - + return _pycbf.cbf_handle_struct_new_saveframe(self, arg) def force_new_datablock(self, arg): - """ + r""" Returns : string *args : @@ -2143,284 +2225,244 @@ def force_new_datablock(self, arg): """ return _pycbf.cbf_handle_struct_force_new_datablock(self, arg) + def force_new_saveframe(self, arg): + r""" - def get_3d_image_fs_as_string(self, element_number, elsize, elsign, ndimfast, ndimmid, ndimslow): - """ - - Returns : (Binary)String - *args : int element_number,int elsize,int elsign,int ndimfast,int ndimmid, - int ndimslow + Returns : string + *args : - C prototype: int cbf_get_3d_image_fs (cbf_handle handle, - unsigned int reserved, unsigned int element_number, - void *array, size_t elsize, int elsign, size_t ndimfast, - size_t ndimmid, size_t ndimslow); + C prototype: int cbf_force_new_saveframe (cbf_handle handle, + const char *saveframename); CBFLib documentation: DESCRIPTION - cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image - array for element number element_number into an array. The array - consists of ndimslow *ndimfast elements of elsize bytes each, - starting at array. The elements are signed if elsign is non-0 and - unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and - cbf_get_real_image_sf read the image array of IEEE doubles or floats - for element number element_number into an array. A real array is - always signed. cbf_get_3d_image, cbf_get_3d_image_fs and - cbf_get_3d_image_sf read the 3D image array for element number - element_number into an array. The array consists of ndimslow *ndimmid - *ndimfast elements of elsize bytes each, starting at array. The - elements are signed if elsign is non-0 and unsigned otherwise. - cbf_get_real_3d_image, cbf_get_real_3d_image_fs, - cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or - floats for element number element_number into an array. A real array - is always signed. - The _fs calls give the dimensions in a fast-to-slow order. The calls - with no suffix and the calls _sf calls give the dimensions in - slow-to-fast order - The structure of the array as a 1-, 2- or 3-dimensional array should - agree with the structure of the array given in the - ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, - ndimslow should be the array size and ndimfast and, for the 3D calls, - ndimmid, should be set to 1 both in the call and in the imgCIF data - being processed. If the array is 2-dimensional and a 3D call is used, - ndimslow and ndimmid should be the + cbf_force_new_datablock creates a new data block with name + datablockname and makes it the current data block. Duplicate data + block names are allowed. cbf_force_new_saveframe creates a new savew + frame with name saveframename and makes it the current save frame. + Duplicate save frame names are allowed. + Even if a save frame with this name already exists, a new save frame + is created and becomes the current save frame. + ARGUMENTS + handle CBF handle. datablockname The name of the new data + block. saveframename The name of the new save frame. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO """ - return _pycbf.cbf_handle_struct_get_3d_image_fs_as_string(self, element_number, elsize, elsign, ndimfast, ndimmid, ndimslow) + return _pycbf.cbf_handle_struct_force_new_saveframe(self, arg) + + def new_category(self, arg): + r""" + Returns : string + *args : + + C prototype: int cbf_new_category (cbf_handle handle, + const char *categoryname); + + CBFLib documentation: + DESCRIPTION + cbf_new_category creates a new category in the current data block + with name categoryname and makes it the current category. + If a category with this name already exists, the existing category + becomes the current category. + ARGUMENTS + handle CBF handle. categoryname The name of the new + category. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO - def reset_datablocks(self): """ + return _pycbf.cbf_handle_struct_new_category(self, arg) - Returns : + def force_new_category(self, arg): + r""" + + Returns : string *args : - C prototype: int cbf_reset_datablocks (cbf_handle handle); + C prototype: int cbf_force_new_category (cbf_handle handle, + const char *categoryname); CBFLib documentation: DESCRIPTION - cbf_reset_datablocks deletes all categories from all data blocks. - The current data block does not change. + cbf_force_new_category creates a new category in the current data + block with name categoryname and makes it the current category. + Duplicate category names are allowed. + Even if a category with this name already exists, a new category of + the same name is created and becomes the current category. The allows + for the creation of unlooped tag/value lists drawn from the same + category. ARGUMENTS - handle CBF handle. + handle CBF handle. categoryname The name of the new + category. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_reset_datablocks(self) + return _pycbf.cbf_handle_struct_force_new_category(self, arg) + def new_column(self, arg): + r""" + + Returns : string + *args : + + C prototype: int cbf_new_column (cbf_handle handle, const char *columnname); + + CBFLib documentation: + DESCRIPTION + cbf_new_column creates a new column in the current category with name + columnname and makes it the current column. + If a column with this name already exists, the existing column + becomes the current category. + ARGUMENTS + handle CBF handle. columnname The name of the new column. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO - def set_tag_category(self, tagname, categoryname_in): """ + return _pycbf.cbf_handle_struct_new_column(self, arg) + + def new_row(self): + r""" Returns : - *args : String tagname,String categoryname_in + *args : - C prototype: int cbf_set_tag_category (cbf_handle handle, const char* tagname, - const char* categoryname_in); + C prototype: int cbf_new_row (cbf_handle handle); CBFLib documentation: DESCRIPTION - cbf_find_tag_category sets categoryname to the category associated - with tagname in the dictionary associated with handle. - cbf_set_tag_category upddates the dictionary associated with handle - to indicated that tagname is in category categoryname_in. + cbf_new_row adds a new row to the current category and makes it the + current row. ARGUMENTS - handle CBF handle. tagname tag name. - categoryname pointer to a returned category name. - categoryname_in input category name. + handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_set_tag_category(self, tagname, categoryname_in) - + return _pycbf.cbf_handle_struct_new_row(self) - def require_tag_root(self, tagname): - """ + def insert_row(self, arg): + r""" - Returns : String tagroot - *args : String tagname + Returns : + *args : Integer - C prototype: int cbf_require_tag_root (cbf_handle handle, const char* tagname, - const char** tagroot); + C prototype: int cbf_insert_row (cbf_handle handle, unsigned int rownumber); CBFLib documentation: DESCRIPTION - cbf_find_tag_root sets *tagroot to the root tag of which tagname is - an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in - the dictionary associated with handle, creating the dictionary if - necessary. cbf_require_tag_root sets *tagroot to the root tag of - which tagname is an alias, if there is one, or to the value of - tagname, if tagname is not an alias. - A returned tagroot string must not be modified in any way. + cbf_insert_row adds a new row to the current category. The new row is + inserted as row rownumber and existing rows starting from rownumber + are moved up by 1. The new row becomes the current row. + If the category has fewer than rownumber rows, the function returns + CBF_NOTFOUND. + The row numbers start from 0. ARGUMENTS - handle CBF handle. tagname tag name which may be an alias. - tagroot pointer to a returned tag root name. tagroot_in input - tag root name. + handle CBF handle. rownumber The row number of the new row. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_require_tag_root(self, tagname) - + return _pycbf.cbf_handle_struct_insert_row(self, arg) - def row_number(self): - """ + def delete_row(self, arg): + r""" - Returns : Integer - *args : + Returns : + *args : Integer - C prototype: int cbf_row_number (cbf_handle handle, unsigned int *row); + C prototype: int cbf_delete_row (cbf_handle handle, unsigned int rownumber); CBFLib documentation: DESCRIPTION - cbf_row_number sets *row to the number of the current row of the - current category. + cbf_delete_row deletes a row from the current category. Rows starting + from rownumber +1 are moved down by 1. If the current row was higher + than rownumber, or if the current row is the last row, it will also + move down by 1. + The row numbers start from 0. ARGUMENTS - handle CBF handle. row Pointer to the destination row number. + handle CBF handle. rownumber The number of the row to delete. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_row_number(self) - + return _pycbf.cbf_handle_struct_delete_row(self, arg) - def set_image(self, element_number, compression, data, elsize, elsign, ndimslow, ndimfast): - """ + def set_datablockname(self, arg): + r""" - Returns : - *args : int element_number,int compression,(binary) String data,int elsize, - int elsign,int dimslow,int dimfast + Returns : string + *args : - C prototype: int cbf_set_image (cbf_handle handle, unsigned int reserved, - unsigned int element_number, unsigned int compression, - void *array, size_t elsize, int elsign, size_t ndimslow, - size_t ndimfast); + C prototype: int cbf_set_datablockname (cbf_handle handle, + const char *datablockname); CBFLib documentation: DESCRIPTION - cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image - array for element number element_number. The array consists of - ndimfast *ndimslow elements of elsize bytes each, starting at array. - The elements are signed if elsign is non-zero and unsigned otherwise. - cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf - write the image array for element number element_number. The array - consists of ndimfast *ndimslow IEEE double or float elements of - elsize bytes each, starting at array. cbf_set_3d_image, - cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array - for element number element_number. The array consists of ndimfast - *ndimmid *ndimslow elements of elsize bytes each, starting at array. - The elements are signed if elsign is non-0 and unsigned otherwise. - cbf_set_real_3d_image, cbf_set_real_3d_image_fs and - cbf_set_real_3d_image_sf writes the 3D image array for element number - element_number. The array consists of ndimfast *ndimmid *ndimslow - IEEE double or float elements of elsize bytes each, starting at - array. - The _fs calls give the dimensions in a fast-to-slow order. The calls - with no suffix and the calls _sf calls give the dimensions in - slow-to-fast order - If the array is 1-dimensional, ndimslow should be the array size and - ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the - array is 2-dimensional and the 3D calls are used, ndimslow and - ndimmid should be used for the array dimensions and ndimfast should - be set to 1. - The array will be compressed using the compression scheme specifed by - compression. Currently, the available schemes are: - CBF_CANONICAL Canonical-code compression (section 3.3.1) - CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple - "nibble_offset " compression. CBF_NONE No compression. - The values compressed are limited to 64 bits. If any element in the - array is larger than 64 bits, the value compressed is the nearest - 64-bit value. - Currently, the source array must consist of chars, shorts or ints - (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for - cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof - (int), sizeof(double) or sizeof(float), the function returns - CBF_ARGUMENT. - The parameter reserved is presently unused and should be set to 0. + cbf_set_datablockname changes the name of the current data block to + datablockname. cbf_set_saveframename changes the name of the current + save frame to saveframename. + If a data block or save frame with this name already exists + (comparison is case-insensitive), the function returns CBF_IDENTICAL. ARGUMENTS - handle CBF handle. reserved Unused. Any value other - than 0 is invalid. element_number The number of the detector - element counting from 0 by order of appearance in the - "diffrn_data_frame " category. compression Compression type. - array Pointer to the image array. elsize Size in - bytes of each image array element. elsigned Set to non-0 if - the image array elements are signed. ndimslow Slowest array - dimension. ndimmid Second slowest array dimension. ndimfast - Fastest array dimension. + handle CBF handle. datablockname The new data block name. + datablockname The new save frame name. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_set_image(self, element_number, compression, data, elsize, elsign, ndimslow, ndimfast) - + return _pycbf.cbf_handle_struct_set_datablockname(self, arg) - def set_bin_sizes(self, element_number, slowbinsize_in, fastbinsize_in): - """ + def set_saveframename(self, arg): + r""" - Returns : - *args : Integer element_number,Float slowbinsize_in,Float fastbinsize_in + Returns : string + *args : - C prototype: int cbf_set_bin_sizes(cbf_handle handle, - unsigned int element_number, double slowbinsize_in, - double fastbinsize_in); + C prototype: int cbf_set_saveframename (cbf_handle handle, + const char *saveframename); CBFLib documentation: DESCRIPTION - cbf_get_bin_sizes sets slowbinsize to point to the value of the - number of pixels composing one array element in the dimension that - changes at the second-fastest rate and fastbinsize to point to the - value of the number of pixels composing one array element in the - dimension that changes at the fastest rate for the dectector element - with the ordinal element_number. cbf_set_bin_sizes sets the the pixel - bin sizes in the "array_intensities " category to the values of - slowbinsize_in for the number of pixels composing one array element - in the dimension that changes at the second-fastest rate and - fastbinsize_in for the number of pixels composing one array element - in the dimension that changes at the fastest rate for the dectector - element with the ordinal element_number. - In order to allow for software binning involving fractions of pixels, - the bin sizes are doubles rather than ints. + cbf_set_datablockname changes the name of the current data block to + datablockname. cbf_set_saveframename changes the name of the current + save frame to saveframename. + If a data block or save frame with this name already exists + (comparison is case-insensitive), the function returns CBF_IDENTICAL. ARGUMENTS - handle CBF handle. element_number The number of the - detector element counting from 0 by order of appearance in the - "diffrn_data_frame " category. slowbinsize Pointer to the - returned number of pixels composing one array element in the - dimension that changes at the second-fastest rate. fastbinsize - Pointer to the returned number of pixels composing one array element - in the dimension that changes at the fastest rate. slowbinsize_in - The number of pixels composing one array element in the dimension - that changes at the second-fastest rate. fastbinsize_in The number - of pixels composing one array element in the dimension that changes - at the fastest rate. + handle CBF handle. datablockname The new data block name. + datablockname The new save frame name. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_set_bin_sizes(self, element_number, slowbinsize_in, fastbinsize_in) - + return _pycbf.cbf_handle_struct_set_saveframename(self, arg) - def new_row(self): - """ + def reset_datablocks(self): + r""" Returns : *args : - C prototype: int cbf_new_row (cbf_handle handle); + C prototype: int cbf_reset_datablocks (cbf_handle handle); CBFLib documentation: DESCRIPTION - cbf_new_row adds a new row to the current category and makes it the - current row. + cbf_reset_datablocks deletes all categories from all data blocks. + The current data block does not change. ARGUMENTS handle CBF handle. RETURN VALUE @@ -2428,763 +2470,577 @@ def new_row(self): SEE ALSO """ - return _pycbf.cbf_handle_struct_new_row(self) - + return _pycbf.cbf_handle_struct_reset_datablocks(self) - def rewind_saveframe(self): - """ + def reset_datablock(self): + r""" Returns : *args : - C prototype: int cbf_rewind_saveframe (cbf_handle handle); + C prototype: int cbf_reset_datablock (cbf_handle handle); CBFLib documentation: DESCRIPTION - cbf_rewind_category makes the first category in the current data - block the current category. cbf_rewind_saveframe makes the first - saveframe in the current data block the current saveframe. - cbf_rewind_blockitem makes the first blockitem (category or - saveframe) in the current data block the current blockitem. The type - of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type. - If there are no categories, saveframes or blockitems the function - returns CBF_NOTFOUND. - The current column and row become undefined. + cbf_reset_datablock deletes all categories from the current data + block. cbf_reset_saveframe deletes all categories from the current + save frame. ARGUMENTS - handle CBF handle. type CBF handle. + handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_rewind_saveframe(self) - + return _pycbf.cbf_handle_struct_reset_datablock(self) - def get_realarrayparameters(self): - """ + def reset_saveframe(self): + r""" - Returns : int compression,int binary_id,int elsize,int elements + Returns : *args : - C prototype: int cbf_get_realarrayparameters (cbf_handle handle, - unsigned int *compression, int *binary_id, size_t *elsize, - size_t *elements); + C prototype: int cbf_reset_saveframe (cbf_handle handle); CBFLib documentation: DESCRIPTION - cbf_get_integerarrayparameters sets *compression, *binary_id, - *elsize, *elsigned, *elunsigned, *elements, *minelement and - *maxelement to values read from the binary value of the item at the - current column and row. This provides all the arguments needed for a - subsequent call to cbf_set_integerarray, if a copy of the array is to - be made into another CIF or CBF. cbf_get_realarrayparameters sets - *compression, *binary_id, *elsize, *elements to values read from the - binary value of the item at the current column and row. This provides - all the arguments needed for a subsequent call to cbf_set_realarray, - if a copy of the arry is to be made into another CIF or CBF. - The variants cbf_get_integerarrayparameters_wdims, - cbf_get_integerarrayparameters_wdims_fs, - cbf_get_integerarrayparameters_wdims_sf, - cbf_get_realarrayparameters_wdims, - cbf_get_realarrayparameters_wdims_fs, - cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, - *dimmid, *dimslow, and *padding as well, providing the additional - parameters needed for a subsequent call to cbf_set_integerarray_wdims - or cbf_set_realarray_wdims. - The value returned in *byteorder is a pointer either to the string - "little_endian " or to the string "big_endian ". This should be - the byte order of the data, not necessarily of the host machine. No - attempt should be made to modify this string. At this time only - "little_endian " will be returned. - The values returned in *dimfast, *dimmid and *dimslow are the sizes - of the fastest changing, second fastest changing and third fastest - changing dimensions of the array, if specified, or zero, if not - specified. - The value returned in *padding is the size of the post-data padding, - if any and if specified in the data header. The value is given as a - count of octets. - If the value is not binary, the function returns CBF_ASCII. + cbf_reset_datablock deletes all categories from the current data + block. cbf_reset_saveframe deletes all categories from the current + save frame. ARGUMENTS - handle CBF handle. compression Compression method used. - elsize Size in bytes of each array element. binary_id - Pointer to the destination integer binary identifier. elsigned - Pointer to an integer. Set to 1 if the elements can be read as signed - integers. elunsigned Pointer to an integer. Set to 1 if the - elements can be read as unsigned integers. elements Pointer to - the destination number of elements. minelement Pointer to the - destination smallest element. maxelement Pointer to the - destination largest element. byteorder Pointer to the destination - byte order. dimfast Pointer to the destination fastest - dimension. dimmid Pointer to the destination second fastest - dimension. dimslow Pointer to the destination third fastest - dimension. padding Pointer to the destination padding size. + handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_get_realarrayparameters(self) - + return _pycbf.cbf_handle_struct_reset_saveframe(self) - def get_pixel_size_sf(self, element_number, axis_number): - """ + def reset_category(self): + r""" - Returns : Float pixel_size - *args : Int element_number,Int axis_number + Returns : + *args : - C prototype: int cbf_get_pixel_size_sf(cbf_handle handle, - unsigned int element_number, int axis_number, - double *psize); + C prototype: int cbf_reset_category (cbf_handle handle); CBFLib documentation: DESCRIPTION - cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to - the double value in millimeters of the axis axis_number of the - detector element element_number. The axis_number is numbered from 1, - starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to - point to the double value in millimeters of the axis axis_number of - the detector element element_number. The axis_number is numbered from - 1, starting with the fastest axis. - If a negative axis number is given, the order of axes is reversed, so - that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the - fastest axis for cbf_get_pixel_size_sf. - If the pixel size is not given explcitly in the "array_element_size - " category, the function returns CBF_NOTFOUND. + cbf_reset_category deletes all columns and rows from current category. ARGUMENTS - handle CBF handle. element_number The number of the - detector element counting from 0 by order of appearance in the - "diffrn_data_frame " category. axis_number The number of the - axis, starting from 1 for the fastest for cbf_get_pixel_size and - cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. - psize Pointer to the destination pixel size. + handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_get_pixel_size_sf(self, element_number, axis_number) - + return _pycbf.cbf_handle_struct_reset_category(self) - def force_new_category(self, arg): - """ + def remove_datablock(self): + r""" - Returns : string + Returns : *args : - C prototype: int cbf_force_new_category (cbf_handle handle, - const char *categoryname); + C prototype: int cbf_remove_datablock (cbf_handle handle); CBFLib documentation: DESCRIPTION - cbf_force_new_category creates a new category in the current data - block with name categoryname and makes it the current category. - Duplicate category names are allowed. - Even if a category with this name already exists, a new category of - the same name is created and becomes the current category. The allows - for the creation of unlooped tag/value lists drawn from the same - category. + cbf_remove_datablock deletes the current data block. + cbf_remove_saveframe deletes the current save frame. + The current data block becomes undefined. ARGUMENTS - handle CBF handle. categoryname The name of the new - category. + handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_force_new_category(self, arg) - + return _pycbf.cbf_handle_struct_remove_datablock(self) - def force_new_saveframe(self, arg): - """ + def remove_saveframe(self): + r""" - Returns : string + Returns : *args : - C prototype: int cbf_force_new_saveframe (cbf_handle handle, - const char *saveframename); + C prototype: int cbf_remove_saveframe (cbf_handle handle); CBFLib documentation: DESCRIPTION - cbf_force_new_datablock creates a new data block with name - datablockname and makes it the current data block. Duplicate data - block names are allowed. cbf_force_new_saveframe creates a new savew - frame with name saveframename and makes it the current save frame. - Duplicate save frame names are allowed. - Even if a save frame with this name already exists, a new save frame - is created and becomes the current save frame. + cbf_remove_datablock deletes the current data block. + cbf_remove_saveframe deletes the current save frame. + The current data block becomes undefined. ARGUMENTS - handle CBF handle. datablockname The name of the new data - block. saveframename The name of the new save frame. + handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_force_new_saveframe(self, arg) - + return _pycbf.cbf_handle_struct_remove_saveframe(self) - def count_datablocks(self): - """ + def remove_category(self): + r""" - Returns : Integer + Returns : *args : - C prototype: int cbf_count_datablocks (cbf_handle handle, - unsigned int *datablocks); + C prototype: int cbf_remove_category (cbf_handle handle); CBFLib documentation: DESCRIPTION - cbf_count_datablocks puts the number of data blocks in *datablocks . + cbf_remove_category deletes the current category. + The current category becomes undefined. ARGUMENTS - handle CBF handle. datablocks Pointer to the destination data - block count. + handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_count_datablocks(self) - + return _pycbf.cbf_handle_struct_remove_category(self) - def find_row(self, arg): - """ + def remove_column(self): + r""" - Returns : string + Returns : *args : - C prototype: int cbf_find_row (cbf_handle handle, const char *value); + C prototype: int cbf_remove_column (cbf_handle handle); CBFLib documentation: DESCRIPTION - cbf_find_row makes the first row in the current column with value - value the current row. - The comparison is case-sensitive. - If a matching row does not exist, the function returns CBF_NOTFOUND. - The current column is not affected. + cbf_remove_column deletes the current column. + The current column becomes undefined. ARGUMENTS - handle CBF handle. value The value of the row to find. + handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_find_row(self, arg) - + return _pycbf.cbf_handle_struct_remove_column(self) - def select_column(self, arg): - """ + def remove_row(self): + r""" Returns : - *args : Integer + *args : - C prototype: int cbf_select_column (cbf_handle handle, unsigned int column); + C prototype: int cbf_remove_row (cbf_handle handle); CBFLib documentation: DESCRIPTION - cbf_select_column selects column number column in the current - category as the current column. - The first column is number 0. - The current row is not affected - If the column does not exist, the function returns CBF_NOTFOUND. + cbf_remove_row deletes the current row in the current category. + If the current row was the last row, it will move down by 1, + otherwise, it will remain the same. ARGUMENTS - handle CBF handle. column Number of the column to select. + handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_select_column(self, arg) - + return _pycbf.cbf_handle_struct_remove_row(self) - def construct_detector(self, element_number): - """ + def rewind_datablock(self): + r""" - Returns : pycbf detector object - *args : Integer element_number + Returns : + *args : - C prototype: int cbf_construct_detector (cbf_handle handle, - cbf_detector *detector, unsigned int element_number); + C prototype: int cbf_rewind_datablock (cbf_handle handle); CBFLib documentation: DESCRIPTION - cbf_construct_detector constructs a detector object for detector - element number element_number using the description in the CBF object - handle and initialises the detector handle *detector. - cbf_construct_reference_detector constructs a detector object for - detector element number element_number using the description in the - CBF object handle and initialises the detector handle *detector using - the reference settings of the axes. cbf_require_reference_detector is - similar, but try to force the creations of missing intermediate - categories needed to construct a detector object. + cbf_rewind_datablock makes the first data block the current data + block. + If there are no data blocks, the function returns CBF_NOTFOUND. + The current category becomes undefined. ARGUMENTS - handle CBF handle. detector Pointer to the - destination detector handle. element_number The number of the - detector element counting from 0 by order of appearance in the - "diffrn_data_frame " category. + handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_construct_detector(self, element_number) - + return _pycbf.cbf_handle_struct_rewind_datablock(self) - def get_axis_depends_on(self, axis_id): - """ + def rewind_category(self): + r""" - Returns : String - *args : String axis_id + Returns : + *args : - C prototype: int cbf_get_axis_depends_on (cbf_handle handle, - const char *axis_id, const char * *depends_on); + C prototype: int cbf_rewind_category (cbf_handle handle); CBFLib documentation: DESCRIPTION - cbf_count_axis_ancestors sets ancestors to the number of ancestors of - axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor - axis of index ancestor_index of axis axis_id, starting with axis_id - for ancestor_index 0. - cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of - axis_id or to ". " if there is no such ancestor. - cbf_get_axis_equipment sets *equipment to the equipment of axis_id or - to ". " if there is no such equipment. - cbf_get_axis_equipment_component sets *equipment_component to the - equipment_component of axis_id or to ". " if there is no such - equipment_component. - cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the - components of the ofset of axis_id. - cbf_get_axis_rotation sets rotation to the rotation of axis_id or to - 0 if there is no such rotation. cbf_get_axis_rotation_axis sets - *rotation_axis to the rotation_axis of axis_id or to ". " if there - is no such rotation_axis. - cbf_get_axis_setting sets *start and *increment to the corresponding - values of the axis axis_id. Any of the destination pointers may be - NULL. - cbf_get_axis_type sets axis_type to the type of axis_id. - cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the - components of the vector of axis_id. - The parameter reserved is presently unused and should be set to 0. + cbf_rewind_category makes the first category in the current data + block the current category. cbf_rewind_saveframe makes the first + saveframe in the current data block the current saveframe. + cbf_rewind_blockitem makes the first blockitem (category or + saveframe) in the current data block the current blockitem. The type + of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type. + If there are no categories, saveframes or blockitems the function + returns CBF_NOTFOUND. + The current column and row become undefined. ARGUMENTS - handle CBF handle. reserved Unused. Any - value other than 0 is invalid. axis_id Axis id. - ancestor_index Integer index of the desired ancestor, starting - with 0 for the current axis_id. ancestor Pointer to - destination ancestor name pointer. depends_on Pointer to - destination depends_on name pointer. equipment Pointer to - destination equipment name pointer. equipment_component Pointer to - destination equipment_component name pointer. offset1 - Pointer to destination first offset component value. offset2 - Pointer to destination second offset component value. offset3 - Pointer to destination third offset component value. - rotation Pointer to destination rotation value. - rotation_axis Pointer to destination rotation_axisn name - pointer. start Pointer to the destination start - value. increment Pointer to the destination increment - value. type Pointer to destination axis type of type - . vector1 Pointer to destination first vector component - value. vector2 Pointer to destination second vector - component value. vector3 Pointer to destination third - vector component value. + handle CBF handle. type CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_get_axis_depends_on(self, axis_id) - + return _pycbf.cbf_handle_struct_rewind_category(self) - def rewind_column(self): - """ + def rewind_saveframe(self): + r""" Returns : *args : - C prototype: int cbf_rewind_column (cbf_handle handle); + C prototype: int cbf_rewind_saveframe (cbf_handle handle); CBFLib documentation: DESCRIPTION - cbf_rewind_column makes the first column in the current category the - current column. - If there are no columns, the function returns CBF_NOTFOUND. - The current row is not affected. + cbf_rewind_category makes the first category in the current data + block the current category. cbf_rewind_saveframe makes the first + saveframe in the current data block the current saveframe. + cbf_rewind_blockitem makes the first blockitem (category or + saveframe) in the current data block the current blockitem. The type + of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type. + If there are no categories, saveframes or blockitems the function + returns CBF_NOTFOUND. + The current column and row become undefined. ARGUMENTS - handle CBF handle. + handle CBF handle. type CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_rewind_column(self) - + return _pycbf.cbf_handle_struct_rewind_saveframe(self) - def construct_reference_positioner(self, axis_id): - """ + def rewind_blockitem(self): + r""" - Returns : pycbf positioner object - *args : String axis_id + Returns : CBF_NODETYPE + *args : - C prototype: int cbf_construct_reference_positioner (cbf_handle handle, - cbf_positioner *positioner, const char *axis_id); + C prototype: int cbf_rewind_blockitem (cbf_handle handle, + CBF_NODETYPE * type); CBFLib documentation: DESCRIPTION - cbf_construct_positioner constructs a positioner object for the axis - given by axis_id using the description in the CBF object handle and - initialises the positioner handle *positioner. - cbf_construct_reference positioner constructs a positioner object for - the axis given by axis_id using the description in the CBF object - handle and initialises the detector handle *detector using the - reference settings of the axes. - ARGUMENTS - handle CBF handle. detector Pointer to the destination detector - handle. axis_id The identifier of the axis in the "axis " - category. + cbf_rewind_category makes the first category in the current data + block the current category. cbf_rewind_saveframe makes the first + saveframe in the current data block the current saveframe. + cbf_rewind_blockitem makes the first blockitem (category or + saveframe) in the current data block the current blockitem. The type + of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type. + If there are no categories, saveframes or blockitems the function + returns CBF_NOTFOUND. + The current column and row become undefined. + ARGUMENTS + handle CBF handle. type CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_construct_reference_positioner(self, axis_id) - + return _pycbf.cbf_handle_struct_rewind_blockitem(self) - def require_column_doublevalue(self, columnname, defaultvalue): - """ + def rewind_column(self): + r""" - Returns : Float defaultvalue - *args : String columnname,Float Value + Returns : + *args : - C prototype: int cbf_require_column_doublevalue (cbf_handle handle, - const char *columnname, double *number, - const double defaultvalue); + C prototype: int cbf_rewind_column (cbf_handle handle); CBFLib documentation: DESCRIPTION - cbf_require_column_doublevalue sets *number to the value of the ASCII - item at the current row for the column given with the name given by - *columnname, with the value interpreted as a decimal floating-point - number, or to the number given by defaultvalue if the item cannot be - found. + cbf_rewind_column makes the first column in the current category the + current column. + If there are no columns, the function returns CBF_NOTFOUND. + The current row is not affected. ARGUMENTS - handle CBF handle. columnname Name of the column - containing the number. number pointer to the location to - receive the floating-point value. defaultvalue Value to use if the - requested column and value cannot be found. + handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_require_column_doublevalue(self, columnname, defaultvalue) - + return _pycbf.cbf_handle_struct_rewind_column(self) - def get_datestamp(self): - """ + def rewind_row(self): + r""" - Returns : int year,int month,int day,int hour,int minute,double second, - int timezone + Returns : *args : - C prototype: int cbf_get_datestamp (cbf_handle handle, unsigned int reserved, - int *year, int *month, int *day, int *hour, int *minute, - double *second, int *timezone); + C prototype: int cbf_rewind_row (cbf_handle handle); CBFLib documentation: DESCRIPTION - cbf_get_datestamp sets *year, *month, *day, *hour, *minute and - *second to the corresponding values of the collection timestamp. - *timezone is set to timezone difference from UTC in minutes. The - parameter < i>reserved is presently unused and should be set to 0. - Any of the destination pointers may be NULL. + cbf_rewind_row makes the first row in the current category the + current row. + If there are no rows, the function returns CBF_NOTFOUND. + The current column is not affected. ARGUMENTS - handle CBF handle. reserved Unused. Any value other than 0 is - invalid. year Pointer to the destination timestamp year. month - Pointer to the destination timestamp month (1-12). day - Pointer to the destination timestamp day (1-31). hour Pointer - to the destination timestamp hour (0-23). minute Pointer to the - destination timestamp minute (0-59). second Pointer to the - destination timestamp second (0-60.0). timezone Pointer to the - destination timezone difference from UTC in minutes. + handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_get_datestamp(self) - + return _pycbf.cbf_handle_struct_rewind_row(self) - def get_integervalue(self): - """ + def next_datablock(self): + r""" - Returns : int + Returns : *args : - C prototype: int cbf_get_integervalue (cbf_handle handle, int *number); + C prototype: int cbf_next_datablock (cbf_handle handle); CBFLib documentation: DESCRIPTION - cbf_get_integervalue sets *number to the value of the ASCII item at - the current column and row interpreted as a decimal integer. - cbf_require_integervalue sets *number to the value of the ASCII item - at the current column and row interpreted as a decimal integer, - setting it to defaultvalue if necessary. - If the value is not ASCII, the function returns CBF_BINARY. + cbf_next_datablock makes the data block following the current data + block the current data block. + If there are no more data blocks, the function returns CBF_NOTFOUND. + The current category becomes undefined. ARGUMENTS - handle CBF handle. number pointer to the number. - defaultvalue default number value. + handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_get_integervalue(self) - + return _pycbf.cbf_handle_struct_next_datablock(self) - def get_crystal_id(self): - """ + def next_category(self): + r""" Returns : - *args : string + *args : - C prototype: int cbf_get_crystal_id (cbf_handle handle, - const char **crystal_id); + C prototype: int cbf_next_category (cbf_handle handle); CBFLib documentation: DESCRIPTION - cbf_get_crystal_id sets *crystal_id to point to the ASCII value of - the "diffrn.crystal_id " entry. - If the value is not ASCII, the function returns CBF_BINARY. - The value will be valid as long as the item exists and has not been - set to a new value. - The value must not be modified by the program in any way. + cbf_next_category makes the category following the current category + in the current data block the current category. + If there are no more categories, the function returns CBF_NOTFOUND. + The current column and row become undefined. ARGUMENTS - handle CBF handle. crystal_id Pointer to the destination - value pointer. + handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_get_crystal_id(self) - + return _pycbf.cbf_handle_struct_next_category(self) - def get_doublevalue(self): - """ + def next_column(self): + r""" - Returns : double + Returns : *args : - C prototype: int cbf_get_doublevalue (cbf_handle handle, double *number); + C prototype: int cbf_next_column (cbf_handle handle); CBFLib documentation: DESCRIPTION - cbf_get_doublevalue sets *number to the value of the ASCII item at - the current column and row interpreted as a decimal floating-point - number. cbf_require_doublevalue sets *number to the value of the - ASCII item at the current column and row interpreted as a decimal - floating-point number, setting it to defaultvalue if necessary. - If the value is not ASCII, the function returns CBF_BINARY. + cbf_next_column makes the column following the current column in the + current category the current column. + If there are no more columns, the function returns CBF_NOTFOUND. + The current row is not affected. ARGUMENTS - handle CBF handle. number Pointer to the destination - number. defaultvalue default number value. + handle CBF handle. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_get_doublevalue(self) - + return _pycbf.cbf_handle_struct_next_column(self) - def get_unit_cell(self): - """ + def next_row(self): + r""" - Returns : Float a,Float b,Float c,Float alpha,Float beta,Float gamma + Returns : *args : - C prototype: int cbf_get_unit_cell (cbf_handle handle, double cell[6], - double cell_esd[6] ); + C prototype: int cbf_next_row (cbf_handle handle); CBFLib documentation: DESCRIPTION - cbf_get_unit_cell sets cell[0:2] to the double values of the cell - edge lengths a, b and c in AAngstroms, cell[3:5] to the double values - of the cell angles a, b and g in degrees, cell_esd[0:2] to the double - values of the estimated strandard deviations of the cell edge lengths - a, b and c in AAngstroms, cell_esd[3:5] to the double values of the - estimated standard deviations of the the cell angles a, b and g in - degrees. - The values returned are retrieved from the first row of the "cell - " category. The value of "_cell.entry_id " is ignored. - cell or cell_esd may be NULL. - If cell is NULL, the cell parameters are not retrieved. - If cell_esd is NULL, the cell parameter esds are not retrieved. - If the "cell " category is present, but some of the values are - missing, zeros are returned for the missing values. + cbf_next_row makes the row following the current row in the current + category the current row. + If there are no more rows, the function returns CBF_NOTFOUND. + The current column is not affected. ARGUMENTS - handle CBF handle. cell Pointer to the destination array of - 6 doubles for the cell parameters. cell_esd Pointer to the - destination array of 6 doubles for the cell parameter esds. + handle CBF handle. RETURN VALUE - Returns an error code on failure or 0 for success. No errors is - returned for missing values if the "cell " category exists. + Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_get_unit_cell(self) + return _pycbf.cbf_handle_struct_next_row(self) + def find_datablock(self, arg): + r""" - def get_unit_cell_esd(self): - """get_unit_cell_esd(cbf_handle_struct self)""" - return _pycbf.cbf_handle_struct_get_unit_cell_esd(self) + Returns : string + *args : + C prototype: int cbf_find_datablock (cbf_handle handle, + const char *datablockname); + + CBFLib documentation: + DESCRIPTION + cbf_find_datablock makes the data block with name datablockname the + current data block. + The comparison is case-insensitive. + If the data block does not exist, the function returns CBF_NOTFOUND. + The current category becomes undefined. + ARGUMENTS + handle CBF handle. datablockname The name of the data + block to find. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO - def get_axis_type(self, axis_id): """ + return _pycbf.cbf_handle_struct_find_datablock(self, arg) - Returns : String - *args : String axis_id + def find_category(self, arg): + r""" - C prototype: int cbf_get_axis_type (cbf_handle handle, const char *axis_id, - cbf_axis_type *axis_type); + Returns : string + *args : - CBFLib documentation: - DESCRIPTION - cbf_count_axis_ancestors sets ancestors to the number of ancestors of - axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor - axis of index ancestor_index of axis axis_id, starting with axis_id - for ancestor_index 0. - cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of - axis_id or to ". " if there is no such ancestor. - cbf_get_axis_equipment sets *equipment to the equipment of axis_id or - to ". " if there is no such equipment. - cbf_get_axis_equipment_component sets *equipment_component to the - equipment_component of axis_id or to ". " if there is no such - equipment_component. - cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the - components of the ofset of axis_id. - cbf_get_axis_rotation sets rotation to the rotation of axis_id or to - 0 if there is no such rotation. cbf_get_axis_rotation_axis sets - *rotation_axis to the rotation_axis of axis_id or to ". " if there - is no such rotation_axis. - cbf_get_axis_setting sets *start and *increment to the corresponding - values of the axis axis_id. Any of the destination pointers may be - NULL. - cbf_get_axis_type sets axis_type to the type of axis_id. - cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the - components of the vector of axis_id. - The parameter reserved is presently unused and should be set to 0. - ARGUMENTS - handle CBF handle. reserved Unused. Any - value other than 0 is invalid. axis_id Axis id. - ancestor_index Integer index of the desired ancestor, starting - with 0 for the current axis_id. ancestor Pointer to - destination ancestor name pointer. depends_on Pointer to - destination depends_on name pointer. equipment Pointer to - destination equipment name pointer. equipment_component Pointer to - destination equipment_component name pointer. offset1 - Pointer to destination first offset component value. offset2 - Pointer to destination second offset component value. offset3 - Pointer to destination third offset component value. - rotation Pointer to destination rotation value. - rotation_axis Pointer to destination rotation_axisn name - pointer. start Pointer to the destination start - value. increment Pointer to the destination increment - value. type Pointer to destination axis type of type - . vector1 Pointer to destination first vector component - value. vector2 Pointer to destination second vector - component value. vector3 Pointer to destination third - vector component value. + C prototype: int cbf_find_category (cbf_handle handle, + const char *categoryname); + + CBFLib documentation: + DESCRIPTION + cbf_find_category makes the category in the current data block with + name categoryname the current category. + The comparison is case-insensitive. + If the category does not exist, the function returns CBF_NOTFOUND. + The current column and row become undefined. + ARGUMENTS + handle CBF handle. categoryname The name of the category to + find. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_get_axis_type(self, axis_id) - + return _pycbf.cbf_handle_struct_find_category(self, arg) - def remove_column(self): - """ + def find_column(self, arg): + r""" - Returns : + Returns : string *args : - C prototype: int cbf_remove_column (cbf_handle handle); + C prototype: int cbf_find_column (cbf_handle handle, const char *columnname); CBFLib documentation: DESCRIPTION - cbf_remove_column deletes the current column. - The current column becomes undefined. + cbf_find_column makes the columns in the current category with name + columnname the current column. + The comparison is case-insensitive. + If the column does not exist, the function returns CBF_NOTFOUND. + The current row is not affected. ARGUMENTS - handle CBF handle. + handle CBF handle. columnname The name of column to find. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_remove_column(self) - + return _pycbf.cbf_handle_struct_find_column(self, arg) - def rewind_blockitem(self): - """ + def find_row(self, arg): + r""" - Returns : CBF_NODETYPE + Returns : string *args : - C prototype: int cbf_rewind_blockitem (cbf_handle handle, - CBF_NODETYPE * type); + C prototype: int cbf_find_row (cbf_handle handle, const char *value); CBFLib documentation: DESCRIPTION - cbf_rewind_category makes the first category in the current data - block the current category. cbf_rewind_saveframe makes the first - saveframe in the current data block the current saveframe. - cbf_rewind_blockitem makes the first blockitem (category or - saveframe) in the current data block the current blockitem. The type - of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type. - If there are no categories, saveframes or blockitems the function - returns CBF_NOTFOUND. - The current column and row become undefined. + cbf_find_row makes the first row in the current column with value + value the current row. + The comparison is case-sensitive. + If a matching row does not exist, the function returns CBF_NOTFOUND. + The current column is not affected. ARGUMENTS - handle CBF handle. type CBF handle. + handle CBF handle. value The value of the row to find. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_rewind_blockitem(self) + return _pycbf.cbf_handle_struct_find_row(self, arg) + def find_nextrow(self, arg): + r""" + + Returns : string + *args : + + C prototype: int cbf_find_nextrow (cbf_handle handle, const char *value); + + CBFLib documentation: + DESCRIPTION + cbf_find_nextrow makes the makes the next row in the current column + with value value the current row. The search starts from the row + following the last row found with cbf_find_row or cbf_find_nextrow, + or from the current row if the current row was defined using any + other function. + The comparison is case-sensitive. + If no more matching rows exist, the function returns CBF_NOTFOUND. + The current column is not affected. + ARGUMENTS + handle CBF handle. value the value to search for. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO - def get_value(self): """ + return _pycbf.cbf_handle_struct_find_nextrow(self, arg) - Returns : - *args : string + def count_datablocks(self): + r""" - C prototype: int cbf_get_value (cbf_handle handle, const char **value); + Returns : Integer + *args : + + C prototype: int cbf_count_datablocks (cbf_handle handle, + unsigned int *datablocks); CBFLib documentation: DESCRIPTION - cbf_get_value sets *value to point to the ASCII value of the item at - the current column and row. cbf_require_value sets *value to point to - the ASCII value of the item at the current column and row, creating - the data item if necessary and initializing it to a copy of - defaultvalue. - If the value is not ASCII, the function returns CBF_BINARY. - The value will be valid as long as the item exists and has not been - set to a new value. - The value must not be modified by the program in any way. + cbf_count_datablocks puts the number of data blocks in *datablocks . ARGUMENTS - handle CBF handle. value Pointer to the destination - value pointer. defaultvalue Default value character string. + handle CBF handle. datablocks Pointer to the destination data + block count. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_get_value(self) - + return _pycbf.cbf_handle_struct_count_datablocks(self) def count_categories(self): - """ + r""" Returns : Integer *args : @@ -3206,962 +3062,783 @@ def count_categories(self): """ return _pycbf.cbf_handle_struct_count_categories(self) + def count_columns(self): + r""" - def read_widefile(self, filename, headers): - """ - - Returns : - *args : String filename,Integer headers + Returns : Integer + *args : - C prototype: int cbf_read_widefile (cbf_handle handle, FILE *file, int flags); + C prototype: int cbf_count_columns (cbf_handle handle, unsigned int *columns); CBFLib documentation: DESCRIPTION - cbf_read_file reads the CBF or CIF file file into the CBF object - specified by handle, using the CIF 1.0 convention of 80 character - lines. cbf_read_widefile reads the CBF or CIF file file into the CBF - object specified by handle, using the CIF 1.1 convention of 2048 - character lines. A warning is issued to stderr for ascii lines over - the limit. No test is performed on binary sections. - Validation is performed in three ways levels: during the lexical - scan, during the parse, and, if a dictionary was converted, against - the value types, value enumerations, categories and parent-child - relationships specified in the dictionary. - flags controls the interpretation of binary section headers, the - parsing of brackets constructs and the parsing of treble-quoted - strings. - MSG_DIGEST: Instructs CBFlib to check that the digest - of the binary section matches any header digest value. If the digests - do not match, the call will return CBF_FORMAT. This evaluation and - comparison is delayed (a "lazy " evaluation) to ensure maximal - processing efficiency. If an immediately evaluation is required, see - MSG_DIGESTNOW, below. MSG_DIGESTNOW: Instructs CBFlib to - check that the digest of the binary section matches any header - digeste value. If the digests do not match, the call will return - CBF_FORMAT. This evaluation and comparison is performed during - initial parsing of the section to ensure timely error reporting at - the expense of processing efficiency. If a more efficient delayed ( - "lazy ") evaluation is required, see MSG_DIGEST, above. - MSG_DIGESTWARN: Instructs CBFlib to check that the digest - of the binary section matches any header digeste value. If the - digests do not match, a warning message will be sent to stderr, but - processing will attempt to continue. This evaluation and comparison - is first performed during initial parsing of the section to ensure - timely error reporting at the expense of processing efficiency. An - mismatch of the message digest usually indicates a serious error, but - it is sometimes worth continuing processing to try to isolate the - cause of the error. Use this option with caution. MSG_NODIGEST: - Do not check the digest (default). PARSE_BRACKETS: - Accept DDLm bracket-delimited [item,item,...item] or - {item,item,...item} or (item,item,...item) constructs as valid, - stripping non-quoted embedded whitespace and comments. These - constructs may span multiple lines. PARSE_LIBERAL_BRACKETS: Accept - DDLm bracket-delimited [item,item,...item] or {item,item,...item} or - (item,item,...item) constructs as valid, stripping embedded - non-quoted, non-separating whitespace and comments. These constructs - may span multiple lines. In this case, whitespace may be used as an - alternative to the comma. PARSE_TRIPLE_QUOTES: Accept DDLm - triple-quoted " " "item,item,...item " " " or - '''item,item,...item''' constructs as valid, stripping embedded - whitespace and comments. These constructs may span multiple lines. If - this flag is set, then ''' will not be interpreted as a quoted - apoptrophe and " " " will not be interpreted as a quoted double - quote mark and PARSE_NOBRACKETS: Do not accept DDLm - bracket-delimited [item,item,...item] or {item,item,...item} or - (item,item,...item) constructs as valid, stripping non-quoted - embedded whitespace and comments. These constructs may span multiple - lines. PARSE_NOTRIPLE_QUOTES: No not accept DDLm triple-quoted " - " "item,item,...item " " " or '''item,item,...item''' constructs - as valid, stripping embedded whitespace and comments. These - constructs may span multiple lines. If this flag is set, then ''' - will be interpreted as a quoted apostrophe and " " " will be - interpreted as a quoted double quote mark. - CBFlib defers reading binary sections as long as possible. In the - current version of CBFlib, this means that: - 1. The file must be a random-access file opened in binary mode (fopen - ( , + cbf_count_columns puts the number of columns in the current category + in *columns. + ARGUMENTS + handle CBF handle. columns Pointer to the destination column + count. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO """ - return _pycbf.cbf_handle_struct_read_widefile(self, filename, headers) + return _pycbf.cbf_handle_struct_count_columns(self) + def count_rows(self): + r""" + + Returns : Integer + *args : + + C prototype: int cbf_count_rows (cbf_handle handle, unsigned int *rows); + + CBFLib documentation: + DESCRIPTION + cbf_count_rows puts the number of rows in the current category in + *rows . + ARGUMENTS + handle CBF handle. rows Pointer to the destination row count. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO - def set_wavelength(self, wavelength): """ + return _pycbf.cbf_handle_struct_count_rows(self) - Returns : double wavelength - *args : + def select_datablock(self, arg): + r""" - C prototype: int cbf_set_wavelength (cbf_handle handle, double wavelength); + Returns : + *args : Integer + + C prototype: int cbf_select_datablock (cbf_handle handle, + unsigned int datablock); CBFLib documentation: DESCRIPTION - cbf_set_wavelength sets the current wavelength in AA to wavelength. + cbf_select_datablock selects data block number datablock as the + current data block. + The first data block is number 0. + If the data block does not exist, the function returns CBF_NOTFOUND. ARGUMENTS - handle CBF handle. wavelength Wavelength in AA. + handle CBF handle. datablock Number of the data block to + select. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_set_wavelength(self, wavelength) + return _pycbf.cbf_handle_struct_select_datablock(self, arg) + def select_category(self, arg): + r""" + + Returns : + *args : Integer + + C prototype: int cbf_select_category (cbf_handle handle, + unsigned int category); + + CBFLib documentation: + DESCRIPTION + cbf_select_category selects category number category in the current + data block as the current category. + The first category is number 0. + The current column and row become undefined. + If the category does not exist, the function returns CBF_NOTFOUND. + ARGUMENTS + handle CBF handle. category Number of the category to select. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO - def get_axis_vector(self, axis_id): """ + return _pycbf.cbf_handle_struct_select_category(self, arg) + + def select_column(self, arg): + r""" - Returns : Float vector1,Float vector2,Float vector3 - *args : String axis_id + Returns : + *args : Integer - C prototype: int cbf_get_axis_vector (cbf_handle handle, const char *axis_id, - double *vector1, double *vector2, double *vector3); + C prototype: int cbf_select_column (cbf_handle handle, unsigned int column); CBFLib documentation: DESCRIPTION - cbf_count_axis_ancestors sets ancestors to the number of ancestors of - axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor - axis of index ancestor_index of axis axis_id, starting with axis_id - for ancestor_index 0. - cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of - axis_id or to ". " if there is no such ancestor. - cbf_get_axis_equipment sets *equipment to the equipment of axis_id or - to ". " if there is no such equipment. - cbf_get_axis_equipment_component sets *equipment_component to the - equipment_component of axis_id or to ". " if there is no such - equipment_component. - cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the - components of the ofset of axis_id. - cbf_get_axis_rotation sets rotation to the rotation of axis_id or to - 0 if there is no such rotation. cbf_get_axis_rotation_axis sets - *rotation_axis to the rotation_axis of axis_id or to ". " if there - is no such rotation_axis. - cbf_get_axis_setting sets *start and *increment to the corresponding - values of the axis axis_id. Any of the destination pointers may be - NULL. - cbf_get_axis_type sets axis_type to the type of axis_id. - cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the - components of the vector of axis_id. - The parameter reserved is presently unused and should be set to 0. + cbf_select_column selects column number column in the current + category as the current column. + The first column is number 0. + The current row is not affected + If the column does not exist, the function returns CBF_NOTFOUND. ARGUMENTS - handle CBF handle. reserved Unused. Any - value other than 0 is invalid. axis_id Axis id. - ancestor_index Integer index of the desired ancestor, starting - with 0 for the current axis_id. ancestor Pointer to - destination ancestor name pointer. depends_on Pointer to - destination depends_on name pointer. equipment Pointer to - destination equipment name pointer. equipment_component Pointer to - destination equipment_component name pointer. offset1 - Pointer to destination first offset component value. offset2 - Pointer to destination second offset component value. offset3 - Pointer to destination third offset component value. - rotation Pointer to destination rotation value. - rotation_axis Pointer to destination rotation_axisn name - pointer. start Pointer to the destination start - value. increment Pointer to the destination increment - value. type Pointer to destination axis type of type - . vector1 Pointer to destination first vector component - value. vector2 Pointer to destination second vector - component value. vector3 Pointer to destination third - vector component value. + handle CBF handle. column Number of the column to select. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_get_axis_vector(self, axis_id) - + return _pycbf.cbf_handle_struct_select_column(self, arg) - def set_pixel_size_sf(self, element_number, axis_number, psize): - """ + def select_row(self, arg): + r""" Returns : - *args : Int element_number,Int axis_number,Float pixel size + *args : Integer - C prototype: int cbf_set_pixel_size_sf(cbf_handle handle, - unsigned int element_number, int axis_number, - double psize); + C prototype: int cbf_select_row (cbf_handle handle, unsigned int row); CBFLib documentation: DESCRIPTION - cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the - "e;size"e; column of the "array_structure_list " category - at the row which matches axis axis_number of the detector element - element_number converting the double pixel size psize from meters to - millimeters in storing it in the "size " column for the axis - axis_number of the detector element element_number. The axis_number - is numbered from 1, starting with the slowest axis. - cbf_set_pixel_size_fs sets the item + cbf_select_row selects row number row in the current category as the + current row. + The first row is number 0. + The current column is not affected + If the row does not exist, the function returns CBF_NOTFOUND. + ARGUMENTS + handle CBF handle. row Number of the row to select. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO """ - return _pycbf.cbf_handle_struct_set_pixel_size_sf(self, element_number, axis_number, psize) - + return _pycbf.cbf_handle_struct_select_row(self, arg) - def get_diffrn_id(self): - """ + def datablock_name(self): + r""" Returns : *args : string - C prototype: int cbf_get_diffrn_id (cbf_handle handle, - const char **diffrn_id); + C prototype: int cbf_datablock_name (cbf_handle handle, + const char **datablockname); CBFLib documentation: DESCRIPTION - cbf_get_diffrn_id sets *diffrn_id to point to the ASCII value of the - "diffrn.id " entry. cbf_require_diffrn_id also sets *diffrn_id to - point to the ASCII value of the "diffrn.id " entry, but, if the - "diffrn.id " entry does not exist, it sets the value in the CBF and - in*diffrn_id to the character string given by default_id, creating - the category and column is necessary. - The diffrn_id will be valid as long as the item exists and has not - been set to a new value. - The diffrn_id must not be modified by the program in any way. + cbf_datablock_name sets *datablockname to point to the name of the + current data block. + The data block name will be valid as long as the data block exists + and has not been renamed. + The name must not be modified by the program in any way. ARGUMENTS - handle CBF handle. diffrn_id Pointer to the destination - value pointer. default_id Character string default value. + handle CBF handle. datablockname Pointer to the + destination data block name pointer. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_get_diffrn_id(self) - + return _pycbf.cbf_handle_struct_datablock_name(self) - def get_axis_rotation(self, axis_id): - """ + def category_name(self): + r""" - Returns : Float - *args : String axis_id + Returns : + *args : string - C prototype: int cbf_get_axis_rotation (cbf_handle handle, - const char *axis_id, double *rotation); + C prototype: int cbf_category_name (cbf_handle handle, + const char **categoryname); CBFLib documentation: DESCRIPTION - cbf_count_axis_ancestors sets ancestors to the number of ancestors of - axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor - axis of index ancestor_index of axis axis_id, starting with axis_id - for ancestor_index 0. - cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of - axis_id or to ". " if there is no such ancestor. - cbf_get_axis_equipment sets *equipment to the equipment of axis_id or - to ". " if there is no such equipment. - cbf_get_axis_equipment_component sets *equipment_component to the - equipment_component of axis_id or to ". " if there is no such - equipment_component. - cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the - components of the ofset of axis_id. - cbf_get_axis_rotation sets rotation to the rotation of axis_id or to - 0 if there is no such rotation. cbf_get_axis_rotation_axis sets - *rotation_axis to the rotation_axis of axis_id or to ". " if there - is no such rotation_axis. - cbf_get_axis_setting sets *start and *increment to the corresponding - values of the axis axis_id. Any of the destination pointers may be - NULL. - cbf_get_axis_type sets axis_type to the type of axis_id. - cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the - components of the vector of axis_id. - The parameter reserved is presently unused and should be set to 0. + cbf_category_name sets *categoryname to point to the name of the + current category of the current data block. + The category name will be valid as long as the category exists. + The name must not be modified by the program in any way. ARGUMENTS - handle CBF handle. reserved Unused. Any - value other than 0 is invalid. axis_id Axis id. - ancestor_index Integer index of the desired ancestor, starting - with 0 for the current axis_id. ancestor Pointer to - destination ancestor name pointer. depends_on Pointer to - destination depends_on name pointer. equipment Pointer to - destination equipment name pointer. equipment_component Pointer to - destination equipment_component name pointer. offset1 - Pointer to destination first offset component value. offset2 - Pointer to destination second offset component value. offset3 - Pointer to destination third offset component value. - rotation Pointer to destination rotation value. - rotation_axis Pointer to destination rotation_axisn name - pointer. start Pointer to the destination start - value. increment Pointer to the destination increment - value. type Pointer to destination axis type of type - . vector1 Pointer to destination first vector component - value. vector2 Pointer to destination second vector - component value. vector3 Pointer to destination third - vector component value. + handle CBF handle. categoryname Pointer to the destination + category name pointer. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_get_axis_rotation(self, axis_id) - + return _pycbf.cbf_handle_struct_category_name(self) - def find_datablock(self, arg): - """ + def column_name(self): + r""" - Returns : string - *args : + Returns : + *args : string - C prototype: int cbf_find_datablock (cbf_handle handle, - const char *datablockname); + C prototype: int cbf_column_name (cbf_handle handle, const char **columnname); CBFLib documentation: DESCRIPTION - cbf_find_datablock makes the data block with name datablockname the - current data block. - The comparison is case-insensitive. - If the data block does not exist, the function returns CBF_NOTFOUND. - The current category becomes undefined. + cbf_column_name sets *columnname to point to the name of the current + column of the current category. + The column name will be valid as long as the column exists. + The name must not be modified by the program in any way. + cbf_set_column_name sets the name of the current column to + newcolumnname ARGUMENTS - handle CBF handle. datablockname The name of the data - block to find. + handle CBF handle. columnname Pointer to the + destination column name pointer. newcolumnname New column name + pointer. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_find_datablock(self, arg) - + return _pycbf.cbf_handle_struct_column_name(self) - def get_polarization(self): - """ + def row_number(self): + r""" - Returns : float polarizn_source_ratio,float polarizn_source_norm + Returns : Integer *args : - C prototype: int cbf_get_polarization (cbf_handle handle, - double *polarizn_source_ratio, - double *polarizn_source_norm); + C prototype: int cbf_row_number (cbf_handle handle, unsigned int *row); CBFLib documentation: DESCRIPTION - cbf_get_polarization sets *polarizn_source_ratio and - *polarizn_source_norm to the corresponding source polarization - parameters. - Either destination pointer may be NULL. + cbf_row_number sets *row to the number of the current row of the + current category. ARGUMENTS - handle CBF handle. polarizn_source_ratio Pointer - to the destination polarizn_source_ratio. polarizn_source_norm - Pointer to the destination polarizn_source_norm. + handle CBF handle. row Pointer to the destination row number. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_get_polarization(self) - + return _pycbf.cbf_handle_struct_row_number(self) - def select_category(self, arg): - """ + def get_value(self): + r""" Returns : - *args : Integer + *args : string - C prototype: int cbf_select_category (cbf_handle handle, - unsigned int category); + C prototype: int cbf_get_value (cbf_handle handle, const char **value); CBFLib documentation: DESCRIPTION - cbf_select_category selects category number category in the current - data block as the current category. - The first category is number 0. - The current column and row become undefined. - If the category does not exist, the function returns CBF_NOTFOUND. + cbf_get_value sets *value to point to the ASCII value of the item at + the current column and row. cbf_require_value sets *value to point to + the ASCII value of the item at the current column and row, creating + the data item if necessary and initializing it to a copy of + defaultvalue. + If the value is not ASCII, the function returns CBF_BINARY. + The value will be valid as long as the item exists and has not been + set to a new value. + The value must not be modified by the program in any way. ARGUMENTS - handle CBF handle. category Number of the category to select. + handle CBF handle. value Pointer to the destination + value pointer. defaultvalue Default value character string. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_select_category(self, arg) - + return _pycbf.cbf_handle_struct_get_value(self) - def get_pixel_size_fs(self, element_number, axis_number): - """ + def require_value(self, defaultvalue): + r""" - Returns : Float pixel_size - *args : Int element_number,Int axis_number + Returns : String Value + *args : String defaultvalue - C prototype: int cbf_get_pixel_size_fs(cbf_handle handle, - unsigned int element_number, int axis_number, - double *psize); + C prototype: int cbf_require_value (cbf_handle handle, const char **value, + const char *defaultvalue ); CBFLib documentation: DESCRIPTION - cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to - the double value in millimeters of the axis axis_number of the - detector element element_number. The axis_number is numbered from 1, - starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to - point to the double value in millimeters of the axis axis_number of - the detector element element_number. The axis_number is numbered from - 1, starting with the fastest axis. - If a negative axis number is given, the order of axes is reversed, so - that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the - fastest axis for cbf_get_pixel_size_sf. - If the pixel size is not given explcitly in the "array_element_size - " category, the function returns CBF_NOTFOUND. + cbf_get_value sets *value to point to the ASCII value of the item at + the current column and row. cbf_require_value sets *value to point to + the ASCII value of the item at the current column and row, creating + the data item if necessary and initializing it to a copy of + defaultvalue. + If the value is not ASCII, the function returns CBF_BINARY. + The value will be valid as long as the item exists and has not been + set to a new value. + The value must not be modified by the program in any way. ARGUMENTS - handle CBF handle. element_number The number of the - detector element counting from 0 by order of appearance in the - "diffrn_data_frame " category. axis_number The number of the - axis, starting from 1 for the fastest for cbf_get_pixel_size and - cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. - psize Pointer to the destination pixel size. + handle CBF handle. value Pointer to the destination + value pointer. defaultvalue Default value character string. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_get_pixel_size_fs(self, element_number, axis_number) - + return _pycbf.cbf_handle_struct_require_value(self, defaultvalue) - def get_axis_poise(self, ratio, axis_id, frame_id): - """ + def set_value(self, arg): + r""" - Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2, - Float offset3,Float angle - *args : Float ratio,String axis_id,String frame_id + Returns : string + *args : - C prototype: int cbf_get_axis_poise(cbf_handle handle, double ratio, - double * vector1, double * vector2, double * vector3, - double * offset1, double * offset2, double * offset3, - double * angle, const char * axis_id, - const char * frame_id); + C prototype: int cbf_set_value (cbf_handle handle, const char *value); CBFLib documentation: DESCRIPTION - cbf_get_axis_poise sets vector1, vector2, vector3 to point to the - components of the axis vector for axis axis_id, offset1, offset2, - offset3 to point to the components of the axis base offset vector for - axis axis_id, and angle to point to the angle of rotation of axis - axis_id after application of the axis settings for frame frame_id, - using ratio, a value between 0 and 1, indicating how far into the - internal motion in the frame to go. If frame_id is the string ". - ", the first frame found is used. If there is more than one frame, - which frame will be found is indeterminate. If frame_id is NULL, the - overall setting for the scan are used, rather than those for any - particular frame. The vector and offset reported are the reference - vector and offset of the axis axis_id transformed by application of - all motions of the axes on which axis_id depends. - cbf_get_goniometer_poise vector1, vector2, vector3 to point to the - components of the axis vector for the goniometer axis, offset1, - offset2, offset3 to point to the components of the axis base offset - vector for the goniometer axis, and angle to point to the angle of - rotation of the goniometer axis after application of all axis - settings in the goniometer deriving the vector, offset and angle from - the resulting matrix. Calculation of the vector is indeterminate if - the angle is zero. - cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point - to the components of the axis vector for axis axis_id, offset1, - offset2, offset3 to point to the components of the axis base offset - vector for axis axis_id unmodified by axis rotations. Any of the - pointers may be specified as NULL. + cbf_set_value sets the item at the current column and row to the + ASCII value value. ARGUMENTS - handle CBF handle. ratio A number between 0 and 1 - indication how far into the frame to go vector1 Pointer to the - first component of the axis vector vector2 Pointer to the second - component of the axis vector vector3 Pointer to the third - component of the axis vector offset1 Pointer to the first - component of the axis offset offset2 Pointer to the second - component of the axis offset offset3 Pointer to the third - component of the axis offset angle Pointer to the rotation - angle axis_id The specified axis frame_id The specified - frame positioner CBF goniometer + handle CBF handle. value ASCII value. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_get_axis_poise(self, ratio, axis_id, frame_id) - + return _pycbf.cbf_handle_struct_set_value(self, arg) - def read_file(self, filename, headers): - """ + def get_typeofvalue(self): + r""" Returns : - *args : String filename,Integer headers + *args : string - C prototype: int cbf_read_file (cbf_handle handle, FILE *file, int flags); + C prototype: int cbf_get_typeofvalue (cbf_handle handle, + const char **typeofvalue); CBFLib documentation: DESCRIPTION - cbf_read_file reads the CBF or CIF file file into the CBF object - specified by handle, using the CIF 1.0 convention of 80 character - lines. cbf_read_widefile reads the CBF or CIF file file into the CBF - object specified by handle, using the CIF 1.1 convention of 2048 - character lines. A warning is issued to stderr for ascii lines over - the limit. No test is performed on binary sections. - Validation is performed in three ways levels: during the lexical - scan, during the parse, and, if a dictionary was converted, against - the value types, value enumerations, categories and parent-child - relationships specified in the dictionary. - flags controls the interpretation of binary section headers, the - parsing of brackets constructs and the parsing of treble-quoted - strings. - MSG_DIGEST: Instructs CBFlib to check that the digest - of the binary section matches any header digest value. If the digests - do not match, the call will return CBF_FORMAT. This evaluation and - comparison is delayed (a "lazy " evaluation) to ensure maximal - processing efficiency. If an immediately evaluation is required, see - MSG_DIGESTNOW, below. MSG_DIGESTNOW: Instructs CBFlib to - check that the digest of the binary section matches any header - digeste value. If the digests do not match, the call will return - CBF_FORMAT. This evaluation and comparison is performed during - initial parsing of the section to ensure timely error reporting at - the expense of processing efficiency. If a more efficient delayed ( - "lazy ") evaluation is required, see MSG_DIGEST, above. - MSG_DIGESTWARN: Instructs CBFlib to check that the digest - of the binary section matches any header digeste value. If the - digests do not match, a warning message will be sent to stderr, but - processing will attempt to continue. This evaluation and comparison - is first performed during initial parsing of the section to ensure - timely error reporting at the expense of processing efficiency. An - mismatch of the message digest usually indicates a serious error, but - it is sometimes worth continuing processing to try to isolate the - cause of the error. Use this option with caution. MSG_NODIGEST: - Do not check the digest (default). PARSE_BRACKETS: - Accept DDLm bracket-delimited [item,item,...item] or - {item,item,...item} or (item,item,...item) constructs as valid, - stripping non-quoted embedded whitespace and comments. These - constructs may span multiple lines. PARSE_LIBERAL_BRACKETS: Accept - DDLm bracket-delimited [item,item,...item] or {item,item,...item} or - (item,item,...item) constructs as valid, stripping embedded - non-quoted, non-separating whitespace and comments. These constructs - may span multiple lines. In this case, whitespace may be used as an - alternative to the comma. PARSE_TRIPLE_QUOTES: Accept DDLm - triple-quoted " " "item,item,...item " " " or - '''item,item,...item''' constructs as valid, stripping embedded - whitespace and comments. These constructs may span multiple lines. If - this flag is set, then ''' will not be interpreted as a quoted - apoptrophe and " " " will not be interpreted as a quoted double - quote mark and PARSE_NOBRACKETS: Do not accept DDLm - bracket-delimited [item,item,...item] or {item,item,...item} or - (item,item,...item) constructs as valid, stripping non-quoted - embedded whitespace and comments. These constructs may span multiple - lines. PARSE_NOTRIPLE_QUOTES: No not accept DDLm triple-quoted " - " "item,item,...item " " " or '''item,item,...item''' constructs - as valid, stripping embedded whitespace and comments. These - constructs may span multiple lines. If this flag is set, then ''' - will be interpreted as a quoted apostrophe and " " " will be - interpreted as a quoted double quote mark. - CBFlib defers reading binary sections as long as possible. In the - current version of CBFlib, this means that: - 1. The file must be a random-access file opened in binary mode (fopen - ( , + cbf_get_value sets *typeofvalue to point an ASCII descriptor of the + value of the item at the current column and row. The strings that may + be returned are: + "null " for a null value indicated by a ". " or a "? " + "bnry " for a binary value "word " for an unquoted string + "dblq " for a double-quoted string "sglq " for a single-quoted + string "text " for a semicolon-quoted string (multiline text + field) "prns " for a parenthesis-bracketed string (multiline text + field) "brcs " for a brace-bracketed string (multiline text field) + "bkts " for a square-bracket-bracketed string (multiline text + field) "tsqs " for a treble-single-quote quoted string (multiline + text field) "tdqs " for a treble-double-quote quoted string + (multiline text field) + Not all types are valid for all type of CIF files. In partcular the + types "prns ", "brcs ", "bkts " were introduced with DDLm + and are not valid in DDL1 or DDL2 CIFS. The types "tsqs " and + "tdqs " are not formally part of the CIF syntax. A field for which + no value has been set sets *typeofvalue to NULL rather than to the + string "null ". + The typeofvalue must not be modified by the program in any way. + ARGUMENTS + handle CBF handle. typeofvalue Pointer to the destination + type-of-value string pointer. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO """ - return _pycbf.cbf_handle_struct_read_file(self, filename, headers) - + return _pycbf.cbf_handle_struct_get_typeofvalue(self) - def datablock_name(self): - """ + def set_typeofvalue(self, arg): + r""" - Returns : - *args : string + Returns : string + *args : - C prototype: int cbf_datablock_name (cbf_handle handle, - const char **datablockname); + C prototype: int cbf_set_typeofvalue (cbf_handle handle, + const char *typeofvalue); CBFLib documentation: DESCRIPTION - cbf_datablock_name sets *datablockname to point to the name of the - current data block. - The data block name will be valid as long as the data block exists - and has not been renamed. - The name must not be modified by the program in any way. + cbf_set_typeofvalue sets the type of the item at the current column + and row to the type specified by the ASCII character string given by + typeofvalue. The strings that may be used are: + "null " for a null value indicated by a ". " or a "? " + "bnry " for a binary value "word " for an unquoted string + "dblq " for a double-quoted string "sglq " for a single-quoted + string "text " for a semicolon-quoted string (multiline text + field) "prns " for a parenthesis-bracketed string (multiline text + field) "brcs " for a brace-bracketed string (multiline text field) + "bkts " for a square-bracket-bracketed string (multiline text + field) "tsqs " for a treble-single-quote quoted string (multiline + text field) "tdqs " for a treble-double-quote quoted string + (multiline text field) + Not all types may be used for all values. Not all types are valid for + all type of CIF files. In partcular the types "prns ", "brcs ", + "bkts " were introduced with DDLm and are not valid in DDL1 or + DDL2 CIFS. The types "tsqs " and "tdqs " are not formally part + of the CIF syntax. No changes may be made to the type of binary + values. You may not set the type of a string that contains a single + quote followed by a blank or a tab or which contains multiple lines + to "sglq ". You may not set the type of a string that contains a + double quote followed by a blank or a tab or which contains multiple + lines to "dblq ". ARGUMENTS - handle CBF handle. datablockname Pointer to the - destination data block name pointer. + handle CBF handle. typeofvalue ASCII string for desired type + of value. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_datablock_name(self) - + return _pycbf.cbf_handle_struct_set_typeofvalue(self, arg) - def set_realarray_wdims(self, compression, binary_id, data, elsize, elements, bo, dimfast, dimmid, dimslow, padding): - """ + def get_integervalue(self): + r""" - Returns : - *args : int compression,int binary_id,(binary) String data,int elsize, - int elements,String byteorder,int dimfast,int dimmid,int dimslow, - int padding + Returns : int + *args : - C prototype: int cbf_set_realarray_wdims (cbf_handle handle, - unsigned int compression, int binary_id, void *array, - size_t elsize, size_t elements, const char *byteorder, - size_t dimfast, size_t dimmid, size_t dimslow, - size_t padding); + C prototype: int cbf_get_integervalue (cbf_handle handle, int *number); CBFLib documentation: DESCRIPTION - cbf_set_integerarray sets the binary value of the item at the current - column and row to an integer array. The array consists of elements - elements of elsize bytes each, starting at array. The elements are - signed if elsigned is non-0 and unsigned otherwise. binary_id is the - binary section identifier. cbf_set_realarray sets the binary value of - the item at the current column and row to an integer array. The array - consists of elements elements of elsize bytes each, starting at - array. binary_id is the binary section identifier. - The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, - cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, - cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants - allow the data header values of byteorder, dimfast, dimmid, dimslow - and padding to be set to the data byte order, the fastest, second - fastest and third fastest array dimensions and the size in byte of - the post data padding to be used. - The array will be compressed using the compression scheme specifed by - compression. Currently, the available schemes are: - CBF_CANONICAL Canonical-code compression (section 3.3.1) - CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple - "nibble_offset " compression. CBF_NONE No compression. - NOTE: This scheme is by far the slowest of the four and uses much - more disk space. It is intended for routine use with small arrays - only. With large arrays (like images) it should be used only for - debugging. - The values compressed are limited to 64 bits. If any element in the - array is larger than 64 bits, the value compressed is the nearest - 64-bit value. - Currently, the source array must consist of chars, shorts or ints - (signed or unsigned), for cbf_set_integerarray, or IEEE doubles or - floats for cbf_set_realarray. If elsize is not equal to sizeof - (char), sizeof (short) or sizeof (int), the function returns - CBF_ARGUMENT. + cbf_get_integervalue sets *number to the value of the ASCII item at + the current column and row interpreted as a decimal integer. + cbf_require_integervalue sets *number to the value of the ASCII item + at the current column and row interpreted as a decimal integer, + setting it to defaultvalue if necessary. + If the value is not ASCII, the function returns CBF_BINARY. ARGUMENTS - handle CBF handle. compression Compression method to use. - binary_id Integer binary identifier. array Pointer to the - source array. elsize Size in bytes of each source array - element. elsigned Set to non-0 if the source array elements are - signed. elements: The number of elements in the array. + handle CBF handle. number pointer to the number. + defaultvalue default number value. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_set_realarray_wdims(self, compression, binary_id, data, elsize, elements, bo, dimfast, dimmid, dimslow, padding) - + return _pycbf.cbf_handle_struct_get_integervalue(self) - def construct_reference_detector(self, element_number): - """ + def require_integervalue(self, thedefault): + r""" - Returns : pycbf detector object - *args : Integer element_number + Returns : Int number + *args : Int thedefault - C prototype: int cbf_construct_reference_detector (cbf_handle handle, - cbf_detector *detector, unsigned int element_number); + C prototype: int cbf_require_integervalue (cbf_handle handle, int *number, + int defaultvalue); CBFLib documentation: DESCRIPTION - cbf_construct_detector constructs a detector object for detector - element number element_number using the description in the CBF object - handle and initialises the detector handle *detector. - cbf_construct_reference_detector constructs a detector object for - detector element number element_number using the description in the - CBF object handle and initialises the detector handle *detector using - the reference settings of the axes. cbf_require_reference_detector is - similar, but try to force the creations of missing intermediate - categories needed to construct a detector object. + cbf_get_integervalue sets *number to the value of the ASCII item at + the current column and row interpreted as a decimal integer. + cbf_require_integervalue sets *number to the value of the ASCII item + at the current column and row interpreted as a decimal integer, + setting it to defaultvalue if necessary. + If the value is not ASCII, the function returns CBF_BINARY. ARGUMENTS - handle CBF handle. detector Pointer to the - destination detector handle. element_number The number of the - detector element counting from 0 by order of appearance in the - "diffrn_data_frame " category. + handle CBF handle. number pointer to the number. + defaultvalue default number value. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_construct_reference_detector(self, element_number) - + return _pycbf.cbf_handle_struct_require_integervalue(self, thedefault) - def get_real_3d_image_fs_as_string(self, element_number, elsize, ndimfast, ndimmid, ndimslow): - """ + def set_integervalue(self, number): + r""" - Returns : (Binary)String - *args : int element_number,int elsize,int ndimfast,int ndimmid,int ndimslow + Returns : int number + *args : - C prototype: int cbf_get_real_3d_image_fs (cbf_handle handle, - unsigned int reserved, unsigned int element_number, - void *array, size_t elsize, size_t ndimfast, - size_t ndimmid, size_t ndimslow); + C prototype: int cbf_set_integervalue (cbf_handle handle, int number); CBFLib documentation: DESCRIPTION - cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image - array for element number element_number into an array. The array - consists of ndimslow *ndimfast elements of elsize bytes each, - starting at array. The elements are signed if elsign is non-0 and - unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and - cbf_get_real_image_sf read the image array of IEEE doubles or floats - for element number element_number into an array. A real array is - always signed. cbf_get_3d_image, cbf_get_3d_image_fs and - cbf_get_3d_image_sf read the 3D image array for element number - element_number into an array. The array consists of ndimslow *ndimmid - *ndimfast elements of elsize bytes each, starting at array. The - elements are signed if elsign is non-0 and unsigned otherwise. - cbf_get_real_3d_image, cbf_get_real_3d_image_fs, - cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or - floats for element number element_number into an array. A real array - is always signed. - The _fs calls give the dimensions in a fast-to-slow order. The calls - with no suffix and the calls _sf calls give the dimensions in - slow-to-fast order - The structure of the array as a 1-, 2- or 3-dimensional array should - agree with the structure of the array given in the - ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, - ndimslow should be the array size and ndimfast and, for the 3D calls, - ndimmid, should be set to 1 both in the call and in the imgCIF data - being processed. If the array is 2-dimensional and a 3D call is used, - ndimslow and ndimmid should be the + cbf_set_integervalue sets the item at the current column and row to + the integer value number written as a decimal ASCII string. + ARGUMENTS + handle CBF handle. number Integer value. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO """ - return _pycbf.cbf_handle_struct_get_real_3d_image_fs_as_string(self, element_number, elsize, ndimfast, ndimmid, ndimslow) - + return _pycbf.cbf_handle_struct_set_integervalue(self, number) - def rewind_row(self): - """ + def get_doublevalue(self): + r""" - Returns : + Returns : double *args : - C prototype: int cbf_rewind_row (cbf_handle handle); + C prototype: int cbf_get_doublevalue (cbf_handle handle, double *number); CBFLib documentation: DESCRIPTION - cbf_rewind_row makes the first row in the current category the - current row. - If there are no rows, the function returns CBF_NOTFOUND. - The current column is not affected. + cbf_get_doublevalue sets *number to the value of the ASCII item at + the current column and row interpreted as a decimal floating-point + number. cbf_require_doublevalue sets *number to the value of the + ASCII item at the current column and row interpreted as a decimal + floating-point number, setting it to defaultvalue if necessary. + If the value is not ASCII, the function returns CBF_BINARY. ARGUMENTS - handle CBF handle. + handle CBF handle. number Pointer to the destination + number. defaultvalue default number value. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_rewind_row(self) - + return _pycbf.cbf_handle_struct_get_doublevalue(self) - def get_axis_setting(self, axis_id): - """ + def require_doublevalue(self, defaultvalue): + r""" - Returns : Float start,Float increment - *args : String axis_id + Returns : Float Number + *args : Float Default - C prototype: int cbf_get_axis_setting (cbf_handle handle, - unsigned int reserved, const char *axis_id, double *start, - double *increment); + C prototype: int cbf_require_doublevalue (cbf_handle handle, double *number, + double defaultvalue); CBFLib documentation: DESCRIPTION - cbf_count_axis_ancestors sets ancestors to the number of ancestors of - axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor - axis of index ancestor_index of axis axis_id, starting with axis_id - for ancestor_index 0. - cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of - axis_id or to ". " if there is no such ancestor. - cbf_get_axis_equipment sets *equipment to the equipment of axis_id or - to ". " if there is no such equipment. - cbf_get_axis_equipment_component sets *equipment_component to the - equipment_component of axis_id or to ". " if there is no such - equipment_component. - cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the - components of the ofset of axis_id. - cbf_get_axis_rotation sets rotation to the rotation of axis_id or to - 0 if there is no such rotation. cbf_get_axis_rotation_axis sets - *rotation_axis to the rotation_axis of axis_id or to ". " if there - is no such rotation_axis. - cbf_get_axis_setting sets *start and *increment to the corresponding - values of the axis axis_id. Any of the destination pointers may be - NULL. - cbf_get_axis_type sets axis_type to the type of axis_id. - cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the - components of the vector of axis_id. - The parameter reserved is presently unused and should be set to 0. + cbf_get_doublevalue sets *number to the value of the ASCII item at + the current column and row interpreted as a decimal floating-point + number. cbf_require_doublevalue sets *number to the value of the + ASCII item at the current column and row interpreted as a decimal + floating-point number, setting it to defaultvalue if necessary. + If the value is not ASCII, the function returns CBF_BINARY. ARGUMENTS - handle CBF handle. reserved Unused. Any - value other than 0 is invalid. axis_id Axis id. - ancestor_index Integer index of the desired ancestor, starting - with 0 for the current axis_id. ancestor Pointer to - destination ancestor name pointer. depends_on Pointer to - destination depends_on name pointer. equipment Pointer to - destination equipment name pointer. equipment_component Pointer to - destination equipment_component name pointer. offset1 - Pointer to destination first offset component value. offset2 - Pointer to destination second offset component value. offset3 - Pointer to destination third offset component value. - rotation Pointer to destination rotation value. - rotation_axis Pointer to destination rotation_axisn name - pointer. start Pointer to the destination start - value. increment Pointer to the destination increment - value. type Pointer to destination axis type of type - . vector1 Pointer to destination first vector component - value. vector2 Pointer to destination second vector - component value. vector3 Pointer to destination third - vector component value. + handle CBF handle. number Pointer to the destination + number. defaultvalue default number value. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- - - """ - return _pycbf.cbf_handle_struct_get_axis_setting(self, axis_id) - + SEE ALSO - def require_column(self, arg): """ + return _pycbf.cbf_handle_struct_require_doublevalue(self, defaultvalue) - Returns : string - *args : + def set_doublevalue(self, format, number): + r""" - C prototype: int cbf_require_column (cbf_handle handle, - const char *columnname); + Returns : + *args : String format,Float number + + C prototype: int cbf_set_doublevalue (cbf_handle handle, const char *format, + double number); CBFLib documentation: DESCRIPTION - cbf_require_column makes the columns in the current category with - name columnname the current column, if it exists, or creates it if it - does not. - The comparison is case-insensitive. - The current row is not affected. + cbf_set_doublevalue sets the item at the current column and row to + the floating-point value number written as an ASCII string with the + format specified by format as appropriate for the printf function. ARGUMENTS - handle CBF handle. columnname The name of column to find. + handle CBF handle. format Format for the number. number + Floating-point value. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_require_column(self, arg) - + return _pycbf.cbf_handle_struct_set_doublevalue(self, format, number) - def get_timestamp(self): - """ + def get_integerarrayparameters(self): + r""" - Returns : Float time,Integer timezone + Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, + int elements,int minelement,int maxelement *args : - C prototype: int cbf_get_timestamp (cbf_handle handle, unsigned int reserved, - double *time, int *timezone); + C prototype: int cbf_get_integerarrayparameters (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + int *elsigned, int *elunsigned, size_t *elements, + int *minelement, int *maxelement); CBFLib documentation: DESCRIPTION - cbf_get_timestamp sets *time to the collection timestamp in seconds - since January 1 1970. *timezone is set to timezone difference from - UTC in minutes. The parameter reserved is presently unused and should - be set to 0. - Either of the destination pointers may be NULL. + cbf_get_integerarrayparameters sets *compression, *binary_id, + *elsize, *elsigned, *elunsigned, *elements, *minelement and + *maxelement to values read from the binary value of the item at the + current column and row. This provides all the arguments needed for a + subsequent call to cbf_set_integerarray, if a copy of the array is to + be made into another CIF or CBF. cbf_get_realarrayparameters sets + *compression, *binary_id, *elsize, *elements to values read from the + binary value of the item at the current column and row. This provides + all the arguments needed for a subsequent call to cbf_set_realarray, + if a copy of the arry is to be made into another CIF or CBF. + The variants cbf_get_integerarrayparameters_wdims, + cbf_get_integerarrayparameters_wdims_fs, + cbf_get_integerarrayparameters_wdims_sf, + cbf_get_realarrayparameters_wdims, + cbf_get_realarrayparameters_wdims_fs, + cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, + *dimmid, *dimslow, and *padding as well, providing the additional + parameters needed for a subsequent call to cbf_set_integerarray_wdims + or cbf_set_realarray_wdims. + The value returned in *byteorder is a pointer either to the string + "little_endian " or to the string "big_endian ". This should be + the byte order of the data, not necessarily of the host machine. No + attempt should be made to modify this string. At this time only + "little_endian " will be returned. + The values returned in *dimfast, *dimmid and *dimslow are the sizes + of the fastest changing, second fastest changing and third fastest + changing dimensions of the array, if specified, or zero, if not + specified. + The value returned in *padding is the size of the post-data padding, + if any and if specified in the data header. The value is given as a + count of octets. + If the value is not binary, the function returns CBF_ASCII. ARGUMENTS - handle CBF handle. reserved Unused. Any value other than 0 is - invalid. time Pointer to the destination collection timestamp. - timezone Pointer to the destination timezone difference. + handle CBF handle. compression Compression method used. + elsize Size in bytes of each array element. binary_id + Pointer to the destination integer binary identifier. elsigned + Pointer to an integer. Set to 1 if the elements can be read as signed + integers. elunsigned Pointer to an integer. Set to 1 if the + elements can be read as unsigned integers. elements Pointer to + the destination number of elements. minelement Pointer to the + destination smallest element. maxelement Pointer to the + destination largest element. byteorder Pointer to the destination + byte order. dimfast Pointer to the destination fastest + dimension. dimmid Pointer to the destination second fastest + dimension. dimslow Pointer to the destination third fastest + dimension. padding Pointer to the destination padding size. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_get_timestamp(self) - + return _pycbf.cbf_handle_struct_get_integerarrayparameters(self) - def find_nextrow(self, arg): - """ + def get_integerarrayparameters_wdims(self): + r""" - Returns : string + Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, + int elements,int minelement,int maxelement,char **bo,int *bolen, + int dimfast,int dimmid,int dimslow,int padding *args : - C prototype: int cbf_find_nextrow (cbf_handle handle, const char *value); + C prototype: int cbf_get_integerarrayparameters_wdims (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + int *elsigned, int *elunsigned, size_t *elements, + int *minelement, int *maxelement, const char **byteorder, + size_t *dimfast, size_t *dimmid, size_t *dimslow, + size_t *padding); CBFLib documentation: DESCRIPTION - cbf_find_nextrow makes the makes the next row in the current column - with value value the current row. The search starts from the row - following the last row found with cbf_find_row or cbf_find_nextrow, - or from the current row if the current row was defined using any - other function. - The comparison is case-sensitive. - If no more matching rows exist, the function returns CBF_NOTFOUND. - The current column is not affected. + cbf_get_integerarrayparameters sets *compression, *binary_id, + *elsize, *elsigned, *elunsigned, *elements, *minelement and + *maxelement to values read from the binary value of the item at the + current column and row. This provides all the arguments needed for a + subsequent call to cbf_set_integerarray, if a copy of the array is to + be made into another CIF or CBF. cbf_get_realarrayparameters sets + *compression, *binary_id, *elsize, *elements to values read from the + binary value of the item at the current column and row. This provides + all the arguments needed for a subsequent call to cbf_set_realarray, + if a copy of the arry is to be made into another CIF or CBF. + The variants cbf_get_integerarrayparameters_wdims, + cbf_get_integerarrayparameters_wdims_fs, + cbf_get_integerarrayparameters_wdims_sf, + cbf_get_realarrayparameters_wdims, + cbf_get_realarrayparameters_wdims_fs, + cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, + *dimmid, *dimslow, and *padding as well, providing the additional + parameters needed for a subsequent call to cbf_set_integerarray_wdims + or cbf_set_realarray_wdims. + The value returned in *byteorder is a pointer either to the string + "little_endian " or to the string "big_endian ". This should be + the byte order of the data, not necessarily of the host machine. No + attempt should be made to modify this string. At this time only + "little_endian " will be returned. + The values returned in *dimfast, *dimmid and *dimslow are the sizes + of the fastest changing, second fastest changing and third fastest + changing dimensions of the array, if specified, or zero, if not + specified. + The value returned in *padding is the size of the post-data padding, + if any and if specified in the data header. The value is given as a + count of octets. + If the value is not binary, the function returns CBF_ASCII. ARGUMENTS - handle CBF handle. value the value to search for. + handle CBF handle. compression Compression method used. + elsize Size in bytes of each array element. binary_id + Pointer to the destination integer binary identifier. elsigned + Pointer to an integer. Set to 1 if the elements can be read as signed + integers. elunsigned Pointer to an integer. Set to 1 if the + elements can be read as unsigned integers. elements Pointer to + the destination number of elements. minelement Pointer to the + destination smallest element. maxelement Pointer to the + destination largest element. byteorder Pointer to the destination + byte order. dimfast Pointer to the destination fastest + dimension. dimmid Pointer to the destination second fastest + dimension. dimslow Pointer to the destination third fastest + dimension. padding Pointer to the destination padding size. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_find_nextrow(self, arg) - + return _pycbf.cbf_handle_struct_get_integerarrayparameters_wdims(self) - def get_axis_equipment_component(self, axis_id): - """ + def get_integerarrayparameters_wdims_fs(self): + r""" - Returns : String - *args : String axis_id + Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, + int elements,int minelement,int maxelement,char **bo,int *bolen, + int dimfast,int dimmid,int dimslow,int padding + *args : - C prototype: int cbf_get_axis_equipment_component (cbf_handle handle, - const char *axis_id, const char * *equipment_component); + C prototype: int cbf_get_integerarrayparameters_wdims_fs (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + int *elsigned, int *elunsigned, size_t *elements, + int *minelement, int *maxelement, const char **byteorder, + size_t *dimfast, size_t *dimmid, size_t *dimslow, + size_t *padding); CBFLib documentation: DESCRIPTION - cbf_count_axis_ancestors sets ancestors to the number of ancestors of - axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor - axis of index ancestor_index of axis axis_id, starting with axis_id - for ancestor_index 0. - cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of - axis_id or to ". " if there is no such ancestor. - cbf_get_axis_equipment sets *equipment to the equipment of axis_id or - to ". " if there is no such equipment. - cbf_get_axis_equipment_component sets *equipment_component to the - equipment_component of axis_id or to ". " if there is no such - equipment_component. - cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the - components of the ofset of axis_id. - cbf_get_axis_rotation sets rotation to the rotation of axis_id or to - 0 if there is no such rotation. cbf_get_axis_rotation_axis sets - *rotation_axis to the rotation_axis of axis_id or to ". " if there - is no such rotation_axis. - cbf_get_axis_setting sets *start and *increment to the corresponding - values of the axis axis_id. Any of the destination pointers may be - NULL. - cbf_get_axis_type sets axis_type to the type of axis_id. - cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the - components of the vector of axis_id. - The parameter reserved is presently unused and should be set to 0. + cbf_get_integerarrayparameters sets *compression, *binary_id, + *elsize, *elsigned, *elunsigned, *elements, *minelement and + *maxelement to values read from the binary value of the item at the + current column and row. This provides all the arguments needed for a + subsequent call to cbf_set_integerarray, if a copy of the array is to + be made into another CIF or CBF. cbf_get_realarrayparameters sets + *compression, *binary_id, *elsize, *elements to values read from the + binary value of the item at the current column and row. This provides + all the arguments needed for a subsequent call to cbf_set_realarray, + if a copy of the arry is to be made into another CIF or CBF. + The variants cbf_get_integerarrayparameters_wdims, + cbf_get_integerarrayparameters_wdims_fs, + cbf_get_integerarrayparameters_wdims_sf, + cbf_get_realarrayparameters_wdims, + cbf_get_realarrayparameters_wdims_fs, + cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, + *dimmid, *dimslow, and *padding as well, providing the additional + parameters needed for a subsequent call to cbf_set_integerarray_wdims + or cbf_set_realarray_wdims. + The value returned in *byteorder is a pointer either to the string + "little_endian " or to the string "big_endian ". This should be + the byte order of the data, not necessarily of the host machine. No + attempt should be made to modify this string. At this time only + "little_endian " will be returned. + The values returned in *dimfast, *dimmid and *dimslow are the sizes + of the fastest changing, second fastest changing and third fastest + changing dimensions of the array, if specified, or zero, if not + specified. + The value returned in *padding is the size of the post-data padding, + if any and if specified in the data header. The value is given as a + count of octets. + If the value is not binary, the function returns CBF_ASCII. ARGUMENTS - handle CBF handle. reserved Unused. Any - value other than 0 is invalid. axis_id Axis id. - ancestor_index Integer index of the desired ancestor, starting - with 0 for the current axis_id. ancestor Pointer to - destination ancestor name pointer. depends_on Pointer to - destination depends_on name pointer. equipment Pointer to - destination equipment name pointer. equipment_component Pointer to - destination equipment_component name pointer. offset1 - Pointer to destination first offset component value. offset2 - Pointer to destination second offset component value. offset3 - Pointer to destination third offset component value. - rotation Pointer to destination rotation value. - rotation_axis Pointer to destination rotation_axisn name - pointer. start Pointer to the destination start - value. increment Pointer to the destination increment - value. type Pointer to destination axis type of type - . vector1 Pointer to destination first vector component - value. vector2 Pointer to destination second vector - component value. vector3 Pointer to destination third - vector component value. + handle CBF handle. compression Compression method used. + elsize Size in bytes of each array element. binary_id + Pointer to the destination integer binary identifier. elsigned + Pointer to an integer. Set to 1 if the elements can be read as signed + integers. elunsigned Pointer to an integer. Set to 1 if the + elements can be read as unsigned integers. elements Pointer to + the destination number of elements. minelement Pointer to the + destination smallest element. maxelement Pointer to the + destination largest element. byteorder Pointer to the destination + byte order. dimfast Pointer to the destination fastest + dimension. dimmid Pointer to the destination second fastest + dimension. dimslow Pointer to the destination third fastest + dimension. padding Pointer to the destination padding size. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_get_axis_equipment_component(self, axis_id) - + return _pycbf.cbf_handle_struct_get_integerarrayparameters_wdims_fs(self) - def get_realarrayparameters_wdims_sf(self): - """ + def get_integerarrayparameters_wdims_sf(self): + r""" - Returns : int compression,int binary_id,int elsize,int elements,char **bo, - int *bolen,int dimslow,int dimmid,int dimfast,int padding + Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, + int elements,int minelement,int maxelement,char **bo,int *bolen, + int dimslow,int dimmid,int dimfast,int padding *args : - C prototype: int cbf_get_realarrayparameters_wdims_sf (cbf_handle handle, - unsigned int *compression, int *binary_id, size_t *elsize, - size_t *elements, const char **byteorder, size_t *dimslow, - size_t *dimmid, size_t *dimfast, size_t *padding); + C prototype: int cbf_get_integerarrayparameters_wdims_sf (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + int *elsigned, int *elunsigned, size_t *elements, + int *minelement, int *maxelement, const char **byteorder, + size_t *dimslow, size_t *dimmid, size_t *dimfast, + size_t *padding); CBFLib documentation: DESCRIPTION @@ -4216,171 +3893,151 @@ def get_realarrayparameters_wdims_sf(self): SEE ALSO """ - return _pycbf.cbf_handle_struct_get_realarrayparameters_wdims_sf(self) - + return _pycbf.cbf_handle_struct_get_integerarrayparameters_wdims_sf(self) - def reset_datablock(self): - """ + def get_realarrayparameters(self): + r""" - Returns : + Returns : int compression,int binary_id,int elsize,int elements *args : - C prototype: int cbf_reset_datablock (cbf_handle handle); + C prototype: int cbf_get_realarrayparameters (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + size_t *elements); CBFLib documentation: DESCRIPTION - cbf_reset_datablock deletes all categories from the current data - block. cbf_reset_saveframe deletes all categories from the current - save frame. + cbf_get_integerarrayparameters sets *compression, *binary_id, + *elsize, *elsigned, *elunsigned, *elements, *minelement and + *maxelement to values read from the binary value of the item at the + current column and row. This provides all the arguments needed for a + subsequent call to cbf_set_integerarray, if a copy of the array is to + be made into another CIF or CBF. cbf_get_realarrayparameters sets + *compression, *binary_id, *elsize, *elements to values read from the + binary value of the item at the current column and row. This provides + all the arguments needed for a subsequent call to cbf_set_realarray, + if a copy of the arry is to be made into another CIF or CBF. + The variants cbf_get_integerarrayparameters_wdims, + cbf_get_integerarrayparameters_wdims_fs, + cbf_get_integerarrayparameters_wdims_sf, + cbf_get_realarrayparameters_wdims, + cbf_get_realarrayparameters_wdims_fs, + cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, + *dimmid, *dimslow, and *padding as well, providing the additional + parameters needed for a subsequent call to cbf_set_integerarray_wdims + or cbf_set_realarray_wdims. + The value returned in *byteorder is a pointer either to the string + "little_endian " or to the string "big_endian ". This should be + the byte order of the data, not necessarily of the host machine. No + attempt should be made to modify this string. At this time only + "little_endian " will be returned. + The values returned in *dimfast, *dimmid and *dimslow are the sizes + of the fastest changing, second fastest changing and third fastest + changing dimensions of the array, if specified, or zero, if not + specified. + The value returned in *padding is the size of the post-data padding, + if any and if specified in the data header. The value is given as a + count of octets. + If the value is not binary, the function returns CBF_ASCII. ARGUMENTS - handle CBF handle. + handle CBF handle. compression Compression method used. + elsize Size in bytes of each array element. binary_id + Pointer to the destination integer binary identifier. elsigned + Pointer to an integer. Set to 1 if the elements can be read as signed + integers. elunsigned Pointer to an integer. Set to 1 if the + elements can be read as unsigned integers. elements Pointer to + the destination number of elements. minelement Pointer to the + destination smallest element. maxelement Pointer to the + destination largest element. byteorder Pointer to the destination + byte order. dimfast Pointer to the destination fastest + dimension. dimmid Pointer to the destination second fastest + dimension. dimslow Pointer to the destination third fastest + dimension. padding Pointer to the destination padding size. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_reset_datablock(self) - - - def set_3d_image_fs(self, element_number, compression, data, elsize, elsign, ndimfast, ndimmid, ndimslow): - """ - - Returns : - *args : int element_number,int compression,(binary) String data,int elsize, - int elsign,int dimfast,int dimmid,int dimslow - - C prototype: int cbf_set_3d_image_fs(cbf_handle handle, unsigned int reserved, - unsigned int element_number, unsigned int compression, - void *array, size_t elsize, int elsign, size_t ndimfast, - size_t ndimmid, size_t ndimslow); - - CBFLib documentation: - DESCRIPTION - cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image - array for element number element_number. The array consists of - ndimfast *ndimslow elements of elsize bytes each, starting at array. - The elements are signed if elsign is non-zero and unsigned otherwise. - cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf - write the image array for element number element_number. The array - consists of ndimfast *ndimslow IEEE double or float elements of - elsize bytes each, starting at array. cbf_set_3d_image, - cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array - for element number element_number. The array consists of ndimfast - *ndimmid *ndimslow elements of elsize bytes each, starting at array. - The elements are signed if elsign is non-0 and unsigned otherwise. - cbf_set_real_3d_image, cbf_set_real_3d_image_fs and - cbf_set_real_3d_image_sf writes the 3D image array for element number - element_number. The array consists of ndimfast *ndimmid *ndimslow - IEEE double or float elements of elsize bytes each, starting at - array. - The _fs calls give the dimensions in a fast-to-slow order. The calls - with no suffix and the calls _sf calls give the dimensions in - slow-to-fast order - If the array is 1-dimensional, ndimslow should be the array size and - ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the - array is 2-dimensional and the 3D calls are used, ndimslow and - ndimmid should be used for the array dimensions and ndimfast should - be set to 1. - The array will be compressed using the compression scheme specifed by - compression. Currently, the available schemes are: - CBF_CANONICAL Canonical-code compression (section 3.3.1) - CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple - "nibble_offset " compression. CBF_NONE No compression. - The values compressed are limited to 64 bits. If any element in the - array is larger than 64 bits, the value compressed is the nearest - 64-bit value. - Currently, the source array must consist of chars, shorts or ints - (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for - cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof - (int), sizeof(double) or sizeof(float), the function returns - CBF_ARGUMENT. - The parameter reserved is presently unused and should be set to 0. - ARGUMENTS - handle CBF handle. reserved Unused. Any value other - than 0 is invalid. element_number The number of the detector - element counting from 0 by order of appearance in the - "diffrn_data_frame " category. compression Compression type. - array Pointer to the image array. elsize Size in - bytes of each image array element. elsigned Set to non-0 if - the image array elements are signed. ndimslow Slowest array - dimension. ndimmid Second slowest array dimension. ndimfast - Fastest array dimension. - RETURN VALUE - Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- - - """ - return _pycbf.cbf_handle_struct_set_3d_image_fs(self, element_number, compression, data, elsize, elsign, ndimfast, ndimmid, ndimslow) - + return _pycbf.cbf_handle_struct_get_realarrayparameters(self) - def set_saveframename(self, arg): - """ + def get_realarrayparameters_wdims(self): + r""" - Returns : string + Returns : int compression,int binary_id,int elsize,int elements,char **bo, + int *bolen,int dimfast,int dimmid,int dimslow,int padding *args : - C prototype: int cbf_set_saveframename (cbf_handle handle, - const char *saveframename); - - CBFLib documentation: - DESCRIPTION - cbf_set_datablockname changes the name of the current data block to - datablockname. cbf_set_saveframename changes the name of the current - save frame to saveframename. - If a data block or save frame with this name already exists - (comparison is case-insensitive), the function returns CBF_IDENTICAL. - ARGUMENTS - handle CBF handle. datablockname The new data block name. - datablockname The new save frame name. - RETURN VALUE - Returns an error code on failure or 0 for success. - SEE ALSO - - """ - return _pycbf.cbf_handle_struct_set_saveframename(self, arg) - - - def require_integervalue(self, thedefault): - """ - - Returns : Int number - *args : Int thedefault - - C prototype: int cbf_require_integervalue (cbf_handle handle, int *number, - int defaultvalue); + C prototype: int cbf_get_realarrayparameters_wdims (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + size_t *elements, const char **byteorder, size_t *dimfast, + size_t *dimmid, size_t *dimslow, size_t *padding); CBFLib documentation: DESCRIPTION - cbf_get_integervalue sets *number to the value of the ASCII item at - the current column and row interpreted as a decimal integer. - cbf_require_integervalue sets *number to the value of the ASCII item - at the current column and row interpreted as a decimal integer, - setting it to defaultvalue if necessary. - If the value is not ASCII, the function returns CBF_BINARY. + cbf_get_integerarrayparameters sets *compression, *binary_id, + *elsize, *elsigned, *elunsigned, *elements, *minelement and + *maxelement to values read from the binary value of the item at the + current column and row. This provides all the arguments needed for a + subsequent call to cbf_set_integerarray, if a copy of the array is to + be made into another CIF or CBF. cbf_get_realarrayparameters sets + *compression, *binary_id, *elsize, *elements to values read from the + binary value of the item at the current column and row. This provides + all the arguments needed for a subsequent call to cbf_set_realarray, + if a copy of the arry is to be made into another CIF or CBF. + The variants cbf_get_integerarrayparameters_wdims, + cbf_get_integerarrayparameters_wdims_fs, + cbf_get_integerarrayparameters_wdims_sf, + cbf_get_realarrayparameters_wdims, + cbf_get_realarrayparameters_wdims_fs, + cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, + *dimmid, *dimslow, and *padding as well, providing the additional + parameters needed for a subsequent call to cbf_set_integerarray_wdims + or cbf_set_realarray_wdims. + The value returned in *byteorder is a pointer either to the string + "little_endian " or to the string "big_endian ". This should be + the byte order of the data, not necessarily of the host machine. No + attempt should be made to modify this string. At this time only + "little_endian " will be returned. + The values returned in *dimfast, *dimmid and *dimslow are the sizes + of the fastest changing, second fastest changing and third fastest + changing dimensions of the array, if specified, or zero, if not + specified. + The value returned in *padding is the size of the post-data padding, + if any and if specified in the data header. The value is given as a + count of octets. + If the value is not binary, the function returns CBF_ASCII. ARGUMENTS - handle CBF handle. number pointer to the number. - defaultvalue default number value. + handle CBF handle. compression Compression method used. + elsize Size in bytes of each array element. binary_id + Pointer to the destination integer binary identifier. elsigned + Pointer to an integer. Set to 1 if the elements can be read as signed + integers. elunsigned Pointer to an integer. Set to 1 if the + elements can be read as unsigned integers. elements Pointer to + the destination number of elements. minelement Pointer to the + destination smallest element. maxelement Pointer to the + destination largest element. byteorder Pointer to the destination + byte order. dimfast Pointer to the destination fastest + dimension. dimmid Pointer to the destination second fastest + dimension. dimslow Pointer to the destination third fastest + dimension. padding Pointer to the destination padding size. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_require_integervalue(self, thedefault) - + return _pycbf.cbf_handle_struct_get_realarrayparameters_wdims(self) - def get_integerarrayparameters(self): - """ + def get_realarrayparameters_wdims_fs(self): + r""" - Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, - int elements,int minelement,int maxelement + Returns : int compression,int binary_id,int elsize,int elements,char **bo, + int *bolen,int dimfast,int dimmid,int dimslow,int padding *args : - C prototype: int cbf_get_integerarrayparameters (cbf_handle handle, + C prototype: int cbf_get_realarrayparameters_wdims_fs (cbf_handle handle, unsigned int *compression, int *binary_id, size_t *elsize, - int *elsigned, int *elunsigned, size_t *elements, - int *minelement, int *maxelement); + size_t *elements, const char **byteorder, size_t *dimfast, + size_t *dimmid, size_t *dimslow, size_t *padding); CBFLib documentation: DESCRIPTION @@ -4435,1960 +4092,1903 @@ def get_integerarrayparameters(self): SEE ALSO """ - return _pycbf.cbf_handle_struct_get_integerarrayparameters(self) - - - def set_real_3d_image_sf(self, element_number, compression, data, elsize, ndimslow, ndimmid, ndimfast): - """ - - Returns : - *args : int element_number,int compression,(binary) String data,int elsize, - int dimslow,int dimmid,int dimfast - - C prototype: int cbf_set_real_3d_image_sf(cbf_handle handle, - unsigned int reserved, unsigned int element_number, - unsigned int compression, void *array,size_t elsize, - size_t ndimslow, size_t ndimmid, size_t ndimfast); - - CBFLib documentation: - DESCRIPTION - cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image - array for element number element_number. The array consists of - ndimfast *ndimslow elements of elsize bytes each, starting at array. - The elements are signed if elsign is non-zero and unsigned otherwise. - cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf - write the image array for element number element_number. The array - consists of ndimfast *ndimslow IEEE double or float elements of - elsize bytes each, starting at array. cbf_set_3d_image, - cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array - for element number element_number. The array consists of ndimfast - *ndimmid *ndimslow elements of elsize bytes each, starting at array. - The elements are signed if elsign is non-0 and unsigned otherwise. - cbf_set_real_3d_image, cbf_set_real_3d_image_fs and - cbf_set_real_3d_image_sf writes the 3D image array for element number - element_number. The array consists of ndimfast *ndimmid *ndimslow - IEEE double or float elements of elsize bytes each, starting at - array. - The _fs calls give the dimensions in a fast-to-slow order. The calls - with no suffix and the calls _sf calls give the dimensions in - slow-to-fast order - If the array is 1-dimensional, ndimslow should be the array size and - ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the - array is 2-dimensional and the 3D calls are used, ndimslow and - ndimmid should be used for the array dimensions and ndimfast should - be set to 1. - The array will be compressed using the compression scheme specifed by - compression. Currently, the available schemes are: - CBF_CANONICAL Canonical-code compression (section 3.3.1) - CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple - "nibble_offset " compression. CBF_NONE No compression. - The values compressed are limited to 64 bits. If any element in the - array is larger than 64 bits, the value compressed is the nearest - 64-bit value. - Currently, the source array must consist of chars, shorts or ints - (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for - cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof - (int), sizeof(double) or sizeof(float), the function returns - CBF_ARGUMENT. - The parameter reserved is presently unused and should be set to 0. - ARGUMENTS - handle CBF handle. reserved Unused. Any value other - than 0 is invalid. element_number The number of the detector - element counting from 0 by order of appearance in the - "diffrn_data_frame " category. compression Compression type. - array Pointer to the image array. elsize Size in - bytes of each image array element. elsigned Set to non-0 if - the image array elements are signed. ndimslow Slowest array - dimension. ndimmid Second slowest array dimension. ndimfast - Fastest array dimension. - RETURN VALUE - Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- - - """ - return _pycbf.cbf_handle_struct_set_real_3d_image_sf(self, element_number, compression, data, elsize, ndimslow, ndimmid, ndimfast) - - - def write_file(self, filename, ciforcbf, headers, encoding): - """ - - Returns : - *args : String filename,Integer ciforcbf,Integer Headers,Integer encoding - - C prototype: int cbf_write_file (cbf_handle handle, FILE *file, int readable, - int ciforcbf, int flags, int encoding); - - CBFLib documentation: - DESCRIPTION - cbf_write_file writes the CBF object specified by handle into the - file file, following CIF 1.0 conventions of 80 character lines. - cbf_write_widefile writes the CBF object specified by handle into the - file file, following CIF 1.1 conventions of 2048 character lines. A - warning is issued to stderr for ascii lines over the limit, and an - attempt is made to fold lines to fit. No test is performed on binary - sections. - If a dictionary has been provided, aliases will be applied on output. - Unlike cbf_read_file, the file does not have to be random-access. - If the file is random-access and readable, readable can be set to - non-0 to indicate to CBFlib that the file can be used as a buffer to - conserve disk space. If the file is not random-access or not - readable, readable must be 0. - - """ - return _pycbf.cbf_handle_struct_write_file(self, filename, ciforcbf, headers, encoding) - + return _pycbf.cbf_handle_struct_get_realarrayparameters_wdims_fs(self) - def set_divergence(self, div_x_source, div_y_source, div_x_y_source): - """ + def get_realarrayparameters_wdims_sf(self): + r""" - Returns : - *args : Float div_x_source,Float div_y_source,Float div_x_y_source + Returns : int compression,int binary_id,int elsize,int elements,char **bo, + int *bolen,int dimslow,int dimmid,int dimfast,int padding + *args : - C prototype: int cbf_set_divergence (cbf_handle handle, double div_x_source, - double div_y_source, double div_x_y_source); + C prototype: int cbf_get_realarrayparameters_wdims_sf (cbf_handle handle, + unsigned int *compression, int *binary_id, size_t *elsize, + size_t *elements, const char **byteorder, size_t *dimslow, + size_t *dimmid, size_t *dimfast, size_t *padding); CBFLib documentation: DESCRIPTION - cbf_set_divergence sets the source divergence parameters to the - values specified by div_x_source, div_y_source and div_x_y_source. + cbf_get_integerarrayparameters sets *compression, *binary_id, + *elsize, *elsigned, *elunsigned, *elements, *minelement and + *maxelement to values read from the binary value of the item at the + current column and row. This provides all the arguments needed for a + subsequent call to cbf_set_integerarray, if a copy of the array is to + be made into another CIF or CBF. cbf_get_realarrayparameters sets + *compression, *binary_id, *elsize, *elements to values read from the + binary value of the item at the current column and row. This provides + all the arguments needed for a subsequent call to cbf_set_realarray, + if a copy of the arry is to be made into another CIF or CBF. + The variants cbf_get_integerarrayparameters_wdims, + cbf_get_integerarrayparameters_wdims_fs, + cbf_get_integerarrayparameters_wdims_sf, + cbf_get_realarrayparameters_wdims, + cbf_get_realarrayparameters_wdims_fs, + cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, + *dimmid, *dimslow, and *padding as well, providing the additional + parameters needed for a subsequent call to cbf_set_integerarray_wdims + or cbf_set_realarray_wdims. + The value returned in *byteorder is a pointer either to the string + "little_endian " or to the string "big_endian ". This should be + the byte order of the data, not necessarily of the host machine. No + attempt should be made to modify this string. At this time only + "little_endian " will be returned. + The values returned in *dimfast, *dimmid and *dimslow are the sizes + of the fastest changing, second fastest changing and third fastest + changing dimensions of the array, if specified, or zero, if not + specified. + The value returned in *padding is the size of the post-data padding, + if any and if specified in the data header. The value is given as a + count of octets. + If the value is not binary, the function returns CBF_ASCII. ARGUMENTS - handle CBF handle. div_x_source New value of - div_x_source. div_y_source New value of div_y_source. - div_x_y_source New value of div_x_y_source. + handle CBF handle. compression Compression method used. + elsize Size in bytes of each array element. binary_id + Pointer to the destination integer binary identifier. elsigned + Pointer to an integer. Set to 1 if the elements can be read as signed + integers. elunsigned Pointer to an integer. Set to 1 if the + elements can be read as unsigned integers. elements Pointer to + the destination number of elements. minelement Pointer to the + destination smallest element. maxelement Pointer to the + destination largest element. byteorder Pointer to the destination + byte order. dimfast Pointer to the destination fastest + dimension. dimmid Pointer to the destination second fastest + dimension. dimslow Pointer to the destination third fastest + dimension. padding Pointer to the destination padding size. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_set_divergence(self, div_x_source, div_y_source, div_x_y_source) - + return _pycbf.cbf_handle_struct_get_realarrayparameters_wdims_sf(self) - def remove_datablock(self): - """ + def get_integerarray_as_string(self): + r""" - Returns : + Returns : (Binary)String *args : - C prototype: int cbf_remove_datablock (cbf_handle handle); + C prototype: int cbf_get_integerarray (cbf_handle handle, int *binary_id, + void *array, size_t elsize, int elsigned, size_t elements, + size_t *elements_read); CBFLib documentation: DESCRIPTION - cbf_remove_datablock deletes the current data block. - cbf_remove_saveframe deletes the current save frame. - The current data block becomes undefined. + cbf_get_integerarray reads the binary value of the item at the + current column and row into an integer array. The array consists of + elements elements of elsize bytes each, starting at array. The + elements are signed if elsigned is non-0 and unsigned otherwise. + *binary_id is set to the binary section identifier and *elements_read + to the number of elements actually read. cbf_get_realarray reads the + binary value of the item at the current column and row into a real + array. The array consists of elements elements of elsize bytes each, + starting at array. *binary_id is set to the binary section identifier + and *elements_read to the number of elements actually read. + If any element in the integer binary data cant fit into the + destination element, the destination is set the nearest possible + value. + If the value is not binary, the function returns CBF_ASCII. + If the requested number of elements cant be read, the function will + read as many as it can and then return CBF_ENDOFDATA. + Currently, the destination array must consist of chars, shorts or + ints (signed or unsigned). If elsize is not equal to sizeof (char), + sizeof (short) or sizeof (int), for cbf_get_integerarray, or + sizeof(double) or sizeof(float), for cbf_get_realarray the function + returns CBF_ARGUMENT. + An additional restriction in the current version of CBFlib is that + values too large to fit in an int are not correctly decompressed. As + an example, if the machine with 32-bit ints is reading an array + containing a value outside the range 0 .. 2^32-1 (unsigned) or -2^31 + .. 2^31-1 (signed), the array will not be correctly decompressed. + This restriction will be removed in a future release. For + cbf_get_realarray, only IEEE format is supported. No conversion to + other floating point formats is done at this time. ARGUMENTS - handle CBF handle. + handle CBF handle. binary_id Pointer to the + destination integer binary identifier. array Pointer to the + destination array. elsize Size in bytes of each destination + array element. elsigned Set to non-0 if the destination array + elements are signed. elements The number of elements to read. + elements_read Pointer to the destination number of elements + actually read. RETURN VALUE - Returns an error code on failure or 0 for success. - SEE ALSO - - """ - return _pycbf.cbf_handle_struct_remove_datablock(self) - + Returns an error code on failure or 0 for success. SEE ALSO - def count_elements(self): """ + return _pycbf.cbf_handle_struct_get_integerarray_as_string(self) - Returns : Integer + def get_realarray_as_string(self): + r""" + + Returns : (Binary)String *args : - C prototype: int cbf_count_elements (cbf_handle handle, - unsigned int *elements); + C prototype: int cbf_get_realarray (cbf_handle handle, int *binary_id, + void *array, size_t elsize, size_t elements, + size_t *elements_read); CBFLib documentation: DESCRIPTION - cbf_count_elements sets *elements to the number of detector elements. + cbf_get_integerarray reads the binary value of the item at the + current column and row into an integer array. The array consists of + elements elements of elsize bytes each, starting at array. The + elements are signed if elsigned is non-0 and unsigned otherwise. + *binary_id is set to the binary section identifier and *elements_read + to the number of elements actually read. cbf_get_realarray reads the + binary value of the item at the current column and row into a real + array. The array consists of elements elements of elsize bytes each, + starting at array. *binary_id is set to the binary section identifier + and *elements_read to the number of elements actually read. + If any element in the integer binary data cant fit into the + destination element, the destination is set the nearest possible + value. + If the value is not binary, the function returns CBF_ASCII. + If the requested number of elements cant be read, the function will + read as many as it can and then return CBF_ENDOFDATA. + Currently, the destination array must consist of chars, shorts or + ints (signed or unsigned). If elsize is not equal to sizeof (char), + sizeof (short) or sizeof (int), for cbf_get_integerarray, or + sizeof(double) or sizeof(float), for cbf_get_realarray the function + returns CBF_ARGUMENT. + An additional restriction in the current version of CBFlib is that + values too large to fit in an int are not correctly decompressed. As + an example, if the machine with 32-bit ints is reading an array + containing a value outside the range 0 .. 2^32-1 (unsigned) or -2^31 + .. 2^31-1 (signed), the array will not be correctly decompressed. + This restriction will be removed in a future release. For + cbf_get_realarray, only IEEE format is supported. No conversion to + other floating point formats is done at this time. ARGUMENTS - handle CBF handle. elements Pointer to the destination count. + handle CBF handle. binary_id Pointer to the + destination integer binary identifier. array Pointer to the + destination array. elsize Size in bytes of each destination + array element. elsigned Set to non-0 if the destination array + elements are signed. elements The number of elements to read. + elements_read Pointer to the destination number of elements + actually read. RETURN VALUE - Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_count_elements(self) - + return _pycbf.cbf_handle_struct_get_realarray_as_string(self) - def set_image_fs(self, element_number, compression, data, elsize, elsign, ndimfast, ndimslow): - """ + def set_integerarray(self, compression, binary_id, data, elsize, elsigned, elements): + r""" Returns : - *args : int element_number,int compression,(binary) String data,int elsize, - int elsign,int dimfast,int dimslow + *args : int compression,int binary_id,(binary) String data,int elsize, + int elsigned,int elements - C prototype: int cbf_set_image_fs(cbf_handle handle, unsigned int reserved, - unsigned int element_number, unsigned int compression, - void *array, size_t elsize, int elsign, size_t ndimfast, - size_t ndimslow); + C prototype: int cbf_set_integerarray (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, int elsigned, size_t elements); CBFLib documentation: DESCRIPTION - cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image - array for element number element_number. The array consists of - ndimfast *ndimslow elements of elsize bytes each, starting at array. - The elements are signed if elsign is non-zero and unsigned otherwise. - cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf - write the image array for element number element_number. The array - consists of ndimfast *ndimslow IEEE double or float elements of - elsize bytes each, starting at array. cbf_set_3d_image, - cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array - for element number element_number. The array consists of ndimfast - *ndimmid *ndimslow elements of elsize bytes each, starting at array. - The elements are signed if elsign is non-0 and unsigned otherwise. - cbf_set_real_3d_image, cbf_set_real_3d_image_fs and - cbf_set_real_3d_image_sf writes the 3D image array for element number - element_number. The array consists of ndimfast *ndimmid *ndimslow - IEEE double or float elements of elsize bytes each, starting at - array. - The _fs calls give the dimensions in a fast-to-slow order. The calls - with no suffix and the calls _sf calls give the dimensions in - slow-to-fast order - If the array is 1-dimensional, ndimslow should be the array size and - ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the - array is 2-dimensional and the 3D calls are used, ndimslow and - ndimmid should be used for the array dimensions and ndimfast should - be set to 1. + cbf_set_integerarray sets the binary value of the item at the current + column and row to an integer array. The array consists of elements + elements of elsize bytes each, starting at array. The elements are + signed if elsigned is non-0 and unsigned otherwise. binary_id is the + binary section identifier. cbf_set_realarray sets the binary value of + the item at the current column and row to an integer array. The array + consists of elements elements of elsize bytes each, starting at + array. binary_id is the binary section identifier. + The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, + cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, + cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants + allow the data header values of byteorder, dimfast, dimmid, dimslow + and padding to be set to the data byte order, the fastest, second + fastest and third fastest array dimensions and the size in byte of + the post data padding to be used. The array will be compressed using the compression scheme specifed by compression. Currently, the available schemes are: - CBF_CANONICAL Canonical-code compression (section 3.3.1) - CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple - "nibble_offset " compression. CBF_NONE No compression. + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + NOTE: This scheme is by far the slowest of the four and uses much + more disk space. It is intended for routine use with small arrays + only. With large arrays (like images) it should be used only for + debugging. The values compressed are limited to 64 bits. If any element in the array is larger than 64 bits, the value compressed is the nearest 64-bit value. Currently, the source array must consist of chars, shorts or ints - (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for - cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof - (int), sizeof(double) or sizeof(float), the function returns + (signed or unsigned), for cbf_set_integerarray, or IEEE doubles or + floats for cbf_set_realarray. If elsize is not equal to sizeof + (char), sizeof (short) or sizeof (int), the function returns CBF_ARGUMENT. - The parameter reserved is presently unused and should be set to 0. ARGUMENTS - handle CBF handle. reserved Unused. Any value other - than 0 is invalid. element_number The number of the detector - element counting from 0 by order of appearance in the - "diffrn_data_frame " category. compression Compression type. - array Pointer to the image array. elsize Size in - bytes of each image array element. elsigned Set to non-0 if - the image array elements are signed. ndimslow Slowest array - dimension. ndimmid Second slowest array dimension. ndimfast - Fastest array dimension. + handle CBF handle. compression Compression method to use. + binary_id Integer binary identifier. array Pointer to the + source array. elsize Size in bytes of each source array + element. elsigned Set to non-0 if the source array elements are + signed. elements: The number of elements in the array. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_set_image_fs(self, element_number, compression, data, elsize, elsign, ndimfast, ndimslow) - + return _pycbf.cbf_handle_struct_set_integerarray(self, compression, binary_id, data, elsize, elsigned, elements) - def require_reference_detector(self, element_number): - """ + def set_integerarray_wdims(self, compression, binary_id, data, elsize, elsigned, elements, bo, dimfast, dimmid, dimslow, padding): + r""" - Returns : pycbf detector object - *args : Integer element_number + Returns : + *args : int compression,int binary_id,(binary) String data,int elsize, + int elsigned,int elements,String byteorder,int dimfast,int dimmid, + int dimslow,int padding - C prototype: int cbf_require_reference_detector (cbf_handle handle, - cbf_detector *detector, unsigned int element_number); + C prototype: int cbf_set_integerarray_wdims (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, int elsigned, size_t elements, + const char *byteorder, size_t dimfast, size_t dimmid, + size_t dimslow, size_t padding); CBFLib documentation: DESCRIPTION - cbf_construct_detector constructs a detector object for detector - element number element_number using the description in the CBF object - handle and initialises the detector handle *detector. - cbf_construct_reference_detector constructs a detector object for - detector element number element_number using the description in the - CBF object handle and initialises the detector handle *detector using - the reference settings of the axes. cbf_require_reference_detector is - similar, but try to force the creations of missing intermediate - categories needed to construct a detector object. + cbf_set_integerarray sets the binary value of the item at the current + column and row to an integer array. The array consists of elements + elements of elsize bytes each, starting at array. The elements are + signed if elsigned is non-0 and unsigned otherwise. binary_id is the + binary section identifier. cbf_set_realarray sets the binary value of + the item at the current column and row to an integer array. The array + consists of elements elements of elsize bytes each, starting at + array. binary_id is the binary section identifier. + The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, + cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, + cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants + allow the data header values of byteorder, dimfast, dimmid, dimslow + and padding to be set to the data byte order, the fastest, second + fastest and third fastest array dimensions and the size in byte of + the post data padding to be used. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + NOTE: This scheme is by far the slowest of the four and uses much + more disk space. It is intended for routine use with small arrays + only. With large arrays (like images) it should be used only for + debugging. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned), for cbf_set_integerarray, or IEEE doubles or + floats for cbf_set_realarray. If elsize is not equal to sizeof + (char), sizeof (short) or sizeof (int), the function returns + CBF_ARGUMENT. ARGUMENTS - handle CBF handle. detector Pointer to the - destination detector handle. element_number The number of the - detector element counting from 0 by order of appearance in the - "diffrn_data_frame " category. + handle CBF handle. compression Compression method to use. + binary_id Integer binary identifier. array Pointer to the + source array. elsize Size in bytes of each source array + element. elsigned Set to non-0 if the source array elements are + signed. elements: The number of elements in the array. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_require_reference_detector(self, element_number) - + return _pycbf.cbf_handle_struct_set_integerarray_wdims(self, compression, binary_id, data, elsize, elsigned, elements, bo, dimfast, dimmid, dimslow, padding) - def next_category(self): - """ + def set_integerarray_wdims_fs(self, compression, binary_id, data, elsize, elsigned, elements, bo, dimfast, dimmid, dimslow, padding): + r""" Returns : - *args : + *args : int compression,int binary_id,(binary) String data,int elsize, + int elsigned,int elements,String byteorder,int dimfast,int dimmid, + int dimslow,int padding - C prototype: int cbf_next_category (cbf_handle handle); + C prototype: int cbf_set_integerarray_wdims_fs (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, int elsigned, size_t elements, + const char *byteorder, size_t dimfast, size_t dimmid, + size_t dimslow, size_t padding); CBFLib documentation: DESCRIPTION - cbf_next_category makes the category following the current category - in the current data block the current category. - If there are no more categories, the function returns CBF_NOTFOUND. - The current column and row become undefined. + cbf_set_integerarray sets the binary value of the item at the current + column and row to an integer array. The array consists of elements + elements of elsize bytes each, starting at array. The elements are + signed if elsigned is non-0 and unsigned otherwise. binary_id is the + binary section identifier. cbf_set_realarray sets the binary value of + the item at the current column and row to an integer array. The array + consists of elements elements of elsize bytes each, starting at + array. binary_id is the binary section identifier. + The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, + cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, + cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants + allow the data header values of byteorder, dimfast, dimmid, dimslow + and padding to be set to the data byte order, the fastest, second + fastest and third fastest array dimensions and the size in byte of + the post data padding to be used. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + NOTE: This scheme is by far the slowest of the four and uses much + more disk space. It is intended for routine use with small arrays + only. With large arrays (like images) it should be used only for + debugging. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned), for cbf_set_integerarray, or IEEE doubles or + floats for cbf_set_realarray. If elsize is not equal to sizeof + (char), sizeof (short) or sizeof (int), the function returns + CBF_ARGUMENT. ARGUMENTS - handle CBF handle. + handle CBF handle. compression Compression method to use. + binary_id Integer binary identifier. array Pointer to the + source array. elsize Size in bytes of each source array + element. elsigned Set to non-0 if the source array elements are + signed. elements: The number of elements in the array. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_next_category(self) - + return _pycbf.cbf_handle_struct_set_integerarray_wdims_fs(self, compression, binary_id, data, elsize, elsigned, elements, bo, dimfast, dimmid, dimslow, padding) - def set_diffrn_id(self, arg): - """ + def set_integerarray_wdims_sf(self, compression, binary_id, data, elsize, elsigned, elements, bo, dimslow, dimmid, dimfast, padding): + r""" - Returns : string - *args : + Returns : + *args : int compression,int binary_id,(binary) String data,int elsize, + int elsigned,int elements,String byteorder,int dimslow,int dimmid, + int dimfast,int padding - C prototype: int cbf_set_diffrn_id (cbf_handle handle, const char *diffrn_id); + C prototype: int cbf_set_integerarray_wdims_sf (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, int elsigned, size_t elements, + const char *byteorder, size_t dimslow, size_t dimmid, + size_t dimfast, size_t padding); CBFLib documentation: DESCRIPTION - cbf_set_diffrn_id sets the "diffrn.id " entry of the current - datablock to the ASCII value diffrn_id. - This function also changes corresponding "diffrn_id " entries in - the "diffrn_source ", "diffrn_radiation ", "diffrn_detector - " and "diffrn_measurement " categories. + cbf_set_integerarray sets the binary value of the item at the current + column and row to an integer array. The array consists of elements + elements of elsize bytes each, starting at array. The elements are + signed if elsigned is non-0 and unsigned otherwise. binary_id is the + binary section identifier. cbf_set_realarray sets the binary value of + the item at the current column and row to an integer array. The array + consists of elements elements of elsize bytes each, starting at + array. binary_id is the binary section identifier. + The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, + cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, + cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants + allow the data header values of byteorder, dimfast, dimmid, dimslow + and padding to be set to the data byte order, the fastest, second + fastest and third fastest array dimensions and the size in byte of + the post data padding to be used. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + NOTE: This scheme is by far the slowest of the four and uses much + more disk space. It is intended for routine use with small arrays + only. With large arrays (like images) it should be used only for + debugging. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned), for cbf_set_integerarray, or IEEE doubles or + floats for cbf_set_realarray. If elsize is not equal to sizeof + (char), sizeof (short) or sizeof (int), the function returns + CBF_ARGUMENT. ARGUMENTS - handle CBF handle. diffrn_id ASCII value. + handle CBF handle. compression Compression method to use. + binary_id Integer binary identifier. array Pointer to the + source array. elsize Size in bytes of each source array + element. elsigned Set to non-0 if the source array elements are + signed. elements: The number of elements in the array. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_set_diffrn_id(self, arg) - + return _pycbf.cbf_handle_struct_set_integerarray_wdims_sf(self, compression, binary_id, data, elsize, elsigned, elements, bo, dimslow, dimmid, dimfast, padding) - def set_timestamp(self, time, timezone, precision): - """ + def set_realarray(self, compression, binary_id, data, elsize, elements): + r""" Returns : - *args : Float time,Integer timezone,Float precision - - C prototype: int cbf_set_timestamp (cbf_handle handle, unsigned int reserved, - double time, int timezone, double precision); - - CBFLib documentation: - DESCRIPTION - cbf_set_timestamp sets the collection timestamp in seconds since - January 1 1970 to the value specified by time. The timezone - difference from UTC - - """ - return _pycbf.cbf_handle_struct_set_timestamp(self, time, timezone, precision) - - - def get_orientation_matrix(self): - """ - - Returns : Float matrix_0,Float matrix_1,Float matrix_2,Float matrix_3, - Float matrix_4,Float matrix_5,Float matrix_6,Float matrix_7, - Float matrix_8 - *args : + *args : int compression,int binary_id,(binary) String data,int elsize, + int elements - C prototype: int cbf_get_orientation_matrix (cbf_handle handle, - double ub_matrix[9]); + C prototype: int cbf_set_realarray (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, size_t elements); CBFLib documentation: DESCRIPTION - cbf_get_orientation_matrix sets ub_matrix to point to the array of - orientation matrix entries in the "diffrn " category in the order - of columns: - "UB[1][1] " "UB[1][2] " "UB[1][3] " "UB[2][1] " - "UB[2][2] " "UB[2][3] " "UB[3][1] " "UB[3][2] " - "UB[3][3] " - cbf_set_orientation_matrix sets the values in the "diffrn " - category to the values pointed to by ub_matrix. + cbf_set_integerarray sets the binary value of the item at the current + column and row to an integer array. The array consists of elements + elements of elsize bytes each, starting at array. The elements are + signed if elsigned is non-0 and unsigned otherwise. binary_id is the + binary section identifier. cbf_set_realarray sets the binary value of + the item at the current column and row to an integer array. The array + consists of elements elements of elsize bytes each, starting at + array. binary_id is the binary section identifier. + The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, + cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, + cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants + allow the data header values of byteorder, dimfast, dimmid, dimslow + and padding to be set to the data byte order, the fastest, second + fastest and third fastest array dimensions and the size in byte of + the post data padding to be used. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + NOTE: This scheme is by far the slowest of the four and uses much + more disk space. It is intended for routine use with small arrays + only. With large arrays (like images) it should be used only for + debugging. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned), for cbf_set_integerarray, or IEEE doubles or + floats for cbf_set_realarray. If elsize is not equal to sizeof + (char), sizeof (short) or sizeof (int), the function returns + CBF_ARGUMENT. ARGUMENTS - handle CBF handle. ubmatric Source or destination array of 9 - doubles giving the orientation matrix parameters. + handle CBF handle. compression Compression method to use. + binary_id Integer binary identifier. array Pointer to the + source array. elsize Size in bytes of each source array + element. elsigned Set to non-0 if the source array elements are + signed. elements: The number of elements in the array. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- - - """ - return _pycbf.cbf_handle_struct_get_orientation_matrix(self) - - - def get_image_size_fs(self, element_number): - """ - - Returns : size_t ndimfast,size_t ndimslow - *args : Integer element_number - - C prototype: int cbf_get_image_size_fs (cbf_handle handle, - unsigned int reserved, unsigned int element_number, - size_t *ndimfast, size_t *ndimslow); - - CBFLib documentation: - DESCRIPTION - cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf - set *ndimslow and *ndimfast to the slow and fast dimensions of the - image array for element number element_number. If the array is - 1-dimensional, *ndimslow will be set to the array size and *ndimfast - will be set to 1. If the array is 3-dimensional an error code will be - returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and - cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the - slowest, next fastest and fastest dimensions, respectively, of the 3D - image array for element number element_number. If the array is - 1-dimensional, *ndimslow will be set to the array size and *ndimmid - and + SEE ALSO """ - return _pycbf.cbf_handle_struct_get_image_size_fs(self, element_number) - + return _pycbf.cbf_handle_struct_set_realarray(self, compression, binary_id, data, elsize, elements) - def get_divergence(self): - """ + def set_realarray_wdims(self, compression, binary_id, data, elsize, elements, bo, dimfast, dimmid, dimslow, padding): + r""" - Returns : Float div_x_source,Float div_y_source,Float div_x_y_source - *args : + Returns : + *args : int compression,int binary_id,(binary) String data,int elsize, + int elements,String byteorder,int dimfast,int dimmid,int dimslow, + int padding - C prototype: int cbf_get_divergence (cbf_handle handle, double *div_x_source, - double *div_y_source, double *div_x_y_source); + C prototype: int cbf_set_realarray_wdims (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, size_t elements, const char *byteorder, + size_t dimfast, size_t dimmid, size_t dimslow, + size_t padding); CBFLib documentation: DESCRIPTION - cbf_get_divergence sets *div_x_source, *div_y_source and - *div_x_y_source to the corresponding source divergence parameters. - Any of the destination pointers may be NULL. + cbf_set_integerarray sets the binary value of the item at the current + column and row to an integer array. The array consists of elements + elements of elsize bytes each, starting at array. The elements are + signed if elsigned is non-0 and unsigned otherwise. binary_id is the + binary section identifier. cbf_set_realarray sets the binary value of + the item at the current column and row to an integer array. The array + consists of elements elements of elsize bytes each, starting at + array. binary_id is the binary section identifier. + The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, + cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, + cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants + allow the data header values of byteorder, dimfast, dimmid, dimslow + and padding to be set to the data byte order, the fastest, second + fastest and third fastest array dimensions and the size in byte of + the post data padding to be used. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + NOTE: This scheme is by far the slowest of the four and uses much + more disk space. It is intended for routine use with small arrays + only. With large arrays (like images) it should be used only for + debugging. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned), for cbf_set_integerarray, or IEEE doubles or + floats for cbf_set_realarray. If elsize is not equal to sizeof + (char), sizeof (short) or sizeof (int), the function returns + CBF_ARGUMENT. ARGUMENTS - handle CBF handle. div_x_source Pointer to the - destination div_x_source. div_y_source Pointer to the destination - div_y_source. div_x_y_source Pointer to the destination - div_x_y_source. + handle CBF handle. compression Compression method to use. + binary_id Integer binary identifier. array Pointer to the + source array. elsize Size in bytes of each source array + element. elsigned Set to non-0 if the source array elements are + signed. elements: The number of elements in the array. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_get_divergence(self) - + return _pycbf.cbf_handle_struct_set_realarray_wdims(self, compression, binary_id, data, elsize, elements, bo, dimfast, dimmid, dimslow, padding) - def rewind_category(self): - """ + def set_realarray_wdims_fs(self, compression, binary_id, data, elsize, elements, bo, dimfast, dimmid, dimslow, padding): + r""" Returns : - *args : + *args : int compression,int binary_id,(binary) String data,int elsize, + int elements,String byteorder,int dimfast,int dimmid,int dimslow, + int padding - C prototype: int cbf_rewind_category (cbf_handle handle); + C prototype: int cbf_set_realarray_wdims_fs (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, size_t elements, const char *byteorder, + size_t dimfast, size_t dimmid, size_t dimslow, + size_t padding); CBFLib documentation: DESCRIPTION - cbf_rewind_category makes the first category in the current data - block the current category. cbf_rewind_saveframe makes the first - saveframe in the current data block the current saveframe. - cbf_rewind_blockitem makes the first blockitem (category or - saveframe) in the current data block the current blockitem. The type - of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type. - If there are no categories, saveframes or blockitems the function - returns CBF_NOTFOUND. - The current column and row become undefined. + cbf_set_integerarray sets the binary value of the item at the current + column and row to an integer array. The array consists of elements + elements of elsize bytes each, starting at array. The elements are + signed if elsigned is non-0 and unsigned otherwise. binary_id is the + binary section identifier. cbf_set_realarray sets the binary value of + the item at the current column and row to an integer array. The array + consists of elements elements of elsize bytes each, starting at + array. binary_id is the binary section identifier. + The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, + cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, + cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants + allow the data header values of byteorder, dimfast, dimmid, dimslow + and padding to be set to the data byte order, the fastest, second + fastest and third fastest array dimensions and the size in byte of + the post data padding to be used. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + NOTE: This scheme is by far the slowest of the four and uses much + more disk space. It is intended for routine use with small arrays + only. With large arrays (like images) it should be used only for + debugging. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned), for cbf_set_integerarray, or IEEE doubles or + floats for cbf_set_realarray. If elsize is not equal to sizeof + (char), sizeof (short) or sizeof (int), the function returns + CBF_ARGUMENT. ARGUMENTS - handle CBF handle. type CBF handle. + handle CBF handle. compression Compression method to use. + binary_id Integer binary identifier. array Pointer to the + source array. elsize Size in bytes of each source array + element. elsigned Set to non-0 if the source array elements are + signed. elements: The number of elements in the array. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_rewind_category(self) - + return _pycbf.cbf_handle_struct_set_realarray_wdims_fs(self, compression, binary_id, data, elsize, elements, bo, dimfast, dimmid, dimslow, padding) - def read_template(self, filename): - """ + def set_realarray_wdims_sf(self, compression, binary_id, data, elsize, elements, bo, dimslow, dimmid, dimfast, padding): + r""" Returns : - *args : String filename + *args : int compression,int binary_id,(binary) String data,int elsize, + int elements,String byteorder,int dimslow,int dimmid,int dimfast, + int padding - C prototype: int cbf_read_template (cbf_handle handle, FILE *file); + C prototype: int cbf_set_realarray_wdims_sf (cbf_handle handle, + unsigned int compression, int binary_id, void *array, + size_t elsize, size_t elements, const char *byteorder, + size_t dimslow, size_t dimmid, size_t dimfast, + size_t padding); CBFLib documentation: DESCRIPTION - cbf_read_template reads the CBF or CIF file file into the CBF object - specified by handle and selects the first datablock as the current - datablock. + cbf_set_integerarray sets the binary value of the item at the current + column and row to an integer array. The array consists of elements + elements of elsize bytes each, starting at array. The elements are + signed if elsigned is non-0 and unsigned otherwise. binary_id is the + binary section identifier. cbf_set_realarray sets the binary value of + the item at the current column and row to an integer array. The array + consists of elements elements of elsize bytes each, starting at + array. binary_id is the binary section identifier. + The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, + cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, + cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants + allow the data header values of byteorder, dimfast, dimmid, dimslow + and padding to be set to the data byte order, the fastest, second + fastest and third fastest array dimensions and the size in byte of + the post data padding to be used. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + NOTE: This scheme is by far the slowest of the four and uses much + more disk space. It is intended for routine use with small arrays + only. With large arrays (like images) it should be used only for + debugging. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned), for cbf_set_integerarray, or IEEE doubles or + floats for cbf_set_realarray. If elsize is not equal to sizeof + (char), sizeof (short) or sizeof (int), the function returns + CBF_ARGUMENT. ARGUMENTS - handle Pointer to a CBF handle. file Pointer to a file - descriptor. + handle CBF handle. compression Compression method to use. + binary_id Integer binary identifier. array Pointer to the + source array. elsize Size in bytes of each source array + element. elsigned Set to non-0 if the source array elements are + signed. elements: The number of elements in the array. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_read_template(self, filename) - + return _pycbf.cbf_handle_struct_set_realarray_wdims_sf(self, compression, binary_id, data, elsize, elements, bo, dimslow, dimmid, dimfast, padding) - def select_row(self, arg): - """ + def require_datablock(self, arg): + r""" - Returns : - *args : Integer + Returns : string + *args : - C prototype: int cbf_select_row (cbf_handle handle, unsigned int row); + C prototype: int cbf_require_datablock (cbf_handle handle, + const char *datablockname); CBFLib documentation: DESCRIPTION - cbf_select_row selects row number row in the current category as the - current row. - The first row is number 0. - The current column is not affected - If the row does not exist, the function returns CBF_NOTFOUND. + cbf_require_datablock makes the data block with name datablockname + the current data block, if it exists, or creates it if it does not. + The comparison is case-insensitive. + The current category becomes undefined. ARGUMENTS - handle CBF handle. row Number of the row to select. + handle CBF handle. datablockname The name of the data + block to find or create. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_select_row(self, arg) - + return _pycbf.cbf_handle_struct_require_datablock(self, arg) - def get_image_fs_as_string(self, element_number, elsize, elsign, ndimfast, ndimslow): - """ + def require_category(self, arg): + r""" - Returns : (Binary)String - *args : int element_number,int elsize,int elsign,int ndimfast,int ndimslow + Returns : string + *args : - C prototype: int cbf_get_image_fs (cbf_handle handle, unsigned int reserved, - unsigned int element_number, void *array, size_t elsize, - int elsign, size_t ndimfast, size_t ndimslow); + C prototype: int cbf_require_category (cbf_handle handle, + const char *categoryname); CBFLib documentation: DESCRIPTION - cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image - array for element number element_number into an array. The array - consists of ndimslow *ndimfast elements of elsize bytes each, - starting at array. The elements are signed if elsign is non-0 and - unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and - cbf_get_real_image_sf read the image array of IEEE doubles or floats - for element number element_number into an array. A real array is - always signed. cbf_get_3d_image, cbf_get_3d_image_fs and - cbf_get_3d_image_sf read the 3D image array for element number - element_number into an array. The array consists of ndimslow *ndimmid - *ndimfast elements of elsize bytes each, starting at array. The - elements are signed if elsign is non-0 and unsigned otherwise. - cbf_get_real_3d_image, cbf_get_real_3d_image_fs, - cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or - floats for element number element_number into an array. A real array - is always signed. - The _fs calls give the dimensions in a fast-to-slow order. The calls - with no suffix and the calls _sf calls give the dimensions in - slow-to-fast order - The structure of the array as a 1-, 2- or 3-dimensional array should - agree with the structure of the array given in the - ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, - ndimslow should be the array size and ndimfast and, for the 3D calls, - ndimmid, should be set to 1 both in the call and in the imgCIF data - being processed. If the array is 2-dimensional and a 3D call is used, - ndimslow and ndimmid should be the + cbf_rewuire_category makes the category in the current data block + with name categoryname the current category, if it exists, or creates + the catagory if it does not exist. + The comparison is case-insensitive. + The current column and row become undefined. + ARGUMENTS + handle CBF handle. categoryname The name of the category to + find. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO """ - return _pycbf.cbf_handle_struct_get_image_fs_as_string(self, element_number, elsize, elsign, ndimfast, ndimslow) - + return _pycbf.cbf_handle_struct_require_category(self, arg) - def get_image_size_sf(self, element_number): - """ + def require_column(self, arg): + r""" - Returns : size_t ndimslow,size_t ndimfast - *args : Integer element_number + Returns : string + *args : - C prototype: int cbf_get_image_size_sf (cbf_handle handle, - unsigned int reserved, unsigned int element_number, - size_t *ndimslow, size_t *ndimfast); + C prototype: int cbf_require_column (cbf_handle handle, + const char *columnname); CBFLib documentation: DESCRIPTION - cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf - set *ndimslow and *ndimfast to the slow and fast dimensions of the - image array for element number element_number. If the array is - 1-dimensional, *ndimslow will be set to the array size and *ndimfast - will be set to 1. If the array is 3-dimensional an error code will be - returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and - cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the - slowest, next fastest and fastest dimensions, respectively, of the 3D - image array for element number element_number. If the array is - 1-dimensional, *ndimslow will be set to the array size and *ndimmid - and - - """ - return _pycbf.cbf_handle_struct_get_image_size_sf(self, element_number) - + cbf_require_column makes the columns in the current category with + name columnname the current column, if it exists, or creates it if it + does not. + The comparison is case-insensitive. + The current row is not affected. + ARGUMENTS + handle CBF handle. columnname The name of column to find. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO - def get_real_image_fs_as_string(self, element_number, elsize, ndimfast, ndimslow): """ + return _pycbf.cbf_handle_struct_require_column(self, arg) - Returns : (Binary)String - *args : int element_number,int elsize,int ndimfast,int ndimslow + def require_column_value(self, columnname, defaultvalue): + r""" - C prototype: int cbf_get_real_image_fs (cbf_handle handle, - unsigned int reserved, unsigned int element_number, - void *array, size_t elsize, size_t ndimfast, - size_t ndimslow); + Returns : String Name + *args : String columnnanme,String Default + + C prototype: int cbf_require_column_value (cbf_handle handle, + const char *columnname, const char **value, + const char *defaultvalue); CBFLib documentation: DESCRIPTION - cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image - array for element number element_number into an array. The array - consists of ndimslow *ndimfast elements of elsize bytes each, - starting at array. The elements are signed if elsign is non-0 and - unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and - cbf_get_real_image_sf read the image array of IEEE doubles or floats - for element number element_number into an array. A real array is - always signed. cbf_get_3d_image, cbf_get_3d_image_fs and - cbf_get_3d_image_sf read the 3D image array for element number - element_number into an array. The array consists of ndimslow *ndimmid - *ndimfast elements of elsize bytes each, starting at array. The - elements are signed if elsign is non-0 and unsigned otherwise. - cbf_get_real_3d_image, cbf_get_real_3d_image_fs, - cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or - floats for element number element_number into an array. A real array - is always signed. - The _fs calls give the dimensions in a fast-to-slow order. The calls - with no suffix and the calls _sf calls give the dimensions in - slow-to-fast order - The structure of the array as a 1-, 2- or 3-dimensional array should - agree with the structure of the array given in the - ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, - ndimslow should be the array size and ndimfast and, for the 3D calls, - ndimmid, should be set to 1 both in the call and in the imgCIF data - being processed. If the array is 2-dimensional and a 3D call is used, - ndimslow and ndimmid should be the + cbf_require_column_doublevalue sets *value to the ASCII item at the + current row for the column given with the name given by *columnname, + or to the string given by defaultvalue if the item cannot be found. + ARGUMENTS + handle CBF handle. columnname Name of the column + containing the number. value pointer to the location to + receive the value. defaultvalue Value to use if the requested + column and value cannot be found. + RETURN VALUE + Returns an error code on failure or 0 for success. + SEE ALSO """ - return _pycbf.cbf_handle_struct_get_real_image_fs_as_string(self, element_number, elsize, ndimfast, ndimslow) - + return _pycbf.cbf_handle_struct_require_column_value(self, columnname, defaultvalue) - def count_columns(self): - """ + def require_column_integervalue(self, columnname, defaultvalue): + r""" - Returns : Integer - *args : + Returns : Int Value + *args : String Columnvalue,Int default - C prototype: int cbf_count_columns (cbf_handle handle, unsigned int *columns); + C prototype: int cbf_require_column_integervalue (cbf_handle handle, + const char *columnname, int *number, + const int defaultvalue); CBFLib documentation: DESCRIPTION - cbf_count_columns puts the number of columns in the current category - in *columns. + cbf_require_column_doublevalue sets *number to the value of the ASCII + item at the current row for the column given with the name given by + *columnname, with the value interpreted as an integer number, or to + the number given by defaultvalue if the item cannot be found. ARGUMENTS - handle CBF handle. columns Pointer to the destination column - count. + handle CBF handle. columnname Name of the column + containing the number. number pointer to the location to + receive the integer value. defaultvalue Value to use if the + requested column and value cannot be found. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_count_columns(self) - + return _pycbf.cbf_handle_struct_require_column_integervalue(self, columnname, defaultvalue) - def get_integerarrayparameters_wdims(self): - """ + def require_column_doublevalue(self, columnname, defaultvalue): + r""" - Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, - int elements,int minelement,int maxelement,char **bo,int *bolen, - int dimfast,int dimmid,int dimslow,int padding - *args : + Returns : Float defaultvalue + *args : String columnname,Float Value - C prototype: int cbf_get_integerarrayparameters_wdims (cbf_handle handle, - unsigned int *compression, int *binary_id, size_t *elsize, - int *elsigned, int *elunsigned, size_t *elements, - int *minelement, int *maxelement, const char **byteorder, - size_t *dimfast, size_t *dimmid, size_t *dimslow, - size_t *padding); + C prototype: int cbf_require_column_doublevalue (cbf_handle handle, + const char *columnname, double *number, + const double defaultvalue); CBFLib documentation: DESCRIPTION - cbf_get_integerarrayparameters sets *compression, *binary_id, - *elsize, *elsigned, *elunsigned, *elements, *minelement and - *maxelement to values read from the binary value of the item at the - current column and row. This provides all the arguments needed for a - subsequent call to cbf_set_integerarray, if a copy of the array is to - be made into another CIF or CBF. cbf_get_realarrayparameters sets - *compression, *binary_id, *elsize, *elements to values read from the - binary value of the item at the current column and row. This provides - all the arguments needed for a subsequent call to cbf_set_realarray, - if a copy of the arry is to be made into another CIF or CBF. - The variants cbf_get_integerarrayparameters_wdims, - cbf_get_integerarrayparameters_wdims_fs, - cbf_get_integerarrayparameters_wdims_sf, - cbf_get_realarrayparameters_wdims, - cbf_get_realarrayparameters_wdims_fs, - cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, - *dimmid, *dimslow, and *padding as well, providing the additional - parameters needed for a subsequent call to cbf_set_integerarray_wdims - or cbf_set_realarray_wdims. - The value returned in *byteorder is a pointer either to the string - "little_endian " or to the string "big_endian ". This should be - the byte order of the data, not necessarily of the host machine. No - attempt should be made to modify this string. At this time only - "little_endian " will be returned. - The values returned in *dimfast, *dimmid and *dimslow are the sizes - of the fastest changing, second fastest changing and third fastest - changing dimensions of the array, if specified, or zero, if not - specified. - The value returned in *padding is the size of the post-data padding, - if any and if specified in the data header. The value is given as a - count of octets. - If the value is not binary, the function returns CBF_ASCII. + cbf_require_column_doublevalue sets *number to the value of the ASCII + item at the current row for the column given with the name given by + *columnname, with the value interpreted as a decimal floating-point + number, or to the number given by defaultvalue if the item cannot be + found. ARGUMENTS - handle CBF handle. compression Compression method used. - elsize Size in bytes of each array element. binary_id - Pointer to the destination integer binary identifier. elsigned - Pointer to an integer. Set to 1 if the elements can be read as signed - integers. elunsigned Pointer to an integer. Set to 1 if the - elements can be read as unsigned integers. elements Pointer to - the destination number of elements. minelement Pointer to the - destination smallest element. maxelement Pointer to the - destination largest element. byteorder Pointer to the destination - byte order. dimfast Pointer to the destination fastest - dimension. dimmid Pointer to the destination second fastest - dimension. dimslow Pointer to the destination third fastest - dimension. padding Pointer to the destination padding size. + handle CBF handle. columnname Name of the column + containing the number. number pointer to the location to + receive the floating-point value. defaultvalue Value to use if the + requested column and value cannot be found. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_get_integerarrayparameters_wdims(self) - + return _pycbf.cbf_handle_struct_require_column_doublevalue(self, columnname, defaultvalue) - def get_gain(self, element_number): - """ + def get_dictionary(self): + r""" - Returns : Float gain,Float gain_esd + Returns : CBFHandle dictionary *args : - C prototype: int cbf_get_gain (cbf_handle handle, unsigned int element_number, - double *gain, double *gain_esd); + C prototype: int cbf_get_dictionary (cbf_handle handle, + cbf_handle * dictionary); CBFLib documentation: DESCRIPTION - cbf_get_gain sets *gain and *gain_esd to the corresponding gain - parameters for element number element_number. - Either of the destination pointers may be NULL. + cbf_get_dictionary sets *dictionary to the handle of a CBF which has + been associated with the CBF handle by cbf_set_dictionary. + cbf_set_dictionary associates the CBF handle dictionary_in with + handle as its dictionary. cbf_require_dictionary sets *dictionary to + the handle of a CBF which has been associated with the CBF handle by + cbf_set_dictionary or creates a new empty CBF and associates it with + handle, returning the new handle in *dictionary. ARGUMENTS - handle CBF handle. element_number The number of the - detector element counting from 0 by order of appearance in the - "diffrn_data_frame " category. gain Pointer to the - destination gain. gain_esd Pointer to the destination - gain_esd. + handle CBF handle. dictionary Pointer to CBF handle of + dictionary. dictionary_in CBF handle of dcitionary. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_get_gain(self, element_number) - + return _pycbf.cbf_handle_struct_get_dictionary(self) - def new_saveframe(self, arg): - """ + def set_dictionary(self, other): + r""" - Returns : string - *args : + Returns : + *args : CBFHandle dictionary - C prototype: int cbf_new_saveframe (cbf_handle handle, - const char *saveframename); + C prototype: int cbf_set_dictionary (cbf_handle handle, + cbf_handle dictionary_in); CBFLib documentation: DESCRIPTION - cbf_new_datablock creates a new data block with name datablockname - and makes it the current data block. cbf_new_saveframe creates a new - save frame with name saveframename within the current data block and - makes the new save frame the current save frame. - If a data block or save frame with this name already exists, the - existing data block or save frame becomes the current data block or - save frame. + cbf_get_dictionary sets *dictionary to the handle of a CBF which has + been associated with the CBF handle by cbf_set_dictionary. + cbf_set_dictionary associates the CBF handle dictionary_in with + handle as its dictionary. cbf_require_dictionary sets *dictionary to + the handle of a CBF which has been associated with the CBF handle by + cbf_set_dictionary or creates a new empty CBF and associates it with + handle, returning the new handle in *dictionary. ARGUMENTS - handle CBF handle. datablockname The name of the new data - block. saveframename The name of the new save frame. + handle CBF handle. dictionary Pointer to CBF handle of + dictionary. dictionary_in CBF handle of dcitionary. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_new_saveframe(self, arg) + return _pycbf.cbf_handle_struct_set_dictionary(self, other) + def find_category_root(self, categoryname): + r""" + + Returns : String categoryroot + *args : String categoryname + + C prototype: int cbf_find_category_root (cbf_handle handle, + const char* categoryname, const char** categoryroot); + + CBFLib documentation: + DESCRIPTION + cbf_find_category_root sets *categoryroot to the root category of + which categoryname is an alias. cbf_set_category_root sets + categoryname_in as an alias of categoryroot in the dictionary + associated with handle, creating the dictionary if necessary. + cbf_require_category_root sets *categoryroot to the root category of + which categoryname is an alias, if there is one, or to the value of + categoryname, if categoryname is not an alias. + A returned categoryroot string must not be modified in any way. + ARGUMENTS + handle CBF handle. categoryname category name which + may be an alias. categoryroot pointer to a returned category + root name. categoryroot_in input category root name. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- - def set_polarization(self, polarizn_source_ratio, polarizn_source_norm): """ + return _pycbf.cbf_handle_struct_find_category_root(self, categoryname) + + def set_category_root(self, categoryname, categoryroot): + r""" Returns : - *args : Float polarizn_source_ratio,Float polarizn_source_norm + *args : String categoryname,String categoryroot - C prototype: int cbf_set_polarization (cbf_handle handle, - double polarizn_source_ratio, - double polarizn_source_norm); + C prototype: int cbf_set_category_root (cbf_handle handle, + const char* categoryname_in, const char*categoryroot); CBFLib documentation: - DESCRIPTION - cbf_set_polarization sets the source polarization to the values - specified by polarizn_source_ratio and polarizn_source_norm. + DESCRIPTION + cbf_find_category_root sets *categoryroot to the root category of + which categoryname is an alias. cbf_set_category_root sets + categoryname_in as an alias of categoryroot in the dictionary + associated with handle, creating the dictionary if necessary. + cbf_require_category_root sets *categoryroot to the root category of + which categoryname is an alias, if there is one, or to the value of + categoryname, if categoryname is not an alias. + A returned categoryroot string must not be modified in any way. ARGUMENTS - handle CBF handle. polarizn_source_ratio New value - of polarizn_source_ratio. polarizn_source_norm New value of - polarizn_source_norm. + handle CBF handle. categoryname category name which + may be an alias. categoryroot pointer to a returned category + root name. categoryroot_in input category root name. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_set_polarization(self, polarizn_source_ratio, polarizn_source_norm) + return _pycbf.cbf_handle_struct_set_category_root(self, categoryname, categoryroot) + def require_category_root(self, categoryname): + r"""require_category_root(cbf_handle_struct self, char const * categoryname) -> char const *""" + return _pycbf.cbf_handle_struct_require_category_root(self, categoryname) - def set_real_3d_image(self, element_number, compression, data, elsize, ndimslow, ndimmid, ndimfast): - """ + def find_tag_root(self, tagname): + r""" - Returns : - *args : int element_number,int compression,(binary) String data,int elsize, - int dimslow,int dimmid,int dimfast + Returns : String tagroot + *args : String tagname - C prototype: int cbf_set_real_3d_image (cbf_handle handle, - unsigned int reserved, unsigned int element_number, - unsigned int compression, void *array,size_t elsize, - size_t ndimslow, size_t ndimmid, size_t ndimfast); + C prototype: int cbf_find_tag_root (cbf_handle handle, const char* tagname, + const char** tagroot); CBFLib documentation: DESCRIPTION - cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image - array for element number element_number. The array consists of - ndimfast *ndimslow elements of elsize bytes each, starting at array. - The elements are signed if elsign is non-zero and unsigned otherwise. - cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf - write the image array for element number element_number. The array - consists of ndimfast *ndimslow IEEE double or float elements of - elsize bytes each, starting at array. cbf_set_3d_image, - cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array - for element number element_number. The array consists of ndimfast - *ndimmid *ndimslow elements of elsize bytes each, starting at array. - The elements are signed if elsign is non-0 and unsigned otherwise. - cbf_set_real_3d_image, cbf_set_real_3d_image_fs and - cbf_set_real_3d_image_sf writes the 3D image array for element number - element_number. The array consists of ndimfast *ndimmid *ndimslow - IEEE double or float elements of elsize bytes each, starting at - array. - The _fs calls give the dimensions in a fast-to-slow order. The calls - with no suffix and the calls _sf calls give the dimensions in - slow-to-fast order - If the array is 1-dimensional, ndimslow should be the array size and - ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the - array is 2-dimensional and the 3D calls are used, ndimslow and - ndimmid should be used for the array dimensions and ndimfast should - be set to 1. - The array will be compressed using the compression scheme specifed by - compression. Currently, the available schemes are: - CBF_CANONICAL Canonical-code compression (section 3.3.1) - CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple - "nibble_offset " compression. CBF_NONE No compression. - The values compressed are limited to 64 bits. If any element in the - array is larger than 64 bits, the value compressed is the nearest - 64-bit value. - Currently, the source array must consist of chars, shorts or ints - (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for - cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof - (int), sizeof(double) or sizeof(float), the function returns - CBF_ARGUMENT. - The parameter reserved is presently unused and should be set to 0. + cbf_find_tag_root sets *tagroot to the root tag of which tagname is + an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in + the dictionary associated with handle, creating the dictionary if + necessary. cbf_require_tag_root sets *tagroot to the root tag of + which tagname is an alias, if there is one, or to the value of + tagname, if tagname is not an alias. + A returned tagroot string must not be modified in any way. ARGUMENTS - handle CBF handle. reserved Unused. Any value other - than 0 is invalid. element_number The number of the detector - element counting from 0 by order of appearance in the - "diffrn_data_frame " category. compression Compression type. - array Pointer to the image array. elsize Size in - bytes of each image array element. elsigned Set to non-0 if - the image array elements are signed. ndimslow Slowest array - dimension. ndimmid Second slowest array dimension. ndimfast - Fastest array dimension. + handle CBF handle. tagname tag name which may be an alias. + tagroot pointer to a returned tag root name. tagroot_in input + tag root name. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_set_real_3d_image(self, element_number, compression, data, elsize, ndimslow, ndimmid, ndimfast) - + return _pycbf.cbf_handle_struct_find_tag_root(self, tagname) - def delete_row(self, arg): - """ + def set_tag_root(self, tagname, tagroot_in): + r""" Returns : - *args : Integer + *args : String tagname,String tagroot_in - C prototype: int cbf_delete_row (cbf_handle handle, unsigned int rownumber); + C prototype: int cbf_set_tag_root (cbf_handle handle, const char* tagname, + const char*tagroot_in); CBFLib documentation: DESCRIPTION - cbf_delete_row deletes a row from the current category. Rows starting - from rownumber +1 are moved down by 1. If the current row was higher - than rownumber, or if the current row is the last row, it will also - move down by 1. - The row numbers start from 0. + cbf_find_tag_root sets *tagroot to the root tag of which tagname is + an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in + the dictionary associated with handle, creating the dictionary if + necessary. cbf_require_tag_root sets *tagroot to the root tag of + which tagname is an alias, if there is one, or to the value of + tagname, if tagname is not an alias. + A returned tagroot string must not be modified in any way. ARGUMENTS - handle CBF handle. rownumber The number of the row to delete. + handle CBF handle. tagname tag name which may be an alias. + tagroot pointer to a returned tag root name. tagroot_in input + tag root name. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_delete_row(self, arg) - + return _pycbf.cbf_handle_struct_set_tag_root(self, tagname, tagroot_in) - def column_name(self): - """ + def require_tag_root(self, tagname): + r""" - Returns : - *args : string + Returns : String tagroot + *args : String tagname - C prototype: int cbf_column_name (cbf_handle handle, const char **columnname); + C prototype: int cbf_require_tag_root (cbf_handle handle, const char* tagname, + const char** tagroot); CBFLib documentation: DESCRIPTION - cbf_column_name sets *columnname to point to the name of the current - column of the current category. - The column name will be valid as long as the column exists. - The name must not be modified by the program in any way. - cbf_set_column_name sets the name of the current column to - newcolumnname + cbf_find_tag_root sets *tagroot to the root tag of which tagname is + an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in + the dictionary associated with handle, creating the dictionary if + necessary. cbf_require_tag_root sets *tagroot to the root tag of + which tagname is an alias, if there is one, or to the value of + tagname, if tagname is not an alias. + A returned tagroot string must not be modified in any way. ARGUMENTS - handle CBF handle. columnname Pointer to the - destination column name pointer. newcolumnname New column name - pointer. + handle CBF handle. tagname tag name which may be an alias. + tagroot pointer to a returned tag root name. tagroot_in input + tag root name. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_column_name(self) - + return _pycbf.cbf_handle_struct_require_tag_root(self, tagname) - def remove_saveframe(self): - """ + def find_tag_category(self, tagname): + r""" - Returns : - *args : + Returns : String categoryname + *args : String tagname - C prototype: int cbf_remove_saveframe (cbf_handle handle); + C prototype: int cbf_find_tag_category (cbf_handle handle, + const char* tagname, const char** categoryname); CBFLib documentation: DESCRIPTION - cbf_remove_datablock deletes the current data block. - cbf_remove_saveframe deletes the current save frame. - The current data block becomes undefined. + cbf_find_tag_category sets categoryname to the category associated + with tagname in the dictionary associated with handle. + cbf_set_tag_category upddates the dictionary associated with handle + to indicated that tagname is in category categoryname_in. ARGUMENTS - handle CBF handle. + handle CBF handle. tagname tag name. + categoryname pointer to a returned category name. + categoryname_in input category name. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_remove_saveframe(self) - + return _pycbf.cbf_handle_struct_find_tag_category(self, tagname) - def set_integerarray_wdims_sf(self, compression, binary_id, data, elsize, elsigned, elements, bo, dimslow, dimmid, dimfast, padding): - """ + def set_tag_category(self, tagname, categoryname_in): + r""" Returns : - *args : int compression,int binary_id,(binary) String data,int elsize, - int elsigned,int elements,String byteorder,int dimslow,int dimmid, - int dimfast,int padding + *args : String tagname,String categoryname_in - C prototype: int cbf_set_integerarray_wdims_sf (cbf_handle handle, - unsigned int compression, int binary_id, void *array, - size_t elsize, int elsigned, size_t elements, - const char *byteorder, size_t dimslow, size_t dimmid, - size_t dimfast, size_t padding); + C prototype: int cbf_set_tag_category (cbf_handle handle, const char* tagname, + const char* categoryname_in); CBFLib documentation: DESCRIPTION - cbf_set_integerarray sets the binary value of the item at the current - column and row to an integer array. The array consists of elements - elements of elsize bytes each, starting at array. The elements are - signed if elsigned is non-0 and unsigned otherwise. binary_id is the - binary section identifier. cbf_set_realarray sets the binary value of - the item at the current column and row to an integer array. The array - consists of elements elements of elsize bytes each, starting at - array. binary_id is the binary section identifier. - The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, - cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, - cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants - allow the data header values of byteorder, dimfast, dimmid, dimslow - and padding to be set to the data byte order, the fastest, second - fastest and third fastest array dimensions and the size in byte of - the post data padding to be used. - The array will be compressed using the compression scheme specifed by - compression. Currently, the available schemes are: - CBF_CANONICAL Canonical-code compression (section 3.3.1) - CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple - "nibble_offset " compression. CBF_NONE No compression. - NOTE: This scheme is by far the slowest of the four and uses much - more disk space. It is intended for routine use with small arrays - only. With large arrays (like images) it should be used only for - debugging. - The values compressed are limited to 64 bits. If any element in the - array is larger than 64 bits, the value compressed is the nearest - 64-bit value. - Currently, the source array must consist of chars, shorts or ints - (signed or unsigned), for cbf_set_integerarray, or IEEE doubles or - floats for cbf_set_realarray. If elsize is not equal to sizeof - (char), sizeof (short) or sizeof (int), the function returns - CBF_ARGUMENT. + cbf_find_tag_category sets categoryname to the category associated + with tagname in the dictionary associated with handle. + cbf_set_tag_category upddates the dictionary associated with handle + to indicated that tagname is in category categoryname_in. ARGUMENTS - handle CBF handle. compression Compression method to use. - binary_id Integer binary identifier. array Pointer to the - source array. elsize Size in bytes of each source array - element. elsigned Set to non-0 if the source array elements are - signed. elements: The number of elements in the array. + handle CBF handle. tagname tag name. + categoryname pointer to a returned category name. + categoryname_in input category name. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO - - """ - return _pycbf.cbf_handle_struct_set_integerarray_wdims_sf(self, compression, binary_id, data, elsize, elsigned, elements, bo, dimslow, dimmid, dimfast, padding) - + ---------------------------------------------------------------------- - def require_value(self, defaultvalue): """ + return _pycbf.cbf_handle_struct_set_tag_category(self, tagname, categoryname_in) - Returns : String Value - *args : String defaultvalue + def read_template(self, filename): + r""" - C prototype: int cbf_require_value (cbf_handle handle, const char **value, - const char *defaultvalue ); + Returns : + *args : String filename + + C prototype: int cbf_read_template (cbf_handle handle, FILE *file); CBFLib documentation: DESCRIPTION - cbf_get_value sets *value to point to the ASCII value of the item at - the current column and row. cbf_require_value sets *value to point to - the ASCII value of the item at the current column and row, creating - the data item if necessary and initializing it to a copy of - defaultvalue. - If the value is not ASCII, the function returns CBF_BINARY. - The value will be valid as long as the item exists and has not been - set to a new value. - The value must not be modified by the program in any way. + cbf_read_template reads the CBF or CIF file file into the CBF object + specified by handle and selects the first datablock as the current + datablock. ARGUMENTS - handle CBF handle. value Pointer to the destination - value pointer. defaultvalue Default value character string. + handle Pointer to a CBF handle. file Pointer to a file + descriptor. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_require_value(self, defaultvalue) - + return _pycbf.cbf_handle_struct_read_template(self, filename) - def require_column_integervalue(self, columnname, defaultvalue): - """ + def get_diffrn_id(self): + r""" - Returns : Int Value - *args : String Columnvalue,Int default + Returns : + *args : string - C prototype: int cbf_require_column_integervalue (cbf_handle handle, - const char *columnname, int *number, - const int defaultvalue); + C prototype: int cbf_get_diffrn_id (cbf_handle handle, + const char **diffrn_id); CBFLib documentation: DESCRIPTION - cbf_require_column_doublevalue sets *number to the value of the ASCII - item at the current row for the column given with the name given by - *columnname, with the value interpreted as an integer number, or to - the number given by defaultvalue if the item cannot be found. + cbf_get_diffrn_id sets *diffrn_id to point to the ASCII value of the + "diffrn.id " entry. cbf_require_diffrn_id also sets *diffrn_id to + point to the ASCII value of the "diffrn.id " entry, but, if the + "diffrn.id " entry does not exist, it sets the value in the CBF and + in*diffrn_id to the character string given by default_id, creating + the category and column is necessary. + The diffrn_id will be valid as long as the item exists and has not + been set to a new value. + The diffrn_id must not be modified by the program in any way. ARGUMENTS - handle CBF handle. columnname Name of the column - containing the number. number pointer to the location to - receive the integer value. defaultvalue Value to use if the - requested column and value cannot be found. + handle CBF handle. diffrn_id Pointer to the destination + value pointer. default_id Character string default value. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_require_column_integervalue(self, columnname, defaultvalue) - + return _pycbf.cbf_handle_struct_get_diffrn_id(self) - def set_pixel_size(self, element_number, axis_number, psize): - """ + def set_diffrn_id(self, arg): + r""" - Returns : - *args : Int element_number,Int axis_number,Float pixel size + Returns : string + *args : - C prototype: int cbf_set_pixel_size (cbf_handle handle, - unsigned int element_number, int axis_number, - double psize); + C prototype: int cbf_set_diffrn_id (cbf_handle handle, const char *diffrn_id); CBFLib documentation: DESCRIPTION - cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the - "e;size"e; column of the "array_structure_list " category - at the row which matches axis axis_number of the detector element - element_number converting the double pixel size psize from meters to - millimeters in storing it in the "size " column for the axis - axis_number of the detector element element_number. The axis_number - is numbered from 1, starting with the slowest axis. - cbf_set_pixel_size_fs sets the item + cbf_set_diffrn_id sets the "diffrn.id " entry of the current + datablock to the ASCII value diffrn_id. + This function also changes corresponding "diffrn_id " entries in + the "diffrn_source ", "diffrn_radiation ", "diffrn_detector + " and "diffrn_measurement " categories. + ARGUMENTS + handle CBF handle. diffrn_id ASCII value. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_set_pixel_size(self, element_number, axis_number, psize) - + return _pycbf.cbf_handle_struct_set_diffrn_id(self, arg) - def next_column(self): - """ + def get_crystal_id(self): + r""" Returns : - *args : + *args : string - C prototype: int cbf_next_column (cbf_handle handle); + C prototype: int cbf_get_crystal_id (cbf_handle handle, + const char **crystal_id); CBFLib documentation: DESCRIPTION - cbf_next_column makes the column following the current column in the - current category the current column. - If there are no more columns, the function returns CBF_NOTFOUND. - The current row is not affected. + cbf_get_crystal_id sets *crystal_id to point to the ASCII value of + the "diffrn.crystal_id " entry. + If the value is not ASCII, the function returns CBF_BINARY. + The value will be valid as long as the item exists and has not been + set to a new value. + The value must not be modified by the program in any way. ARGUMENTS - handle CBF handle. + handle CBF handle. crystal_id Pointer to the destination + value pointer. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_next_column(self) - + return _pycbf.cbf_handle_struct_get_crystal_id(self) - def get_3d_image_size_sf(self, element_number): - """ + def set_crystal_id(self, arg): + r""" - Returns : size_t ndimslow,size_t ndimmid,size_t ndimfast - *args : Integer element_number + Returns : string + *args : - C prototype: int cbf_get_3d_image_size_sf (cbf_handle handle, - unsigned int reserved, unsigned int element_number, - size_t *ndimslow, size_t *ndimmid, size_t *ndimfast); + C prototype: int cbf_set_crystal_id (cbf_handle handle, + const char *crystal_id); CBFLib documentation: DESCRIPTION - cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf - set *ndimslow and *ndimfast to the slow and fast dimensions of the - image array for element number element_number. If the array is - 1-dimensional, *ndimslow will be set to the array size and *ndimfast - will be set to 1. If the array is 3-dimensional an error code will be - returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and - cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the - slowest, next fastest and fastest dimensions, respectively, of the 3D - image array for element number element_number. If the array is - 1-dimensional, *ndimslow will be set to the array size and *ndimmid - and + cbf_set_crystal_id sets the "diffrn.crystal_id " entry to the + ASCII value crystal_id. + ARGUMENTS + handle CBF handle. crystal_id ASCII value. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_get_3d_image_size_sf(self, element_number) - + return _pycbf.cbf_handle_struct_set_crystal_id(self, arg) - def get_realarrayparameters_wdims_fs(self): - """ + def get_wavelength(self): + r""" - Returns : int compression,int binary_id,int elsize,int elements,char **bo, - int *bolen,int dimfast,int dimmid,int dimslow,int padding + Returns : double *args : - C prototype: int cbf_get_realarrayparameters_wdims_fs (cbf_handle handle, - unsigned int *compression, int *binary_id, size_t *elsize, - size_t *elements, const char **byteorder, size_t *dimfast, - size_t *dimmid, size_t *dimslow, size_t *padding); + C prototype: int cbf_get_wavelength (cbf_handle handle, double *wavelength); CBFLib documentation: DESCRIPTION - cbf_get_integerarrayparameters sets *compression, *binary_id, - *elsize, *elsigned, *elunsigned, *elements, *minelement and - *maxelement to values read from the binary value of the item at the - current column and row. This provides all the arguments needed for a - subsequent call to cbf_set_integerarray, if a copy of the array is to - be made into another CIF or CBF. cbf_get_realarrayparameters sets - *compression, *binary_id, *elsize, *elements to values read from the - binary value of the item at the current column and row. This provides - all the arguments needed for a subsequent call to cbf_set_realarray, - if a copy of the arry is to be made into another CIF or CBF. - The variants cbf_get_integerarrayparameters_wdims, - cbf_get_integerarrayparameters_wdims_fs, - cbf_get_integerarrayparameters_wdims_sf, - cbf_get_realarrayparameters_wdims, - cbf_get_realarrayparameters_wdims_fs, - cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, - *dimmid, *dimslow, and *padding as well, providing the additional - parameters needed for a subsequent call to cbf_set_integerarray_wdims - or cbf_set_realarray_wdims. - The value returned in *byteorder is a pointer either to the string - "little_endian " or to the string "big_endian ". This should be - the byte order of the data, not necessarily of the host machine. No - attempt should be made to modify this string. At this time only - "little_endian " will be returned. - The values returned in *dimfast, *dimmid and *dimslow are the sizes - of the fastest changing, second fastest changing and third fastest - changing dimensions of the array, if specified, or zero, if not - specified. - The value returned in *padding is the size of the post-data padding, - if any and if specified in the data header. The value is given as a - count of octets. - If the value is not binary, the function returns CBF_ASCII. + cbf_get_wavelength sets *wavelength to the current wavelength in AA. ARGUMENTS - handle CBF handle. compression Compression method used. - elsize Size in bytes of each array element. binary_id - Pointer to the destination integer binary identifier. elsigned - Pointer to an integer. Set to 1 if the elements can be read as signed - integers. elunsigned Pointer to an integer. Set to 1 if the - elements can be read as unsigned integers. elements Pointer to - the destination number of elements. minelement Pointer to the - destination smallest element. maxelement Pointer to the - destination largest element. byteorder Pointer to the destination - byte order. dimfast Pointer to the destination fastest - dimension. dimmid Pointer to the destination second fastest - dimension. dimslow Pointer to the destination third fastest - dimension. padding Pointer to the destination padding size. + handle CBF handle. wavelength Pointer to the destination. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_get_realarrayparameters_wdims_fs(self) - + return _pycbf.cbf_handle_struct_get_wavelength(self) - def get_realarray_as_string(self): - """ + def set_wavelength(self, wavelength): + r""" - Returns : (Binary)String + Returns : double wavelength *args : - C prototype: int cbf_get_realarray (cbf_handle handle, int *binary_id, - void *array, size_t elsize, size_t elements, - size_t *elements_read); + C prototype: int cbf_set_wavelength (cbf_handle handle, double wavelength); CBFLib documentation: - DESCRIPTION - cbf_get_integerarray reads the binary value of the item at the - current column and row into an integer array. The array consists of - elements elements of elsize bytes each, starting at array. The - elements are signed if elsigned is non-0 and unsigned otherwise. - *binary_id is set to the binary section identifier and *elements_read - to the number of elements actually read. cbf_get_realarray reads the - binary value of the item at the current column and row into a real - array. The array consists of elements elements of elsize bytes each, - starting at array. *binary_id is set to the binary section identifier - and *elements_read to the number of elements actually read. - If any element in the integer binary data cant fit into the - destination element, the destination is set the nearest possible - value. - If the value is not binary, the function returns CBF_ASCII. - If the requested number of elements cant be read, the function will - read as many as it can and then return CBF_ENDOFDATA. - Currently, the destination array must consist of chars, shorts or - ints (signed or unsigned). If elsize is not equal to sizeof (char), - sizeof (short) or sizeof (int), for cbf_get_integerarray, or - sizeof(double) or sizeof(float), for cbf_get_realarray the function - returns CBF_ARGUMENT. - An additional restriction in the current version of CBFlib is that - values too large to fit in an int are not correctly decompressed. As - an example, if the machine with 32-bit ints is reading an array - containing a value outside the range 0 .. 2^32-1 (unsigned) or -2^31 - .. 2^31-1 (signed), the array will not be correctly decompressed. - This restriction will be removed in a future release. For - cbf_get_realarray, only IEEE format is supported. No conversion to - other floating point formats is done at this time. + DESCRIPTION + cbf_set_wavelength sets the current wavelength in AA to wavelength. ARGUMENTS - handle CBF handle. binary_id Pointer to the - destination integer binary identifier. array Pointer to the - destination array. elsize Size in bytes of each destination - array element. elsigned Set to non-0 if the destination array - elements are signed. elements The number of elements to read. - elements_read Pointer to the destination number of elements - actually read. + handle CBF handle. wavelength Wavelength in AA. RETURN VALUE - Returns an error code on failure or 0 for success. SEE ALSO + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_get_realarray_as_string(self) - + return _pycbf.cbf_handle_struct_set_wavelength(self, wavelength) - def get_bin_sizes(self, element_number): - """ + def get_polarization(self): + r""" - Returns : Float slowbinsize,Float fastbinsize - *args : Integer element_number + Returns : float polarizn_source_ratio,float polarizn_source_norm + *args : - C prototype: int cbf_get_bin_sizes(cbf_handle handle, - unsigned int element_number, double * slowbinsize, - double * fastbinsize); + C prototype: int cbf_get_polarization (cbf_handle handle, + double *polarizn_source_ratio, + double *polarizn_source_norm); CBFLib documentation: DESCRIPTION - cbf_get_bin_sizes sets slowbinsize to point to the value of the - number of pixels composing one array element in the dimension that - changes at the second-fastest rate and fastbinsize to point to the - value of the number of pixels composing one array element in the - dimension that changes at the fastest rate for the dectector element - with the ordinal element_number. cbf_set_bin_sizes sets the the pixel - bin sizes in the "array_intensities " category to the values of - slowbinsize_in for the number of pixels composing one array element - in the dimension that changes at the second-fastest rate and - fastbinsize_in for the number of pixels composing one array element - in the dimension that changes at the fastest rate for the dectector - element with the ordinal element_number. - In order to allow for software binning involving fractions of pixels, - the bin sizes are doubles rather than ints. + cbf_get_polarization sets *polarizn_source_ratio and + *polarizn_source_norm to the corresponding source polarization + parameters. + Either destination pointer may be NULL. ARGUMENTS - handle CBF handle. element_number The number of the - detector element counting from 0 by order of appearance in the - "diffrn_data_frame " category. slowbinsize Pointer to the - returned number of pixels composing one array element in the - dimension that changes at the second-fastest rate. fastbinsize - Pointer to the returned number of pixels composing one array element - in the dimension that changes at the fastest rate. slowbinsize_in - The number of pixels composing one array element in the dimension - that changes at the second-fastest rate. fastbinsize_in The number - of pixels composing one array element in the dimension that changes - at the fastest rate. + handle CBF handle. polarizn_source_ratio Pointer + to the destination polarizn_source_ratio. polarizn_source_norm + Pointer to the destination polarizn_source_norm. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_get_bin_sizes(self, element_number) - + return _pycbf.cbf_handle_struct_get_polarization(self) - def reset_category(self): - """ + def set_polarization(self, polarizn_source_ratio, polarizn_source_norm): + r""" Returns : - *args : + *args : Float polarizn_source_ratio,Float polarizn_source_norm - C prototype: int cbf_reset_category (cbf_handle handle); + C prototype: int cbf_set_polarization (cbf_handle handle, + double polarizn_source_ratio, + double polarizn_source_norm); CBFLib documentation: DESCRIPTION - cbf_reset_category deletes all columns and rows from current category. + cbf_set_polarization sets the source polarization to the values + specified by polarizn_source_ratio and polarizn_source_norm. ARGUMENTS - handle CBF handle. + handle CBF handle. polarizn_source_ratio New value + of polarizn_source_ratio. polarizn_source_norm New value of + polarizn_source_norm. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_reset_category(self) - + return _pycbf.cbf_handle_struct_set_polarization(self, polarizn_source_ratio, polarizn_source_norm) - def count_axis_ancestors(self, axis_id): - """ + def get_divergence(self): + r""" - Returns : Integer - *args : String axis_id + Returns : Float div_x_source,Float div_y_source,Float div_x_y_source + *args : - C prototype: int cbf_count_axis_ancestors (cbf_handle handle, - const char *axis_id, unsigned int *ancestors); + C prototype: int cbf_get_divergence (cbf_handle handle, double *div_x_source, + double *div_y_source, double *div_x_y_source); CBFLib documentation: DESCRIPTION - cbf_count_axis_ancestors sets ancestors to the number of ancestors of - axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor - axis of index ancestor_index of axis axis_id, starting with axis_id - for ancestor_index 0. - cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of - axis_id or to ". " if there is no such ancestor. - cbf_get_axis_equipment sets *equipment to the equipment of axis_id or - to ". " if there is no such equipment. - cbf_get_axis_equipment_component sets *equipment_component to the - equipment_component of axis_id or to ". " if there is no such - equipment_component. - cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the - components of the ofset of axis_id. - cbf_get_axis_rotation sets rotation to the rotation of axis_id or to - 0 if there is no such rotation. cbf_get_axis_rotation_axis sets - *rotation_axis to the rotation_axis of axis_id or to ". " if there - is no such rotation_axis. - cbf_get_axis_setting sets *start and *increment to the corresponding - values of the axis axis_id. Any of the destination pointers may be - NULL. - cbf_get_axis_type sets axis_type to the type of axis_id. - cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the - components of the vector of axis_id. - The parameter reserved is presently unused and should be set to 0. + cbf_get_divergence sets *div_x_source, *div_y_source and + *div_x_y_source to the corresponding source divergence parameters. + Any of the destination pointers may be NULL. ARGUMENTS - handle CBF handle. reserved Unused. Any - value other than 0 is invalid. axis_id Axis id. - ancestor_index Integer index of the desired ancestor, starting - with 0 for the current axis_id. ancestor Pointer to - destination ancestor name pointer. depends_on Pointer to - destination depends_on name pointer. equipment Pointer to - destination equipment name pointer. equipment_component Pointer to - destination equipment_component name pointer. offset1 - Pointer to destination first offset component value. offset2 - Pointer to destination second offset component value. offset3 - Pointer to destination third offset component value. - rotation Pointer to destination rotation value. - rotation_axis Pointer to destination rotation_axisn name - pointer. start Pointer to the destination start - value. increment Pointer to the destination increment - value. type Pointer to destination axis type of type - . vector1 Pointer to destination first vector component - value. vector2 Pointer to destination second vector - component value. vector3 Pointer to destination third - vector component value. + handle CBF handle. div_x_source Pointer to the + destination div_x_source. div_y_source Pointer to the destination + div_y_source. div_x_y_source Pointer to the destination + div_x_y_source. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_count_axis_ancestors(self, axis_id) + return _pycbf.cbf_handle_struct_get_divergence(self) + def set_divergence(self, div_x_source, div_y_source, div_x_y_source): + r""" + + Returns : + *args : Float div_x_source,Float div_y_source,Float div_x_y_source + + C prototype: int cbf_set_divergence (cbf_handle handle, double div_x_source, + double div_y_source, double div_x_y_source); + + CBFLib documentation: + DESCRIPTION + cbf_set_divergence sets the source divergence parameters to the + values specified by div_x_source, div_y_source and div_x_y_source. + ARGUMENTS + handle CBF handle. div_x_source New value of + div_x_source. div_y_source New value of div_y_source. + div_x_y_source New value of div_x_y_source. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- - def construct_goniometer(self): """ + return _pycbf.cbf_handle_struct_set_divergence(self, div_x_source, div_y_source, div_x_y_source) - Returns : pycbf goniometer object + def count_elements(self): + r""" + + Returns : Integer *args : - C prototype: int cbf_construct_goniometer (cbf_handle handle, - cbf_goniometer *goniometer); + C prototype: int cbf_count_elements (cbf_handle handle, + unsigned int *elements); CBFLib documentation: DESCRIPTION - cbf_construct_goniometer constructs a goniometer object using the - description in the CBF object handle and initialises the goniometer - handle *goniometer. + cbf_count_elements sets *elements to the number of detector elements. ARGUMENTS - handle CBF handle. goniometer Pointer to the destination - goniometer handle. + handle CBF handle. elements Pointer to the destination count. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_construct_goniometer(self) + return _pycbf.cbf_handle_struct_count_elements(self) + def get_element_number(self): + r"""get_element_number(cbf_handle_struct self)""" + return _pycbf.cbf_handle_struct_get_element_number(self) - def set_datablockname(self, arg): - """ + def get_element_id(self, element_number): + r""" - Returns : string - *args : + Returns : String + *args : Integer element_number - C prototype: int cbf_set_datablockname (cbf_handle handle, - const char *datablockname); + C prototype: int cbf_get_element_id (cbf_handle handle, + unsigned int element_number, const char **element_id); CBFLib documentation: DESCRIPTION - cbf_set_datablockname changes the name of the current data block to - datablockname. cbf_set_saveframename changes the name of the current - save frame to saveframename. - If a data block or save frame with this name already exists - (comparison is case-insensitive), the function returns CBF_IDENTICAL. + cbf_get_element_number sets element_number to a number that can be + used in other cbf_simple calls to identify the detector element + element_id and optionally the specific array_id> and + array_section_id. cbf_get_element_id sets *element_id to point to the + ASCII value of the element_number'th + "diffrn_data_frame.detector_element_id " entry, counting from 0. + The element_number is the ordinal of the detector element in the + DIFFRN_DETECTOR_ELEMENT category. If an array_section_id is specified + (i.e. is not NULL), the element_number is the sum of the ordinal of + the detector element plus the number of detector elements multiplied + by the ordinal of array_section_id for the specified array_id> in the + ARRAY_STRUCTURE_LIST_SECTION category. + If the detector element does not exist, the function returns + CBF_NOTFOUND. + The element_id will be valid as long as the item exists and has not + been set to a new value. + The element_id must not be modified by the program in any way. ARGUMENTS - handle CBF handle. datablockname The new data block name. - datablockname The new save frame name. + handle CBF handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. element_id Pointer to the + destination string for cbf_get_element_id, but the string itself for + cbf_get_element_number. array_id The optional array id or + NULL. array_section_id The optional array_section_id or NULL. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_set_datablockname(self, arg) + return _pycbf.cbf_handle_struct_get_element_id(self, element_number) + def get_gain(self, element_number): + r""" - def get_element_number(self): - """get_element_number(cbf_handle_struct self)""" - return _pycbf.cbf_handle_struct_get_element_number(self) + Returns : Float gain,Float gain_esd + *args : + + C prototype: int cbf_get_gain (cbf_handle handle, unsigned int element_number, + double *gain, double *gain_esd); + CBFLib documentation: + DESCRIPTION + cbf_get_gain sets *gain and *gain_esd to the corresponding gain + parameters for element number element_number. + Either of the destination pointers may be NULL. + ARGUMENTS + handle CBF handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. gain Pointer to the + destination gain. gain_esd Pointer to the destination + gain_esd. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- - def set_crystal_id(self, arg): """ + return _pycbf.cbf_handle_struct_get_gain(self, element_number) - Returns : string - *args : + def set_gain(self, element_number, gain, gain_esd): + r""" - C prototype: int cbf_set_crystal_id (cbf_handle handle, - const char *crystal_id); + Returns : + *args : Float gain,Float gain_esd + + C prototype: int cbf_set_gain (cbf_handle handle, unsigned int element_number, + double gain, double gain_esd); CBFLib documentation: DESCRIPTION - cbf_set_crystal_id sets the "diffrn.crystal_id " entry to the - ASCII value crystal_id. + cbf_set_gain sets the gain of element number element_number to the + values specified by gain and gain_esd. ARGUMENTS - handle CBF handle. crystal_id ASCII value. + handle CBF handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. gain New gain value. + gain_esd New gain_esd value. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_set_crystal_id(self, arg) - + return _pycbf.cbf_handle_struct_set_gain(self, element_number, gain, gain_esd) - def get_integerarray_as_string(self): - """ + def get_overload(self, element_number): + r""" - Returns : (Binary)String - *args : + Returns : Float overload + *args : Integer element_number - C prototype: int cbf_get_integerarray (cbf_handle handle, int *binary_id, - void *array, size_t elsize, int elsigned, size_t elements, - size_t *elements_read); + C prototype: int cbf_get_overload (cbf_handle handle, + unsigned int element_number, double *overload); CBFLib documentation: DESCRIPTION - cbf_get_integerarray reads the binary value of the item at the - current column and row into an integer array. The array consists of - elements elements of elsize bytes each, starting at array. The - elements are signed if elsigned is non-0 and unsigned otherwise. - *binary_id is set to the binary section identifier and *elements_read - to the number of elements actually read. cbf_get_realarray reads the - binary value of the item at the current column and row into a real - array. The array consists of elements elements of elsize bytes each, - starting at array. *binary_id is set to the binary section identifier - and *elements_read to the number of elements actually read. - If any element in the integer binary data cant fit into the - destination element, the destination is set the nearest possible - value. - If the value is not binary, the function returns CBF_ASCII. - If the requested number of elements cant be read, the function will - read as many as it can and then return CBF_ENDOFDATA. - Currently, the destination array must consist of chars, shorts or - ints (signed or unsigned). If elsize is not equal to sizeof (char), - sizeof (short) or sizeof (int), for cbf_get_integerarray, or - sizeof(double) or sizeof(float), for cbf_get_realarray the function - returns CBF_ARGUMENT. - An additional restriction in the current version of CBFlib is that - values too large to fit in an int are not correctly decompressed. As - an example, if the machine with 32-bit ints is reading an array - containing a value outside the range 0 .. 2^32-1 (unsigned) or -2^31 - .. 2^31-1 (signed), the array will not be correctly decompressed. - This restriction will be removed in a future release. For - cbf_get_realarray, only IEEE format is supported. No conversion to - other floating point formats is done at this time. + cbf_get_overload sets *overload to the overload value for element + number element_number. ARGUMENTS - handle CBF handle. binary_id Pointer to the - destination integer binary identifier. array Pointer to the - destination array. elsize Size in bytes of each destination - array element. elsigned Set to non-0 if the destination array - elements are signed. elements The number of elements to read. - elements_read Pointer to the destination number of elements - actually read. + handle CBF handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. overload Pointer to the + destination overload. RETURN VALUE - Returns an error code on failure or 0 for success. SEE ALSO + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_get_integerarray_as_string(self) - + return _pycbf.cbf_handle_struct_get_overload(self, element_number) - def set_3d_image(self, element_number, compression, data, elsize, elsign, ndimslow, ndimmid, ndimfast): - """ + def set_overload(self, element_number, overload): + r""" Returns : - *args : int element_number,int compression,(binary) String data,int elsize, - int elsign,int dimslow,int dimmid,int dimfast + *args : Integer element_number,Float overload - C prototype: int cbf_set_3d_image (cbf_handle handle, unsigned int reserved, - unsigned int element_number, unsigned int compression, - void *array, size_t elsize, int elsign, size_t ndimslow, - size_t ndimmid, size_t ndimfast); + C prototype: int cbf_set_overload (cbf_handle handle, + unsigned int element_number, double overload); CBFLib documentation: DESCRIPTION - cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image - array for element number element_number. The array consists of - ndimfast *ndimslow elements of elsize bytes each, starting at array. - The elements are signed if elsign is non-zero and unsigned otherwise. - cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf - write the image array for element number element_number. The array - consists of ndimfast *ndimslow IEEE double or float elements of - elsize bytes each, starting at array. cbf_set_3d_image, - cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array - for element number element_number. The array consists of ndimfast - *ndimmid *ndimslow elements of elsize bytes each, starting at array. - The elements are signed if elsign is non-0 and unsigned otherwise. - cbf_set_real_3d_image, cbf_set_real_3d_image_fs and - cbf_set_real_3d_image_sf writes the 3D image array for element number - element_number. The array consists of ndimfast *ndimmid *ndimslow - IEEE double or float elements of elsize bytes each, starting at - array. - The _fs calls give the dimensions in a fast-to-slow order. The calls - with no suffix and the calls _sf calls give the dimensions in - slow-to-fast order - If the array is 1-dimensional, ndimslow should be the array size and - ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the - array is 2-dimensional and the 3D calls are used, ndimslow and - ndimmid should be used for the array dimensions and ndimfast should - be set to 1. - The array will be compressed using the compression scheme specifed by - compression. Currently, the available schemes are: - CBF_CANONICAL Canonical-code compression (section 3.3.1) - CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple - "nibble_offset " compression. CBF_NONE No compression. - The values compressed are limited to 64 bits. If any element in the - array is larger than 64 bits, the value compressed is the nearest - 64-bit value. - Currently, the source array must consist of chars, shorts or ints - (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for - cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof - (int), sizeof(double) or sizeof(float), the function returns - CBF_ARGUMENT. - The parameter reserved is presently unused and should be set to 0. + cbf_set_overload sets the overload value of element number + element_number to overload. ARGUMENTS - handle CBF handle. reserved Unused. Any value other - than 0 is invalid. element_number The number of the detector - element counting from 0 by order of appearance in the - "diffrn_data_frame " category. compression Compression type. - array Pointer to the image array. elsize Size in - bytes of each image array element. elsigned Set to non-0 if - the image array elements are signed. ndimslow Slowest array - dimension. ndimmid Second slowest array dimension. ndimfast - Fastest array dimension. + handle CBF handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. overload New overload value. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_set_3d_image(self, element_number, compression, data, elsize, elsign, ndimslow, ndimmid, ndimfast) - + return _pycbf.cbf_handle_struct_set_overload(self, element_number, overload) - def set_dictionary(self, other): - """ + def get_integration_time(self): + r""" - Returns : - *args : CBFHandle dictionary + Returns : Float time + *args : - C prototype: int cbf_set_dictionary (cbf_handle handle, - cbf_handle dictionary_in); + C prototype: int cbf_get_integration_time (cbf_handle handle, + unsigned int reserved, double *time); CBFLib documentation: DESCRIPTION - cbf_get_dictionary sets *dictionary to the handle of a CBF which has - been associated with the CBF handle by cbf_set_dictionary. - cbf_set_dictionary associates the CBF handle dictionary_in with - handle as its dictionary. cbf_require_dictionary sets *dictionary to - the handle of a CBF which has been associated with the CBF handle by - cbf_set_dictionary or creates a new empty CBF and associates it with - handle, returning the new handle in *dictionary. + cbf_get_integration_time sets *time to the integration time in + seconds. The parameter reserved is presently unused and should be set + to 0. ARGUMENTS - handle CBF handle. dictionary Pointer to CBF handle of - dictionary. dictionary_in CBF handle of dcitionary. + handle CBF handle. reserved Unused. Any value other than 0 is + invalid. time Pointer to the destination time. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_set_dictionary(self, other) - + return _pycbf.cbf_handle_struct_get_integration_time(self) - def find_tag_category(self, tagname): - """ + def set_integration_time(self, time): + r""" - Returns : String categoryname - *args : String tagname + Returns : + *args : Float time - C prototype: int cbf_find_tag_category (cbf_handle handle, - const char* tagname, const char** categoryname); + C prototype: int cbf_set_integration_time (cbf_handle handle, + unsigned int reserved, double time); CBFLib documentation: DESCRIPTION - cbf_find_tag_category sets categoryname to the category associated - with tagname in the dictionary associated with handle. - cbf_set_tag_category upddates the dictionary associated with handle - to indicated that tagname is in category categoryname_in. + cbf_set_integration_time sets the integration time in seconds to the + value specified by time. The parameter reserved is presently unused + and should be set to 0. ARGUMENTS - handle CBF handle. tagname tag name. - categoryname pointer to a returned category name. - categoryname_in input category name. + handle CBF handle. reserved Unused. Any value + other than 0 is invalid. time Integration time in seconds. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_find_tag_category(self, tagname) - + return _pycbf.cbf_handle_struct_set_integration_time(self, time) - def get_real_3d_image_sf_as_string(self, element_number, elsize, ndimslow, ndimmid, ndimfast): - """ + def get_timestamp(self): + r""" - Returns : (Binary)String - *args : int element_number,int elsize,int ndimslow,int ndimmid,int ndimfast + Returns : Float time,Integer timezone + *args : - C prototype: int cbf_get_real_3d_image_sf (cbf_handle handle, - unsigned int reserved, unsigned int element_number, - void *array, size_t elsize, size_t ndimslow, - size_t ndimmid, size_t ndimfast); + C prototype: int cbf_get_timestamp (cbf_handle handle, unsigned int reserved, + double *time, int *timezone); CBFLib documentation: DESCRIPTION - cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image - array for element number element_number into an array. The array - consists of ndimslow *ndimfast elements of elsize bytes each, - starting at array. The elements are signed if elsign is non-0 and - unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and - cbf_get_real_image_sf read the image array of IEEE doubles or floats - for element number element_number into an array. A real array is - always signed. cbf_get_3d_image, cbf_get_3d_image_fs and - cbf_get_3d_image_sf read the 3D image array for element number - element_number into an array. The array consists of ndimslow *ndimmid - *ndimfast elements of elsize bytes each, starting at array. The - elements are signed if elsign is non-0 and unsigned otherwise. - cbf_get_real_3d_image, cbf_get_real_3d_image_fs, - cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or - floats for element number element_number into an array. A real array - is always signed. - The _fs calls give the dimensions in a fast-to-slow order. The calls - with no suffix and the calls _sf calls give the dimensions in - slow-to-fast order - The structure of the array as a 1-, 2- or 3-dimensional array should - agree with the structure of the array given in the - ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, - ndimslow should be the array size and ndimfast and, for the 3D calls, - ndimmid, should be set to 1 both in the call and in the imgCIF data - being processed. If the array is 2-dimensional and a 3D call is used, - ndimslow and ndimmid should be the + cbf_get_timestamp sets *time to the collection timestamp in seconds + since January 1 1970. *timezone is set to timezone difference from + UTC in minutes. The parameter reserved is presently unused and should + be set to 0. + Either of the destination pointers may be NULL. + ARGUMENTS + handle CBF handle. reserved Unused. Any value other than 0 is + invalid. time Pointer to the destination collection timestamp. + timezone Pointer to the destination timezone difference. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_get_real_3d_image_sf_as_string(self, element_number, elsize, ndimslow, ndimmid, ndimfast) + return _pycbf.cbf_handle_struct_get_timestamp(self) + def set_timestamp(self, time, timezone, precision): + r""" + + Returns : + *args : Float time,Integer timezone,Float precision + + C prototype: int cbf_set_timestamp (cbf_handle handle, unsigned int reserved, + double time, int timezone, double precision); + + CBFLib documentation: + DESCRIPTION + cbf_set_timestamp sets the collection timestamp in seconds since + January 1 1970 to the value specified by time. The timezone + difference from UTC - def set_typeofvalue(self, arg): """ + return _pycbf.cbf_handle_struct_set_timestamp(self, time, timezone, precision) - Returns : string + def get_datestamp(self): + r""" + + Returns : int year,int month,int day,int hour,int minute,double second, + int timezone *args : - C prototype: int cbf_set_typeofvalue (cbf_handle handle, - const char *typeofvalue); + C prototype: int cbf_get_datestamp (cbf_handle handle, unsigned int reserved, + int *year, int *month, int *day, int *hour, int *minute, + double *second, int *timezone); CBFLib documentation: DESCRIPTION - cbf_set_typeofvalue sets the type of the item at the current column - and row to the type specified by the ASCII character string given by - typeofvalue. The strings that may be used are: - "null " for a null value indicated by a ". " or a "? " - "bnry " for a binary value "word " for an unquoted string - "dblq " for a double-quoted string "sglq " for a single-quoted - string "text " for a semicolon-quoted string (multiline text - field) "prns " for a parenthesis-bracketed string (multiline text - field) "brcs " for a brace-bracketed string (multiline text field) - "bkts " for a square-bracket-bracketed string (multiline text - field) "tsqs " for a treble-single-quote quoted string (multiline - text field) "tdqs " for a treble-double-quote quoted string - (multiline text field) - Not all types may be used for all values. Not all types are valid for - all type of CIF files. In partcular the types "prns ", "brcs ", - "bkts " were introduced with DDLm and are not valid in DDL1 or - DDL2 CIFS. The types "tsqs " and "tdqs " are not formally part - of the CIF syntax. No changes may be made to the type of binary - values. You may not set the type of a string that contains a single - quote followed by a blank or a tab or which contains multiple lines - to "sglq ". You may not set the type of a string that contains a - double quote followed by a blank or a tab or which contains multiple - lines to "dblq ". + cbf_get_datestamp sets *year, *month, *day, *hour, *minute and + *second to the corresponding values of the collection timestamp. + *timezone is set to timezone difference from UTC in minutes. The + parameter < i>reserved is presently unused and should be set to 0. + Any of the destination pointers may be NULL. ARGUMENTS - handle CBF handle. typeofvalue ASCII string for desired type - of value. + handle CBF handle. reserved Unused. Any value other than 0 is + invalid. year Pointer to the destination timestamp year. month + Pointer to the destination timestamp month (1-12). day + Pointer to the destination timestamp day (1-31). hour Pointer + to the destination timestamp hour (0-23). minute Pointer to the + destination timestamp minute (0-59). second Pointer to the + destination timestamp second (0-60.0). timezone Pointer to the + destination timezone difference from UTC in minutes. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_set_typeofvalue(self, arg) + return _pycbf.cbf_handle_struct_get_datestamp(self) + def set_datestamp(self, year, month, day, hour, minute, second, timezone, precision): + r""" + + Returns : + *args : int year,int month,int day,int hour,int minute,double second, + int timezone,Float precision + + C prototype: int cbf_set_datestamp (cbf_handle handle, unsigned int reserved, + int year, int month, int day, int hour, int minute, + double second, int timezone, double precision); + + CBFLib documentation: + DESCRIPTION + cbf_set_datestamp sets the collection timestamp in seconds since + January 1 1970 to the value specified by time. The timezone + difference from UTC - def get_axis_rotation_axis(self, axis_id): """ + return _pycbf.cbf_handle_struct_set_datestamp(self, year, month, day, hour, minute, second, timezone, precision) - Returns : String - *args : String axis_id + def set_current_timestamp(self, timezone): + r""" - C prototype: int cbf_get_axis_rotation_axis (cbf_handle handle, - const char *axis_id, const char * *rotation_axis); + Returns : + *args : Integer timezone + + C prototype: int cbf_set_current_timestamp (cbf_handle handle, + unsigned int reserved, int timezone); CBFLib documentation: DESCRIPTION - cbf_count_axis_ancestors sets ancestors to the number of ancestors of - axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor - axis of index ancestor_index of axis axis_id, starting with axis_id - for ancestor_index 0. - cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of - axis_id or to ". " if there is no such ancestor. - cbf_get_axis_equipment sets *equipment to the equipment of axis_id or - to ". " if there is no such equipment. - cbf_get_axis_equipment_component sets *equipment_component to the - equipment_component of axis_id or to ". " if there is no such - equipment_component. - cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the - components of the ofset of axis_id. - cbf_get_axis_rotation sets rotation to the rotation of axis_id or to - 0 if there is no such rotation. cbf_get_axis_rotation_axis sets - *rotation_axis to the rotation_axis of axis_id or to ". " if there - is no such rotation_axis. - cbf_get_axis_setting sets *start and *increment to the corresponding - values of the axis axis_id. Any of the destination pointers may be - NULL. - cbf_get_axis_type sets axis_type to the type of axis_id. - cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the - components of the vector of axis_id. + cbf_set_current_timestamp sets the collection timestamp to the + current time. The timezone difference from UTC in minutes is set to + timezone. If no timezone is desired, timezone should be + CBF_NOTIMEZONE. If no timezone is used, the timest amp will be UTC. The parameter reserved is presently unused and should be set to 0. + The new timestamp will have a precision of 1 second. ARGUMENTS - handle CBF handle. reserved Unused. Any - value other than 0 is invalid. axis_id Axis id. - ancestor_index Integer index of the desired ancestor, starting - with 0 for the current axis_id. ancestor Pointer to - destination ancestor name pointer. depends_on Pointer to - destination depends_on name pointer. equipment Pointer to - destination equipment name pointer. equipment_component Pointer to - destination equipment_component name pointer. offset1 - Pointer to destination first offset component value. offset2 - Pointer to destination second offset component value. offset3 - Pointer to destination third offset component value. - rotation Pointer to destination rotation value. - rotation_axis Pointer to destination rotation_axisn name - pointer. start Pointer to the destination start - value. increment Pointer to the destination increment - value. type Pointer to destination axis type of type - . vector1 Pointer to destination first vector component - value. vector2 Pointer to destination second vector - component value. vector3 Pointer to destination third - vector component value. + handle CBF handle. reserved Unused. Any value other than 0 is + invalid. timezone Timezone difference from UTC in minutes or + CBF_NOTIMEZONE. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_get_axis_rotation_axis(self, axis_id) + return _pycbf.cbf_handle_struct_set_current_timestamp(self, timezone) + def get_image_size(self, element_number): + r""" + + Returns : size_t ndim1,size_t ndim2 + *args : Integer element_number + + C prototype: int cbf_get_image_size (cbf_handle handle, unsigned int reserved, + unsigned int element_number, size_t *ndimslow, + size_t *ndimfast); + + CBFLib documentation: + DESCRIPTION + cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf + set *ndimslow and *ndimfast to the slow and fast dimensions of the + image array for element number element_number. If the array is + 1-dimensional, *ndimslow will be set to the array size and *ndimfast + will be set to 1. If the array is 3-dimensional an error code will be + returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and + cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the + slowest, next fastest and fastest dimensions, respectively, of the 3D + image array for element number element_number. If the array is + 1-dimensional, *ndimslow will be set to the array size and *ndimmid + and - def set_integerarray_wdims(self, compression, binary_id, data, elsize, elsigned, elements, bo, dimfast, dimmid, dimslow, padding): """ + return _pycbf.cbf_handle_struct_get_image_size(self, element_number) - Returns : - *args : int compression,int binary_id,(binary) String data,int elsize, - int elsigned,int elements,String byteorder,int dimfast,int dimmid, - int dimslow,int padding + def get_image_size_fs(self, element_number): + r""" - C prototype: int cbf_set_integerarray_wdims (cbf_handle handle, - unsigned int compression, int binary_id, void *array, - size_t elsize, int elsigned, size_t elements, - const char *byteorder, size_t dimfast, size_t dimmid, - size_t dimslow, size_t padding); + Returns : size_t ndimfast,size_t ndimslow + *args : Integer element_number + + C prototype: int cbf_get_image_size_fs (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + size_t *ndimfast, size_t *ndimslow); CBFLib documentation: DESCRIPTION - cbf_set_integerarray sets the binary value of the item at the current - column and row to an integer array. The array consists of elements - elements of elsize bytes each, starting at array. The elements are - signed if elsigned is non-0 and unsigned otherwise. binary_id is the - binary section identifier. cbf_set_realarray sets the binary value of - the item at the current column and row to an integer array. The array - consists of elements elements of elsize bytes each, starting at - array. binary_id is the binary section identifier. - The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, - cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, - cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants - allow the data header values of byteorder, dimfast, dimmid, dimslow - and padding to be set to the data byte order, the fastest, second - fastest and third fastest array dimensions and the size in byte of - the post data padding to be used. - The array will be compressed using the compression scheme specifed by - compression. Currently, the available schemes are: - CBF_CANONICAL Canonical-code compression (section 3.3.1) - CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple - "nibble_offset " compression. CBF_NONE No compression. - NOTE: This scheme is by far the slowest of the four and uses much - more disk space. It is intended for routine use with small arrays - only. With large arrays (like images) it should be used only for - debugging. - The values compressed are limited to 64 bits. If any element in the - array is larger than 64 bits, the value compressed is the nearest - 64-bit value. - Currently, the source array must consist of chars, shorts or ints - (signed or unsigned), for cbf_set_integerarray, or IEEE doubles or - floats for cbf_set_realarray. If elsize is not equal to sizeof - (char), sizeof (short) or sizeof (int), the function returns - CBF_ARGUMENT. - ARGUMENTS - handle CBF handle. compression Compression method to use. - binary_id Integer binary identifier. array Pointer to the - source array. elsize Size in bytes of each source array - element. elsigned Set to non-0 if the source array elements are - signed. elements: The number of elements in the array. - RETURN VALUE - Returns an error code on failure or 0 for success. - SEE ALSO + cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf + set *ndimslow and *ndimfast to the slow and fast dimensions of the + image array for element number element_number. If the array is + 1-dimensional, *ndimslow will be set to the array size and *ndimfast + will be set to 1. If the array is 3-dimensional an error code will be + returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and + cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the + slowest, next fastest and fastest dimensions, respectively, of the 3D + image array for element number element_number. If the array is + 1-dimensional, *ndimslow will be set to the array size and *ndimmid + and """ - return _pycbf.cbf_handle_struct_set_integerarray_wdims(self, compression, binary_id, data, elsize, elsigned, elements, bo, dimfast, dimmid, dimslow, padding) + return _pycbf.cbf_handle_struct_get_image_size_fs(self, element_number) + + def get_image_size_sf(self, element_number): + r""" + + Returns : size_t ndimslow,size_t ndimfast + *args : Integer element_number + + C prototype: int cbf_get_image_size_sf (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + size_t *ndimslow, size_t *ndimfast); + CBFLib documentation: + DESCRIPTION + cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf + set *ndimslow and *ndimfast to the slow and fast dimensions of the + image array for element number element_number. If the array is + 1-dimensional, *ndimslow will be set to the array size and *ndimfast + will be set to 1. If the array is 3-dimensional an error code will be + returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and + cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the + slowest, next fastest and fastest dimensions, respectively, of the 3D + image array for element number element_number. If the array is + 1-dimensional, *ndimslow will be set to the array size and *ndimmid + and - def set_integration_time(self, time): """ + return _pycbf.cbf_handle_struct_get_image_size_sf(self, element_number) - Returns : - *args : Float time + def get_3d_image_size(self, element_number): + r""" - C prototype: int cbf_set_integration_time (cbf_handle handle, - unsigned int reserved, double time); + Returns : size_t ndimslow,size_t ndimmid,size_t ndimfast + *args : Integer element_number + + C prototype: int cbf_get_3d_image_size (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + size_t *ndimslow, size_t *ndimmid, size_t *ndimfast); CBFLib documentation: DESCRIPTION - cbf_set_integration_time sets the integration time in seconds to the - value specified by time. The parameter reserved is presently unused - and should be set to 0. - ARGUMENTS - handle CBF handle. reserved Unused. Any value - other than 0 is invalid. time Integration time in seconds. - RETURN VALUE - Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf + set *ndimslow and *ndimfast to the slow and fast dimensions of the + image array for element number element_number. If the array is + 1-dimensional, *ndimslow will be set to the array size and *ndimfast + will be set to 1. If the array is 3-dimensional an error code will be + returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and + cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the + slowest, next fastest and fastest dimensions, respectively, of the 3D + image array for element number element_number. If the array is + 1-dimensional, *ndimslow will be set to the array size and *ndimmid + and """ - return _pycbf.cbf_handle_struct_set_integration_time(self, time) + return _pycbf.cbf_handle_struct_get_3d_image_size(self, element_number) + def get_3d_image_size_fs(self, element_number): + r"""get_3d_image_size_fs(cbf_handle_struct self, unsigned int element_number)""" + return _pycbf.cbf_handle_struct_get_3d_image_size_fs(self, element_number) - def set_axis_setting(self, axis_id, start, increment): - """ + def get_3d_image_size_sf(self, element_number): + r""" - Returns : - *args : String axis_id,Float start,Float increment + Returns : size_t ndimslow,size_t ndimmid,size_t ndimfast + *args : Integer element_number - C prototype: int cbf_set_axis_setting (cbf_handle handle, - unsigned int reserved, const char *axis_id, double start, - double increment); + C prototype: int cbf_get_3d_image_size_sf (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + size_t *ndimslow, size_t *ndimmid, size_t *ndimfast); CBFLib documentation: DESCRIPTION - cbf_set_axis_setting sets the starting and increment values of the - axis axis_id to start and increment. - The parameter reserved is presently unused and should be set to 0. - ARGUMENTS - handle CBF handle. reserved Unused. Any value other than 0 is - invalid. axis_id Axis id. start Start value. increment - Increment value. - RETURN VALUE - Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf + set *ndimslow and *ndimfast to the slow and fast dimensions of the + image array for element number element_number. If the array is + 1-dimensional, *ndimslow will be set to the array size and *ndimfast + will be set to 1. If the array is 3-dimensional an error code will be + returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and + cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the + slowest, next fastest and fastest dimensions, respectively, of the 3D + image array for element number element_number. If the array is + 1-dimensional, *ndimslow will be set to the array size and *ndimmid + and """ - return _pycbf.cbf_handle_struct_set_axis_setting(self, axis_id, start, increment) + return _pycbf.cbf_handle_struct_get_3d_image_size_sf(self, element_number) + + def get_image_as_string(self, element_number, elsize, elsign, ndimslow, ndimfast): + r""" + Returns : (Binary)String + *args : int element_number,int elsize,int elsign,int ndimslow,int ndimfast + + C prototype: int cbf_get_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, + int elsign, size_t ndimslow, size_t ndimfast); + + CBFLib documentation: + DESCRIPTION + cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image + array for element number element_number into an array. The array + consists of ndimslow *ndimfast elements of elsize bytes each, + starting at array. The elements are signed if elsign is non-0 and + unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and + cbf_get_real_image_sf read the image array of IEEE doubles or floats + for element number element_number into an array. A real array is + always signed. cbf_get_3d_image, cbf_get_3d_image_fs and + cbf_get_3d_image_sf read the 3D image array for element number + element_number into an array. The array consists of ndimslow *ndimmid + *ndimfast elements of elsize bytes each, starting at array. The + elements are signed if elsign is non-0 and unsigned otherwise. + cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or + floats for element number element_number into an array. A real array + is always signed. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + The structure of the array as a 1-, 2- or 3-dimensional array should + agree with the structure of the array given in the + ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, + ndimslow should be the array size and ndimfast and, for the 3D calls, + ndimmid, should be set to 1 both in the call and in the imgCIF data + being processed. If the array is 2-dimensional and a 3D call is used, + ndimslow and ndimmid should be the - def get_real_image_as_string(self, element_number, elsize, ndimslow, ndimfast): """ + return _pycbf.cbf_handle_struct_get_image_as_string(self, element_number, elsize, elsign, ndimslow, ndimfast) + + def get_image_fs_as_string(self, element_number, elsize, elsign, ndimfast, ndimslow): + r""" Returns : (Binary)String - *args : int element_number,int elsize,int ndimslow,int ndimfast + *args : int element_number,int elsize,int elsign,int ndimfast,int ndimslow - C prototype: int cbf_get_real_image (cbf_handle handle, unsigned int reserved, - unsigned int element_number, void *array, size_t elsize, - size_t ndimslow, size_t ndimfast); + C prototype: int cbf_get_image_fs (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, + int elsign, size_t ndimfast, size_t ndimslow); CBFLib documentation: DESCRIPTION @@ -6420,85 +6020,102 @@ def get_real_image_as_string(self, element_number, elsize, ndimslow, ndimfast): ndimslow and ndimmid should be the """ - return _pycbf.cbf_handle_struct_get_real_image_as_string(self, element_number, elsize, ndimslow, ndimfast) + return _pycbf.cbf_handle_struct_get_image_fs_as_string(self, element_number, elsize, elsign, ndimfast, ndimslow) + def get_image_sf_as_string(self, element_number, elsize, elsign, ndimslow, ndimfast): + r""" + + Returns : (Binary)String + *args : int element_number,int elsize,int elsign,int ndimslow,int ndimfast + + C prototype: int cbf_get_image_sf (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, + int elsign, size_t ndimslow, size_t ndimfast); + + CBFLib documentation: + DESCRIPTION + cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image + array for element number element_number into an array. The array + consists of ndimslow *ndimfast elements of elsize bytes each, + starting at array. The elements are signed if elsign is non-0 and + unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and + cbf_get_real_image_sf read the image array of IEEE doubles or floats + for element number element_number into an array. A real array is + always signed. cbf_get_3d_image, cbf_get_3d_image_fs and + cbf_get_3d_image_sf read the 3D image array for element number + element_number into an array. The array consists of ndimslow *ndimmid + *ndimfast elements of elsize bytes each, starting at array. The + elements are signed if elsign is non-0 and unsigned otherwise. + cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or + floats for element number element_number into an array. A real array + is always signed. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + The structure of the array as a 1-, 2- or 3-dimensional array should + agree with the structure of the array given in the + ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, + ndimslow should be the array size and ndimfast and, for the 3D calls, + ndimmid, should be set to 1 both in the call and in the imgCIF data + being processed. If the array is 2-dimensional and a 3D call is used, + ndimslow and ndimmid should be the - def get_axis_ancestor(self, axis_id, ancestor_index): """ + return _pycbf.cbf_handle_struct_get_image_sf_as_string(self, element_number, elsize, elsign, ndimslow, ndimfast) - Returns : String - *args : String axis_id,Integer ancestor_index + def get_real_image_as_string(self, element_number, elsize, ndimslow, ndimfast): + r""" - C prototype: int cbf_get_axis_ancestor (cbf_handle handle, - const char *axis_id, const unsigned int ancestor_index, - const char * *ancestor); + Returns : (Binary)String + *args : int element_number,int elsize,int ndimslow,int ndimfast + + C prototype: int cbf_get_real_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, + size_t ndimslow, size_t ndimfast); CBFLib documentation: DESCRIPTION - cbf_count_axis_ancestors sets ancestors to the number of ancestors of - axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor - axis of index ancestor_index of axis axis_id, starting with axis_id - for ancestor_index 0. - cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of - axis_id or to ". " if there is no such ancestor. - cbf_get_axis_equipment sets *equipment to the equipment of axis_id or - to ". " if there is no such equipment. - cbf_get_axis_equipment_component sets *equipment_component to the - equipment_component of axis_id or to ". " if there is no such - equipment_component. - cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the - components of the ofset of axis_id. - cbf_get_axis_rotation sets rotation to the rotation of axis_id or to - 0 if there is no such rotation. cbf_get_axis_rotation_axis sets - *rotation_axis to the rotation_axis of axis_id or to ". " if there - is no such rotation_axis. - cbf_get_axis_setting sets *start and *increment to the corresponding - values of the axis axis_id. Any of the destination pointers may be - NULL. - cbf_get_axis_type sets axis_type to the type of axis_id. - cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the - components of the vector of axis_id. - The parameter reserved is presently unused and should be set to 0. - ARGUMENTS - handle CBF handle. reserved Unused. Any - value other than 0 is invalid. axis_id Axis id. - ancestor_index Integer index of the desired ancestor, starting - with 0 for the current axis_id. ancestor Pointer to - destination ancestor name pointer. depends_on Pointer to - destination depends_on name pointer. equipment Pointer to - destination equipment name pointer. equipment_component Pointer to - destination equipment_component name pointer. offset1 - Pointer to destination first offset component value. offset2 - Pointer to destination second offset component value. offset3 - Pointer to destination third offset component value. - rotation Pointer to destination rotation value. - rotation_axis Pointer to destination rotation_axisn name - pointer. start Pointer to the destination start - value. increment Pointer to the destination increment - value. type Pointer to destination axis type of type - . vector1 Pointer to destination first vector component - value. vector2 Pointer to destination second vector - component value. vector3 Pointer to destination third - vector component value. - RETURN VALUE - Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image + array for element number element_number into an array. The array + consists of ndimslow *ndimfast elements of elsize bytes each, + starting at array. The elements are signed if elsign is non-0 and + unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and + cbf_get_real_image_sf read the image array of IEEE doubles or floats + for element number element_number into an array. A real array is + always signed. cbf_get_3d_image, cbf_get_3d_image_fs and + cbf_get_3d_image_sf read the 3D image array for element number + element_number into an array. The array consists of ndimslow *ndimmid + *ndimfast elements of elsize bytes each, starting at array. The + elements are signed if elsign is non-0 and unsigned otherwise. + cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or + floats for element number element_number into an array. A real array + is always signed. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + The structure of the array as a 1-, 2- or 3-dimensional array should + agree with the structure of the array given in the + ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, + ndimslow should be the array size and ndimfast and, for the 3D calls, + ndimmid, should be set to 1 both in the call and in the imgCIF data + being processed. If the array is 2-dimensional and a 3D call is used, + ndimslow and ndimmid should be the """ - return _pycbf.cbf_handle_struct_get_axis_ancestor(self, axis_id, ancestor_index) - + return _pycbf.cbf_handle_struct_get_real_image_as_string(self, element_number, elsize, ndimslow, ndimfast) - def get_3d_image_sf_as_string(self, element_number, elsize, elsign, ndimfast, ndimmid, ndimslow): - """ + def get_real_image_fs_as_string(self, element_number, elsize, ndimfast, ndimslow): + r""" Returns : (Binary)String - *args : int element_number,int elsize,int elsign,int ndimslow,int ndimmid, - int ndimfast + *args : int element_number,int elsize,int ndimfast,int ndimslow - C prototype: int cbf_get_3d_image_sf (cbf_handle handle, + C prototype: int cbf_get_real_image_fs (cbf_handle handle, unsigned int reserved, unsigned int element_number, - void *array, size_t elsize, int elsign, size_t ndimslow, - size_t ndimmid, size_t ndimfast); + void *array, size_t elsize, size_t ndimfast, + size_t ndimslow); CBFLib documentation: DESCRIPTION @@ -6530,473 +6147,467 @@ def get_3d_image_sf_as_string(self, element_number, elsize, elsign, ndimfast, nd ndimslow and ndimmid should be the """ - return _pycbf.cbf_handle_struct_get_3d_image_sf_as_string(self, element_number, elsize, elsign, ndimfast, ndimmid, ndimslow) - + return _pycbf.cbf_handle_struct_get_real_image_fs_as_string(self, element_number, elsize, ndimfast, ndimslow) - def set_real_image_fs(self, element_number, compression, data, elsize, ndimfast, ndimslow): - """ + def get_real_image_sf_as_string(self, element_number, elsize, ndimslow, ndimfast): + r""" - Returns : - *args : int element_number,int compression,(binary) String data,int elsize, - int dimfast,int dimslow + Returns : (Binary)String + *args : int element_number,int elsize,int ndimslow,int ndimfast - C prototype: int cbf_set_real_image_fs(cbf_handle handle, + C prototype: int cbf_get_real_image_sf (cbf_handle handle, unsigned int reserved, unsigned int element_number, - unsigned int compression, void *array,size_t elsize, - size_t ndimfast, size_t ndimslow); + void *array, size_t elsize, size_t ndimslow, + size_t ndimfast); CBFLib documentation: DESCRIPTION - cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image - array for element number element_number. The array consists of - ndimfast *ndimslow elements of elsize bytes each, starting at array. - The elements are signed if elsign is non-zero and unsigned otherwise. - cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf - write the image array for element number element_number. The array - consists of ndimfast *ndimslow IEEE double or float elements of - elsize bytes each, starting at array. cbf_set_3d_image, - cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array - for element number element_number. The array consists of ndimfast - *ndimmid *ndimslow elements of elsize bytes each, starting at array. - The elements are signed if elsign is non-0 and unsigned otherwise. - cbf_set_real_3d_image, cbf_set_real_3d_image_fs and - cbf_set_real_3d_image_sf writes the 3D image array for element number - element_number. The array consists of ndimfast *ndimmid *ndimslow - IEEE double or float elements of elsize bytes each, starting at - array. + cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image + array for element number element_number into an array. The array + consists of ndimslow *ndimfast elements of elsize bytes each, + starting at array. The elements are signed if elsign is non-0 and + unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and + cbf_get_real_image_sf read the image array of IEEE doubles or floats + for element number element_number into an array. A real array is + always signed. cbf_get_3d_image, cbf_get_3d_image_fs and + cbf_get_3d_image_sf read the 3D image array for element number + element_number into an array. The array consists of ndimslow *ndimmid + *ndimfast elements of elsize bytes each, starting at array. The + elements are signed if elsign is non-0 and unsigned otherwise. + cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or + floats for element number element_number into an array. A real array + is always signed. The _fs calls give the dimensions in a fast-to-slow order. The calls with no suffix and the calls _sf calls give the dimensions in slow-to-fast order - If the array is 1-dimensional, ndimslow should be the array size and - ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the - array is 2-dimensional and the 3D calls are used, ndimslow and - ndimmid should be used for the array dimensions and ndimfast should - be set to 1. - The array will be compressed using the compression scheme specifed by - compression. Currently, the available schemes are: - CBF_CANONICAL Canonical-code compression (section 3.3.1) - CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple - "nibble_offset " compression. CBF_NONE No compression. - The values compressed are limited to 64 bits. If any element in the - array is larger than 64 bits, the value compressed is the nearest - 64-bit value. - Currently, the source array must consist of chars, shorts or ints - (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for - cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof - (int), sizeof(double) or sizeof(float), the function returns - CBF_ARGUMENT. - The parameter reserved is presently unused and should be set to 0. - ARGUMENTS - handle CBF handle. reserved Unused. Any value other - than 0 is invalid. element_number The number of the detector - element counting from 0 by order of appearance in the - "diffrn_data_frame " category. compression Compression type. - array Pointer to the image array. elsize Size in - bytes of each image array element. elsigned Set to non-0 if - the image array elements are signed. ndimslow Slowest array - dimension. ndimmid Second slowest array dimension. ndimfast - Fastest array dimension. - RETURN VALUE - Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- - - """ - return _pycbf.cbf_handle_struct_set_real_image_fs(self, element_number, compression, data, elsize, ndimfast, ndimslow) - - - def get_overload(self, element_number): - """ - - Returns : Float overload - *args : Integer element_number - - C prototype: int cbf_get_overload (cbf_handle handle, - unsigned int element_number, double *overload); - - CBFLib documentation: - DESCRIPTION - cbf_get_overload sets *overload to the overload value for element - number element_number. - ARGUMENTS - handle CBF handle. element_number The number of the - detector element counting from 0 by order of appearance in the - "diffrn_data_frame " category. overload Pointer to the - destination overload. - RETURN VALUE - Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- - - """ - return _pycbf.cbf_handle_struct_get_overload(self, element_number) - - - def get_wavelength(self): - """ - - Returns : double - *args : - - C prototype: int cbf_get_wavelength (cbf_handle handle, double *wavelength); - - CBFLib documentation: - DESCRIPTION - cbf_get_wavelength sets *wavelength to the current wavelength in AA. - ARGUMENTS - handle CBF handle. wavelength Pointer to the destination. - RETURN VALUE - Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- - - """ - return _pycbf.cbf_handle_struct_get_wavelength(self) - - - def next_datablock(self): - """ - - Returns : - *args : - - C prototype: int cbf_next_datablock (cbf_handle handle); - - CBFLib documentation: - DESCRIPTION - cbf_next_datablock makes the data block following the current data - block the current data block. - If there are no more data blocks, the function returns CBF_NOTFOUND. - The current category becomes undefined. - ARGUMENTS - handle CBF handle. - RETURN VALUE - Returns an error code on failure or 0 for success. - SEE ALSO - - """ - return _pycbf.cbf_handle_struct_next_datablock(self) - + The structure of the array as a 1-, 2- or 3-dimensional array should + agree with the structure of the array given in the + ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, + ndimslow should be the array size and ndimfast and, for the 3D calls, + ndimmid, should be set to 1 both in the call and in the imgCIF data + being processed. If the array is 2-dimensional and a 3D call is used, + ndimslow and ndimmid should be the - def get_realarrayparameters_wdims(self): """ + return _pycbf.cbf_handle_struct_get_real_image_sf_as_string(self, element_number, elsize, ndimslow, ndimfast) - Returns : int compression,int binary_id,int elsize,int elements,char **bo, - int *bolen,int dimfast,int dimmid,int dimslow,int padding - *args : - - C prototype: int cbf_get_realarrayparameters_wdims (cbf_handle handle, - unsigned int *compression, int *binary_id, size_t *elsize, - size_t *elements, const char **byteorder, size_t *dimfast, - size_t *dimmid, size_t *dimslow, size_t *padding); - - CBFLib documentation: - DESCRIPTION - cbf_get_integerarrayparameters sets *compression, *binary_id, - *elsize, *elsigned, *elunsigned, *elements, *minelement and - *maxelement to values read from the binary value of the item at the - current column and row. This provides all the arguments needed for a - subsequent call to cbf_set_integerarray, if a copy of the array is to - be made into another CIF or CBF. cbf_get_realarrayparameters sets - *compression, *binary_id, *elsize, *elements to values read from the - binary value of the item at the current column and row. This provides - all the arguments needed for a subsequent call to cbf_set_realarray, - if a copy of the arry is to be made into another CIF or CBF. - The variants cbf_get_integerarrayparameters_wdims, - cbf_get_integerarrayparameters_wdims_fs, - cbf_get_integerarrayparameters_wdims_sf, - cbf_get_realarrayparameters_wdims, - cbf_get_realarrayparameters_wdims_fs, - cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, - *dimmid, *dimslow, and *padding as well, providing the additional - parameters needed for a subsequent call to cbf_set_integerarray_wdims - or cbf_set_realarray_wdims. - The value returned in *byteorder is a pointer either to the string - "little_endian " or to the string "big_endian ". This should be - the byte order of the data, not necessarily of the host machine. No - attempt should be made to modify this string. At this time only - "little_endian " will be returned. - The values returned in *dimfast, *dimmid and *dimslow are the sizes - of the fastest changing, second fastest changing and third fastest - changing dimensions of the array, if specified, or zero, if not - specified. - The value returned in *padding is the size of the post-data padding, - if any and if specified in the data header. The value is given as a - count of octets. - If the value is not binary, the function returns CBF_ASCII. - ARGUMENTS - handle CBF handle. compression Compression method used. - elsize Size in bytes of each array element. binary_id - Pointer to the destination integer binary identifier. elsigned - Pointer to an integer. Set to 1 if the elements can be read as signed - integers. elunsigned Pointer to an integer. Set to 1 if the - elements can be read as unsigned integers. elements Pointer to - the destination number of elements. minelement Pointer to the - destination smallest element. maxelement Pointer to the - destination largest element. byteorder Pointer to the destination - byte order. dimfast Pointer to the destination fastest - dimension. dimmid Pointer to the destination second fastest - dimension. dimslow Pointer to the destination third fastest - dimension. padding Pointer to the destination padding size. - RETURN VALUE - Returns an error code on failure or 0 for success. - SEE ALSO + def get_3d_image_as_string(self, element_number, elsize, elsign, ndimfast, ndimmid, ndimslow): + r""" - """ - return _pycbf.cbf_handle_struct_get_realarrayparameters_wdims(self) + Returns : (Binary)String + *args : int element_number,int elsize,int elsign,int ndimslow,int ndimmid, + int ndimfast + C prototype: int cbf_get_3d_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, void *array, size_t elsize, + int elsign, size_t ndimslow, size_t ndimmid, + size_t ndimfast); + + CBFLib documentation: + DESCRIPTION + cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image + array for element number element_number into an array. The array + consists of ndimslow *ndimfast elements of elsize bytes each, + starting at array. The elements are signed if elsign is non-0 and + unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and + cbf_get_real_image_sf read the image array of IEEE doubles or floats + for element number element_number into an array. A real array is + always signed. cbf_get_3d_image, cbf_get_3d_image_fs and + cbf_get_3d_image_sf read the 3D image array for element number + element_number into an array. The array consists of ndimslow *ndimmid + *ndimfast elements of elsize bytes each, starting at array. The + elements are signed if elsign is non-0 and unsigned otherwise. + cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or + floats for element number element_number into an array. A real array + is always signed. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + The structure of the array as a 1-, 2- or 3-dimensional array should + agree with the structure of the array given in the + ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, + ndimslow should be the array size and ndimfast and, for the 3D calls, + ndimmid, should be set to 1 both in the call and in the imgCIF data + being processed. If the array is 2-dimensional and a 3D call is used, + ndimslow and ndimmid should be the - def set_orientation_matrix(self, m0, m1, m2, m3, m4, m5, m6, m7, m8): """ + return _pycbf.cbf_handle_struct_get_3d_image_as_string(self, element_number, elsize, elsign, ndimfast, ndimmid, ndimslow) - Returns : - *args : Float matrix_0,Float matrix_1,Float matrix_2,Float matrix_3, - Float matrix_4,Float matrix_5,Float matrix_6,Float matrix_7, - Float matrix_8 + def get_3d_image_fs_as_string(self, element_number, elsize, elsign, ndimfast, ndimmid, ndimslow): + r""" - C prototype: int cbf_set_orientation_matrix (cbf_handle handle, - double ub_matrix[9]); + Returns : (Binary)String + *args : int element_number,int elsize,int elsign,int ndimfast,int ndimmid, + int ndimslow + + C prototype: int cbf_get_3d_image_fs (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + void *array, size_t elsize, int elsign, size_t ndimfast, + size_t ndimmid, size_t ndimslow); CBFLib documentation: DESCRIPTION - cbf_get_orientation_matrix sets ub_matrix to point to the array of - orientation matrix entries in the "diffrn " category in the order - of columns: - "UB[1][1] " "UB[1][2] " "UB[1][3] " "UB[2][1] " - "UB[2][2] " "UB[2][3] " "UB[3][1] " "UB[3][2] " - "UB[3][3] " - cbf_set_orientation_matrix sets the values in the "diffrn " - category to the values pointed to by ub_matrix. - ARGUMENTS - handle CBF handle. ubmatric Source or destination array of 9 - doubles giving the orientation matrix parameters. - RETURN VALUE - Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image + array for element number element_number into an array. The array + consists of ndimslow *ndimfast elements of elsize bytes each, + starting at array. The elements are signed if elsign is non-0 and + unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and + cbf_get_real_image_sf read the image array of IEEE doubles or floats + for element number element_number into an array. A real array is + always signed. cbf_get_3d_image, cbf_get_3d_image_fs and + cbf_get_3d_image_sf read the 3D image array for element number + element_number into an array. The array consists of ndimslow *ndimmid + *ndimfast elements of elsize bytes each, starting at array. The + elements are signed if elsign is non-0 and unsigned otherwise. + cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or + floats for element number element_number into an array. A real array + is always signed. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + The structure of the array as a 1-, 2- or 3-dimensional array should + agree with the structure of the array given in the + ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, + ndimslow should be the array size and ndimfast and, for the 3D calls, + ndimmid, should be set to 1 both in the call and in the imgCIF data + being processed. If the array is 2-dimensional and a 3D call is used, + ndimslow and ndimmid should be the """ - return _pycbf.cbf_handle_struct_set_orientation_matrix(self, m0, m1, m2, m3, m4, m5, m6, m7, m8) - + return _pycbf.cbf_handle_struct_get_3d_image_fs_as_string(self, element_number, elsize, elsign, ndimfast, ndimmid, ndimslow) - def new_category(self, arg): - """ + def get_3d_image_sf_as_string(self, element_number, elsize, elsign, ndimfast, ndimmid, ndimslow): + r""" - Returns : string - *args : + Returns : (Binary)String + *args : int element_number,int elsize,int elsign,int ndimslow,int ndimmid, + int ndimfast - C prototype: int cbf_new_category (cbf_handle handle, - const char *categoryname); + C prototype: int cbf_get_3d_image_sf (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + void *array, size_t elsize, int elsign, size_t ndimslow, + size_t ndimmid, size_t ndimfast); CBFLib documentation: DESCRIPTION - cbf_new_category creates a new category in the current data block - with name categoryname and makes it the current category. - If a category with this name already exists, the existing category - becomes the current category. - ARGUMENTS - handle CBF handle. categoryname The name of the new - category. - RETURN VALUE - Returns an error code on failure or 0 for success. - SEE ALSO + cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image + array for element number element_number into an array. The array + consists of ndimslow *ndimfast elements of elsize bytes each, + starting at array. The elements are signed if elsign is non-0 and + unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and + cbf_get_real_image_sf read the image array of IEEE doubles or floats + for element number element_number into an array. A real array is + always signed. cbf_get_3d_image, cbf_get_3d_image_fs and + cbf_get_3d_image_sf read the 3D image array for element number + element_number into an array. The array consists of ndimslow *ndimmid + *ndimfast elements of elsize bytes each, starting at array. The + elements are signed if elsign is non-0 and unsigned otherwise. + cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or + floats for element number element_number into an array. A real array + is always signed. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + The structure of the array as a 1-, 2- or 3-dimensional array should + agree with the structure of the array given in the + ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, + ndimslow should be the array size and ndimfast and, for the 3D calls, + ndimmid, should be set to 1 both in the call and in the imgCIF data + being processed. If the array is 2-dimensional and a 3D call is used, + ndimslow and ndimmid should be the """ - return _pycbf.cbf_handle_struct_new_category(self, arg) - + return _pycbf.cbf_handle_struct_get_3d_image_sf_as_string(self, element_number, elsize, elsign, ndimfast, ndimmid, ndimslow) - def set_gain(self, element_number, gain, gain_esd): - """ + def get_real_3d_image_as_string(self, element_number, elsize, ndimslow, ndimmid, ndimfast): + r""" - Returns : - *args : Float gain,Float gain_esd + Returns : (Binary)String + *args : int element_number,int elsize,int ndimslow,int ndimmid,int ndimfast - C prototype: int cbf_set_gain (cbf_handle handle, unsigned int element_number, - double gain, double gain_esd); + C prototype: int cbf_get_real_3d_image (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + void *array, size_t elsize, size_t ndimslow, + size_t ndimmid, size_t ndimfast); CBFLib documentation: DESCRIPTION - cbf_set_gain sets the gain of element number element_number to the - values specified by gain and gain_esd. - ARGUMENTS - handle CBF handle. element_number The number of the - detector element counting from 0 by order of appearance in the - "diffrn_data_frame " category. gain New gain value. - gain_esd New gain_esd value. - RETURN VALUE - Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image + array for element number element_number into an array. The array + consists of ndimslow *ndimfast elements of elsize bytes each, + starting at array. The elements are signed if elsign is non-0 and + unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and + cbf_get_real_image_sf read the image array of IEEE doubles or floats + for element number element_number into an array. A real array is + always signed. cbf_get_3d_image, cbf_get_3d_image_fs and + cbf_get_3d_image_sf read the 3D image array for element number + element_number into an array. The array consists of ndimslow *ndimmid + *ndimfast elements of elsize bytes each, starting at array. The + elements are signed if elsign is non-0 and unsigned otherwise. + cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or + floats for element number element_number into an array. A real array + is always signed. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + The structure of the array as a 1-, 2- or 3-dimensional array should + agree with the structure of the array given in the + ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, + ndimslow should be the array size and ndimfast and, for the 3D calls, + ndimmid, should be set to 1 both in the call and in the imgCIF data + being processed. If the array is 2-dimensional and a 3D call is used, + ndimslow and ndimmid should be the """ - return _pycbf.cbf_handle_struct_set_gain(self, element_number, gain, gain_esd) - + return _pycbf.cbf_handle_struct_get_real_3d_image_as_string(self, element_number, elsize, ndimslow, ndimmid, ndimfast) - def find_column(self, arg): - """ + def get_real_3d_image_fs_as_string(self, element_number, elsize, ndimfast, ndimmid, ndimslow): + r""" - Returns : string - *args : + Returns : (Binary)String + *args : int element_number,int elsize,int ndimfast,int ndimmid,int ndimslow - C prototype: int cbf_find_column (cbf_handle handle, const char *columnname); + C prototype: int cbf_get_real_3d_image_fs (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + void *array, size_t elsize, size_t ndimfast, + size_t ndimmid, size_t ndimslow); CBFLib documentation: DESCRIPTION - cbf_find_column makes the columns in the current category with name - columnname the current column. - The comparison is case-insensitive. - If the column does not exist, the function returns CBF_NOTFOUND. - The current row is not affected. - ARGUMENTS - handle CBF handle. columnname The name of column to find. - RETURN VALUE - Returns an error code on failure or 0 for success. - SEE ALSO + cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image + array for element number element_number into an array. The array + consists of ndimslow *ndimfast elements of elsize bytes each, + starting at array. The elements are signed if elsign is non-0 and + unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and + cbf_get_real_image_sf read the image array of IEEE doubles or floats + for element number element_number into an array. A real array is + always signed. cbf_get_3d_image, cbf_get_3d_image_fs and + cbf_get_3d_image_sf read the 3D image array for element number + element_number into an array. The array consists of ndimslow *ndimmid + *ndimfast elements of elsize bytes each, starting at array. The + elements are signed if elsign is non-0 and unsigned otherwise. + cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or + floats for element number element_number into an array. A real array + is always signed. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + The structure of the array as a 1-, 2- or 3-dimensional array should + agree with the structure of the array given in the + ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, + ndimslow should be the array size and ndimfast and, for the 3D calls, + ndimmid, should be set to 1 both in the call and in the imgCIF data + being processed. If the array is 2-dimensional and a 3D call is used, + ndimslow and ndimmid should be the """ - return _pycbf.cbf_handle_struct_find_column(self, arg) - + return _pycbf.cbf_handle_struct_get_real_3d_image_fs_as_string(self, element_number, elsize, ndimfast, ndimmid, ndimslow) - def remove_category(self): - """ + def get_real_3d_image_sf_as_string(self, element_number, elsize, ndimslow, ndimmid, ndimfast): + r""" - Returns : - *args : + Returns : (Binary)String + *args : int element_number,int elsize,int ndimslow,int ndimmid,int ndimfast - C prototype: int cbf_remove_category (cbf_handle handle); + C prototype: int cbf_get_real_3d_image_sf (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + void *array, size_t elsize, size_t ndimslow, + size_t ndimmid, size_t ndimfast); CBFLib documentation: DESCRIPTION - cbf_remove_category deletes the current category. - The current category becomes undefined. - ARGUMENTS - handle CBF handle. - RETURN VALUE - Returns an error code on failure or 0 for success. - SEE ALSO + cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image + array for element number element_number into an array. The array + consists of ndimslow *ndimfast elements of elsize bytes each, + starting at array. The elements are signed if elsign is non-0 and + unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and + cbf_get_real_image_sf read the image array of IEEE doubles or floats + for element number element_number into an array. A real array is + always signed. cbf_get_3d_image, cbf_get_3d_image_fs and + cbf_get_3d_image_sf read the 3D image array for element number + element_number into an array. The array consists of ndimslow *ndimmid + *ndimfast elements of elsize bytes each, starting at array. The + elements are signed if elsign is non-0 and unsigned otherwise. + cbf_get_real_3d_image, cbf_get_real_3d_image_fs, + cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or + floats for element number element_number into an array. A real array + is always signed. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + The structure of the array as a 1-, 2- or 3-dimensional array should + agree with the structure of the array given in the + ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, + ndimslow should be the array size and ndimfast and, for the 3D calls, + ndimmid, should be set to 1 both in the call and in the imgCIF data + being processed. If the array is 2-dimensional and a 3D call is used, + ndimslow and ndimmid should be the """ - return _pycbf.cbf_handle_struct_remove_category(self) - + return _pycbf.cbf_handle_struct_get_real_3d_image_sf_as_string(self, element_number, elsize, ndimslow, ndimmid, ndimfast) - def get_integerarrayparameters_wdims_sf(self): - """ + def set_image(self, element_number, compression, data, elsize, elsign, ndimslow, ndimfast): + r""" - Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, - int elements,int minelement,int maxelement,char **bo,int *bolen, - int dimslow,int dimmid,int dimfast,int padding - *args : + Returns : + *args : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimslow,int dimfast - C prototype: int cbf_get_integerarrayparameters_wdims_sf (cbf_handle handle, - unsigned int *compression, int *binary_id, size_t *elsize, - int *elsigned, int *elunsigned, size_t *elements, - int *minelement, int *maxelement, const char **byteorder, - size_t *dimslow, size_t *dimmid, size_t *dimfast, - size_t *padding); + C prototype: int cbf_set_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array, size_t elsize, int elsign, size_t ndimslow, + size_t ndimfast); CBFLib documentation: DESCRIPTION - cbf_get_integerarrayparameters sets *compression, *binary_id, - *elsize, *elsigned, *elunsigned, *elements, *minelement and - *maxelement to values read from the binary value of the item at the - current column and row. This provides all the arguments needed for a - subsequent call to cbf_set_integerarray, if a copy of the array is to - be made into another CIF or CBF. cbf_get_realarrayparameters sets - *compression, *binary_id, *elsize, *elements to values read from the - binary value of the item at the current column and row. This provides - all the arguments needed for a subsequent call to cbf_set_realarray, - if a copy of the arry is to be made into another CIF or CBF. - The variants cbf_get_integerarrayparameters_wdims, - cbf_get_integerarrayparameters_wdims_fs, - cbf_get_integerarrayparameters_wdims_sf, - cbf_get_realarrayparameters_wdims, - cbf_get_realarrayparameters_wdims_fs, - cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, - *dimmid, *dimslow, and *padding as well, providing the additional - parameters needed for a subsequent call to cbf_set_integerarray_wdims - or cbf_set_realarray_wdims. - The value returned in *byteorder is a pointer either to the string - "little_endian " or to the string "big_endian ". This should be - the byte order of the data, not necessarily of the host machine. No - attempt should be made to modify this string. At this time only - "little_endian " will be returned. - The values returned in *dimfast, *dimmid and *dimslow are the sizes - of the fastest changing, second fastest changing and third fastest - changing dimensions of the array, if specified, or zero, if not - specified. - The value returned in *padding is the size of the post-data padding, - if any and if specified in the data header. The value is given as a - count of octets. - If the value is not binary, the function returns CBF_ASCII. + cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image + array for element number element_number. The array consists of + ndimfast *ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-zero and unsigned otherwise. + cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf + write the image array for element number element_number. The array + consists of ndimfast *ndimslow IEEE double or float elements of + elsize bytes each, starting at array. cbf_set_3d_image, + cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array + for element number element_number. The array consists of ndimfast + *ndimmid *ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-0 and unsigned otherwise. + cbf_set_real_3d_image, cbf_set_real_3d_image_fs and + cbf_set_real_3d_image_sf writes the 3D image array for element number + element_number. The array consists of ndimfast *ndimmid *ndimslow + IEEE double or float elements of elsize bytes each, starting at + array. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + If the array is 1-dimensional, ndimslow should be the array size and + ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the + array is 2-dimensional and the 3D calls are used, ndimslow and + ndimmid should be used for the array dimensions and ndimfast should + be set to 1. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for + cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof + (int), sizeof(double) or sizeof(float), the function returns + CBF_ARGUMENT. + The parameter reserved is presently unused and should be set to 0. ARGUMENTS - handle CBF handle. compression Compression method used. - elsize Size in bytes of each array element. binary_id - Pointer to the destination integer binary identifier. elsigned - Pointer to an integer. Set to 1 if the elements can be read as signed - integers. elunsigned Pointer to an integer. Set to 1 if the - elements can be read as unsigned integers. elements Pointer to - the destination number of elements. minelement Pointer to the - destination smallest element. maxelement Pointer to the - destination largest element. byteorder Pointer to the destination - byte order. dimfast Pointer to the destination fastest - dimension. dimmid Pointer to the destination second fastest - dimension. dimslow Pointer to the destination third fastest - dimension. padding Pointer to the destination padding size. + handle CBF handle. reserved Unused. Any value other + than 0 is invalid. element_number The number of the detector + element counting from 0 by order of appearance in the + "diffrn_data_frame " category. compression Compression type. + array Pointer to the image array. elsize Size in + bytes of each image array element. elsigned Set to non-0 if + the image array elements are signed. ndimslow Slowest array + dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_get_integerarrayparameters_wdims_sf(self) - + return _pycbf.cbf_handle_struct_set_image(self, element_number, compression, data, elsize, elsign, ndimslow, ndimfast) - def get_pixel_size(self, element_number, axis_number): - """ + def set_image_fs(self, element_number, compression, data, elsize, elsign, ndimfast, ndimslow): + r""" - Returns : Float pixel_size - *args : Int element_number,Int axis_number + Returns : + *args : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimfast,int dimslow - C prototype: int cbf_get_pixel_size (cbf_handle handle, - unsigned int element_number, int axis_number, - double *psize); + C prototype: int cbf_set_image_fs(cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array, size_t elsize, int elsign, size_t ndimfast, + size_t ndimslow); CBFLib documentation: DESCRIPTION - cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to - the double value in millimeters of the axis axis_number of the - detector element element_number. The axis_number is numbered from 1, - starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to - point to the double value in millimeters of the axis axis_number of - the detector element element_number. The axis_number is numbered from - 1, starting with the fastest axis. - If a negative axis number is given, the order of axes is reversed, so - that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the - fastest axis for cbf_get_pixel_size_sf. - If the pixel size is not given explcitly in the "array_element_size - " category, the function returns CBF_NOTFOUND. + cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image + array for element number element_number. The array consists of + ndimfast *ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-zero and unsigned otherwise. + cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf + write the image array for element number element_number. The array + consists of ndimfast *ndimslow IEEE double or float elements of + elsize bytes each, starting at array. cbf_set_3d_image, + cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array + for element number element_number. The array consists of ndimfast + *ndimmid *ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-0 and unsigned otherwise. + cbf_set_real_3d_image, cbf_set_real_3d_image_fs and + cbf_set_real_3d_image_sf writes the 3D image array for element number + element_number. The array consists of ndimfast *ndimmid *ndimslow + IEEE double or float elements of elsize bytes each, starting at + array. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + If the array is 1-dimensional, ndimslow should be the array size and + ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the + array is 2-dimensional and the 3D calls are used, ndimslow and + ndimmid should be used for the array dimensions and ndimfast should + be set to 1. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for + cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof + (int), sizeof(double) or sizeof(float), the function returns + CBF_ARGUMENT. + The parameter reserved is presently unused and should be set to 0. ARGUMENTS - handle CBF handle. element_number The number of the - detector element counting from 0 by order of appearance in the - "diffrn_data_frame " category. axis_number The number of the - axis, starting from 1 for the fastest for cbf_get_pixel_size and - cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. - psize Pointer to the destination pixel size. + handle CBF handle. reserved Unused. Any value other + than 0 is invalid. element_number The number of the detector + element counting from 0 by order of appearance in the + "diffrn_data_frame " category. compression Compression type. + array Pointer to the image array. elsize Size in + bytes of each image array element. elsigned Set to non-0 if + the image array elements are signed. ndimslow Slowest array + dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_get_pixel_size(self, element_number, axis_number) - + return _pycbf.cbf_handle_struct_set_image_fs(self, element_number, compression, data, elsize, elsign, ndimfast, ndimslow) - def set_real_image_sf(self, element_number, compression, data, elsize, ndimslow, ndimfast): - """ + def set_image_sf(self, element_number, compression, data, elsize, elsign, ndimslow, ndimfast): + r""" Returns : *args : int element_number,int compression,(binary) String data,int elsize, - int dimslow,int dimfast + int elsign,int dimslow,int dimfast - C prototype: int cbf_set_real_image_sf(cbf_handle handle, - unsigned int reserved, unsigned int element_number, - unsigned int compression, void *array,size_t elsize, - size_t ndimslow, size_t ndimfast); + C prototype: int cbf_set_image_sf(cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array, size_t elsize, int elsign, size_t ndimslow, + size_t ndimfast); CBFLib documentation: DESCRIPTION @@ -7056,311 +6667,379 @@ def set_real_image_sf(self, element_number, compression, data, elsize, ndimslow, ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_set_real_image_sf(self, element_number, compression, data, elsize, ndimslow, ndimfast) - - - def require_category(self, arg): - """ - - Returns : string - *args : - - C prototype: int cbf_require_category (cbf_handle handle, - const char *categoryname); - - CBFLib documentation: - DESCRIPTION - cbf_rewuire_category makes the category in the current data block - with name categoryname the current category, if it exists, or creates - the catagory if it does not exist. - The comparison is case-insensitive. - The current column and row become undefined. - ARGUMENTS - handle CBF handle. categoryname The name of the category to - find. - RETURN VALUE - Returns an error code on failure or 0 for success. - SEE ALSO - - """ - return _pycbf.cbf_handle_struct_require_category(self, arg) - - - def get_reciprocal_cell(self): - """ - - Returns : Float astar,Float bstar,Float cstar,Float alphastar,Float betastar, - Float gammastar - *args : - - C prototype: int cbf_get_reciprocal_cell (cbf_handle handle, double cell[6], - double cell_esd[6] ); - - CBFLib documentation: - DESCRIPTION - cbf_get_reciprocal_cell sets cell[0:2] to the double values of the - reciprocal cell edge lengths a*, b* and c* in AAngstroms-1, cell[3:5] - to the double values of the reciprocal cell angles a*, b* and g* in - degrees, cell_esd[0:2] to the double values of the estimated - strandard deviations of the reciprocal cell edge lengths a*, b* and - c* in AAngstroms-1, cell_esd[3:5] to the double values of the - estimated standard deviations of the the reciprocal cell angles a*, - b* and g* in degrees. - The values returned are retrieved from the first row of the "cell - " category. The value of "_cell.entry_id " is ignored. - cell or cell_esd may be NULL. - If cell is NULL, the reciprocal cell parameters are not retrieved. - If cell_esd is NULL, the reciprocal cell parameter esds are not - retrieved. - If the "cell " category is present, but some of the values are - missing, zeros are returned for the missing values. - ARGUMENTS - handle CBF handle. cell Pointer to the destination array of - 6 doubles for the reciprocal cell parameters. cell_esd Pointer to - the destination array of 6 doubles for the reciprocal cell parameter - esds. - RETURN VALUE - Returns an error code on failure or 0 for success. No errors is - returned for missing values if the "cell " category exists. - SEE ALSO - - """ - return _pycbf.cbf_handle_struct_get_reciprocal_cell(self) - - - def get_reciprocal_cell_esd(self): - """get_reciprocal_cell_esd(cbf_handle_struct self)""" - return _pycbf.cbf_handle_struct_get_reciprocal_cell_esd(self) - - - def get_3d_image_size(self, element_number): - """ - - Returns : size_t ndimslow,size_t ndimmid,size_t ndimfast - *args : Integer element_number - - C prototype: int cbf_get_3d_image_size (cbf_handle handle, - unsigned int reserved, unsigned int element_number, - size_t *ndimslow, size_t *ndimmid, size_t *ndimfast); - - CBFLib documentation: - DESCRIPTION - cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf - set *ndimslow and *ndimfast to the slow and fast dimensions of the - image array for element number element_number. If the array is - 1-dimensional, *ndimslow will be set to the array size and *ndimfast - will be set to 1. If the array is 3-dimensional an error code will be - returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and - cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the - slowest, next fastest and fastest dimensions, respectively, of the 3D - image array for element number element_number. If the array is - 1-dimensional, *ndimslow will be set to the array size and *ndimmid - and - - """ - return _pycbf.cbf_handle_struct_get_3d_image_size(self, element_number) - + return _pycbf.cbf_handle_struct_set_image_sf(self, element_number, compression, data, elsize, elsign, ndimslow, ndimfast) - def find_tag_root(self, tagname): - """ + def set_real_image(self, element_number, compression, data, elsize, ndimslow, ndimfast): + r""" - Returns : String tagroot - *args : String tagname + Returns : + *args : int element_number,int compression,(binary) String data,int elsize, + int dimslow,int dimfast - C prototype: int cbf_find_tag_root (cbf_handle handle, const char* tagname, - const char** tagroot); + C prototype: int cbf_set_real_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array,size_t elsize, size_t ndimslow, + size_t ndimfast); CBFLib documentation: DESCRIPTION - cbf_find_tag_root sets *tagroot to the root tag of which tagname is - an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in - the dictionary associated with handle, creating the dictionary if - necessary. cbf_require_tag_root sets *tagroot to the root tag of - which tagname is an alias, if there is one, or to the value of - tagname, if tagname is not an alias. - A returned tagroot string must not be modified in any way. + cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image + array for element number element_number. The array consists of + ndimfast *ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-zero and unsigned otherwise. + cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf + write the image array for element number element_number. The array + consists of ndimfast *ndimslow IEEE double or float elements of + elsize bytes each, starting at array. cbf_set_3d_image, + cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array + for element number element_number. The array consists of ndimfast + *ndimmid *ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-0 and unsigned otherwise. + cbf_set_real_3d_image, cbf_set_real_3d_image_fs and + cbf_set_real_3d_image_sf writes the 3D image array for element number + element_number. The array consists of ndimfast *ndimmid *ndimslow + IEEE double or float elements of elsize bytes each, starting at + array. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + If the array is 1-dimensional, ndimslow should be the array size and + ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the + array is 2-dimensional and the 3D calls are used, ndimslow and + ndimmid should be used for the array dimensions and ndimfast should + be set to 1. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for + cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof + (int), sizeof(double) or sizeof(float), the function returns + CBF_ARGUMENT. + The parameter reserved is presently unused and should be set to 0. ARGUMENTS - handle CBF handle. tagname tag name which may be an alias. - tagroot pointer to a returned tag root name. tagroot_in input - tag root name. + handle CBF handle. reserved Unused. Any value other + than 0 is invalid. element_number The number of the detector + element counting from 0 by order of appearance in the + "diffrn_data_frame " category. compression Compression type. + array Pointer to the image array. elsize Size in + bytes of each image array element. elsigned Set to non-0 if + the image array elements are signed. ndimslow Slowest array + dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_find_tag_root(self, tagname) - - - def require_category_root(self, categoryname): - """require_category_root(cbf_handle_struct self, char const * categoryname) -> char const *""" - return _pycbf.cbf_handle_struct_require_category_root(self, categoryname) - + return _pycbf.cbf_handle_struct_set_real_image(self, element_number, compression, data, elsize, ndimslow, ndimfast) - def set_realarray_wdims_sf(self, compression, binary_id, data, elsize, elements, bo, dimslow, dimmid, dimfast, padding): - """ + def set_real_image_fs(self, element_number, compression, data, elsize, ndimfast, ndimslow): + r""" Returns : - *args : int compression,int binary_id,(binary) String data,int elsize, - int elements,String byteorder,int dimslow,int dimmid,int dimfast, - int padding + *args : int element_number,int compression,(binary) String data,int elsize, + int dimfast,int dimslow - C prototype: int cbf_set_realarray_wdims_sf (cbf_handle handle, - unsigned int compression, int binary_id, void *array, - size_t elsize, size_t elements, const char *byteorder, - size_t dimslow, size_t dimmid, size_t dimfast, - size_t padding); + C prototype: int cbf_set_real_image_fs(cbf_handle handle, + unsigned int reserved, unsigned int element_number, + unsigned int compression, void *array,size_t elsize, + size_t ndimfast, size_t ndimslow); CBFLib documentation: DESCRIPTION - cbf_set_integerarray sets the binary value of the item at the current - column and row to an integer array. The array consists of elements - elements of elsize bytes each, starting at array. The elements are - signed if elsigned is non-0 and unsigned otherwise. binary_id is the - binary section identifier. cbf_set_realarray sets the binary value of - the item at the current column and row to an integer array. The array - consists of elements elements of elsize bytes each, starting at - array. binary_id is the binary section identifier. - The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, - cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, - cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants - allow the data header values of byteorder, dimfast, dimmid, dimslow - and padding to be set to the data byte order, the fastest, second - fastest and third fastest array dimensions and the size in byte of - the post data padding to be used. + cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image + array for element number element_number. The array consists of + ndimfast *ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-zero and unsigned otherwise. + cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf + write the image array for element number element_number. The array + consists of ndimfast *ndimslow IEEE double or float elements of + elsize bytes each, starting at array. cbf_set_3d_image, + cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array + for element number element_number. The array consists of ndimfast + *ndimmid *ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-0 and unsigned otherwise. + cbf_set_real_3d_image, cbf_set_real_3d_image_fs and + cbf_set_real_3d_image_sf writes the 3D image array for element number + element_number. The array consists of ndimfast *ndimmid *ndimslow + IEEE double or float elements of elsize bytes each, starting at + array. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + If the array is 1-dimensional, ndimslow should be the array size and + ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the + array is 2-dimensional and the 3D calls are used, ndimslow and + ndimmid should be used for the array dimensions and ndimfast should + be set to 1. The array will be compressed using the compression scheme specifed by - compression. Currently, the available schemes are: - CBF_CANONICAL Canonical-code compression (section 3.3.1) - CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple - "nibble_offset " compression. CBF_NONE No compression. - NOTE: This scheme is by far the slowest of the four and uses much - more disk space. It is intended for routine use with small arrays - only. With large arrays (like images) it should be used only for - debugging. + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. The values compressed are limited to 64 bits. If any element in the array is larger than 64 bits, the value compressed is the nearest 64-bit value. Currently, the source array must consist of chars, shorts or ints - (signed or unsigned), for cbf_set_integerarray, or IEEE doubles or - floats for cbf_set_realarray. If elsize is not equal to sizeof - (char), sizeof (short) or sizeof (int), the function returns + (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for + cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof + (int), sizeof(double) or sizeof(float), the function returns CBF_ARGUMENT. + The parameter reserved is presently unused and should be set to 0. ARGUMENTS - handle CBF handle. compression Compression method to use. - binary_id Integer binary identifier. array Pointer to the - source array. elsize Size in bytes of each source array - element. elsigned Set to non-0 if the source array elements are - signed. elements: The number of elements in the array. + handle CBF handle. reserved Unused. Any value other + than 0 is invalid. element_number The number of the detector + element counting from 0 by order of appearance in the + "diffrn_data_frame " category. compression Compression type. + array Pointer to the image array. elsize Size in + bytes of each image array element. elsigned Set to non-0 if + the image array elements are signed. ndimslow Slowest array + dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_set_realarray_wdims_sf(self, compression, binary_id, data, elsize, elements, bo, dimslow, dimmid, dimfast, padding) - + return _pycbf.cbf_handle_struct_set_real_image_fs(self, element_number, compression, data, elsize, ndimfast, ndimslow) - def set_integervalue(self, number): - """ + def set_real_image_sf(self, element_number, compression, data, elsize, ndimslow, ndimfast): + r""" - Returns : int number - *args : + Returns : + *args : int element_number,int compression,(binary) String data,int elsize, + int dimslow,int dimfast - C prototype: int cbf_set_integervalue (cbf_handle handle, int number); + C prototype: int cbf_set_real_image_sf(cbf_handle handle, + unsigned int reserved, unsigned int element_number, + unsigned int compression, void *array,size_t elsize, + size_t ndimslow, size_t ndimfast); CBFLib documentation: DESCRIPTION - cbf_set_integervalue sets the item at the current column and row to - the integer value number written as a decimal ASCII string. + cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image + array for element number element_number. The array consists of + ndimfast *ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-zero and unsigned otherwise. + cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf + write the image array for element number element_number. The array + consists of ndimfast *ndimslow IEEE double or float elements of + elsize bytes each, starting at array. cbf_set_3d_image, + cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array + for element number element_number. The array consists of ndimfast + *ndimmid *ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-0 and unsigned otherwise. + cbf_set_real_3d_image, cbf_set_real_3d_image_fs and + cbf_set_real_3d_image_sf writes the 3D image array for element number + element_number. The array consists of ndimfast *ndimmid *ndimslow + IEEE double or float elements of elsize bytes each, starting at + array. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + If the array is 1-dimensional, ndimslow should be the array size and + ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the + array is 2-dimensional and the 3D calls are used, ndimslow and + ndimmid should be used for the array dimensions and ndimfast should + be set to 1. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for + cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof + (int), sizeof(double) or sizeof(float), the function returns + CBF_ARGUMENT. + The parameter reserved is presently unused and should be set to 0. ARGUMENTS - handle CBF handle. number Integer value. + handle CBF handle. reserved Unused. Any value other + than 0 is invalid. element_number The number of the detector + element counting from 0 by order of appearance in the + "diffrn_data_frame " category. compression Compression type. + array Pointer to the image array. elsize Size in + bytes of each image array element. elsigned Set to non-0 if + the image array elements are signed. ndimslow Slowest array + dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_set_integervalue(self, number) - + return _pycbf.cbf_handle_struct_set_real_image_sf(self, element_number, compression, data, elsize, ndimslow, ndimfast) - def category_name(self): - """ + def set_3d_image(self, element_number, compression, data, elsize, elsign, ndimslow, ndimmid, ndimfast): + r""" Returns : - *args : string + *args : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimslow,int dimmid,int dimfast - C prototype: int cbf_category_name (cbf_handle handle, - const char **categoryname); + C prototype: int cbf_set_3d_image (cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array, size_t elsize, int elsign, size_t ndimslow, + size_t ndimmid, size_t ndimfast); CBFLib documentation: DESCRIPTION - cbf_category_name sets *categoryname to point to the name of the - current category of the current data block. - The category name will be valid as long as the category exists. - The name must not be modified by the program in any way. + cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image + array for element number element_number. The array consists of + ndimfast *ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-zero and unsigned otherwise. + cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf + write the image array for element number element_number. The array + consists of ndimfast *ndimslow IEEE double or float elements of + elsize bytes each, starting at array. cbf_set_3d_image, + cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array + for element number element_number. The array consists of ndimfast + *ndimmid *ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-0 and unsigned otherwise. + cbf_set_real_3d_image, cbf_set_real_3d_image_fs and + cbf_set_real_3d_image_sf writes the 3D image array for element number + element_number. The array consists of ndimfast *ndimmid *ndimslow + IEEE double or float elements of elsize bytes each, starting at + array. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + If the array is 1-dimensional, ndimslow should be the array size and + ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the + array is 2-dimensional and the 3D calls are used, ndimslow and + ndimmid should be used for the array dimensions and ndimfast should + be set to 1. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for + cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof + (int), sizeof(double) or sizeof(float), the function returns + CBF_ARGUMENT. + The parameter reserved is presently unused and should be set to 0. ARGUMENTS - handle CBF handle. categoryname Pointer to the destination - category name pointer. + handle CBF handle. reserved Unused. Any value other + than 0 is invalid. element_number The number of the detector + element counting from 0 by order of appearance in the + "diffrn_data_frame " category. compression Compression type. + array Pointer to the image array. elsize Size in + bytes of each image array element. elsigned Set to non-0 if + the image array elements are signed. ndimslow Slowest array + dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_category_name(self) - + return _pycbf.cbf_handle_struct_set_3d_image(self, element_number, compression, data, elsize, elsign, ndimslow, ndimmid, ndimfast) - def get_typeofvalue(self): - """ + def set_3d_image_fs(self, element_number, compression, data, elsize, elsign, ndimfast, ndimmid, ndimslow): + r""" Returns : - *args : string + *args : int element_number,int compression,(binary) String data,int elsize, + int elsign,int dimfast,int dimmid,int dimslow - C prototype: int cbf_get_typeofvalue (cbf_handle handle, - const char **typeofvalue); + C prototype: int cbf_set_3d_image_fs(cbf_handle handle, unsigned int reserved, + unsigned int element_number, unsigned int compression, + void *array, size_t elsize, int elsign, size_t ndimfast, + size_t ndimmid, size_t ndimslow); CBFLib documentation: DESCRIPTION - cbf_get_value sets *typeofvalue to point an ASCII descriptor of the - value of the item at the current column and row. The strings that may - be returned are: - "null " for a null value indicated by a ". " or a "? " - "bnry " for a binary value "word " for an unquoted string - "dblq " for a double-quoted string "sglq " for a single-quoted - string "text " for a semicolon-quoted string (multiline text - field) "prns " for a parenthesis-bracketed string (multiline text - field) "brcs " for a brace-bracketed string (multiline text field) - "bkts " for a square-bracket-bracketed string (multiline text - field) "tsqs " for a treble-single-quote quoted string (multiline - text field) "tdqs " for a treble-double-quote quoted string - (multiline text field) - Not all types are valid for all type of CIF files. In partcular the - types "prns ", "brcs ", "bkts " were introduced with DDLm - and are not valid in DDL1 or DDL2 CIFS. The types "tsqs " and - "tdqs " are not formally part of the CIF syntax. A field for which - no value has been set sets *typeofvalue to NULL rather than to the - string "null ". - The typeofvalue must not be modified by the program in any way. + cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image + array for element number element_number. The array consists of + ndimfast *ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-zero and unsigned otherwise. + cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf + write the image array for element number element_number. The array + consists of ndimfast *ndimslow IEEE double or float elements of + elsize bytes each, starting at array. cbf_set_3d_image, + cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array + for element number element_number. The array consists of ndimfast + *ndimmid *ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-0 and unsigned otherwise. + cbf_set_real_3d_image, cbf_set_real_3d_image_fs and + cbf_set_real_3d_image_sf writes the 3D image array for element number + element_number. The array consists of ndimfast *ndimmid *ndimslow + IEEE double or float elements of elsize bytes each, starting at + array. + The _fs calls give the dimensions in a fast-to-slow order. The calls + with no suffix and the calls _sf calls give the dimensions in + slow-to-fast order + If the array is 1-dimensional, ndimslow should be the array size and + ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the + array is 2-dimensional and the 3D calls are used, ndimslow and + ndimmid should be used for the array dimensions and ndimfast should + be set to 1. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for + cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof + (int), sizeof(double) or sizeof(float), the function returns + CBF_ARGUMENT. + The parameter reserved is presently unused and should be set to 0. ARGUMENTS - handle CBF handle. typeofvalue Pointer to the destination - type-of-value string pointer. + handle CBF handle. reserved Unused. Any value other + than 0 is invalid. element_number The number of the detector + element counting from 0 by order of appearance in the + "diffrn_data_frame " category. compression Compression type. + array Pointer to the image array. elsize Size in + bytes of each image array element. elsigned Set to non-0 if + the image array elements are signed. ndimslow Slowest array + dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_get_typeofvalue(self) - + return _pycbf.cbf_handle_struct_set_3d_image_fs(self, element_number, compression, data, elsize, elsign, ndimfast, ndimmid, ndimslow) - def set_real_image(self, element_number, compression, data, elsize, ndimslow, ndimfast): - """ + def set_3d_image_sf(self, element_number, compression, data, elsize, elsign, ndimslow, ndimmid, ndimfast): + r""" Returns : *args : int element_number,int compression,(binary) String data,int elsize, - int dimslow,int dimfast + int elsign,int dimslow,int dimmid,int dimfast - C prototype: int cbf_set_real_image (cbf_handle handle, unsigned int reserved, + C prototype: int cbf_set_3d_image_sf(cbf_handle handle, unsigned int reserved, unsigned int element_number, unsigned int compression, - void *array,size_t elsize, size_t ndimslow, - size_t ndimfast); + void *array, size_t elsize, int elsign, size_t ndimslow, + size_t ndimmid, size_t ndimfast); CBFLib documentation: DESCRIPTION @@ -7420,200 +7099,91 @@ def set_real_image(self, element_number, compression, data, elsize, ndimslow, nd ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_set_real_image(self, element_number, compression, data, elsize, ndimslow, ndimfast) - + return _pycbf.cbf_handle_struct_set_3d_image_sf(self, element_number, compression, data, elsize, elsign, ndimslow, ndimmid, ndimfast) - def get_3d_image_as_string(self, element_number, elsize, elsign, ndimfast, ndimmid, ndimslow): - """ + def set_real_3d_image(self, element_number, compression, data, elsize, ndimslow, ndimmid, ndimfast): + r""" - Returns : (Binary)String - *args : int element_number,int elsize,int elsign,int ndimslow,int ndimmid, - int ndimfast + Returns : + *args : int element_number,int compression,(binary) String data,int elsize, + int dimslow,int dimmid,int dimfast - C prototype: int cbf_get_3d_image (cbf_handle handle, unsigned int reserved, - unsigned int element_number, void *array, size_t elsize, - int elsign, size_t ndimslow, size_t ndimmid, - size_t ndimfast); + C prototype: int cbf_set_real_3d_image (cbf_handle handle, + unsigned int reserved, unsigned int element_number, + unsigned int compression, void *array,size_t elsize, + size_t ndimslow, size_t ndimmid, size_t ndimfast); CBFLib documentation: DESCRIPTION - cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image - array for element number element_number into an array. The array - consists of ndimslow *ndimfast elements of elsize bytes each, - starting at array. The elements are signed if elsign is non-0 and - unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and - cbf_get_real_image_sf read the image array of IEEE doubles or floats - for element number element_number into an array. A real array is - always signed. cbf_get_3d_image, cbf_get_3d_image_fs and - cbf_get_3d_image_sf read the 3D image array for element number - element_number into an array. The array consists of ndimslow *ndimmid - *ndimfast elements of elsize bytes each, starting at array. The - elements are signed if elsign is non-0 and unsigned otherwise. - cbf_get_real_3d_image, cbf_get_real_3d_image_fs, - cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or - floats for element number element_number into an array. A real array - is always signed. + cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image + array for element number element_number. The array consists of + ndimfast *ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-zero and unsigned otherwise. + cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf + write the image array for element number element_number. The array + consists of ndimfast *ndimslow IEEE double or float elements of + elsize bytes each, starting at array. cbf_set_3d_image, + cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array + for element number element_number. The array consists of ndimfast + *ndimmid *ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-0 and unsigned otherwise. + cbf_set_real_3d_image, cbf_set_real_3d_image_fs and + cbf_set_real_3d_image_sf writes the 3D image array for element number + element_number. The array consists of ndimfast *ndimmid *ndimslow + IEEE double or float elements of elsize bytes each, starting at + array. The _fs calls give the dimensions in a fast-to-slow order. The calls with no suffix and the calls _sf calls give the dimensions in slow-to-fast order - The structure of the array as a 1-, 2- or 3-dimensional array should - agree with the structure of the array given in the - ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, - ndimslow should be the array size and ndimfast and, for the 3D calls, - ndimmid, should be set to 1 both in the call and in the imgCIF data - being processed. If the array is 2-dimensional and a 3D call is used, - ndimslow and ndimmid should be the - - """ - return _pycbf.cbf_handle_struct_get_3d_image_as_string(self, element_number, elsize, elsign, ndimfast, ndimmid, ndimslow) - - - def get_axis_reference_poise(self, axis_id): - """ - - Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2, - Float offset3 - *args : String axis_id - - C prototype: int cbf_get_axis_reference_poise(cbf_handle handle, - double * vector1, double * vector2, double * vector3, - double * offset1, double * offset2, double * offset3, - const char * axis_id); - - CBFLib documentation: - DESCRIPTION - cbf_get_axis_poise sets vector1, vector2, vector3 to point to the - components of the axis vector for axis axis_id, offset1, offset2, - offset3 to point to the components of the axis base offset vector for - axis axis_id, and angle to point to the angle of rotation of axis - axis_id after application of the axis settings for frame frame_id, - using ratio, a value between 0 and 1, indicating how far into the - internal motion in the frame to go. If frame_id is the string ". - ", the first frame found is used. If there is more than one frame, - which frame will be found is indeterminate. If frame_id is NULL, the - overall setting for the scan are used, rather than those for any - particular frame. The vector and offset reported are the reference - vector and offset of the axis axis_id transformed by application of - all motions of the axes on which axis_id depends. - cbf_get_goniometer_poise vector1, vector2, vector3 to point to the - components of the axis vector for the goniometer axis, offset1, - offset2, offset3 to point to the components of the axis base offset - vector for the goniometer axis, and angle to point to the angle of - rotation of the goniometer axis after application of all axis - settings in the goniometer deriving the vector, offset and angle from - the resulting matrix. Calculation of the vector is indeterminate if - the angle is zero. - cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point - to the components of the axis vector for axis axis_id, offset1, - offset2, offset3 to point to the components of the axis base offset - vector for axis axis_id unmodified by axis rotations. Any of the - pointers may be specified as NULL. - ARGUMENTS - handle CBF handle. ratio A number between 0 and 1 - indication how far into the frame to go vector1 Pointer to the - first component of the axis vector vector2 Pointer to the second - component of the axis vector vector3 Pointer to the third - component of the axis vector offset1 Pointer to the first - component of the axis offset offset2 Pointer to the second - component of the axis offset offset3 Pointer to the third - component of the axis offset angle Pointer to the rotation - angle axis_id The specified axis frame_id The specified - frame positioner CBF goniometer - RETURN VALUE - Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- - - """ - return _pycbf.cbf_handle_struct_get_axis_reference_poise(self, axis_id) - - - def remove_row(self): - """ - - Returns : - *args : - - C prototype: int cbf_remove_row (cbf_handle handle); - - CBFLib documentation: - DESCRIPTION - cbf_remove_row deletes the current row in the current category. - If the current row was the last row, it will move down by 1, - otherwise, it will remain the same. - ARGUMENTS - handle CBF handle. - RETURN VALUE - Returns an error code on failure or 0 for success. - SEE ALSO - - """ - return _pycbf.cbf_handle_struct_remove_row(self) - - - def set_overload(self, element_number, overload): - """ - - Returns : - *args : Integer element_number,Float overload - - C prototype: int cbf_set_overload (cbf_handle handle, - unsigned int element_number, double overload); - - CBFLib documentation: - DESCRIPTION - cbf_set_overload sets the overload value of element number - element_number to overload. + If the array is 1-dimensional, ndimslow should be the array size and + ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the + array is 2-dimensional and the 3D calls are used, ndimslow and + ndimmid should be used for the array dimensions and ndimfast should + be set to 1. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for + cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof + (int), sizeof(double) or sizeof(float), the function returns + CBF_ARGUMENT. + The parameter reserved is presently unused and should be set to 0. ARGUMENTS - handle CBF handle. element_number The number of the - detector element counting from 0 by order of appearance in the - "diffrn_data_frame " category. overload New overload value. + handle CBF handle. reserved Unused. Any value other + than 0 is invalid. element_number The number of the detector + element counting from 0 by order of appearance in the + "diffrn_data_frame " category. compression Compression type. + array Pointer to the image array. elsize Size in + bytes of each image array element. elsigned Set to non-0 if + the image array elements are signed. ndimslow Slowest array + dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_set_overload(self, element_number, overload) - - - def get_image_size(self, element_number): - """ - - Returns : size_t ndim1,size_t ndim2 - *args : Integer element_number - - C prototype: int cbf_get_image_size (cbf_handle handle, unsigned int reserved, - unsigned int element_number, size_t *ndimslow, - size_t *ndimfast); - - CBFLib documentation: - DESCRIPTION - cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf - set *ndimslow and *ndimfast to the slow and fast dimensions of the - image array for element number element_number. If the array is - 1-dimensional, *ndimslow will be set to the array size and *ndimfast - will be set to 1. If the array is 3-dimensional an error code will be - returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and - cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the - slowest, next fastest and fastest dimensions, respectively, of the 3D - image array for element number element_number. If the array is - 1-dimensional, *ndimslow will be set to the array size and *ndimmid - and - - """ - return _pycbf.cbf_handle_struct_get_image_size(self, element_number) - + return _pycbf.cbf_handle_struct_set_real_3d_image(self, element_number, compression, data, elsize, ndimslow, ndimmid, ndimfast) - def set_3d_image_sf(self, element_number, compression, data, elsize, elsign, ndimslow, ndimmid, ndimfast): - """ + def set_real_3d_image_fs(self, element_number, compression, data, elsize, ndimfast, ndimmid, ndimslow): + r""" Returns : *args : int element_number,int compression,(binary) String data,int elsize, - int elsign,int dimslow,int dimmid,int dimfast + int dimfast,int dimmid,int dimslow - C prototype: int cbf_set_3d_image_sf(cbf_handle handle, unsigned int reserved, - unsigned int element_number, unsigned int compression, - void *array, size_t elsize, int elsign, size_t ndimslow, - size_t ndimmid, size_t ndimfast); + C prototype: int cbf_set_real_3d_image_fs(cbf_handle handle, + unsigned int reserved, unsigned int element_number, + unsigned int compression, void *array,size_t elsize, + size_t ndimfast, size_t ndimmid, size_t ndimslow); CBFLib documentation: DESCRIPTION @@ -7673,377 +7243,657 @@ def set_3d_image_sf(self, element_number, compression, data, elsize, elsign, ndi ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_set_3d_image_sf(self, element_number, compression, data, elsize, elsign, ndimslow, ndimmid, ndimfast) - + return _pycbf.cbf_handle_struct_set_real_3d_image_fs(self, element_number, compression, data, elsize, ndimfast, ndimmid, ndimslow) - def get_real_image_sf_as_string(self, element_number, elsize, ndimslow, ndimfast): - """ + def set_real_3d_image_sf(self, element_number, compression, data, elsize, ndimslow, ndimmid, ndimfast): + r""" - Returns : (Binary)String - *args : int element_number,int elsize,int ndimslow,int ndimfast + Returns : + *args : int element_number,int compression,(binary) String data,int elsize, + int dimslow,int dimmid,int dimfast - C prototype: int cbf_get_real_image_sf (cbf_handle handle, + C prototype: int cbf_set_real_3d_image_sf(cbf_handle handle, unsigned int reserved, unsigned int element_number, - void *array, size_t elsize, size_t ndimslow, - size_t ndimfast); - - CBFLib documentation: - DESCRIPTION - cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image - array for element number element_number into an array. The array - consists of ndimslow *ndimfast elements of elsize bytes each, - starting at array. The elements are signed if elsign is non-0 and - unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and - cbf_get_real_image_sf read the image array of IEEE doubles or floats - for element number element_number into an array. A real array is - always signed. cbf_get_3d_image, cbf_get_3d_image_fs and - cbf_get_3d_image_sf read the 3D image array for element number - element_number into an array. The array consists of ndimslow *ndimmid - *ndimfast elements of elsize bytes each, starting at array. The - elements are signed if elsign is non-0 and unsigned otherwise. - cbf_get_real_3d_image, cbf_get_real_3d_image_fs, - cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or - floats for element number element_number into an array. A real array - is always signed. - The _fs calls give the dimensions in a fast-to-slow order. The calls - with no suffix and the calls _sf calls give the dimensions in - slow-to-fast order - The structure of the array as a 1-, 2- or 3-dimensional array should - agree with the structure of the array given in the - ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, - ndimslow should be the array size and ndimfast and, for the 3D calls, - ndimmid, should be set to 1 both in the call and in the imgCIF data - being processed. If the array is 2-dimensional and a 3D call is used, - ndimslow and ndimmid should be the - - """ - return _pycbf.cbf_handle_struct_get_real_image_sf_as_string(self, element_number, elsize, ndimslow, ndimfast) - - - def get_image_as_string(self, element_number, elsize, elsign, ndimslow, ndimfast): - """ - - Returns : (Binary)String - *args : int element_number,int elsize,int elsign,int ndimslow,int ndimfast - - C prototype: int cbf_get_image (cbf_handle handle, unsigned int reserved, - unsigned int element_number, void *array, size_t elsize, - int elsign, size_t ndimslow, size_t ndimfast); + unsigned int compression, void *array,size_t elsize, + size_t ndimslow, size_t ndimmid, size_t ndimfast); CBFLib documentation: DESCRIPTION - cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image - array for element number element_number into an array. The array - consists of ndimslow *ndimfast elements of elsize bytes each, - starting at array. The elements are signed if elsign is non-0 and - unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and - cbf_get_real_image_sf read the image array of IEEE doubles or floats - for element number element_number into an array. A real array is - always signed. cbf_get_3d_image, cbf_get_3d_image_fs and - cbf_get_3d_image_sf read the 3D image array for element number - element_number into an array. The array consists of ndimslow *ndimmid - *ndimfast elements of elsize bytes each, starting at array. The - elements are signed if elsign is non-0 and unsigned otherwise. - cbf_get_real_3d_image, cbf_get_real_3d_image_fs, - cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or - floats for element number element_number into an array. A real array - is always signed. + cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image + array for element number element_number. The array consists of + ndimfast *ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-zero and unsigned otherwise. + cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf + write the image array for element number element_number. The array + consists of ndimfast *ndimslow IEEE double or float elements of + elsize bytes each, starting at array. cbf_set_3d_image, + cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array + for element number element_number. The array consists of ndimfast + *ndimmid *ndimslow elements of elsize bytes each, starting at array. + The elements are signed if elsign is non-0 and unsigned otherwise. + cbf_set_real_3d_image, cbf_set_real_3d_image_fs and + cbf_set_real_3d_image_sf writes the 3D image array for element number + element_number. The array consists of ndimfast *ndimmid *ndimslow + IEEE double or float elements of elsize bytes each, starting at + array. The _fs calls give the dimensions in a fast-to-slow order. The calls with no suffix and the calls _sf calls give the dimensions in slow-to-fast order - The structure of the array as a 1-, 2- or 3-dimensional array should - agree with the structure of the array given in the - ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, - ndimslow should be the array size and ndimfast and, for the 3D calls, - ndimmid, should be set to 1 both in the call and in the imgCIF data - being processed. If the array is 2-dimensional and a 3D call is used, - ndimslow and ndimmid should be the + If the array is 1-dimensional, ndimslow should be the array size and + ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the + array is 2-dimensional and the 3D calls are used, ndimslow and + ndimmid should be used for the array dimensions and ndimfast should + be set to 1. + The array will be compressed using the compression scheme specifed by + compression. Currently, the available schemes are: + CBF_CANONICAL Canonical-code compression (section 3.3.1) + CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 + CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET + Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple + "nibble_offset " compression. CBF_NONE No compression. + The values compressed are limited to 64 bits. If any element in the + array is larger than 64 bits, the value compressed is the nearest + 64-bit value. + Currently, the source array must consist of chars, shorts or ints + (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for + cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof + (int), sizeof(double) or sizeof(float), the function returns + CBF_ARGUMENT. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any value other + than 0 is invalid. element_number The number of the detector + element counting from 0 by order of appearance in the + "diffrn_data_frame " category. compression Compression type. + array Pointer to the image array. elsize Size in + bytes of each image array element. elsigned Set to non-0 if + the image array elements are signed. ndimslow Slowest array + dimension. ndimmid Second slowest array dimension. ndimfast + Fastest array dimension. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_get_image_as_string(self, element_number, elsize, elsign, ndimslow, ndimfast) - + return _pycbf.cbf_handle_struct_set_real_3d_image_sf(self, element_number, compression, data, elsize, ndimslow, ndimmid, ndimfast) - def set_tag_root(self, tagname, tagroot_in): - """ + def count_axis_ancestors(self, axis_id): + r""" - Returns : - *args : String tagname,String tagroot_in + Returns : Integer + *args : String axis_id - C prototype: int cbf_set_tag_root (cbf_handle handle, const char* tagname, - const char*tagroot_in); + C prototype: int cbf_count_axis_ancestors (cbf_handle handle, + const char *axis_id, unsigned int *ancestors); CBFLib documentation: DESCRIPTION - cbf_find_tag_root sets *tagroot to the root tag of which tagname is - an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in - the dictionary associated with handle, creating the dictionary if - necessary. cbf_require_tag_root sets *tagroot to the root tag of - which tagname is an alias, if there is one, or to the value of - tagname, if tagname is not an alias. - A returned tagroot string must not be modified in any way. + cbf_count_axis_ancestors sets ancestors to the number of ancestors of + axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor + axis of index ancestor_index of axis axis_id, starting with axis_id + for ancestor_index 0. + cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of + axis_id or to ". " if there is no such ancestor. + cbf_get_axis_equipment sets *equipment to the equipment of axis_id or + to ". " if there is no such equipment. + cbf_get_axis_equipment_component sets *equipment_component to the + equipment_component of axis_id or to ". " if there is no such + equipment_component. + cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the + components of the ofset of axis_id. + cbf_get_axis_rotation sets rotation to the rotation of axis_id or to + 0 if there is no such rotation. cbf_get_axis_rotation_axis sets + *rotation_axis to the rotation_axis of axis_id or to ". " if there + is no such rotation_axis. + cbf_get_axis_setting sets *start and *increment to the corresponding + values of the axis axis_id. Any of the destination pointers may be + NULL. + cbf_get_axis_type sets axis_type to the type of axis_id. + cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the + components of the vector of axis_id. + The parameter reserved is presently unused and should be set to 0. ARGUMENTS - handle CBF handle. tagname tag name which may be an alias. - tagroot pointer to a returned tag root name. tagroot_in input - tag root name. + handle CBF handle. reserved Unused. Any + value other than 0 is invalid. axis_id Axis id. + ancestor_index Integer index of the desired ancestor, starting + with 0 for the current axis_id. ancestor Pointer to + destination ancestor name pointer. depends_on Pointer to + destination depends_on name pointer. equipment Pointer to + destination equipment name pointer. equipment_component Pointer to + destination equipment_component name pointer. offset1 + Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. + rotation Pointer to destination rotation value. + rotation_axis Pointer to destination rotation_axisn name + pointer. start Pointer to the destination start + value. increment Pointer to the destination increment + value. type Pointer to destination axis type of type + . vector1 Pointer to destination first vector component + value. vector2 Pointer to destination second vector + component value. vector3 Pointer to destination third + vector component value. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_set_tag_root(self, tagname, tagroot_in) - + return _pycbf.cbf_handle_struct_count_axis_ancestors(self, axis_id) - def write_widefile(self, filename, ciforcbf, headers, encoding): - """ + def get_axis_ancestor(self, axis_id, ancestor_index): + r""" - Returns : - *args : String filename,Integer ciforcbf,Integer Headers,Integer encoding + Returns : String + *args : String axis_id,Integer ancestor_index - C prototype: int cbf_write_widefile (cbf_handle handle, FILE *file, - int readable, int ciforcbf, int flags, int encoding); + C prototype: int cbf_get_axis_ancestor (cbf_handle handle, + const char *axis_id, const unsigned int ancestor_index, + const char * *ancestor); CBFLib documentation: DESCRIPTION - cbf_write_file writes the CBF object specified by handle into the - file file, following CIF 1.0 conventions of 80 character lines. - cbf_write_widefile writes the CBF object specified by handle into the - file file, following CIF 1.1 conventions of 2048 character lines. A - warning is issued to stderr for ascii lines over the limit, and an - attempt is made to fold lines to fit. No test is performed on binary - sections. - If a dictionary has been provided, aliases will be applied on output. - Unlike cbf_read_file, the file does not have to be random-access. - If the file is random-access and readable, readable can be set to - non-0 to indicate to CBFlib that the file can be used as a buffer to - conserve disk space. If the file is not random-access or not - readable, readable must be 0. + cbf_count_axis_ancestors sets ancestors to the number of ancestors of + axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor + axis of index ancestor_index of axis axis_id, starting with axis_id + for ancestor_index 0. + cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of + axis_id or to ". " if there is no such ancestor. + cbf_get_axis_equipment sets *equipment to the equipment of axis_id or + to ". " if there is no such equipment. + cbf_get_axis_equipment_component sets *equipment_component to the + equipment_component of axis_id or to ". " if there is no such + equipment_component. + cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the + components of the ofset of axis_id. + cbf_get_axis_rotation sets rotation to the rotation of axis_id or to + 0 if there is no such rotation. cbf_get_axis_rotation_axis sets + *rotation_axis to the rotation_axis of axis_id or to ". " if there + is no such rotation_axis. + cbf_get_axis_setting sets *start and *increment to the corresponding + values of the axis axis_id. Any of the destination pointers may be + NULL. + cbf_get_axis_type sets axis_type to the type of axis_id. + cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the + components of the vector of axis_id. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any + value other than 0 is invalid. axis_id Axis id. + ancestor_index Integer index of the desired ancestor, starting + with 0 for the current axis_id. ancestor Pointer to + destination ancestor name pointer. depends_on Pointer to + destination depends_on name pointer. equipment Pointer to + destination equipment name pointer. equipment_component Pointer to + destination equipment_component name pointer. offset1 + Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. + rotation Pointer to destination rotation value. + rotation_axis Pointer to destination rotation_axisn name + pointer. start Pointer to the destination start + value. increment Pointer to the destination increment + value. type Pointer to destination axis type of type + . vector1 Pointer to destination first vector component + value. vector2 Pointer to destination second vector + component value. vector3 Pointer to destination third + vector component value. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_write_widefile(self, filename, ciforcbf, headers, encoding) - + return _pycbf.cbf_handle_struct_get_axis_ancestor(self, axis_id, ancestor_index) - def count_rows(self): - """ + def get_axis_depends_on(self, axis_id): + r""" - Returns : Integer - *args : + Returns : String + *args : String axis_id - C prototype: int cbf_count_rows (cbf_handle handle, unsigned int *rows); + C prototype: int cbf_get_axis_depends_on (cbf_handle handle, + const char *axis_id, const char * *depends_on); CBFLib documentation: DESCRIPTION - cbf_count_rows puts the number of rows in the current category in - *rows . + cbf_count_axis_ancestors sets ancestors to the number of ancestors of + axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor + axis of index ancestor_index of axis axis_id, starting with axis_id + for ancestor_index 0. + cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of + axis_id or to ". " if there is no such ancestor. + cbf_get_axis_equipment sets *equipment to the equipment of axis_id or + to ". " if there is no such equipment. + cbf_get_axis_equipment_component sets *equipment_component to the + equipment_component of axis_id or to ". " if there is no such + equipment_component. + cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the + components of the ofset of axis_id. + cbf_get_axis_rotation sets rotation to the rotation of axis_id or to + 0 if there is no such rotation. cbf_get_axis_rotation_axis sets + *rotation_axis to the rotation_axis of axis_id or to ". " if there + is no such rotation_axis. + cbf_get_axis_setting sets *start and *increment to the corresponding + values of the axis axis_id. Any of the destination pointers may be + NULL. + cbf_get_axis_type sets axis_type to the type of axis_id. + cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the + components of the vector of axis_id. + The parameter reserved is presently unused and should be set to 0. ARGUMENTS - handle CBF handle. rows Pointer to the destination row count. + handle CBF handle. reserved Unused. Any + value other than 0 is invalid. axis_id Axis id. + ancestor_index Integer index of the desired ancestor, starting + with 0 for the current axis_id. ancestor Pointer to + destination ancestor name pointer. depends_on Pointer to + destination depends_on name pointer. equipment Pointer to + destination equipment name pointer. equipment_component Pointer to + destination equipment_component name pointer. offset1 + Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. + rotation Pointer to destination rotation value. + rotation_axis Pointer to destination rotation_axisn name + pointer. start Pointer to the destination start + value. increment Pointer to the destination increment + value. type Pointer to destination axis type of type + . vector1 Pointer to destination first vector component + value. vector2 Pointer to destination second vector + component value. vector3 Pointer to destination third + vector component value. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_count_rows(self) - + return _pycbf.cbf_handle_struct_get_axis_depends_on(self, axis_id) - def require_datablock(self, arg): - """ + def get_axis_equipment(self, axis_id): + r""" - Returns : string - *args : + Returns : String + *args : String axis_id - C prototype: int cbf_require_datablock (cbf_handle handle, - const char *datablockname); + C prototype: int cbf_get_axis_equipment (cbf_handle handle, + const char *axis_id, const char * *equipment); CBFLib documentation: DESCRIPTION - cbf_require_datablock makes the data block with name datablockname - the current data block, if it exists, or creates it if it does not. - The comparison is case-insensitive. - The current category becomes undefined. + cbf_count_axis_ancestors sets ancestors to the number of ancestors of + axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor + axis of index ancestor_index of axis axis_id, starting with axis_id + for ancestor_index 0. + cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of + axis_id or to ". " if there is no such ancestor. + cbf_get_axis_equipment sets *equipment to the equipment of axis_id or + to ". " if there is no such equipment. + cbf_get_axis_equipment_component sets *equipment_component to the + equipment_component of axis_id or to ". " if there is no such + equipment_component. + cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the + components of the ofset of axis_id. + cbf_get_axis_rotation sets rotation to the rotation of axis_id or to + 0 if there is no such rotation. cbf_get_axis_rotation_axis sets + *rotation_axis to the rotation_axis of axis_id or to ". " if there + is no such rotation_axis. + cbf_get_axis_setting sets *start and *increment to the corresponding + values of the axis axis_id. Any of the destination pointers may be + NULL. + cbf_get_axis_type sets axis_type to the type of axis_id. + cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the + components of the vector of axis_id. + The parameter reserved is presently unused and should be set to 0. ARGUMENTS - handle CBF handle. datablockname The name of the data - block to find or create. + handle CBF handle. reserved Unused. Any + value other than 0 is invalid. axis_id Axis id. + ancestor_index Integer index of the desired ancestor, starting + with 0 for the current axis_id. ancestor Pointer to + destination ancestor name pointer. depends_on Pointer to + destination depends_on name pointer. equipment Pointer to + destination equipment name pointer. equipment_component Pointer to + destination equipment_component name pointer. offset1 + Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. + rotation Pointer to destination rotation value. + rotation_axis Pointer to destination rotation_axisn name + pointer. start Pointer to the destination start + value. increment Pointer to the destination increment + value. type Pointer to destination axis type of type + . vector1 Pointer to destination first vector component + value. vector2 Pointer to destination second vector + component value. vector3 Pointer to destination third + vector component value. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_require_datablock(self, arg) - + return _pycbf.cbf_handle_struct_get_axis_equipment(self, axis_id) - def set_integerarray(self, compression, binary_id, data, elsize, elsigned, elements): - """ + def get_axis_equipment_component(self, axis_id): + r""" - Returns : - *args : int compression,int binary_id,(binary) String data,int elsize, - int elsigned,int elements + Returns : String + *args : String axis_id - C prototype: int cbf_set_integerarray (cbf_handle handle, - unsigned int compression, int binary_id, void *array, - size_t elsize, int elsigned, size_t elements); + C prototype: int cbf_get_axis_equipment_component (cbf_handle handle, + const char *axis_id, const char * *equipment_component); CBFLib documentation: DESCRIPTION - cbf_set_integerarray sets the binary value of the item at the current - column and row to an integer array. The array consists of elements - elements of elsize bytes each, starting at array. The elements are - signed if elsigned is non-0 and unsigned otherwise. binary_id is the - binary section identifier. cbf_set_realarray sets the binary value of - the item at the current column and row to an integer array. The array - consists of elements elements of elsize bytes each, starting at - array. binary_id is the binary section identifier. - The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, - cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, - cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants - allow the data header values of byteorder, dimfast, dimmid, dimslow - and padding to be set to the data byte order, the fastest, second - fastest and third fastest array dimensions and the size in byte of - the post data padding to be used. - The array will be compressed using the compression scheme specifed by - compression. Currently, the available schemes are: - CBF_CANONICAL Canonical-code compression (section 3.3.1) - CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple - "nibble_offset " compression. CBF_NONE No compression. - NOTE: This scheme is by far the slowest of the four and uses much - more disk space. It is intended for routine use with small arrays - only. With large arrays (like images) it should be used only for - debugging. - The values compressed are limited to 64 bits. If any element in the - array is larger than 64 bits, the value compressed is the nearest - 64-bit value. - Currently, the source array must consist of chars, shorts or ints - (signed or unsigned), for cbf_set_integerarray, or IEEE doubles or - floats for cbf_set_realarray. If elsize is not equal to sizeof - (char), sizeof (short) or sizeof (int), the function returns - CBF_ARGUMENT. + cbf_count_axis_ancestors sets ancestors to the number of ancestors of + axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor + axis of index ancestor_index of axis axis_id, starting with axis_id + for ancestor_index 0. + cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of + axis_id or to ". " if there is no such ancestor. + cbf_get_axis_equipment sets *equipment to the equipment of axis_id or + to ". " if there is no such equipment. + cbf_get_axis_equipment_component sets *equipment_component to the + equipment_component of axis_id or to ". " if there is no such + equipment_component. + cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the + components of the ofset of axis_id. + cbf_get_axis_rotation sets rotation to the rotation of axis_id or to + 0 if there is no such rotation. cbf_get_axis_rotation_axis sets + *rotation_axis to the rotation_axis of axis_id or to ". " if there + is no such rotation_axis. + cbf_get_axis_setting sets *start and *increment to the corresponding + values of the axis axis_id. Any of the destination pointers may be + NULL. + cbf_get_axis_type sets axis_type to the type of axis_id. + cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the + components of the vector of axis_id. + The parameter reserved is presently unused and should be set to 0. ARGUMENTS - handle CBF handle. compression Compression method to use. - binary_id Integer binary identifier. array Pointer to the - source array. elsize Size in bytes of each source array - element. elsigned Set to non-0 if the source array elements are - signed. elements: The number of elements in the array. + handle CBF handle. reserved Unused. Any + value other than 0 is invalid. axis_id Axis id. + ancestor_index Integer index of the desired ancestor, starting + with 0 for the current axis_id. ancestor Pointer to + destination ancestor name pointer. depends_on Pointer to + destination depends_on name pointer. equipment Pointer to + destination equipment name pointer. equipment_component Pointer to + destination equipment_component name pointer. offset1 + Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. + rotation Pointer to destination rotation value. + rotation_axis Pointer to destination rotation_axisn name + pointer. start Pointer to the destination start + value. increment Pointer to the destination increment + value. type Pointer to destination axis type of type + . vector1 Pointer to destination first vector component + value. vector2 Pointer to destination second vector + component value. vector3 Pointer to destination third + vector component value. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO - - """ - return _pycbf.cbf_handle_struct_set_integerarray(self, compression, binary_id, data, elsize, elsigned, elements) - + ---------------------------------------------------------------------- - def new_datablock(self, arg): """ + return _pycbf.cbf_handle_struct_get_axis_equipment_component(self, axis_id) - Returns : string - *args : + def get_axis_offset(self, axis_id): + r""" - C prototype: int cbf_new_datablock (cbf_handle handle, - const char *datablockname); + Returns : Float offset1,Float offset2,Float offset3 + *args : String axis_id + + C prototype: int cbf_get_axis_offset (cbf_handle handle, const char *axis_id, + double *offset1, double *offset2, double *offset3); CBFLib documentation: DESCRIPTION - cbf_new_datablock creates a new data block with name datablockname - and makes it the current data block. cbf_new_saveframe creates a new - save frame with name saveframename within the current data block and - makes the new save frame the current save frame. - If a data block or save frame with this name already exists, the - existing data block or save frame becomes the current data block or - save frame. + cbf_count_axis_ancestors sets ancestors to the number of ancestors of + axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor + axis of index ancestor_index of axis axis_id, starting with axis_id + for ancestor_index 0. + cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of + axis_id or to ". " if there is no such ancestor. + cbf_get_axis_equipment sets *equipment to the equipment of axis_id or + to ". " if there is no such equipment. + cbf_get_axis_equipment_component sets *equipment_component to the + equipment_component of axis_id or to ". " if there is no such + equipment_component. + cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the + components of the ofset of axis_id. + cbf_get_axis_rotation sets rotation to the rotation of axis_id or to + 0 if there is no such rotation. cbf_get_axis_rotation_axis sets + *rotation_axis to the rotation_axis of axis_id or to ". " if there + is no such rotation_axis. + cbf_get_axis_setting sets *start and *increment to the corresponding + values of the axis axis_id. Any of the destination pointers may be + NULL. + cbf_get_axis_type sets axis_type to the type of axis_id. + cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the + components of the vector of axis_id. + The parameter reserved is presently unused and should be set to 0. ARGUMENTS - handle CBF handle. datablockname The name of the new data - block. saveframename The name of the new save frame. + handle CBF handle. reserved Unused. Any + value other than 0 is invalid. axis_id Axis id. + ancestor_index Integer index of the desired ancestor, starting + with 0 for the current axis_id. ancestor Pointer to + destination ancestor name pointer. depends_on Pointer to + destination depends_on name pointer. equipment Pointer to + destination equipment name pointer. equipment_component Pointer to + destination equipment_component name pointer. offset1 + Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. + rotation Pointer to destination rotation value. + rotation_axis Pointer to destination rotation_axisn name + pointer. start Pointer to the destination start + value. increment Pointer to the destination increment + value. type Pointer to destination axis type of type + . vector1 Pointer to destination first vector component + value. vector2 Pointer to destination second vector + component value. vector3 Pointer to destination third + vector component value. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_new_datablock(self, arg) - + return _pycbf.cbf_handle_struct_get_axis_offset(self, axis_id) - def set_datestamp(self, year, month, day, hour, minute, second, timezone, precision): - """ + def get_axis_rotation(self, axis_id): + r""" - Returns : - *args : int year,int month,int day,int hour,int minute,double second, - int timezone,Float precision + Returns : Float + *args : String axis_id - C prototype: int cbf_set_datestamp (cbf_handle handle, unsigned int reserved, - int year, int month, int day, int hour, int minute, - double second, int timezone, double precision); + C prototype: int cbf_get_axis_rotation (cbf_handle handle, + const char *axis_id, double *rotation); CBFLib documentation: DESCRIPTION - cbf_set_datestamp sets the collection timestamp in seconds since - January 1 1970 to the value specified by time. The timezone - difference from UTC + cbf_count_axis_ancestors sets ancestors to the number of ancestors of + axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor + axis of index ancestor_index of axis axis_id, starting with axis_id + for ancestor_index 0. + cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of + axis_id or to ". " if there is no such ancestor. + cbf_get_axis_equipment sets *equipment to the equipment of axis_id or + to ". " if there is no such equipment. + cbf_get_axis_equipment_component sets *equipment_component to the + equipment_component of axis_id or to ". " if there is no such + equipment_component. + cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the + components of the ofset of axis_id. + cbf_get_axis_rotation sets rotation to the rotation of axis_id or to + 0 if there is no such rotation. cbf_get_axis_rotation_axis sets + *rotation_axis to the rotation_axis of axis_id or to ". " if there + is no such rotation_axis. + cbf_get_axis_setting sets *start and *increment to the corresponding + values of the axis axis_id. Any of the destination pointers may be + NULL. + cbf_get_axis_type sets axis_type to the type of axis_id. + cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the + components of the vector of axis_id. + The parameter reserved is presently unused and should be set to 0. + ARGUMENTS + handle CBF handle. reserved Unused. Any + value other than 0 is invalid. axis_id Axis id. + ancestor_index Integer index of the desired ancestor, starting + with 0 for the current axis_id. ancestor Pointer to + destination ancestor name pointer. depends_on Pointer to + destination depends_on name pointer. equipment Pointer to + destination equipment name pointer. equipment_component Pointer to + destination equipment_component name pointer. offset1 + Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. + rotation Pointer to destination rotation value. + rotation_axis Pointer to destination rotation_axisn name + pointer. start Pointer to the destination start + value. increment Pointer to the destination increment + value. type Pointer to destination axis type of type + . vector1 Pointer to destination first vector component + value. vector2 Pointer to destination second vector + component value. vector3 Pointer to destination third + vector component value. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_set_datestamp(self, year, month, day, hour, minute, second, timezone, precision) - + return _pycbf.cbf_handle_struct_get_axis_rotation(self, axis_id) - def next_row(self): - """ + def get_axis_rotation_axis(self, axis_id): + r""" - Returns : - *args : + Returns : String + *args : String axis_id - C prototype: int cbf_next_row (cbf_handle handle); + C prototype: int cbf_get_axis_rotation_axis (cbf_handle handle, + const char *axis_id, const char * *rotation_axis); CBFLib documentation: DESCRIPTION - cbf_next_row makes the row following the current row in the current - category the current row. - If there are no more rows, the function returns CBF_NOTFOUND. - The current column is not affected. + cbf_count_axis_ancestors sets ancestors to the number of ancestors of + axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor + axis of index ancestor_index of axis axis_id, starting with axis_id + for ancestor_index 0. + cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of + axis_id or to ". " if there is no such ancestor. + cbf_get_axis_equipment sets *equipment to the equipment of axis_id or + to ". " if there is no such equipment. + cbf_get_axis_equipment_component sets *equipment_component to the + equipment_component of axis_id or to ". " if there is no such + equipment_component. + cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the + components of the ofset of axis_id. + cbf_get_axis_rotation sets rotation to the rotation of axis_id or to + 0 if there is no such rotation. cbf_get_axis_rotation_axis sets + *rotation_axis to the rotation_axis of axis_id or to ". " if there + is no such rotation_axis. + cbf_get_axis_setting sets *start and *increment to the corresponding + values of the axis axis_id. Any of the destination pointers may be + NULL. + cbf_get_axis_type sets axis_type to the type of axis_id. + cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the + components of the vector of axis_id. + The parameter reserved is presently unused and should be set to 0. ARGUMENTS - handle CBF handle. + handle CBF handle. reserved Unused. Any + value other than 0 is invalid. axis_id Axis id. + ancestor_index Integer index of the desired ancestor, starting + with 0 for the current axis_id. ancestor Pointer to + destination ancestor name pointer. depends_on Pointer to + destination depends_on name pointer. equipment Pointer to + destination equipment name pointer. equipment_component Pointer to + destination equipment_component name pointer. offset1 + Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. + rotation Pointer to destination rotation value. + rotation_axis Pointer to destination rotation_axisn name + pointer. start Pointer to the destination start + value. increment Pointer to the destination increment + value. type Pointer to destination axis type of type + . vector1 Pointer to destination first vector component + value. vector2 Pointer to destination second vector + component value. vector3 Pointer to destination third + vector component value. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_next_row(self) - + return _pycbf.cbf_handle_struct_get_axis_rotation_axis(self, axis_id) - def set_category_root(self, categoryname, categoryroot): - """ + def get_axis_setting(self, axis_id): + r""" - Returns : - *args : String categoryname,String categoryroot + Returns : Float start,Float increment + *args : String axis_id - C prototype: int cbf_set_category_root (cbf_handle handle, - const char* categoryname_in, const char*categoryroot); + C prototype: int cbf_get_axis_setting (cbf_handle handle, + unsigned int reserved, const char *axis_id, double *start, + double *increment); CBFLib documentation: DESCRIPTION - cbf_find_category_root sets *categoryroot to the root category of - which categoryname is an alias. cbf_set_category_root sets - categoryname_in as an alias of categoryroot in the dictionary - associated with handle, creating the dictionary if necessary. - cbf_require_category_root sets *categoryroot to the root category of - which categoryname is an alias, if there is one, or to the value of - categoryname, if categoryname is not an alias. - A returned categoryroot string must not be modified in any way. + cbf_count_axis_ancestors sets ancestors to the number of ancestors of + axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor + axis of index ancestor_index of axis axis_id, starting with axis_id + for ancestor_index 0. + cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of + axis_id or to ". " if there is no such ancestor. + cbf_get_axis_equipment sets *equipment to the equipment of axis_id or + to ". " if there is no such equipment. + cbf_get_axis_equipment_component sets *equipment_component to the + equipment_component of axis_id or to ". " if there is no such + equipment_component. + cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the + components of the ofset of axis_id. + cbf_get_axis_rotation sets rotation to the rotation of axis_id or to + 0 if there is no such rotation. cbf_get_axis_rotation_axis sets + *rotation_axis to the rotation_axis of axis_id or to ". " if there + is no such rotation_axis. + cbf_get_axis_setting sets *start and *increment to the corresponding + values of the axis axis_id. Any of the destination pointers may be + NULL. + cbf_get_axis_type sets axis_type to the type of axis_id. + cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the + components of the vector of axis_id. + The parameter reserved is presently unused and should be set to 0. ARGUMENTS - handle CBF handle. categoryname category name which - may be an alias. categoryroot pointer to a returned category - root name. categoryroot_in input category root name. + handle CBF handle. reserved Unused. Any + value other than 0 is invalid. axis_id Axis id. + ancestor_index Integer index of the desired ancestor, starting + with 0 for the current axis_id. ancestor Pointer to + destination ancestor name pointer. depends_on Pointer to + destination depends_on name pointer. equipment Pointer to + destination equipment name pointer. equipment_component Pointer to + destination equipment_component name pointer. offset1 + Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. + rotation Pointer to destination rotation value. + rotation_axis Pointer to destination rotation_axisn name + pointer. start Pointer to the destination start + value. increment Pointer to the destination increment + value. type Pointer to destination axis type of type + . vector1 Pointer to destination first vector component + value. vector2 Pointer to destination second vector + component value. vector3 Pointer to destination third + vector component value. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_set_category_root(self, categoryname, categoryroot) - + return _pycbf.cbf_handle_struct_get_axis_setting(self, axis_id) - def get_axis_offset(self, axis_id): - """ + def get_axis_type(self, axis_id): + r""" - Returns : Float offset1,Float offset2,Float offset3 + Returns : String *args : String axis_id - C prototype: int cbf_get_axis_offset (cbf_handle handle, const char *axis_id, - double *offset1, double *offset2, double *offset3); + C prototype: int cbf_get_axis_type (cbf_handle handle, const char *axis_id, + cbf_axis_type *axis_type); CBFLib documentation: DESCRIPTION @@ -8097,1168 +7947,970 @@ def get_axis_offset(self, axis_id): ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_get_axis_offset(self, axis_id) - - - def set_pixel_size_fs(self, element_number, axis_number, psize): - """ - - Returns : - *args : Int element_number,Int axis_number,Float pixel size - - C prototype: int cbf_set_pixel_size_fs(cbf_handle handle, - unsigned int element_number, int axis_number, - double psize); - - CBFLib documentation: - DESCRIPTION - cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the - "e;size"e; column of the "array_structure_list " category - at the row which matches axis axis_number of the detector element - element_number converting the double pixel size psize from meters to - millimeters in storing it in the "size " column for the axis - axis_number of the detector element element_number. The axis_number - is numbered from 1, starting with the slowest axis. - cbf_set_pixel_size_fs sets the item - - """ - return _pycbf.cbf_handle_struct_set_pixel_size_fs(self, element_number, axis_number, psize) - - - def insert_row(self, arg): - """ - - Returns : - *args : Integer - - C prototype: int cbf_insert_row (cbf_handle handle, unsigned int rownumber); - - CBFLib documentation: - DESCRIPTION - cbf_insert_row adds a new row to the current category. The new row is - inserted as row rownumber and existing rows starting from rownumber - are moved up by 1. The new row becomes the current row. - If the category has fewer than rownumber rows, the function returns - CBF_NOTFOUND. - The row numbers start from 0. - ARGUMENTS - handle CBF handle. rownumber The row number of the new row. - RETURN VALUE - Returns an error code on failure or 0 for success. - SEE ALSO - - """ - return _pycbf.cbf_handle_struct_insert_row(self, arg) - - - def new_column(self, arg): - """ - - Returns : string - *args : - - C prototype: int cbf_new_column (cbf_handle handle, const char *columnname); - - CBFLib documentation: - DESCRIPTION - cbf_new_column creates a new column in the current category with name - columnname and makes it the current column. - If a column with this name already exists, the existing column - becomes the current category. - ARGUMENTS - handle CBF handle. columnname The name of the new column. - RETURN VALUE - Returns an error code on failure or 0 for success. - SEE ALSO - - """ - return _pycbf.cbf_handle_struct_new_column(self, arg) - - - def get_real_3d_image_as_string(self, element_number, elsize, ndimslow, ndimmid, ndimfast): - """ - - Returns : (Binary)String - *args : int element_number,int elsize,int ndimslow,int ndimmid,int ndimfast - - C prototype: int cbf_get_real_3d_image (cbf_handle handle, - unsigned int reserved, unsigned int element_number, - void *array, size_t elsize, size_t ndimslow, - size_t ndimmid, size_t ndimfast); - - CBFLib documentation: - DESCRIPTION - cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image - array for element number element_number into an array. The array - consists of ndimslow *ndimfast elements of elsize bytes each, - starting at array. The elements are signed if elsign is non-0 and - unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and - cbf_get_real_image_sf read the image array of IEEE doubles or floats - for element number element_number into an array. A real array is - always signed. cbf_get_3d_image, cbf_get_3d_image_fs and - cbf_get_3d_image_sf read the 3D image array for element number - element_number into an array. The array consists of ndimslow *ndimmid - *ndimfast elements of elsize bytes each, starting at array. The - elements are signed if elsign is non-0 and unsigned otherwise. - cbf_get_real_3d_image, cbf_get_real_3d_image_fs, - cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or - floats for element number element_number into an array. A real array - is always signed. - The _fs calls give the dimensions in a fast-to-slow order. The calls - with no suffix and the calls _sf calls give the dimensions in - slow-to-fast order - The structure of the array as a 1-, 2- or 3-dimensional array should - agree with the structure of the array given in the - ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, - ndimslow should be the array size and ndimfast and, for the 3D calls, - ndimmid, should be set to 1 both in the call and in the imgCIF data - being processed. If the array is 2-dimensional and a 3D call is used, - ndimslow and ndimmid should be the - - """ - return _pycbf.cbf_handle_struct_get_real_3d_image_as_string(self, element_number, elsize, ndimslow, ndimmid, ndimfast) - + return _pycbf.cbf_handle_struct_get_axis_type(self, axis_id) - def get_integration_time(self): - """ + def get_axis_vector(self, axis_id): + r""" - Returns : Float time - *args : + Returns : Float vector1,Float vector2,Float vector3 + *args : String axis_id - C prototype: int cbf_get_integration_time (cbf_handle handle, - unsigned int reserved, double *time); + C prototype: int cbf_get_axis_vector (cbf_handle handle, const char *axis_id, + double *vector1, double *vector2, double *vector3); CBFLib documentation: DESCRIPTION - cbf_get_integration_time sets *time to the integration time in - seconds. The parameter reserved is presently unused and should be set - to 0. + cbf_count_axis_ancestors sets ancestors to the number of ancestors of + axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor + axis of index ancestor_index of axis axis_id, starting with axis_id + for ancestor_index 0. + cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of + axis_id or to ". " if there is no such ancestor. + cbf_get_axis_equipment sets *equipment to the equipment of axis_id or + to ". " if there is no such equipment. + cbf_get_axis_equipment_component sets *equipment_component to the + equipment_component of axis_id or to ". " if there is no such + equipment_component. + cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the + components of the ofset of axis_id. + cbf_get_axis_rotation sets rotation to the rotation of axis_id or to + 0 if there is no such rotation. cbf_get_axis_rotation_axis sets + *rotation_axis to the rotation_axis of axis_id or to ". " if there + is no such rotation_axis. + cbf_get_axis_setting sets *start and *increment to the corresponding + values of the axis axis_id. Any of the destination pointers may be + NULL. + cbf_get_axis_type sets axis_type to the type of axis_id. + cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the + components of the vector of axis_id. + The parameter reserved is presently unused and should be set to 0. ARGUMENTS - handle CBF handle. reserved Unused. Any value other than 0 is - invalid. time Pointer to the destination time. + handle CBF handle. reserved Unused. Any + value other than 0 is invalid. axis_id Axis id. + ancestor_index Integer index of the desired ancestor, starting + with 0 for the current axis_id. ancestor Pointer to + destination ancestor name pointer. depends_on Pointer to + destination depends_on name pointer. equipment Pointer to + destination equipment name pointer. equipment_component Pointer to + destination equipment_component name pointer. offset1 + Pointer to destination first offset component value. offset2 + Pointer to destination second offset component value. offset3 + Pointer to destination third offset component value. + rotation Pointer to destination rotation value. + rotation_axis Pointer to destination rotation_axisn name + pointer. start Pointer to the destination start + value. increment Pointer to the destination increment + value. type Pointer to destination axis type of type + . vector1 Pointer to destination first vector component + value. vector2 Pointer to destination second vector + component value. vector3 Pointer to destination third + vector component value. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_get_integration_time(self) - + return _pycbf.cbf_handle_struct_get_axis_vector(self, axis_id) - def set_realarray(self, compression, binary_id, data, elsize, elements): - """ + def set_axis_setting(self, axis_id, start, increment): + r""" Returns : - *args : int compression,int binary_id,(binary) String data,int elsize, - int elements + *args : String axis_id,Float start,Float increment - C prototype: int cbf_set_realarray (cbf_handle handle, - unsigned int compression, int binary_id, void *array, - size_t elsize, size_t elements); + C prototype: int cbf_set_axis_setting (cbf_handle handle, + unsigned int reserved, const char *axis_id, double start, + double increment); CBFLib documentation: DESCRIPTION - cbf_set_integerarray sets the binary value of the item at the current - column and row to an integer array. The array consists of elements - elements of elsize bytes each, starting at array. The elements are - signed if elsigned is non-0 and unsigned otherwise. binary_id is the - binary section identifier. cbf_set_realarray sets the binary value of - the item at the current column and row to an integer array. The array - consists of elements elements of elsize bytes each, starting at - array. binary_id is the binary section identifier. - The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, - cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, - cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants - allow the data header values of byteorder, dimfast, dimmid, dimslow - and padding to be set to the data byte order, the fastest, second - fastest and third fastest array dimensions and the size in byte of - the post data padding to be used. - The array will be compressed using the compression scheme specifed by - compression. Currently, the available schemes are: - CBF_CANONICAL Canonical-code compression (section 3.3.1) - CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple - "nibble_offset " compression. CBF_NONE No compression. - NOTE: This scheme is by far the slowest of the four and uses much - more disk space. It is intended for routine use with small arrays - only. With large arrays (like images) it should be used only for - debugging. - The values compressed are limited to 64 bits. If any element in the - array is larger than 64 bits, the value compressed is the nearest - 64-bit value. - Currently, the source array must consist of chars, shorts or ints - (signed or unsigned), for cbf_set_integerarray, or IEEE doubles or - floats for cbf_set_realarray. If elsize is not equal to sizeof - (char), sizeof (short) or sizeof (int), the function returns - CBF_ARGUMENT. + cbf_set_axis_setting sets the starting and increment values of the + axis axis_id to start and increment. + The parameter reserved is presently unused and should be set to 0. ARGUMENTS - handle CBF handle. compression Compression method to use. - binary_id Integer binary identifier. array Pointer to the - source array. elsize Size in bytes of each source array - element. elsigned Set to non-0 if the source array elements are - signed. elements: The number of elements in the array. + handle CBF handle. reserved Unused. Any value other than 0 is + invalid. axis_id Axis id. start Start value. increment + Increment value. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_set_realarray(self, compression, binary_id, data, elsize, elements) - + return _pycbf.cbf_handle_struct_set_axis_setting(self, axis_id, start, increment) - def get_element_id(self, element_number): - """ + def construct_goniometer(self): + r""" - Returns : String - *args : Integer element_number + Returns : pycbf goniometer object + *args : - C prototype: int cbf_get_element_id (cbf_handle handle, - unsigned int element_number, const char **element_id); + C prototype: int cbf_construct_goniometer (cbf_handle handle, + cbf_goniometer *goniometer); CBFLib documentation: DESCRIPTION - cbf_get_element_number sets element_number to a number that can be - used in other cbf_simple calls to identify the detector element - element_id and optionally the specific array_id> and - array_section_id. cbf_get_element_id sets *element_id to point to the - ASCII value of the element_number'th - "diffrn_data_frame.detector_element_id " entry, counting from 0. - The element_number is the ordinal of the detector element in the - DIFFRN_DETECTOR_ELEMENT category. If an array_section_id is specified - (i.e. is not NULL), the element_number is the sum of the ordinal of - the detector element plus the number of detector elements multiplied - by the ordinal of array_section_id for the specified array_id> in the - ARRAY_STRUCTURE_LIST_SECTION category. - If the detector element does not exist, the function returns - CBF_NOTFOUND. - The element_id will be valid as long as the item exists and has not - been set to a new value. - The element_id must not be modified by the program in any way. + cbf_construct_goniometer constructs a goniometer object using the + description in the CBF object handle and initialises the goniometer + handle *goniometer. ARGUMENTS - handle CBF handle. element_number The number of the - detector element counting from 0 by order of appearance in the - "diffrn_data_frame " category. element_id Pointer to the - destination string for cbf_get_element_id, but the string itself for - cbf_get_element_number. array_id The optional array id or - NULL. array_section_id The optional array_section_id or NULL. + handle CBF handle. goniometer Pointer to the destination + goniometer handle. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_get_element_id(self, element_number) - + return _pycbf.cbf_handle_struct_construct_goniometer(self) - def get_image_sf_as_string(self, element_number, elsize, elsign, ndimslow, ndimfast): - """ + def construct_detector(self, element_number): + r""" - Returns : (Binary)String - *args : int element_number,int elsize,int elsign,int ndimslow,int ndimfast + Returns : pycbf detector object + *args : Integer element_number - C prototype: int cbf_get_image_sf (cbf_handle handle, unsigned int reserved, - unsigned int element_number, void *array, size_t elsize, - int elsign, size_t ndimslow, size_t ndimfast); + C prototype: int cbf_construct_detector (cbf_handle handle, + cbf_detector *detector, unsigned int element_number); CBFLib documentation: DESCRIPTION - cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image - array for element number element_number into an array. The array - consists of ndimslow *ndimfast elements of elsize bytes each, - starting at array. The elements are signed if elsign is non-0 and - unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and - cbf_get_real_image_sf read the image array of IEEE doubles or floats - for element number element_number into an array. A real array is - always signed. cbf_get_3d_image, cbf_get_3d_image_fs and - cbf_get_3d_image_sf read the 3D image array for element number - element_number into an array. The array consists of ndimslow *ndimmid - *ndimfast elements of elsize bytes each, starting at array. The - elements are signed if elsign is non-0 and unsigned otherwise. - cbf_get_real_3d_image, cbf_get_real_3d_image_fs, - cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or - floats for element number element_number into an array. A real array - is always signed. - The _fs calls give the dimensions in a fast-to-slow order. The calls - with no suffix and the calls _sf calls give the dimensions in - slow-to-fast order - The structure of the array as a 1-, 2- or 3-dimensional array should - agree with the structure of the array given in the - ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, - ndimslow should be the array size and ndimfast and, for the 3D calls, - ndimmid, should be set to 1 both in the call and in the imgCIF data - being processed. If the array is 2-dimensional and a 3D call is used, - ndimslow and ndimmid should be the + cbf_construct_detector constructs a detector object for detector + element number element_number using the description in the CBF object + handle and initialises the detector handle *detector. + cbf_construct_reference_detector constructs a detector object for + detector element number element_number using the description in the + CBF object handle and initialises the detector handle *detector using + the reference settings of the axes. cbf_require_reference_detector is + similar, but try to force the creations of missing intermediate + categories needed to construct a detector object. + ARGUMENTS + handle CBF handle. detector Pointer to the + destination detector handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. + RETURN VALUE + Returns an error code on failure or 0 for success. + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_get_image_sf_as_string(self, element_number, elsize, elsign, ndimslow, ndimfast) - + return _pycbf.cbf_handle_struct_construct_detector(self, element_number) - def construct_positioner(self, axis_id): - """ + def construct_reference_detector(self, element_number): + r""" - Returns : pycbf positioner object - *args : String axis_id + Returns : pycbf detector object + *args : Integer element_number - C prototype: int cbf_construct_positioner (cbf_handle handle, - cbf_positioner *positioner, const char *axis_id); + C prototype: int cbf_construct_reference_detector (cbf_handle handle, + cbf_detector *detector, unsigned int element_number); CBFLib documentation: DESCRIPTION - cbf_construct_positioner constructs a positioner object for the axis - given by axis_id using the description in the CBF object handle and - initialises the positioner handle *positioner. - cbf_construct_reference positioner constructs a positioner object for - the axis given by axis_id using the description in the CBF object - handle and initialises the detector handle *detector using the - reference settings of the axes. + cbf_construct_detector constructs a detector object for detector + element number element_number using the description in the CBF object + handle and initialises the detector handle *detector. + cbf_construct_reference_detector constructs a detector object for + detector element number element_number using the description in the + CBF object handle and initialises the detector handle *detector using + the reference settings of the axes. cbf_require_reference_detector is + similar, but try to force the creations of missing intermediate + categories needed to construct a detector object. ARGUMENTS - handle CBF handle. detector Pointer to the destination detector - handle. axis_id The identifier of the axis in the "axis " - category. + handle CBF handle. detector Pointer to the + destination detector handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_construct_positioner(self, axis_id) - - - def get_3d_image_size_fs(self, element_number): - """get_3d_image_size_fs(cbf_handle_struct self, unsigned int element_number)""" - return _pycbf.cbf_handle_struct_get_3d_image_size_fs(self, element_number) - + return _pycbf.cbf_handle_struct_construct_reference_detector(self, element_number) - def set_value(self, arg): - """ + def require_reference_detector(self, element_number): + r""" - Returns : string - *args : + Returns : pycbf detector object + *args : Integer element_number - C prototype: int cbf_set_value (cbf_handle handle, const char *value); + C prototype: int cbf_require_reference_detector (cbf_handle handle, + cbf_detector *detector, unsigned int element_number); CBFLib documentation: DESCRIPTION - cbf_set_value sets the item at the current column and row to the - ASCII value value. + cbf_construct_detector constructs a detector object for detector + element number element_number using the description in the CBF object + handle and initialises the detector handle *detector. + cbf_construct_reference_detector constructs a detector object for + detector element number element_number using the description in the + CBF object handle and initialises the detector handle *detector using + the reference settings of the axes. cbf_require_reference_detector is + similar, but try to force the creations of missing intermediate + categories needed to construct a detector object. ARGUMENTS - handle CBF handle. value ASCII value. + handle CBF handle. detector Pointer to the + destination detector handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_set_value(self, arg) - + return _pycbf.cbf_handle_struct_require_reference_detector(self, element_number) - def set_current_timestamp(self, timezone): - """ + def construct_positioner(self, axis_id): + r""" - Returns : - *args : Integer timezone + Returns : pycbf positioner object + *args : String axis_id - C prototype: int cbf_set_current_timestamp (cbf_handle handle, - unsigned int reserved, int timezone); + C prototype: int cbf_construct_positioner (cbf_handle handle, + cbf_positioner *positioner, const char *axis_id); CBFLib documentation: DESCRIPTION - cbf_set_current_timestamp sets the collection timestamp to the - current time. The timezone difference from UTC in minutes is set to - timezone. If no timezone is desired, timezone should be - CBF_NOTIMEZONE. If no timezone is used, the timest amp will be UTC. - The parameter reserved is presently unused and should be set to 0. - The new timestamp will have a precision of 1 second. + cbf_construct_positioner constructs a positioner object for the axis + given by axis_id using the description in the CBF object handle and + initialises the positioner handle *positioner. + cbf_construct_reference positioner constructs a positioner object for + the axis given by axis_id using the description in the CBF object + handle and initialises the detector handle *detector using the + reference settings of the axes. ARGUMENTS - handle CBF handle. reserved Unused. Any value other than 0 is - invalid. timezone Timezone difference from UTC in minutes or - CBF_NOTIMEZONE. + handle CBF handle. detector Pointer to the destination detector + handle. axis_id The identifier of the axis in the "axis " + category. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_set_current_timestamp(self, timezone) - + return _pycbf.cbf_handle_struct_construct_positioner(self, axis_id) - def require_doublevalue(self, defaultvalue): - """ + def construct_reference_positioner(self, axis_id): + r""" - Returns : Float Number - *args : Float Default + Returns : pycbf positioner object + *args : String axis_id - C prototype: int cbf_require_doublevalue (cbf_handle handle, double *number, - double defaultvalue); + C prototype: int cbf_construct_reference_positioner (cbf_handle handle, + cbf_positioner *positioner, const char *axis_id); CBFLib documentation: DESCRIPTION - cbf_get_doublevalue sets *number to the value of the ASCII item at - the current column and row interpreted as a decimal floating-point - number. cbf_require_doublevalue sets *number to the value of the - ASCII item at the current column and row interpreted as a decimal - floating-point number, setting it to defaultvalue if necessary. - If the value is not ASCII, the function returns CBF_BINARY. + cbf_construct_positioner constructs a positioner object for the axis + given by axis_id using the description in the CBF object handle and + initialises the positioner handle *positioner. + cbf_construct_reference positioner constructs a positioner object for + the axis given by axis_id using the description in the CBF object + handle and initialises the detector handle *detector using the + reference settings of the axes. ARGUMENTS - handle CBF handle. number Pointer to the destination - number. defaultvalue default number value. + handle CBF handle. detector Pointer to the destination detector + handle. axis_id The identifier of the axis in the "axis " + category. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO - - """ - return _pycbf.cbf_handle_struct_require_doublevalue(self, defaultvalue) - + ---------------------------------------------------------------------- - def rewind_datablock(self): """ + return _pycbf.cbf_handle_struct_construct_reference_positioner(self, axis_id) - Returns : - *args : + def get_pixel_size(self, element_number, axis_number): + r""" - C prototype: int cbf_rewind_datablock (cbf_handle handle); + Returns : Float pixel_size + *args : Int element_number,Int axis_number + + C prototype: int cbf_get_pixel_size (cbf_handle handle, + unsigned int element_number, int axis_number, + double *psize); CBFLib documentation: DESCRIPTION - cbf_rewind_datablock makes the first data block the current data - block. - If there are no data blocks, the function returns CBF_NOTFOUND. - The current category becomes undefined. + cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to + the double value in millimeters of the axis axis_number of the + detector element element_number. The axis_number is numbered from 1, + starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to + point to the double value in millimeters of the axis axis_number of + the detector element element_number. The axis_number is numbered from + 1, starting with the fastest axis. + If a negative axis number is given, the order of axes is reversed, so + that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the + fastest axis for cbf_get_pixel_size_sf. + If the pixel size is not given explcitly in the "array_element_size + " category, the function returns CBF_NOTFOUND. ARGUMENTS - handle CBF handle. + handle CBF handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. axis_number The number of the + axis, starting from 1 for the fastest for cbf_get_pixel_size and + cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. + psize Pointer to the destination pixel size. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_rewind_datablock(self) - + return _pycbf.cbf_handle_struct_get_pixel_size(self, element_number, axis_number) - def require_column_value(self, columnname, defaultvalue): - """ + def get_pixel_size_fs(self, element_number, axis_number): + r""" - Returns : String Name - *args : String columnnanme,String Default + Returns : Float pixel_size + *args : Int element_number,Int axis_number - C prototype: int cbf_require_column_value (cbf_handle handle, - const char *columnname, const char **value, - const char *defaultvalue); + C prototype: int cbf_get_pixel_size_fs(cbf_handle handle, + unsigned int element_number, int axis_number, + double *psize); CBFLib documentation: DESCRIPTION - cbf_require_column_doublevalue sets *value to the ASCII item at the - current row for the column given with the name given by *columnname, - or to the string given by defaultvalue if the item cannot be found. + cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to + the double value in millimeters of the axis axis_number of the + detector element element_number. The axis_number is numbered from 1, + starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to + point to the double value in millimeters of the axis axis_number of + the detector element element_number. The axis_number is numbered from + 1, starting with the fastest axis. + If a negative axis number is given, the order of axes is reversed, so + that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the + fastest axis for cbf_get_pixel_size_sf. + If the pixel size is not given explcitly in the "array_element_size + " category, the function returns CBF_NOTFOUND. ARGUMENTS - handle CBF handle. columnname Name of the column - containing the number. value pointer to the location to - receive the value. defaultvalue Value to use if the requested - column and value cannot be found. + handle CBF handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. axis_number The number of the + axis, starting from 1 for the fastest for cbf_get_pixel_size and + cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. + psize Pointer to the destination pixel size. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_require_column_value(self, columnname, defaultvalue) - + return _pycbf.cbf_handle_struct_get_pixel_size_fs(self, element_number, axis_number) - def get_dictionary(self): - """ + def get_pixel_size_sf(self, element_number, axis_number): + r""" - Returns : CBFHandle dictionary - *args : + Returns : Float pixel_size + *args : Int element_number,Int axis_number - C prototype: int cbf_get_dictionary (cbf_handle handle, - cbf_handle * dictionary); + C prototype: int cbf_get_pixel_size_sf(cbf_handle handle, + unsigned int element_number, int axis_number, + double *psize); CBFLib documentation: DESCRIPTION - cbf_get_dictionary sets *dictionary to the handle of a CBF which has - been associated with the CBF handle by cbf_set_dictionary. - cbf_set_dictionary associates the CBF handle dictionary_in with - handle as its dictionary. cbf_require_dictionary sets *dictionary to - the handle of a CBF which has been associated with the CBF handle by - cbf_set_dictionary or creates a new empty CBF and associates it with - handle, returning the new handle in *dictionary. + cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to + the double value in millimeters of the axis axis_number of the + detector element element_number. The axis_number is numbered from 1, + starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to + point to the double value in millimeters of the axis axis_number of + the detector element element_number. The axis_number is numbered from + 1, starting with the fastest axis. + If a negative axis number is given, the order of axes is reversed, so + that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the + fastest axis for cbf_get_pixel_size_sf. + If the pixel size is not given explcitly in the "array_element_size + " category, the function returns CBF_NOTFOUND. ARGUMENTS - handle CBF handle. dictionary Pointer to CBF handle of - dictionary. dictionary_in CBF handle of dcitionary. + handle CBF handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. axis_number The number of the + axis, starting from 1 for the fastest for cbf_get_pixel_size and + cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. + psize Pointer to the destination pixel size. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_get_dictionary(self) - + return _pycbf.cbf_handle_struct_get_pixel_size_sf(self, element_number, axis_number) - def reset_saveframe(self): - """ + def set_pixel_size(self, element_number, axis_number, psize): + r""" Returns : - *args : + *args : Int element_number,Int axis_number,Float pixel size - C prototype: int cbf_reset_saveframe (cbf_handle handle); + C prototype: int cbf_set_pixel_size (cbf_handle handle, + unsigned int element_number, int axis_number, + double psize); CBFLib documentation: DESCRIPTION - cbf_reset_datablock deletes all categories from the current data - block. cbf_reset_saveframe deletes all categories from the current - save frame. - ARGUMENTS - handle CBF handle. - RETURN VALUE - Returns an error code on failure or 0 for success. - SEE ALSO + cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the + "e;size"e; column of the "array_structure_list " category + at the row which matches axis axis_number of the detector element + element_number converting the double pixel size psize from meters to + millimeters in storing it in the "size " column for the axis + axis_number of the detector element element_number. The axis_number + is numbered from 1, starting with the slowest axis. + cbf_set_pixel_size_fs sets the item """ - return _pycbf.cbf_handle_struct_reset_saveframe(self) - + return _pycbf.cbf_handle_struct_set_pixel_size(self, element_number, axis_number, psize) - def set_reciprocal_cell(self, cell): - """ + def set_pixel_size_fs(self, element_number, axis_number, psize): + r""" Returns : - *args : double cell[6] + *args : Int element_number,Int axis_number,Float pixel size - C prototype: int cbf_set_reciprocal_cell (cbf_handle handle, double cell[6], - double cell_esd[6] ); + C prototype: int cbf_set_pixel_size_fs(cbf_handle handle, + unsigned int element_number, int axis_number, + double psize); CBFLib documentation: DESCRIPTION - cbf_set_reciprocal_cell sets the reciprocal cell parameters to the - double values given in cell[0:2] for the reciprocal cell edge lengths - a*, b* and c* in AAngstroms-1, the double values given in cell[3:5] - for the reciprocal cell angles a*, b* and g* in degrees, the double - values given in cell_esd[0:2] for the estimated strandard deviations - of the reciprocal cell edge lengths a*, b* and c* in AAngstroms, and - the double values given in cell_esd[3:5] for the estimated standard - deviations of the reciprocal cell angles a*, b* and g* in degrees. - The values are placed in the first row of the "cell " category. If - no value has been given for "_cell.entry_id ", it is set to the - value of the "diffrn.id " entry of the current data block. - cell or cell_esd may be NULL. - If cell is NULL, the reciprocal cell parameters are not set. - If cell_esd is NULL, the reciprocal cell parameter esds are not set. - If the "cell " category is not present, it is created. If any of - the necessary columns are not present, they are created. - ARGUMENTS - handle CBF handle. cell Pointer to the array of 6 doubles - for the reciprocal cell parameters. cell_esd Pointer to the array - of 6 doubles for the reciprocal cell parameter esds. - RETURN VALUE - Returns an error code on failure or 0 for success. - SEE ALSO + cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the + "e;size"e; column of the "array_structure_list " category + at the row which matches axis axis_number of the detector element + element_number converting the double pixel size psize from meters to + millimeters in storing it in the "size " column for the axis + axis_number of the detector element element_number. The axis_number + is numbered from 1, starting with the slowest axis. + cbf_set_pixel_size_fs sets the item """ - return _pycbf.cbf_handle_struct_set_reciprocal_cell(self, cell) + return _pycbf.cbf_handle_struct_set_pixel_size_fs(self, element_number, axis_number, psize) + + def set_pixel_size_sf(self, element_number, axis_number, psize): + r""" + Returns : + *args : Int element_number,Int axis_number,Float pixel size + + C prototype: int cbf_set_pixel_size_sf(cbf_handle handle, + unsigned int element_number, int axis_number, + double psize); + + CBFLib documentation: + DESCRIPTION + cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the + "e;size"e; column of the "array_structure_list " category + at the row which matches axis axis_number of the detector element + element_number converting the double pixel size psize from meters to + millimeters in storing it in the "size " column for the axis + axis_number of the detector element element_number. The axis_number + is numbered from 1, starting with the slowest axis. + cbf_set_pixel_size_fs sets the item - def set_reciprocal_cell_esd(self, cell_esd): """ + return _pycbf.cbf_handle_struct_set_pixel_size_sf(self, element_number, axis_number, psize) - Returns : - *args : double cell_esd[6] + def get_unit_cell(self): + r""" - C prototype: int cbf_set_reciprocal_cell (cbf_handle handle, double cell[6], + Returns : Float a,Float b,Float c,Float alpha,Float beta,Float gamma + *args : + + C prototype: int cbf_get_unit_cell (cbf_handle handle, double cell[6], double cell_esd[6] ); CBFLib documentation: DESCRIPTION - cbf_set_reciprocal_cell sets the reciprocal cell parameters to the - double values given in cell[0:2] for the reciprocal cell edge lengths - a*, b* and c* in AAngstroms-1, the double values given in cell[3:5] - for the reciprocal cell angles a*, b* and g* in degrees, the double - values given in cell_esd[0:2] for the estimated strandard deviations - of the reciprocal cell edge lengths a*, b* and c* in AAngstroms, and - the double values given in cell_esd[3:5] for the estimated standard - deviations of the reciprocal cell angles a*, b* and g* in degrees. - The values are placed in the first row of the "cell " category. If - no value has been given for "_cell.entry_id ", it is set to the - value of the "diffrn.id " entry of the current data block. + cbf_get_unit_cell sets cell[0:2] to the double values of the cell + edge lengths a, b and c in AAngstroms, cell[3:5] to the double values + of the cell angles a, b and g in degrees, cell_esd[0:2] to the double + values of the estimated strandard deviations of the cell edge lengths + a, b and c in AAngstroms, cell_esd[3:5] to the double values of the + estimated standard deviations of the the cell angles a, b and g in + degrees. + The values returned are retrieved from the first row of the "cell + " category. The value of "_cell.entry_id " is ignored. cell or cell_esd may be NULL. - If cell is NULL, the reciprocal cell parameters are not set. - If cell_esd is NULL, the reciprocal cell parameter esds are not set. - If the "cell " category is not present, it is created. If any of - the necessary columns are not present, they are created. - ARGUMENTS - handle CBF handle. cell Pointer to the array of 6 doubles - for the reciprocal cell parameters. cell_esd Pointer to the array - of 6 doubles for the reciprocal cell parameter esds. + If cell is NULL, the cell parameters are not retrieved. + If cell_esd is NULL, the cell parameter esds are not retrieved. + If the "cell " category is present, but some of the values are + missing, zeros are returned for the missing values. + ARGUMENTS + handle CBF handle. cell Pointer to the destination array of + 6 doubles for the cell parameters. cell_esd Pointer to the + destination array of 6 doubles for the cell parameter esds. RETURN VALUE - Returns an error code on failure or 0 for success. + Returns an error code on failure or 0 for success. No errors is + returned for missing values if the "cell " category exists. SEE ALSO """ - return _pycbf.cbf_handle_struct_set_reciprocal_cell_esd(self, cell_esd) + return _pycbf.cbf_handle_struct_get_unit_cell(self) + def get_unit_cell_esd(self): + r"""get_unit_cell_esd(cbf_handle_struct self)""" + return _pycbf.cbf_handle_struct_get_unit_cell_esd(self) - def set_real_3d_image_fs(self, element_number, compression, data, elsize, ndimfast, ndimmid, ndimslow): - """ + def set_unit_cell(self, cell): + r""" Returns : - *args : int element_number,int compression,(binary) String data,int elsize, - int dimfast,int dimmid,int dimslow + *args : double cell[6] - C prototype: int cbf_set_real_3d_image_fs(cbf_handle handle, - unsigned int reserved, unsigned int element_number, - unsigned int compression, void *array,size_t elsize, - size_t ndimfast, size_t ndimmid, size_t ndimslow); + C prototype: int cbf_set_unit_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); CBFLib documentation: DESCRIPTION - cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image - array for element number element_number. The array consists of - ndimfast *ndimslow elements of elsize bytes each, starting at array. - The elements are signed if elsign is non-zero and unsigned otherwise. - cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf - write the image array for element number element_number. The array - consists of ndimfast *ndimslow IEEE double or float elements of - elsize bytes each, starting at array. cbf_set_3d_image, - cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array - for element number element_number. The array consists of ndimfast - *ndimmid *ndimslow elements of elsize bytes each, starting at array. - The elements are signed if elsign is non-0 and unsigned otherwise. - cbf_set_real_3d_image, cbf_set_real_3d_image_fs and - cbf_set_real_3d_image_sf writes the 3D image array for element number - element_number. The array consists of ndimfast *ndimmid *ndimslow - IEEE double or float elements of elsize bytes each, starting at - array. - The _fs calls give the dimensions in a fast-to-slow order. The calls - with no suffix and the calls _sf calls give the dimensions in - slow-to-fast order - If the array is 1-dimensional, ndimslow should be the array size and - ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the - array is 2-dimensional and the 3D calls are used, ndimslow and - ndimmid should be used for the array dimensions and ndimfast should - be set to 1. - The array will be compressed using the compression scheme specifed by - compression. Currently, the available schemes are: - CBF_CANONICAL Canonical-code compression (section 3.3.1) - CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple - "nibble_offset " compression. CBF_NONE No compression. - The values compressed are limited to 64 bits. If any element in the - array is larger than 64 bits, the value compressed is the nearest - 64-bit value. - Currently, the source array must consist of chars, shorts or ints - (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for - cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof - (int), sizeof(double) or sizeof(float), the function returns - CBF_ARGUMENT. - The parameter reserved is presently unused and should be set to 0. + cbf_set_unit_cell sets the cell parameters to the double values given + in cell[0:2] for the cell edge lengths a, b and c in AAngstroms, the + double values given in cell[3:5] for the cell angles a, b and g in + degrees, the double values given in cell_esd[0:2] for the estimated + strandard deviations of the cell edge lengths a, b and c in + AAngstroms, and the double values given in cell_esd[3:5] for the + estimated standard deviations of the the cell angles a, b and g in + degrees. + The values are placed in the first row of the "cell " category. If + no value has been given for "_cell.entry_id ", it is set to the + value of the "diffrn.id " entry of the current data block. + cell or cell_esd may be NULL. + If cell is NULL, the cell parameters are not set. + If cell_esd is NULL, the cell parameter esds are not set. + If the "cell " category is not present, it is created. If any of + the necessary columns are not present, they are created. ARGUMENTS - handle CBF handle. reserved Unused. Any value other - than 0 is invalid. element_number The number of the detector - element counting from 0 by order of appearance in the - "diffrn_data_frame " category. compression Compression type. - array Pointer to the image array. elsize Size in - bytes of each image array element. elsigned Set to non-0 if - the image array elements are signed. ndimslow Slowest array - dimension. ndimmid Second slowest array dimension. ndimfast - Fastest array dimension. + handle CBF handle. cell Pointer to the array of 6 doubles + for the cell parameters. cell_esd Pointer to the array of 6 doubles + for the cell parameter esds. RETURN VALUE Returns an error code on failure or 0 for success. - ---------------------------------------------------------------------- + SEE ALSO """ - return _pycbf.cbf_handle_struct_set_real_3d_image_fs(self, element_number, compression, data, elsize, ndimfast, ndimmid, ndimslow) - + return _pycbf.cbf_handle_struct_set_unit_cell(self, cell) - def set_doublevalue(self, format, number): - """ + def set_unit_cell_esd(self, cell_esd): + r""" Returns : - *args : String format,Float number + *args : double cell_esd[6] - C prototype: int cbf_set_doublevalue (cbf_handle handle, const char *format, - double number); + C prototype: int cbf_set_unit_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); CBFLib documentation: DESCRIPTION - cbf_set_doublevalue sets the item at the current column and row to - the floating-point value number written as an ASCII string with the - format specified by format as appropriate for the printf function. + cbf_set_unit_cell sets the cell parameters to the double values given + in cell[0:2] for the cell edge lengths a, b and c in AAngstroms, the + double values given in cell[3:5] for the cell angles a, b and g in + degrees, the double values given in cell_esd[0:2] for the estimated + strandard deviations of the cell edge lengths a, b and c in + AAngstroms, and the double values given in cell_esd[3:5] for the + estimated standard deviations of the the cell angles a, b and g in + degrees. + The values are placed in the first row of the "cell " category. If + no value has been given for "_cell.entry_id ", it is set to the + value of the "diffrn.id " entry of the current data block. + cell or cell_esd may be NULL. + If cell is NULL, the cell parameters are not set. + If cell_esd is NULL, the cell parameter esds are not set. + If the "cell " category is not present, it is created. If any of + the necessary columns are not present, they are created. ARGUMENTS - handle CBF handle. format Format for the number. number - Floating-point value. + handle CBF handle. cell Pointer to the array of 6 doubles + for the cell parameters. cell_esd Pointer to the array of 6 doubles + for the cell parameter esds. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_set_doublevalue(self, format, number) - + return _pycbf.cbf_handle_struct_set_unit_cell_esd(self, cell_esd) - def find_category(self, arg): - """ + def get_reciprocal_cell(self): + r""" - Returns : string + Returns : Float astar,Float bstar,Float cstar,Float alphastar,Float betastar, + Float gammastar *args : - C prototype: int cbf_find_category (cbf_handle handle, - const char *categoryname); + C prototype: int cbf_get_reciprocal_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); CBFLib documentation: DESCRIPTION - cbf_find_category makes the category in the current data block with - name categoryname the current category. - The comparison is case-insensitive. - If the category does not exist, the function returns CBF_NOTFOUND. - The current column and row become undefined. + cbf_get_reciprocal_cell sets cell[0:2] to the double values of the + reciprocal cell edge lengths a*, b* and c* in AAngstroms-1, cell[3:5] + to the double values of the reciprocal cell angles a*, b* and g* in + degrees, cell_esd[0:2] to the double values of the estimated + strandard deviations of the reciprocal cell edge lengths a*, b* and + c* in AAngstroms-1, cell_esd[3:5] to the double values of the + estimated standard deviations of the the reciprocal cell angles a*, + b* and g* in degrees. + The values returned are retrieved from the first row of the "cell + " category. The value of "_cell.entry_id " is ignored. + cell or cell_esd may be NULL. + If cell is NULL, the reciprocal cell parameters are not retrieved. + If cell_esd is NULL, the reciprocal cell parameter esds are not + retrieved. + If the "cell " category is present, but some of the values are + missing, zeros are returned for the missing values. ARGUMENTS - handle CBF handle. categoryname The name of the category to - find. + handle CBF handle. cell Pointer to the destination array of + 6 doubles for the reciprocal cell parameters. cell_esd Pointer to + the destination array of 6 doubles for the reciprocal cell parameter + esds. RETURN VALUE - Returns an error code on failure or 0 for success. + Returns an error code on failure or 0 for success. No errors is + returned for missing values if the "cell " category exists. SEE ALSO """ - return _pycbf.cbf_handle_struct_find_category(self, arg) + return _pycbf.cbf_handle_struct_get_reciprocal_cell(self) + def get_reciprocal_cell_esd(self): + r"""get_reciprocal_cell_esd(cbf_handle_struct self)""" + return _pycbf.cbf_handle_struct_get_reciprocal_cell_esd(self) - def get_integerarrayparameters_wdims_fs(self): - """ + def set_reciprocal_cell(self, cell): + r""" - Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned, - int elements,int minelement,int maxelement,char **bo,int *bolen, - int dimfast,int dimmid,int dimslow,int padding - *args : + Returns : + *args : double cell[6] - C prototype: int cbf_get_integerarrayparameters_wdims_fs (cbf_handle handle, - unsigned int *compression, int *binary_id, size_t *elsize, - int *elsigned, int *elunsigned, size_t *elements, - int *minelement, int *maxelement, const char **byteorder, - size_t *dimfast, size_t *dimmid, size_t *dimslow, - size_t *padding); + C prototype: int cbf_set_reciprocal_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); CBFLib documentation: DESCRIPTION - cbf_get_integerarrayparameters sets *compression, *binary_id, - *elsize, *elsigned, *elunsigned, *elements, *minelement and - *maxelement to values read from the binary value of the item at the - current column and row. This provides all the arguments needed for a - subsequent call to cbf_set_integerarray, if a copy of the array is to - be made into another CIF or CBF. cbf_get_realarrayparameters sets - *compression, *binary_id, *elsize, *elements to values read from the - binary value of the item at the current column and row. This provides - all the arguments needed for a subsequent call to cbf_set_realarray, - if a copy of the arry is to be made into another CIF or CBF. - The variants cbf_get_integerarrayparameters_wdims, - cbf_get_integerarrayparameters_wdims_fs, - cbf_get_integerarrayparameters_wdims_sf, - cbf_get_realarrayparameters_wdims, - cbf_get_realarrayparameters_wdims_fs, - cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, - *dimmid, *dimslow, and *padding as well, providing the additional - parameters needed for a subsequent call to cbf_set_integerarray_wdims - or cbf_set_realarray_wdims. - The value returned in *byteorder is a pointer either to the string - "little_endian " or to the string "big_endian ". This should be - the byte order of the data, not necessarily of the host machine. No - attempt should be made to modify this string. At this time only - "little_endian " will be returned. - The values returned in *dimfast, *dimmid and *dimslow are the sizes - of the fastest changing, second fastest changing and third fastest - changing dimensions of the array, if specified, or zero, if not - specified. - The value returned in *padding is the size of the post-data padding, - if any and if specified in the data header. The value is given as a - count of octets. - If the value is not binary, the function returns CBF_ASCII. + cbf_set_reciprocal_cell sets the reciprocal cell parameters to the + double values given in cell[0:2] for the reciprocal cell edge lengths + a*, b* and c* in AAngstroms-1, the double values given in cell[3:5] + for the reciprocal cell angles a*, b* and g* in degrees, the double + values given in cell_esd[0:2] for the estimated strandard deviations + of the reciprocal cell edge lengths a*, b* and c* in AAngstroms, and + the double values given in cell_esd[3:5] for the estimated standard + deviations of the reciprocal cell angles a*, b* and g* in degrees. + The values are placed in the first row of the "cell " category. If + no value has been given for "_cell.entry_id ", it is set to the + value of the "diffrn.id " entry of the current data block. + cell or cell_esd may be NULL. + If cell is NULL, the reciprocal cell parameters are not set. + If cell_esd is NULL, the reciprocal cell parameter esds are not set. + If the "cell " category is not present, it is created. If any of + the necessary columns are not present, they are created. ARGUMENTS - handle CBF handle. compression Compression method used. - elsize Size in bytes of each array element. binary_id - Pointer to the destination integer binary identifier. elsigned - Pointer to an integer. Set to 1 if the elements can be read as signed - integers. elunsigned Pointer to an integer. Set to 1 if the - elements can be read as unsigned integers. elements Pointer to - the destination number of elements. minelement Pointer to the - destination smallest element. maxelement Pointer to the - destination largest element. byteorder Pointer to the destination - byte order. dimfast Pointer to the destination fastest - dimension. dimmid Pointer to the destination second fastest - dimension. dimslow Pointer to the destination third fastest - dimension. padding Pointer to the destination padding size. + handle CBF handle. cell Pointer to the array of 6 doubles + for the reciprocal cell parameters. cell_esd Pointer to the array + of 6 doubles for the reciprocal cell parameter esds. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_get_integerarrayparameters_wdims_fs(self) - + return _pycbf.cbf_handle_struct_set_reciprocal_cell(self, cell) - def set_realarray_wdims_fs(self, compression, binary_id, data, elsize, elements, bo, dimfast, dimmid, dimslow, padding): - """ + def set_reciprocal_cell_esd(self, cell_esd): + r""" Returns : - *args : int compression,int binary_id,(binary) String data,int elsize, - int elements,String byteorder,int dimfast,int dimmid,int dimslow, - int padding + *args : double cell_esd[6] - C prototype: int cbf_set_realarray_wdims_fs (cbf_handle handle, - unsigned int compression, int binary_id, void *array, - size_t elsize, size_t elements, const char *byteorder, - size_t dimfast, size_t dimmid, size_t dimslow, - size_t padding); + C prototype: int cbf_set_reciprocal_cell (cbf_handle handle, double cell[6], + double cell_esd[6] ); CBFLib documentation: DESCRIPTION - cbf_set_integerarray sets the binary value of the item at the current - column and row to an integer array. The array consists of elements - elements of elsize bytes each, starting at array. The elements are - signed if elsigned is non-0 and unsigned otherwise. binary_id is the - binary section identifier. cbf_set_realarray sets the binary value of - the item at the current column and row to an integer array. The array - consists of elements elements of elsize bytes each, starting at - array. binary_id is the binary section identifier. - The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, - cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, - cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants - allow the data header values of byteorder, dimfast, dimmid, dimslow - and padding to be set to the data byte order, the fastest, second - fastest and third fastest array dimensions and the size in byte of - the post data padding to be used. - The array will be compressed using the compression scheme specifed by - compression. Currently, the available schemes are: - CBF_CANONICAL Canonical-code compression (section 3.3.1) - CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple - "nibble_offset " compression. CBF_NONE No compression. - NOTE: This scheme is by far the slowest of the four and uses much - more disk space. It is intended for routine use with small arrays - only. With large arrays (like images) it should be used only for - debugging. - The values compressed are limited to 64 bits. If any element in the - array is larger than 64 bits, the value compressed is the nearest - 64-bit value. - Currently, the source array must consist of chars, shorts or ints - (signed or unsigned), for cbf_set_integerarray, or IEEE doubles or - floats for cbf_set_realarray. If elsize is not equal to sizeof - (char), sizeof (short) or sizeof (int), the function returns - CBF_ARGUMENT. + cbf_set_reciprocal_cell sets the reciprocal cell parameters to the + double values given in cell[0:2] for the reciprocal cell edge lengths + a*, b* and c* in AAngstroms-1, the double values given in cell[3:5] + for the reciprocal cell angles a*, b* and g* in degrees, the double + values given in cell_esd[0:2] for the estimated strandard deviations + of the reciprocal cell edge lengths a*, b* and c* in AAngstroms, and + the double values given in cell_esd[3:5] for the estimated standard + deviations of the reciprocal cell angles a*, b* and g* in degrees. + The values are placed in the first row of the "cell " category. If + no value has been given for "_cell.entry_id ", it is set to the + value of the "diffrn.id " entry of the current data block. + cell or cell_esd may be NULL. + If cell is NULL, the reciprocal cell parameters are not set. + If cell_esd is NULL, the reciprocal cell parameter esds are not set. + If the "cell " category is not present, it is created. If any of + the necessary columns are not present, they are created. ARGUMENTS - handle CBF handle. compression Compression method to use. - binary_id Integer binary identifier. array Pointer to the - source array. elsize Size in bytes of each source array - element. elsigned Set to non-0 if the source array elements are - signed. elements: The number of elements in the array. + handle CBF handle. cell Pointer to the array of 6 doubles + for the reciprocal cell parameters. cell_esd Pointer to the array + of 6 doubles for the reciprocal cell parameter esds. RETURN VALUE Returns an error code on failure or 0 for success. SEE ALSO """ - return _pycbf.cbf_handle_struct_set_realarray_wdims_fs(self, compression, binary_id, data, elsize, elements, bo, dimfast, dimmid, dimslow, padding) - + return _pycbf.cbf_handle_struct_set_reciprocal_cell_esd(self, cell_esd) - def find_category_root(self, categoryname): - """ + def get_orientation_matrix(self): + r""" - Returns : String categoryroot - *args : String categoryname + Returns : Float matrix_0,Float matrix_1,Float matrix_2,Float matrix_3, + Float matrix_4,Float matrix_5,Float matrix_6,Float matrix_7, + Float matrix_8 + *args : - C prototype: int cbf_find_category_root (cbf_handle handle, - const char* categoryname, const char** categoryroot); + C prototype: int cbf_get_orientation_matrix (cbf_handle handle, + double ub_matrix[9]); CBFLib documentation: DESCRIPTION - cbf_find_category_root sets *categoryroot to the root category of - which categoryname is an alias. cbf_set_category_root sets - categoryname_in as an alias of categoryroot in the dictionary - associated with handle, creating the dictionary if necessary. - cbf_require_category_root sets *categoryroot to the root category of - which categoryname is an alias, if there is one, or to the value of - categoryname, if categoryname is not an alias. - A returned categoryroot string must not be modified in any way. + cbf_get_orientation_matrix sets ub_matrix to point to the array of + orientation matrix entries in the "diffrn " category in the order + of columns: + "UB[1][1] " "UB[1][2] " "UB[1][3] " "UB[2][1] " + "UB[2][2] " "UB[2][3] " "UB[3][1] " "UB[3][2] " + "UB[3][3] " + cbf_set_orientation_matrix sets the values in the "diffrn " + category to the values pointed to by ub_matrix. ARGUMENTS - handle CBF handle. categoryname category name which - may be an alias. categoryroot pointer to a returned category - root name. categoryroot_in input category root name. + handle CBF handle. ubmatric Source or destination array of 9 + doubles giving the orientation matrix parameters. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_find_category_root(self, categoryname) - + return _pycbf.cbf_handle_struct_get_orientation_matrix(self) - def set_integerarray_wdims_fs(self, compression, binary_id, data, elsize, elsigned, elements, bo, dimfast, dimmid, dimslow, padding): - """ + def set_orientation_matrix(self, m0, m1, m2, m3, m4, m5, m6, m7, m8): + r""" Returns : - *args : int compression,int binary_id,(binary) String data,int elsize, - int elsigned,int elements,String byteorder,int dimfast,int dimmid, - int dimslow,int padding + *args : Float matrix_0,Float matrix_1,Float matrix_2,Float matrix_3, + Float matrix_4,Float matrix_5,Float matrix_6,Float matrix_7, + Float matrix_8 - C prototype: int cbf_set_integerarray_wdims_fs (cbf_handle handle, - unsigned int compression, int binary_id, void *array, - size_t elsize, int elsigned, size_t elements, - const char *byteorder, size_t dimfast, size_t dimmid, - size_t dimslow, size_t padding); + C prototype: int cbf_set_orientation_matrix (cbf_handle handle, + double ub_matrix[9]); CBFLib documentation: DESCRIPTION - cbf_set_integerarray sets the binary value of the item at the current - column and row to an integer array. The array consists of elements - elements of elsize bytes each, starting at array. The elements are - signed if elsigned is non-0 and unsigned otherwise. binary_id is the - binary section identifier. cbf_set_realarray sets the binary value of - the item at the current column and row to an integer array. The array - consists of elements elements of elsize bytes each, starting at - array. binary_id is the binary section identifier. - The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, - cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, - cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants - allow the data header values of byteorder, dimfast, dimmid, dimslow - and padding to be set to the data byte order, the fastest, second - fastest and third fastest array dimensions and the size in byte of - the post data padding to be used. - The array will be compressed using the compression scheme specifed by - compression. Currently, the available schemes are: - CBF_CANONICAL Canonical-code compression (section 3.3.1) - CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple - "nibble_offset " compression. CBF_NONE No compression. - NOTE: This scheme is by far the slowest of the four and uses much - more disk space. It is intended for routine use with small arrays - only. With large arrays (like images) it should be used only for - debugging. - The values compressed are limited to 64 bits. If any element in the - array is larger than 64 bits, the value compressed is the nearest - 64-bit value. - Currently, the source array must consist of chars, shorts or ints - (signed or unsigned), for cbf_set_integerarray, or IEEE doubles or - floats for cbf_set_realarray. If elsize is not equal to sizeof - (char), sizeof (short) or sizeof (int), the function returns - CBF_ARGUMENT. + cbf_get_orientation_matrix sets ub_matrix to point to the array of + orientation matrix entries in the "diffrn " category in the order + of columns: + "UB[1][1] " "UB[1][2] " "UB[1][3] " "UB[2][1] " + "UB[2][2] " "UB[2][3] " "UB[3][1] " "UB[3][2] " + "UB[3][3] " + cbf_set_orientation_matrix sets the values in the "diffrn " + category to the values pointed to by ub_matrix. ARGUMENTS - handle CBF handle. compression Compression method to use. - binary_id Integer binary identifier. array Pointer to the - source array. elsize Size in bytes of each source array - element. elsigned Set to non-0 if the source array elements are - signed. elements: The number of elements in the array. + handle CBF handle. ubmatric Source or destination array of 9 + doubles giving the orientation matrix parameters. RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_set_integerarray_wdims_fs(self, compression, binary_id, data, elsize, elsigned, elements, bo, dimfast, dimmid, dimslow, padding) - + return _pycbf.cbf_handle_struct_set_orientation_matrix(self, m0, m1, m2, m3, m4, m5, m6, m7, m8) - def set_image_sf(self, element_number, compression, data, elsize, elsign, ndimslow, ndimfast): - """ + def get_bin_sizes(self, element_number): + r""" - Returns : - *args : int element_number,int compression,(binary) String data,int elsize, - int elsign,int dimslow,int dimfast + Returns : Float slowbinsize,Float fastbinsize + *args : Integer element_number - C prototype: int cbf_set_image_sf(cbf_handle handle, unsigned int reserved, - unsigned int element_number, unsigned int compression, - void *array, size_t elsize, int elsign, size_t ndimslow, - size_t ndimfast); + C prototype: int cbf_get_bin_sizes(cbf_handle handle, + unsigned int element_number, double * slowbinsize, + double * fastbinsize); CBFLib documentation: DESCRIPTION - cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image - array for element number element_number. The array consists of - ndimfast *ndimslow elements of elsize bytes each, starting at array. - The elements are signed if elsign is non-zero and unsigned otherwise. - cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf - write the image array for element number element_number. The array - consists of ndimfast *ndimslow IEEE double or float elements of - elsize bytes each, starting at array. cbf_set_3d_image, - cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array - for element number element_number. The array consists of ndimfast - *ndimmid *ndimslow elements of elsize bytes each, starting at array. - The elements are signed if elsign is non-0 and unsigned otherwise. - cbf_set_real_3d_image, cbf_set_real_3d_image_fs and - cbf_set_real_3d_image_sf writes the 3D image array for element number - element_number. The array consists of ndimfast *ndimmid *ndimslow - IEEE double or float elements of elsize bytes each, starting at - array. - The _fs calls give the dimensions in a fast-to-slow order. The calls - with no suffix and the calls _sf calls give the dimensions in - slow-to-fast order - If the array is 1-dimensional, ndimslow should be the array size and - ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the - array is 2-dimensional and the 3D calls are used, ndimslow and - ndimmid should be used for the array dimensions and ndimfast should - be set to 1. - The array will be compressed using the compression scheme specifed by - compression. Currently, the available schemes are: - CBF_CANONICAL Canonical-code compression (section 3.3.1) - CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 - CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET - Simple "byte_offset " compression. CBF_NIBBLE_OFFSET Simple - "nibble_offset " compression. CBF_NONE No compression. - The values compressed are limited to 64 bits. If any element in the - array is larger than 64 bits, the value compressed is the nearest - 64-bit value. - Currently, the source array must consist of chars, shorts or ints - (signed or unsigned)for cbf_set_image, or IEEE doubles or floats for - cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof - (int), sizeof(double) or sizeof(float), the function returns - CBF_ARGUMENT. - The parameter reserved is presently unused and should be set to 0. + cbf_get_bin_sizes sets slowbinsize to point to the value of the + number of pixels composing one array element in the dimension that + changes at the second-fastest rate and fastbinsize to point to the + value of the number of pixels composing one array element in the + dimension that changes at the fastest rate for the dectector element + with the ordinal element_number. cbf_set_bin_sizes sets the the pixel + bin sizes in the "array_intensities " category to the values of + slowbinsize_in for the number of pixels composing one array element + in the dimension that changes at the second-fastest rate and + fastbinsize_in for the number of pixels composing one array element + in the dimension that changes at the fastest rate for the dectector + element with the ordinal element_number. + In order to allow for software binning involving fractions of pixels, + the bin sizes are doubles rather than ints. ARGUMENTS - handle CBF handle. reserved Unused. Any value other - than 0 is invalid. element_number The number of the detector - element counting from 0 by order of appearance in the - "diffrn_data_frame " category. compression Compression type. - array Pointer to the image array. elsize Size in - bytes of each image array element. elsigned Set to non-0 if - the image array elements are signed. ndimslow Slowest array - dimension. ndimmid Second slowest array dimension. ndimfast - Fastest array dimension. + handle CBF handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. slowbinsize Pointer to the + returned number of pixels composing one array element in the + dimension that changes at the second-fastest rate. fastbinsize + Pointer to the returned number of pixels composing one array element + in the dimension that changes at the fastest rate. slowbinsize_in + The number of pixels composing one array element in the dimension + that changes at the second-fastest rate. fastbinsize_in The number + of pixels composing one array element in the dimension that changes + at the fastest rate. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_set_image_sf(self, element_number, compression, data, elsize, elsign, ndimslow, ndimfast) - + return _pycbf.cbf_handle_struct_get_bin_sizes(self, element_number) - def get_axis_equipment(self, axis_id): - """ + def set_bin_sizes(self, element_number, slowbinsize_in, fastbinsize_in): + r""" - Returns : String - *args : String axis_id + Returns : + *args : Integer element_number,Float slowbinsize_in,Float fastbinsize_in - C prototype: int cbf_get_axis_equipment (cbf_handle handle, - const char *axis_id, const char * *equipment); + C prototype: int cbf_set_bin_sizes(cbf_handle handle, + unsigned int element_number, double slowbinsize_in, + double fastbinsize_in); CBFLib documentation: DESCRIPTION - cbf_count_axis_ancestors sets ancestors to the number of ancestors of - axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor - axis of index ancestor_index of axis axis_id, starting with axis_id - for ancestor_index 0. - cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of - axis_id or to ". " if there is no such ancestor. - cbf_get_axis_equipment sets *equipment to the equipment of axis_id or - to ". " if there is no such equipment. - cbf_get_axis_equipment_component sets *equipment_component to the - equipment_component of axis_id or to ". " if there is no such - equipment_component. - cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the - components of the ofset of axis_id. - cbf_get_axis_rotation sets rotation to the rotation of axis_id or to - 0 if there is no such rotation. cbf_get_axis_rotation_axis sets - *rotation_axis to the rotation_axis of axis_id or to ". " if there - is no such rotation_axis. - cbf_get_axis_setting sets *start and *increment to the corresponding - values of the axis axis_id. Any of the destination pointers may be - NULL. - cbf_get_axis_type sets axis_type to the type of axis_id. - cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the - components of the vector of axis_id. - The parameter reserved is presently unused and should be set to 0. + cbf_get_bin_sizes sets slowbinsize to point to the value of the + number of pixels composing one array element in the dimension that + changes at the second-fastest rate and fastbinsize to point to the + value of the number of pixels composing one array element in the + dimension that changes at the fastest rate for the dectector element + with the ordinal element_number. cbf_set_bin_sizes sets the the pixel + bin sizes in the "array_intensities " category to the values of + slowbinsize_in for the number of pixels composing one array element + in the dimension that changes at the second-fastest rate and + fastbinsize_in for the number of pixels composing one array element + in the dimension that changes at the fastest rate for the dectector + element with the ordinal element_number. + In order to allow for software binning involving fractions of pixels, + the bin sizes are doubles rather than ints. ARGUMENTS - handle CBF handle. reserved Unused. Any - value other than 0 is invalid. axis_id Axis id. - ancestor_index Integer index of the desired ancestor, starting - with 0 for the current axis_id. ancestor Pointer to - destination ancestor name pointer. depends_on Pointer to - destination depends_on name pointer. equipment Pointer to - destination equipment name pointer. equipment_component Pointer to - destination equipment_component name pointer. offset1 - Pointer to destination first offset component value. offset2 - Pointer to destination second offset component value. offset3 - Pointer to destination third offset component value. - rotation Pointer to destination rotation value. - rotation_axis Pointer to destination rotation_axisn name - pointer. start Pointer to the destination start - value. increment Pointer to the destination increment - value. type Pointer to destination axis type of type - . vector1 Pointer to destination first vector component - value. vector2 Pointer to destination second vector - component value. vector3 Pointer to destination third - vector component value. + handle CBF handle. element_number The number of the + detector element counting from 0 by order of appearance in the + "diffrn_data_frame " category. slowbinsize Pointer to the + returned number of pixels composing one array element in the + dimension that changes at the second-fastest rate. fastbinsize + Pointer to the returned number of pixels composing one array element + in the dimension that changes at the fastest rate. slowbinsize_in + The number of pixels composing one array element in the dimension + that changes at the second-fastest rate. fastbinsize_in The number + of pixels composing one array element in the dimension that changes + at the fastest rate. RETURN VALUE Returns an error code on failure or 0 for success. ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_get_axis_equipment(self, axis_id) - + return _pycbf.cbf_handle_struct_set_bin_sizes(self, element_number, slowbinsize_in, fastbinsize_in) - def set_unit_cell(self, cell): - """ + def get_axis_poise(self, ratio, axis_id, frame_id): + r""" - Returns : - *args : double cell[6] + Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2, + Float offset3,Float angle + *args : Float ratio,String axis_id,String frame_id - C prototype: int cbf_set_unit_cell (cbf_handle handle, double cell[6], - double cell_esd[6] ); + C prototype: int cbf_get_axis_poise(cbf_handle handle, double ratio, + double * vector1, double * vector2, double * vector3, + double * offset1, double * offset2, double * offset3, + double * angle, const char * axis_id, + const char * frame_id); CBFLib documentation: DESCRIPTION - cbf_set_unit_cell sets the cell parameters to the double values given - in cell[0:2] for the cell edge lengths a, b and c in AAngstroms, the - double values given in cell[3:5] for the cell angles a, b and g in - degrees, the double values given in cell_esd[0:2] for the estimated - strandard deviations of the cell edge lengths a, b and c in - AAngstroms, and the double values given in cell_esd[3:5] for the - estimated standard deviations of the the cell angles a, b and g in - degrees. - The values are placed in the first row of the "cell " category. If - no value has been given for "_cell.entry_id ", it is set to the - value of the "diffrn.id " entry of the current data block. - cell or cell_esd may be NULL. - If cell is NULL, the cell parameters are not set. - If cell_esd is NULL, the cell parameter esds are not set. - If the "cell " category is not present, it is created. If any of - the necessary columns are not present, they are created. + cbf_get_axis_poise sets vector1, vector2, vector3 to point to the + components of the axis vector for axis axis_id, offset1, offset2, + offset3 to point to the components of the axis base offset vector for + axis axis_id, and angle to point to the angle of rotation of axis + axis_id after application of the axis settings for frame frame_id, + using ratio, a value between 0 and 1, indicating how far into the + internal motion in the frame to go. If frame_id is the string ". + ", the first frame found is used. If there is more than one frame, + which frame will be found is indeterminate. If frame_id is NULL, the + overall setting for the scan are used, rather than those for any + particular frame. The vector and offset reported are the reference + vector and offset of the axis axis_id transformed by application of + all motions of the axes on which axis_id depends. + cbf_get_goniometer_poise vector1, vector2, vector3 to point to the + components of the axis vector for the goniometer axis, offset1, + offset2, offset3 to point to the components of the axis base offset + vector for the goniometer axis, and angle to point to the angle of + rotation of the goniometer axis after application of all axis + settings in the goniometer deriving the vector, offset and angle from + the resulting matrix. Calculation of the vector is indeterminate if + the angle is zero. + cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point + to the components of the axis vector for axis axis_id, offset1, + offset2, offset3 to point to the components of the axis base offset + vector for axis axis_id unmodified by axis rotations. Any of the + pointers may be specified as NULL. ARGUMENTS - handle CBF handle. cell Pointer to the array of 6 doubles - for the cell parameters. cell_esd Pointer to the array of 6 doubles - for the cell parameter esds. + handle CBF handle. ratio A number between 0 and 1 + indication how far into the frame to go vector1 Pointer to the + first component of the axis vector vector2 Pointer to the second + component of the axis vector vector3 Pointer to the third + component of the axis vector offset1 Pointer to the first + component of the axis offset offset2 Pointer to the second + component of the axis offset offset3 Pointer to the third + component of the axis offset angle Pointer to the rotation + angle axis_id The specified axis frame_id The specified + frame positioner CBF goniometer RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_set_unit_cell(self, cell) - + return _pycbf.cbf_handle_struct_get_axis_poise(self, ratio, axis_id, frame_id) - def set_unit_cell_esd(self, cell_esd): - """ + def get_axis_reference_poise(self, axis_id): + r""" - Returns : - *args : double cell_esd[6] + Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2, + Float offset3 + *args : String axis_id - C prototype: int cbf_set_unit_cell (cbf_handle handle, double cell[6], - double cell_esd[6] ); + C prototype: int cbf_get_axis_reference_poise(cbf_handle handle, + double * vector1, double * vector2, double * vector3, + double * offset1, double * offset2, double * offset3, + const char * axis_id); CBFLib documentation: DESCRIPTION - cbf_set_unit_cell sets the cell parameters to the double values given - in cell[0:2] for the cell edge lengths a, b and c in AAngstroms, the - double values given in cell[3:5] for the cell angles a, b and g in - degrees, the double values given in cell_esd[0:2] for the estimated - strandard deviations of the cell edge lengths a, b and c in - AAngstroms, and the double values given in cell_esd[3:5] for the - estimated standard deviations of the the cell angles a, b and g in - degrees. - The values are placed in the first row of the "cell " category. If - no value has been given for "_cell.entry_id ", it is set to the - value of the "diffrn.id " entry of the current data block. - cell or cell_esd may be NULL. - If cell is NULL, the cell parameters are not set. - If cell_esd is NULL, the cell parameter esds are not set. - If the "cell " category is not present, it is created. If any of - the necessary columns are not present, they are created. + cbf_get_axis_poise sets vector1, vector2, vector3 to point to the + components of the axis vector for axis axis_id, offset1, offset2, + offset3 to point to the components of the axis base offset vector for + axis axis_id, and angle to point to the angle of rotation of axis + axis_id after application of the axis settings for frame frame_id, + using ratio, a value between 0 and 1, indicating how far into the + internal motion in the frame to go. If frame_id is the string ". + ", the first frame found is used. If there is more than one frame, + which frame will be found is indeterminate. If frame_id is NULL, the + overall setting for the scan are used, rather than those for any + particular frame. The vector and offset reported are the reference + vector and offset of the axis axis_id transformed by application of + all motions of the axes on which axis_id depends. + cbf_get_goniometer_poise vector1, vector2, vector3 to point to the + components of the axis vector for the goniometer axis, offset1, + offset2, offset3 to point to the components of the axis base offset + vector for the goniometer axis, and angle to point to the angle of + rotation of the goniometer axis after application of all axis + settings in the goniometer deriving the vector, offset and angle from + the resulting matrix. Calculation of the vector is indeterminate if + the angle is zero. + cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point + to the components of the axis vector for axis axis_id, offset1, + offset2, offset3 to point to the components of the axis base offset + vector for axis axis_id unmodified by axis rotations. Any of the + pointers may be specified as NULL. ARGUMENTS - handle CBF handle. cell Pointer to the array of 6 doubles - for the cell parameters. cell_esd Pointer to the array of 6 doubles - for the cell parameter esds. + handle CBF handle. ratio A number between 0 and 1 + indication how far into the frame to go vector1 Pointer to the + first component of the axis vector vector2 Pointer to the second + component of the axis vector vector3 Pointer to the third + component of the axis vector offset1 Pointer to the first + component of the axis offset offset2 Pointer to the second + component of the axis offset offset3 Pointer to the third + component of the axis offset angle Pointer to the rotation + angle axis_id The specified axis frame_id The specified + frame positioner CBF goniometer RETURN VALUE Returns an error code on failure or 0 for success. - SEE ALSO + ---------------------------------------------------------------------- """ - return _pycbf.cbf_handle_struct_set_unit_cell_esd(self, cell_esd) + return _pycbf.cbf_handle_struct_get_axis_reference_poise(self, axis_id) -cbf_handle_struct_swigregister = _pycbf.cbf_handle_struct_swigregister -cbf_handle_struct_swigregister(cbf_handle_struct) +# Register cbf_handle_struct in _pycbf: +_pycbf.cbf_handle_struct_swigregister(cbf_handle_struct) -# This file is compatible with both classic and new-style classes. diff --git a/pycbf/pycbf.tex b/pycbf/pycbf.tex index 4196daa2..a419b79b 100644 --- a/pycbf/pycbf.tex +++ b/pycbf/pycbf.tex @@ -1,13 +1,18 @@ \newcommand{\NWtarget}[2]{#2} \newcommand{\NWlink}[2]{#2} -\newcommand{\NWtxtMacroDefBy}{Macro defined by} -\newcommand{\NWtxtMacroRefIn}{Macro referenced in} -\newcommand{\NWtxtMacroNoRef}{Macro never referenced} +\newcommand{\NWtxtMacroDefBy}{Fragment defined by} +\newcommand{\NWtxtMacroRefIn}{Fragment referenced in} +\newcommand{\NWtxtMacroNoRef}{Fragment never referenced} \newcommand{\NWtxtDefBy}{Defined by} \newcommand{\NWtxtRefIn}{Referenced in} \newcommand{\NWtxtNoRef}{Not referenced} \newcommand{\NWtxtFileDefBy}{File defined by} +\newcommand{\NWtxtIdentsUsed}{Uses:} +\newcommand{\NWtxtIdentsNotUsed}{Never used} +\newcommand{\NWtxtIdentsDefed}{Defines:} \newcommand{\NWsep}{${\diamond}$} +\newcommand{\NWnotglobal}{(not defined globally)} +\newcommand{\NWuseHyperlinks}{} % pycbf.w % nuweb source file used to create pycbf documentation % @@ -145,19 +150,21 @@ \section*{Index of file names} {\small\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} -\item \verb@"linux.sh"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb63a}{63a}.} -\item \verb@"makeflatascii.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb63b}{63b}.} +\item \verb@"linux.sh"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb12a}{12a}.} +\item \verb@"makeflatascii.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb12b}{12b}.} \item \verb@"make_pycbf.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb10}{10}.} +\item \verb@"py3setup_py.m4"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb11a}{11a}.} \item \verb@"pycbf.i"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb5b}{5b}\NWlink{nuweb9}{, 9}. } -\item \verb@"pycbf_test1.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb64}{64}.} -\item \verb@"pycbf_test2.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb65}{65}.} -\item \verb@"pycbf_test3.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb66a}{66a}.} -\item \verb@"setup.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb62a}{62a}.} -\item \verb@"win32.bat"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb62b}{62b}.} -\item \verb@"xmas/readmarheader.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb66b}{66b}.} -\item \verb@"xmas/xmasheaders.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb72}{72}.} -\item \verb@"xmas/xmas_cif_template.cif"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb76}{76}.} +\item \verb@"pycbf_test1.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb14}{14}.} +\item \verb@"pycbf_test2.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb15a}{15a}.} +\item \verb@"pycbf_test3.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb15b}{15b}.} +\item \verb@"pycbf_test4.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb17}{17}.} +\item \verb@"pycbf_testfelaxes.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb18}{18}.} +\item \verb@"win32.bat"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb11b}{11b}.} +\item \verb@"xmas/readmarheader.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb20}{20}.} +\item \verb@"xmas/xmasheaders.py"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb22}{22}.} +\item \verb@"xmas/xmas_cif_template.cif"@ {\footnotesize {\NWtxtDefBy} \NWlink{nuweb24}{24}.} \end{list}} @@ -327,8 +334,8 @@ \section{Generating the c interface - the SWIG file} for compilation. Note the defintion of constants to be passed as arguments in calls in the form pycbf.CONSTANTNAME -\begin{flushleft} \small \label{scrap1} -$\langle\,$Constants used for compression\nobreak\ {\footnotesize \NWtarget{nuweb3a}{3a}}$\,\rangle\equiv$ +\begin{flushleft} \small\label{scrap1}\raggedright\small +\NWtarget{nuweb3a}{} $\langle\,${\itshape Constants used for compression}\nobreak\ {\footnotesize {3a}}$\,\rangle\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@@\\ @@ -357,14 +364,17 @@ \section{Generating the c interface - the SWIG file} \mbox{}\verb@#define CBF_NO_EXPAND 0x0400 /* Flag to try not to expand */@\\ \mbox{}\verb@@{\NWsep} \end{list} -\vspace{-1ex} -\footnotesize\addtolength{\baselineskip}{-1ex} +\vspace{-1.5ex} +\footnotesize \begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} \item \NWtxtMacroRefIn\ \NWlink{nuweb9}{9}. + +\item{} \end{list} +\vspace{4ex} \end{flushleft} -\begin{flushleft} \small \label{scrap2} -$\langle\,$Constants used for headers\nobreak\ {\footnotesize \NWtarget{nuweb3b}{3b}}$\,\rangle\equiv$ +\begin{flushleft} \small\label{scrap2}\raggedright\small +\NWtarget{nuweb3b}{} $\langle\,${\itshape Constants used for headers}\nobreak\ {\footnotesize {3b}}$\,\rangle\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@@\\ @@ -381,14 +391,17 @@ \section{Generating the c interface - the SWIG file} \mbox{}\verb@#define PAD_4K 0x0080 /* Pad binaries with 4095 0's */@\\ \mbox{}\verb@@{\NWsep} \end{list} -\vspace{-1ex} -\footnotesize\addtolength{\baselineskip}{-1ex} +\vspace{-1.5ex} +\footnotesize \begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} \item \NWtxtMacroRefIn\ \NWlink{nuweb9}{9}. + +\item{} \end{list} +\vspace{4ex} \end{flushleft} -\begin{flushleft} \small \label{scrap3} -$\langle\,$Constants used to control CIF parsing\nobreak\ {\footnotesize \NWtarget{nuweb4a}{4a}}$\,\rangle\equiv$ +\begin{flushleft} \small\label{scrap3}\raggedright\small +\NWtarget{nuweb4a}{} $\langle\,${\itshape Constants used to control CIF parsing}\nobreak\ {\footnotesize {4a}}$\,\rangle\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@@\\ @@ -425,14 +438,17 @@ \section{Generating the c interface - the SWIG file} \mbox{}\verb@#define CIF 0x0001 /* Use MIME-encoded binary sections */@\\ \mbox{}\verb@@{\NWsep} \end{list} -\vspace{-1ex} -\footnotesize\addtolength{\baselineskip}{-1ex} +\vspace{-1.5ex} +\footnotesize \begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} \item \NWtxtMacroRefIn\ \NWlink{nuweb9}{9}. + +\item{} \end{list} +\vspace{4ex} \end{flushleft} -\begin{flushleft} \small \label{scrap4} -$\langle\,$Constants used for encoding\nobreak\ {\footnotesize \NWtarget{nuweb4b}{4b}}$\,\rangle\equiv$ +\begin{flushleft} \small\label{scrap4}\raggedright\small +\NWtarget{nuweb4b}{} $\langle\,${\itshape Constants used for encoding}\nobreak\ {\footnotesize {4b}}$\,\rangle\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@@\\ @@ -453,11 +469,14 @@ \section{Generating the c interface - the SWIG file} \mbox{}\verb@#define ENC_DEFAULT (ENC_BASE64 | ENC_LFTERM | ENC_FORWARD)@\\ \mbox{}\verb@@{\NWsep} \end{list} -\vspace{-1ex} -\footnotesize\addtolength{\baselineskip}{-1ex} +\vspace{-1.5ex} +\footnotesize \begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} \item \NWtxtMacroRefIn\ \NWlink{nuweb9}{9}. + +\item{} \end{list} +\vspace{4ex} \end{flushleft} \subsection{Exceptions} @@ -483,8 +502,8 @@ \subsection{Exceptions} It could have retained the old style if(status = action) but then harder to see what to return... -\begin{flushleft} \small \label{scrap5} -$\langle\,$Exception handling\nobreak\ {\footnotesize \NWtarget{nuweb5a}{5a}}$\,\rangle\equiv$ +\begin{flushleft} \small\label{scrap5}\raggedright\small +\NWtarget{nuweb5a}{} $\langle\,${\itshape Exception handling}\nobreak\ {\footnotesize {5a}}$\,\rangle\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@@\\ @@ -512,14 +531,17 @@ \subsection{Exceptions} \mbox{}\verb@ { c; } return err; }}@\\ \mbox{}\verb@@{\NWsep} \end{list} -\vspace{-1ex} -\footnotesize\addtolength{\baselineskip}{-1ex} +\vspace{-1.5ex} +\footnotesize \begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} \item \NWtxtMacroRefIn\ \NWlink{nuweb9}{9}. + +\item{} \end{list} +\vspace{4ex} \end{flushleft} -\begin{flushleft} \small \label{scrap6} -\verb@"pycbf.i"@\nobreak\ {\footnotesize \NWtarget{nuweb5b}{5b} }$\equiv$ +\begin{flushleft} \small\label{scrap6}\raggedright\small +\NWtarget{nuweb5b}{} \verb@"pycbf.i"@\nobreak\ {\footnotesize {5b}}$\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@@\\ @@ -699,77 +721,81 @@ \subsection{Exceptions} \mbox{}\verb@ @\\ \mbox{}\verb@@\\ \mbox{}\verb@static int error_status = 0;@\\ -\mbox{}\verb@static char error_message[1024] ; // hope that is long enough@\\ +\mbox{}\verb@static char error_message1[17] ;@\\ +\mbox{}\verb@static char error_message[1042] ; // hope that is long enough@\\ \mbox{}\verb@@\\ \mbox{}\verb@/* prototype */@\\ \mbox{}\verb@void get_error_message(void);@\\ \mbox{}\verb@@\\ \mbox{}\verb@void get_error_message(){@\\ -\mbox{}\verb@ sprintf(error_message,"%s","CBFlib Error(s):");@\\ +\mbox{}\verb@ sprintf(error_message1,"%s","CBFlib Error(s):");@\\ \mbox{}\verb@ if (error_status & CBF_FORMAT )@\\ -\mbox{}\verb@ sprintf(error_message,"%s %s",error_message,"CBF_FORMAT "); @\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_FORMAT "); @\\ \mbox{}\verb@ if (error_status & CBF_ALLOC )@\\ -\mbox{}\verb@ sprintf(error_message,"%s %s",error_message,"CBF_ALLOC ");@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_ALLOC ");@\\ \mbox{}\verb@ if (error_status & CBF_ARGUMENT )@\\ -\mbox{}\verb@ sprintf(error_message,"%s %s",error_message,"CBF_ARGUMENT ");@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_ARGUMENT ");@\\ \mbox{}\verb@ if (error_status & CBF_ASCII )@\\ -\mbox{}\verb@ sprintf(error_message,"%s %s",error_message,"CBF_ASCII ");@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_ASCII ");@\\ \mbox{}\verb@ if (error_status & CBF_BINARY )@\\ -\mbox{}\verb@ sprintf(error_message,"%s %s",error_message,"CBF_BINARY ");@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_BINARY ");@\\ \mbox{}\verb@ if (error_status & CBF_BITCOUNT )@\\ -\mbox{}\verb@ sprintf(error_message,"%s %s",error_message,"CBF_BITCOUNT ");@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_BITCOUNT ");@\\ \mbox{}\verb@ if (error_status & CBF_ENDOFDATA )@\\ -\mbox{}\verb@ sprintf(error_message,"%s %s",error_message,"CBF_ENDOFDATA ");@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_ENDOFDATA ");@\\ \mbox{}\verb@ if (error_status & CBF_FILECLOSE )@\\ -\mbox{}\verb@ sprintf(error_message,"%s %s",error_message,"CBF_FILECLOSE ");@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_FILECLOSE ");@\\ \mbox{}\verb@ if (error_status & CBF_FILEOPEN )@\\ -\mbox{}\verb@ sprintf(error_message,"%s %s",error_message,"CBF_FILEOPEN ");@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_FILEOPEN ");@\\ \mbox{}\verb@ if (error_status & CBF_FILEREAD )@\\ -\mbox{}\verb@ sprintf(error_message,"%s %s",error_message,"CBF_FILEREAD ");@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_FILEREAD ");@\\ \mbox{}\verb@ if (error_status & CBF_FILESEEK )@\\ -\mbox{}\verb@ sprintf(error_message,"%s %s",error_message,"CBF_FILESEEK ");@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_FILESEEK ");@\\ \mbox{}\verb@ if (error_status & CBF_FILETELL )@\\ -\mbox{}\verb@ sprintf(error_message,"%s %s",error_message,"CBF_FILETELL ");@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_FILETELL ");@\\ \mbox{}\verb@ if (error_status & CBF_FILEWRITE )@\\ -\mbox{}\verb@ sprintf(error_message,"%s %s",error_message,"CBF_FILEWRITE ");@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_FILEWRITE ");@\\ \mbox{}\verb@ if (error_status & CBF_IDENTICAL )@\\ -\mbox{}\verb@ sprintf(error_message,"%s %s",error_message,"CBF_IDENTICAL ");@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_IDENTICAL ");@\\ \mbox{}\verb@ if (error_status & CBF_NOTFOUND )@\\ -\mbox{}\verb@ sprintf(error_message,"%s %s",error_message,"CBF_NOTFOUND ");@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_NOTFOUND ");@\\ \mbox{}\verb@ if (error_status & CBF_OVERFLOW )@\\ -\mbox{}\verb@ sprintf(error_message,"%s %s",error_message,"CBF_OVERFLOW ");@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_OVERFLOW ");@\\ \mbox{}\verb@ if (error_status & CBF_UNDEFINED )@\\ -\mbox{}\verb@ sprintf(error_message,"%s %s",error_message,"CBF_UNDEFINED ");@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_UNDEFINED ");@\\ \mbox{}\verb@ if (error_status & CBF_NOTIMPLEMENTED)@\\ -\mbox{}\verb@ sprintf(error_message,"%s %s",error_message,"CBF_NOTIMPLEMENTED");@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_NOTIMPLEMENTED");@\\ \mbox{}\verb@ if (error_status & CBF_NOCOMPRESSION)@\\ -\mbox{}\verb@ sprintf(error_message,"%s %s",error_message,"CBF_NOCOMPRESSION");@\\ +\mbox{}\verb@ sprintf(error_message,"%s %s",error_message1,"CBF_NOCOMPRESSION");@\\ \mbox{}\verb@}@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@%} // End of code which is not wrapped but needed to compile@\\ \mbox{}\verb@@{\NWsep} \end{list} -\vspace{-1ex} -\footnotesize\addtolength{\baselineskip}{-1ex} +\vspace{-1.5ex} +\footnotesize \begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} \item \NWtxtFileDefBy\ \NWlink{nuweb5b}{5b}\NWlink{nuweb9}{, 9}. + +\item{} \end{list} +\vspace{4ex} \end{flushleft} -\begin{flushleft} \small \label{scrap7} -\verb@"pycbf.i"@\nobreak\ {\footnotesize \NWtarget{nuweb9}{9} }$\equiv$ +\begin{flushleft} \small\label{scrap7}\raggedright\small +\NWtarget{nuweb9}{} \verb@"pycbf.i"@\nobreak\ {\footnotesize {9}}$\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@@\\ -\mbox{}\verb@@\hbox{$\langle\,$Constants used for compression\nobreak\ {\footnotesize \NWlink{nuweb3a}{3a}}$\,\rangle$}\verb@@\\ +\mbox{}\verb@@\hbox{$\langle\,${\itshape Constants used for compression}\nobreak\ {\footnotesize \NWlink{nuweb3a}{3a}}$\,\rangle$}\verb@@\\ \mbox{}\verb@@\\ -\mbox{}\verb@@\hbox{$\langle\,$Constants used for headers\nobreak\ {\footnotesize \NWlink{nuweb3b}{3b}}$\,\rangle$}\verb@@\\ +\mbox{}\verb@@\hbox{$\langle\,${\itshape Constants used for headers}\nobreak\ {\footnotesize \NWlink{nuweb3b}{3b}}$\,\rangle$}\verb@@\\ \mbox{}\verb@@\\ -\mbox{}\verb@@\hbox{$\langle\,$Constants used to control CIF parsing\nobreak\ {\footnotesize \NWlink{nuweb4a}{4a}}$\,\rangle$}\verb@@\\ +\mbox{}\verb@@\hbox{$\langle\,${\itshape Constants used to control CIF parsing}\nobreak\ {\footnotesize \NWlink{nuweb4a}{4a}}$\,\rangle$}\verb@@\\ \mbox{}\verb@@\\ -\mbox{}\verb@@\hbox{$\langle\,$Constants used for encoding\nobreak\ {\footnotesize \NWlink{nuweb4b}{4b}}$\,\rangle$}\verb@@\\ +\mbox{}\verb@@\hbox{$\langle\,${\itshape Constants used for encoding}\nobreak\ {\footnotesize \NWlink{nuweb4b}{4b}}$\,\rangle$}\verb@@\\ \mbox{}\verb@@\\ -\mbox{}\verb@@\hbox{$\langle\,$Exception handling\nobreak\ {\footnotesize \NWlink{nuweb5a}{5a}}$\,\rangle$}\verb@@\\ +\mbox{}\verb@@\hbox{$\langle\,${\itshape Exception handling}\nobreak\ {\footnotesize \NWlink{nuweb5a}{5a}}$\,\rangle$}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@%include "cbfgenericwrappers.i"@\\ \mbox{}\verb@@\\ @@ -785,11 +811,14 @@ \subsection{Exceptions} \mbox{}\verb@@\\ \mbox{}\verb@@{\NWsep} \end{list} -\vspace{-1ex} -\footnotesize\addtolength{\baselineskip}{-1ex} +\vspace{-1.5ex} +\footnotesize \begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} \item \NWtxtFileDefBy\ \NWlink{nuweb5b}{5b}\NWlink{nuweb9}{, 9}. + +\item{} \end{list} +\vspace{4ex} \end{flushleft} Despite the temptation to just throw everything from the c header files into the interface, a short experience suggested we are better off to pull @@ -845,7 +874,9 @@ \section{Docstrings} % email: wright@esrf.fr % % Revised for CBFlib 0.9 releases, Herbert J. Bernstein, 23 Aug 2010 -% Revised for CBFlin 0.9.2.8, Herbert J. Bernstein, 12 December 2012 +% Revised for CBFlib 0.9.2.8, Herbert J. Bernstein, 12 December 2012 +% Revised for CBFlib 0.9.3.2, Herbert J. Bernstein, 4 November 2013 +% Revised for CBFlib 0.9.5.8, Herbert J. Bernstein, 5 August 2015 % %###################################################################### %# # @@ -900,14 +931,15 @@ \section{Wrappers} The program that does the conversion from CBFlib.txt to the SWIG input files is a python script named make\_pycbf.py. -\begin{flushleft} \small \label{scrap8} -\verb@"make_pycbf.py"@\nobreak\ {\footnotesize \NWtarget{nuweb10}{10} }$\equiv$ +\begin{flushleft} \small +\begin{minipage}{\linewidth}\label{scrap8}\raggedright\small +\NWtarget{nuweb10}{} \verb@"make_pycbf.py"@\nobreak\ {\footnotesize {10}}$\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@@\\ -\mbox{}\verb@print "\\begin{verbatim}"@\\ -\mbox{}\verb@print "This output comes from make_pycbf.py which generates the wrappers"@\\ -\mbox{}\verb@print "pycbf Copyright (C) 2005 Jonathan Wright, no warranty, LGPL"@\\ +\mbox{}\verb@print("\\begin{verbatim}")@\\ +\mbox{}\verb@print("This output comes from make_pycbf.py which generates the wrappers")@\\ +\mbox{}\verb@print("pycbf Copyright (C) 2005 Jonathan Wright, no warranty, LGPL")@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@######################################################################@\\ @@ -990,14 +1022,14 @@ \section{Wrappers} \mbox{}\verb@ if line.find("int cbf_")>=0: # We found a function@\\ \mbox{}\verb@ # keep going up to DESCRIPTION@\\ \mbox{}\verb@ prototypes+=""+lines[i].rstrip()+" "@\\ -\mbox{}\verb@ # print lines[i].rstrip()@\\ +\mbox{}\verb@ # print(lines[i].rstrip())@\\ \mbox{}\verb@ check=0@\\ \mbox{}\verb@ while lines[i+1].find("DESCRIPTION")==-1 and lines[i+1].find("int cbf_")==-1:@\\ \mbox{}\verb@ i=i+1@\\ \mbox{}\verb@ prototypes+=lines[i].rstrip()+" " # lose the \n@\\ -\mbox{}\verb@ # print lines[i].rstrip()@\\ +\mbox{}\verb@ # print(lines[i].rstrip())@\\ \mbox{}\verb@ check+=1@\\ -\mbox{}\verb@ if check>20:@\\ +\mbox{}\verb@ if check>50:@\\ \mbox{}\verb@ raise Exception("Runaway prototype "+prototypes)@\\ \mbox{}\verb@ on=1 # Keep reading docstring@\\ \mbox{}\verb@ continue@\\ @@ -1023,16 +1055,16 @@ \section{Wrappers} \mbox{}\verb@ line.find("________")>=0 or \@\\ \mbox{}\verb@ line.find("--------")>=0:@\\ \mbox{}\verb@ if len(docstring)>0:@\\ -\mbox{}\verb@ # print "Prototypes: ",prototypes@\\ +\mbox{}\verb@ # print("Prototypes: ",prototypes)@\\ \mbox{}\verb@ docstring = docstring.replace("\"", " \\\"") # escape the quotes@\\ \mbox{}\verb@ for prototype in prototypes.strip().split(";")[:-1]:@\\ \mbox{}\verb@ name = prototype.split("(")[0].strip()@\\ \mbox{}\verb@ cname = name.split()[1].strip()@\\ \mbox{}\verb@ prototype = prototype.strip()+";"@\\ \mbox{}\verb@ name_dict[cname]=[prototype,docstring]@\\ -\mbox{}\verb@ # print "Prototype: ","::",cname,"::",name,"::", prototype@\\ +\mbox{}\verb@ # print("Prototype: ","::",cname,"::",name,"::", prototype)@\\ \mbox{}\verb@ prototypes = ""@\\ -\mbox{}\verb@ # print "Found ",prototype@\\ +\mbox{}\verb@ # print("Found ",prototype)@\\ \mbox{}\verb@ docstring="\n"@\\ \mbox{}\verb@ prototype=""@\\ \mbox{}\verb@ cname=""@\\ @@ -1120,7 +1152,7 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@""","get_integerarrayparameters",[],["int compression","int binary_id", @\\ \mbox{}\verb@ "int elsize", "int elsigned", "int elunsigned", @\\ -\mbox{}\verb@ "int elements", "int minelement", "int maxelement"]],@\\ +\mbox{}\verb@ "int elements", "int minelement", "int maxelement"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_integerarrayparameters_wdims":["""@\\ @@ -1160,7 +1192,7 @@ \section{Wrappers} \mbox{}\verb@""","get_integerarrayparameters_wdims",[],["int compression","int binary_id", @\\ \mbox{}\verb@ "int elsize", "int elsigned", "int elunsigned", @\\ \mbox{}\verb@ "int elements", "int minelement", "int maxelement", "char **bo", "int *bolen",@\\ -\mbox{}\verb@ "int dimfast", "int dimmid", "int dimslow", "int padding"]],@\\ +\mbox{}\verb@ "int dimfast", "int dimmid", "int dimslow", "int padding"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_integerarrayparameters_wdims_fs":["""@\\ @@ -1200,7 +1232,7 @@ \section{Wrappers} \mbox{}\verb@""","get_integerarrayparameters_wdims_fs",[],["int compression","int binary_id", @\\ \mbox{}\verb@ "int elsize", "int elsigned", "int elunsigned", @\\ \mbox{}\verb@ "int elements", "int minelement", "int maxelement", "char **bo", "int *bolen",@\\ -\mbox{}\verb@ "int dimfast", "int dimmid", "int dimslow", "int padding"]],@\\ +\mbox{}\verb@ "int dimfast", "int dimmid", "int dimslow", "int padding"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_integerarrayparameters_wdims_sf":["""@\\ @@ -1240,7 +1272,7 @@ \section{Wrappers} \mbox{}\verb@""","get_integerarrayparameters_wdims_sf",[],["int compression","int binary_id", @\\ \mbox{}\verb@ "int elsize", "int elsigned", "int elunsigned", @\\ \mbox{}\verb@ "int elements", "int minelement", "int maxelement", "char **bo", "int *bolen",@\\ -\mbox{}\verb@ "int dimslow", "int dimmid", "int dimfast", "int padding"]],@\\ +\mbox{}\verb@ "int dimslow", "int dimmid", "int dimfast", "int padding"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_realarrayparameters":["""@\\ @@ -1259,7 +1291,7 @@ \section{Wrappers} \mbox{}\verb@ *elements = elem;@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","get_realarrayparameters",[],["int compression","int binary_id", @\\ -\mbox{}\verb@ "int elsize", "int elements"]],@\\ +\mbox{}\verb@ "int elsize", "int elements"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_realarrayparameters_wdims":["""@\\ @@ -1299,7 +1331,7 @@ \section{Wrappers} \mbox{}\verb@""","get_realarrayparameters_wdims",[],["int compression","int binary_id", @\\ \mbox{}\verb@ "int elsize", @\\ \mbox{}\verb@ "int elements", "char **bo", "int *bolen",@\\ -\mbox{}\verb@ "int dimfast", "int dimmid", "int dimslow", "int padding"]],@\\ +\mbox{}\verb@ "int dimfast", "int dimmid", "int dimslow", "int padding"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_realarrayparameters_wdims_fs":["""@\\ @@ -1339,7 +1371,7 @@ \section{Wrappers} \mbox{}\verb@""","get_realarrayparameters_wdims_fs",[],["int compression","int binary_id", @\\ \mbox{}\verb@ "int elsize", @\\ \mbox{}\verb@ "int elements", "char **bo", "int *bolen",@\\ -\mbox{}\verb@ "int dimfast", "int dimmid", "int dimslow", "int padding"]],@\\ +\mbox{}\verb@ "int dimfast", "int dimmid", "int dimslow", "int padding"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_realarrayparameters_wdims_sf":["""@\\ @@ -1379,7 +1411,7 @@ \section{Wrappers} \mbox{}\verb@""","get_realarrayparameters_wdims_sf",[],["int compression","int binary_id", @\\ \mbox{}\verb@ "int elsize", @\\ \mbox{}\verb@ "int elements", "char **bo", "int *bolen",@\\ -\mbox{}\verb@ "int dimslow", "int dimmid", "int dimfast", "int padding"]],@\\ +\mbox{}\verb@ "int dimslow", "int dimmid", "int dimfast", "int padding"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_integerarray":["""@\\ @@ -1387,7 +1419,9 @@ \section{Wrappers} \mbox{}\verb@@\\ \mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ \mbox{}\verb@ get_integerarray_as_string;@\\ -\mbox{}\verb@@\\ +\mbox{}\verb@%{@\\ +\mbox{}\verb@#define SWIG_PYTHON_STRICT_BYTE_CHAR@\\ +\mbox{}\verb@%}@\\ \mbox{}\verb@// Get the length correct@\\ \mbox{}\verb@@\\ \mbox{}\verb@ void get_integerarray_as_string(char **s, int *slen){@\\ @@ -1415,13 +1449,13 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@""","get_integerarray_as_string",[],["(Binary)String"] ],@\\ \mbox{}\verb@@\\ -\mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_image":["""@\\ \mbox{}\verb@// Ensure we free the local temporary@\\ -\mbox{}\verb@@\\ +\mbox{}\verb@%{@\\ +\mbox{}\verb@#define SWIG_PYTHON_STRICT_BYTE_CHAR@\\ +\mbox{}\verb@%}@\\ \mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ \mbox{}\verb@ get_image_as_string;@\\ -\mbox{}\verb@@\\ \mbox{}\verb@// Get the length correct@\\ \mbox{}\verb@@\\ \mbox{}\verb@ void get_image_as_string(int element_number, char **s, int *slen,@\\ @@ -1446,10 +1480,11 @@ \section{Wrappers} \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_image_fs":["""@\\ \mbox{}\verb@// Ensure we free the local temporary@\\ -\mbox{}\verb@@\\ +\mbox{}\verb@%{@\\ +\mbox{}\verb@#define SWIG_PYTHON_STRICT_BYTE_CHAR@\\ +\mbox{}\verb@%}@\\ \mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ \mbox{}\verb@ get_image_fs_as_string;@\\ -\mbox{}\verb@@\\ \mbox{}\verb@// Get the length correct@\\ \mbox{}\verb@@\\ \mbox{}\verb@ void get_image_fs_as_string(int element_number, char **s, int *slen,@\\ @@ -1474,10 +1509,11 @@ \section{Wrappers} \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_image_sf":["""@\\ \mbox{}\verb@// Ensure we free the local temporary@\\ -\mbox{}\verb@@\\ +\mbox{}\verb@%{@\\ +\mbox{}\verb@#define SWIG_PYTHON_STRICT_BYTE_CHAR@\\ +\mbox{}\verb@%}@\\ \mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ \mbox{}\verb@ get_image_fs_as_string;@\\ -\mbox{}\verb@@\\ \mbox{}\verb@// Get the length correct@\\ \mbox{}\verb@@\\ \mbox{}\verb@ void get_image_sf_as_string(int element_number, char **s, int *slen,@\\ @@ -1502,10 +1538,11 @@ \section{Wrappers} \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_real_image":["""@\\ \mbox{}\verb@// Ensure we free the local temporary@\\ -\mbox{}\verb@@\\ +\mbox{}\verb@%{@\\ +\mbox{}\verb@#define SWIG_PYTHON_STRICT_BYTE_CHAR@\\ +\mbox{}\verb@%}@\\ \mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ \mbox{}\verb@ get_real_image_as_string;@\\ -\mbox{}\verb@@\\ \mbox{}\verb@// Get the length correct@\\ \mbox{}\verb@@\\ \mbox{}\verb@ void get_real_image_as_string(int element_number, char **s, int *slen,@\\ @@ -1530,10 +1567,11 @@ \section{Wrappers} \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_real_image_fs":["""@\\ \mbox{}\verb@// Ensure we free the local temporary@\\ -\mbox{}\verb@@\\ +\mbox{}\verb@%{@\\ +\mbox{}\verb@#define SWIG_PYTHON_STRICT_BYTE_CHAR@\\ +\mbox{}\verb@%}@\\ \mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ \mbox{}\verb@ get_real_image_fs_as_string;@\\ -\mbox{}\verb@@\\ \mbox{}\verb@// Get the length correct@\\ \mbox{}\verb@@\\ \mbox{}\verb@ void get_real_image_fs_as_string(int element_number, char **s, int *slen,@\\ @@ -1558,10 +1596,11 @@ \section{Wrappers} \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_real_image_sf":["""@\\ \mbox{}\verb@// Ensure we free the local temporary@\\ -\mbox{}\verb@@\\ +\mbox{}\verb@%{@\\ +\mbox{}\verb@#define SWIG_PYTHON_STRICT_BYTE_CHAR@\\ +\mbox{}\verb@%}@\\ \mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ \mbox{}\verb@ get_real_image_sf_as_string;@\\ -\mbox{}\verb@@\\ \mbox{}\verb@// Get the length correct@\\ \mbox{}\verb@@\\ \mbox{}\verb@ void get_real_image_sf_as_string(int element_number, char **s, int *slen,@\\ @@ -1586,10 +1625,11 @@ \section{Wrappers} \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_3d_image":["""@\\ \mbox{}\verb@// Ensure we free the local temporary@\\ -\mbox{}\verb@@\\ +\mbox{}\verb@%{@\\ +\mbox{}\verb@#define SWIG_PYTHON_STRICT_BYTE_CHAR@\\ +\mbox{}\verb@%}@\\ \mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ \mbox{}\verb@ get_3d_image_as_string;@\\ -\mbox{}\verb@@\\ \mbox{}\verb@// Get the length correct@\\ \mbox{}\verb@@\\ \mbox{}\verb@ void get_3d_image_as_string(int element_number, char **s, int *slen,@\\ @@ -1614,10 +1654,11 @@ \section{Wrappers} \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_3d_image_fs":["""@\\ \mbox{}\verb@// Ensure we free the local temporary@\\ -\mbox{}\verb@@\\ +\mbox{}\verb@%{@\\ +\mbox{}\verb@#define SWIG_PYTHON_STRICT_BYTE_CHAR@\\ +\mbox{}\verb@%}@\\ \mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ \mbox{}\verb@ get_3d_image_fs_as_string;@\\ -\mbox{}\verb@@\\ \mbox{}\verb@// Get the length correct@\\ \mbox{}\verb@@\\ \mbox{}\verb@ void get_3d_image_fs_as_string(int element_number, char **s, int *slen,@\\ @@ -1642,9 +1683,11 @@ \section{Wrappers} \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_3d_image_sf":["""@\\ \mbox{}\verb@// Ensure we free the local temporary@\\ -\mbox{}\verb@@\\ \mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ \mbox{}\verb@ get_3d_image_sf_as_string;@\\ +\mbox{}\verb@%{@\\ +\mbox{}\verb@#define SWIG_PYTHON_STRICT_BYTE_CHAR@\\ +\mbox{}\verb@%}@\\ \mbox{}\verb@@\\ \mbox{}\verb@// Get the length correct@\\ \mbox{}\verb@@\\ @@ -1670,9 +1713,11 @@ \section{Wrappers} \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_real_3d_image":["""@\\ \mbox{}\verb@// Ensure we free the local temporary@\\ -\mbox{}\verb@@\\ \mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ \mbox{}\verb@ get_real_3d_image_as_string;@\\ +\mbox{}\verb@%{@\\ +\mbox{}\verb@#define SWIG_PYTHON_STRICT_BYTE_CHAR@\\ +\mbox{}\verb@%}@\\ \mbox{}\verb@@\\ \mbox{}\verb@// Get the length correct@\\ \mbox{}\verb@@\\ @@ -1698,10 +1743,11 @@ \section{Wrappers} \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_real_3d_image_fs":["""@\\ \mbox{}\verb@// Ensure we free the local temporary@\\ -\mbox{}\verb@@\\ +\mbox{}\verb@%{@\\ +\mbox{}\verb@#define SWIG_PYTHON_STRICT_BYTE_CHAR@\\ +\mbox{}\verb@%}@\\ \mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ \mbox{}\verb@ get_real_3d_image_fs_as_string;@\\ -\mbox{}\verb@@\\ \mbox{}\verb@// Get the length correct@\\ \mbox{}\verb@@\\ \mbox{}\verb@ void get_real_3d_image_fs_as_string(int element_number, char **s, int *slen,@\\ @@ -1725,7 +1771,9 @@ \section{Wrappers} \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_real_3d_image_sf":["""@\\ \mbox{}\verb@// Ensure we free the local temporary@\\ -\mbox{}\verb@@\\ +\mbox{}\verb@%{@\\ +\mbox{}\verb@#define SWIG_PYTHON_STRICT_BYTE_CHAR@\\ +\mbox{}\verb@%}@\\ \mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ \mbox{}\verb@ get_real_3d_image_sf_as_string;@\\ \mbox{}\verb@@\\ @@ -1753,10 +1801,11 @@ \section{Wrappers} \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_realarray":["""@\\ \mbox{}\verb@// Ensure we free the local temporary@\\ -\mbox{}\verb@@\\ +\mbox{}\verb@%{@\\ +\mbox{}\verb@#define SWIG_PYTHON_STRICT_BYTE_CHAR@\\ +\mbox{}\verb@%}@\\ \mbox{}\verb@%cstring_output_allocate_size(char ** s, int *slen, free(*$1))@\\ \mbox{}\verb@ get_realarray_as_string;@\\ -\mbox{}\verb@@\\ \mbox{}\verb@// Get the length correct@\\ \mbox{}\verb@@\\ \mbox{}\verb@ void get_realarray_as_string(char **s, int *slen){@\\ @@ -1807,7 +1856,7 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_integerarray",@\\ \mbox{}\verb@[ "int compression", "int binary_id","(binary) String data", @\\ -\mbox{}\verb@ "int elsize", "int elsigned","int elements"],[]],@\\ +\mbox{}\verb@ "int elsize", "int elsigned","int elements"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_integerarray_wdims":["""@\\ @@ -1840,7 +1889,7 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_integerarray_wdims",@\\ \mbox{}\verb@[ "int compression", "int binary_id","(binary) String data", @\\ -\mbox{}\verb@ "int elsize", "int elsigned", "int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]],@\\ +\mbox{}\verb@ "int elsize", "int elsigned", "int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_integerarray_wdims_sf":["""@\\ @@ -1873,7 +1922,7 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_integerarray_wdims_sf",@\\ \mbox{}\verb@[ "int compression", "int binary_id","(binary) String data", @\\ -\mbox{}\verb@ "int elsize","int elsigned","int elements", "String byteorder", "int dimslow", "int dimmid", "int dimfast", "int padding"],[]],@\\ +\mbox{}\verb@ "int elsize","int elsigned","int elements", "String byteorder", "int dimslow", "int dimmid", "int dimfast", "int padding"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_integerarray_wdims_fs":["""@\\ \mbox{}\verb@ /* CBFlib must NOT modify the data string nor the byteorder string@\\ @@ -1905,7 +1954,7 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_integerarray_wdims_fs",@\\ \mbox{}\verb@[ "int compression", "int binary_id","(binary) String data", @\\ -\mbox{}\verb@ "int elsize","int elsigned","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]],@\\ +\mbox{}\verb@ "int elsize","int elsigned","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_realarray":["""@\\ @@ -1931,7 +1980,7 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_realarray",@\\ \mbox{}\verb@[ "int compression", "int binary_id","(binary) String data", @\\ -\mbox{}\verb@ "int elsize","int elements"],[]],@\\ +\mbox{}\verb@ "int elsize","int elements"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_realarray_wdims":["""@\\ @@ -1964,7 +2013,7 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_realarray_wdims",@\\ \mbox{}\verb@[ "int compression", "int binary_id","(binary) String data", @\\ -\mbox{}\verb@ "int elsize","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]],@\\ +\mbox{}\verb@ "int elsize","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_realarray_wdims_sf":["""@\\ @@ -1997,7 +2046,7 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_realarray_wdims_sf",@\\ \mbox{}\verb@[ "int compression", "int binary_id","(binary) String data", @\\ -\mbox{}\verb@ "int elsize","int elements", "String byteorder", "int dimslow", "int dimmid", "int dimfast", "int padding"],[]],@\\ +\mbox{}\verb@ "int elsize","int elements", "String byteorder", "int dimslow", "int dimmid", "int dimfast", "int padding"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_realarray_wdims_fs":["""@\\ @@ -2030,7 +2079,7 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_realarray_wdims_fs",@\\ \mbox{}\verb@[ "int compression", "int binary_id","(binary) String data", @\\ -\mbox{}\verb@ "int elsize","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[]],@\\ +\mbox{}\verb@ "int elsize","int elements", "String byteorder", "int dimfast", "int dimmid", "int dimslow", "int padding"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_image":["""@\\ @@ -2058,7 +2107,7 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_image",@\\ \mbox{}\verb@[ "int element_number","int compression","(binary) String data", @\\ -\mbox{}\verb@ "int elsize", "int elsign", "int dimslow", "int dimfast"],[]],@\\ +\mbox{}\verb@ "int elsize", "int elsign", "int dimslow", "int dimfast"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_image_fs":["""@\\ @@ -2086,7 +2135,7 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_image_fs",@\\ \mbox{}\verb@[ "int element_number","int compression","(binary) String data", @\\ -\mbox{}\verb@ "int elsize", "int elsign", "int dimfast", "int dimslow"],[]],@\\ +\mbox{}\verb@ "int elsize", "int elsign", "int dimfast", "int dimslow"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_image_sf":["""@\\ @@ -2114,7 +2163,7 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_image_sf",@\\ \mbox{}\verb@[ "int element_number","int compression","(binary) String data", @\\ -\mbox{}\verb@ "int elsize", "int elsign", "int dimslow", "int dimfast"],[]],@\\ +\mbox{}\verb@ "int elsize", "int elsign", "int dimslow", "int dimfast"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_real_image":["""@\\ @@ -2142,7 +2191,7 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_real_image",@\\ \mbox{}\verb@[ "int element_number","int compression","(binary) String data", @\\ -\mbox{}\verb@ "int elsize", "int dimslow", "int dimfast"],[]],@\\ +\mbox{}\verb@ "int elsize", "int dimslow", "int dimfast"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_real_image_fs":["""@\\ @@ -2170,7 +2219,7 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_real_image_fs",@\\ \mbox{}\verb@[ "int element_number","int compression","(binary) String data", @\\ -\mbox{}\verb@ "int elsize", "int dimfast", "int dimslow"],[]],@\\ +\mbox{}\verb@ "int elsize", "int dimfast", "int dimslow"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_real_image_sf":["""@\\ @@ -2198,7 +2247,7 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_real_image_sf",@\\ \mbox{}\verb@[ "int element_number","int compression","(binary) String data", @\\ -\mbox{}\verb@ "int elsize", "int dimslow", "int dimfast"],[]],@\\ +\mbox{}\verb@ "int elsize", "int dimslow", "int dimfast"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_3d_image":["""@\\ @@ -2226,7 +2275,7 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_3d_image",@\\ \mbox{}\verb@[ "int element_number","int compression","(binary) String data", @\\ -\mbox{}\verb@ "int elsize", "int elsign", "int dimslow", "int dimmid", "int dimfast"],[]],@\\ +\mbox{}\verb@ "int elsize", "int elsign", "int dimslow", "int dimmid", "int dimfast"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_3d_image_fs":["""@\\ @@ -2254,7 +2303,7 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_3d_image_fs",@\\ \mbox{}\verb@[ "int element_number","int compression","(binary) String data", @\\ -\mbox{}\verb@ "int elsize", "int elsign", "int dimfast", "int dimmid", "int dimslow"],[]],@\\ +\mbox{}\verb@ "int elsize", "int elsign", "int dimfast", "int dimmid", "int dimslow"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_3d_image_sf":["""@\\ @@ -2282,7 +2331,7 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_3d_image_sf",@\\ \mbox{}\verb@[ "int element_number","int compression","(binary) String data", @\\ -\mbox{}\verb@ "int elsize", "int elsign", "int dimslow", "int dimmid", "int dimfast"],[]],@\\ +\mbox{}\verb@ "int elsize", "int elsign", "int dimslow", "int dimmid", "int dimfast"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_real_3d_image":["""@\\ @@ -2310,7 +2359,7 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_real_3d_image",@\\ \mbox{}\verb@[ "int element_number","int compression","(binary) String data", @\\ -\mbox{}\verb@ "int elsize", "int dimslow", "int dimmid", "int dimfast"],[]],@\\ +\mbox{}\verb@ "int elsize", "int dimslow", "int dimmid", "int dimfast"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_real_3d_image_fs":["""@\\ @@ -2338,7 +2387,7 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_real_3d_image_fs",@\\ \mbox{}\verb@[ "int element_number","int compression","(binary) String data", @\\ -\mbox{}\verb@ "int elsize", "int dimfast", "int dimmid", "int dimslow"],[]],@\\ +\mbox{}\verb@ "int elsize", "int dimfast", "int dimmid", "int dimslow"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_real_3d_image_sf":["""@\\ @@ -2366,7 +2415,7 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_real_3d_image_sf",@\\ \mbox{}\verb@[ "int element_number","int compression","(binary) String data", @\\ -\mbox{}\verb@ "int elsize", "int dimslow", "int dimmid", "int dimfast"],[]],@\\ +\mbox{}\verb@ "int elsize", "int dimslow", "int dimmid", "int dimfast"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_image_size": ["""@\\ @@ -2379,7 +2428,7 @@ \section{Wrappers} \mbox{}\verb@ *ndimslow = (int)inslow;@\\ \mbox{}\verb@ *ndimfast = (int)infast; @\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","get_image_size",["Integer element_number"],["size_t ndim1","size_t ndim2"]],@\\ +\mbox{}\verb@""","get_image_size",["Integer element_number"],["size_t ndim1","size_t ndim2"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_image_size_fs": ["""@\\ @@ -2392,7 +2441,7 @@ \section{Wrappers} \mbox{}\verb@ *ndimfast = (int)infast; /* FIXME - is that how to convert? */@\\ \mbox{}\verb@ *ndimslow = (int)inslow; @\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","get_image_size_fs",["Integer element_number"],["size_t ndimfast","size_t ndimslow"]],@\\ +\mbox{}\verb@""","get_image_size_fs",["Integer element_number"],["size_t ndimfast","size_t ndimslow"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_image_size_sf": ["""@\\ @@ -2405,7 +2454,7 @@ \section{Wrappers} \mbox{}\verb@ *ndimslow = (int)inslow;@\\ \mbox{}\verb@ *ndimfast = (int)infast; @\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","get_image_size_sf",["Integer element_number"],["size_t ndimslow","size_t ndimfast"]],@\\ +\mbox{}\verb@""","get_image_size_sf",["Integer element_number"],["size_t ndimslow","size_t ndimfast"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_3d_image_size": ["""@\\ @@ -2419,7 +2468,7 @@ \section{Wrappers} \mbox{}\verb@ *ndimmid = (int)inmid; @\\ \mbox{}\verb@ *ndimfast = (int)infast;@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","get_3d_image_size",["Integer element_number"],["size_t ndimslow","size_t ndimmid","size_t ndimfast"]],@\\ +\mbox{}\verb@""","get_3d_image_size",["Integer element_number"],["size_t ndimslow","size_t ndimmid","size_t ndimfast"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_3d_image_size_fs": ["""@\\ @@ -2433,7 +2482,7 @@ \section{Wrappers} \mbox{}\verb@ *ndimmid = (int)inmid; @\\ \mbox{}\verb@ *ndimfast = (int)infast;@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","get_3d_image_size",["Integer element_number"],["size_t ndimfast","size_t ndimmid","size_t ndimslow"]],@\\ +\mbox{}\verb@""","get_3d_image_size",["Integer element_number"],["size_t ndimfast","size_t ndimmid","size_t ndimslow"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_3d_image_size_sf": ["""@\\ @@ -2447,7 +2496,7 @@ \section{Wrappers} \mbox{}\verb@ *ndimmid = (int)inmid; @\\ \mbox{}\verb@ *ndimfast = (int)infast;@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","get_3d_image_size_sf",["Integer element_number"],["size_t ndimslow","size_t ndimmid","size_t ndimfast"]],@\\ +\mbox{}\verb@""","get_3d_image_size_sf",["Integer element_number"],["size_t ndimslow","size_t ndimmid","size_t ndimfast"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_pixel_size" : ["""@\\ @@ -2498,7 +2547,7 @@ \section{Wrappers} \mbox{}\verb@ psize));@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_pixel_size",@\\ -\mbox{}\verb@ ["Int element_number","Int axis_number","Float pixel size"],[]],@\\ +\mbox{}\verb@ ["Int element_number","Int axis_number","Float pixel size"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_pixel_size_fs":["""@\\ @@ -2510,7 +2559,7 @@ \section{Wrappers} \mbox{}\verb@ psize));@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_pixel_size_fs",@\\ -\mbox{}\verb@ ["Int element_number","Int axis_number","Float pixel size"],[]],@\\ +\mbox{}\verb@ ["Int element_number","Int axis_number","Float pixel size"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_pixel_size_sf":["""@\\ @@ -2522,11 +2571,11 @@ \section{Wrappers} \mbox{}\verb@ psize));@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_pixel_size_sf",@\\ -\mbox{}\verb@ ["Int element_number","Int axis_number","Float pixel size"],[]],@\\ +\mbox{}\verb@ ["Int element_number","Int axis_number","Float pixel size"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_write_file" : ["""@\\ -\mbox{}\verb@ void write_file(const char* filename, int ciforcbf, int headers, @\\ +\mbox{}\verb@ void write_file(char* filename, int ciforcbf, int headers, @\\ \mbox{}\verb@ int encoding){@\\ \mbox{}\verb@ FILE *stream;@\\ \mbox{}\verb@ int readable;@\\ @@ -2542,11 +2591,11 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","write_file",["String filename","Integer ciforcbf","Integer Headers", @\\ -\mbox{}\verb@ "Integer encoding"],[]],@\\ +\mbox{}\verb@ "Integer encoding"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_write_widefile" : ["""@\\ -\mbox{}\verb@ void write_widefile(const char* filename, int ciforcbf, int headers, @\\ +\mbox{}\verb@ void write_widefile(char* filename, int ciforcbf, int headers, @\\ \mbox{}\verb@ int encoding){@\\ \mbox{}\verb@ FILE *stream;@\\ \mbox{}\verb@ int readable;@\\ @@ -2563,7 +2612,7 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","write_widefile",["String filename","Integer ciforcbf","Integer Headers", @\\ -\mbox{}\verb@ "Integer encoding"],[]],@\\ +\mbox{}\verb@ "Integer encoding"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_read_template":["""@\\ @@ -2578,7 +2627,7 @@ \section{Wrappers} \mbox{}\verb@ cbf_failnez(cbf_read_template (self, stream)); }@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@@\\ -\mbox{}\verb@""","read_template",["String filename"],[]],@\\ +\mbox{}\verb@""","read_template",["String filename"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_read_file" : ["""@\\ @@ -2593,7 +2642,7 @@ \section{Wrappers} \mbox{}\verb@ cbf_failnez(cbf_read_file(self, stream, headers)); @\\ \mbox{}\verb@ }@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","read_file",["String filename","Integer headers"],[]],@\\ +\mbox{}\verb@""","read_file",["String filename","Integer headers"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ @@ -2609,13 +2658,13 @@ \section{Wrappers} \mbox{}\verb@ cbf_failnez(cbf_read_widefile(self, stream, headers)); @\\ \mbox{}\verb@ }@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","read_widefile",["String filename","Integer headers"],[]],@\\ +\mbox{}\verb@""","read_widefile",["String filename","Integer headers"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_doublevalue":["""@\\ \mbox{}\verb@ void set_doublevalue(const char *format, double number){@\\ \mbox{}\verb@ cbf_failnez(cbf_set_doublevalue(self,format,number));}@\\ -\mbox{}\verb@""","set_doublevalue",["String format","Float number"],[]],@\\ +\mbox{}\verb@""","set_doublevalue",["String format","Float number"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_require_integervalue":["""@\\ @@ -2626,7 +2675,7 @@ \section{Wrappers} \mbox{}\verb@ cbf_failnez(cbf_require_integervalue(self,number,thedefault));@\\ \mbox{}\verb@@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","require_integervalue", ["Int thedefault"],["Int number"]],@\\ +\mbox{}\verb@""","require_integervalue", ["Int thedefault"],["Int number"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_require_doublevalue":["""@\\ @@ -2634,7 +2683,7 @@ \section{Wrappers} \mbox{}\verb@void require_doublevalue(double *number, double defaultvalue){@\\ \mbox{}\verb@ cbf_failnez(cbf_require_doublevalue(self,number,defaultvalue));@\\ \mbox{}\verb@}@\\ -\mbox{}\verb@""","require_doublevalue",["Float Default"],["Float Number"]],@\\ +\mbox{}\verb@""","require_doublevalue",["Float Default"],["Float Number"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_require_column_value":["""@\\ @@ -2646,7 +2695,7 @@ \section{Wrappers} \mbox{}\verb@ return result;@\\ \mbox{}\verb@}@\\ \mbox{}\verb@""","require_column_value",@\\ -\mbox{}\verb@ ["String columnnanme","String Default"],["String Name"]],@\\ +\mbox{}\verb@ ["String columnnanme","String Default"],["String Name"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_require_column_doublevalue":["""@\\ @@ -2657,7 +2706,7 @@ \section{Wrappers} \mbox{}\verb@ columnname,number,defaultvalue));@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","require_column_doublevalue",["String columnname","Float Value"],@\\ -\mbox{}\verb@ ["Float defaultvalue"]],@\\ +\mbox{}\verb@ ["Float defaultvalue"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_require_column_integervalue":["""@\\ @@ -2668,7 +2717,7 @@ \section{Wrappers} \mbox{}\verb@ columnname, number,defaultvalue));@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","require_column_integervalue",["String Columnvalue","Int default"],@\\ -\mbox{}\verb@ ["Int Value"]],@\\ +\mbox{}\verb@ ["Int Value"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@ @\\ \mbox{}\verb@@\\ @@ -2689,7 +2738,7 @@ \section{Wrappers} \mbox{}\verb@ cbf_failnez(cbf_require_diffrn_id(self,&id,defaultid));@\\ \mbox{}\verb@ return id;@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","require_diffrn_id", ["String Default_id"],["String diffrn_id"]],@\\ +\mbox{}\verb@""","require_diffrn_id", ["String Default_id"],["String diffrn_id"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ @@ -2700,7 +2749,7 @@ \section{Wrappers} \mbox{}\verb@ cbf_failnez(cbf_get_polarization (self, in1, in2));@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","get_polarization",[],@\\ -\mbox{}\verb@ ["float polarizn_source_ratio","float polarizn_source_norm"]],@\\ +\mbox{}\verb@ ["float polarizn_source_ratio","float polarizn_source_norm"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_polarization":["""@\\ @@ -2711,7 +2760,7 @@ \section{Wrappers} \mbox{}\verb@ polarizn_source_norm));@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_polarization",@\\ -\mbox{}\verb@ ["Float polarizn_source_ratio","Float polarizn_source_norm"],[]],@\\ +\mbox{}\verb@ ["Float polarizn_source_ratio","Float polarizn_source_norm"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_divergence":["""@\\ @@ -2725,7 +2774,7 @@ \section{Wrappers} \mbox{}\verb@ div_x_y_source)); @\\ \mbox{}\verb@ } @\\ \mbox{}\verb@""","get_divergence",[],@\\ -\mbox{}\verb@ ["Float div_x_source","Float div_y_source","Float div_x_y_source"]],@\\ +\mbox{}\verb@ ["Float div_x_source","Float div_y_source","Float div_x_y_source"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_divergence":["""@\\ @@ -2735,7 +2784,7 @@ \section{Wrappers} \mbox{}\verb@ div_y_source,div_x_y_source));@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_divergence",@\\ -\mbox{}\verb@ ["Float div_x_source","Float div_y_source","Float div_x_y_source"],[]],@\\ +\mbox{}\verb@ ["Float div_x_source","Float div_y_source","Float div_x_y_source"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_gain":["""@\\ \mbox{}\verb@%apply double *OUTPUT {double *gain, double *gain_esd} get_gain;@\\ @@ -2744,14 +2793,14 @@ \section{Wrappers} \mbox{}\verb@ cbf_failnez(cbf_get_gain (self, element_number, gain, gain_esd));@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","get_gain",@\\ -\mbox{}\verb@ [],["Float gain", "Float gain_esd"]],@\\ +\mbox{}\verb@ [],["Float gain", "Float gain_esd"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_gain":["""@\\ \mbox{}\verb@ void set_gain (unsigned int element_number, double gain, double gain_esd){@\\ \mbox{}\verb@ cbf_failnez(cbf_set_gain (self, element_number, gain, gain_esd));@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","set_gain",["Float gain", "Float gain_esd"],[]],@\\ +\mbox{}\verb@""","set_gain",["Float gain", "Float gain_esd"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_element_id":["""@\\ \mbox{}\verb@ const char * get_element_id(unsigned int element_number){@\\ @@ -2759,7 +2808,8 @@ \section{Wrappers} \mbox{}\verb@ cbf_failnez(cbf_get_element_id (self, element_number, &result));@\\ \mbox{}\verb@ return result;@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","get_element_id", ["Integer element_number"],["String"]],@\\ +\mbox{}\verb@""","get_element_id", ["Integer element_number"],["String"],],@\\ +\mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_axis_setting":["""@\\ @@ -2771,8 +2821,110 @@ \section{Wrappers} \mbox{}\verb@ axis_id,start,increment));@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_axis_setting",["String axis_id", "Float start", "Float increment"],@\\ -\mbox{}\verb@ []],@\\ +\mbox{}\verb@ [],],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ \mbox{}\verb@@\\ +\mbox{}\verb@"cbf_count_axis_ancestors":["""@\\ +\mbox{}\verb@%apply int *OUTPUT {int *ancestors} count_axis_ancestors;@\\ +\mbox{}\verb@ void count_axis_ancestors(const char *axis_id,@\\ +\mbox{}\verb@ int *ancestors){@\\ +\mbox{}\verb@ unsigned int anc;@\\ +\mbox{}\verb@ cbf_failnez(cbf_count_axis_ancestors(self,axis_id,&anc));@\\ +\mbox{}\verb@ *ancestors = anc;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","count_axis_ancestors",["String axis_id"],["Integer"],],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_axis_ancestor":["""@\\ +\mbox{}\verb@ const char * get_axis_ancestor(const char *axis_id,@\\ +\mbox{}\verb@ int ancestor_index){@\\ +\mbox{}\verb@ const char* anc;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_axis_ancestor(self,axis_id,@\\ +\mbox{}\verb@ (unsigned int)ancestor_index,&anc));@\\ +\mbox{}\verb@ return anc;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_axis_ancestor",["String axis_id", "Integer ancestor_index"],["String"],],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_axis_depends_on":["""@\\ +\mbox{}\verb@ const char * get_axis_depends_on(const char *axis_id){@\\ +\mbox{}\verb@ const char* dep_on;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_axis_depends_on(self,axis_id,@\\ +\mbox{}\verb@ &dep_on));@\\ +\mbox{}\verb@ return dep_on;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_axis_depends_on",["String axis_id"],["String"],],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_axis_equipment":["""@\\ +\mbox{}\verb@ const char * get_axis_equipment(const char *axis_id){@\\ +\mbox{}\verb@ const char* equip;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_axis_equipment(self,axis_id,@\\ +\mbox{}\verb@ &equip));@\\ +\mbox{}\verb@ return equip;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_axis_equipment",["String axis_id"],["String"],],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_axis_equipment_component":["""@\\ +\mbox{}\verb@ const char * get_axis_equipment_component(const char *axis_id){@\\ +\mbox{}\verb@ const char* equip_comp;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_axis_equipment_component(self,axis_id,@\\ +\mbox{}\verb@ &equip_comp));@\\ +\mbox{}\verb@ return equip_comp;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_axis_equipment_component",["String axis_id"],["String"],],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_axis_offset":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *offset1, double *offset2, double offset3} get_axis_offset;@\\ +\mbox{}\verb@ void get_axis_offset(const char *axis_id,@\\ +\mbox{}\verb@ double *offset1, double *offset2, double*offset3){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_axis_offset(self,axis_id,@\\ +\mbox{}\verb@ offset1, offset2,offset3));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_axis_offset",["String axis_id"],@\\ +\mbox{}\verb@ ["Float offset1", "Float offset2", "Float offset3"],],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_axis_rotation":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *rotation} get_axis_rotation;@\\ +\mbox{}\verb@ void get_axis_rotation(const char *axis_id,@\\ +\mbox{}\verb@ double *rotation){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_axis_rotation(self,axis_id,@\\ +\mbox{}\verb@ rotation));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_axis_rotation",["String axis_id"],@\\ +\mbox{}\verb@ ["Float"],],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_axis_rotation_axis":["""@\\ +\mbox{}\verb@ const char * get_axis_rotation_axis(const char *axis_id){@\\ +\mbox{}\verb@ const char* rot_axis;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_axis_rotation_axis(self,axis_id,@\\ +\mbox{}\verb@ &rot_axis));@\\ +\mbox{}\verb@ return rot_axis;@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_axis_rotation_axis",["String axis_id"],["String"],],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_axis_type":["""@\\ +\mbox{}\verb@ const char * get_axis_type(const char *axis_id){@\\ +\mbox{}\verb@ cbf_axis_type axis_type;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_axis_type(self,axis_id,@\\ +\mbox{}\verb@ &axis_type));@\\ +\mbox{}\verb@ if (axis_type == CBF_TRANSLATION_AXIS) return "translation";@\\ +\mbox{}\verb@ if (axis_type == CBF_ROTATION_AXIS) return "rotation";@\\ +\mbox{}\verb@ return "general";@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_axis_type",["String axis_id"],["String"],],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_axis_vector":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *vector1, double *vector2, double vector3} get_axis_vector;@\\ +\mbox{}\verb@ void get_axis_vector(const char *axis_id,@\\ +\mbox{}\verb@ double *vector1, double *vector2, double *vector3){@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_axis_vector(self,axis_id,@\\ +\mbox{}\verb@ vector1, vector2,vector3));@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@""","get_axis_vector",["String axis_id"],@\\ +\mbox{}\verb@ ["Float vector1", "Float vector2", "Float vector3"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_axis_setting":["""@\\ \mbox{}\verb@%apply double *OUTPUT {double *start, double *increment} get_axis_setting;@\\ @@ -2798,7 +2950,7 @@ \section{Wrappers} \mbox{}\verb@ year,month,day,hour,minute,second,timezone));@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","get_datestamp",[],["int year", "int month", "int day", "int hour", @\\ -\mbox{}\verb@"int minute", "double second", "int timezone"]],@\\ +\mbox{}\verb@"int minute", "double second", "int timezone"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ @@ -2812,7 +2964,7 @@ \section{Wrappers} \mbox{}\verb@ year,month,day,hour,minute,second,timezone,precision));@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_datestamp",["int year", "int month", "int day", "int hour", @\\ -\mbox{}\verb@"int minute", "double second", "int timezone","Float precision"],[]],@\\ +\mbox{}\verb@"int minute", "double second", "int timezone","Float precision"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_timestamp":["""@\\ @@ -2823,7 +2975,7 @@ \section{Wrappers} \mbox{}\verb@ reserved = 0; @\\ \mbox{}\verb@ cbf_failnez(cbf_get_timestamp(self,reserved,time,timezone));@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","get_timestamp",[],["Float time","Integer timezone"]],@\\ +\mbox{}\verb@""","get_timestamp",[],["Float time","Integer timezone"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ @@ -2833,7 +2985,7 @@ \section{Wrappers} \mbox{}\verb@ reserved = 0; @\\ \mbox{}\verb@ cbf_failnez(cbf_set_timestamp(self,reserved,time,timezone,precision));@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","set_timestamp",["Float time","Integer timezone","Float precision"],[]],@\\ +\mbox{}\verb@""","set_timestamp",["Float time","Integer timezone","Float precision"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_current_timestamp":["""@\\ @@ -2842,7 +2994,7 @@ \section{Wrappers} \mbox{}\verb@ reserved = 0; @\\ \mbox{}\verb@ cbf_failnez(cbf_set_current_timestamp(self,reserved,timezone));@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","set_current_timestamp",["Integer timezone"],[]],@\\ +\mbox{}\verb@""","set_current_timestamp",["Integer timezone"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ @@ -2851,13 +3003,13 @@ \section{Wrappers} \mbox{}\verb@ void get_overload(unsigned int element_number, double *overload){@\\ \mbox{}\verb@ cbf_failnez(cbf_get_overload(self,element_number,overload));@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","get_overload",["Integer element_number"],["Float overload"]],@\\ +\mbox{}\verb@""","get_overload",["Integer element_number"],["Float overload"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_overload":["""@\\ \mbox{}\verb@ void set_overload(unsigned int element_number, double overload){@\\ \mbox{}\verb@ cbf_failnez(cbf_set_overload(self,element_number,overload));@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","set_overload",["Integer element_number","Float overload"],[]],@\\ +\mbox{}\verb@""","set_overload",["Integer element_number","Float overload"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_integration_time":["""@\\ @@ -2866,7 +3018,7 @@ \section{Wrappers} \mbox{}\verb@ reserved = 0;@\\ \mbox{}\verb@ cbf_failnez(cbf_set_integration_time(self,reserved,time));@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","set_integration_time",["Float time"],[]],@\\ +\mbox{}\verb@""","set_integration_time",["Float time"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ @@ -2879,7 +3031,7 @@ \section{Wrappers} \mbox{}\verb@ cbf_failnez(cbf_get_integration_time(self,reserved,&tim));@\\ \mbox{}\verb@ *time = tim;@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","get_integration_time",[],["Float time"]],@\\ +\mbox{}\verb@""","get_integration_time",[],["Float time"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_orientation_matrix":["""@\\ \mbox{}\verb@%apply double *OUTPUT {double *m0,double *m1,double *m2,@\\ @@ -3022,7 +3174,7 @@ \section{Wrappers} \mbox{}\verb@ cbf_failnez(cbf_require_tag_root(self,tagname,&result));@\\ \mbox{}\verb@ return result;@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","require_tag_root",["String tagname"],["String tagroot"]],@\\ +\mbox{}\verb@""","require_tag_root",["String tagname"],["String tagroot"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_find_tag_root":["""@\\ \mbox{}\verb@const char * find_tag_root(const char* tagname){@\\ @@ -3030,20 +3182,20 @@ \section{Wrappers} \mbox{}\verb@ cbf_failnez(cbf_find_tag_root(self,tagname,&result));@\\ \mbox{}\verb@ return result;@\\ \mbox{}\verb@}@\\ -\mbox{}\verb@""","find_tag_root",["String tagname"],["String tagroot"]],@\\ +\mbox{}\verb@""","find_tag_root",["String tagname"],["String tagroot"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_tag_root":["""@\\ \mbox{}\verb@void set_tag_root(const char* tagname, const char* tagroot_in){@\\ \mbox{}\verb@ cbf_failnez(cbf_set_tag_root(self,tagname,tagroot_in));@\\ \mbox{}\verb@}@\\ -\mbox{}\verb@""","set_tag_root",["String tagname","String tagroot_in"],[]],@\\ +\mbox{}\verb@""","set_tag_root",["String tagname","String tagroot_in"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_category_root":["""@\\ \mbox{}\verb@void set_category_root(const char* categoryname, const char* categoryroot){@\\ \mbox{}\verb@ cbf_failnez(cbf_set_category_root(self,categoryname,categoryroot));@\\ \mbox{}\verb@}@\\ -\mbox{}\verb@""","set_category_root",["String categoryname","String categoryroot"],[]],@\\ +\mbox{}\verb@""","set_category_root",["String categoryname","String categoryroot"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_find_category_root":["""@\\ @@ -3052,7 +3204,7 @@ \section{Wrappers} \mbox{}\verb@ cbf_failnez(cbf_find_category_root(self,categoryname,&result));@\\ \mbox{}\verb@ return result;@\\ \mbox{}\verb@}@\\ -\mbox{}\verb@""","find_category_root",["String categoryname"],["String categoryroot"]],@\\ +\mbox{}\verb@""","find_category_root",["String categoryname"],["String categoryroot"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ @@ -3065,7 +3217,7 @@ \section{Wrappers} \mbox{}\verb@ cbf_failnez(cbf_require_category_root(self,categoryname, &result));@\\ \mbox{}\verb@ return result;@\\ \mbox{}\verb@}@\\ -\mbox{}\verb@""","cbf_require_category_root",["String Categoryname"],["String categoryroot"]],@\\ +\mbox{}\verb@""","cbf_require_category_root",["String Categoryname"],["String categoryroot"],],@\\ \mbox{}\verb@ @\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_orientation_matrix":["""@\\ @@ -3079,7 +3231,7 @@ \section{Wrappers} \mbox{}\verb@ cbf_failnez(cbf_get_orientation_matrix(self,m));@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_orientation_matrix",@\\ -\mbox{}\verb@ [ "Float matrix_%d"%(ind) for ind in range(9) ] ,[]],@\\ +\mbox{}\verb@ [ "Float matrix_%d"%(ind) for ind in range(9) ] ,[],],@\\ \mbox{}\verb@ @\\ \mbox{}\verb@"cbf_set_bin_sizes":["""@\\ \mbox{}\verb@ void set_bin_sizes( int element_number, double slowbinsize_in, double fastbinsize_in) {@\\ @@ -3106,7 +3258,7 @@ \section{Wrappers} \mbox{}\verb@ cbf_failnez(cbf_require_dictionary(self,&temp));@\\ \mbox{}\verb@ return temp;@\\ \mbox{}\verb@}@\\ -\mbox{}\verb@""","require_dictionary",[],["CBFHandle dictionary"]],@\\ +\mbox{}\verb@""","require_dictionary",[],["CBFHandle dictionary"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_dictionary":["""@\\ @@ -3115,7 +3267,7 @@ \section{Wrappers} \mbox{}\verb@ cbf_failnez(cbf_get_dictionary(self,&temp));@\\ \mbox{}\verb@ return temp;@\\ \mbox{}\verb@}@\\ -\mbox{}\verb@""","get_dictionary",[],["CBFHandle dictionary"]],@\\ +\mbox{}\verb@""","get_dictionary",[],["CBFHandle dictionary"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ @@ -3123,7 +3275,7 @@ \section{Wrappers} \mbox{}\verb@void set_dictionary(cbf_handle other){@\\ \mbox{}\verb@ cbf_failnez(cbf_set_dictionary(self,other));@\\ \mbox{}\verb@}@\\ -\mbox{}\verb@""","set_dictionary",["CBFHandle dictionary"],[]],@\\ +\mbox{}\verb@""","set_dictionary",["CBFHandle dictionary"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ @@ -3131,7 +3283,7 @@ \section{Wrappers} \mbox{}\verb@void convert_dictionary(cbf_handle other){@\\ \mbox{}\verb@ cbf_failnez(cbf_convert_dictionary(self,other));@\\ \mbox{}\verb@}@\\ -\mbox{}\verb@""","convert_dictionary",["CBFHandle dictionary"],[]],@\\ +\mbox{}\verb@""","convert_dictionary",["CBFHandle dictionary"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_construct_detector":["""@\\ @@ -3140,7 +3292,7 @@ \section{Wrappers} \mbox{}\verb@ cbf_failnez(cbf_construct_detector(self,&detector,element_number));@\\ \mbox{}\verb@ return detector;@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","construct_detector",["Integer element_number"],["pycbf detector object"]],@\\ +\mbox{}\verb@""","construct_detector",["Integer element_number"],["pycbf detector object"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_construct_reference_detector":["""@\\ \mbox{}\verb@ cbf_detector construct_reference_detector(unsigned int element_number){@\\ @@ -3148,7 +3300,7 @@ \section{Wrappers} \mbox{}\verb@ cbf_failnez(cbf_construct_reference_detector(self,&detector,element_number));@\\ \mbox{}\verb@ return detector;@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","construct_reference_detector",["Integer element_number"],["pycbf detector object"]],@\\ +\mbox{}\verb@""","construct_reference_detector",["Integer element_number"],["pycbf detector object"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_require_reference_detector":["""@\\ \mbox{}\verb@ cbf_detector require_reference_detector(unsigned int element_number){@\\ @@ -3156,7 +3308,7 @@ \section{Wrappers} \mbox{}\verb@ cbf_failnez(cbf_require_reference_detector(self,&detector,element_number));@\\ \mbox{}\verb@ return detector;@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","require_reference_detector",["Integer element_number"],["pycbf detector object"]],@\\ +\mbox{}\verb@""","require_reference_detector",["Integer element_number"],["pycbf detector object"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_construct_goniometer":["""@\\ @@ -3165,7 +3317,7 @@ \section{Wrappers} \mbox{}\verb@ cbf_failnez(cbf_construct_goniometer(self,&goniometer));@\\ \mbox{}\verb@ return goniometer;@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","construct_goniometer",[],["pycbf goniometer object"]],@\\ +\mbox{}\verb@""","construct_goniometer",[],["pycbf goniometer object"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_construct_positioner":["""@\\ \mbox{}\verb@ cbf_positioner construct_positioner(const char* axis_id){@\\ @@ -3173,7 +3325,7 @@ \section{Wrappers} \mbox{}\verb@ cbf_failnez(cbf_construct_positioner(self,&positioner,axis_id));@\\ \mbox{}\verb@ return positioner;@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","construct_positioner",["String axis_id"],["pycbf positioner object"]],@\\ +\mbox{}\verb@""","construct_positioner",["String axis_id"],["pycbf positioner object"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_construct_reference_positioner":["""@\\ \mbox{}\verb@ cbf_positioner construct_reference_positioner(const char* axis_id){@\\ @@ -3181,7 +3333,7 @@ \section{Wrappers} \mbox{}\verb@ cbf_failnez(cbf_construct_reference_positioner(self,&positioner,axis_id));@\\ \mbox{}\verb@ return positioner;@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","construct_reference_positioner",["String axis_id"],["pycbf positioner object"]],@\\ +\mbox{}\verb@""","construct_reference_positioner",["String axis_id"],["pycbf positioner object"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_axis_reference_poise":["""@\\ \mbox{}\verb@ %apply double *OUTPUT {double *vector1, double *vector2, double *vector3, @\\ @@ -3198,7 +3350,7 @@ \section{Wrappers} \mbox{}\verb@@\\ \mbox{}\verb@""","get_axis_reference_poise",["String axis_id"],@\\ \mbox{}\verb@ ["Float vector1","Float vector2","Float vector3",@\\ -\mbox{}\verb@ "Float offset1","Float offset2","Float offset3"]],@\\ +\mbox{}\verb@ "Float offset1","Float offset2","Float offset3"],],@\\ \mbox{}\verb@ @\\ \mbox{}\verb@"cbf_get_axis_poise":["""@\\ \mbox{}\verb@ %apply double *OUTPUT {double *vector1, double *vector2, double *vector3, @\\ @@ -3218,7 +3370,7 @@ \section{Wrappers} \mbox{}\verb@""","get_axis_poise",@\\ \mbox{}\verb@ ["Float ratio", "String axis_id", "String frame_id"],@\\ \mbox{}\verb@ ["Float vector1","Float vector2","Float vector3",@\\ -\mbox{}\verb@ "Float offset1","Float offset2","Float offset3","Float angle"]],@\\ +\mbox{}\verb@ "Float offset1","Float offset2","Float offset3","Float angle"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@}@\\ \mbox{}\verb@@\\ @@ -3284,7 +3436,7 @@ \section{Wrappers} \mbox{}\verb@ def get_code(self):@\\ \mbox{}\verb@ return self.code+self.tail@\\ \mbox{}\verb@ def wrap(self,cfunc,prototype,args,docstring):@\\ -\mbox{}\verb@ # print "cfunc: ", cfunc@\\ +\mbox{}\verb@ # print("cfunc: ", cfunc)@\\ \mbox{}\verb@ pyfunc = cfunc.replace("cbf_","")@\\ \mbox{}\verb@ # Insert a comment for debugging this script@\\ \mbox{}\verb@ code = "\n/* cfunc %s pyfunc %s \n"%(cfunc,pyfunc)@\\ @@ -3296,7 +3448,7 @@ \section{Wrappers} \mbox{}\verb@ # Constructor and destructor done in headers@\\ \mbox{}\verb@ return@\\ \mbox{}\verb@ if args[0] != "cbf_handle handle": # Must be for cbfhandle@\\ -\mbox{}\verb@ print "problem",cfunc,pyfunc,args@\\ +\mbox{}\verb@ print("problem",cfunc,pyfunc,args)@\\ \mbox{}\verb@ return@\\ \mbox{}\verb@ if len(args)==1: # Only takes CBFhandle arg@\\ \mbox{}\verb@ code+= docstringwrite(pyfunc,[],[],prototype,docstring)@\\ @@ -3314,11 +3466,11 @@ \section{Wrappers} \mbox{}\verb@ return@\\ \mbox{}\verb@ except KeyError:@\\ \mbox{}\verb@ not_found = 1@\\ -\mbox{}\verb@ # print "KeyError"@\\ +\mbox{}\verb@ # print("KeyError")@\\ \mbox{}\verb@ except ValueError:@\\ -\mbox{}\verb@ print "problem in",cfunc@\\ +\mbox{}\verb@ print("problem in",cfunc)@\\ \mbox{}\verb@ for item in cbfhandle_specials[cfunc]:@\\ -\mbox{}\verb@ print "***",item@\\ +\mbox{}\verb@ print("***",item)@\\ \mbox{}\verb@ raise@\\ \mbox{}\verb@ if len(args)==2:@\\ \mbox{}\verb@ if args[1].find("const char")>-1 and \@\\ @@ -3385,12 +3537,12 @@ \section{Wrappers} \mbox{}\verb@ code+= " void %s(void){\n"%(pyfunc)@\\ \mbox{}\verb@ code +=" cbf_failnez(CBF_NOTIMPLEMENTED);}\n"@\\ \mbox{}\verb@ self.code=self.code+code@\\ -\mbox{}\verb@ print "Have not implemented: cbfhandle.%s"%(pyfunc)@\\ -\mbox{}\verb@ print " ",cfunc@\\ -\mbox{}\verb@ print " args:"@\\ +\mbox{}\verb@ print("Have not implemented: cbfhandle.%s"%(pyfunc))@\\ +\mbox{}\verb@ print(" ",cfunc)@\\ +\mbox{}\verb@ print(" args:")@\\ \mbox{}\verb@ for a in args:@\\ -\mbox{}\verb@ print " ",a @\\ -\mbox{}\verb@ print@\\ +\mbox{}\verb@ print(" ",a) @\\ +\mbox{}\verb@ print()@\\ \mbox{}\verb@ return@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ @@ -3407,7 +3559,7 @@ \section{Wrappers} \mbox{}\verb@ reserved = 0;@\\ \mbox{}\verb@ cbf_failnez(cbf_get_rotation_range (self,reserved, start,increment));@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","get_rotation_range",[],["Float start","Float increment"]],@\\ +\mbox{}\verb@""","get_rotation_range",[],["Float start","Float increment"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_rotate_vector":["""@\\ \mbox{}\verb@@\\ @@ -3473,7 +3625,7 @@ \section{Wrappers} \mbox{}\verb@""","get_goniometer_poise",["Float ratio"],@\\ \mbox{}\verb@ ["Float vector1","Float vector2","Float vector3",@\\ \mbox{}\verb@ "Float offset1","Float offset2","Float offset3",@\\ -\mbox{}\verb@ "Float angle"]],@\\ +\mbox{}\verb@ "Float angle"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@}@\\ @@ -3534,7 +3686,7 @@ \section{Wrappers} \mbox{}\verb@ self.code += docstringwrite(pyname,input,output,@\\ \mbox{}\verb@ prototype,docstring)+ code@\\ \mbox{}\verb@ except KeyError:@\\ -\mbox{}\verb@ print "TODO: Goniometer:",prototype@\\ +\mbox{}\verb@ print("TODO: Goniometer:",prototype)@\\ \mbox{}\verb@ def get_code(self):@\\ \mbox{}\verb@ return self.code+self.tail@\\ \mbox{}\verb@@\\ @@ -3642,6 +3794,22 @@ \section{Wrappers} \mbox{}\verb@ "double fastaxis1","double fastaxis2", "double fastaxis3" ] ],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ +\mbox{}\verb@"cbf_get_detector_surface_axes":["""@\\ +\mbox{}\verb@ const char * get_detector_surface_axes (int index ){@\\ +\mbox{}\verb@ const char * axis_id1;@\\ +\mbox{}\verb@ const char * axis_id2;@\\ +\mbox{}\verb@ cbf_failnez(cbf_get_detector_surface_axes(self,@\\ +\mbox{}\verb@ &axis_id1, &axis_id2));@\\ +\mbox{}\verb@ if (index == 0) return axis_id1;@\\ +\mbox{}\verb@ if (index == 1) return axis_id2;@\\ +\mbox{}\verb@ return ".";@\\ +\mbox{}\verb@ }@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@""","cbf_get_detector_surface_axes", ["Integer index" ],@\\ +\mbox{}\verb@ ["String" ] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_pixel_area":["""@\\ \mbox{}\verb@%apply double *OUTPUT{double *area,double *projected_area};@\\ \mbox{}\verb@ void get_pixel_area(double index1, double index2,@\\ @@ -3680,7 +3848,7 @@ \section{Wrappers} \mbox{}\verb@ void get_detector_distance (double *distance){@\\ \mbox{}\verb@ cbf_failnez(cbf_get_detector_distance(self,distance));@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","get_detector_distance",[],["double distance"]],@\\ +\mbox{}\verb@""","get_detector_distance",[],["double distance"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_detector_normal":["""@\\ @@ -3692,7 +3860,7 @@ \section{Wrappers} \mbox{}\verb@ normal1, normal2, normal3));@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","get_detector_normal",[],@\\ -\mbox{}\verb@["double normal1", "double normal2", "double normal3"]],@\\ +\mbox{}\verb@["double normal1", "double normal2", "double normal3"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_pixel_coordinates":["""@\\ @@ -3744,7 +3912,7 @@ \section{Wrappers} \mbox{}\verb@ center1, center2));@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","get_beam_center",[],@\\ -\mbox{}\verb@["double index1", "double index2", "double center1","double center2"]],@\\ +\mbox{}\verb@["double index1", "double index2", "double center1","double center2"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_beam_center_fs":["""@\\ @@ -3756,7 +3924,7 @@ \section{Wrappers} \mbox{}\verb@ centerfast, centerslow));@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","get_beam_center_fs",[],@\\ -\mbox{}\verb@["double indexfast", "double indexslow", "double centerfast","double centerslow"]],@\\ +\mbox{}\verb@["double indexfast", "double indexslow", "double centerfast","double centerslow"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_beam_center_sf":["""@\\ @@ -3768,7 +3936,7 @@ \section{Wrappers} \mbox{}\verb@ centerslow, centerfast));@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","get_beam_center_sf",[],@\\ -\mbox{}\verb@["double indexslow", "double indexfast", "double centerslow","double centerfast"]],@\\ +\mbox{}\verb@["double indexslow", "double indexfast", "double centerslow","double centerfast"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_beam_center":["""@\\ @@ -3778,7 +3946,7 @@ \section{Wrappers} \mbox{}\verb@ centerslow, centerfast));@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_beam_center",@\\ -\mbox{}\verb@["double indexslow", "double indexfast", "double centerslow","double centerfast"],[]],@\\ +\mbox{}\verb@["double indexslow", "double indexfast", "double centerslow","double centerfast"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_beam_center_fs":["""@\\ @@ -3788,7 +3956,7 @@ \section{Wrappers} \mbox{}\verb@ centerfast, centerslow));@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_beam_center_fs",@\\ -\mbox{}\verb@["double indexfast", "double indexslow", "double centerfast","double centerslow"],[]],@\\ +\mbox{}\verb@["double indexfast", "double indexslow", "double centerfast","double centerslow"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_beam_center_sf":["""@\\ @@ -3798,7 +3966,7 @@ \section{Wrappers} \mbox{}\verb@ centerslow, centerfast));@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_beam_center_sf",@\\ -\mbox{}\verb@["double indexslow", "double indexfast", "double centerslow","double centerfast"],[]],@\\ +\mbox{}\verb@["double indexslow", "double indexfast", "double centerslow","double centerfast"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_reference_beam_center":["""@\\ @@ -3808,7 +3976,7 @@ \section{Wrappers} \mbox{}\verb@ centerslow, centerfast));@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_reference_beam_center",@\\ -\mbox{}\verb@["double indexslow", "double indexfast", "double centerslow","double centerfast"],[]],@\\ +\mbox{}\verb@["double indexslow", "double indexfast", "double centerslow","double centerfast"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_reference_beam_center_fs":["""@\\ @@ -3818,7 +3986,7 @@ \section{Wrappers} \mbox{}\verb@ centerfast, centerslow));@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_reference_beam_center_fs",@\\ -\mbox{}\verb@["double indexfast", "double indexslow", "double centerfast","double centerslow"],[]],@\\ +\mbox{}\verb@["double indexfast", "double indexslow", "double centerfast","double centerslow"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_set_reference_beam_center_sf":["""@\\ @@ -3828,7 +3996,7 @@ \section{Wrappers} \mbox{}\verb@ centerslow, centerfast));@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@""","set_reference_beam_center_sf",@\\ -\mbox{}\verb@["double indexslow", "double indexfast", "double centerslow","double centerfast"],[]],@\\ +\mbox{}\verb@["double indexslow", "double indexfast", "double centerslow","double centerfast"],[],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_inferred_pixel_size" : ["""@\\ @@ -3903,7 +4071,7 @@ \section{Wrappers} \mbox{}\verb@ self.code += docstringwrite(pyname,input,output,@\\ \mbox{}\verb@ prototype,docstring)+ code@\\ \mbox{}\verb@ except KeyError:@\\ -\mbox{}\verb@ print "TODO: Detector:",prototype@\\ +\mbox{}\verb@ print("TODO: Detector:",prototype)@\\ \mbox{}\verb@ def get_code(self):@\\ \mbox{}\verb@ return self.code+self.tail@\\ \mbox{}\verb@@\\ @@ -3958,7 +4126,7 @@ \section{Wrappers} \mbox{}\verb@ self.code += docstringwrite(pyname,input,output,@\\ \mbox{}\verb@ prototype,docstring)+ code@\\ \mbox{}\verb@ except KeyError:@\\ -\mbox{}\verb@ print "TODO: Positioner:",prototype@\\ +\mbox{}\verb@ print("TODO: Positioner:",prototype)@\\ \mbox{}\verb@ def get_code(self):@\\ \mbox{}\verb@ return self.code+self.tail@\\ \mbox{}\verb@ @\\ @@ -3979,7 +4147,7 @@ \section{Wrappers} \mbox{}\verb@ *bo = bot;@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","get_local_integer_byte_order",[],["char **bo", "int *bolen"]],@\\ +\mbox{}\verb@""","get_local_integer_byte_order",[],["char **bo", "int *bolen"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_local_real_format":["""@\\ @@ -3995,7 +4163,7 @@ \section{Wrappers} \mbox{}\verb@ *rf = rft;@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","get_local_real_format",[],["char **rf", "int *rflen"]],@\\ +\mbox{}\verb@""","get_local_real_format",[],["char **rf", "int *rflen"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_get_local_real_byte_order":["""@\\ @@ -4011,7 +4179,7 @@ \section{Wrappers} \mbox{}\verb@ *bo = bot;@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","get_local_real_byte_order",[],["char **bo", "int *bolen"]],@\\ +\mbox{}\verb@""","get_local_real_byte_order",[],["char **bo", "int *bolen"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_compute_cell_volume":["""@\\ @@ -4022,7 +4190,7 @@ \section{Wrappers} \mbox{}\verb@ cbf_failnez(cbf_compute_cell_volume(cell,volume));@\\ \mbox{}\verb@ }@\\ \mbox{}\verb@ }@\\ -\mbox{}\verb@""","compute_cell_volume",["double cell[6]"],["Float volume"]],@\\ +\mbox{}\verb@""","compute_cell_volume",["double cell[6]"],["Float volume"],],@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@"cbf_compute_reciprocal_cell":["""@\\ @@ -4043,11 +4211,38 @@ \section{Wrappers} \mbox{}\verb@ }@\\ \mbox{}\verb@@\\ \mbox{}\verb@""","compute_reciprocal_cell",["double cell[6]"],@\\ -\mbox{}\verb@["Float astar", "Float bstar", "Float cstar", "Float alphastar", "Float betastar", "Float gammastar"] ]@\\ +\mbox{}\verb@["Float astar", "Float bstar", "Float cstar", "Float alphastar", "Float betastar", "Float gammastar"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_airy_disk":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *value};@\\ +\mbox{}\verb@%inline {@\\ +\mbox{}\verb@void airy_disk(double x, double y, double cenx, double ceny,@\\ +\mbox{}\verb@double volume, double fwhm, double *value) {@\\ +\mbox{}\verb@cbf_failnez(cbf_airy_disk(x,y,cenx,ceny,volume,fwhm,value));@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@""","airy_disk",["double x", "double y", "double cenx", "double ceny", "double volume", "double fwhm"],@\\ +\mbox{}\verb@["Float value"] ],@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@"cbf_airy_disk_volume":["""@\\ +\mbox{}\verb@%apply double *OUTPUT {double *volumeout};@\\ +\mbox{}\verb@%inline {@\\ +\mbox{}\verb@void airy_disk_volume(double xlo, double ylo, double xhi, double yhi,@\\ +\mbox{}\verb@double cenx, double ceny, double volumein, double fwhm, double * volumeout) {@\\ +\mbox{}\verb@cbf_failnez(cbf_airy_disk_volume(xlo,ylo,xhi,yhi,cenx,ceny,volumein,fwhm,volumeout));@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@}@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@""","airy_disk_volume",["double xlo", "double ylo", "double xhi", "double yhi", "double cenx", "double ceny", "double volumein", "double fwhm"],@\\ +\mbox{}\verb@["Float volumeout"] ]@\\ +\mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@}@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@@\\ \mbox{}\verb@class genericwrapper:@\\ \mbox{}\verb@ def __init__(self):@\\ \mbox{}\verb@ self.code = """@\\ @@ -4074,11 +4269,11 @@ \section{Wrappers} \mbox{}\verb@ return@\\ \mbox{}\verb@ except KeyError:@\\ \mbox{}\verb@ not_found = 1@\\ -\mbox{}\verb@ # print "KeyError"@\\ +\mbox{}\verb@ # print("KeyError")@\\ \mbox{}\verb@ except ValueError:@\\ -\mbox{}\verb@ print "problem in generic",cfunc@\\ +\mbox{}\verb@ print("problem in generic",cfunc)@\\ \mbox{}\verb@ for item in cbfgeneric_specials[cfunc]:@\\ -\mbox{}\verb@ print "***",item@\\ +\mbox{}\verb@ print("***",item)@\\ \mbox{}\verb@ raise@\\ \mbox{}\verb@ if len(args)==1 and args[0].find("char")>-1 and \@\\ \mbox{}\verb@ args[0].find("**")>-1 :# return string@\\ @@ -4097,10 +4292,10 @@ \section{Wrappers} \mbox{}\verb@# code+= " void %s(void){\n"%(pyfunc)@\\ \mbox{}\verb@# code +=" cbf_failnez(CBF_NOTIMPLEMENTED);}\n"@\\ \mbox{}\verb@# self.code=self.code+code@\\ -\mbox{}\verb@ print "Have not implemented:"@\\ +\mbox{}\verb@ print("Have not implemented:")@\\ \mbox{}\verb@ for s in [cfunc, pyfunc] + args:@\\ -\mbox{}\verb@ print "\t",s @\\ -\mbox{}\verb@ print@\\ +\mbox{}\verb@ print("\t",s) @\\ +\mbox{}\verb@ print()@\\ \mbox{}\verb@ return@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ @@ -4108,22 +4303,22 @@ \section{Wrappers} \mbox{}\verb@@\\ \mbox{}\verb@@\\ \mbox{}\verb@def generate_wrappers(name_dict):@\\ -\mbox{}\verb@ names = name_dict.keys()@\\ +\mbox{}\verb@ names = list(name_dict.keys())@\\ \mbox{}\verb@ for cname in names:@\\ \mbox{}\verb@ prototype = name_dict[cname][0]@\\ \mbox{}\verb@ docstring = name_dict[cname][1]@\\ -\mbox{}\verb@ # print "Generate wrappers: ", "::",cname,"::", prototype,"::", docstring@\\ +\mbox{}\verb@ # print("Generate wrappers: ", "::",cname,"::", prototype,"::", docstring)@\\ \mbox{}\verb@ # Check prototype begins with "int cbf_"@\\ \mbox{}\verb@ if prototype.find("int cbf_")!=0:@\\ -\mbox{}\verb@ print "problem with:",prototype@\\ +\mbox{}\verb@ print("problem with:",prototype)@\\ \mbox{}\verb@ # Get arguments from prototypes@\\ \mbox{}\verb@ try:@\\ \mbox{}\verb@ args = prototype.split("(")[1].split(")")[0].split(",")@\\ \mbox{}\verb@ args = [ s.lstrip().rstrip() for s in args ] # strip spaces off ends@\\ -\mbox{}\verb@ # print "Args: ", args@\\ +\mbox{}\verb@ # print("Args: ", args)@\\ \mbox{}\verb@ except:@\\ -\mbox{}\verb@ # print cname@\\ -\mbox{}\verb@ # print prototype@\\ +\mbox{}\verb@ # print(cname)@\\ +\mbox{}\verb@ # print(prototype)@\\ \mbox{}\verb@ raise@\\ \mbox{}\verb@ if args[0].find("cbf_handle")>=0: # This is for the cbfhandle object@\\ \mbox{}\verb@ cbf_handle_wrapper.wrap(cname,prototype,args,docstring)@\\ @@ -4155,11 +4350,17 @@ \section{Wrappers} \mbox{}\verb@open("cbfhandlewrappers.i","w").write(cbf_handle_wrapper.get_code())@\\ \mbox{}\verb@open("cbfgenericwrappers.i","w").write(generic_wrapper.get_code())@\\ \mbox{}\verb@@\\ -\mbox{}\verb@print "End of output from make_pycbf.py"@\\ -\mbox{}\verb@print "\\end{verbatim}"@\\ +\mbox{}\verb@print("End of output from make_pycbf.py")@\\ +\mbox{}\verb@print("\\end{verbatim}")@\\ \mbox{}\verb@@{\NWsep} \end{list} -\vspace{-2ex} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} \end{flushleft} \section{Building python extensions - the setup file} @@ -4169,38 +4370,48 @@ \section{Building python extensions - the setup file} -\begin{flushleft} \small \label{scrap9} -\verb@"setup.py"@\nobreak\ {\footnotesize \NWtarget{nuweb62a}{62a} }$\equiv$ +\begin{flushleft} \small +\begin{minipage}{\linewidth}\label{scrap9}\raggedright\small +\NWtarget{nuweb11a}{} \verb@"py3setup_py.m4"@\nobreak\ {\footnotesize {11a}}$\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@@\\ +\mbox{}\verb@#@\\ +\mbox{}\verb@# py3setup_py.m4@\\ +\mbox{}\verb@#@\\ \mbox{}\verb@@\\ -\mbox{}\verb@# Import the things to build python binary extensions@\\ +\mbox{}\verb@`# Import the things to build python binary extensions@\\ \mbox{}\verb@@\\ \mbox{}\verb@from distutils.core import setup, Extension@\\ \mbox{}\verb@@\\ \mbox{}\verb@# Make our extension module@\\ \mbox{}\verb@@\\ -\mbox{}\verb@e = Extension('_pycbf',@\\ +\mbox{}\verb@e = Extension(''`_pycbf''`,@\\ \mbox{}\verb@ sources = ["pycbf_wrap.c","../src/cbf_simple.c"],@\\ -\mbox{}\verb@ extra_compile_args=["-g"],@\\ -\mbox{}\verb@ library_dirs=["../lib/"],@\\ -\mbox{}\verb@ libraries=["cbf"],@\\ -\mbox{}\verb@ include_dirs = ["../include"] )@\\ +\mbox{}\verb@ extra_compile_args=["-g", "-DSWIG_PYTHON_STRICT_BYTE_CHAR"],@\\ +\mbox{}\verb@ 'm4_ifelse(regexlibdir,`NOREGEXLIBDIR',`library_dirs=["../solib/","../lib/"],',`library_dirs=["../solib/","../lib/","'regexlibdir`"],')`@\\ +\mbox{}\verb@ 'm4_ifelse(regexlib,`',`libraries=["cbf"],', `m4_ifelse(regexlib2,`',`libraries=["cbf","'regexlib`"],',`libraries=["cbf","'regexlib`","'regexlib2`"],')' )`@\\ +\mbox{}\verb@ include_dirs = ["../include","'hdf5_prefix`/include"] )@\\ \mbox{}\verb@ @\\ \mbox{}\verb@# Build it@\\ -\mbox{}\verb@setup(name="_pycbf",ext_modules=[e],)@\\ +\mbox{}\verb@setup(name="_pycbf",ext_modules=[e],)'@\\ \mbox{}\verb@@{\NWsep} \end{list} -\vspace{-2ex} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} \end{flushleft} \section{Building and testing the resulting package} Aim to build and test in one go (so that the source and the binary match!!) \begin{flushleft} \small -\begin{minipage}{\linewidth} \label{scrap10} -\verb@"win32.bat"@\nobreak\ {\footnotesize \NWtarget{nuweb62b}{62b} }$\equiv$ +\begin{minipage}{\linewidth}\label{scrap10}\raggedright\small +\NWtarget{nuweb11b}{} \verb@"win32.bat"@\nobreak\ {\footnotesize {11b}}$\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@@\\ @@ -4221,12 +4432,17 @@ \section{Building and testing the resulting package} \mbox{}\verb@C:\python24\python makeflatascii.py pycbf_ascii_help.txt@\\ \mbox{}\verb@@{\NWsep} \end{list} -\vspace{-2ex} -\end{minipage}\\[4ex] +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} \end{flushleft} \begin{flushleft} \small -\begin{minipage}{\linewidth} \label{scrap11} -\verb@"linux.sh"@\nobreak\ {\footnotesize \NWtarget{nuweb63a}{63a} }$\equiv$ +\begin{minipage}{\linewidth}\label{scrap11}\raggedright\small +\NWtarget{nuweb12a}{} \verb@"linux.sh"@\nobreak\ {\footnotesize {12a}}$\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@@\\ @@ -4248,13 +4464,19 @@ \section{Building and testing the resulting package} \mbox{}\verb@python makeflatascii.py pycbf_ascii_help.txt@\\ \mbox{}\verb@@{\NWsep} \end{list} -\vspace{-2ex} -\end{minipage}\\[4ex] +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} \end{flushleft} This still gives bold in the ascii (=sucks) -\begin{flushleft} \small \label{scrap12} -\verb@"makeflatascii.py"@\nobreak\ {\footnotesize \NWtarget{nuweb63b}{63b} }$\equiv$ +\begin{flushleft} \small +\begin{minipage}{\linewidth}\label{scrap12}\raggedright\small +\NWtarget{nuweb12b}{} \verb@"makeflatascii.py"@\nobreak\ {\footnotesize {12b}}$\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@@\\ @@ -4265,7 +4487,13 @@ \section{Building and testing the resulting package} \mbox{}\verb@pydoc.help(pycbf)@\\ \mbox{}\verb@@{\NWsep} \end{list} -\vspace{-2ex} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} \end{flushleft} \section{Debugging compiled extensions} @@ -4346,34 +4574,35 @@ \subsection{Read a file based on cif2cbf.c} It appeared to work with the file img2cif\_packed.cif which is built when you build CBFlib, hence that file is hardwired in. -\begin{flushleft} \small \label{scrap13} -\verb@"pycbf_test1.py"@\nobreak\ {\footnotesize \NWtarget{nuweb64}{64} }$\equiv$ +\begin{flushleft} \small +\begin{minipage}{\linewidth}\label{scrap13}\raggedright\small +\NWtarget{nuweb14}{} \verb@"pycbf_test1.py"@\nobreak\ {\footnotesize {14}}$\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@@\\ \mbox{}\verb@import pycbf@\\ \mbox{}\verb@object = pycbf.cbf_handle_struct() # FIXME@\\ -\mbox{}\verb@object.read_file("../img2cif_packed.cif",pycbf.MSG_DIGEST)@\\ +\mbox{}\verb@object.read_file(b"../img2cif_packed.cif",pycbf.MSG_DIGEST)@\\ \mbox{}\verb@object.rewind_datablock()@\\ -\mbox{}\verb@print "Found",object.count_datablocks(),"blocks"@\\ +\mbox{}\verb@print("Found",object.count_datablocks(),"blocks")@\\ \mbox{}\verb@object.select_datablock(0)@\\ -\mbox{}\verb@print "Zeroth is named",object.datablock_name()@\\ +\mbox{}\verb@print("Zeroth is named",object.datablock_name())@\\ \mbox{}\verb@object.rewind_category()@\\ \mbox{}\verb@categories = object.count_categories()@\\ \mbox{}\verb@for i in range(categories):@\\ -\mbox{}\verb@ print "Category:",i,@\\ +\mbox{}\verb@ print("Category:",i, end=' ')@\\ \mbox{}\verb@ object.select_category(i)@\\ \mbox{}\verb@ category_name = object.category_name()@\\ -\mbox{}\verb@ print "Name:",category_name,@\\ +\mbox{}\verb@ print("Name:",category_name, end=' ')@\\ \mbox{}\verb@ rows=object.count_rows()@\\ -\mbox{}\verb@ print "Rows:",rows,@\\ +\mbox{}\verb@ print("Rows:",rows, end=' ')@\\ \mbox{}\verb@ cols = object.count_columns()@\\ -\mbox{}\verb@ print "Cols:",cols@\\ +\mbox{}\verb@ print("Cols:",cols)@\\ \mbox{}\verb@ loop=1@\\ \mbox{}\verb@ object.rewind_column()@\\ -\mbox{}\verb@ while loop is not 0:@\\ +\mbox{}\verb@ while loop==1:@\\ \mbox{}\verb@ column_name = object.column_name()@\\ -\mbox{}\verb@ print "column name \"",column_name,"\"",@\\ +\mbox{}\verb@ print("column name \"",column_name,"\"", end=' ')@\\ \mbox{}\verb@ try:@\\ \mbox{}\verb@ object.next_column()@\\ \mbox{}\verb@ except:@\\ @@ -4382,42 +4611,50 @@ \subsection{Read a file based on cif2cbf.c} \mbox{}\verb@ for j in range(rows):@\\ \mbox{}\verb@ object.select_row(j)@\\ \mbox{}\verb@ object.rewind_column()@\\ -\mbox{}\verb@ print "row:",j@\\ +\mbox{}\verb@ if j==0: print()@\\ +\mbox{}\verb@ print("row:",j)@\\ \mbox{}\verb@ for k in range(cols):@\\ \mbox{}\verb@ name=object.column_name()@\\ -\mbox{}\verb@ print "col:",name,@\\ +\mbox{}\verb@ print("col:",name, end=' ')@\\ \mbox{}\verb@ object.select_column(k)@\\ \mbox{}\verb@ typeofvalue=object.get_typeofvalue()@\\ -\mbox{}\verb@ print "type:",typeofvalue@\\ -\mbox{}\verb@ if typeofvalue.find("bnry") > -1:@\\ -\mbox{}\verb@ print "Found the binary!!",@\\ +\mbox{}\verb@ print("type:",typeofvalue)@\\ +\mbox{}\verb@ if typeofvalue.find(b"bnry") > -1:@\\ +\mbox{}\verb@ print("Found the binary!!", end=' ')@\\ \mbox{}\verb@ s=object.get_integerarray_as_string()@\\ -\mbox{}\verb@ print type(s)@\\ -\mbox{}\verb@ print dir(s)@\\ -\mbox{}\verb@ print len(s)@\\ +\mbox{}\verb@ print(type(str(s)))@\\ +\mbox{}\verb@ print(dir(str(s)))@\\ +\mbox{}\verb@ print(len(str(s)))@\\ \mbox{}\verb@ try:@\\ -\mbox{}\verb@ import Numeric@\\ -\mbox{}\verb@ d = Numeric.fromstring(s,Numeric.UInt32) @\\ +\mbox{}\verb@ import numpy @\\ +\mbox{}\verb@ d = numpy.frombuffer(bytes(s),numpy.uint32)@\\ \mbox{}\verb@ # Hard wired Unsigned Int32@\\ -\mbox{}\verb@ print d.shape@\\ -\mbox{}\verb@ print d[0:10],d[d.shape[0]/2],d[-1]@\\ -\mbox{}\verb@ d=Numeric.reshape(d,(2300,2300))@\\ +\mbox{}\verb@ print(d.shape)@\\ +\mbox{}\verb@ print(d[0:10],d[int(d.shape[0]/2)],d[len(d)-1])@\\ +\mbox{}\verb@ print(d[int(d.shape[0]/3):int(d.shape[0]/3+20)])@\\ +\mbox{}\verb@ d=numpy.reshape(d,(2300,2300))@\\ \mbox{}\verb@# from matplotlib import pylab@\\ \mbox{}\verb@# pylab.imshow(d,vmin=0,vmax=1000)@\\ \mbox{}\verb@# pylab.show()@\\ \mbox{}\verb@ except ImportError:@\\ -\mbox{}\verb@ print "You need to get Numeric and matplotlib to see the data"@\\ +\mbox{}\verb@ print("You need to get numpy and matplotlib to see the data")@\\ \mbox{}\verb@ else:@\\ \mbox{}\verb@ value=object.get_value()@\\ -\mbox{}\verb@ print "Val:",value,i@\\ -\mbox{}\verb@ print@\\ +\mbox{}\verb@ print("Val:",value,i)@\\ +\mbox{}\verb@ print()@\\ \mbox{}\verb@del(object)@\\ \mbox{}\verb@#@\\ -\mbox{}\verb@print dir()@\\ -\mbox{}\verb@#object.free_handle(handle) @\\ +\mbox{}\verb@print(dir())@\\ +\mbox{}\verb@#object.free_handle(handle)@\\ \mbox{}\verb@@{\NWsep} \end{list} -\vspace{-2ex} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} \end{flushleft} \subsection{Try to test the goniometer and detector} @@ -4429,29 +4666,40 @@ \subsection{Try to test the goniometer and detector} for apparent existence of a single member function. -\begin{flushleft} \small \label{scrap14} -\verb@"pycbf_test2.py"@\nobreak\ {\footnotesize \NWtarget{nuweb65}{65} }$\equiv$ +\begin{flushleft} \small +\begin{minipage}{\linewidth}\label{scrap14}\raggedright\small +\NWtarget{nuweb15a}{} \verb@"pycbf_test2.py"@\nobreak\ {\footnotesize {15a}}$\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@@\\ \mbox{}\verb@import pycbf@\\ \mbox{}\verb@obj = pycbf.cbf_handle_struct()@\\ -\mbox{}\verb@obj.read_file("../adscconverted.cbf",0)@\\ +\mbox{}\verb@obj.read_file(b"../adscconverted.cbf",0)@\\ \mbox{}\verb@obj.select_datablock(0)@\\ \mbox{}\verb@g = obj.construct_goniometer()@\\ -\mbox{}\verb@print "Rotation axis is",g.get_rotation_axis()@\\ +\mbox{}\verb@print("Rotation axis is",g.get_rotation_axis())@\\ \mbox{}\verb@d = obj.construct_detector(0)@\\ -\mbox{}\verb@print "Beam center is",d.get_beam_center()@\\ +\mbox{}\verb@print("Beam center is",d.get_beam_center())@\\ +\mbox{}\verb@print("Detector slow axis is", d.get_detector_axis_slow())@\\ +\mbox{}\verb@print("Detector fast axis is", d.get_detector_axis_fast())@\\ +\mbox{}\verb@print("Detector axes (fast, slow) are", d.get_detector_axes_fs())@\\ \mbox{}\verb@@{\NWsep} \end{list} -\vspace{-2ex} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} \end{flushleft} It appears to work - eventually. Surprising \subsection{Test cases for the generics} -\begin{flushleft} \small \label{scrap15} -\verb@"pycbf_test3.py"@\nobreak\ {\footnotesize \NWtarget{nuweb66a}{66a} }$\equiv$ +\begin{flushleft} \small +\begin{minipage}{\linewidth}\label{scrap15}\raggedright\small +\NWtarget{nuweb15b}{} \verb@"pycbf_test3.py"@\nobreak\ {\footnotesize {15b}}$\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@@\\ @@ -4459,18 +4707,22 @@ \subsection{Test cases for the generics} \mbox{}\verb@class GenericTests(unittest.TestCase):@\\ \mbox{}\verb@@\\ \mbox{}\verb@ def test_get_local_integer_byte_order(self):@\\ -\mbox{}\verb@ self.assertEqual( pycbf.get_local_integer_byte_order(),@\\ -\mbox{}\verb@ 'little_endian')@\\ +\mbox{}\verb@ #print(bytes(pycbf.get_local_integer_byte_order()))@\\ +\mbox{}\verb@ self.assertEqual( bytes(pycbf.get_local_integer_byte_order()),@\\ +\mbox{}\verb@ bytes(b'little_endian'))@\\ \mbox{}\verb@@\\ \mbox{}\verb@ def test_get_local_real_byte_order(self):@\\ -\mbox{}\verb@ self.assertEqual( pycbf.get_local_real_byte_order() ,@\\ -\mbox{}\verb@ 'little_endian')@\\ +\mbox{}\verb@ #print(bytes(pycbf.get_local_real_byte_order()))@\\ +\mbox{}\verb@ self.assertEqual( bytes(pycbf.get_local_real_byte_order()),@\\ +\mbox{}\verb@ bytes(b'little_endian'))@\\ \mbox{}\verb@@\\ \mbox{}\verb@ def test_get_local_real_format(self):@\\ -\mbox{}\verb@ self.assertEqual( pycbf.get_local_real_format(), @\\ -\mbox{}\verb@ 'ieee 754-1985')@\\ +\mbox{}\verb@ #print(bytes(pycbf.get_local_real_format()))@\\ +\mbox{}\verb@ self.assertEqual( bytes(pycbf.get_local_real_format()), @\\ +\mbox{}\verb@ bytes(b'ieee 754-1985'))@\\ \mbox{}\verb@@\\ \mbox{}\verb@ def test_compute_cell_volume(self):@\\ +\mbox{}\verb@ #print(pycbf.compute_cell_volume((2.,3.,4.,90.,90.,90.)))@\\ \mbox{}\verb@ self.assertEqual( pycbf.compute_cell_volume((2.,3.,4.,90.,90.,90.)),@\\ \mbox{}\verb@ 24.0)@\\ \mbox{}\verb@if __name__=="__main__":@\\ @@ -4478,7 +4730,193 @@ \subsection{Test cases for the generics} \mbox{}\verb@@\\ \mbox{}\verb@@{\NWsep} \end{list} -\vspace{-2ex} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} +\end{flushleft} +\subsection{Version of pycbf_test1 with write logic added} + +\begin{flushleft} \small +\begin{minipage}{\linewidth}\label{scrap16}\raggedright\small +\NWtarget{nuweb17}{} \verb@"pycbf_test4.py"@\nobreak\ {\footnotesize {17}}$\equiv$ +\vspace{-1ex} +\begin{list}{}{} \item +\mbox{}\verb@@\\ +\mbox{}\verb@# version of pycbf_test1 with write logic added@\\ +\mbox{}\verb@import pycbf@\\ +\mbox{}\verb@object = pycbf.cbf_handle_struct()@\\ +\mbox{}\verb@newobject = pycbf.cbf_handle_struct()@\\ +\mbox{}\verb@object.read_file(b"../img2cif_packed.cif",pycbf.MSG_DIGEST)@\\ +\mbox{}\verb@object.rewind_datablock()@\\ +\mbox{}\verb@print("Found",object.count_datablocks(),"blocks")@\\ +\mbox{}\verb@object.select_datablock(0)@\\ +\mbox{}\verb@print("Zeroth is named",object.datablock_name())@\\ +\mbox{}\verb@newobject.force_new_datablock(object.datablock_name());@\\ +\mbox{}\verb@object.rewind_category()@\\ +\mbox{}\verb@categories = object.count_categories()@\\ +\mbox{}\verb@for i in range(categories):@\\ +\mbox{}\verb@ print("Category:",i, end= ' ')@\\ +\mbox{}\verb@ object.select_category(i)@\\ +\mbox{}\verb@ category_name = object.category_name()@\\ +\mbox{}\verb@ print("Name:",category_name, end=' ')@\\ +\mbox{}\verb@ newobject.new_category(category_name)@\\ +\mbox{}\verb@ rows=object.count_rows()@\\ +\mbox{}\verb@ print("Rows:",rows, end=' ')@\\ +\mbox{}\verb@ cols = object.count_columns()@\\ +\mbox{}\verb@ print("Cols:",cols)@\\ +\mbox{}\verb@ loop=1@\\ +\mbox{}\verb@ object.rewind_column()@\\ +\mbox{}\verb@ while loop==1:@\\ +\mbox{}\verb@ column_name = object.column_name()@\\ +\mbox{}\verb@ print("column name \"",column_name,"\"", end=' ')@\\ +\mbox{}\verb@ newobject.new_column(column_name)@\\ +\mbox{}\verb@ try:@\\ +\mbox{}\verb@ object.next_column()@\\ +\mbox{}\verb@ except:@\\ +\mbox{}\verb@ break@\\ +\mbox{}\verb@ print()@\\ +\mbox{}\verb@ for j in range(rows):@\\ +\mbox{}\verb@ object.select_row(j)@\\ +\mbox{}\verb@ newobject.new_row()@\\ +\mbox{}\verb@ object.rewind_column()@\\ +\mbox{}\verb@ print("row:",j)@\\ +\mbox{}\verb@ for k in range(cols):@\\ +\mbox{}\verb@ name=object.column_name()@\\ +\mbox{}\verb@ print("col:",name, end=' ')@\\ +\mbox{}\verb@ object.select_column(k)@\\ +\mbox{}\verb@ newobject.select_column(k)@\\ +\mbox{}\verb@ typeofvalue=object.get_typeofvalue()@\\ +\mbox{}\verb@ print("type:",typeofvalue)@\\ +\mbox{}\verb@ if typeofvalue.find(b"bnry") > -1:@\\ +\mbox{}\verb@ print("Found the binary!!",end=' ')@\\ +\mbox{}\verb@ s=object.get_integerarray_as_string()@\\ +\mbox{}\verb@ print(type(s))@\\ +\mbox{}\verb@ print(dir(s))@\\ +\mbox{}\verb@ print(len(s))@\\ +\mbox{}\verb@ (compression, binaryid, elsize, elsigned, \@\\ +\mbox{}\verb@ elunsigned, elements, minelement, maxelement, \@\\ +\mbox{}\verb@ byteorder,dimfast,dimmid,dimslow,padding) = \@\\ +\mbox{}\verb@ object.get_integerarrayparameters_wdims_fs()@\\ +\mbox{}\verb@ if dimfast==0:@\\ +\mbox{}\verb@ dimfast = 1@\\ +\mbox{}\verb@ if dimmid==0:@\\ +\mbox{}\verb@ dimmid = 1@\\ +\mbox{}\verb@ if dimslow == 0:@\\ +\mbox{}\verb@ dimslow = 1@\\ +\mbox{}\verb@ print("compression: ",compression)@\\ +\mbox{}\verb@ print("binaryid", binaryid)@\\ +\mbox{}\verb@ print("elsize", elsize)@\\ +\mbox{}\verb@ print("elsigned", elsigned)@\\ +\mbox{}\verb@ print("elunsigned",elunsigned)@\\ +\mbox{}\verb@ print("elements", elements)@\\ +\mbox{}\verb@ print("minelement", minelement)@\\ +\mbox{}\verb@ print("maxelement", maxelement)@\\ +\mbox{}\verb@ print("byteorder", byteorder)@\\ +\mbox{}\verb@ print("dimfast", dimfast)@\\ +\mbox{}\verb@ print("dimmid", dimmid)@\\ +\mbox{}\verb@ print("dimslow",dimslow)@\\ +\mbox{}\verb@ print("padding", padding)@\\ +\mbox{}\verb@ newobject.set_integerarray_wdims_fs(\@\\ +\mbox{}\verb@ pycbf.CBF_BYTE_OFFSET,binaryid,s,elsize,elsigned,\@\\ +\mbox{}\verb@ elements,byteorder,dimfast,dimmid,dimslow,padding)@\\ +\mbox{}\verb@ try:@\\ +\mbox{}\verb@ import numpy@\\ +\mbox{}\verb@ d = numpy.frombuffer(s,numpy.uint32)@\\ +\mbox{}\verb@ # Hard wired Unsigned Int32@\\ +\mbox{}\verb@ print(d.shape)@\\ +\mbox{}\verb@ print(d[0:10],d[int(d.shape[0]/2)],d[len(d)-1])@\\ +\mbox{}\verb@ print(d[int(d.shape[0]/3):int(d.shape[0]/3+20)])@\\ +\mbox{}\verb@ d=numpy.reshape(d,(2300,2300))@\\ +\mbox{}\verb@# from matplotlib import pylab@\\ +\mbox{}\verb@# pylab.imshow(d,vmin=0,vmax=1000)@\\ +\mbox{}\verb@# pylab.show()@\\ +\mbox{}\verb@ except ImportError:@\\ +\mbox{}\verb@ print("You need to get numpy and matplotlib to see the data")@\\ +\mbox{}\verb@ else:@\\ +\mbox{}\verb@ value=object.get_value()@\\ +\mbox{}\verb@ newobject.set_value(value)@\\ +\mbox{}\verb@ print("Val:",value,i)@\\ +\mbox{}\verb@ print()@\\ +\mbox{}\verb@del(object)@\\ +\mbox{}\verb@newobject.write_widefile(b"newtest1.cbf",pycbf.CBF,\@\\ +\mbox{}\verb@ pycbf.MIME_HEADERS|pycbf.MSG_DIGEST|pycbf.PAD_4K,0)@\\ +\mbox{}\verb@#@\\ +\mbox{}\verb@print(dir())@\\ +\mbox{}\verb@#object.free_handle(handle)@\\ +\mbox{}\verb@@{\NWsep} +\end{list} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} +\end{flushleft} +\subsection{Processing of XFEL axes} + +\begin{flushleft} \small +\begin{minipage}{\linewidth}\label{scrap17}\raggedright\small +\NWtarget{nuweb18}{} \verb@"pycbf_testfelaxes.py"@\nobreak\ {\footnotesize {18}}$\equiv$ +\vspace{-1ex} +\begin{list}{}{} \item +\mbox{}\verb@@\\ +\mbox{}\verb@import pycbf, sys@\\ +\mbox{}\verb@from decimal import Decimal, ROUND_HALF_UP@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@image_file = bytes(sys.argv[1],'utf-8')@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@cbf = pycbf.cbf_handle_struct()@\\ +\mbox{}\verb@cbf.read_widefile(image_file, pycbf.MSG_DIGEST)@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@for element in range(64):@\\ +\mbox{}\verb@ d = cbf.construct_detector(element)@\\ +\mbox{}\verb@ print("element:", element)@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ v00 = d.get_pixel_coordinates(0, 0)@\\ +\mbox{}\verb@ v01 = d.get_pixel_coordinates(0, 1)@\\ +\mbox{}\verb@ v10 = d.get_pixel_coordinates(1, 0)@\\ +\mbox{}\verb@ v11 = d.get_pixel_coordinates(1, 1)@\\ +\mbox{}\verb@ prec = Decimal('1.000000000')@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ print('(0, 0) v00 [ %.9f %.9f %.9f ]' %(round(v00[0],9), round(v00[1],9), round(v00[2],9)))@\\ +\mbox{}\verb@ print('(0, 1) v01 [ %.9g %.9g %.9g ]' %(round(v01[0],9), round(v01[1],9), round(v01[2],9)))@\\ +\mbox{}\verb@ print('(1, 0) v10 [ %.9g %.9g %.9g ]' %(round(v10[0],9), round(v10[1],9), round(v10[2],9)))@\\ +\mbox{}\verb@ print('(1, 1) v11 [ %.9g %.9g %.9g ]' %(round(v11[0],9), round(v11[1],9), round(v11[2],9)))@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ print("surface axes:", d.get_detector_surface_axes(0), d.get_detector_surface_axes(1))@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ print(d.get_detector_surface_axes(0), "has", cbf.count_axis_ancestors(d.get_detector_surface_axes(0)), "ancestors")@\\ +\mbox{}\verb@ print(d.get_detector_surface_axes(1), "has", cbf.count_axis_ancestors(d.get_detector_surface_axes(1)), "ancestors")@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ cur_axis = d.get_detector_surface_axes(0)@\\ +\mbox{}\verb@ count = cbf.count_axis_ancestors(cur_axis)@\\ +\mbox{}\verb@@\\ +\mbox{}\verb@ for index in range(count):@\\ +\mbox{}\verb@ print("axis", cur_axis, "index: ", index)@\\ +\mbox{}\verb@ print(" equipment", cbf.get_axis_equipment(cur_axis))@\\ +\mbox{}\verb@ print(" depends_on", cbf.get_axis_depends_on(cur_axis))@\\ +\mbox{}\verb@ print(" equipment_component", cbf.get_axis_equipment_component(cur_axis))@\\ +\mbox{}\verb@ vector = cbf.get_axis_vector(cur_axis)@\\ +\mbox{}\verb@ print(" vector [ %.8g %.8g %.8g ]" % (round(vector[0],7), round(vector[1],7), round(vector[2],7)))@\\ +\mbox{}\verb@ offset = cbf.get_axis_offset(cur_axis)@\\ +\mbox{}\verb@ print(" offset [ %.8g %.8g %.8g ]" % (round(offset[0],7), round(offset[1],7), round(offset[2],7)))@\\ +\mbox{}\verb@ print(" rotation", cbf.get_axis_rotation(cur_axis))@\\ +\mbox{}\verb@ print(" rotation_axis", cbf.get_axis_rotation_axis(cur_axis))@\\ +\mbox{}\verb@ cur_axis = cbf.get_axis_depends_on(cur_axis)@\\ +\mbox{}\verb@@{\NWsep} +\end{list} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} \end{flushleft} \section{Worked example 1 : xmas beamline + mar ccd detector at the ESRF} @@ -4496,8 +4934,9 @@ \subsection{Reading marccd headers} FIXME : byteswapping and ends??? -\begin{flushleft} \small \label{scrap16} -\verb@"xmas/readmarheader.py"@\nobreak\ {\footnotesize \NWtarget{nuweb66b}{66b} }$\equiv$ +\begin{flushleft} \small +\begin{minipage}{\linewidth}\label{scrap18}\raggedright\small +\NWtarget{nuweb20}{} \verb@"xmas/readmarheader.py"@\nobreak\ {\footnotesize {20}}$\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@#!/usr/bin/env python@\\ @@ -4540,9 +4979,9 @@ \subsection{Reading marccd headers} \mbox{}\verb@ try:@\\ \mbox{}\verb@ [type, name] = decl.split()@\\ \mbox{}\verb@ except:@\\ -\mbox{}\verb@ #print "skipping:",line@\\ +\mbox{}\verb@ #print("skipping:",line)@\\ \mbox{}\verb@ continue@\\ -\mbox{}\verb@ # print "type:",type," name:",name@\\ +\mbox{}\verb@ # print("type:",type," name:",name)@\\ \mbox{}\verb@@\\ \mbox{}\verb@ if name.find("[")>-1:@\\ \mbox{}\verb@ # repeated ... times@\\ @@ -4552,7 +4991,7 @@ \subsection{Reading marccd headers} \mbox{}\verb@ num = num.replace("sizeof(INT32)","4")@\\ \mbox{}\verb@ times = eval(num)@\\ \mbox{}\verb@ except:@\\ -\mbox{}\verb@ print "Please decode",decl@\\ +\mbox{}\verb@ print("Please decode",decl)@\\ \mbox{}\verb@ raise@\\ \mbox{}\verb@ else:@\\ \mbox{}\verb@ times=1@\\ @@ -4561,10 +5000,10 @@ \subsection{Reading marccd headers} \mbox{}\verb@ names += [name]*times@\\ \mbox{}\verb@ expected += mar_c_sizes[type]*times@\\ \mbox{}\verb@ except:@\\ -\mbox{}\verb@ #print "skipping",line@\\ +\mbox{}\verb@ #print("skipping",line)@\\ \mbox{}\verb@ continue@\\ -\mbox{}\verb@ #print "%4d %4d"%(mar_c_sizes[type]*times,expected),name,":",times,line@\\ -\mbox{}\verb@ #print struct.calcsize(fmt),expected@\\ +\mbox{}\verb@ #print("%4d %4d"%(mar_c_sizes[type]*times,expected),name,":",times,line)@\\ +\mbox{}\verb@ #print(struct.calcsize(fmt),expected)@\\ \mbox{}\verb@ return names, fmt@\\ \mbox{}\verb@@\\ \mbox{}\verb@def read_mar_header(filename):@\\ @@ -4586,7 +5025,7 @@ \subsection{Reading marccd headers} \mbox{}\verb@ dict = {}@\\ \mbox{}\verb@ i=0@\\ \mbox{}\verb@ for name in names:@\\ -\mbox{}\verb@ if dict.has_key(name):@\\ +\mbox{}\verb@ if name in dict:@\\ \mbox{}\verb@ if type(values[i]) == type("string"): @\\ \mbox{}\verb@ dict[name] = dict[name]+values[i]@\\ \mbox{}\verb@ else:@\\ @@ -4815,8 +5254,8 @@ \subsection{Reading marccd headers} \mbox{}\verb@ which are in comment sections@\\ \mbox{}\verb@ """@\\ \mbox{}\verb@ s=s.replace("\000","")@\\ -\mbox{}\verb@ items = filter(None, [len(x)>1 and x or None for x in [@\\ -\mbox{}\verb@ item.split("=") for item in s.split(";")]])@\\ +\mbox{}\verb@ items = [_f for _f in [len(x)>1 and x or None for x in [@\\ +\mbox{}\verb@ item.split("=") for item in s.split(";")]] if _f]@\\ \mbox{}\verb@ return items@\\ \mbox{}\verb@@\\ \mbox{}\verb@@\\ @@ -4825,22 +5264,28 @@ \subsection{Reading marccd headers} \mbox{}\verb@ Make a little program to process files@\\ \mbox{}\verb@ """@\\ \mbox{}\verb@ import sys@\\ -\mbox{}\verb@ print "Starting"@\\ +\mbox{}\verb@ print("Starting")@\\ \mbox{}\verb@ names,fmt = make_format(cdefinition)@\\ -\mbox{}\verb@ print "Names and format made"@\\ +\mbox{}\verb@ print("Names and format made")@\\ \mbox{}\verb@ h = read_mar_header(sys.argv[1])@\\ -\mbox{}\verb@ print "Read header, interpreting"@\\ +\mbox{}\verb@ print("Read header, interpreting")@\\ \mbox{}\verb@ d = interpret_header(h,fmt,names)@\\ \mbox{}\verb@ printed = {}@\\ \mbox{}\verb@ for name in names:@\\ -\mbox{}\verb@ if printed.has_key(name):@\\ +\mbox{}\verb@ if name in printed:@\\ \mbox{}\verb@ continue@\\ -\mbox{}\verb@ print name,":",d[name]@\\ +\mbox{}\verb@ print(name,":",d[name])@\\ \mbox{}\verb@ printed[name]=1@\\ \mbox{}\verb@@\\ \mbox{}\verb@@{\NWsep} \end{list} -\vspace{-2ex} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} \end{flushleft} \subsection{Writing out cif files for fit2d/xmas} @@ -4849,8 +5294,9 @@ \subsection{Writing out cif files for fit2d/xmas} This relies on a "template" cif file to get it started (avoids me programming everything). -\begin{flushleft} \small \label{scrap17} -\verb@"xmas/xmasheaders.py"@\nobreak\ {\footnotesize \NWtarget{nuweb72}{72} }$\equiv$ +\begin{flushleft} \small +\begin{minipage}{\linewidth}\label{scrap19}\raggedright\small +\NWtarget{nuweb22}{} \verb@"xmas/xmasheaders.py"@\nobreak\ {\footnotesize {22}}$\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@#!/usr/bin/env python@\\ @@ -5088,15 +5534,15 @@ \subsection{Writing out cif files for fit2d/xmas} \mbox{}\verb@ @\\ \mbox{}\verb@@\\ \mbox{}\verb@ def updateitems(self,dict):@\\ -\mbox{}\verb@ names = dict.keys()@\\ +\mbox{}\verb@ names = list(dict.keys())@\\ \mbox{}\verb@ for name in names:@\\ \mbox{}\verb@ value = dict[name]@\\ \mbox{}\verb@ # use a dictionary of functions@\\ -\mbox{}\verb@ if functiondict.has_key(name):@\\ -\mbox{}\verb@ # print "calling",functiondict[name],value@\\ -\mbox{}\verb@ apply(functiondict[name],(self.cbf,value))@\\ +\mbox{}\verb@ if name in functiondict:@\\ +\mbox{}\verb@ # print("calling",functiondict[name],value)@\\ +\mbox{}\verb@ functiondict[name](*(self.cbf,value))@\\ \mbox{}\verb@ else:@\\ -\mbox{}\verb@ #print "ignoring",name,value@\\ +\mbox{}\verb@ #print("ignoring",name,value)@\\ \mbox{}\verb@ pass@\\ \mbox{}\verb@@\\ \mbox{}\verb@ @\\ @@ -5112,15 +5558,22 @@ \subsection{Writing out cif files for fit2d/xmas} \mbox{}\verb@ obj.processfile(filename, outfile=fileout, UB=ub, distance=123.456)@\\ \mbox{}\verb@@{\NWsep} \end{list} -\vspace{-2ex} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} \end{flushleft} \subsection{A template cif file for the xmas beamline} This was sort of copied and modified from an example file. It has NOT been checked. Hopefully the four circle geometry at least vaguely matches what is at the beamline. -\begin{flushleft} \small \label{scrap18} -\verb@"xmas/xmas_cif_template.cif"@\nobreak\ {\footnotesize \NWtarget{nuweb76}{76} }$\equiv$ +\begin{flushleft} \small +\begin{minipage}{\linewidth}\label{scrap20}\raggedright\small +\NWtarget{nuweb24}{} \verb@"xmas/xmas_cif_template.cif"@\nobreak\ {\footnotesize {24}}$\equiv$ \vspace{-1ex} \begin{list}{}{} \item \mbox{}\verb@@\\ @@ -5345,6 +5798,12 @@ \subsection{A template cif file for the xmas beamline} \mbox{}\verb@ ARRAY1 "signed 32-bit integer" packed little_endian@\\ \mbox{}\verb@@{\NWsep} \end{list} -\vspace{-2ex} +\vspace{-1.5ex} +\footnotesize +\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}} + +\item{} +\end{list} +\end{minipage}\vspace{4ex} \end{flushleft} \end{document} diff --git a/pycbf/pycbf.toc b/pycbf/pycbf.toc index 1d4a31e7..8e06acbc 100644 --- a/pycbf/pycbf.toc +++ b/pycbf/pycbf.toc @@ -1,19 +1,21 @@ \contentsline {section}{\numberline {1}Introduction}{2}{section.1} -\contentsline {section}{\numberline {2}Installation prerequisites}{2}{section.2} +\contentsline {section}{\numberline {2}Installation prerequisites}{3}{section.2} \contentsline {section}{\numberline {3}Generating the c interface - the SWIG file}{3}{section.3} \contentsline {subsection}{\numberline {3.1}Exceptions}{5}{subsection.3.1} -\contentsline {subsection}{\numberline {3.2}Exceptions}{9}{subsection.3.2} +\contentsline {subsection}{\numberline {3.2}Exceptions}{10}{subsection.3.2} \contentsline {section}{\numberline {4}Docstrings}{10}{section.4} \contentsline {section}{\numberline {5}Wrappers}{10}{section.5} -\contentsline {section}{\numberline {6}Building python extensions - the setup file}{62}{section.6} -\contentsline {section}{\numberline {7}Building and testing the resulting package}{62}{section.7} -\contentsline {section}{\numberline {8}Debugging compiled extensions}{63}{section.8} -\contentsline {section}{\numberline {9}Things which are currently missing}{64}{section.9} -\contentsline {section}{\numberline {10}Testing}{64}{section.10} -\contentsline {subsection}{\numberline {10.1}Read a file based on cif2cbf.c}{64}{subsection.10.1} -\contentsline {subsection}{\numberline {10.2}Try to test the goniometer and detector}{65}{subsection.10.2} -\contentsline {subsection}{\numberline {10.3}Test cases for the generics}{66}{subsection.10.3} -\contentsline {section}{\numberline {11}Worked example 1 : xmas beamline + mar ccd detector at the ESRF}{66}{section.11} -\contentsline {subsection}{\numberline {11.1}Reading marccd headers}{66}{subsection.11.1} -\contentsline {subsection}{\numberline {11.2}Writing out cif files for fit2d/xmas}{72}{subsection.11.2} -\contentsline {subsection}{\numberline {11.3}A template cif file for the xmas beamline}{76}{subsection.11.3} +\contentsline {section}{\numberline {6}Building python extensions - the setup file}{10}{section.6} +\contentsline {section}{\numberline {7}Building and testing the resulting package}{11}{section.7} +\contentsline {section}{\numberline {8}Debugging compiled extensions}{12}{section.8} +\contentsline {section}{\numberline {9}Things which are currently missing}{13}{section.9} +\contentsline {section}{\numberline {10}Testing}{13}{section.10} +\contentsline {subsection}{\numberline {10.1}Read a file based on cif2cbf.c}{13}{subsection.10.1} +\contentsline {subsection}{\numberline {10.2}Try to test the goniometer and detector}{15}{subsection.10.2} +\contentsline {subsection}{\numberline {10.3}Test cases for the generics}{15}{subsection.10.3} +\contentsline {subsection}{\numberline {10.4}Version of pycbf_test1 with write logic added}{17}{subsection.10.4} +\contentsline {subsection}{\numberline {10.5}Processing of XFEL axes}{18}{subsection.10.5} +\contentsline {section}{\numberline {11}Worked example 1 : xmas beamline + mar ccd detector at the ESRF}{18}{section.11} +\contentsline {subsection}{\numberline {11.1}Reading marccd headers}{19}{subsection.11.1} +\contentsline {subsection}{\numberline {11.2}Writing out cif files for fit2d/xmas}{21}{subsection.11.2} +\contentsline {subsection}{\numberline {11.3}A template cif file for the xmas beamline}{23}{subsection.11.3} diff --git a/pycbf/pycbf.w b/pycbf/pycbf.w index b65897ec..fead0ac7 100644 --- a/pycbf/pycbf.w +++ b/pycbf/pycbf.w @@ -271,24 +271,27 @@ pull in all of the library for now. We use the distutils approach. -@O setup.py +@o py3setup_py.m4 -i -t @{ +# +# py3setup_py.m4 +# -# Import the things to build python binary extensions +`# Import the things to build python binary extensions from distutils.core import setup, Extension # Make our extension module -e = Extension('_pycbf', +e = Extension(''`_pycbf''`, sources = ["pycbf_wrap.c","../src/cbf_simple.c"], - extra_compile_args=["-g"], - library_dirs=["../lib/"], - libraries=["cbf"], - include_dirs = ["../include"] ) + extra_compile_args=["-g", "-DSWIG_PYTHON_STRICT_BYTE_CHAR"], + 'm4_ifelse(regexlibdir,`NOREGEXLIBDIR',`library_dirs=["../solib/","../lib/"],',`library_dirs=["../solib/","../lib/","'regexlibdir`"],')` + 'm4_ifelse(regexlib,`',`libraries=["cbf"],', `m4_ifelse(regexlib2,`',`libraries=["cbf","'regexlib`"],',`libraries=["cbf","'regexlib`","'regexlib2`"],')' )` + include_dirs = ["../include","'hdf5_prefix`/include"] ) # Build it -setup(name="_pycbf",ext_modules=[e],) +setup(name="_pycbf",ext_modules=[e],)' @} @@ -296,7 +299,7 @@ setup(name="_pycbf",ext_modules=[e],) Aim to build and test in one go (so that the source and the binary match!!) -@o win32.bat +@o win32.bat -i -t @{ nuweb pycbf latex pycbf @@ -340,7 +343,7 @@ python makeflatascii.py pycbf_ascii_help.txt This still gives bold in the ascii (=sucks) -@O makeflatascii.py +@o makeflatascii.py -i -t @{ import pydoc, pycbf, sys f = open(sys.argv[1],"w") @@ -428,31 +431,31 @@ all of the writing parts. It appeared to work with the file img2cif\_packed.cif which is built when you build CBFlib, hence that file is hardwired in. -@O pycbf_test1.py +@o pycbf_test1.py -i -t @{ import pycbf object = pycbf.cbf_handle_struct() # FIXME -object.read_file("../img2cif_packed.cif",pycbf.MSG_DIGEST) +object.read_file(b"../img2cif_packed.cif",pycbf.MSG_DIGEST) object.rewind_datablock() -print "Found",object.count_datablocks(),"blocks" +print("Found",object.count_datablocks(),"blocks") object.select_datablock(0) -print "Zeroth is named",object.datablock_name() +print("Zeroth is named",object.datablock_name()) object.rewind_category() categories = object.count_categories() for i in range(categories): - print "Category:",i, + print("Category:",i, end=' ') object.select_category(i) category_name = object.category_name() - print "Name:",category_name, + print("Name:",category_name, end=' ') rows=object.count_rows() - print "Rows:",rows, + print("Rows:",rows, end=' ') cols = object.count_columns() - print "Cols:",cols + print("Cols:",cols) loop=1 object.rewind_column() - while loop is not 0: + while loop==1: column_name = object.column_name() - print "column name \"",column_name,"\"", + print("column name \"",column_name,"\"", end=' ') try: object.next_column() except: @@ -461,39 +464,41 @@ for i in range(categories): for j in range(rows): object.select_row(j) object.rewind_column() - print "row:",j + if j==0: print() + print("row:",j) for k in range(cols): name=object.column_name() - print "col:",name, + print("col:",name, end=' ') object.select_column(k) typeofvalue=object.get_typeofvalue() - print "type:",typeofvalue - if typeofvalue.find("bnry") > -1: - print "Found the binary!!", + print("type:",typeofvalue) + if typeofvalue.find(b"bnry") > -1: + print("Found the binary!!", end=' ') s=object.get_integerarray_as_string() - print type(s) - print dir(s) - print len(s) + print(type(str(s))) + print(dir(str(s))) + print(len(str(s))) try: - import Numeric - d = Numeric.fromstring(s,Numeric.UInt32) + import numpy + d = numpy.frombuffer(bytes(s),numpy.uint32) # Hard wired Unsigned Int32 - print d.shape - print d[0:10],d[d.shape[0]/2],d[-1] - d=Numeric.reshape(d,(2300,2300)) + print(d.shape) + print(d[0:10],d[int(d.shape[0]/2)],d[len(d)-1]) + print(d[int(d.shape[0]/3):int(d.shape[0]/3+20)]) + d=numpy.reshape(d,(2300,2300)) # from matplotlib import pylab # pylab.imshow(d,vmin=0,vmax=1000) # pylab.show() except ImportError: - print "You need to get Numeric and matplotlib to see the data" + print("You need to get numpy and matplotlib to see the data") else: value=object.get_value() - print "Val:",value,i - print + print("Val:",value,i) + print() del(object) # -print dir() -#object.free_handle(handle) +print(dir()) +#object.free_handle(handle) @} @@ -507,16 +512,19 @@ This test is clearly minimalistic for now - it only checks the objects for apparent existence of a single member function. -@O pycbf_test2.py +@o pycbf_test2.py -i -t @{ import pycbf obj = pycbf.cbf_handle_struct() -obj.read_file("../adscconverted.cbf",0) +obj.read_file(b"../adscconverted.cbf",0) obj.select_datablock(0) g = obj.construct_goniometer() -print "Rotation axis is",g.get_rotation_axis() +print("Rotation axis is",g.get_rotation_axis()) d = obj.construct_detector(0) -print "Beam center is",d.get_beam_center() +print("Beam center is",d.get_beam_center()) +print("Detector slow axis is", d.get_detector_axis_slow()) +print("Detector fast axis is", d.get_detector_axis_fast()) +print("Detector axes (fast, slow) are", d.get_detector_axes_fs()) @} @@ -524,24 +532,28 @@ It appears to work - eventually. Surprising \subsection{Test cases for the generics} -@O pycbf_test3.py +@o pycbf_test3.py -i -t @{ import pycbf, unittest class GenericTests(unittest.TestCase): def test_get_local_integer_byte_order(self): - self.assertEqual( pycbf.get_local_integer_byte_order(), - 'little_endian') + #print(bytes(pycbf.get_local_integer_byte_order())) + self.assertEqual( bytes(pycbf.get_local_integer_byte_order()), + bytes(b'little_endian')) def test_get_local_real_byte_order(self): - self.assertEqual( pycbf.get_local_real_byte_order() , - 'little_endian') + #print(bytes(pycbf.get_local_real_byte_order())) + self.assertEqual( bytes(pycbf.get_local_real_byte_order()), + bytes(b'little_endian')) def test_get_local_real_format(self): - self.assertEqual( pycbf.get_local_real_format(), - 'ieee 754-1985') + #print(bytes(pycbf.get_local_real_format())) + self.assertEqual( bytes(pycbf.get_local_real_format()), + bytes(b'ieee 754-1985')) def test_compute_cell_volume(self): + #print(pycbf.compute_cell_volume((2.,3.,4.,90.,90.,90.))) self.assertEqual( pycbf.compute_cell_volume((2.,3.,4.,90.,90.,90.)), 24.0) if __name__=="__main__": @@ -549,6 +561,164 @@ if __name__=="__main__": @} + +\subsection{Version of pycbf_test1 with write logic added} + +@o pycbf_test4.py -i -t +@{ +# version of pycbf_test1 with write logic added +import pycbf +object = pycbf.cbf_handle_struct() +newobject = pycbf.cbf_handle_struct() +object.read_file(b"../img2cif_packed.cif",pycbf.MSG_DIGEST) +object.rewind_datablock() +print("Found",object.count_datablocks(),"blocks") +object.select_datablock(0) +print("Zeroth is named",object.datablock_name()) +newobject.force_new_datablock(object.datablock_name()); +object.rewind_category() +categories = object.count_categories() +for i in range(categories): + print("Category:",i, end= ' ') + object.select_category(i) + category_name = object.category_name() + print("Name:",category_name, end=' ') + newobject.new_category(category_name) + rows=object.count_rows() + print("Rows:",rows, end=' ') + cols = object.count_columns() + print("Cols:",cols) + loop=1 + object.rewind_column() + while loop==1: + column_name = object.column_name() + print("column name \"",column_name,"\"", end=' ') + newobject.new_column(column_name) + try: + object.next_column() + except: + break + print() + for j in range(rows): + object.select_row(j) + newobject.new_row() + object.rewind_column() + print("row:",j) + for k in range(cols): + name=object.column_name() + print("col:",name, end=' ') + object.select_column(k) + newobject.select_column(k) + typeofvalue=object.get_typeofvalue() + print("type:",typeofvalue) + if typeofvalue.find(b"bnry") > -1: + print("Found the binary!!",end=' ') + s=object.get_integerarray_as_string() + print(type(s)) + print(dir(s)) + print(len(s)) + (compression, binaryid, elsize, elsigned, \ + elunsigned, elements, minelement, maxelement, \ + byteorder,dimfast,dimmid,dimslow,padding) = \ + object.get_integerarrayparameters_wdims_fs() + if dimfast==0: + dimfast = 1 + if dimmid==0: + dimmid = 1 + if dimslow == 0: + dimslow = 1 + print("compression: ",compression) + print("binaryid", binaryid) + print("elsize", elsize) + print("elsigned", elsigned) + print("elunsigned",elunsigned) + print("elements", elements) + print("minelement", minelement) + print("maxelement", maxelement) + print("byteorder", byteorder) + print("dimfast", dimfast) + print("dimmid", dimmid) + print("dimslow",dimslow) + print("padding", padding) + newobject.set_integerarray_wdims_fs(\ + pycbf.CBF_BYTE_OFFSET,binaryid,s,elsize,elsigned,\ + elements,byteorder,dimfast,dimmid,dimslow,padding) + try: + import numpy + d = numpy.frombuffer(s,numpy.uint32) + # Hard wired Unsigned Int32 + print(d.shape) + print(d[0:10],d[int(d.shape[0]/2)],d[len(d)-1]) + print(d[int(d.shape[0]/3):int(d.shape[0]/3+20)]) + d=numpy.reshape(d,(2300,2300)) +# from matplotlib import pylab +# pylab.imshow(d,vmin=0,vmax=1000) +# pylab.show() + except ImportError: + print("You need to get numpy and matplotlib to see the data") + else: + value=object.get_value() + newobject.set_value(value) + print("Val:",value,i) + print() +del(object) +newobject.write_widefile(b"newtest1.cbf",pycbf.CBF,\ + pycbf.MIME_HEADERS|pycbf.MSG_DIGEST|pycbf.PAD_4K,0) +# +print(dir()) +#object.free_handle(handle) +@} + + +\subsection{Processing of XFEL axes} + +@o pycbf_testfelaxes.py -i -t +@{ +import pycbf, sys +from decimal import Decimal, ROUND_HALF_UP + +image_file = bytes(sys.argv[1],'utf-8') + +cbf = pycbf.cbf_handle_struct() +cbf.read_widefile(image_file, pycbf.MSG_DIGEST) + +for element in range(64): + d = cbf.construct_detector(element) + print("element:", element) + + v00 = d.get_pixel_coordinates(0, 0) + v01 = d.get_pixel_coordinates(0, 1) + v10 = d.get_pixel_coordinates(1, 0) + v11 = d.get_pixel_coordinates(1, 1) + prec = Decimal('1.000000000') + + print('(0, 0) v00 [ %.9f %.9f %.9f ]' %(round(v00[0],9), round(v00[1],9), round(v00[2],9))) + print('(0, 1) v01 [ %.9g %.9g %.9g ]' %(round(v01[0],9), round(v01[1],9), round(v01[2],9))) + print('(1, 0) v10 [ %.9g %.9g %.9g ]' %(round(v10[0],9), round(v10[1],9), round(v10[2],9))) + print('(1, 1) v11 [ %.9g %.9g %.9g ]' %(round(v11[0],9), round(v11[1],9), round(v11[2],9))) + + print("surface axes:", d.get_detector_surface_axes(0), d.get_detector_surface_axes(1)) + + print(d.get_detector_surface_axes(0), "has", cbf.count_axis_ancestors(d.get_detector_surface_axes(0)), "ancestors") + print(d.get_detector_surface_axes(1), "has", cbf.count_axis_ancestors(d.get_detector_surface_axes(1)), "ancestors") + + cur_axis = d.get_detector_surface_axes(0) + count = cbf.count_axis_ancestors(cur_axis) + + for index in range(count): + print("axis", cur_axis, "index: ", index) + print(" equipment", cbf.get_axis_equipment(cur_axis)) + print(" depends_on", cbf.get_axis_depends_on(cur_axis)) + print(" equipment_component", cbf.get_axis_equipment_component(cur_axis)) + vector = cbf.get_axis_vector(cur_axis) + print(" vector [ %.8g %.8g %.8g ]" % (round(vector[0],7), round(vector[1],7), round(vector[2],7))) + offset = cbf.get_axis_offset(cur_axis) + print(" offset [ %.8g %.8g %.8g ]" % (round(offset[0],7), round(offset[1],7), round(offset[2],7))) + print(" rotation", cbf.get_axis_rotation(cur_axis)) + print(" rotation_axis", cbf.get_axis_rotation_axis(cur_axis)) + cur_axis = cbf.get_axis_depends_on(cur_axis) +@} + \section{Worked example 1 : xmas beamline + mar ccd detector at the ESRF} Now for the interesting part. We will attempt to actually use pycbf for a real @@ -565,7 +735,7 @@ the mar ccd header format. FIXME : byteswapping and ends??? -@O xmas/readmarheader.py +@o xmas/readmarheader.py -i -t @{#!/usr/bin/env python import struct @@ -606,9 +776,9 @@ def make_format(cdefinition): try: [type, name] = decl.split() except: - #print "skipping:",line + #print("skipping:",line) continue - # print "type:",type," name:",name + # print("type:",type," name:",name) if name.find("[")>-1: # repeated ... times @@ -618,7 +788,7 @@ def make_format(cdefinition): num = num.replace("sizeof(INT32)","4") times = eval(num) except: - print "Please decode",decl + print("Please decode",decl) raise else: times=1 @@ -627,10 +797,10 @@ def make_format(cdefinition): names += [name]*times expected += mar_c_sizes[type]*times except: - #print "skipping",line + #print("skipping",line) continue - #print "%4d %4d"%(mar_c_sizes[type]*times,expected),name,":",times,line - #print struct.calcsize(fmt),expected + #print("%4d %4d"%(mar_c_sizes[type]*times,expected),name,":",times,line) + #print(struct.calcsize(fmt),expected) return names, fmt def read_mar_header(filename): @@ -652,7 +822,7 @@ def interpret_header(header, fmt, names): dict = {} i=0 for name in names: - if dict.has_key(name): + if name in dict: if type(values[i]) == type("string"): dict[name] = dict[name]+values[i] else: @@ -881,8 +1051,8 @@ class marheaderreader: which are in comment sections """ s=s.replace("\000","") - items = filter(None, [len(x)>1 and x or None for x in [ - item.split("=") for item in s.split(";")]]) + items = [_f for _f in [len(x)>1 and x or None for x in [ + item.split("=") for item in s.split(";")]] if _f] return items @@ -891,17 +1061,17 @@ if __name__=="__main__": Make a little program to process files """ import sys - print "Starting" + print("Starting") names,fmt = make_format(cdefinition) - print "Names and format made" + print("Names and format made") h = read_mar_header(sys.argv[1]) - print "Read header, interpreting" + print("Read header, interpreting") d = interpret_header(h,fmt,names) printed = {} for name in names: - if printed.has_key(name): + if name in printed: continue - print name,":",d[name] + print(name,":",d[name]) printed[name]=1 @} @@ -913,7 +1083,7 @@ some more infomation from the user and the create cif files. This relies on a "template" cif file to get it started (avoids me programming everything). -@O xmas/xmasheaders.py +@o xmas/xmasheaders.py -i -t @{#!/usr/bin/env python @@ -1149,15 +1319,15 @@ class cifheader: def updateitems(self,dict): - names = dict.keys() + names = list(dict.keys()) for name in names: value = dict[name] # use a dictionary of functions - if functiondict.has_key(name): - # print "calling",functiondict[name],value - apply(functiondict[name],(self.cbf,value)) + if name in functiondict: + # print("calling",functiondict[name],value) + functiondict[name](*(self.cbf,value)) else: - #print "ignoring",name,value + #print("ignoring",name,value) pass @@ -1179,7 +1349,7 @@ if __name__=="__main__": This was sort of copied and modified from an example file. It has NOT been checked. Hopefully the four circle geometry at least vaguely matches what is at the beamline. -@O xmas/xmas_cif_template.cif +@o xmas/xmas_cif_template.cif -i -t @{ ###CBF: VERSION 0.6 # CBF file written by cbflib v0.6 diff --git a/pycbf/pycbf_i.w b/pycbf/pycbf_i.w index fd1323f2..06317d99 100644 --- a/pycbf/pycbf_i.w +++ b/pycbf/pycbf_i.w @@ -402,51 +402,52 @@ static int convert_darray(PyObject *input, double *ptr, int size) { static int error_status = 0; -static char error_message[1024] ; // hope that is long enough +static char error_message1[17] ; +static char error_message[1042] ; // hope that is long enough /* prototype */ void get_error_message(void); void get_error_message(){ - sprintf(error_message,"%s","CBFlib Error(s):"); + sprintf(error_message1,"%s","CBFlib Error(s):"); if (error_status & CBF_FORMAT ) - sprintf(error_message,"%s %s",error_message,"CBF_FORMAT "); + sprintf(error_message,"%s %s",error_message1,"CBF_FORMAT "); if (error_status & CBF_ALLOC ) - sprintf(error_message,"%s %s",error_message,"CBF_ALLOC "); + sprintf(error_message,"%s %s",error_message1,"CBF_ALLOC "); if (error_status & CBF_ARGUMENT ) - sprintf(error_message,"%s %s",error_message,"CBF_ARGUMENT "); + sprintf(error_message,"%s %s",error_message1,"CBF_ARGUMENT "); if (error_status & CBF_ASCII ) - sprintf(error_message,"%s %s",error_message,"CBF_ASCII "); + sprintf(error_message,"%s %s",error_message1,"CBF_ASCII "); if (error_status & CBF_BINARY ) - sprintf(error_message,"%s %s",error_message,"CBF_BINARY "); + sprintf(error_message,"%s %s",error_message1,"CBF_BINARY "); if (error_status & CBF_BITCOUNT ) - sprintf(error_message,"%s %s",error_message,"CBF_BITCOUNT "); + sprintf(error_message,"%s %s",error_message1,"CBF_BITCOUNT "); if (error_status & CBF_ENDOFDATA ) - sprintf(error_message,"%s %s",error_message,"CBF_ENDOFDATA "); + sprintf(error_message,"%s %s",error_message1,"CBF_ENDOFDATA "); if (error_status & CBF_FILECLOSE ) - sprintf(error_message,"%s %s",error_message,"CBF_FILECLOSE "); + sprintf(error_message,"%s %s",error_message1,"CBF_FILECLOSE "); if (error_status & CBF_FILEOPEN ) - sprintf(error_message,"%s %s",error_message,"CBF_FILEOPEN "); + sprintf(error_message,"%s %s",error_message1,"CBF_FILEOPEN "); if (error_status & CBF_FILEREAD ) - sprintf(error_message,"%s %s",error_message,"CBF_FILEREAD "); + sprintf(error_message,"%s %s",error_message1,"CBF_FILEREAD "); if (error_status & CBF_FILESEEK ) - sprintf(error_message,"%s %s",error_message,"CBF_FILESEEK "); + sprintf(error_message,"%s %s",error_message1,"CBF_FILESEEK "); if (error_status & CBF_FILETELL ) - sprintf(error_message,"%s %s",error_message,"CBF_FILETELL "); + sprintf(error_message,"%s %s",error_message1,"CBF_FILETELL "); if (error_status & CBF_FILEWRITE ) - sprintf(error_message,"%s %s",error_message,"CBF_FILEWRITE "); + sprintf(error_message,"%s %s",error_message1,"CBF_FILEWRITE "); if (error_status & CBF_IDENTICAL ) - sprintf(error_message,"%s %s",error_message,"CBF_IDENTICAL "); + sprintf(error_message,"%s %s",error_message1,"CBF_IDENTICAL "); if (error_status & CBF_NOTFOUND ) - sprintf(error_message,"%s %s",error_message,"CBF_NOTFOUND "); + sprintf(error_message,"%s %s",error_message1,"CBF_NOTFOUND "); if (error_status & CBF_OVERFLOW ) - sprintf(error_message,"%s %s",error_message,"CBF_OVERFLOW "); + sprintf(error_message,"%s %s",error_message1,"CBF_OVERFLOW "); if (error_status & CBF_UNDEFINED ) - sprintf(error_message,"%s %s",error_message,"CBF_UNDEFINED "); + sprintf(error_message,"%s %s",error_message1,"CBF_UNDEFINED "); if (error_status & CBF_NOTIMPLEMENTED) - sprintf(error_message,"%s %s",error_message,"CBF_NOTIMPLEMENTED"); + sprintf(error_message,"%s %s",error_message1,"CBF_NOTIMPLEMENTED"); if (error_status & CBF_NOCOMPRESSION) - sprintf(error_message,"%s %s",error_message,"CBF_NOCOMPRESSION"); + sprintf(error_message,"%s %s",error_message1,"CBF_NOCOMPRESSION"); } diff --git a/pycbf/pycbf_test1.py b/pycbf/pycbf_test1.py index 8bb6e279..9abf5e1a 100644 --- a/pycbf/pycbf_test1.py +++ b/pycbf/pycbf_test1.py @@ -1,65 +1,67 @@ - -import pycbf -object = pycbf.cbf_handle_struct() # FIXME -object.read_file("../img2cif_packed.cif",pycbf.MSG_DIGEST) -object.rewind_datablock() -print "Found",object.count_datablocks(),"blocks" -object.select_datablock(0) -print "Zeroth is named",object.datablock_name() -object.rewind_category() -categories = object.count_categories() -for i in range(categories): - print "Category:",i, - object.select_category(i) - category_name = object.category_name() - print "Name:",category_name, - rows=object.count_rows() - print "Rows:",rows, - cols = object.count_columns() - print "Cols:",cols - loop=1 - object.rewind_column() - while loop is not 0: - column_name = object.column_name() - print "column name \"",column_name,"\"", - try: - object.next_column() - except: - break - print - for j in range(rows): - object.select_row(j) - object.rewind_column() - print "row:",j - for k in range(cols): - name=object.column_name() - print "col:",name, - object.select_column(k) - typeofvalue=object.get_typeofvalue() - print "type:",typeofvalue - if typeofvalue.find("bnry") > -1: - print "Found the binary!!", - s=object.get_integerarray_as_string() - print type(s) - print dir(s) - print len(s) - try: - import Numeric - d = Numeric.fromstring(s,Numeric.UInt32) - # Hard wired Unsigned Int32 - print d.shape - print d[0:10],d[d.shape[0]/2],d[-1] - d=Numeric.reshape(d,(2300,2300)) -# from matplotlib import pylab -# pylab.imshow(d,vmin=0,vmax=1000) -# pylab.show() - except ImportError: - print "You need to get Numeric and matplotlib to see the data" - else: - value=object.get_value() - print "Val:",value,i - print -del(object) -# -print dir() -#object.free_handle(handle) + +import pycbf +object = pycbf.cbf_handle_struct() # FIXME +object.read_file(b"../img2cif_packed.cif",pycbf.MSG_DIGEST) +object.rewind_datablock() +print("Found",object.count_datablocks(),"blocks") +object.select_datablock(0) +print("Zeroth is named",object.datablock_name()) +object.rewind_category() +categories = object.count_categories() +for i in range(categories): + print("Category:",i, end=' ') + object.select_category(i) + category_name = object.category_name() + print("Name:",category_name, end=' ') + rows=object.count_rows() + print("Rows:",rows, end=' ') + cols = object.count_columns() + print("Cols:",cols) + loop=1 + object.rewind_column() + while loop==1: + column_name = object.column_name() + print("column name \"",column_name,"\"", end=' ') + try: + object.next_column() + except: + break + print + for j in range(rows): + object.select_row(j) + object.rewind_column() + if j==0: print() + print("row:",j) + for k in range(cols): + name=object.column_name() + print("col:",name, end=' ') + object.select_column(k) + typeofvalue=object.get_typeofvalue() + print("type:",typeofvalue) + if typeofvalue.find(b"bnry") > -1: + print("Found the binary!!", end=' ') + s=object.get_integerarray_as_string() + print(type(str(s))) + print(dir(str(s))) + print(len(str(s))) + try: + import numpy + d = numpy.frombuffer(bytes(s),numpy.uint32) + # Hard wired Unsigned Int32 + print(d.shape) + print(d[0:10],d[int(d.shape[0]/2)],d[len(d)-1]) + print(d[int(d.shape[0]/3):int(d.shape[0]/3+20)]) + d=numpy.reshape(d,(2300,2300)) +# from matplotlib import pylab +# pylab.imshow(d,vmin=0,vmax=1000) +# pylab.show() + except ImportError: + print("You need to get numpy and matplotlib to see the data") + else: + value=object.get_value() + print("Val:",value,i) + print() +del(object) +# +print(dir()) +#object.free_handle(handle) diff --git a/pycbf/pycbf_test2.py b/pycbf/pycbf_test2.py index 29cce30b..129cbd37 100644 --- a/pycbf/pycbf_test2.py +++ b/pycbf/pycbf_test2.py @@ -1,12 +1,12 @@ - -import pycbf -obj = pycbf.cbf_handle_struct() -obj.read_file("../adscconverted.cbf",0) -obj.select_datablock(0) -g = obj.construct_goniometer() -print "Rotation axis is",g.get_rotation_axis() -d = obj.construct_detector(0) -print "Beam center is",d.get_beam_center() -print "Detector slow axis is", d.get_detector_axis_slow() -print "Detector fast axis is", d.get_detector_axis_fast() -print "Detector axes (fast, slow) are", d.get_detector_axes_fs() + +import pycbf +obj = pycbf.cbf_handle_struct() +obj.read_file(b"../adscconverted.cbf",0) +obj.select_datablock(0) +g = obj.construct_goniometer() +print("Rotation axis is",g.get_rotation_axis()) +d = obj.construct_detector(0) +print("Beam center is",d.get_beam_center()) +print("Detector slow axis is", d.get_detector_axis_slow()) +print("Detector fast axis is", d.get_detector_axis_fast()) +print("Detector axes (fast, slow) are", d.get_detector_axes_fs()) diff --git a/pycbf/pycbf_test3.py b/pycbf/pycbf_test3.py index 274ae3b1..da3f0f69 100644 --- a/pycbf/pycbf_test3.py +++ b/pycbf/pycbf_test3.py @@ -1,22 +1,26 @@ - -import pycbf, unittest -class GenericTests(unittest.TestCase): - - def test_get_local_integer_byte_order(self): - self.assertEqual( pycbf.get_local_integer_byte_order(), - 'little_endian') - - def test_get_local_real_byte_order(self): - self.assertEqual( pycbf.get_local_real_byte_order() , - 'little_endian') - - def test_get_local_real_format(self): - self.assertEqual( pycbf.get_local_real_format(), - 'ieee 754-1985') - - def test_compute_cell_volume(self): - self.assertEqual( pycbf.compute_cell_volume((2.,3.,4.,90.,90.,90.)), - 24.0) -if __name__=="__main__": - unittest.main() - + +import pycbf, unittest +class GenericTests(unittest.TestCase): + + def test_get_local_integer_byte_order(self): + #print(bytes(pycbf.get_local_integer_byte_order())) + self.assertEqual( bytes(pycbf.get_local_integer_byte_order()), + bytes(b'little_endian')) + + def test_get_local_real_byte_order(self): + #print(bytes(pycbf.get_local_real_byte_order())) + self.assertEqual( bytes(pycbf.get_local_real_byte_order()), + bytes(b'little_endian')) + + def test_get_local_real_format(self): + #print(bytes(pycbf.get_local_real_format())) + self.assertEqual( bytes(pycbf.get_local_real_format()), + bytes(b'ieee 754-1985')) + + def test_compute_cell_volume(self): + #print(pycbf.compute_cell_volume((2.,3.,4.,90.,90.,90.))) + self.assertEqual( pycbf.compute_cell_volume((2.,3.,4.,90.,90.,90.)), + 24.0) +if __name__=="__main__": + unittest.main() + diff --git a/pycbf/pycbf_test4.py b/pycbf/pycbf_test4.py old mode 100755 new mode 100644 index 900d0701..f159e8d1 --- a/pycbf/pycbf_test4.py +++ b/pycbf/pycbf_test4.py @@ -1,100 +1,102 @@ -# version of pycbf_test1 with write logic added -import pycbf -object = pycbf.cbf_handle_struct() -newobject = pycbf.cbf_handle_struct() -object.read_file("../img2cif_packed.cif",pycbf.MSG_DIGEST) -object.rewind_datablock() -print "Found",object.count_datablocks(),"blocks" -object.select_datablock(0) -print "Zeroth is named",object.datablock_name() -newobject.force_new_datablock(object.datablock_name()); -object.rewind_category() -categories = object.count_categories() -for i in range(categories): - print "Category:",i, - object.select_category(i) - category_name = object.category_name() - print "Name:",category_name, - newobject.new_category(category_name) - rows=object.count_rows() - print "Rows:",rows, - cols = object.count_columns() - print "Cols:",cols - loop=1 - object.rewind_column() - while loop is not 0: - column_name = object.column_name() - print "column name \"",column_name,"\"", - newobject.new_column(column_name) - try: - object.next_column() - except: - break - print - for j in range(rows): - object.select_row(j) - newobject.new_row() - object.rewind_column() - print "row:",j - for k in range(cols): - name=object.column_name() - print "col:",name, - object.select_column(k) - newobject.select_column(k) - typeofvalue=object.get_typeofvalue() - print "type:",typeofvalue - if typeofvalue.find("bnry") > -1: - print "Found the binary!!", - s=object.get_integerarray_as_string() - print type(s) - print dir(s) - print len(s) - (compression, binaryid, elsize, elsigned, \ - elunsigned, elements, minelement, maxelement, \ - byteorder,dimfast,dimmid,dimslow,padding) = \ - object.get_integerarrayparameters_wdims_fs() - if dimfast==0: - dimfast = 1 - if dimmid==0: - dimmid = 1 - if dimslow == 0: - dimslow = 1 - print "compression: ",compression - print "binaryid", binaryid - print "elsize", elsize - print "elsigned", elsigned - print "elunsigned",elunsigned - print "elements", elements - print "minelement", minelement - print "maxelement", maxelement - print "byteorder", byteorder - print "dimfast", dimfast - print "dimmid", dimmid - print "dimslow",dimslow - print "padding", padding - newobject.set_integerarray_wdims_fs(\ - pycbf.CBF_BYTE_OFFSET,binaryid,s,elsize,elsigned,\ - elements,byteorder,dimfast,dimmid,dimslow,padding) - try: - import Numeric - d = Numeric.fromstring(s,Numeric.UInt32) - # Hard wired Unsigned Int32 - print d.shape - print d[0:10],d[d.shape[0]/2],d[-1] - d=Numeric.reshape(d,(dimfast,dimmid)) -# from matplotlib import pylab -# pylab.imshow(d,vmin=0,vmax=1000) -# pylab.show() - except ImportError: - print "You need to get Numeric and matplotlib to see the data" - else: - value=object.get_value() - newobject.set_value(value) - print "Val:",value,i - print -del(object) -newobject.write_widefile("newtest1.cbf",pycbf.CBF,\ - pycbf.MIME_HEADERS|pycbf.MSG_DIGEST|pycbf.PAD_4K,0) -# -print dir() -#object.free_handle(handle) + +# version of pycbf_test1 with write logic added +import pycbf +object = pycbf.cbf_handle_struct() +newobject = pycbf.cbf_handle_struct() +object.read_file(b"../img2cif_packed.cif",pycbf.MSG_DIGEST) +object.rewind_datablock() +print("Found",object.count_datablocks(),"blocks") +object.select_datablock(0) +print("Zeroth is named",object.datablock_name()) +newobject.force_new_datablock(object.datablock_name()); +object.rewind_category() +categories = object.count_categories() +for i in range(categories): + print("Category:",i, end= ' ') + object.select_category(i) + category_name = object.category_name() + print("Name:",category_name, end=' ') + newobject.new_category(category_name) + rows=object.count_rows() + print("Rows:",rows, end=' ') + cols = object.count_columns() + print("Cols:",cols) + loop=1 + object.rewind_column() + while loop==1: + column_name = object.column_name() + print("column name \"",column_name,"\"", end=' ') + newobject.new_column(column_name) + try: + object.next_column() + except: + break + print() + for j in range(rows): + object.select_row(j) + newobject.new_row() + object.rewind_column() + print("row:",j) + for k in range(cols): + name=object.column_name() + print("col:",name, end=' ') + object.select_column(k) + newobject.select_column(k) + typeofvalue=object.get_typeofvalue() + print("type:",typeofvalue) + if typeofvalue.find(b"bnry") > -1: + print("Found the binary!!",end=' ') + s=object.get_integerarray_as_string() + print(type(s)) + print(dir(s)) + print(len(s)) + (compression, binaryid, elsize, elsigned, \ + elunsigned, elements, minelement, maxelement, \ + byteorder,dimfast,dimmid,dimslow,padding) = \ + object.get_integerarrayparameters_wdims_fs() + if dimfast==0: + dimfast = 1 + if dimmid==0: + dimmid = 1 + if dimslow == 0: + dimslow = 1 + print("compression: ",compression) + print("binaryid", binaryid) + print("elsize", elsize) + print("elsigned", elsigned) + print("elunsigned",elunsigned) + print("elements", elements) + print("minelement", minelement) + print("maxelement", maxelement) + print("byteorder", byteorder) + print("dimfast", dimfast) + print("dimmid", dimmid) + print("dimslow",dimslow) + print("padding", padding) + newobject.set_integerarray_wdims_fs(\ + pycbf.CBF_BYTE_OFFSET,binaryid,s,elsize,elsigned,\ + elements,byteorder,dimfast,dimmid,dimslow,padding) + try: + import numpy + d = numpy.frombuffer(s,numpy.uint32) + # Hard wired Unsigned Int32 + print(d.shape) + print(d[0:10],d[int(d.shape[0]/2)],d[len(d)-1]) + print(d[int(d.shape[0]/3):int(d.shape[0]/3+20)]) + d=numpy.reshape(d,(2300,2300)) +# from matplotlib import pylab +# pylab.imshow(d,vmin=0,vmax=1000) +# pylab.show() + except ImportError: + print("You need to get numpy and matplotlib to see the data") + else: + value=object.get_value() + newobject.set_value(value) + print("Val:",value,i) + print() +del(object) +newobject.write_widefile(b"newtest1.cbf",pycbf.CBF,\ + pycbf.MIME_HEADERS|pycbf.MSG_DIGEST|pycbf.PAD_4K,0) +# +print(dir()) +#object.free_handle(handle) diff --git a/pycbf/pycbf_testfelaxes.py b/pycbf/pycbf_testfelaxes.py index b4333ee6..2d261a4f 100644 --- a/pycbf/pycbf_testfelaxes.py +++ b/pycbf/pycbf_testfelaxes.py @@ -1,14 +1,15 @@ + import pycbf, sys from decimal import Decimal, ROUND_HALF_UP -image_file = sys.argv[1] +image_file = bytes(sys.argv[1],'utf-8') cbf = pycbf.cbf_handle_struct() cbf.read_widefile(image_file, pycbf.MSG_DIGEST) for element in range(64): d = cbf.construct_detector(element) - print "element:", element + print("element:", element) v00 = d.get_pixel_coordinates(0, 0) v01 = d.get_pixel_coordinates(0, 1) @@ -16,30 +17,28 @@ v11 = d.get_pixel_coordinates(1, 1) prec = Decimal('1.000000000') - print '(0, 0) v00 [ %.9f %.9f %.9f ]' %(round(v00[0],9), round(v00[1],9), round(v00[2],9)) - print '(0, 1) v01 [ %.9g %.9g %.9g ]' %(round(v01[0],9), round(v01[1],9), round(v01[2],9)) - print '(1, 0) v10 [ %.9g %.9g %.9g ]' %(round(v10[0],9), round(v10[1],9), round(v10[2],9)) - print '(1, 1) v11 [ %.9g %.9g %.9g ]' %(round(v11[0],9), round(v11[1],9), round(v11[2],9)) + print('(0, 0) v00 [ %.9f %.9f %.9f ]' %(round(v00[0],9), round(v00[1],9), round(v00[2],9))) + print('(0, 1) v01 [ %.9g %.9g %.9g ]' %(round(v01[0],9), round(v01[1],9), round(v01[2],9))) + print('(1, 0) v10 [ %.9g %.9g %.9g ]' %(round(v10[0],9), round(v10[1],9), round(v10[2],9))) + print('(1, 1) v11 [ %.9g %.9g %.9g ]' %(round(v11[0],9), round(v11[1],9), round(v11[2],9))) - print "surface axes:", d.get_detector_surface_axes(0), d.get_detector_surface_axes(1) + print("surface axes:", d.get_detector_surface_axes(0), d.get_detector_surface_axes(1)) - print d.get_detector_surface_axes(0), "has", cbf.count_axis_ancestors(d.get_detector_surface_axes(0)), "ancestors" - print d.get_detector_surface_axes(1), "has", cbf.count_axis_ancestors(d.get_detector_surface_axes(1)), "ancestors" + print(d.get_detector_surface_axes(0), "has", cbf.count_axis_ancestors(d.get_detector_surface_axes(0)), "ancestors") + print(d.get_detector_surface_axes(1), "has", cbf.count_axis_ancestors(d.get_detector_surface_axes(1)), "ancestors") cur_axis = d.get_detector_surface_axes(0) count = cbf.count_axis_ancestors(cur_axis) for index in range(count): - print "axis", cur_axis, "index: ", index - print " equipment", cbf.get_axis_equipment(cur_axis) - print " depends_on", cbf.get_axis_depends_on(cur_axis) - print " equipment_component", cbf.get_axis_equipment_component(cur_axis) + print("axis", cur_axis, "index: ", index) + print(" equipment", cbf.get_axis_equipment(cur_axis)) + print(" depends_on", cbf.get_axis_depends_on(cur_axis)) + print(" equipment_component", cbf.get_axis_equipment_component(cur_axis)) vector = cbf.get_axis_vector(cur_axis) - print " vector [ %.8g %.8g %.8g ]" % (round(vector[0],7), round(vector[1],7), round(vector[2],7)) + print(" vector [ %.8g %.8g %.8g ]" % (round(vector[0],7), round(vector[1],7), round(vector[2],7))) offset = cbf.get_axis_offset(cur_axis) - print " offset [ %.8g %.8g %.8g ]" % (round(offset[0],7), round(offset[1],7), round(offset[2],7)) - print " rotation", cbf.get_axis_rotation(cur_axis) - print " rotation_axis", cbf.get_axis_rotation_axis(cur_axis) + print(" offset [ %.8g %.8g %.8g ]" % (round(offset[0],7), round(offset[1],7), round(offset[2],7))) + print(" rotation", cbf.get_axis_rotation(cur_axis)) + print(" rotation_axis", cbf.get_axis_rotation_axis(cur_axis)) cur_axis = cbf.get_axis_depends_on(cur_axis) - - diff --git a/pycbf/pycbf_wrap.c b/pycbf/pycbf_wrap.c index def63d1f..97f0b78c 100644 --- a/pycbf/pycbf_wrap.c +++ b/pycbf/pycbf_wrap.c @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 3.0.10 + * Version 4.0.2 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -140,11 +140,16 @@ #endif +#if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND) +/* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */ +# include +#endif + #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) /* Use debug wrappers with the Python release dll */ # undef _DEBUG # include -# define _DEBUG +# define _DEBUG 1 #else # include #endif @@ -194,6 +199,7 @@ /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 #define SWIG_CAST_NEW_MEMORY 0x2 +#define SWIG_POINTER_NO_NULL 0x4 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 @@ -778,25 +784,31 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { SWIGINTERN char* SWIG_Python_str_AsChar(PyObject *str) { -#if PY_VERSION_HEX >= 0x03000000 - char *cstr; - char *newstr; - Py_ssize_t len; +#if PY_VERSION_HEX >= 0x03030000 + return (char *)PyUnicode_AsUTF8(str); +#elif PY_VERSION_HEX >= 0x03000000 + char *newstr = 0; str = PyUnicode_AsUTF8String(str); - PyBytes_AsStringAndSize(str, &cstr, &len); - newstr = (char *) malloc(len+1); - memcpy(newstr, cstr, len+1); - Py_XDECREF(str); + if (str) { + char *cstr; + Py_ssize_t len; + if (PyBytes_AsStringAndSize(str, &cstr, &len) != -1) { + newstr = (char *) malloc(len+1); + if (newstr) + memcpy(newstr, cstr, len+1); + } + Py_XDECREF(str); + } return newstr; #else return PyString_AsString(str); #endif } -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) +#if PY_VERSION_HEX >= 0x03030000 || PY_VERSION_HEX < 0x03000000 +# define SWIG_Python_str_DelForPy3(x) #else -# define SWIG_Python_str_DelForPy3(x) +# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) #endif @@ -810,148 +822,19 @@ SWIG_Python_str_FromChar(const char *c) #endif } -/* Add PyOS_snprintf for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 -# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) -# define PyOS_snprintf _snprintf -# else -# define PyOS_snprintf snprintf -# endif -#endif - -/* A crude PyString_FromFormat implementation for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 - -#ifndef SWIG_PYBUFFER_SIZE -# define SWIG_PYBUFFER_SIZE 1024 -#endif - -static PyObject * -PyString_FromFormat(const char *fmt, ...) { - va_list ap; - char buf[SWIG_PYBUFFER_SIZE * 2]; - int res; - va_start(ap, fmt); - res = vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); -} -#endif - #ifndef PyObject_DEL # define PyObject_DEL PyObject_Del #endif -/* A crude PyExc_StopIteration exception for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 -# ifndef PyExc_StopIteration -# define PyExc_StopIteration PyExc_RuntimeError -# endif -# ifndef PyObject_GenericGetAttr -# define PyObject_GenericGetAttr 0 -# endif -#endif - -/* Py_NotImplemented is defined in 2.1 and up. */ -#if PY_VERSION_HEX < 0x02010000 -# ifndef Py_NotImplemented -# define Py_NotImplemented PyExc_RuntimeError -# endif -#endif - -/* A crude PyString_AsStringAndSize implementation for old Pythons */ -#if PY_VERSION_HEX < 0x02010000 -# ifndef PyString_AsStringAndSize -# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} -# endif -#endif - -/* PySequence_Size for old Pythons */ -#if PY_VERSION_HEX < 0x02000000 -# ifndef PySequence_Size -# define PySequence_Size PySequence_Length -# endif -#endif - -/* PyBool_FromLong for old Pythons */ -#if PY_VERSION_HEX < 0x02030000 -static -PyObject *PyBool_FromLong(long ok) -{ - PyObject *result = ok ? Py_True : Py_False; - Py_INCREF(result); - return result; -} -#endif - -/* Py_ssize_t for old Pythons */ -/* This code is as recommended by: */ -/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) -typedef int Py_ssize_t; -# define PY_SSIZE_T_MAX INT_MAX -# define PY_SSIZE_T_MIN INT_MIN -typedef inquiry lenfunc; -typedef intargfunc ssizeargfunc; -typedef intintargfunc ssizessizeargfunc; -typedef intobjargproc ssizeobjargproc; -typedef intintobjargproc ssizessizeobjargproc; -typedef getreadbufferproc readbufferproc; -typedef getwritebufferproc writebufferproc; -typedef getsegcountproc segcountproc; -typedef getcharbufferproc charbufferproc; -static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc)) -{ - long result = 0; - PyObject *i = PyNumber_Int(x); - if (i) { - result = PyInt_AsLong(i); - Py_DECREF(i); - } - return result; -} -#endif - -#if PY_VERSION_HEX < 0x02050000 -#define PyInt_FromSize_t(x) PyInt_FromLong((long)x) -#endif - -#if PY_VERSION_HEX < 0x02040000 -#define Py_VISIT(op) \ - do { \ - if (op) { \ - int vret = visit((op), arg); \ - if (vret) \ - return vret; \ - } \ - } while (0) -#endif - -#if PY_VERSION_HEX < 0x02030000 -typedef struct { - PyTypeObject type; - PyNumberMethods as_number; - PyMappingMethods as_mapping; - PySequenceMethods as_sequence; - PyBufferProcs as_buffer; - PyObject *name, *slots; -} PyHeapTypeObject; -#endif - -#if PY_VERSION_HEX < 0x02030000 -typedef destructor freefunc; -#endif - -#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ - (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ - (PY_MAJOR_VERSION > 3)) +// SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user +// interface files check for it. # define SWIGPY_USE_CAPSULE -# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) -#endif +# define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) #if PY_VERSION_HEX < 0x03020000 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) +#define Py_hash_t long #endif /* ----------------------------------------------------------------------------- @@ -1009,14 +892,17 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *value = 0; PyObject *traceback = 0; - if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); + if (PyErr_Occurred()) + PyErr_Fetch(&type, &value, &traceback); if (value) { - char *tmp; PyObject *old_str = PyObject_Str(value); + const char *tmp = SWIG_Python_str_AsChar(old_str); PyErr_Clear(); Py_XINCREF(type); - - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); + if (tmp) + PyErr_Format(type, "%s %s", tmp, mesg); + else + PyErr_Format(type, "%s", mesg); SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); Py_DECREF(value); @@ -1025,6 +911,37 @@ SWIG_Python_AddErrorMsg(const char* mesg) } } +SWIGRUNTIME int +SWIG_Python_TypeErrorOccurred(PyObject *obj) +{ + PyObject *error; + if (obj) + return 0; + error = PyErr_Occurred(); + return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError); +} + +SWIGRUNTIME void +SWIG_Python_RaiseOrModifyTypeError(const char *message) +{ + if (SWIG_Python_TypeErrorOccurred(NULL)) { + /* Use existing TypeError to preserve stacktrace and enhance with given message */ + PyObject *newvalue; + PyObject *type = NULL, *value = NULL, *traceback = NULL; + PyErr_Fetch(&type, &value, &traceback); +#if PY_VERSION_HEX >= 0x03000000 + newvalue = PyUnicode_FromFormat("%S\nAdditional information:\n%s", value, message); +#else + newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); +#endif + Py_XDECREF(value); + PyErr_Restore(type, newvalue, traceback); + } else { + /* Raise TypeError using given message */ + PyErr_SetString(PyExc_TypeError, message); + } +} + #if defined(SWIG_PYTHON_NO_THREADS) # if defined(SWIG_PYTHON_THREADS) # undef SWIG_PYTHON_THREADS @@ -1032,9 +949,7 @@ SWIG_Python_AddErrorMsg(const char* mesg) #endif #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) -# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ -# define SWIG_PYTHON_USE_GIL -# endif +# define SWIG_PYTHON_USE_GIL # endif # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ # ifndef SWIG_PYTHON_INITIALIZE_THREADS @@ -1111,30 +1026,13 @@ extern "C" { /* Constant information structure */ typedef struct swig_const_info { int type; - char *name; + const char *name; long lvalue; double dvalue; void *pvalue; swig_type_info **ptype; } swig_const_info; - -/* ----------------------------------------------------------------------------- - * Wrapper of PyInstanceMethod_New() used in Python 3 - * It is exported to the generated module, used for -fastproxy - * ----------------------------------------------------------------------------- */ -#if PY_VERSION_HEX >= 0x03000000 -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) -{ - return PyInstanceMethod_New(func); -} -#else -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func)) -{ - return NULL; -} -#endif - #ifdef __cplusplus } #endif @@ -1149,6 +1047,14 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), * * ----------------------------------------------------------------------------- */ +#if PY_VERSION_HEX < 0x02070000 /* 2.7.0 */ +# error "This version of SWIG only supports Python >= 2.7" +#endif + +#if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03020000 +# error "This version of SWIG only supports Python 3 >= 3.2" +#endif + /* Common SWIG API */ /* for raw pointers */ @@ -1232,11 +1138,7 @@ SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { -#if PY_VERSION_HEX < 0x02030000 - PyDict_SetItemString(d, (char *)name, obj); -#else PyDict_SetItemString(d, name, obj); -#endif Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); @@ -1246,11 +1148,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { -#if PY_VERSION_HEX < 0x02030000 - PyDict_SetItemString(d, (char *)name, obj); -#else PyDict_SetItemString(d, name, obj); -#endif Py_DECREF(obj); } @@ -1260,7 +1158,6 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { SWIGINTERN PyObject* SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { -#if !defined(SWIG_PYTHON_OUTPUT_TUPLE) if (!result) { result = obj; } else if (result == Py_None) { @@ -1276,29 +1173,6 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { Py_DECREF(obj); } return result; -#else - PyObject* o2; - PyObject* o3; - if (!result) { - result = obj; - } else if (result == Py_None) { - Py_DECREF(result); - result = obj; - } else { - if (!PyTuple_Check(result)) { - o2 = result; - result = PyTuple_New(1); - PyTuple_SET_ITEM(result, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SET_ITEM(o3, 0, obj); - o2 = result; - result = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return result; -#endif } /* Unpack the argument tuple */ @@ -1349,12 +1223,21 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi } } +SWIGINTERN int +SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name) { + int no_kwargs = 1; + if (kwargs) { + assert(PyDict_Check(kwargs)); + if (PyDict_Size(kwargs) > 0) { + PyErr_Format(PyExc_TypeError, "%s() does not take keyword arguments", name); + no_kwargs = 0; + } + } + return no_kwargs; +} + /* A functor is a function object with one single object argument */ -#if PY_VERSION_HEX >= 0x02020000 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); -#else -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); -#endif /* Helper for static pointer initialization for both C and C++ code, for example @@ -1383,35 +1266,6 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi extern "C" { #endif -/* How to access Py_None */ -#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# ifndef SWIG_PYTHON_NO_BUILD_NONE -# ifndef SWIG_PYTHON_BUILD_NONE -# define SWIG_PYTHON_BUILD_NONE -# endif -# endif -#endif - -#ifdef SWIG_PYTHON_BUILD_NONE -# ifdef Py_None -# undef Py_None -# define Py_None SWIG_Py_None() -# endif -SWIGRUNTIMEINLINE PyObject * -_SWIG_Py_None(void) -{ - PyObject *none = Py_BuildValue((char*)""); - Py_DECREF(none); - return none; -} -SWIGRUNTIME PyObject * -SWIG_Py_None(void) -{ - static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); - return none; -} -#endif - /* The python void return value */ SWIGRUNTIMEINLINE PyObject * @@ -1438,7 +1292,10 @@ SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty) { SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; - return data ? data->implicitconv : 0; + int fail = data ? data->implicitconv : 0; + if (fail) + PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors."); + return fail; } SWIGRUNTIMEINLINE PyObject * @@ -1465,11 +1322,7 @@ SwigPyClientData_New(PyObject* obj) data->newargs = obj; Py_INCREF(obj); } else { -#if (PY_VERSION_HEX < 0x02020000) - data->newraw = 0; -#else - data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); -#endif + data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { Py_INCREF(data->newraw); data->newargs = PyTuple_New(1); @@ -1480,7 +1333,7 @@ SwigPyClientData_New(PyObject* obj) Py_INCREF(data->newargs); } /* the destroy method, aka as the C++ delete method */ - data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); + data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__"); if (PyErr_Occurred()) { PyErr_Clear(); data->destroy = 0; @@ -1489,11 +1342,7 @@ SwigPyClientData_New(PyObject* obj) int flags; Py_INCREF(data->destroy); flags = PyCFunction_GET_FLAGS(data->destroy); -#ifdef METH_O data->delargs = !(flags & (METH_O)); -#else - data->delargs = 0; -#endif } else { data->delargs = 0; } @@ -1581,20 +1430,12 @@ SwigPyObject_hex(SwigPyObject *v) } SWIGRUNTIME PyObject * -#ifdef METH_NOARGS SwigPyObject_repr(SwigPyObject *v) -#else -SwigPyObject_repr(SwigPyObject *v, PyObject *args) -#endif { const char *name = SWIG_TypePrettyName(v->ty); PyObject *repr = SWIG_Python_str_FromFormat("", (name ? name : "unknown"), (void *)v); if (v->next) { -# ifdef METH_NOARGS PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); -# else - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); -# endif # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); Py_DecRef(repr); @@ -1607,6 +1448,14 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args) return repr; } +/* We need a version taking two PyObject* parameters so it's a valid + * PyCFunction to use in swigobject_methods[]. */ +SWIGRUNTIME PyObject * +SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) +{ + return SwigPyObject_repr((SwigPyObject*)v); +} + SWIGRUNTIME int SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) { @@ -1680,14 +1529,14 @@ SwigPyObject_dealloc(PyObject *v) PyObject *res; /* PyObject_CallFunction() has the potential to silently drop - the active active exception. In cases of unnamed temporary + the active exception. In cases of unnamed temporary variable or where we just finished iterating over a generator StopIteration will be active right now, and this needs to remain true upon return from SwigPyObject_dealloc. So save and restore. */ - PyObject *val = NULL, *type = NULL, *tb = NULL; - PyErr_Fetch(&val, &type, &tb); + PyObject *type = NULL, *value = NULL, *traceback = NULL; + PyErr_Fetch(&type, &value, &traceback); if (data->delargs) { /* we need to create a temporary object to carry the destroy operation */ @@ -1702,7 +1551,7 @@ SwigPyObject_dealloc(PyObject *v) if (!res) PyErr_WriteUnraisable(destroy); - PyErr_Restore(val, type, tb); + PyErr_Restore(type, value, traceback); Py_XDECREF(res); } @@ -1721,11 +1570,6 @@ SWIGRUNTIME PyObject* SwigPyObject_append(PyObject* v, PyObject* next) { SwigPyObject *sobj = (SwigPyObject *) v; -#ifndef METH_O - PyObject *tmp = 0; - if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; - next = tmp; -#endif if (!SwigPyObject_Check(next)) { PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject"); return NULL; @@ -1736,11 +1580,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } SWIGRUNTIME PyObject* -#ifdef METH_NOARGS -SwigPyObject_next(PyObject* v) -#else SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { @@ -1752,11 +1592,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) } SWIGINTERN PyObject* -#ifdef METH_NOARGS -SwigPyObject_disown(PyObject *v) -#else SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = 0; @@ -1764,11 +1600,7 @@ SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) } SWIGINTERN PyObject* -#ifdef METH_NOARGS -SwigPyObject_acquire(PyObject *v) -#else SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = SWIG_POINTER_OWN; @@ -1779,70 +1611,32 @@ SWIGINTERN PyObject* SwigPyObject_own(PyObject *v, PyObject *args) { PyObject *val = 0; -#if (PY_VERSION_HEX < 0x02020000) - if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) -#elif (PY_VERSION_HEX < 0x02050000) - if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) -#else - if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) -#endif - { - return NULL; + if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) { + return NULL; + } else { + SwigPyObject *sobj = (SwigPyObject *)v; + PyObject *obj = PyBool_FromLong(sobj->own); + if (val) { + if (PyObject_IsTrue(val)) { + SwigPyObject_acquire(v,args); + } else { + SwigPyObject_disown(v,args); + } } - else - { - SwigPyObject *sobj = (SwigPyObject *)v; - PyObject *obj = PyBool_FromLong(sobj->own); - if (val) { -#ifdef METH_NOARGS - if (PyObject_IsTrue(val)) { - SwigPyObject_acquire(v); - } else { - SwigPyObject_disown(v); - } -#else - if (PyObject_IsTrue(val)) { - SwigPyObject_acquire(v,args); - } else { - SwigPyObject_disown(v,args); - } -#endif - } - return obj; - } + return obj; + } } -#ifdef METH_O -static PyMethodDef -swigobject_methods[] = { - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"}, - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, - {0, 0, 0, 0} -}; -#else static PyMethodDef swigobject_methods[] = { - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"acquires ownership of the pointer"}, - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, + {"disown", SwigPyObject_disown, METH_NOARGS, "releases ownership of the pointer"}, + {"acquire", SwigPyObject_acquire, METH_NOARGS, "acquires ownership of the pointer"}, + {"own", SwigPyObject_own, METH_VARARGS, "returns/sets ownership of the pointer"}, + {"append", SwigPyObject_append, METH_O, "appends another 'this' object"}, + {"next", SwigPyObject_next, METH_NOARGS, "returns the next 'this' object"}, + {"__repr__",SwigPyObject_repr2, METH_NOARGS, "returns object representation"}, {0, 0, 0, 0} }; -#endif - -#if PY_VERSION_HEX < 0x02020000 -SWIGINTERN PyObject * -SwigPyObject_getattr(SwigPyObject *sobj,char *name) -{ - return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); -} -#endif SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { @@ -1887,12 +1681,8 @@ SwigPyObject_TypeOnce(void) { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */ #elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ -#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ +#else 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ -#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ -#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ - 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ #endif }; @@ -1900,26 +1690,21 @@ SwigPyObject_TypeOnce(void) { static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { - /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif - (char *)"SwigPyObject", /* tp_name */ + "SwigPyObject", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ - 0, /* tp_print */ -#if PY_VERSION_HEX < 0x02020000 - (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ -#else + 0, /* tp_print */ (getattrfunc)0, /* tp_getattr */ -#endif (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ + 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ #else (cmpfunc)SwigPyObject_compare, /* tp_compare */ #endif @@ -1929,7 +1714,7 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ - 0, /* tp_str */ + 0, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ @@ -1939,7 +1724,6 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_clear */ (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ swigobject_methods, /* tp_methods */ @@ -1960,34 +1744,29 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ -#endif -#if PY_VERSION_HEX >= 0x02060000 0, /* tp_version_tag */ -#endif #if PY_VERSION_HEX >= 0x03040000 0, /* tp_finalize */ #endif +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ 0, /* tp_maxalloc */ -#if PY_VERSION_HEX >= 0x02050000 0, /* tp_prev */ -#endif 0 /* tp_next */ #endif }; swigpyobject_type = tmp; type_init = 1; -#if PY_VERSION_HEX < 0x02020000 - swigpyobject_type.ob_type = &PyType_Type; -#else if (PyType_Ready(&swigpyobject_type) < 0) return NULL; -#endif } return &swigpyobject_type; } @@ -2016,20 +1795,6 @@ typedef struct { size_t size; } SwigPyPacked; -SWIGRUNTIME int -SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) -{ - char result[SWIG_BUFFER_SIZE]; - fputs("pack, v->size, 0, sizeof(result))) { - fputs("at ", fp); - fputs(result, fp); - } - fputs(v->ty->name,fp); - fputs(">", fp); - return 0; -} - SWIGRUNTIME PyObject * SwigPyPacked_repr(SwigPyPacked *v) { @@ -2058,7 +1823,7 @@ SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) size_t i = v->size; size_t j = w->size; int s = (i < j) ? -1 : ((i > j) ? 1 : 0); - return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); + return s ? s : strncmp((const char *)v->pack, (const char *)w->pack, 2*v->size); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); @@ -2092,18 +1857,17 @@ SwigPyPacked_TypeOnce(void) { static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { - /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX>=0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif - (char *)"SwigPyPacked", /* tp_name */ + "SwigPyPacked", /* tp_name */ sizeof(SwigPyPacked), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ - (printfunc)SwigPyPacked_print, /* tp_print */ + 0, /* tp_print */ (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX>=0x03000000 @@ -2127,7 +1891,6 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ @@ -2148,34 +1911,29 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ -#endif -#if PY_VERSION_HEX >= 0x02060000 0, /* tp_version_tag */ -#endif #if PY_VERSION_HEX >= 0x03040000 0, /* tp_finalize */ #endif +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ 0, /* tp_maxalloc */ -#if PY_VERSION_HEX >= 0x02050000 0, /* tp_prev */ -#endif 0 /* tp_next */ #endif }; swigpypacked_type = tmp; type_init = 1; -#if PY_VERSION_HEX < 0x02020000 - swigpypacked_type.ob_type = &PyType_Type; -#else if (PyType_Ready(&swigpypacked_type) < 0) return NULL; -#endif } return &swigpypacked_type; } @@ -2216,20 +1974,14 @@ SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) * pointers/data manipulation * ----------------------------------------------------------------------------- */ -SWIGRUNTIMEINLINE PyObject * -_SWIG_This(void) -{ - return SWIG_Python_str_FromChar("this"); -} - -static PyObject *swig_this = NULL; +static PyObject *Swig_This_global = NULL; SWIGRUNTIME PyObject * SWIG_This(void) { - if (swig_this == NULL) - swig_this = _SWIG_This(); - return swig_this; + if (Swig_This_global == NULL) + Swig_This_global = SWIG_Python_str_FromChar("this"); + return Swig_This_global; } /* #define SWIG_PYTHON_SLOW_GETSET_THIS */ @@ -2261,7 +2013,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) obj = 0; -#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) +#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) if (PyInstance_Check(pyobj)) { obj = _PyInstance_Lookup(pyobj, SWIG_This()); } else { @@ -2331,7 +2083,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int if (obj == Py_None && !implicit_conv) { if (ptr) *ptr = 0; - return SWIG_OK; + return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK; } res = SWIG_ERROR; @@ -2411,13 +2163,13 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - } - if (!SWIG_IsOK(res) && obj == Py_None) { - if (ptr) - *ptr = 0; - if (PyErr_Occurred()) - PyErr_Clear(); - res = SWIG_OK; + if (!SWIG_IsOK(res) && obj == Py_None) { + if (ptr) + *ptr = 0; + if (PyErr_Occurred()) + PyErr_Clear(); + res = SWIG_OK; + } } } return res; @@ -2431,31 +2183,28 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { return SWIG_ConvertPtr(obj, ptr, ty, 0); } else { void *vptr = 0; - + swig_cast_info *tc; + /* here we get the method pointer for callbacks */ const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; - if (!desc) + if (!desc) return SWIG_ERROR; - if (ty) { - swig_cast_info *tc = SWIG_TypeCheck(desc,ty); - if (tc) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,vptr,&newmemory); - assert(!newmemory); /* newmemory handling not yet implemented */ - } else { - return SWIG_ERROR; - } + tc = SWIG_TypeCheck(desc,ty); + if (tc) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ } else { - *ptr = vptr; + return SWIG_ERROR; } return SWIG_OK; } } -/* Convert a packed value value */ +/* Convert a packed pointer value */ SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { @@ -2483,7 +2232,6 @@ SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *t SWIGRUNTIME PyObject* SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) { -#if (PY_VERSION_HEX >= 0x02020000) PyObject *inst = 0; PyObject *newraw = data->newraw; if (newraw) { @@ -2500,16 +2248,30 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) } } #else - PyObject *key = SWIG_This(); - PyObject_SetAttr(inst, key, swig_this); + if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { + Py_DECREF(inst); + inst = 0; + } #endif } } else { #if PY_VERSION_HEX >= 0x03000000 - inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); - if (inst) { - PyObject_SetAttr(inst, SWIG_This(), swig_this); - Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; + PyObject *empty_args = PyTuple_New(0); + if (empty_args) { + PyObject *empty_kwargs = PyDict_New(); + if (empty_kwargs) { + inst = ((PyTypeObject *)data->newargs)->tp_new((PyTypeObject *)data->newargs, empty_args, empty_kwargs); + Py_DECREF(empty_kwargs); + if (inst) { + if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { + Py_DECREF(inst); + inst = 0; + } else { + Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; + } + } + } + Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); @@ -2521,59 +2283,23 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) #endif } return inst; -#else -#if (PY_VERSION_HEX >= 0x02010000) - PyObject *inst = 0; - PyObject *dict = PyDict_New(); - if (dict) { - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); - } - return (PyObject *) inst; -#else - PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); - if (inst == NULL) { - return NULL; - } - inst->in_class = (PyClassObject *)data->newargs; - Py_INCREF(inst->in_class); - inst->in_dict = PyDict_New(); - if (inst->in_dict == NULL) { - Py_DECREF(inst); - return NULL; - } -#ifdef Py_TPFLAGS_HAVE_WEAKREFS - inst->in_weakreflist = NULL; -#endif -#ifdef Py_TPFLAGS_GC - PyObject_GC_Init(inst); -#endif - PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); - return (PyObject *) inst; -#endif -#endif } -SWIGRUNTIME void +SWIGRUNTIME int SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) { - PyObject *dict; -#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) - PyObject **dictptr = _PyObject_GetDictPtr(inst); - if (dictptr != NULL) { - dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - } - PyDict_SetItem(dict, SWIG_This(), swig_this); - return; - } +#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + } + return PyDict_SetItem(dict, SWIG_This(), swig_this); + } #endif - dict = PyObject_GetAttrString(inst, (char*)"__dict__"); - PyDict_SetItem(dict, SWIG_This(), swig_this); - Py_DECREF(dict); + return PyObject_SetAttr(inst, SWIG_This(), swig_this); } @@ -2587,7 +2313,8 @@ SWIG_Python_InitShadowInstance(PyObject *args) { if (sthis) { SwigPyObject_append((PyObject*) sthis, obj[1]); } else { - SWIG_Python_SetSwigThis(obj[0], obj[1]); + if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) + return NULL; } return SWIG_Py_Void(); } @@ -2670,12 +2397,7 @@ SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { #ifdef SWIG_LINK_RUNTIME type_pointer = SWIG_ReturnGlobalTypeList((void *)0); #else -# ifdef SWIGPY_USE_CAPSULE type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); -# else - type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, - (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); -# endif if (PyErr_Occurred()) { PyErr_Clear(); type_pointer = (void *)0; @@ -2685,48 +2407,10 @@ SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { return (swig_module_info *) type_pointer; } -#if PY_MAJOR_VERSION < 2 -/* PyModule_AddObject function was introduced in Python 2.0. The following function - is copied out of Python/modsupport.c in python version 2.3.4 */ -SWIGINTERN int -PyModule_AddObject(PyObject *m, char *name, PyObject *o) -{ - PyObject *dict; - if (!PyModule_Check(m)) { - PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg"); - return SWIG_ERROR; - } - if (!o) { - PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value"); - return SWIG_ERROR; - } - - dict = PyModule_GetDict(m); - if (dict == NULL) { - /* Internal error -- modules must have a dict! */ - PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", - PyModule_GetName(m)); - return SWIG_ERROR; - } - if (PyDict_SetItemString(dict, name, o)) - return SWIG_ERROR; - Py_DECREF(o); - return SWIG_OK; -} -#endif - SWIGRUNTIME void -#ifdef SWIGPY_USE_CAPSULE SWIG_Python_DestroyModule(PyObject *obj) -#else -SWIG_Python_DestroyModule(void *vptr) -#endif { -#ifdef SWIGPY_USE_CAPSULE swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); -#else - swig_module_info *swig_module = (swig_module_info *) vptr; -#endif swig_type_info **types = swig_module->types; size_t i; for (i =0; i < swig_module->size; ++i) { @@ -2737,33 +2421,24 @@ SWIG_Python_DestroyModule(void *vptr) } } Py_DECREF(SWIG_This()); - swig_this = NULL; + Swig_This_global = NULL; } SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module) { #if PY_VERSION_HEX >= 0x03000000 /* Add a dummy module object into sys.modules */ - PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); + PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION); #else static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ - PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); + PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); #endif -#ifdef SWIGPY_USE_CAPSULE PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); if (pointer && module) { - PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); - } else { - Py_XDECREF(pointer); - } -#else - PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); - if (pointer && module) { - PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); + PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); } else { Py_XDECREF(pointer); } -#endif } /* The python cached type query */ @@ -2781,20 +2456,12 @@ SWIG_Python_TypeQuery(const char *type) PyObject *obj = PyDict_GetItem(cache, key); swig_type_info *descriptor; if (obj) { -#ifdef SWIGPY_USE_CAPSULE descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); -#else - descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); -#endif } else { swig_module_info *swig_module = SWIG_GetModule(0); descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); if (descriptor) { -#ifdef SWIGPY_USE_CAPSULE obj = PyCapsule_New((void*) descriptor, NULL, NULL); -#else - obj = PyCObject_FromVoidPtr(descriptor, NULL); -#endif PyDict_SetItem(cache, key, obj); Py_DECREF(obj); } @@ -2819,14 +2486,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *traceback = 0; PyErr_Fetch(&type, &value, &traceback); if (value) { - char *tmp; PyObject *old_str = PyObject_Str(value); + const char *tmp = SWIG_Python_str_AsChar(old_str); + const char *errmesg = tmp ? tmp : "Invalid error message"; Py_XINCREF(type); PyErr_Clear(); if (infront) { - PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); + PyErr_Format(type, "%s %s", mesg, errmesg); } else { - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); + PyErr_Format(type, "%s %s", errmesg, mesg); } SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); @@ -2952,6 +2620,8 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); + if (!encoded_name) + return -1; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); Py_DECREF(encoded_name); @@ -2978,6 +2648,21 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { +#ifdef __cplusplus +extern "C" { +#endif + +/* Method creation and docstring support functions */ + +SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name); +SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func); +SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func); + +#ifdef __cplusplus +} +#endif + + /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_CBF_NODETYPE swig_types[0] @@ -3007,11 +2692,10 @@ static swig_module_info swig_module = {swig_types, 20, 0, 0, 0, 0}; /* -------- TYPES TABLE (END) -------- */ -#if (PY_VERSION_HEX <= 0x02000000) -# if !defined(SWIG_PYTHON_CLASSIC) -# error "This python version requires swig to be run with the '-classic' option" -# endif +#ifdef SWIG_TypeQuery +# undef SWIG_TypeQuery #endif +#define SWIG_TypeQuery SWIG_Python_TypeQuery /*----------------------------------------------- @(target):= _pycbf.so @@ -3025,7 +2709,7 @@ static swig_module_info swig_module = {swig_types, 20, 0, 0, 0, 0}; #endif #define SWIG_name "_pycbf" -#define SWIGVERSION 0x030010 +#define SWIGVERSION 0x040002 #define SWIG_VERSION SWIGVERSION @@ -3045,7 +2729,7 @@ SWIG_AsVal_double (PyObject *obj, double *val) return SWIG_OK; #if PY_VERSION_HEX < 0x03000000 } else if (PyInt_Check(obj)) { - if (val) *val = PyInt_AsLong(obj); + if (val) *val = (double) PyInt_AsLong(obj); return SWIG_OK; #endif } else if (PyLong_Check(obj)) { @@ -3208,6 +2892,8 @@ SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val) const double mant_max = 1LL << DBL_MANT_DIG; double d; res = SWIG_AsVal_double (obj,&d); + if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max)) + return SWIG_OverflowError; if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { if (val) *val = (unsigned long long)(d); return SWIG_AddCast(res); @@ -3241,7 +2927,7 @@ SWIG_AsVal_size_t (PyObject * obj, size_t *val) } SWIGINTERN doubleArray *new_doubleArray(size_t nelements){ - return (double *)malloc((nelements)*sizeof(double)); + return (double *)calloc(nelements, sizeof(double)); } SWIGINTERN void delete_doubleArray(doubleArray *self){ free((char*)self); @@ -3265,7 +2951,7 @@ SWIGINTERN doubleArray *doubleArray_frompointer(double *t){ typedef int intArray; SWIGINTERN intArray *new_intArray(size_t nelements){ - return (int *)malloc((nelements)*sizeof(int)); + return (int *)calloc(nelements, sizeof(int)); } SWIGINTERN void delete_intArray(intArray *self){ free((char*)self); @@ -3352,7 +3038,7 @@ SWIGINTERN intArray *intArray_frompointer(int *t){ typedef short shortArray; SWIGINTERN shortArray *new_shortArray(size_t nelements){ - return (short *)malloc((nelements)*sizeof(short)); + return (short *)calloc(nelements, sizeof(short)); } SWIGINTERN void delete_shortArray(shortArray *self){ free((char*)self); @@ -3399,7 +3085,7 @@ SWIGINTERN shortArray *shortArray_frompointer(short *t){ typedef long longArray; SWIGINTERN longArray *new_longArray(size_t nelements){ - return (long *)malloc((nelements)*sizeof(long)); + return (long *)calloc(nelements, sizeof(long)); } SWIGINTERN void delete_longArray(longArray *self){ free((char*)self); @@ -3499,51 +3185,52 @@ static int convert_darray(PyObject *input, double *ptr, int size) { static int error_status = 0; -static char error_message[1024] ; // hope that is long enough +static char error_message1[17] ; +static char error_message[1042] ; // hope that is long enough /* prototype */ void get_error_message(void); void get_error_message(){ - sprintf(error_message,"%s","CBFlib Error(s):"); + sprintf(error_message1,"%s","CBFlib Error(s):"); if (error_status & CBF_FORMAT ) - sprintf(error_message,"%s %s",error_message,"CBF_FORMAT "); + sprintf(error_message,"%s %s",error_message1,"CBF_FORMAT "); if (error_status & CBF_ALLOC ) - sprintf(error_message,"%s %s",error_message,"CBF_ALLOC "); + sprintf(error_message,"%s %s",error_message1,"CBF_ALLOC "); if (error_status & CBF_ARGUMENT ) - sprintf(error_message,"%s %s",error_message,"CBF_ARGUMENT "); + sprintf(error_message,"%s %s",error_message1,"CBF_ARGUMENT "); if (error_status & CBF_ASCII ) - sprintf(error_message,"%s %s",error_message,"CBF_ASCII "); + sprintf(error_message,"%s %s",error_message1,"CBF_ASCII "); if (error_status & CBF_BINARY ) - sprintf(error_message,"%s %s",error_message,"CBF_BINARY "); + sprintf(error_message,"%s %s",error_message1,"CBF_BINARY "); if (error_status & CBF_BITCOUNT ) - sprintf(error_message,"%s %s",error_message,"CBF_BITCOUNT "); + sprintf(error_message,"%s %s",error_message1,"CBF_BITCOUNT "); if (error_status & CBF_ENDOFDATA ) - sprintf(error_message,"%s %s",error_message,"CBF_ENDOFDATA "); + sprintf(error_message,"%s %s",error_message1,"CBF_ENDOFDATA "); if (error_status & CBF_FILECLOSE ) - sprintf(error_message,"%s %s",error_message,"CBF_FILECLOSE "); + sprintf(error_message,"%s %s",error_message1,"CBF_FILECLOSE "); if (error_status & CBF_FILEOPEN ) - sprintf(error_message,"%s %s",error_message,"CBF_FILEOPEN "); + sprintf(error_message,"%s %s",error_message1,"CBF_FILEOPEN "); if (error_status & CBF_FILEREAD ) - sprintf(error_message,"%s %s",error_message,"CBF_FILEREAD "); + sprintf(error_message,"%s %s",error_message1,"CBF_FILEREAD "); if (error_status & CBF_FILESEEK ) - sprintf(error_message,"%s %s",error_message,"CBF_FILESEEK "); + sprintf(error_message,"%s %s",error_message1,"CBF_FILESEEK "); if (error_status & CBF_FILETELL ) - sprintf(error_message,"%s %s",error_message,"CBF_FILETELL "); + sprintf(error_message,"%s %s",error_message1,"CBF_FILETELL "); if (error_status & CBF_FILEWRITE ) - sprintf(error_message,"%s %s",error_message,"CBF_FILEWRITE "); + sprintf(error_message,"%s %s",error_message1,"CBF_FILEWRITE "); if (error_status & CBF_IDENTICAL ) - sprintf(error_message,"%s %s",error_message,"CBF_IDENTICAL "); + sprintf(error_message,"%s %s",error_message1,"CBF_IDENTICAL "); if (error_status & CBF_NOTFOUND ) - sprintf(error_message,"%s %s",error_message,"CBF_NOTFOUND "); + sprintf(error_message,"%s %s",error_message1,"CBF_NOTFOUND "); if (error_status & CBF_OVERFLOW ) - sprintf(error_message,"%s %s",error_message,"CBF_OVERFLOW "); + sprintf(error_message,"%s %s",error_message1,"CBF_OVERFLOW "); if (error_status & CBF_UNDEFINED ) - sprintf(error_message,"%s %s",error_message,"CBF_UNDEFINED "); + sprintf(error_message,"%s %s",error_message1,"CBF_UNDEFINED "); if (error_status & CBF_NOTIMPLEMENTED) - sprintf(error_message,"%s %s",error_message,"CBF_NOTIMPLEMENTED"); + sprintf(error_message,"%s %s",error_message1,"CBF_NOTIMPLEMENTED"); if (error_status & CBF_NOCOMPRESSION) - sprintf(error_message,"%s %s",error_message,"CBF_NOCOMPRESSION"); + sprintf(error_message,"%s %s",error_message1,"CBF_NOCOMPRESSION"); } @@ -3586,11 +3273,7 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size) #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) return PyBytes_FromStringAndSize(carray, (Py_ssize_t)(size)); #else -#if PY_VERSION_HEX >= 0x03010000 return PyUnicode_DecodeUTF8(carray, (Py_ssize_t)(size), "surrogateescape"); -#else - return PyUnicode_FromStringAndSize(carray, (Py_ssize_t)(size)); -#endif #endif #else return PyString_FromStringAndSize(carray, (Py_ssize_t)(size)); @@ -3602,8 +3285,14 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size) } - void compute_cell_volume(double cell[6], double *volume) { - {(error_status = cbf_compute_cell_volume(cell,volume));}; + void get_local_real_byte_order(char **bo, int *bolen) { + char * byteorder; + char * bot; + error_status = cbf_get_local_real_byte_order(&byteorder); + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {{(error_status = CBF_ALLOC);}} + strncpy(bot,byteorder,*bolen); + *bo = bot; } @@ -3618,20 +3307,8 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size) } -void airy_disk(double x, double y, double cenx, double ceny, -double volume, double fwhm, double *value) { -{(error_status = cbf_airy_disk(x,y,cenx,ceny,volume,fwhm,value));}; -} - - - void get_local_real_byte_order(char **bo, int *bolen) { - char * byteorder; - char * bot; - error_status = cbf_get_local_real_byte_order(&byteorder); - *bolen = strlen(byteorder); - if (!(bot = (char *)malloc(*bolen))) {{(error_status = CBF_ALLOC);}} - strncpy(bot,byteorder,*bolen); - *bo = bot; + void compute_cell_volume(double cell[6], double *volume) { + {(error_status = cbf_compute_cell_volume(cell,volume));}; } @@ -3648,6 +3325,12 @@ double volume, double fwhm, double *value) { } +void airy_disk(double x, double y, double cenx, double ceny, +double volume, double fwhm, double *value) { +{(error_status = cbf_airy_disk(x,y,cenx,ceny,volume,fwhm,value));}; +} + + void airy_disk_volume(double xlo, double ylo, double xhi, double yhi, double cenx, double ceny, double volumein, double fwhm, double * volumeout) { {(error_status = cbf_airy_disk_volume(xlo,ylo,xhi,yhi,cenx,ceny,volumein,fwhm,volumeout));}; @@ -3695,6 +3378,13 @@ SWIGINTERN cbf_positioner_struct *new_cbf_positioner_struct(void){ // Construct SWIGINTERN void delete_cbf_positioner_struct(cbf_positioner_struct *self){ // Destructor {(error_status = cbf_free_positioner(self));}; } +SWIGINTERN void cbf_positioner_struct_get_rotation_axis(cbf_positioner_struct *self,double *vector1,double *vector2,double *vector3){ + unsigned int reserved; + reserved = 0; + {(error_status = cbf_get_rotation_axis (self, reserved, + vector1, vector2, vector3));} +; + } SWIGINTERN void cbf_positioner_struct_get_rotation_range(cbf_positioner_struct *self,double *start,double *increment){ unsigned int reserved; reserved = 0; @@ -3707,13 +3397,6 @@ SWIGINTERN void cbf_positioner_struct_rotate_vector(cbf_positioner_struct *self, initial2, initial3, final1, final2, final3));} ; } -SWIGINTERN void cbf_positioner_struct_get_goniometer_poise(cbf_positioner_struct *self,double ratio,double *vector1,double *vector2,double *vector3,double *offset1,double *offset2,double *offset3,double *angle){ - {(error_status = cbf_get_goniometer_poise(self, ratio, - vector1, vector2, vector3, - offset1, offset2, offset3,angle));} - -; - } SWIGINTERN void cbf_positioner_struct_get_reciprocal(cbf_positioner_struct *self,double ratio,double wavelength,double real1,double real2,double real3,double *reciprocal1,double *reciprocal2,double *reciprocal3){ unsigned int reserved; reserved = 0; @@ -3723,13 +3406,13 @@ SWIGINTERN void cbf_positioner_struct_get_reciprocal(cbf_positioner_struct *self ; } -SWIGINTERN void cbf_positioner_struct_get_rotation_axis(cbf_positioner_struct *self,double *vector1,double *vector2,double *vector3){ - unsigned int reserved; - reserved = 0; - {(error_status = cbf_get_rotation_axis (self, reserved, - vector1, vector2, vector3));} +SWIGINTERN void cbf_positioner_struct_get_goniometer_poise(cbf_positioner_struct *self,double ratio,double *vector1,double *vector2,double *vector3,double *offset1,double *offset2,double *offset3,double *angle){ + {(error_status = cbf_get_goniometer_poise(self, ratio, + vector1, vector2, vector3, + offset1, offset2, offset3,angle));} + ; - } + } SWIGINTERN cbf_detector_struct *new_cbf_detector_struct(void){ // Constructor // DO NOT CONSTRUCT WITHOUT A CBFHANDLE {(error_status = CBF_ARGUMENT);}; @@ -3738,101 +3421,74 @@ SWIGINTERN cbf_detector_struct *new_cbf_detector_struct(void){ // Constructor SWIGINTERN void delete_cbf_detector_struct(cbf_detector_struct *self){ // Destructor {(error_status = cbf_free_detector(self));}; } -SWIGINTERN void cbf_detector_struct_set_beam_center_fs(cbf_detector_struct *self,double *indexfast,double *indexslow,double *centerfast,double *centerslow){ - {(error_status = cbf_set_beam_center_fs(self, indexfast, indexslow, - centerfast, centerslow));} +SWIGINTERN void cbf_detector_struct_get_beam_center(cbf_detector_struct *self,double *index1,double *index2,double *center1,double *center2){ + {(error_status = cbf_get_beam_center(self, index1, index2, + center1, center2));} ; } -SWIGINTERN void cbf_detector_struct_set_reference_beam_center_fs(cbf_detector_struct *self,double *indexfast,double *indexslow,double *centerfast,double *centerslow){ - {(error_status = cbf_set_reference_beam_center_fs(self, indexfast, indexslow, +SWIGINTERN void cbf_detector_struct_get_beam_center_fs(cbf_detector_struct *self,double *indexfast,double *indexslow,double *centerfast,double *centerslow){ + {(error_status = cbf_get_beam_center_fs(self, indexfast, indexslow, centerfast, centerslow));} ; } -SWIGINTERN void cbf_detector_struct_get_beam_center(cbf_detector_struct *self,double *index1,double *index2,double *center1,double *center2){ - {(error_status = cbf_get_beam_center(self, index1, index2, - center1, center2));} +SWIGINTERN void cbf_detector_struct_get_beam_center_sf(cbf_detector_struct *self,double *indexslow,double *indexfast,double *centerslow,double *centerfast){ + {(error_status = cbf_get_beam_center_sf(self, indexslow, indexfast, + centerslow, centerfast));} ; } -SWIGINTERN void cbf_detector_struct_get_pixel_coordinates_fs(cbf_detector_struct *self,double indexfast,double indexslow,double *coordinate1,double *coordinate2,double *coordinate3){ - {(error_status = cbf_get_pixel_coordinates_fs(self, indexfast, indexslow, coordinate1, coordinate2, coordinate3));}; - } - -SWIGINTERN int -SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) -{ - unsigned long v; - int res = SWIG_AsVal_unsigned_SS_long (obj, &v); - if (SWIG_IsOK(res)) { - if ((v > UINT_MAX)) { - return SWIG_OverflowError; - } else { - if (val) *val = (unsigned int)(v); - } - } - return res; -} - -SWIGINTERN void cbf_detector_struct_get_inferred_pixel_size(cbf_detector_struct *self,unsigned int axis_number,double *psize){ - {(error_status = cbf_get_inferred_pixel_size(self, axis_number, psize));}; - } -SWIGINTERN void cbf_detector_struct_get_pixel_area(cbf_detector_struct *self,double index1,double index2,double *area,double *projected_area){ - {(error_status = cbf_get_pixel_area (self, - index1, index2, area,projected_area));} -; - } -SWIGINTERN void cbf_detector_struct_get_pixel_normal_fs(cbf_detector_struct *self,double indexfast,double indexslow,double *normal1,double *normal2,double *normal3){ - {(error_status = cbf_get_pixel_normal_fs(self, - indexfast,indexslow,normal1,normal2,normal3));} +SWIGINTERN void cbf_detector_struct_set_beam_center(cbf_detector_struct *self,double *indexslow,double *indexfast,double *centerslow,double *centerfast){ + {(error_status = cbf_set_beam_center(self, indexslow, indexfast, + centerslow, centerfast));} ; - } -SWIGINTERN char const *cbf_detector_struct_get_detector_surface_axes(cbf_detector_struct *self,int index){ - const char * axis_id1; - const char * axis_id2; - {(error_status = cbf_get_detector_surface_axes(self, - &axis_id1, &axis_id2));} + } +SWIGINTERN void cbf_detector_struct_set_beam_center_fs(cbf_detector_struct *self,double *indexfast,double *indexslow,double *centerfast,double *centerslow){ + {(error_status = cbf_set_beam_center_fs(self, indexfast, indexslow, + centerfast, centerslow));} ; - if (index == 0) return axis_id1; - if (index == 1) return axis_id2; - return "."; - } - -SWIGINTERNINLINE PyObject * -SWIG_FromCharPtr(const char *cptr) -{ - return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); -} - -SWIGINTERN void cbf_detector_struct_get_detector_axes(cbf_detector_struct *self,double *slowaxis1,double *slowaxis2,double *slowaxis3,double *fastaxis1,double *fastaxis2,double *fastaxis3){ - {(error_status = cbf_get_detector_axes(self, - slowaxis1,slowaxis2,slowaxis3, - fastaxis1,fastaxis2,fastaxis3));} - + } +SWIGINTERN void cbf_detector_struct_set_beam_center_sf(cbf_detector_struct *self,double *indexslow,double *indexfast,double *centerslow,double *centerfast){ + {(error_status = cbf_set_beam_center_sf(self, indexslow, indexfast, + centerslow, centerfast));} ; - } + } SWIGINTERN void cbf_detector_struct_set_reference_beam_center(cbf_detector_struct *self,double *indexslow,double *indexfast,double *centerslow,double *centerfast){ {(error_status = cbf_set_reference_beam_center(self, indexslow, indexfast, centerslow, centerfast));} ; } -SWIGINTERN void cbf_detector_struct_get_detector_axis_slow(cbf_detector_struct *self,double *slowaxis1,double *slowaxis2,double *slowaxis3){ - {(error_status = cbf_get_detector_axis_slow(self, - slowaxis1,slowaxis2,slowaxis3));} +SWIGINTERN void cbf_detector_struct_set_reference_beam_center_fs(cbf_detector_struct *self,double *indexfast,double *indexslow,double *centerfast,double *centerslow){ + {(error_status = cbf_set_reference_beam_center_fs(self, indexfast, indexslow, + centerfast, centerslow));} ; - } + } +SWIGINTERN void cbf_detector_struct_set_reference_beam_center_sf(cbf_detector_struct *self,double *indexslow,double *indexfast,double *centerslow,double *centerfast){ + {(error_status = cbf_set_reference_beam_center_sf(self, indexslow, indexfast, + centerslow, centerfast));} +; + } SWIGINTERN void cbf_detector_struct_get_detector_distance(cbf_detector_struct *self,double *distance){ {(error_status = cbf_get_detector_distance(self,distance));}; } -SWIGINTERN void cbf_detector_struct_get_inferred_pixel_size_fs(cbf_detector_struct *self,unsigned int axis_number,double *psize){ - {(error_status = cbf_get_inferred_pixel_size_fs(self, axis_number, psize));}; - } SWIGINTERN void cbf_detector_struct_get_detector_normal(cbf_detector_struct *self,double *normal1,double *normal2,double *normal3){ {(error_status = cbf_get_detector_normal(self, normal1, normal2, normal3));} ; } +SWIGINTERN void cbf_detector_struct_get_detector_axis_slow(cbf_detector_struct *self,double *slowaxis1,double *slowaxis2,double *slowaxis3){ + {(error_status = cbf_get_detector_axis_slow(self, + slowaxis1,slowaxis2,slowaxis3));} +; + } SWIGINTERN void cbf_detector_struct_get_detector_axis_fast(cbf_detector_struct *self,double *fastaxis1,double *fastaxis2,double *fastaxis3){ {(error_status = cbf_get_detector_axis_fast(self, fastaxis1,fastaxis2,fastaxis3));} +; + } +SWIGINTERN void cbf_detector_struct_get_detector_axes(cbf_detector_struct *self,double *slowaxis1,double *slowaxis2,double *slowaxis3,double *fastaxis1,double *fastaxis2,double *fastaxis3){ + {(error_status = cbf_get_detector_axes(self, + slowaxis1,slowaxis2,slowaxis3, + fastaxis1,fastaxis2,fastaxis3));} + ; } SWIGINTERN void cbf_detector_struct_get_detector_axes_fs(cbf_detector_struct *self,double *fastaxis1,double *fastaxis2,double *fastaxis3,double *slowaxis1,double *slowaxis2,double *slowaxis3){ @@ -3849,56 +3505,83 @@ SWIGINTERN void cbf_detector_struct_get_detector_axes_sf(cbf_detector_struct *se ; } +SWIGINTERN char const *cbf_detector_struct_get_detector_surface_axes(cbf_detector_struct *self,int index){ + const char * axis_id1; + const char * axis_id2; + {(error_status = cbf_get_detector_surface_axes(self, + &axis_id1, &axis_id2));} +; + if (index == 0) return axis_id1; + if (index == 1) return axis_id2; + return "."; + } + +SWIGINTERNINLINE PyObject * +SWIG_FromCharPtr(const char *cptr) +{ + return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); +} + +SWIGINTERN void cbf_detector_struct_get_pixel_coordinates(cbf_detector_struct *self,double index1,double index2,double *coordinate1,double *coordinate2,double *coordinate3){ + {(error_status = cbf_get_pixel_coordinates(self, index1, index2, + coordinate1, coordinate2, coordinate3));} +; + } +SWIGINTERN void cbf_detector_struct_get_pixel_coordinates_fs(cbf_detector_struct *self,double indexfast,double indexslow,double *coordinate1,double *coordinate2,double *coordinate3){ + {(error_status = cbf_get_pixel_coordinates_fs(self, indexfast, indexslow, coordinate1, coordinate2, coordinate3));}; + } SWIGINTERN void cbf_detector_struct_get_pixel_coordinates_sf(cbf_detector_struct *self,double indexslow,double indexfast,double *coordinate1,double *coordinate2,double *coordinate3){ {(error_status = cbf_get_pixel_coordinates_sf(self, indexslow, indexfast, coordinate1, coordinate2, coordinate3));}; } -SWIGINTERN void cbf_detector_struct_set_beam_center(cbf_detector_struct *self,double *indexslow,double *indexfast,double *centerslow,double *centerfast){ - {(error_status = cbf_set_beam_center(self, indexslow, indexfast, - centerslow, centerfast));} +SWIGINTERN void cbf_detector_struct_get_pixel_normal(cbf_detector_struct *self,double index1,double index2,double *normal1,double *normal2,double *normal3){ + {(error_status = cbf_get_pixel_normal(self, + index1,index2,normal1,normal2,normal3));} ; - } + } +SWIGINTERN void cbf_detector_struct_get_pixel_normal_fs(cbf_detector_struct *self,double indexfast,double indexslow,double *normal1,double *normal2,double *normal3){ + {(error_status = cbf_get_pixel_normal_fs(self, + indexfast,indexslow,normal1,normal2,normal3));} +; + } +SWIGINTERN void cbf_detector_struct_get_pixel_area(cbf_detector_struct *self,double index1,double index2,double *area,double *projected_area){ + {(error_status = cbf_get_pixel_area (self, + index1, index2, area,projected_area));} +; + } SWIGINTERN void cbf_detector_struct_get_pixel_area_fs(cbf_detector_struct *self,double indexfast,double indexslow,double *area,double *projected_area){ {(error_status = cbf_get_pixel_area_fs (self, indexfast, indexslow, area,projected_area));} ; } -SWIGINTERN void cbf_detector_struct_get_beam_center_fs(cbf_detector_struct *self,double *indexfast,double *indexslow,double *centerfast,double *centerslow){ - {(error_status = cbf_get_beam_center_fs(self, indexfast, indexslow, - centerfast, centerslow));} -; - } -SWIGINTERN void cbf_detector_struct_get_inferred_pixel_size_sf(cbf_detector_struct *self,unsigned int axis_number,double *psize){ - {(error_status = cbf_get_inferred_pixel_size_sf(self, axis_number, psize));}; - } -SWIGINTERN void cbf_detector_struct_get_pixel_coordinates(cbf_detector_struct *self,double index1,double index2,double *coordinate1,double *coordinate2,double *coordinate3){ - {(error_status = cbf_get_pixel_coordinates(self, index1, index2, - coordinate1, coordinate2, coordinate3));} -; - } -SWIGINTERN void cbf_detector_struct_get_beam_center_sf(cbf_detector_struct *self,double *indexslow,double *indexfast,double *centerslow,double *centerfast){ - {(error_status = cbf_get_beam_center_sf(self, indexslow, indexfast, - centerslow, centerfast));} -; - } SWIGINTERN void cbf_detector_struct_get_pixel_area_sf(cbf_detector_struct *self,double indexslow,double indexfast,double *area,double *projected_area){ {(error_status = cbf_get_pixel_area_sf (self, indexslow, indexfast, area,projected_area));} ; } -SWIGINTERN void cbf_detector_struct_set_reference_beam_center_sf(cbf_detector_struct *self,double *indexslow,double *indexfast,double *centerslow,double *centerfast){ - {(error_status = cbf_set_reference_beam_center_sf(self, indexslow, indexfast, - centerslow, centerfast));} -; - } -SWIGINTERN void cbf_detector_struct_set_beam_center_sf(cbf_detector_struct *self,double *indexslow,double *indexfast,double *centerslow,double *centerfast){ - {(error_status = cbf_set_beam_center_sf(self, indexslow, indexfast, - centerslow, centerfast));} -; - } -SWIGINTERN void cbf_detector_struct_get_pixel_normal(cbf_detector_struct *self,double index1,double index2,double *normal1,double *normal2,double *normal3){ - {(error_status = cbf_get_pixel_normal(self, - index1,index2,normal1,normal2,normal3));} -; + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) +{ + unsigned long v; + int res = SWIG_AsVal_unsigned_SS_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v > UINT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = (unsigned int)(v); + } + } + return res; +} + +SWIGINTERN void cbf_detector_struct_get_inferred_pixel_size(cbf_detector_struct *self,unsigned int axis_number,double *psize){ + {(error_status = cbf_get_inferred_pixel_size(self, axis_number, psize));}; + } +SWIGINTERN void cbf_detector_struct_get_inferred_pixel_size_fs(cbf_detector_struct *self,unsigned int axis_number,double *psize){ + {(error_status = cbf_get_inferred_pixel_size_fs(self, axis_number, psize));}; + } +SWIGINTERN void cbf_detector_struct_get_inferred_pixel_size_sf(cbf_detector_struct *self,unsigned int axis_number,double *psize){ + {(error_status = cbf_get_inferred_pixel_size_sf(self, axis_number, psize));}; } SWIGINTERN cbf_handle_struct *new_cbf_handle_struct(void){ // Constructor cbf_handle handle; @@ -3908,8 +3591,6 @@ SWIGINTERN cbf_handle_struct *new_cbf_handle_struct(void){ // Constructor SWIGINTERN void delete_cbf_handle_struct(cbf_handle_struct *self){ // Destructor {(error_status = cbf_free_handle(self));}; } -SWIGINTERN void cbf_handle_struct_select_datablock(cbf_handle_struct *self,unsigned int arg){ - {(error_status = cbf_select_datablock(self,arg));};} SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) @@ -3925,6 +3606,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) #endif { char *cstr; Py_ssize_t len; + int ret = SWIG_OK; #if PY_VERSION_HEX>=0x03000000 #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) if (!alloc && cptr) { @@ -3935,30 +3617,21 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) return SWIG_RuntimeError; } obj = PyUnicode_AsUTF8String(obj); - if(alloc) *alloc = SWIG_NEWOBJ; + if (!obj) + return SWIG_TypeError; + if (alloc) + *alloc = SWIG_NEWOBJ; #endif - PyBytes_AsStringAndSize(obj, &cstr, &len); + if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1) + return SWIG_TypeError; #else - PyString_AsStringAndSize(obj, &cstr, &len); + if (PyString_AsStringAndSize(obj, &cstr, &len) == -1) + return SWIG_TypeError; #endif if (cptr) { if (alloc) { - /* - In python the user should not be able to modify the inner - string representation. To warranty that, if you define - SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string - buffer is always returned. - - The default behavior is just to return the pointer value, - so, be careful. - */ -#if defined(SWIG_PYTHON_SAFE_CSTRINGS) - if (*alloc != SWIG_OLDOBJ) -#else - if (*alloc == SWIG_NEWOBJ) -#endif - { - *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); + if (*alloc == SWIG_NEWOBJ) { + *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); *alloc = SWIG_NEWOBJ; } else { *cptr = cstr; @@ -3973,6 +3646,8 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) #endif #else *cptr = SWIG_Python_str_AsChar(obj); + if (!*cptr) + ret = SWIG_TypeError; #endif } } @@ -3980,7 +3655,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) Py_XDECREF(obj); #endif - return SWIG_OK; + return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) @@ -3993,10 +3668,12 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) return SWIG_RuntimeError; } obj = PyUnicode_AsUTF8String(obj); + if (!obj) + return SWIG_TypeError; if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { if (cptr) { if (alloc) *alloc = SWIG_NEWOBJ; - *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); + *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); } if (psize) *psize = len + 1; @@ -4026,188 +3703,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) -SWIGINTERN void cbf_handle_struct_force_new_datablock(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_force_new_datablock(self,arg));};} -SWIGINTERN void cbf_handle_struct_get_3d_image_fs_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int elsign,int ndimfast,int ndimmid,int ndimslow){ - void *array; - int reserved = 0; - *slen = 0; /* Initialise in case of problems */ - if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { - {(error_status = cbf_get_3d_image_fs(self, - reserved, (unsigned int)element_number, - (void *)array, (size_t)elsize, elsign, - (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow));} - - -; - }else{ - {(error_status = CBF_ALLOC);}; - } - *slen = elsize*ndimfast*ndimmid*ndimslow; - *s = (char *) array; - } -SWIGINTERN void cbf_handle_struct_reset_datablocks(cbf_handle_struct *self){ - {(error_status = cbf_reset_datablocks(self));};} -SWIGINTERN void cbf_handle_struct_set_tag_category(cbf_handle_struct *self,char const *tagname,char const *categoryname_in){ - {(error_status = cbf_set_tag_category(self,tagname, categoryname_in));}; - } -SWIGINTERN char const *cbf_handle_struct_require_tag_root(cbf_handle_struct *self,char const *tagname){ - const char* result; - {(error_status = cbf_require_tag_root(self,tagname,&result));}; - return result; - } -SWIGINTERN unsigned int cbf_handle_struct_row_number(cbf_handle_struct *self){ - unsigned int result; - {(error_status = cbf_row_number(self,&result));}; - return result;} - -SWIGINTERNINLINE PyObject* - SWIG_From_unsigned_SS_int (unsigned int value) -{ - return PyInt_FromSize_t((size_t) value); -} - -SWIGINTERN void cbf_handle_struct_set_image(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int elsign,int ndimslow,int ndimfast){ - /* safety check on args */ - size_t els; - unsigned int reserved; - void *array; - if(len == elsize*ndimslow*ndimfast){ - array = data; - els = elsize; - reserved = 0; - {(error_status = cbf_set_image (self, reserved, element_number, compression, - (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t)ndimfast));} -; - }else{ - {(error_status = CBF_ARGUMENT);}; - } - } -SWIGINTERN void cbf_handle_struct_set_bin_sizes(cbf_handle_struct *self,int element_number,double slowbinsize_in,double fastbinsize_in){ - {(error_status = cbf_set_bin_sizes(self,element_number,slowbinsize_in,fastbinsize_in));}; - } -SWIGINTERN void cbf_handle_struct_new_row(cbf_handle_struct *self){ - {(error_status = cbf_new_row(self));};} -SWIGINTERN void cbf_handle_struct_rewind_saveframe(cbf_handle_struct *self){ - {(error_status = cbf_rewind_saveframe(self));};} -SWIGINTERN void cbf_handle_struct_get_realarrayparameters(cbf_handle_struct *self,int *compression,int *binary_id,int *elsize,int *elements){ - unsigned int comp; - size_t elsiz, elem; - {(error_status = cbf_get_realarrayparameters(self, - &comp ,binary_id, &elsiz, &elem ));} -; - *compression = comp; /* FIXME - does this convert in C? */ - *elsize = elsiz; - *elements = elem; - } -SWIGINTERN void cbf_handle_struct_get_pixel_size_sf(cbf_handle_struct *self,unsigned int element_number,unsigned int axis_number,double *psize){ - {(error_status = cbf_get_pixel_size_sf(self, - element_number, - axis_number, - psize));} - - -; - } -SWIGINTERN void cbf_handle_struct_force_new_category(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_force_new_category(self,arg));};} -SWIGINTERN void cbf_handle_struct_force_new_saveframe(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_force_new_saveframe(self,arg));};} -SWIGINTERN unsigned int cbf_handle_struct_count_datablocks(cbf_handle_struct *self){ - unsigned int result; - {(error_status = cbf_count_datablocks(self,&result));}; - return result;} -SWIGINTERN void cbf_handle_struct_find_row(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_find_row(self,arg));};} -SWIGINTERN void cbf_handle_struct_select_column(cbf_handle_struct *self,unsigned int arg){ - {(error_status = cbf_select_column(self,arg));};} -SWIGINTERN cbf_detector cbf_handle_struct_construct_detector(cbf_handle_struct *self,unsigned int element_number){ - cbf_detector detector; - {(error_status = cbf_construct_detector(self,&detector,element_number));}; - return detector; - } -SWIGINTERN char const *cbf_handle_struct_get_axis_depends_on(cbf_handle_struct *self,char const *axis_id){ - const char* dep_on; - {(error_status = cbf_get_axis_depends_on(self,axis_id, - &dep_on));} -; - return dep_on; - } -SWIGINTERN void cbf_handle_struct_rewind_column(cbf_handle_struct *self){ - {(error_status = cbf_rewind_column(self));};} -SWIGINTERN cbf_positioner cbf_handle_struct_construct_reference_positioner(cbf_handle_struct *self,char const *axis_id){ - cbf_positioner positioner; - {(error_status = cbf_construct_reference_positioner(self,&positioner,axis_id));}; - return positioner; - } -SWIGINTERN void cbf_handle_struct_require_column_doublevalue(cbf_handle_struct *self,char const *columnname,double *number,double const defaultvalue){ - {(error_status = cbf_require_column_doublevalue(self, - columnname,number,defaultvalue));} -; - } -SWIGINTERN void cbf_handle_struct_get_datestamp(cbf_handle_struct *self,int *year,int *month,int *day,int *hour,int *minute,double *second,int *timezone){ - unsigned int reserved; - reserved = 0; - {(error_status = cbf_get_datestamp(self,reserved, - year,month,day,hour,minute,second,timezone));} -; - } -SWIGINTERN int cbf_handle_struct_get_integervalue(cbf_handle_struct *self){ - int result; - {(error_status = cbf_get_integervalue(self,&result));}; - return result;} -SWIGINTERN char const *cbf_handle_struct_get_crystal_id(cbf_handle_struct *self){ - const char* result; - {(error_status = cbf_get_crystal_id(self, &result));}; - return result;} -SWIGINTERN double cbf_handle_struct_get_doublevalue(cbf_handle_struct *self){ - double result; - {(error_status = cbf_get_doublevalue(self,&result));}; - return result;} -SWIGINTERN void cbf_handle_struct_get_unit_cell(cbf_handle_struct *self,double *a,double *b,double *c,double *alpha,double *beta,double *gamma){ - double cell[6]; - {(error_status = cbf_get_unit_cell(self,cell,NULL));}; - *a = cell[0]; - *b = cell[1]; - *c = cell[2]; - *alpha = cell[3]; - *beta = cell[4]; - *gamma = cell[5]; - } -SWIGINTERN void cbf_handle_struct_get_unit_cell_esd(cbf_handle_struct *self,double *a_esd,double *b_esd,double *c_esd,double *alpha_esd,double *beta_esd,double *gamma_esd){ - double cell_esd[6]; - {(error_status = cbf_get_unit_cell(self,NULL,cell_esd));}; - *a_esd = cell_esd[0]; - *b_esd = cell_esd[1]; - *c_esd = cell_esd[2]; - *alpha_esd = cell_esd[3]; - *beta_esd = cell_esd[4]; - *gamma_esd = cell_esd[5]; - } -SWIGINTERN char const *cbf_handle_struct_get_axis_type(cbf_handle_struct *self,char const *axis_id){ - cbf_axis_type axis_type; - {(error_status = cbf_get_axis_type(self,axis_id, - &axis_type));} -; - if (axis_type == CBF_TRANSLATION_AXIS) return "translation"; - if (axis_type == CBF_ROTATION_AXIS) return "rotation"; - return "general"; - } -SWIGINTERN void cbf_handle_struct_remove_column(cbf_handle_struct *self){ - {(error_status = cbf_remove_column(self));};} -SWIGINTERN CBF_NODETYPE cbf_handle_struct_rewind_blockitem(cbf_handle_struct *self){ - CBF_NODETYPE result; - {(error_status = cbf_rewind_blockitem(self,&result));}; - return result;} -SWIGINTERN char const *cbf_handle_struct_get_value(cbf_handle_struct *self){ - const char* result; - {(error_status = cbf_get_value(self, &result));}; - return result;} -SWIGINTERN unsigned int cbf_handle_struct_count_categories(cbf_handle_struct *self){ - unsigned int result; - {(error_status = cbf_count_categories(self,&result));}; - return result;} -SWIGINTERN void cbf_handle_struct_read_widefile(cbf_handle_struct *self,char *filename,int headers){ +SWIGINTERN void cbf_handle_struct_read_file(cbf_handle_struct *self,char *filename,int headers){ /* CBFlib needs a stream that will remain open hence DO NOT open from python */ FILE *stream; @@ -4215,60 +3711,10 @@ SWIGINTERN void cbf_handle_struct_read_widefile(cbf_handle_struct *self,char *fi {(error_status = CBF_FILEOPEN);}; } else{ - {(error_status = cbf_read_widefile(self, stream, headers));}; + {(error_status = cbf_read_file(self, stream, headers));}; } } -SWIGINTERN void cbf_handle_struct_set_wavelength(cbf_handle_struct *self,double wavelength){ - {(error_status = cbf_set_wavelength(self,wavelength));};} -SWIGINTERN void cbf_handle_struct_get_axis_vector(cbf_handle_struct *self,char const *axis_id,double *vector1,double *vector2,double *vector3){ - {(error_status = cbf_get_axis_vector(self,axis_id, - vector1, vector2,vector3));} -; - } -SWIGINTERN void cbf_handle_struct_set_pixel_size_sf(cbf_handle_struct *self,unsigned int element_number,unsigned int axis_number,double psize){ - {(error_status = cbf_set_pixel_size_sf(self, - element_number, - axis_number, - psize));} - - -; - } -SWIGINTERN char const *cbf_handle_struct_get_diffrn_id(cbf_handle_struct *self){ - const char* result; - {(error_status = cbf_get_diffrn_id(self, &result));}; - return result;} -SWIGINTERN void cbf_handle_struct_get_axis_rotation(cbf_handle_struct *self,char const *axis_id,double *rotation){ - {(error_status = cbf_get_axis_rotation(self,axis_id, - rotation));} -; - } -SWIGINTERN void cbf_handle_struct_find_datablock(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_find_datablock(self,arg));};} -SWIGINTERN void cbf_handle_struct_get_polarization(cbf_handle_struct *self,double *in1,double *in2){ - {(error_status = cbf_get_polarization (self, in1, in2));}; - } -SWIGINTERN void cbf_handle_struct_select_category(cbf_handle_struct *self,unsigned int arg){ - {(error_status = cbf_select_category(self,arg));};} -SWIGINTERN void cbf_handle_struct_get_pixel_size_fs(cbf_handle_struct *self,unsigned int element_number,unsigned int axis_number,double *psize){ - {(error_status = cbf_get_pixel_size_fs(self, - element_number, - axis_number, - psize));} - - -; - } -SWIGINTERN void cbf_handle_struct_get_axis_poise(cbf_handle_struct *self,double ratio,double *vector1,double *vector2,double *vector3,double *offset1,double *offset2,double *offset3,double *angle,char const *axis_id,char const *frame_id){ - {(error_status = cbf_get_axis_poise(self, ratio, - vector1, vector2, vector3, - offset1, offset2, offset3, angle, - axis_id, frame_id));} - - -; - } -SWIGINTERN void cbf_handle_struct_read_file(cbf_handle_struct *self,char *filename,int headers){ +SWIGINTERN void cbf_handle_struct_read_widefile(cbf_handle_struct *self,char *filename,int headers){ /* CBFlib needs a stream that will remain open hence DO NOT open from python */ FILE *stream; @@ -4276,158 +3722,10 @@ SWIGINTERN void cbf_handle_struct_read_file(cbf_handle_struct *self,char *filena {(error_status = CBF_FILEOPEN);}; } else{ - {(error_status = cbf_read_file(self, stream, headers));}; + {(error_status = cbf_read_widefile(self, stream, headers));}; } } -SWIGINTERN char const *cbf_handle_struct_datablock_name(cbf_handle_struct *self){ - const char* result; - {(error_status = cbf_datablock_name(self, &result));}; - return result;} -SWIGINTERN void cbf_handle_struct_set_realarray_wdims(cbf_handle_struct *self,unsigned int compression,int binary_id,char *data,int len,int elsize,int elements,char *bo,int bolen,int dimfast,int dimmid,int dimslow,int padding){ - /* safety check on args */ - size_t els, ele; - void *array; - char byteorder[15]; - if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ - array = data; - els = elsize; - ele = elements; - strncpy(byteorder,bo,bolen<15?bolen:14); - byteorder[bolen<15?bolen:14] = 0; - {(error_status = cbf_set_realarray_wdims (self, compression, binary_id, - (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder, - (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding));} - -; - }else{ - {(error_status = CBF_ARGUMENT);}; - } - } -SWIGINTERN cbf_detector cbf_handle_struct_construct_reference_detector(cbf_handle_struct *self,unsigned int element_number){ - cbf_detector detector; - {(error_status = cbf_construct_reference_detector(self,&detector,element_number));}; - return detector; - } -SWIGINTERN void cbf_handle_struct_get_real_3d_image_fs_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int ndimfast,int ndimmid,int ndimslow){ - void *array; - int reserved = 0; - *slen = 0; /* Initialise in case of problems */ - if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { - {(error_status = cbf_get_real_3d_image_fs(self, - reserved, (unsigned int)element_number, - (void *)array, (size_t)elsize, - (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow));} - - -; - }else{ - {(error_status = CBF_ALLOC);}; - } - *slen = elsize*ndimfast*ndimmid*ndimslow; - *s = (char *) array; - } -SWIGINTERN void cbf_handle_struct_rewind_row(cbf_handle_struct *self){ - {(error_status = cbf_rewind_row(self));};} -SWIGINTERN void cbf_handle_struct_get_axis_setting(cbf_handle_struct *self,char const *axis_id,double *start,double *increment){ - unsigned int reserved; - reserved = 0; - {(error_status = cbf_get_axis_setting(self,reserved,axis_id, - start,increment));} -; - } -SWIGINTERN void cbf_handle_struct_require_column(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_require_column(self,arg));};} -SWIGINTERN void cbf_handle_struct_get_timestamp(cbf_handle_struct *self,double *time,int *timezone){ - unsigned int reserved; - reserved = 0; - {(error_status = cbf_get_timestamp(self,reserved,time,timezone));}; - } -SWIGINTERN void cbf_handle_struct_find_nextrow(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_find_nextrow(self,arg));};} -SWIGINTERN char const *cbf_handle_struct_get_axis_equipment_component(cbf_handle_struct *self,char const *axis_id){ - const char* equip_comp; - {(error_status = cbf_get_axis_equipment_component(self,axis_id, - &equip_comp));} -; - return equip_comp; - } -SWIGINTERN void cbf_handle_struct_get_realarrayparameters_wdims_sf(cbf_handle_struct *self,int *compression,int *binary_id,int *elsize,int *elements,char **bo,int *bolen,int *dimslow,int *dimmid,int *dimfast,int *padding){ - unsigned int comp; - size_t elsiz, elem, df,dm,ds,pd; - const char * byteorder; - char * bot; - {(error_status = cbf_get_realarrayparameters_wdims_sf(self, - &comp,binary_id, &elsiz, &elem, - &byteorder,&ds,&dm,&df,&pd ));} - -; - *bolen = strlen(byteorder); - if (!(bot = (char *)malloc(*bolen))) {{(error_status = CBF_ALLOC);}} - strncpy(bot,byteorder,*bolen); - *bo = bot; - *compression = comp; - *elsize = elsiz; - *elements = elem; - *dimfast = df; - *dimmid = dm; - *dimslow = ds; - *padding = pd; - - } -SWIGINTERN void cbf_handle_struct_reset_datablock(cbf_handle_struct *self){ - {(error_status = cbf_reset_datablock(self));};} -SWIGINTERN void cbf_handle_struct_set_3d_image_fs(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int elsign,int ndimfast,int ndimmid,int ndimslow){ - /* safety check on args */ - size_t els; - unsigned int reserved; - void *array; - if(len == elsize*ndimslow*ndimmid*ndimfast){ - array = data; - els = elsize; - reserved = 0; - {(error_status = cbf_set_3d_image_fs (self, reserved, element_number, compression, - (void *) data, (size_t) elsize, elsign, (size_t) ndimfast, (size_t) ndimmid, (size_t)ndimslow));} -; - }else{ - {(error_status = CBF_ARGUMENT);}; - } - } -SWIGINTERN void cbf_handle_struct_set_saveframename(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_set_saveframename(self,arg));};} -SWIGINTERN void cbf_handle_struct_require_integervalue(cbf_handle_struct *self,int *number,int thedefault){ - - {(error_status = cbf_require_integervalue(self,number,thedefault));}; - - } -SWIGINTERN void cbf_handle_struct_get_integerarrayparameters(cbf_handle_struct *self,int *compression,int *binary_id,int *elsize,int *elsigned,int *elunsigned,int *elements,int *minelement,int *maxelement){ - unsigned int comp; - size_t elsiz, elem; - {(error_status = cbf_get_integerarrayparameters(self, - &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, - minelement, maxelement));} - -; - *compression = comp; /* FIXME - does this convert in C? */ - *elsize = elsiz; - *elements = elem; - } -SWIGINTERN void cbf_handle_struct_set_real_3d_image_sf(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int ndimslow,int ndimmid,int ndimfast){ - /* safety check on args */ - size_t els; - unsigned int reserved; - void *array; - if(len == elsize*ndimslow*ndimmid*ndimfast){ - array = data; - els = elsize; - reserved = 0; - {(error_status = cbf_set_real_3d_image_sf (self, reserved, element_number, compression, - (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast));} -; - }else{ - {(error_status = CBF_ARGUMENT);}; - } - } -SWIGINTERN void cbf_handle_struct_write_file(cbf_handle_struct *self,char const *filename,int ciforcbf,int headers,int encoding){ +SWIGINTERN void cbf_handle_struct_write_file(cbf_handle_struct *self,char *filename,int ciforcbf,int headers,int encoding){ FILE *stream; int readable; /* Make readable false so we can close the file immediately */ @@ -4442,133 +3740,192 @@ SWIGINTERN void cbf_handle_struct_write_file(cbf_handle_struct *self,char const fclose(stream); } } -SWIGINTERN void cbf_handle_struct_set_divergence(cbf_handle_struct *self,double div_x_source,double div_y_source,double div_x_y_source){ - {(error_status = cbf_set_divergence (self, div_x_source, - div_y_source,div_x_y_source));} -; - } -SWIGINTERN void cbf_handle_struct_remove_datablock(cbf_handle_struct *self){ - {(error_status = cbf_remove_datablock(self));};} -SWIGINTERN unsigned int cbf_handle_struct_count_elements(cbf_handle_struct *self){ - unsigned int result; - {(error_status = cbf_count_elements(self,&result));}; - return result;} -SWIGINTERN void cbf_handle_struct_set_image_fs(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int elsign,int ndimfast,int ndimslow){ - /* safety check on args */ - size_t els; - unsigned int reserved; - void *array; - if(len == elsize*ndimslow*ndimfast){ - array = data; - els = elsize; - reserved = 0; - {(error_status = cbf_set_image (self, reserved, element_number, compression, - (void *) data, (size_t) elsize, elsign, (size_t) ndimfast, (size_t)ndimslow));} -; - }else{ - {(error_status = CBF_ARGUMENT);}; - } - } -SWIGINTERN cbf_detector cbf_handle_struct_require_reference_detector(cbf_handle_struct *self,unsigned int element_number){ - cbf_detector detector; - {(error_status = cbf_require_reference_detector(self,&detector,element_number));}; - return detector; - } -SWIGINTERN void cbf_handle_struct_next_category(cbf_handle_struct *self){ - {(error_status = cbf_next_category(self));};} -SWIGINTERN void cbf_handle_struct_set_diffrn_id(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_set_diffrn_id(self,arg));};} -SWIGINTERN void cbf_handle_struct_set_timestamp(cbf_handle_struct *self,double time,int timezone,double precision){ - unsigned int reserved; - reserved = 0; - {(error_status = cbf_set_timestamp(self,reserved,time,timezone,precision));}; - } -SWIGINTERN void cbf_handle_struct_get_orientation_matrix(cbf_handle_struct *self,double *m0,double *m1,double *m2,double *m3,double *m4,double *m5,double *m6,double *m7,double *m8){ - double m[9]; - {(error_status = cbf_get_orientation_matrix(self,m));}; - *m0 = m[0]; *m1=m[1] ; *m2=m[2] ; - *m3 = m[3]; *m4=m[4] ; *m5=m[5] ; - *m6 = m[6]; *m7=m[7] ; *m8=m[8] ; - } -SWIGINTERN void cbf_handle_struct_get_image_size_fs(cbf_handle_struct *self,unsigned int element_number,int *ndimfast,int *ndimslow){ - unsigned int reserved; - size_t infast, inslow; - reserved = 0; - {(error_status = cbf_get_image_size_fs(self,reserved,element_number,&infast,&inslow));}; - *ndimfast = (int)infast; /* FIXME - is that how to convert? */ - *ndimslow = (int)inslow; - } -SWIGINTERN void cbf_handle_struct_get_divergence(cbf_handle_struct *self,double *div_x_source,double *div_y_source,double *div_x_y_source){ - {(error_status = cbf_get_divergence(self, - div_x_source, - div_y_source, - div_x_y_source));} - - -; - } -SWIGINTERN void cbf_handle_struct_rewind_category(cbf_handle_struct *self){ - {(error_status = cbf_rewind_category(self));};} -SWIGINTERN void cbf_handle_struct_read_template(cbf_handle_struct *self,char *filename){ - /* CBFlib needs a stream that will remain open - hence DO NOT open from python */ +SWIGINTERN void cbf_handle_struct_write_widefile(cbf_handle_struct *self,char *filename,int ciforcbf,int headers,int encoding){ FILE *stream; - if ( ! ( stream = fopen (filename, "rb")) ){ + int readable; + /* Make readable false so we can close the file immediately */ + readable = 0; + if ( ! ( stream = fopen (filename, "w+b")) ){ {(error_status = CBF_FILEOPEN);}; } else{ - {(error_status = cbf_read_template (self, stream));}; } - } -SWIGINTERN void cbf_handle_struct_select_row(cbf_handle_struct *self,unsigned int arg){ - {(error_status = cbf_select_row(self,arg));};} -SWIGINTERN void cbf_handle_struct_get_image_fs_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int elsign,int ndimfast,int ndimslow){ - void *array; - int reserved = 0; - *slen = 0; /* Initialise in case of problems */ - if ((array=malloc(elsize*ndimfast*ndimslow))) { - {(error_status = cbf_get_image_fs(self, - reserved, (unsigned int)element_number, - (void *)array, (size_t)elsize, elsign, - (size_t) ndimfast, (size_t)ndimslow));} - - + {(error_status = cbf_write_widefile(self, stream, readable, + ciforcbf, headers, encoding));} ; - }else{ - {(error_status = CBF_ALLOC);}; - } - *slen = elsize*ndimfast*ndimslow; - *s = (char *) array; - } -SWIGINTERN void cbf_handle_struct_get_image_size_sf(cbf_handle_struct *self,unsigned int element_number,int *ndimslow,int *ndimfast){ - unsigned int reserved; - size_t inslow, infast; - reserved = 0; - {(error_status = cbf_get_image_size(self,reserved,element_number,&inslow,&infast));}; - *ndimslow = (int)inslow; - *ndimfast = (int)infast; + fclose(stream); + } -SWIGINTERN void cbf_handle_struct_get_real_image_fs_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int ndimfast,int ndimslow){ - void *array; - int reserved = 0; - *slen = 0; /* Initialise in case of problems */ - if ((array=malloc(elsize*ndimfast*ndimslow))) { - {(error_status = cbf_get_real_image_fs(self, - reserved, (unsigned int)element_number, - (void *)array, (size_t)elsize, - (size_t) ndimfast, (size_t)ndimslow));} + } +SWIGINTERN void cbf_handle_struct_new_datablock(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_new_datablock(self,arg));};} +SWIGINTERN void cbf_handle_struct_new_saveframe(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_new_saveframe(self,arg));};} +SWIGINTERN void cbf_handle_struct_force_new_datablock(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_force_new_datablock(self,arg));};} +SWIGINTERN void cbf_handle_struct_force_new_saveframe(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_force_new_saveframe(self,arg));};} +SWIGINTERN void cbf_handle_struct_new_category(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_new_category(self,arg));};} +SWIGINTERN void cbf_handle_struct_force_new_category(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_force_new_category(self,arg));};} +SWIGINTERN void cbf_handle_struct_new_column(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_new_column(self,arg));};} +SWIGINTERN void cbf_handle_struct_new_row(cbf_handle_struct *self){ + {(error_status = cbf_new_row(self));};} +SWIGINTERN void cbf_handle_struct_insert_row(cbf_handle_struct *self,unsigned int arg){ + {(error_status = cbf_insert_row(self,arg));};} +SWIGINTERN void cbf_handle_struct_delete_row(cbf_handle_struct *self,unsigned int arg){ + {(error_status = cbf_delete_row(self,arg));};} +SWIGINTERN void cbf_handle_struct_set_datablockname(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_set_datablockname(self,arg));};} +SWIGINTERN void cbf_handle_struct_set_saveframename(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_set_saveframename(self,arg));};} +SWIGINTERN void cbf_handle_struct_reset_datablocks(cbf_handle_struct *self){ + {(error_status = cbf_reset_datablocks(self));};} +SWIGINTERN void cbf_handle_struct_reset_datablock(cbf_handle_struct *self){ + {(error_status = cbf_reset_datablock(self));};} +SWIGINTERN void cbf_handle_struct_reset_saveframe(cbf_handle_struct *self){ + {(error_status = cbf_reset_saveframe(self));};} +SWIGINTERN void cbf_handle_struct_reset_category(cbf_handle_struct *self){ + {(error_status = cbf_reset_category(self));};} +SWIGINTERN void cbf_handle_struct_remove_datablock(cbf_handle_struct *self){ + {(error_status = cbf_remove_datablock(self));};} +SWIGINTERN void cbf_handle_struct_remove_saveframe(cbf_handle_struct *self){ + {(error_status = cbf_remove_saveframe(self));};} +SWIGINTERN void cbf_handle_struct_remove_category(cbf_handle_struct *self){ + {(error_status = cbf_remove_category(self));};} +SWIGINTERN void cbf_handle_struct_remove_column(cbf_handle_struct *self){ + {(error_status = cbf_remove_column(self));};} +SWIGINTERN void cbf_handle_struct_remove_row(cbf_handle_struct *self){ + {(error_status = cbf_remove_row(self));};} +SWIGINTERN void cbf_handle_struct_rewind_datablock(cbf_handle_struct *self){ + {(error_status = cbf_rewind_datablock(self));};} +SWIGINTERN void cbf_handle_struct_rewind_category(cbf_handle_struct *self){ + {(error_status = cbf_rewind_category(self));};} +SWIGINTERN void cbf_handle_struct_rewind_saveframe(cbf_handle_struct *self){ + {(error_status = cbf_rewind_saveframe(self));};} +SWIGINTERN CBF_NODETYPE cbf_handle_struct_rewind_blockitem(cbf_handle_struct *self){ + CBF_NODETYPE result; + {(error_status = cbf_rewind_blockitem(self,&result));}; + return result;} +SWIGINTERN void cbf_handle_struct_rewind_column(cbf_handle_struct *self){ + {(error_status = cbf_rewind_column(self));};} +SWIGINTERN void cbf_handle_struct_rewind_row(cbf_handle_struct *self){ + {(error_status = cbf_rewind_row(self));};} +SWIGINTERN void cbf_handle_struct_next_datablock(cbf_handle_struct *self){ + {(error_status = cbf_next_datablock(self));};} +SWIGINTERN void cbf_handle_struct_next_category(cbf_handle_struct *self){ + {(error_status = cbf_next_category(self));};} +SWIGINTERN void cbf_handle_struct_next_column(cbf_handle_struct *self){ + {(error_status = cbf_next_column(self));};} +SWIGINTERN void cbf_handle_struct_next_row(cbf_handle_struct *self){ + {(error_status = cbf_next_row(self));};} +SWIGINTERN void cbf_handle_struct_find_datablock(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_find_datablock(self,arg));};} +SWIGINTERN void cbf_handle_struct_find_category(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_find_category(self,arg));};} +SWIGINTERN void cbf_handle_struct_find_column(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_find_column(self,arg));};} +SWIGINTERN void cbf_handle_struct_find_row(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_find_row(self,arg));};} +SWIGINTERN void cbf_handle_struct_find_nextrow(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_find_nextrow(self,arg));};} +SWIGINTERN unsigned int cbf_handle_struct_count_datablocks(cbf_handle_struct *self){ + unsigned int result; + {(error_status = cbf_count_datablocks(self,&result));}; + return result;} +SWIGINTERNINLINE PyObject* + SWIG_From_unsigned_SS_int (unsigned int value) +{ + return PyInt_FromSize_t((size_t) value); +} -; - }else{ - {(error_status = CBF_ALLOC);}; - } - *slen = elsize*ndimfast*ndimslow; - *s = (char *) array; - } +SWIGINTERN unsigned int cbf_handle_struct_count_categories(cbf_handle_struct *self){ + unsigned int result; + {(error_status = cbf_count_categories(self,&result));}; + return result;} SWIGINTERN unsigned int cbf_handle_struct_count_columns(cbf_handle_struct *self){ unsigned int result; {(error_status = cbf_count_columns(self,&result));}; return result;} +SWIGINTERN unsigned int cbf_handle_struct_count_rows(cbf_handle_struct *self){ + unsigned int result; + {(error_status = cbf_count_rows(self,&result));}; + return result;} +SWIGINTERN void cbf_handle_struct_select_datablock(cbf_handle_struct *self,unsigned int arg){ + {(error_status = cbf_select_datablock(self,arg));};} +SWIGINTERN void cbf_handle_struct_select_category(cbf_handle_struct *self,unsigned int arg){ + {(error_status = cbf_select_category(self,arg));};} +SWIGINTERN void cbf_handle_struct_select_column(cbf_handle_struct *self,unsigned int arg){ + {(error_status = cbf_select_column(self,arg));};} +SWIGINTERN void cbf_handle_struct_select_row(cbf_handle_struct *self,unsigned int arg){ + {(error_status = cbf_select_row(self,arg));};} +SWIGINTERN char const *cbf_handle_struct_datablock_name(cbf_handle_struct *self){ + const char* result; + {(error_status = cbf_datablock_name(self, &result));}; + return result;} +SWIGINTERN char const *cbf_handle_struct_category_name(cbf_handle_struct *self){ + const char* result; + {(error_status = cbf_category_name(self, &result));}; + return result;} +SWIGINTERN char const *cbf_handle_struct_column_name(cbf_handle_struct *self){ + const char* result; + {(error_status = cbf_column_name(self, &result));}; + return result;} +SWIGINTERN unsigned int cbf_handle_struct_row_number(cbf_handle_struct *self){ + unsigned int result; + {(error_status = cbf_row_number(self,&result));}; + return result;} +SWIGINTERN char const *cbf_handle_struct_get_value(cbf_handle_struct *self){ + const char* result; + {(error_status = cbf_get_value(self, &result));}; + return result;} +SWIGINTERN char const *cbf_handle_struct_require_value(cbf_handle_struct *self,char const *defaultvalue){ + const char * result; + {(error_status = cbf_require_value(self, &result, defaultvalue));}; + return result; + } +SWIGINTERN void cbf_handle_struct_set_value(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_set_value(self,arg));};} +SWIGINTERN char const *cbf_handle_struct_get_typeofvalue(cbf_handle_struct *self){ + const char* result; + {(error_status = cbf_get_typeofvalue(self, &result));}; + return result;} +SWIGINTERN void cbf_handle_struct_set_typeofvalue(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_set_typeofvalue(self,arg));};} +SWIGINTERN int cbf_handle_struct_get_integervalue(cbf_handle_struct *self){ + int result; + {(error_status = cbf_get_integervalue(self,&result));}; + return result;} +SWIGINTERN void cbf_handle_struct_require_integervalue(cbf_handle_struct *self,int *number,int thedefault){ + + {(error_status = cbf_require_integervalue(self,number,thedefault));}; + + } +SWIGINTERN void cbf_handle_struct_set_integervalue(cbf_handle_struct *self,int number){ + {(error_status = cbf_set_integervalue(self,number));};} +SWIGINTERN double cbf_handle_struct_get_doublevalue(cbf_handle_struct *self){ + double result; + {(error_status = cbf_get_doublevalue(self,&result));}; + return result;} +SWIGINTERN void cbf_handle_struct_require_doublevalue(cbf_handle_struct *self,double *number,double defaultvalue){ + {(error_status = cbf_require_doublevalue(self,number,defaultvalue));}; +} +SWIGINTERN void cbf_handle_struct_set_doublevalue(cbf_handle_struct *self,char const *format,double number){ + {(error_status = cbf_set_doublevalue(self,format,number));};} +SWIGINTERN void cbf_handle_struct_get_integerarrayparameters(cbf_handle_struct *self,int *compression,int *binary_id,int *elsize,int *elsigned,int *elunsigned,int *elements,int *minelement,int *maxelement){ + unsigned int comp; + size_t elsiz, elem; + {(error_status = cbf_get_integerarrayparameters(self, + &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, + minelement, maxelement));} + +; + *compression = comp; /* FIXME - does this convert in C? */ + *elsize = elsiz; + *elements = elem; + } SWIGINTERN void cbf_handle_struct_get_integerarrayparameters_wdims(cbf_handle_struct *self,int *compression,int *binary_id,int *elsize,int *elsigned,int *elunsigned,int *elements,int *minelement,int *maxelement,char **bo,int *bolen,int *dimfast,int *dimmid,int *dimslow,int *padding){ unsigned int comp; size_t elsiz, elem, df,dm,ds,pd; @@ -4592,91 +3949,84 @@ SWIGINTERN void cbf_handle_struct_get_integerarrayparameters_wdims(cbf_handle_st *padding = pd; } -SWIGINTERN void cbf_handle_struct_get_gain(cbf_handle_struct *self,unsigned int element_number,double *gain,double *gain_esd){ - {(error_status = cbf_get_gain (self, element_number, gain, gain_esd));}; - } -SWIGINTERN void cbf_handle_struct_new_saveframe(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_new_saveframe(self,arg));};} -SWIGINTERN void cbf_handle_struct_set_polarization(cbf_handle_struct *self,double polarizn_source_ratio,double polarizn_source_norm){ - {(error_status = cbf_set_polarization(self, - polarizn_source_ratio, - polarizn_source_norm));} +SWIGINTERN void cbf_handle_struct_get_integerarrayparameters_wdims_fs(cbf_handle_struct *self,int *compression,int *binary_id,int *elsize,int *elsigned,int *elunsigned,int *elements,int *minelement,int *maxelement,char **bo,int *bolen,int *dimfast,int *dimmid,int *dimslow,int *padding){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + {(error_status = cbf_get_integerarrayparameters_wdims_fs(self, + &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, + minelement, maxelement, &byteorder,&df,&dm,&ds,&pd ));} ; - } -SWIGINTERN void cbf_handle_struct_set_real_3d_image(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int ndimslow,int ndimmid,int ndimfast){ - /* safety check on args */ - size_t els; - unsigned int reserved; - void *array; - if(len == elsize*ndimslow*ndimmid*ndimfast){ - array = data; - els = elsize; - reserved = 0; - {(error_status = cbf_set_real_3d_image (self, reserved, element_number, compression, - (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast));} -; - }else{ - {(error_status = CBF_ARGUMENT);}; + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {{(error_status = CBF_ALLOC);}} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + } - } -SWIGINTERN void cbf_handle_struct_delete_row(cbf_handle_struct *self,unsigned int arg){ - {(error_status = cbf_delete_row(self,arg));};} -SWIGINTERN char const *cbf_handle_struct_column_name(cbf_handle_struct *self){ - const char* result; - {(error_status = cbf_column_name(self, &result));}; - return result;} -SWIGINTERN void cbf_handle_struct_remove_saveframe(cbf_handle_struct *self){ - {(error_status = cbf_remove_saveframe(self));};} -SWIGINTERN void cbf_handle_struct_set_integerarray_wdims_sf(cbf_handle_struct *self,unsigned int compression,int binary_id,char *data,int len,int elsize,int elsigned,int elements,char *bo,int bolen,int dimslow,int dimmid,int dimfast,int padding){ - /* safety check on args */ - size_t els, ele; - void *array; - char byteorder[15]; - if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ - array = data; - els = elsize; - ele = elements; - strncpy(byteorder,bo,bolen<15?bolen:14); - byteorder[bolen<15?bolen:14] = 0; - {(error_status = cbf_set_integerarray_wdims_sf (self, compression, binary_id, - (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder, - (size_t)dimslow, (size_t)dimmid, (size_t)dimfast, (size_t)padding));} +SWIGINTERN void cbf_handle_struct_get_integerarrayparameters_wdims_sf(cbf_handle_struct *self,int *compression,int *binary_id,int *elsize,int *elsigned,int *elunsigned,int *elements,int *minelement,int *maxelement,char **bo,int *bolen,int *dimslow,int *dimmid,int *dimfast,int *padding){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + {(error_status = cbf_get_integerarrayparameters_wdims_sf(self, + &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, + minelement, maxelement, &byteorder,&ds,&dm,&df,&pd ));} -; - }else{ - {(error_status = CBF_ARGUMENT);}; - } - } -SWIGINTERN char const *cbf_handle_struct_require_value(cbf_handle_struct *self,char const *defaultvalue){ - const char * result; - {(error_status = cbf_require_value(self, &result, defaultvalue));}; - return result; - } -SWIGINTERN void cbf_handle_struct_require_column_integervalue(cbf_handle_struct *self,char const *columnname,int *number,int const defaultvalue){ - {(error_status = cbf_require_column_integervalue(self, - columnname, number,defaultvalue));} ; - } -SWIGINTERN void cbf_handle_struct_set_pixel_size(cbf_handle_struct *self,unsigned int element_number,unsigned int axis_number,double psize){ - {(error_status = cbf_set_pixel_size(self, - element_number, - axis_number, - psize));} - + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {{(error_status = CBF_ALLOC);}} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } +SWIGINTERN void cbf_handle_struct_get_realarrayparameters(cbf_handle_struct *self,int *compression,int *binary_id,int *elsize,int *elements){ + unsigned int comp; + size_t elsiz, elem; + {(error_status = cbf_get_realarrayparameters(self, + &comp ,binary_id, &elsiz, &elem ));} +; + *compression = comp; /* FIXME - does this convert in C? */ + *elsize = elsiz; + *elements = elem; + } +SWIGINTERN void cbf_handle_struct_get_realarrayparameters_wdims(cbf_handle_struct *self,int *compression,int *binary_id,int *elsize,int *elements,char **bo,int *bolen,int *dimfast,int *dimmid,int *dimslow,int *padding){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + {(error_status = cbf_get_realarrayparameters_wdims(self, + &comp,binary_id, &elsiz, &elem, + &byteorder,&df,&dm,&ds,&pd ));} ; - } -SWIGINTERN void cbf_handle_struct_next_column(cbf_handle_struct *self){ - {(error_status = cbf_next_column(self));};} -SWIGINTERN void cbf_handle_struct_get_3d_image_size_sf(cbf_handle_struct *self,unsigned int element_number,int *ndimslow,int *ndimmid,int *ndimfast){ - unsigned int reserved; - size_t inslow, inmid, infast; - reserved = 0; - {(error_status = cbf_get_3d_image_size_sf(self,reserved,element_number,&inslow,&inmid,&infast));}; - *ndimslow = (int)inslow; /* FIXME - is that how to convert? */ - *ndimmid = (int)inmid; - *ndimfast = (int)infast; + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {{(error_status = CBF_ALLOC);}} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + } SWIGINTERN void cbf_handle_struct_get_realarrayparameters_wdims_fs(cbf_handle_struct *self,int *compression,int *binary_id,int *elsize,int *elements,char **bo,int *bolen,int *dimfast,int *dimmid,int *dimslow,int *padding){ unsigned int comp; @@ -4701,22 +4051,49 @@ SWIGINTERN void cbf_handle_struct_get_realarrayparameters_wdims_fs(cbf_handle_st *padding = pd; } -SWIGINTERN void cbf_handle_struct_get_realarray_as_string(cbf_handle_struct *self,char **s,int *slen){ - int binary_id; +SWIGINTERN void cbf_handle_struct_get_realarrayparameters_wdims_sf(cbf_handle_struct *self,int *compression,int *binary_id,int *elsize,int *elements,char **bo,int *bolen,int *dimslow,int *dimmid,int *dimfast,int *padding){ + unsigned int comp; + size_t elsiz, elem, df,dm,ds,pd; + const char * byteorder; + char * bot; + {(error_status = cbf_get_realarrayparameters_wdims_sf(self, + &comp,binary_id, &elsiz, &elem, + &byteorder,&ds,&dm,&df,&pd ));} + +; + *bolen = strlen(byteorder); + if (!(bot = (char *)malloc(*bolen))) {{(error_status = CBF_ALLOC);}} + strncpy(bot,byteorder,*bolen); + *bo = bot; + *compression = comp; + *elsize = elsiz; + *elements = elem; + *dimfast = df; + *dimmid = dm; + *dimslow = ds; + *padding = pd; + + } + +#define SWIG_PYTHON_STRICT_BYTE_CHAR + +SWIGINTERN void cbf_handle_struct_get_integerarray_as_string(cbf_handle_struct *self,char **s,int *slen){ + int binary_id, elsigned, elunsigned; size_t elements, elements_read, elsize; + int minelement, maxelement; unsigned int compression; void * array; *slen = 0; /* Initialise in case of problems */ - {(error_status = cbf_get_realarrayparameters(self, &compression, - &binary_id, &elsize, - &elements));} + {(error_status = cbf_get_integerarrayparameters(self, &compression, + &binary_id, &elsize, &elsigned, &elunsigned, + &elements, &minelement, &maxelement));} ; if ((array=malloc(elsize*elements))) { /* cbf_failnez (cbf_select_column(cbf,colnum)) */ - {(error_status = cbf_get_realarray(self, &binary_id, - (void *)array, elsize, + {(error_status = cbf_get_integerarray(self, &binary_id, + (void *)array, elsize, elsigned, elements, &elements_read));} ; @@ -4727,44 +4104,25 @@ SWIGINTERN void cbf_handle_struct_get_realarray_as_string(cbf_handle_struct *sel *slen = elsize*elements; *s = (char *) array; } -SWIGINTERN void cbf_handle_struct_get_bin_sizes(cbf_handle_struct *self,int element_number,double *slowbinsize,double *fastbinsize){ - {(error_status = cbf_get_bin_sizes (self, (unsigned int)element_number, slowbinsize, fastbinsize));}; - } -SWIGINTERN void cbf_handle_struct_reset_category(cbf_handle_struct *self){ - {(error_status = cbf_reset_category(self));};} -SWIGINTERN void cbf_handle_struct_count_axis_ancestors(cbf_handle_struct *self,char const *axis_id,int *ancestors){ - unsigned int anc; - {(error_status = cbf_count_axis_ancestors(self,axis_id,&anc));}; - *ancestors = anc; - } -SWIGINTERN cbf_goniometer cbf_handle_struct_construct_goniometer(cbf_handle_struct *self){ - cbf_goniometer goniometer; - {(error_status = cbf_construct_goniometer(self,&goniometer));}; - return goniometer; - } -SWIGINTERN void cbf_handle_struct_set_datablockname(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_set_datablockname(self,arg));};} -SWIGINTERN void cbf_handle_struct_get_element_number(cbf_handle_struct *self){ - {(error_status = CBF_NOTIMPLEMENTED);};} -SWIGINTERN void cbf_handle_struct_set_crystal_id(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_set_crystal_id(self,arg));};} -SWIGINTERN void cbf_handle_struct_get_integerarray_as_string(cbf_handle_struct *self,char **s,int *slen){ - int binary_id, elsigned, elunsigned; + +#define SWIG_PYTHON_STRICT_BYTE_CHAR + +SWIGINTERN void cbf_handle_struct_get_realarray_as_string(cbf_handle_struct *self,char **s,int *slen){ + int binary_id; size_t elements, elements_read, elsize; - int minelement, maxelement; unsigned int compression; void * array; *slen = 0; /* Initialise in case of problems */ - {(error_status = cbf_get_integerarrayparameters(self, &compression, - &binary_id, &elsize, &elsigned, &elunsigned, - &elements, &minelement, &maxelement));} + {(error_status = cbf_get_realarrayparameters(self, &compression, + &binary_id, &elsize, + &elements));} ; if ((array=malloc(elsize*elements))) { /* cbf_failnez (cbf_select_column(cbf,colnum)) */ - {(error_status = cbf_get_integerarray(self, &binary_id, - (void *)array, elsize, elsigned, + {(error_status = cbf_get_realarray(self, &binary_id, + (void *)array, elsize, elements, &elements_read));} ; @@ -4775,57 +4133,21 @@ SWIGINTERN void cbf_handle_struct_get_integerarray_as_string(cbf_handle_struct * *slen = elsize*elements; *s = (char *) array; } -SWIGINTERN void cbf_handle_struct_set_3d_image(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int elsign,int ndimslow,int ndimmid,int ndimfast){ +SWIGINTERN void cbf_handle_struct_set_integerarray(cbf_handle_struct *self,unsigned int compression,int binary_id,char *data,int len,int elsize,int elsigned,int elements){ /* safety check on args */ - size_t els; - unsigned int reserved; + size_t els, ele; void *array; - if(len == elsize*ndimslow*ndimmid*ndimfast){ + if(len == elsize*elements){ array = data; els = elsize; - reserved = 0; - {(error_status = cbf_set_3d_image (self, reserved, element_number, compression, - (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t) ndimmid, (size_t)ndimfast));} + ele = elements; + {(error_status = cbf_set_integerarray (self, compression, binary_id, + (void *) data, (size_t) elsize, elsigned, (size_t) elements));} ; }else{ {(error_status = CBF_ARGUMENT);}; } } -SWIGINTERN void cbf_handle_struct_set_dictionary(cbf_handle_struct *self,cbf_handle other){ - {(error_status = cbf_set_dictionary(self,other));}; -} -SWIGINTERN char const *cbf_handle_struct_find_tag_category(cbf_handle_struct *self,char const *tagname){ - const char * result; - {(error_status = cbf_find_tag_category(self,tagname, &result));}; - return result; - } -SWIGINTERN void cbf_handle_struct_get_real_3d_image_sf_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int ndimslow,int ndimmid,int ndimfast){ - void *array; - int reserved = 0; - *slen = 0; /* Initialise in case of problems */ - if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { - {(error_status = cbf_get_real_3d_image_sf(self, - reserved, (unsigned int)element_number, - (void *)array, (size_t)elsize, - (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast));} - - -; - }else{ - {(error_status = CBF_ALLOC);}; - } - *slen = elsize*ndimfast*ndimmid*ndimslow; - *s = (char *) array; - } -SWIGINTERN void cbf_handle_struct_set_typeofvalue(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_set_typeofvalue(self,arg));};} -SWIGINTERN char const *cbf_handle_struct_get_axis_rotation_axis(cbf_handle_struct *self,char const *axis_id){ - const char* rot_axis; - {(error_status = cbf_get_axis_rotation_axis(self,axis_id, - &rot_axis));} -; - return rot_axis; - } SWIGINTERN void cbf_handle_struct_set_integerarray_wdims(cbf_handle_struct *self,unsigned int compression,int binary_id,char *data,int len,int elsize,int elsigned,int elements,char *bo,int bolen,int dimfast,int dimmid,int dimslow,int padding){ /* safety check on args */ size_t els, ele; @@ -4846,215 +4168,62 @@ SWIGINTERN void cbf_handle_struct_set_integerarray_wdims(cbf_handle_struct *self {(error_status = CBF_ARGUMENT);}; } } -SWIGINTERN void cbf_handle_struct_set_integration_time(cbf_handle_struct *self,double time){ - unsigned int reserved; - reserved = 0; - {(error_status = cbf_set_integration_time(self,reserved,time));}; - } -SWIGINTERN void cbf_handle_struct_set_axis_setting(cbf_handle_struct *self,char const *axis_id,double start,double increment){ - unsigned int reserved; - reserved = 0; - {(error_status = cbf_set_axis_setting(self,reserved, - axis_id,start,increment));} -; - } -SWIGINTERN void cbf_handle_struct_get_real_image_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int ndimslow,int ndimfast){ - void *array; - int reserved = 0; - *slen = 0; /* Initialise in case of problems */ - if ((array=malloc(elsize*ndimfast*ndimslow))) { - {(error_status = cbf_get_real_image(self, - reserved, (unsigned int)element_number, - (void *)array, (size_t)elsize, - (size_t) ndimslow, (size_t)ndimfast));} - - -; - }else{ - {(error_status = CBF_ALLOC);}; - } - *slen = elsize*ndimfast*ndimslow; - *s = (char *) array; - } -SWIGINTERN char const *cbf_handle_struct_get_axis_ancestor(cbf_handle_struct *self,char const *axis_id,int ancestor_index){ - const char* anc; - {(error_status = cbf_get_axis_ancestor(self,axis_id, - (unsigned int)ancestor_index,&anc));} -; - return anc; - } -SWIGINTERN void cbf_handle_struct_get_3d_image_sf_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int elsign,int ndimfast,int ndimmid,int ndimslow){ - void *array; - int reserved = 0; - *slen = 0; /* Initialise in case of problems */ - if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { - {(error_status = cbf_get_3d_image_sf(self, - reserved, (unsigned int)element_number, - (void *)array, (size_t)elsize, elsign, - (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast));} - - -; - }else{ - {(error_status = CBF_ALLOC);}; - } - *slen = elsize*ndimfast*ndimmid*ndimslow; - *s = (char *) array; - } -SWIGINTERN void cbf_handle_struct_set_real_image_fs(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int ndimfast,int ndimslow){ +SWIGINTERN void cbf_handle_struct_set_integerarray_wdims_fs(cbf_handle_struct *self,unsigned int compression,int binary_id,char *data,int len,int elsize,int elsigned,int elements,char *bo,int bolen,int dimfast,int dimmid,int dimslow,int padding){ /* safety check on args */ - size_t els; - unsigned int reserved; + size_t els, ele; void *array; - if(len == elsize*ndimslow*ndimfast){ + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ array = data; els = elsize; - reserved = 0; - {(error_status = cbf_set_real_image_fs (self, reserved, element_number, compression, - (void *) data, (size_t) elsize, (size_t) ndimfast, (size_t)ndimslow));} + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + {(error_status = cbf_set_integerarray_wdims_fs (self, compression, binary_id, + (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder, + (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding));} + ; }else{ {(error_status = CBF_ARGUMENT);}; } } -SWIGINTERN void cbf_handle_struct_get_overload(cbf_handle_struct *self,unsigned int element_number,double *overload){ - {(error_status = cbf_get_overload(self,element_number,overload));}; - } -SWIGINTERN double cbf_handle_struct_get_wavelength(cbf_handle_struct *self){ - double result; - {(error_status = cbf_get_wavelength(self,&result));}; - return result;} -SWIGINTERN void cbf_handle_struct_next_datablock(cbf_handle_struct *self){ - {(error_status = cbf_next_datablock(self));};} -SWIGINTERN void cbf_handle_struct_get_realarrayparameters_wdims(cbf_handle_struct *self,int *compression,int *binary_id,int *elsize,int *elements,char **bo,int *bolen,int *dimfast,int *dimmid,int *dimslow,int *padding){ - unsigned int comp; - size_t elsiz, elem, df,dm,ds,pd; - const char * byteorder; - char * bot; - {(error_status = cbf_get_realarrayparameters_wdims(self, - &comp,binary_id, &elsiz, &elem, - &byteorder,&df,&dm,&ds,&pd ));} - -; - *bolen = strlen(byteorder); - if (!(bot = (char *)malloc(*bolen))) {{(error_status = CBF_ALLOC);}} - strncpy(bot,byteorder,*bolen); - *bo = bot; - *compression = comp; - *elsize = elsiz; - *elements = elem; - *dimfast = df; - *dimmid = dm; - *dimslow = ds; - *padding = pd; - - } -SWIGINTERN void cbf_handle_struct_set_orientation_matrix(cbf_handle_struct *self,double m0,double m1,double m2,double m3,double m4,double m5,double m6,double m7,double m8){ - double m[9]; - m[0] = m0; m[1]=m1 ; m[2]=m2 ; - m[3] = m3; m[4]=m4 ; m[5]=m5 ; - m[6] = m6; m[7]=m7 ; m[8]=m8 ; - {(error_status = cbf_get_orientation_matrix(self,m));}; - } -SWIGINTERN void cbf_handle_struct_new_category(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_new_category(self,arg));};} -SWIGINTERN void cbf_handle_struct_set_gain(cbf_handle_struct *self,unsigned int element_number,double gain,double gain_esd){ - {(error_status = cbf_set_gain (self, element_number, gain, gain_esd));}; - } -SWIGINTERN void cbf_handle_struct_find_column(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_find_column(self,arg));};} -SWIGINTERN void cbf_handle_struct_remove_category(cbf_handle_struct *self){ - {(error_status = cbf_remove_category(self));};} -SWIGINTERN void cbf_handle_struct_get_integerarrayparameters_wdims_sf(cbf_handle_struct *self,int *compression,int *binary_id,int *elsize,int *elsigned,int *elunsigned,int *elements,int *minelement,int *maxelement,char **bo,int *bolen,int *dimslow,int *dimmid,int *dimfast,int *padding){ - unsigned int comp; - size_t elsiz, elem, df,dm,ds,pd; - const char * byteorder; - char * bot; - {(error_status = cbf_get_integerarrayparameters_wdims_sf(self, - &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, - minelement, maxelement, &byteorder,&ds,&dm,&df,&pd ));} +SWIGINTERN void cbf_handle_struct_set_integerarray_wdims_sf(cbf_handle_struct *self,unsigned int compression,int binary_id,char *data,int len,int elsize,int elsigned,int elements,char *bo,int bolen,int dimslow,int dimmid,int dimfast,int padding){ + /* safety check on args */ + size_t els, ele; + void *array; + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ + array = data; + els = elsize; + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + {(error_status = cbf_set_integerarray_wdims_sf (self, compression, binary_id, + (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder, + (size_t)dimslow, (size_t)dimmid, (size_t)dimfast, (size_t)padding));} -; - *bolen = strlen(byteorder); - if (!(bot = (char *)malloc(*bolen))) {{(error_status = CBF_ALLOC);}} - strncpy(bot,byteorder,*bolen); - *bo = bot; - *compression = comp; - *elsize = elsiz; - *elements = elem; - *dimfast = df; - *dimmid = dm; - *dimslow = ds; - *padding = pd; - +; + }else{ + {(error_status = CBF_ARGUMENT);}; } -SWIGINTERN void cbf_handle_struct_get_pixel_size(cbf_handle_struct *self,unsigned int element_number,unsigned int axis_number,double *psize){ - {(error_status = cbf_get_pixel_size(self, - element_number, - axis_number, - psize));} - - -; } -SWIGINTERN void cbf_handle_struct_set_real_image_sf(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int ndimslow,int ndimfast){ +SWIGINTERN void cbf_handle_struct_set_realarray(cbf_handle_struct *self,unsigned int compression,int binary_id,char *data,int len,int elsize,int elements){ /* safety check on args */ - size_t els; - unsigned int reserved; + size_t els, ele; void *array; - if(len == elsize*ndimslow*ndimfast){ + if(len == elsize*elements){ array = data; els = elsize; - reserved = 0; - {(error_status = cbf_set_real_image_sf (self, reserved, element_number, compression, - (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimfast));} + ele = elements; + {(error_status = cbf_set_realarray (self, compression, binary_id, + (void *) data, (size_t) elsize, (size_t) elements));} ; }else{ {(error_status = CBF_ARGUMENT);}; } } -SWIGINTERN void cbf_handle_struct_require_category(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_require_category(self,arg));};} -SWIGINTERN void cbf_handle_struct_get_reciprocal_cell(cbf_handle_struct *self,double *astar,double *bstar,double *cstar,double *alphastar,double *betastar,double *gammastar){ - double rcell[6]; - {(error_status = cbf_get_reciprocal_cell(self,rcell,NULL));}; - *astar = rcell[0]; - *bstar = rcell[1]; - *cstar = rcell[2]; - *alphastar = rcell[3]; - *betastar = rcell[4]; - *gammastar = rcell[5]; - } -SWIGINTERN void cbf_handle_struct_get_reciprocal_cell_esd(cbf_handle_struct *self,double *a_esd,double *b_esd,double *c_esd,double *alpha_esd,double *beta_esd,double *gamma_esd){ - double cell_esd[6]; - {(error_status = cbf_get_reciprocal_cell(self,NULL,cell_esd));}; - *a_esd = cell_esd[0]; - *b_esd = cell_esd[1]; - *c_esd = cell_esd[2]; - *alpha_esd = cell_esd[3]; - *beta_esd = cell_esd[4]; - *gamma_esd = cell_esd[5]; - } -SWIGINTERN void cbf_handle_struct_get_3d_image_size(cbf_handle_struct *self,unsigned int element_number,int *ndimslow,int *ndimmid,int *ndimfast){ - unsigned int reserved; - size_t inslow, inmid, infast; - reserved = 0; - {(error_status = cbf_get_3d_image_size(self,reserved,element_number,&inslow,&inmid,&infast));}; - *ndimslow = (int)inslow; /* FIXME - is that how to convert? */ - *ndimmid = (int)inmid; - *ndimfast = (int)infast; - } -SWIGINTERN char const *cbf_handle_struct_find_tag_root(cbf_handle_struct *self,char const *tagname){ - const char* result; - {(error_status = cbf_find_tag_root(self,tagname,&result));}; - return result; -} -SWIGINTERN char const *cbf_handle_struct_require_category_root(cbf_handle_struct *self,char const *categoryname){ - const char* result; - {(error_status = cbf_require_category_root(self,categoryname, &result));}; - return result; -} -SWIGINTERN void cbf_handle_struct_set_realarray_wdims_sf(cbf_handle_struct *self,unsigned int compression,int binary_id,char *data,int len,int elsize,int elements,char *bo,int bolen,int dimslow,int dimmid,int dimfast,int padding){ +SWIGINTERN void cbf_handle_struct_set_realarray_wdims(cbf_handle_struct *self,unsigned int compression,int binary_id,char *data,int len,int elsize,int elements,char *bo,int bolen,int dimfast,int dimmid,int dimslow,int padding){ /* safety check on args */ size_t els, ele; void *array; @@ -5065,223 +4234,195 @@ SWIGINTERN void cbf_handle_struct_set_realarray_wdims_sf(cbf_handle_struct *self ele = elements; strncpy(byteorder,bo,bolen<15?bolen:14); byteorder[bolen<15?bolen:14] = 0; - {(error_status = cbf_set_realarray_wdims_sf (self, compression, binary_id, + {(error_status = cbf_set_realarray_wdims (self, compression, binary_id, (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder, - (size_t) dimslow, (size_t) dimmid, (size_t) dimfast, (size_t)padding));} + (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding));} ; }else{ {(error_status = CBF_ARGUMENT);}; } } -SWIGINTERN void cbf_handle_struct_set_integervalue(cbf_handle_struct *self,int number){ - {(error_status = cbf_set_integervalue(self,number));};} -SWIGINTERN char const *cbf_handle_struct_category_name(cbf_handle_struct *self){ - const char* result; - {(error_status = cbf_category_name(self, &result));}; - return result;} -SWIGINTERN char const *cbf_handle_struct_get_typeofvalue(cbf_handle_struct *self){ - const char* result; - {(error_status = cbf_get_typeofvalue(self, &result));}; - return result;} -SWIGINTERN void cbf_handle_struct_set_real_image(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int ndimslow,int ndimfast){ +SWIGINTERN void cbf_handle_struct_set_realarray_wdims_fs(cbf_handle_struct *self,unsigned int compression,int binary_id,char *data,int len,int elsize,int elements,char *bo,int bolen,int dimfast,int dimmid,int dimslow,int padding){ /* safety check on args */ - size_t els; - unsigned int reserved; + size_t els, ele; void *array; - if(len == elsize*ndimslow*ndimfast){ + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ array = data; els = elsize; - reserved = 0; - {(error_status = cbf_set_real_image (self, reserved, element_number, compression, - (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimfast));} + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + {(error_status = cbf_set_realarray_wdims_fs (self, compression, binary_id, + (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder, + (size_t) dimfast, (size_t) dimmid, (size_t) dimslow, (size_t)padding));} + ; }else{ {(error_status = CBF_ARGUMENT);}; } } -SWIGINTERN void cbf_handle_struct_get_3d_image_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int elsign,int ndimfast,int ndimmid,int ndimslow){ - void *array; - int reserved = 0; - *slen = 0; /* Initialise in case of problems */ - if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { - {(error_status = cbf_get_3d_image(self, - reserved, (unsigned int)element_number, - (void *)array, (size_t)elsize, elsign, - (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast));} - - -; - }else{ - {(error_status = CBF_ALLOC);}; - } - *slen = elsize*ndimfast*ndimmid*ndimslow; - *s = (char *) array; - } -SWIGINTERN void cbf_handle_struct_get_axis_reference_poise(cbf_handle_struct *self,double *vector1,double *vector2,double *vector3,double *offset1,double *offset2,double *offset3,char const *axis_id){ - {(error_status = cbf_get_axis_reference_poise(self, - vector1, vector2, vector3, - offset1, offset2, offset3, - axis_id));} - - -; - } -SWIGINTERN void cbf_handle_struct_remove_row(cbf_handle_struct *self){ - {(error_status = cbf_remove_row(self));};} -SWIGINTERN void cbf_handle_struct_set_overload(cbf_handle_struct *self,unsigned int element_number,double overload){ - {(error_status = cbf_set_overload(self,element_number,overload));}; - } -SWIGINTERN void cbf_handle_struct_get_image_size(cbf_handle_struct *self,unsigned int element_number,int *ndimslow,int *ndimfast){ - unsigned int reserved; - size_t inslow, infast; - reserved = 0; - {(error_status = cbf_get_image_size(self,reserved,element_number,&inslow,&infast));}; - *ndimslow = (int)inslow; - *ndimfast = (int)infast; - } -SWIGINTERN void cbf_handle_struct_set_3d_image_sf(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int elsign,int ndimslow,int ndimmid,int ndimfast){ +SWIGINTERN void cbf_handle_struct_set_realarray_wdims_sf(cbf_handle_struct *self,unsigned int compression,int binary_id,char *data,int len,int elsize,int elements,char *bo,int bolen,int dimslow,int dimmid,int dimfast,int padding){ /* safety check on args */ - size_t els; - unsigned int reserved; + size_t els, ele; void *array; - if(len == elsize*ndimslow*ndimmid*ndimfast){ + char byteorder[15]; + if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ array = data; els = elsize; - reserved = 0; - {(error_status = cbf_set_3d_image_sf (self, reserved, element_number, compression, - (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t) ndimmid, (size_t)ndimfast));} + ele = elements; + strncpy(byteorder,bo,bolen<15?bolen:14); + byteorder[bolen<15?bolen:14] = 0; + {(error_status = cbf_set_realarray_wdims_sf (self, compression, binary_id, + (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder, + (size_t) dimslow, (size_t) dimmid, (size_t) dimfast, (size_t)padding));} + ; }else{ {(error_status = CBF_ARGUMENT);}; } } -SWIGINTERN void cbf_handle_struct_get_real_image_sf_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int ndimslow,int ndimfast){ - void *array; - int reserved = 0; - *slen = 0; /* Initialise in case of problems */ - if ((array=malloc(elsize*ndimfast*ndimslow))) { - {(error_status = cbf_get_real_image_sf(self, - reserved, (unsigned int)element_number, - (void *)array, (size_t)elsize, - (size_t) ndimslow, (size_t)ndimfast));} - - -; - }else{ - {(error_status = CBF_ALLOC);}; - } - *slen = elsize*ndimfast*ndimslow; - *s = (char *) array; - } -SWIGINTERN void cbf_handle_struct_get_image_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int elsign,int ndimslow,int ndimfast){ - void *array; - int reserved = 0; - *slen = 0; /* Initialise in case of problems */ - if ((array=malloc(elsize*ndimfast*ndimslow))) { - {(error_status = cbf_get_image(self, - reserved, (unsigned int)element_number, - (void *)array, (size_t)elsize, elsign, - (size_t) ndimslow, (size_t)ndimfast));} - - +SWIGINTERN void cbf_handle_struct_require_datablock(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_require_datablock(self,arg));};} +SWIGINTERN void cbf_handle_struct_require_category(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_require_category(self,arg));};} +SWIGINTERN void cbf_handle_struct_require_column(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_require_column(self,arg));};} +SWIGINTERN char const *cbf_handle_struct_require_column_value(cbf_handle_struct *self,char const *columnname,char const *defaultvalue){ + const char * result; + {(error_status = cbf_require_column_value(self,columnname, + &result,defaultvalue));} ; - }else{ - {(error_status = CBF_ALLOC);}; - } - *slen = elsize*ndimfast*ndimslow; - *s = (char *) array; - } -SWIGINTERN void cbf_handle_struct_set_tag_root(cbf_handle_struct *self,char const *tagname,char const *tagroot_in){ - {(error_status = cbf_set_tag_root(self,tagname,tagroot_in));}; + return result; } -SWIGINTERN void cbf_handle_struct_write_widefile(cbf_handle_struct *self,char const *filename,int ciforcbf,int headers,int encoding){ - FILE *stream; - int readable; - /* Make readable false so we can close the file immediately */ - readable = 0; - if ( ! ( stream = fopen (filename, "w+b")) ){ - {(error_status = CBF_FILEOPEN);}; - } - else{ - {(error_status = cbf_write_widefile(self, stream, readable, - ciforcbf, headers, encoding));} +SWIGINTERN void cbf_handle_struct_require_column_integervalue(cbf_handle_struct *self,char const *columnname,int *number,int const defaultvalue){ + {(error_status = cbf_require_column_integervalue(self, + columnname, number,defaultvalue));} ; - fclose(stream); - - } - } -SWIGINTERN unsigned int cbf_handle_struct_count_rows(cbf_handle_struct *self){ - unsigned int result; - {(error_status = cbf_count_rows(self,&result));}; - return result;} -SWIGINTERN void cbf_handle_struct_require_datablock(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_require_datablock(self,arg));};} -SWIGINTERN void cbf_handle_struct_set_integerarray(cbf_handle_struct *self,unsigned int compression,int binary_id,char *data,int len,int elsize,int elsigned,int elements){ - /* safety check on args */ - size_t els, ele; - void *array; - if(len == elsize*elements){ - array = data; - els = elsize; - ele = elements; - {(error_status = cbf_set_integerarray (self, compression, binary_id, - (void *) data, (size_t) elsize, elsigned, (size_t) elements));} -; - }else{ - {(error_status = CBF_ARGUMENT);}; - } } -SWIGINTERN void cbf_handle_struct_new_datablock(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_new_datablock(self,arg));};} -SWIGINTERN void cbf_handle_struct_set_datestamp(cbf_handle_struct *self,int year,int month,int day,int hour,int minute,double second,int timezone,double precision){ - unsigned int reserved; - reserved = 0; - {(error_status = cbf_set_datestamp(self,reserved, - year,month,day,hour,minute,second,timezone,precision));} +SWIGINTERN void cbf_handle_struct_require_column_doublevalue(cbf_handle_struct *self,char const *columnname,double *number,double const defaultvalue){ + {(error_status = cbf_require_column_doublevalue(self, + columnname,number,defaultvalue));} ; - } -SWIGINTERN void cbf_handle_struct_next_row(cbf_handle_struct *self){ - {(error_status = cbf_next_row(self));};} + } +SWIGINTERN cbf_handle cbf_handle_struct_get_dictionary(cbf_handle_struct *self){ + cbf_handle temp; + {(error_status = cbf_get_dictionary(self,&temp));}; + return temp; +} +SWIGINTERN void cbf_handle_struct_set_dictionary(cbf_handle_struct *self,cbf_handle other){ + {(error_status = cbf_set_dictionary(self,other));}; +} +SWIGINTERN char const *cbf_handle_struct_find_category_root(cbf_handle_struct *self,char const *categoryname){ + const char * result; + {(error_status = cbf_find_category_root(self,categoryname,&result));}; + return result; +} SWIGINTERN void cbf_handle_struct_set_category_root(cbf_handle_struct *self,char const *categoryname,char const *categoryroot){ {(error_status = cbf_set_category_root(self,categoryname,categoryroot));}; } -SWIGINTERN void cbf_handle_struct_get_axis_offset(cbf_handle_struct *self,char const *axis_id,double *offset1,double *offset2,double *offset3){ - {(error_status = cbf_get_axis_offset(self,axis_id, - offset1, offset2,offset3));} -; +SWIGINTERN char const *cbf_handle_struct_require_category_root(cbf_handle_struct *self,char const *categoryname){ + const char* result; + {(error_status = cbf_require_category_root(self,categoryname, &result));}; + return result; +} +SWIGINTERN char const *cbf_handle_struct_find_tag_root(cbf_handle_struct *self,char const *tagname){ + const char* result; + {(error_status = cbf_find_tag_root(self,tagname,&result));}; + return result; +} +SWIGINTERN void cbf_handle_struct_set_tag_root(cbf_handle_struct *self,char const *tagname,char const *tagroot_in){ + {(error_status = cbf_set_tag_root(self,tagname,tagroot_in));}; +} +SWIGINTERN char const *cbf_handle_struct_require_tag_root(cbf_handle_struct *self,char const *tagname){ + const char* result; + {(error_status = cbf_require_tag_root(self,tagname,&result));}; + return result; + } +SWIGINTERN char const *cbf_handle_struct_find_tag_category(cbf_handle_struct *self,char const *tagname){ + const char * result; + {(error_status = cbf_find_tag_category(self,tagname, &result));}; + return result; + } +SWIGINTERN void cbf_handle_struct_set_tag_category(cbf_handle_struct *self,char const *tagname,char const *categoryname_in){ + {(error_status = cbf_set_tag_category(self,tagname, categoryname_in));}; + } +SWIGINTERN void cbf_handle_struct_read_template(cbf_handle_struct *self,char *filename){ + /* CBFlib needs a stream that will remain open + hence DO NOT open from python */ + FILE *stream; + if ( ! ( stream = fopen (filename, "rb")) ){ + {(error_status = CBF_FILEOPEN);}; + } + else{ + {(error_status = cbf_read_template (self, stream));}; } } -SWIGINTERN void cbf_handle_struct_set_pixel_size_fs(cbf_handle_struct *self,unsigned int element_number,unsigned int axis_number,double psize){ - {(error_status = cbf_set_pixel_size_fs(self, - element_number, - axis_number, - psize));} - +SWIGINTERN char const *cbf_handle_struct_get_diffrn_id(cbf_handle_struct *self){ + const char* result; + {(error_status = cbf_get_diffrn_id(self, &result));}; + return result;} +SWIGINTERN void cbf_handle_struct_set_diffrn_id(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_set_diffrn_id(self,arg));};} +SWIGINTERN char const *cbf_handle_struct_get_crystal_id(cbf_handle_struct *self){ + const char* result; + {(error_status = cbf_get_crystal_id(self, &result));}; + return result;} +SWIGINTERN void cbf_handle_struct_set_crystal_id(cbf_handle_struct *self,char const *arg){ + {(error_status = cbf_set_crystal_id(self,arg));};} +SWIGINTERN double cbf_handle_struct_get_wavelength(cbf_handle_struct *self){ + double result; + {(error_status = cbf_get_wavelength(self,&result));}; + return result;} +SWIGINTERN void cbf_handle_struct_set_wavelength(cbf_handle_struct *self,double wavelength){ + {(error_status = cbf_set_wavelength(self,wavelength));};} +SWIGINTERN void cbf_handle_struct_get_polarization(cbf_handle_struct *self,double *in1,double *in2){ + {(error_status = cbf_get_polarization (self, in1, in2));}; + } +SWIGINTERN void cbf_handle_struct_set_polarization(cbf_handle_struct *self,double polarizn_source_ratio,double polarizn_source_norm){ + {(error_status = cbf_set_polarization(self, + polarizn_source_ratio, + polarizn_source_norm));} ; } -SWIGINTERN void cbf_handle_struct_insert_row(cbf_handle_struct *self,unsigned int arg){ - {(error_status = cbf_insert_row(self,arg));};} -SWIGINTERN void cbf_handle_struct_new_column(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_new_column(self,arg));};} -SWIGINTERN void cbf_handle_struct_get_real_3d_image_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int ndimslow,int ndimmid,int ndimfast){ - void *array; - int reserved = 0; - *slen = 0; /* Initialise in case of problems */ - if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { - {(error_status = cbf_get_real_3d_image(self, - reserved, (unsigned int)element_number, - (void *)array, (size_t)elsize, - (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast));} +SWIGINTERN void cbf_handle_struct_get_divergence(cbf_handle_struct *self,double *div_x_source,double *div_y_source,double *div_x_y_source){ + {(error_status = cbf_get_divergence(self, + div_x_source, + div_y_source, + div_x_y_source));} +; + } +SWIGINTERN void cbf_handle_struct_set_divergence(cbf_handle_struct *self,double div_x_source,double div_y_source,double div_x_y_source){ + {(error_status = cbf_set_divergence (self, div_x_source, + div_y_source,div_x_y_source));} ; - }else{ - {(error_status = CBF_ALLOC);}; - } - *slen = elsize*ndimfast*ndimmid*ndimslow; - *s = (char *) array; } +SWIGINTERN unsigned int cbf_handle_struct_count_elements(cbf_handle_struct *self){ + unsigned int result; + {(error_status = cbf_count_elements(self,&result));}; + return result;} +SWIGINTERN void cbf_handle_struct_get_element_number(cbf_handle_struct *self){ + {(error_status = CBF_NOTIMPLEMENTED);};} +SWIGINTERN char const *cbf_handle_struct_get_element_id(cbf_handle_struct *self,unsigned int element_number){ + const char * result; + {(error_status = cbf_get_element_id (self, element_number, &result));}; + return result; + } +SWIGINTERN void cbf_handle_struct_get_gain(cbf_handle_struct *self,unsigned int element_number,double *gain,double *gain_esd){ + {(error_status = cbf_get_gain (self, element_number, gain, gain_esd));}; + } +SWIGINTERN void cbf_handle_struct_set_gain(cbf_handle_struct *self,unsigned int element_number,double gain,double gain_esd){ + {(error_status = cbf_set_gain (self, element_number, gain, gain_esd));}; + } +SWIGINTERN void cbf_handle_struct_get_overload(cbf_handle_struct *self,unsigned int element_number,double *overload){ + {(error_status = cbf_get_overload(self,element_number,overload));}; + } +SWIGINTERN void cbf_handle_struct_set_overload(cbf_handle_struct *self,unsigned int element_number,double overload){ + {(error_status = cbf_set_overload(self,element_number,overload));}; + } SWIGINTERN void cbf_handle_struct_get_integration_time(cbf_handle_struct *self,double *time){ unsigned int reserved; double tim; @@ -5289,49 +4430,73 @@ SWIGINTERN void cbf_handle_struct_get_integration_time(cbf_handle_struct *self,d {(error_status = cbf_get_integration_time(self,reserved,&tim));}; *time = tim; } -SWIGINTERN void cbf_handle_struct_set_realarray(cbf_handle_struct *self,unsigned int compression,int binary_id,char *data,int len,int elsize,int elements){ - /* safety check on args */ - size_t els, ele; - void *array; - if(len == elsize*elements){ - array = data; - els = elsize; - ele = elements; - {(error_status = cbf_set_realarray (self, compression, binary_id, - (void *) data, (size_t) elsize, (size_t) elements));} -; - }else{ - {(error_status = CBF_ARGUMENT);}; +SWIGINTERN void cbf_handle_struct_set_integration_time(cbf_handle_struct *self,double time){ + unsigned int reserved; + reserved = 0; + {(error_status = cbf_set_integration_time(self,reserved,time));}; + } +SWIGINTERN void cbf_handle_struct_get_timestamp(cbf_handle_struct *self,double *time,int *timezone){ + unsigned int reserved; + reserved = 0; + {(error_status = cbf_get_timestamp(self,reserved,time,timezone));}; + } +SWIGINTERN void cbf_handle_struct_set_timestamp(cbf_handle_struct *self,double time,int timezone,double precision){ + unsigned int reserved; + reserved = 0; + {(error_status = cbf_set_timestamp(self,reserved,time,timezone,precision));}; + } +SWIGINTERN void cbf_handle_struct_get_datestamp(cbf_handle_struct *self,int *year,int *month,int *day,int *hour,int *minute,double *second,int *timezone){ + unsigned int reserved; + reserved = 0; + {(error_status = cbf_get_datestamp(self,reserved, + year,month,day,hour,minute,second,timezone));} +; + } +SWIGINTERN void cbf_handle_struct_set_datestamp(cbf_handle_struct *self,int year,int month,int day,int hour,int minute,double second,int timezone,double precision){ + unsigned int reserved; + reserved = 0; + {(error_status = cbf_set_datestamp(self,reserved, + year,month,day,hour,minute,second,timezone,precision));} +; + } +SWIGINTERN void cbf_handle_struct_set_current_timestamp(cbf_handle_struct *self,int timezone){ + unsigned int reserved; + reserved = 0; + {(error_status = cbf_set_current_timestamp(self,reserved,timezone));}; + } +SWIGINTERN void cbf_handle_struct_get_image_size(cbf_handle_struct *self,unsigned int element_number,int *ndimslow,int *ndimfast){ + unsigned int reserved; + size_t inslow, infast; + reserved = 0; + {(error_status = cbf_get_image_size(self,reserved,element_number,&inslow,&infast));}; + *ndimslow = (int)inslow; + *ndimfast = (int)infast; + } +SWIGINTERN void cbf_handle_struct_get_image_size_fs(cbf_handle_struct *self,unsigned int element_number,int *ndimfast,int *ndimslow){ + unsigned int reserved; + size_t infast, inslow; + reserved = 0; + {(error_status = cbf_get_image_size_fs(self,reserved,element_number,&infast,&inslow));}; + *ndimfast = (int)infast; /* FIXME - is that how to convert? */ + *ndimslow = (int)inslow; + } +SWIGINTERN void cbf_handle_struct_get_image_size_sf(cbf_handle_struct *self,unsigned int element_number,int *ndimslow,int *ndimfast){ + unsigned int reserved; + size_t inslow, infast; + reserved = 0; + {(error_status = cbf_get_image_size(self,reserved,element_number,&inslow,&infast));}; + *ndimslow = (int)inslow; + *ndimfast = (int)infast; + } +SWIGINTERN void cbf_handle_struct_get_3d_image_size(cbf_handle_struct *self,unsigned int element_number,int *ndimslow,int *ndimmid,int *ndimfast){ + unsigned int reserved; + size_t inslow, inmid, infast; + reserved = 0; + {(error_status = cbf_get_3d_image_size(self,reserved,element_number,&inslow,&inmid,&infast));}; + *ndimslow = (int)inslow; /* FIXME - is that how to convert? */ + *ndimmid = (int)inmid; + *ndimfast = (int)infast; } - } -SWIGINTERN char const *cbf_handle_struct_get_element_id(cbf_handle_struct *self,unsigned int element_number){ - const char * result; - {(error_status = cbf_get_element_id (self, element_number, &result));}; - return result; - } -SWIGINTERN void cbf_handle_struct_get_image_sf_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int elsign,int ndimslow,int ndimfast){ - void *array; - int reserved = 0; - *slen = 0; /* Initialise in case of problems */ - if ((array=malloc(elsize*ndimfast*ndimslow))) { - {(error_status = cbf_get_image_sf(self, - reserved, (unsigned int)element_number, - (void *)array, (size_t)elsize, elsign, - (size_t) ndimslow, (size_t)ndimfast));} - - -; - }else{ - {(error_status = CBF_ALLOC);}; - } - *slen = elsize*ndimfast*ndimslow; - *s = (char *) array; - } -SWIGINTERN cbf_positioner cbf_handle_struct_construct_positioner(cbf_handle_struct *self,char const *axis_id){ - cbf_positioner positioner; - {(error_status = cbf_construct_positioner(self,&positioner,axis_id));}; - return positioner; - } SWIGINTERN void cbf_handle_struct_get_3d_image_size_fs(cbf_handle_struct *self,unsigned int element_number,int *ndimfast,int *ndimmid,int *ndimslow){ unsigned int reserved; size_t inslow, inmid, infast; @@ -5341,194 +4506,1259 @@ SWIGINTERN void cbf_handle_struct_get_3d_image_size_fs(cbf_handle_struct *self,u *ndimmid = (int)inmid; *ndimfast = (int)infast; } -SWIGINTERN void cbf_handle_struct_set_value(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_set_value(self,arg));};} -SWIGINTERN void cbf_handle_struct_set_current_timestamp(cbf_handle_struct *self,int timezone){ +SWIGINTERN void cbf_handle_struct_get_3d_image_size_sf(cbf_handle_struct *self,unsigned int element_number,int *ndimslow,int *ndimmid,int *ndimfast){ unsigned int reserved; - reserved = 0; - {(error_status = cbf_set_current_timestamp(self,reserved,timezone));}; + size_t inslow, inmid, infast; + reserved = 0; + {(error_status = cbf_get_3d_image_size_sf(self,reserved,element_number,&inslow,&inmid,&infast));}; + *ndimslow = (int)inslow; /* FIXME - is that how to convert? */ + *ndimmid = (int)inmid; + *ndimfast = (int)infast; } -SWIGINTERN void cbf_handle_struct_require_doublevalue(cbf_handle_struct *self,double *number,double defaultvalue){ - {(error_status = cbf_require_doublevalue(self,number,defaultvalue));}; -} -SWIGINTERN void cbf_handle_struct_rewind_datablock(cbf_handle_struct *self){ - {(error_status = cbf_rewind_datablock(self));};} -SWIGINTERN char const *cbf_handle_struct_require_column_value(cbf_handle_struct *self,char const *columnname,char const *defaultvalue){ - const char * result; - {(error_status = cbf_require_column_value(self,columnname, - &result,defaultvalue));} + +#define SWIG_PYTHON_STRICT_BYTE_CHAR + +SWIGINTERN void cbf_handle_struct_get_image_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int elsign,int ndimslow,int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + {(error_status = cbf_get_image(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimslow, (size_t)ndimfast));} + + ; - return result; -} -SWIGINTERN cbf_handle cbf_handle_struct_get_dictionary(cbf_handle_struct *self){ - cbf_handle temp; - {(error_status = cbf_get_dictionary(self,&temp));}; - return temp; -} -SWIGINTERN void cbf_handle_struct_reset_saveframe(cbf_handle_struct *self){ - {(error_status = cbf_reset_saveframe(self));};} -SWIGINTERN void cbf_handle_struct_set_reciprocal_cell(cbf_handle_struct *self,double cell[6]){ - {(error_status = cbf_set_reciprocal_cell(self,cell,NULL));}; - } -SWIGINTERN void cbf_handle_struct_set_reciprocal_cell_esd(cbf_handle_struct *self,double cell_esd[6]){ - {(error_status = cbf_set_reciprocal_cell(self,NULL,cell_esd));}; - } -SWIGINTERN void cbf_handle_struct_set_real_3d_image_fs(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int ndimfast,int ndimmid,int ndimslow){ - /* safety check on args */ - size_t els; - unsigned int reserved; + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } + +#define SWIG_PYTHON_STRICT_BYTE_CHAR + +SWIGINTERN void cbf_handle_struct_get_image_fs_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int elsign,int ndimfast,int ndimslow){ void *array; - if(len == elsize*ndimslow*ndimmid*ndimfast){ - array = data; - els = elsize; - reserved = 0; - {(error_status = cbf_set_real_3d_image_fs (self, reserved, element_number, compression, - (void *) data, (size_t) elsize, (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow));} -; - }else{ - {(error_status = CBF_ARGUMENT);}; - } - } -SWIGINTERN void cbf_handle_struct_set_doublevalue(cbf_handle_struct *self,char const *format,double number){ - {(error_status = cbf_set_doublevalue(self,format,number));};} -SWIGINTERN void cbf_handle_struct_find_category(cbf_handle_struct *self,char const *arg){ - {(error_status = cbf_find_category(self,arg));};} -SWIGINTERN void cbf_handle_struct_get_integerarrayparameters_wdims_fs(cbf_handle_struct *self,int *compression,int *binary_id,int *elsize,int *elsigned,int *elunsigned,int *elements,int *minelement,int *maxelement,char **bo,int *bolen,int *dimfast,int *dimmid,int *dimslow,int *padding){ - unsigned int comp; - size_t elsiz, elem, df,dm,ds,pd; - const char * byteorder; - char * bot; - {(error_status = cbf_get_integerarrayparameters_wdims_fs(self, - &comp,binary_id, &elsiz, elsigned, elunsigned, &elem, - minelement, maxelement, &byteorder,&df,&dm,&ds,&pd ));} + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + {(error_status = cbf_get_image_fs(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimfast, (size_t)ndimslow));} + ; - *bolen = strlen(byteorder); - if (!(bot = (char *)malloc(*bolen))) {{(error_status = CBF_ALLOC);}} - strncpy(bot,byteorder,*bolen); - *bo = bot; - *compression = comp; - *elsize = elsiz; - *elements = elem; - *dimfast = df; - *dimmid = dm; - *dimslow = ds; - *padding = pd; - - } -SWIGINTERN void cbf_handle_struct_set_realarray_wdims_fs(cbf_handle_struct *self,unsigned int compression,int binary_id,char *data,int len,int elsize,int elements,char *bo,int bolen,int dimfast,int dimmid,int dimslow,int padding){ - /* safety check on args */ - size_t els, ele; + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } + +#define SWIG_PYTHON_STRICT_BYTE_CHAR + +SWIGINTERN void cbf_handle_struct_get_image_sf_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int elsign,int ndimslow,int ndimfast){ void *array; - char byteorder[15]; - if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ - array = data; - els = elsize; - ele = elements; - strncpy(byteorder,bo,bolen<15?bolen:14); - byteorder[bolen<15?bolen:14] = 0; - {(error_status = cbf_set_realarray_wdims_fs (self, compression, binary_id, - (void *) data, (size_t) elsize, (size_t) elements, (const char *)byteorder, - (size_t) dimfast, (size_t) dimmid, (size_t) dimslow, (size_t)padding));} + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + {(error_status = cbf_get_image_sf(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimslow, (size_t)ndimfast));} -; - }else{ - {(error_status = CBF_ARGUMENT);}; - } - } -SWIGINTERN char const *cbf_handle_struct_find_category_root(cbf_handle_struct *self,char const *categoryname){ - const char * result; - {(error_status = cbf_find_category_root(self,categoryname,&result));}; - return result; + +; + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } + +#define SWIG_PYTHON_STRICT_BYTE_CHAR + +SWIGINTERN void cbf_handle_struct_get_real_image_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int ndimslow,int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + {(error_status = cbf_get_real_image(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimfast));} + + +; + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } + +#define SWIG_PYTHON_STRICT_BYTE_CHAR + +SWIGINTERN void cbf_handle_struct_get_real_image_fs_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int ndimfast,int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + {(error_status = cbf_get_real_image_fs(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimfast, (size_t)ndimslow));} + + +; + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } + +#define SWIG_PYTHON_STRICT_BYTE_CHAR + +SWIGINTERN void cbf_handle_struct_get_real_image_sf_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int ndimslow,int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimslow))) { + {(error_status = cbf_get_real_image_sf(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimfast));} + + +; + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*ndimfast*ndimslow; + *s = (char *) array; + } + +#define SWIG_PYTHON_STRICT_BYTE_CHAR + +SWIGINTERN void cbf_handle_struct_get_3d_image_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int elsign,int ndimfast,int ndimmid,int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + {(error_status = cbf_get_3d_image(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast));} + + +; + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } + +#define SWIG_PYTHON_STRICT_BYTE_CHAR + +SWIGINTERN void cbf_handle_struct_get_3d_image_fs_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int elsign,int ndimfast,int ndimmid,int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + {(error_status = cbf_get_3d_image_fs(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow));} + + +; + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } + +#define SWIG_PYTHON_STRICT_BYTE_CHAR + +SWIGINTERN void cbf_handle_struct_get_3d_image_sf_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int elsign,int ndimfast,int ndimmid,int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + {(error_status = cbf_get_3d_image_sf(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, elsign, + (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast));} + + +; + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } + +#define SWIG_PYTHON_STRICT_BYTE_CHAR + +SWIGINTERN void cbf_handle_struct_get_real_3d_image_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int ndimslow,int ndimmid,int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + {(error_status = cbf_get_real_3d_image(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast));} + + +; + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } + +#define SWIG_PYTHON_STRICT_BYTE_CHAR + +SWIGINTERN void cbf_handle_struct_get_real_3d_image_fs_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int ndimfast,int ndimmid,int ndimslow){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + {(error_status = cbf_get_real_3d_image_fs(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow));} + + +; + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } + +#define SWIG_PYTHON_STRICT_BYTE_CHAR + +SWIGINTERN void cbf_handle_struct_get_real_3d_image_sf_as_string(cbf_handle_struct *self,int element_number,char **s,int *slen,int elsize,int ndimslow,int ndimmid,int ndimfast){ + void *array; + int reserved = 0; + *slen = 0; /* Initialise in case of problems */ + if ((array=malloc(elsize*ndimfast*ndimmid*ndimslow))) { + {(error_status = cbf_get_real_3d_image_sf(self, + reserved, (unsigned int)element_number, + (void *)array, (size_t)elsize, + (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast));} + + +; + }else{ + {(error_status = CBF_ALLOC);}; + } + *slen = elsize*ndimfast*ndimmid*ndimslow; + *s = (char *) array; + } +SWIGINTERN void cbf_handle_struct_set_image(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int elsign,int ndimslow,int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + {(error_status = cbf_set_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t)ndimfast));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_set_image_fs(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int elsign,int ndimfast,int ndimslow){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + {(error_status = cbf_set_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimfast, (size_t)ndimslow));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_set_image_sf(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int elsign,int ndimslow,int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + {(error_status = cbf_set_image_sf (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t)ndimfast));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_set_real_image(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int ndimslow,int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + {(error_status = cbf_set_real_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimfast));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_set_real_image_fs(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int ndimfast,int ndimslow){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + {(error_status = cbf_set_real_image_fs (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimfast, (size_t)ndimslow));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_set_real_image_sf(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int ndimslow,int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimfast){ + array = data; + els = elsize; + reserved = 0; + {(error_status = cbf_set_real_image_sf (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimfast));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_set_3d_image(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int elsign,int ndimslow,int ndimmid,int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + {(error_status = cbf_set_3d_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t) ndimmid, (size_t)ndimfast));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_set_3d_image_fs(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int elsign,int ndimfast,int ndimmid,int ndimslow){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + {(error_status = cbf_set_3d_image_fs (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimfast, (size_t) ndimmid, (size_t)ndimslow));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_set_3d_image_sf(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int elsign,int ndimslow,int ndimmid,int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + {(error_status = cbf_set_3d_image_sf (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t) ndimmid, (size_t)ndimfast));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_set_real_3d_image(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int ndimslow,int ndimmid,int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + {(error_status = cbf_set_real_3d_image (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_set_real_3d_image_fs(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int ndimfast,int ndimmid,int ndimslow){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + {(error_status = cbf_set_real_3d_image_fs (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimfast, (size_t)ndimmid, (size_t)ndimslow));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_set_real_3d_image_sf(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int ndimslow,int ndimmid,int ndimfast){ + /* safety check on args */ + size_t els; + unsigned int reserved; + void *array; + if(len == elsize*ndimslow*ndimmid*ndimfast){ + array = data; + els = elsize; + reserved = 0; + {(error_status = cbf_set_real_3d_image_sf (self, reserved, element_number, compression, + (void *) data, (size_t) elsize, (size_t) ndimslow, (size_t)ndimmid, (size_t)ndimfast));} +; + }else{ + {(error_status = CBF_ARGUMENT);}; + } + } +SWIGINTERN void cbf_handle_struct_count_axis_ancestors(cbf_handle_struct *self,char const *axis_id,int *ancestors){ + unsigned int anc; + {(error_status = cbf_count_axis_ancestors(self,axis_id,&anc));}; + *ancestors = anc; + } +SWIGINTERN char const *cbf_handle_struct_get_axis_ancestor(cbf_handle_struct *self,char const *axis_id,int ancestor_index){ + const char* anc; + {(error_status = cbf_get_axis_ancestor(self,axis_id, + (unsigned int)ancestor_index,&anc));} +; + return anc; + } +SWIGINTERN char const *cbf_handle_struct_get_axis_depends_on(cbf_handle_struct *self,char const *axis_id){ + const char* dep_on; + {(error_status = cbf_get_axis_depends_on(self,axis_id, + &dep_on));} +; + return dep_on; + } +SWIGINTERN char const *cbf_handle_struct_get_axis_equipment(cbf_handle_struct *self,char const *axis_id){ + const char* equip; + {(error_status = cbf_get_axis_equipment(self,axis_id, + &equip));} +; + return equip; + } +SWIGINTERN char const *cbf_handle_struct_get_axis_equipment_component(cbf_handle_struct *self,char const *axis_id){ + const char* equip_comp; + {(error_status = cbf_get_axis_equipment_component(self,axis_id, + &equip_comp));} +; + return equip_comp; + } +SWIGINTERN void cbf_handle_struct_get_axis_offset(cbf_handle_struct *self,char const *axis_id,double *offset1,double *offset2,double *offset3){ + {(error_status = cbf_get_axis_offset(self,axis_id, + offset1, offset2,offset3));} +; + } +SWIGINTERN void cbf_handle_struct_get_axis_rotation(cbf_handle_struct *self,char const *axis_id,double *rotation){ + {(error_status = cbf_get_axis_rotation(self,axis_id, + rotation));} +; + } +SWIGINTERN char const *cbf_handle_struct_get_axis_rotation_axis(cbf_handle_struct *self,char const *axis_id){ + const char* rot_axis; + {(error_status = cbf_get_axis_rotation_axis(self,axis_id, + &rot_axis));} +; + return rot_axis; + } +SWIGINTERN void cbf_handle_struct_get_axis_setting(cbf_handle_struct *self,char const *axis_id,double *start,double *increment){ + unsigned int reserved; + reserved = 0; + {(error_status = cbf_get_axis_setting(self,reserved,axis_id, + start,increment));} +; + } +SWIGINTERN char const *cbf_handle_struct_get_axis_type(cbf_handle_struct *self,char const *axis_id){ + cbf_axis_type axis_type; + {(error_status = cbf_get_axis_type(self,axis_id, + &axis_type));} +; + if (axis_type == CBF_TRANSLATION_AXIS) return "translation"; + if (axis_type == CBF_ROTATION_AXIS) return "rotation"; + return "general"; + } +SWIGINTERN void cbf_handle_struct_get_axis_vector(cbf_handle_struct *self,char const *axis_id,double *vector1,double *vector2,double *vector3){ + {(error_status = cbf_get_axis_vector(self,axis_id, + vector1, vector2,vector3));} +; + } +SWIGINTERN void cbf_handle_struct_set_axis_setting(cbf_handle_struct *self,char const *axis_id,double start,double increment){ + unsigned int reserved; + reserved = 0; + {(error_status = cbf_set_axis_setting(self,reserved, + axis_id,start,increment));} +; + } +SWIGINTERN cbf_goniometer cbf_handle_struct_construct_goniometer(cbf_handle_struct *self){ + cbf_goniometer goniometer; + {(error_status = cbf_construct_goniometer(self,&goniometer));}; + return goniometer; + } +SWIGINTERN cbf_detector cbf_handle_struct_construct_detector(cbf_handle_struct *self,unsigned int element_number){ + cbf_detector detector; + {(error_status = cbf_construct_detector(self,&detector,element_number));}; + return detector; + } +SWIGINTERN cbf_detector cbf_handle_struct_construct_reference_detector(cbf_handle_struct *self,unsigned int element_number){ + cbf_detector detector; + {(error_status = cbf_construct_reference_detector(self,&detector,element_number));}; + return detector; + } +SWIGINTERN cbf_detector cbf_handle_struct_require_reference_detector(cbf_handle_struct *self,unsigned int element_number){ + cbf_detector detector; + {(error_status = cbf_require_reference_detector(self,&detector,element_number));}; + return detector; + } +SWIGINTERN cbf_positioner cbf_handle_struct_construct_positioner(cbf_handle_struct *self,char const *axis_id){ + cbf_positioner positioner; + {(error_status = cbf_construct_positioner(self,&positioner,axis_id));}; + return positioner; + } +SWIGINTERN cbf_positioner cbf_handle_struct_construct_reference_positioner(cbf_handle_struct *self,char const *axis_id){ + cbf_positioner positioner; + {(error_status = cbf_construct_reference_positioner(self,&positioner,axis_id));}; + return positioner; + } +SWIGINTERN void cbf_handle_struct_get_pixel_size(cbf_handle_struct *self,unsigned int element_number,unsigned int axis_number,double *psize){ + {(error_status = cbf_get_pixel_size(self, + element_number, + axis_number, + psize));} + + +; + } +SWIGINTERN void cbf_handle_struct_get_pixel_size_fs(cbf_handle_struct *self,unsigned int element_number,unsigned int axis_number,double *psize){ + {(error_status = cbf_get_pixel_size_fs(self, + element_number, + axis_number, + psize));} + + +; + } +SWIGINTERN void cbf_handle_struct_get_pixel_size_sf(cbf_handle_struct *self,unsigned int element_number,unsigned int axis_number,double *psize){ + {(error_status = cbf_get_pixel_size_sf(self, + element_number, + axis_number, + psize));} + + +; + } +SWIGINTERN void cbf_handle_struct_set_pixel_size(cbf_handle_struct *self,unsigned int element_number,unsigned int axis_number,double psize){ + {(error_status = cbf_set_pixel_size(self, + element_number, + axis_number, + psize));} + + +; + } +SWIGINTERN void cbf_handle_struct_set_pixel_size_fs(cbf_handle_struct *self,unsigned int element_number,unsigned int axis_number,double psize){ + {(error_status = cbf_set_pixel_size_fs(self, + element_number, + axis_number, + psize));} + + +; + } +SWIGINTERN void cbf_handle_struct_set_pixel_size_sf(cbf_handle_struct *self,unsigned int element_number,unsigned int axis_number,double psize){ + {(error_status = cbf_set_pixel_size_sf(self, + element_number, + axis_number, + psize));} + + +; + } +SWIGINTERN void cbf_handle_struct_get_unit_cell(cbf_handle_struct *self,double *a,double *b,double *c,double *alpha,double *beta,double *gamma){ + double cell[6]; + {(error_status = cbf_get_unit_cell(self,cell,NULL));}; + *a = cell[0]; + *b = cell[1]; + *c = cell[2]; + *alpha = cell[3]; + *beta = cell[4]; + *gamma = cell[5]; + } +SWIGINTERN void cbf_handle_struct_get_unit_cell_esd(cbf_handle_struct *self,double *a_esd,double *b_esd,double *c_esd,double *alpha_esd,double *beta_esd,double *gamma_esd){ + double cell_esd[6]; + {(error_status = cbf_get_unit_cell(self,NULL,cell_esd));}; + *a_esd = cell_esd[0]; + *b_esd = cell_esd[1]; + *c_esd = cell_esd[2]; + *alpha_esd = cell_esd[3]; + *beta_esd = cell_esd[4]; + *gamma_esd = cell_esd[5]; + } +SWIGINTERN void cbf_handle_struct_set_unit_cell(cbf_handle_struct *self,double cell[6]){ + {(error_status = cbf_set_unit_cell(self,cell,NULL));}; + } +SWIGINTERN void cbf_handle_struct_set_unit_cell_esd(cbf_handle_struct *self,double cell_esd[6]){ + {(error_status = cbf_set_unit_cell(self,NULL,cell_esd));}; + } +SWIGINTERN void cbf_handle_struct_get_reciprocal_cell(cbf_handle_struct *self,double *astar,double *bstar,double *cstar,double *alphastar,double *betastar,double *gammastar){ + double rcell[6]; + {(error_status = cbf_get_reciprocal_cell(self,rcell,NULL));}; + *astar = rcell[0]; + *bstar = rcell[1]; + *cstar = rcell[2]; + *alphastar = rcell[3]; + *betastar = rcell[4]; + *gammastar = rcell[5]; + } +SWIGINTERN void cbf_handle_struct_get_reciprocal_cell_esd(cbf_handle_struct *self,double *a_esd,double *b_esd,double *c_esd,double *alpha_esd,double *beta_esd,double *gamma_esd){ + double cell_esd[6]; + {(error_status = cbf_get_reciprocal_cell(self,NULL,cell_esd));}; + *a_esd = cell_esd[0]; + *b_esd = cell_esd[1]; + *c_esd = cell_esd[2]; + *alpha_esd = cell_esd[3]; + *beta_esd = cell_esd[4]; + *gamma_esd = cell_esd[5]; + } +SWIGINTERN void cbf_handle_struct_set_reciprocal_cell(cbf_handle_struct *self,double cell[6]){ + {(error_status = cbf_set_reciprocal_cell(self,cell,NULL));}; + } +SWIGINTERN void cbf_handle_struct_set_reciprocal_cell_esd(cbf_handle_struct *self,double cell_esd[6]){ + {(error_status = cbf_set_reciprocal_cell(self,NULL,cell_esd));}; + } +SWIGINTERN void cbf_handle_struct_get_orientation_matrix(cbf_handle_struct *self,double *m0,double *m1,double *m2,double *m3,double *m4,double *m5,double *m6,double *m7,double *m8){ + double m[9]; + {(error_status = cbf_get_orientation_matrix(self,m));}; + *m0 = m[0]; *m1=m[1] ; *m2=m[2] ; + *m3 = m[3]; *m4=m[4] ; *m5=m[5] ; + *m6 = m[6]; *m7=m[7] ; *m8=m[8] ; + } +SWIGINTERN void cbf_handle_struct_set_orientation_matrix(cbf_handle_struct *self,double m0,double m1,double m2,double m3,double m4,double m5,double m6,double m7,double m8){ + double m[9]; + m[0] = m0; m[1]=m1 ; m[2]=m2 ; + m[3] = m3; m[4]=m4 ; m[5]=m5 ; + m[6] = m6; m[7]=m7 ; m[8]=m8 ; + {(error_status = cbf_get_orientation_matrix(self,m));}; + } +SWIGINTERN void cbf_handle_struct_get_bin_sizes(cbf_handle_struct *self,int element_number,double *slowbinsize,double *fastbinsize){ + {(error_status = cbf_get_bin_sizes (self, (unsigned int)element_number, slowbinsize, fastbinsize));}; + } +SWIGINTERN void cbf_handle_struct_set_bin_sizes(cbf_handle_struct *self,int element_number,double slowbinsize_in,double fastbinsize_in){ + {(error_status = cbf_set_bin_sizes(self,element_number,slowbinsize_in,fastbinsize_in));}; + } +SWIGINTERN void cbf_handle_struct_get_axis_poise(cbf_handle_struct *self,double ratio,double *vector1,double *vector2,double *vector3,double *offset1,double *offset2,double *offset3,double *angle,char const *axis_id,char const *frame_id){ + {(error_status = cbf_get_axis_poise(self, ratio, + vector1, vector2, vector3, + offset1, offset2, offset3, angle, + axis_id, frame_id));} + + +; + } +SWIGINTERN void cbf_handle_struct_get_axis_reference_poise(cbf_handle_struct *self,double *vector1,double *vector2,double *vector3,double *offset1,double *offset2,double *offset3,char const *axis_id){ + {(error_status = cbf_get_axis_reference_poise(self, + vector1, vector2, vector3, + offset1, offset2, offset3, + axis_id));} + + +; + } +#ifdef __cplusplus +extern "C" { +#endif +SWIGINTERN PyObject *_wrap_new_doubleArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + size_t arg1 ; + size_t val1 ; + int ecode1 = 0 ; + PyObject *swig_obj[1] ; + doubleArray *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_doubleArray" "', argument " "1"" of type '" "size_t""'"); + } + arg1 = (size_t)(val1); + result = (doubleArray *)new_doubleArray(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_doubleArray, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_doubleArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + doubleArray *arg1 = (doubleArray *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_doubleArray, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_doubleArray" "', argument " "1"" of type '" "doubleArray *""'"); + } + arg1 = (doubleArray *)(argp1); + delete_doubleArray(arg1); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_doubleArray___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + doubleArray *arg1 = (doubleArray *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + double result; + + if (!SWIG_Python_UnpackTuple(args, "doubleArray___getitem__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_doubleArray, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "doubleArray___getitem__" "', argument " "1"" of type '" "doubleArray *""'"); + } + arg1 = (doubleArray *)(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "doubleArray___getitem__" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = (size_t)(val2); + result = (double)doubleArray___getitem__(arg1,arg2); + resultobj = SWIG_From_double((double)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_doubleArray___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + doubleArray *arg1 = (doubleArray *) 0 ; + size_t arg2 ; + double arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "doubleArray___setitem__", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_doubleArray, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "doubleArray___setitem__" "', argument " "1"" of type '" "doubleArray *""'"); + } + arg1 = (doubleArray *)(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "doubleArray___setitem__" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = (size_t)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "doubleArray___setitem__" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + doubleArray___setitem__(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_doubleArray_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + doubleArray *arg1 = (doubleArray *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_doubleArray, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "doubleArray_cast" "', argument " "1"" of type '" "doubleArray *""'"); + } + arg1 = (doubleArray *)(argp1); + result = (double *)doubleArray_cast(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_doubleArray_frompointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + double *arg1 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + doubleArray *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "doubleArray_frompointer" "', argument " "1"" of type '" "double *""'"); + } + arg1 = (double *)(argp1); + result = (doubleArray *)doubleArray_frompointer(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_doubleArray, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *doubleArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_doubleArray, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *doubleArray_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_intArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + size_t arg1 ; + size_t val1 ; + int ecode1 = 0 ; + PyObject *swig_obj[1] ; + intArray *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_intArray" "', argument " "1"" of type '" "size_t""'"); + } + arg1 = (size_t)(val1); + result = (intArray *)new_intArray(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_intArray, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_intArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + intArray *arg1 = (intArray *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_intArray, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_intArray" "', argument " "1"" of type '" "intArray *""'"); + } + arg1 = (intArray *)(argp1); + delete_intArray(arg1); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_intArray___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + intArray *arg1 = (intArray *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + int result; + + if (!SWIG_Python_UnpackTuple(args, "intArray___getitem__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_intArray, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "intArray___getitem__" "', argument " "1"" of type '" "intArray *""'"); + } + arg1 = (intArray *)(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "intArray___getitem__" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = (size_t)(val2); + result = (int)intArray___getitem__(arg1,arg2); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_intArray___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + intArray *arg1 = (intArray *) 0 ; + size_t arg2 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "intArray___setitem__", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_intArray, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "intArray___setitem__" "', argument " "1"" of type '" "intArray *""'"); + } + arg1 = (intArray *)(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "intArray___setitem__" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = (size_t)(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "intArray___setitem__" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + intArray___setitem__(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_intArray_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + intArray *arg1 = (intArray *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_intArray, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "intArray_cast" "', argument " "1"" of type '" "intArray *""'"); + } + arg1 = (intArray *)(argp1); + result = (int *)intArray_cast(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_intArray_frompointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + int *arg1 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + intArray *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_int, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "intArray_frompointer" "', argument " "1"" of type '" "int *""'"); + } + arg1 = (int *)(argp1); + result = (intArray *)intArray_frompointer(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_intArray, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *intArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_intArray, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *intArray_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_shortArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + size_t arg1 ; + size_t val1 ; + int ecode1 = 0 ; + PyObject *swig_obj[1] ; + shortArray *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_shortArray" "', argument " "1"" of type '" "size_t""'"); + } + arg1 = (size_t)(val1); + result = (shortArray *)new_shortArray(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_shortArray, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_shortArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + shortArray *arg1 = (shortArray *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_shortArray, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_shortArray" "', argument " "1"" of type '" "shortArray *""'"); + } + arg1 = (shortArray *)(argp1); + delete_shortArray(arg1); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_shortArray___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + shortArray *arg1 = (shortArray *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + short result; + + if (!SWIG_Python_UnpackTuple(args, "shortArray___getitem__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_shortArray, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "shortArray___getitem__" "', argument " "1"" of type '" "shortArray *""'"); + } + arg1 = (shortArray *)(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "shortArray___getitem__" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = (size_t)(val2); + result = (short)shortArray___getitem__(arg1,arg2); + resultobj = SWIG_From_short((short)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_shortArray___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + shortArray *arg1 = (shortArray *) 0 ; + size_t arg2 ; + short arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + short val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "shortArray___setitem__", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_shortArray, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "shortArray___setitem__" "', argument " "1"" of type '" "shortArray *""'"); + } + arg1 = (shortArray *)(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "shortArray___setitem__" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = (size_t)(val2); + ecode3 = SWIG_AsVal_short(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "shortArray___setitem__" "', argument " "3"" of type '" "short""'"); + } + arg3 = (short)(val3); + shortArray___setitem__(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_shortArray_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + shortArray *arg1 = (shortArray *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + short *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_shortArray, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "shortArray_cast" "', argument " "1"" of type '" "shortArray *""'"); + } + arg1 = (shortArray *)(argp1); + result = (short *)shortArray_cast(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_short, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_shortArray_frompointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + short *arg1 = (short *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + shortArray *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_short, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "shortArray_frompointer" "', argument " "1"" of type '" "short *""'"); + } + arg1 = (short *)(argp1); + result = (shortArray *)shortArray_frompointer(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_shortArray, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *shortArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_shortArray, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); } -SWIGINTERN void cbf_handle_struct_set_integerarray_wdims_fs(cbf_handle_struct *self,unsigned int compression,int binary_id,char *data,int len,int elsize,int elsigned,int elements,char *bo,int bolen,int dimfast,int dimmid,int dimslow,int padding){ - /* safety check on args */ - size_t els, ele; - void *array; - char byteorder[15]; - if(len == elsize*elements && elements==dimfast*dimmid*dimslow){ - array = data; - els = elsize; - ele = elements; - strncpy(byteorder,bo,bolen<15?bolen:14); - byteorder[bolen<15?bolen:14] = 0; - {(error_status = cbf_set_integerarray_wdims_fs (self, compression, binary_id, - (void *) data, (size_t) elsize, elsigned, (size_t) elements, (const char *)byteorder, - (size_t)dimfast, (size_t)dimmid, (size_t)dimslow, (size_t)padding));} -; - }else{ - {(error_status = CBF_ARGUMENT);}; - } - } -SWIGINTERN void cbf_handle_struct_set_image_sf(cbf_handle_struct *self,unsigned int element_number,unsigned int compression,char *data,int len,int elsize,int elsign,int ndimslow,int ndimfast){ - /* safety check on args */ - size_t els; - unsigned int reserved; - void *array; - if(len == elsize*ndimslow*ndimfast){ - array = data; - els = elsize; - reserved = 0; - {(error_status = cbf_set_image_sf (self, reserved, element_number, compression, - (void *) data, (size_t) elsize, elsign, (size_t) ndimslow, (size_t)ndimfast));} -; - }else{ - {(error_status = CBF_ARGUMENT);}; - } - } -SWIGINTERN char const *cbf_handle_struct_get_axis_equipment(cbf_handle_struct *self,char const *axis_id){ - const char* equip; - {(error_status = cbf_get_axis_equipment(self,axis_id, - &equip));} -; - return equip; - } -SWIGINTERN void cbf_handle_struct_set_unit_cell(cbf_handle_struct *self,double cell[6]){ - {(error_status = cbf_set_unit_cell(self,cell,NULL));}; - } -SWIGINTERN void cbf_handle_struct_set_unit_cell_esd(cbf_handle_struct *self,double cell_esd[6]){ - {(error_status = cbf_set_unit_cell(self,NULL,cell_esd));}; - } -#ifdef __cplusplus -extern "C" { -#endif -SWIGINTERN PyObject *_wrap_new_doubleArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *shortArray_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_longArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; size_t arg1 ; size_t val1 ; int ecode1 = 0 ; - PyObject * obj0 = 0 ; - doubleArray *result = 0 ; + PyObject *swig_obj[1] ; + longArray *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:new_doubleArray",&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(obj0, &val1); + if (!args) SWIG_fail; + swig_obj[0] = args; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_doubleArray" "', argument " "1"" of type '" "size_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_longArray" "', argument " "1"" of type '" "size_t""'"); } arg1 = (size_t)(val1); - result = (doubleArray *)new_doubleArray(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_doubleArray, SWIG_POINTER_NEW | 0 ); + result = (longArray *)new_longArray(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_longArray, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_delete_doubleArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_delete_longArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - doubleArray *arg1 = (doubleArray *) 0 ; + longArray *arg1 = (longArray *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:delete_doubleArray",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_doubleArray, SWIG_POINTER_DISOWN | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_longArray, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_doubleArray" "', argument " "1"" of type '" "doubleArray *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_longArray" "', argument " "1"" of type '" "longArray *""'"); } - arg1 = (doubleArray *)(argp1); - delete_doubleArray(arg1); + arg1 = (longArray *)(argp1); + delete_longArray(arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -5536,69 +5766,66 @@ SWIGINTERN PyObject *_wrap_delete_doubleArray(PyObject *SWIGUNUSEDPARM(self), Py } -SWIGINTERN PyObject *_wrap_doubleArray___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_longArray___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - doubleArray *arg1 = (doubleArray *) 0 ; + longArray *arg1 = (longArray *) 0 ; size_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; + PyObject *swig_obj[2] ; + long result; - if (!PyArg_ParseTuple(args,(char *)"OO:doubleArray___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_doubleArray, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "longArray___getitem__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_longArray, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "doubleArray___getitem__" "', argument " "1"" of type '" "doubleArray *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "longArray___getitem__" "', argument " "1"" of type '" "longArray *""'"); } - arg1 = (doubleArray *)(argp1); - ecode2 = SWIG_AsVal_size_t(obj1, &val2); + arg1 = (longArray *)(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "doubleArray___getitem__" "', argument " "2"" of type '" "size_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "longArray___getitem__" "', argument " "2"" of type '" "size_t""'"); } arg2 = (size_t)(val2); - result = (double)doubleArray___getitem__(arg1,arg2); - resultobj = SWIG_From_double((double)(result)); + result = (long)longArray___getitem__(arg1,arg2); + resultobj = SWIG_From_long((long)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_doubleArray___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_longArray___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - doubleArray *arg1 = (doubleArray *) 0 ; + longArray *arg1 = (longArray *) 0 ; size_t arg2 ; - double arg3 ; + long arg3 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; - double val3 ; + long val3 ; int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; + PyObject *swig_obj[3] ; - if (!PyArg_ParseTuple(args,(char *)"OOO:doubleArray___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_doubleArray, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "longArray___setitem__", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_longArray, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "doubleArray___setitem__" "', argument " "1"" of type '" "doubleArray *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "longArray___setitem__" "', argument " "1"" of type '" "longArray *""'"); } - arg1 = (doubleArray *)(argp1); - ecode2 = SWIG_AsVal_size_t(obj1, &val2); + arg1 = (longArray *)(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "doubleArray___setitem__" "', argument " "2"" of type '" "size_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "longArray___setitem__" "', argument " "2"" of type '" "size_t""'"); } arg2 = (size_t)(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); + ecode3 = SWIG_AsVal_long(swig_obj[2], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "doubleArray___setitem__" "', argument " "3"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "longArray___setitem__" "', argument " "3"" of type '" "long""'"); } - arg3 = (double)(val3); - doubleArray___setitem__(arg1,arg2,arg3); + arg3 = (long)(val3); + longArray___setitem__(arg1,arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -5606,257 +5833,546 @@ SWIGINTERN PyObject *_wrap_doubleArray___setitem__(PyObject *SWIGUNUSEDPARM(self } -SWIGINTERN PyObject *_wrap_doubleArray_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_longArray_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - doubleArray *arg1 = (doubleArray *) 0 ; + longArray *arg1 = (longArray *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - double *result = 0 ; + PyObject *swig_obj[1] ; + long *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:doubleArray_cast",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_doubleArray, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_longArray, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "doubleArray_cast" "', argument " "1"" of type '" "doubleArray *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "longArray_cast" "', argument " "1"" of type '" "longArray *""'"); } - arg1 = (doubleArray *)(argp1); - result = (double *)doubleArray_cast(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); + arg1 = (longArray *)(argp1); + result = (long *)longArray_cast(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_doubleArray_frompointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_longArray_frompointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - double *arg1 = (double *) 0 ; + long *arg1 = (long *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - doubleArray *result = 0 ; + PyObject *swig_obj[1] ; + longArray *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:doubleArray_frompointer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_double, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_long, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "doubleArray_frompointer" "', argument " "1"" of type '" "double *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "longArray_frompointer" "', argument " "1"" of type '" "long *""'"); } - arg1 = (double *)(argp1); - result = (doubleArray *)doubleArray_frompointer(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_doubleArray, 0 | 0 ); + arg1 = (long *)(argp1); + result = (longArray *)longArray_frompointer(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_longArray, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *doubleArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *longArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_doubleArray, SWIG_NewClientData(obj)); + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_longArray, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } -SWIGINTERN PyObject *_wrap_new_intArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *longArray_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_get_local_integer_byte_order(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - size_t arg1 ; - size_t val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - intArray *result = 0 ; + char **arg1 = (char **) 0 ; + int *arg2 = (int *) 0 ; + char *temp1 = 0 ; + int tempn1 ; - if (!PyArg_ParseTuple(args,(char *)"O:new_intArray",&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_intArray" "', argument " "1"" of type '" "size_t""'"); - } - arg1 = (size_t)(val1); - result = (intArray *)new_intArray(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_intArray, SWIG_POINTER_NEW | 0 ); + arg1 = &temp1; arg2 = &tempn1; + if (!SWIG_Python_UnpackTuple(args, "get_local_integer_byte_order", 0, 0, 0)) SWIG_fail; + { + error_status=0; + get_local_integer_byte_order(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (*arg1) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg1,*arg2)); + free(*arg1); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_get_local_real_byte_order(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + char **arg1 = (char **) 0 ; + int *arg2 = (int *) 0 ; + char *temp1 = 0 ; + int tempn1 ; + + arg1 = &temp1; arg2 = &tempn1; + if (!SWIG_Python_UnpackTuple(args, "get_local_real_byte_order", 0, 0, 0)) SWIG_fail; + { + error_status=0; + get_local_real_byte_order(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (*arg1) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg1,*arg2)); + free(*arg1); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_get_local_real_format(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + char **arg1 = (char **) 0 ; + int *arg2 = (int *) 0 ; + char *temp1 = 0 ; + int tempn1 ; + + arg1 = &temp1; arg2 = &tempn1; + if (!SWIG_Python_UnpackTuple(args, "get_local_real_format", 0, 0, 0)) SWIG_fail; + { + error_status=0; + get_local_real_format(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (*arg1) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg1,*arg2)); + free(*arg1); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_compute_cell_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + double *arg1 ; + double *arg2 = (double *) 0 ; + double temp1[6] ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + if (!args) SWIG_fail; + swig_obj[0] = args; + { + if (swig_obj[0] == Py_None) arg1 = NULL; + else + if (!convert_darray(swig_obj[0],temp1,6)) { + return NULL; + } + arg1 = &temp1[0]; + } + { + error_status=0; + compute_cell_volume(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_delete_intArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_compute_reciprocal_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - intArray *arg1 = (intArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; + double *arg1 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + double *arg7 = (double *) 0 ; + double temp1[6] ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:delete_intArray",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_intArray, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_intArray" "', argument " "1"" of type '" "intArray *""'"); + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + if (!args) SWIG_fail; + swig_obj[0] = args; + { + if (swig_obj[0] == Py_None) arg1 = NULL; + else + if (!convert_darray(swig_obj[0],temp1,6)) { + return NULL; + } + arg1 = &temp1[0]; + } + { + error_status=0; + compute_reciprocal_cell(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } } - arg1 = (intArray *)(argp1); - delete_intArray(arg1); resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_intArray___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_airy_disk(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - intArray *arg1 = (intArray *) 0 ; - size_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; + double arg1 ; + double arg2 ; + double arg3 ; + double arg4 ; + double arg5 ; + double arg6 ; + double *arg7 = (double *) 0 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - int result; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double val6 ; + int ecode6 = 0 ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + PyObject *swig_obj[6] ; - if (!PyArg_ParseTuple(args,(char *)"OO:intArray___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_intArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "intArray___getitem__" "', argument " "1"" of type '" "intArray *""'"); - } - arg1 = (intArray *)(argp1); - ecode2 = SWIG_AsVal_size_t(obj1, &val2); + arg7 = &temp7; + if (!SWIG_Python_UnpackTuple(args, "airy_disk", 6, 6, swig_obj)) SWIG_fail; + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "airy_disk" "', argument " "1"" of type '" "double""'"); + } + arg1 = (double)(val1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "intArray___getitem__" "', argument " "2"" of type '" "size_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "airy_disk" "', argument " "2"" of type '" "double""'"); } - arg2 = (size_t)(val2); - result = (int)intArray___getitem__(arg1,arg2); - resultobj = SWIG_From_int((int)(result)); + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "airy_disk" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "airy_disk" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); + ecode5 = SWIG_AsVal_double(swig_obj[4], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "airy_disk" "', argument " "5"" of type '" "double""'"); + } + arg5 = (double)(val5); + ecode6 = SWIG_AsVal_double(swig_obj[5], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "airy_disk" "', argument " "6"" of type '" "double""'"); + } + arg6 = (double)(val6); + { + error_status=0; + airy_disk(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_intArray___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_airy_disk_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - intArray *arg1 = (intArray *) 0 ; - size_t arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; + double arg1 ; + double arg2 ; + double arg3 ; + double arg4 ; + double arg5 ; + double arg6 ; + double arg7 ; + double arg8 ; + double *arg9 = (double *) 0 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; int ecode2 = 0 ; - int val3 ; + double val3 ; int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double val6 ; + int ecode6 = 0 ; + double val7 ; + int ecode7 = 0 ; + double val8 ; + int ecode8 = 0 ; + double temp9 ; + int res9 = SWIG_TMPOBJ ; + PyObject *swig_obj[8] ; - if (!PyArg_ParseTuple(args,(char *)"OOO:intArray___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_intArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "intArray___setitem__" "', argument " "1"" of type '" "intArray *""'"); - } - arg1 = (intArray *)(argp1); - ecode2 = SWIG_AsVal_size_t(obj1, &val2); + arg9 = &temp9; + if (!SWIG_Python_UnpackTuple(args, "airy_disk_volume", 8, 8, swig_obj)) SWIG_fail; + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "airy_disk_volume" "', argument " "1"" of type '" "double""'"); + } + arg1 = (double)(val1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "intArray___setitem__" "', argument " "2"" of type '" "size_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "airy_disk_volume" "', argument " "2"" of type '" "double""'"); } - arg2 = (size_t)(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "intArray___setitem__" "', argument " "3"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "airy_disk_volume" "', argument " "3"" of type '" "double""'"); } - arg3 = (int)(val3); - intArray___setitem__(arg1,arg2,arg3); + arg3 = (double)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "airy_disk_volume" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); + ecode5 = SWIG_AsVal_double(swig_obj[4], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "airy_disk_volume" "', argument " "5"" of type '" "double""'"); + } + arg5 = (double)(val5); + ecode6 = SWIG_AsVal_double(swig_obj[5], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "airy_disk_volume" "', argument " "6"" of type '" "double""'"); + } + arg6 = (double)(val6); + ecode7 = SWIG_AsVal_double(swig_obj[6], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "airy_disk_volume" "', argument " "7"" of type '" "double""'"); + } + arg7 = (double)(val7); + ecode8 = SWIG_AsVal_double(swig_obj[7], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "airy_disk_volume" "', argument " "8"" of type '" "double""'"); + } + arg8 = (double)(val8); + { + error_status=0; + airy_disk_volume(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res9)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg9))); + } else { + int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_intArray_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_matrix_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - intArray *arg1 = (intArray *) 0 ; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + double (*arg2)[4] ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - int *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"O:intArray_cast",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_intArray, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_positioner_struct_matrix_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "intArray_cast" "', argument " "1"" of type '" "intArray *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_matrix_set" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); } - arg1 = (intArray *)(argp1); - result = (int *)intArray_cast(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 ); + arg1 = (cbf_positioner_struct *)(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_a_4__double, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_positioner_struct_matrix_set" "', argument " "2"" of type '" "double [3][4]""'"); + } + arg2 = (double (*)[4])(argp2); + { + if (arg2) { + size_t ii = 0; + for (; ii < (size_t)3; ++ii) { + if (arg2[ii]) { + size_t jj = 0; + for (; jj < (size_t)4; ++jj) arg1->matrix[ii][jj] = arg2[ii][jj]; + } else { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""matrix""' of type '""double [3][4]""'"); + } + } + } else { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""matrix""' of type '""double [3][4]""'"); + } + } + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_intArray_frompointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_matrix_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - int *arg1 = (int *) 0 ; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - intArray *result = 0 ; + PyObject *swig_obj[1] ; + double (*result)[4] = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:intArray_frompointer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_int, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "intArray_frompointer" "', argument " "1"" of type '" "int *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_matrix_get" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); } - arg1 = (int *)(argp1); - result = (intArray *)intArray_frompointer(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_intArray, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *intArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_intArray, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_shortArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - size_t arg1 ; - size_t val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - shortArray *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:new_shortArray",&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_shortArray" "', argument " "1"" of type '" "size_t""'"); - } - arg1 = (size_t)(val1); - result = (shortArray *)new_shortArray(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_shortArray, SWIG_POINTER_NEW | 0 ); + arg1 = (cbf_positioner_struct *)(argp1); + result = (double (*)[4])(double (*)[4]) ((arg1)->matrix); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_a_4__double, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_delete_shortArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_axis_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - shortArray *arg1 = (shortArray *) 0 ; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + cbf_axis_struct *arg2 = (cbf_axis_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"O:delete_shortArray",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shortArray, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_positioner_struct_axis_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_shortArray" "', argument " "1"" of type '" "shortArray *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_axis_set" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); } - arg1 = (shortArray *)(argp1); - delete_shortArray(arg1); + arg1 = (cbf_positioner_struct *)(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cbf_axis_struct, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_positioner_struct_axis_set" "', argument " "2"" of type '" "cbf_axis_struct *""'"); + } + arg2 = (cbf_axis_struct *)(argp2); + if (arg1) (arg1)->axis = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -5864,69 +6380,51 @@ SWIGINTERN PyObject *_wrap_delete_shortArray(PyObject *SWIGUNUSEDPARM(self), PyO } -SWIGINTERN PyObject *_wrap_shortArray___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_axis_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - shortArray *arg1 = (shortArray *) 0 ; - size_t arg2 ; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - short result; + PyObject *swig_obj[1] ; + cbf_axis_struct *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:shortArray___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shortArray, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "shortArray___getitem__" "', argument " "1"" of type '" "shortArray *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_axis_get" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); } - arg1 = (shortArray *)(argp1); - ecode2 = SWIG_AsVal_size_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "shortArray___getitem__" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = (size_t)(val2); - result = (short)shortArray___getitem__(arg1,arg2); - resultobj = SWIG_From_short((short)(result)); + arg1 = (cbf_positioner_struct *)(argp1); + result = (cbf_axis_struct *) ((arg1)->axis); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_axis_struct, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_shortArray___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_axes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - shortArray *arg1 = (shortArray *) 0 ; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; size_t arg2 ; - short arg3 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; - short val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OOO:shortArray___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shortArray, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_positioner_struct_axes_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "shortArray___setitem__" "', argument " "1"" of type '" "shortArray *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_axes_set" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); } - arg1 = (shortArray *)(argp1); - ecode2 = SWIG_AsVal_size_t(obj1, &val2); + arg1 = (cbf_positioner_struct *)(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "shortArray___setitem__" "', argument " "2"" of type '" "size_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_positioner_struct_axes_set" "', argument " "2"" of type '" "size_t""'"); } arg2 = (size_t)(val2); - ecode3 = SWIG_AsVal_short(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "shortArray___setitem__" "', argument " "3"" of type '" "short""'"); - } - arg3 = (short)(val3); - shortArray___setitem__(arg1,arg2,arg3); + if (arg1) (arg1)->axes = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -5934,93 +6432,103 @@ SWIGINTERN PyObject *_wrap_shortArray___setitem__(PyObject *SWIGUNUSEDPARM(self) } -SWIGINTERN PyObject *_wrap_shortArray_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_axes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - shortArray *arg1 = (shortArray *) 0 ; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - short *result = 0 ; + PyObject *swig_obj[1] ; + size_t result; - if (!PyArg_ParseTuple(args,(char *)"O:shortArray_cast",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shortArray, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "shortArray_cast" "', argument " "1"" of type '" "shortArray *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_axes_get" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); } - arg1 = (shortArray *)(argp1); - result = (short *)shortArray_cast(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_short, 0 | 0 ); + arg1 = (cbf_positioner_struct *)(argp1); + result = ((arg1)->axes); + resultobj = SWIG_From_size_t((size_t)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_shortArray_frompointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_matrix_is_valid_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - short *arg1 = (short *) 0 ; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - shortArray *result = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"O:shortArray_frompointer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_short, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_positioner_struct_matrix_is_valid_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "shortArray_frompointer" "', argument " "1"" of type '" "short *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_matrix_is_valid_set" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); } - arg1 = (short *)(argp1); - result = (shortArray *)shortArray_frompointer(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_shortArray, 0 | 0 ); + arg1 = (cbf_positioner_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_positioner_struct_matrix_is_valid_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + if (arg1) (arg1)->matrix_is_valid = arg2; + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *shortArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_shortArray, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_longArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_matrix_is_valid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - size_t arg1 ; - size_t val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - longArray *result = 0 ; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; - if (!PyArg_ParseTuple(args,(char *)"O:new_longArray",&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_longArray" "', argument " "1"" of type '" "size_t""'"); - } - arg1 = (size_t)(val1); - result = (longArray *)new_longArray(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_longArray, SWIG_POINTER_NEW | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_matrix_is_valid_get" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + } + arg1 = (cbf_positioner_struct *)(argp1); + result = (int) ((arg1)->matrix_is_valid); + resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_delete_longArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_matrix_ratio_used_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - longArray *arg1 = (longArray *) 0 ; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + double arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"O:delete_longArray",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_longArray, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_positioner_struct_matrix_ratio_used_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_longArray" "', argument " "1"" of type '" "longArray *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_matrix_ratio_used_set" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); } - arg1 = (longArray *)(argp1); - delete_longArray(arg1); + arg1 = (cbf_positioner_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_positioner_struct_matrix_ratio_used_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + if (arg1) (arg1)->matrix_ratio_used = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -6028,69 +6536,51 @@ SWIGINTERN PyObject *_wrap_delete_longArray(PyObject *SWIGUNUSEDPARM(self), PyOb } -SWIGINTERN PyObject *_wrap_longArray___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_matrix_ratio_used_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - longArray *arg1 = (longArray *) 0 ; - size_t arg2 ; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - long result; + PyObject *swig_obj[1] ; + double result; - if (!PyArg_ParseTuple(args,(char *)"OO:longArray___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_longArray, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "longArray___getitem__" "', argument " "1"" of type '" "longArray *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_matrix_ratio_used_get" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); } - arg1 = (longArray *)(argp1); - ecode2 = SWIG_AsVal_size_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "longArray___getitem__" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = (size_t)(val2); - result = (long)longArray___getitem__(arg1,arg2); - resultobj = SWIG_From_long((long)(result)); + arg1 = (cbf_positioner_struct *)(argp1); + result = (double) ((arg1)->matrix_ratio_used); + resultobj = SWIG_From_double((double)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_longArray___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_axis_index_limit_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - longArray *arg1 = (longArray *) 0 ; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; size_t arg2 ; - long arg3 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; - long val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OOO:longArray___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_longArray, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_positioner_struct_axis_index_limit_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "longArray___setitem__" "', argument " "1"" of type '" "longArray *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_axis_index_limit_set" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); } - arg1 = (longArray *)(argp1); - ecode2 = SWIG_AsVal_size_t(obj1, &val2); + arg1 = (cbf_positioner_struct *)(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "longArray___setitem__" "', argument " "2"" of type '" "size_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_positioner_struct_axis_index_limit_set" "', argument " "2"" of type '" "size_t""'"); } arg2 = (size_t)(val2); - ecode3 = SWIG_AsVal_long(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "longArray___setitem__" "', argument " "3"" of type '" "long""'"); - } - arg3 = (long)(val3); - longArray___setitem__(arg1,arg2,arg3); + if (arg1) (arg1)->axis_index_limit = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -6098,69 +6588,67 @@ SWIGINTERN PyObject *_wrap_longArray___setitem__(PyObject *SWIGUNUSEDPARM(self), } -SWIGINTERN PyObject *_wrap_longArray_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_axis_index_limit_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - longArray *arg1 = (longArray *) 0 ; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - long *result = 0 ; + PyObject *swig_obj[1] ; + size_t result; - if (!PyArg_ParseTuple(args,(char *)"O:longArray_cast",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_longArray, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "longArray_cast" "', argument " "1"" of type '" "longArray *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_axis_index_limit_get" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); } - arg1 = (longArray *)(argp1); - result = (long *)longArray_cast(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 ); + arg1 = (cbf_positioner_struct *)(argp1); + result = ((arg1)->axis_index_limit); + resultobj = SWIG_From_size_t((size_t)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_longArray_frompointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_new_cbf_positioner_struct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - long *arg1 = (long *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - longArray *result = 0 ; + cbf_positioner_struct *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:longArray_frompointer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_long, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "longArray_frompointer" "', argument " "1"" of type '" "long *""'"); + if (!SWIG_Python_UnpackTuple(args, "new_cbf_positioner_struct", 0, 0, 0)) SWIG_fail; + { + error_status=0; + result = (cbf_positioner_struct *)new_cbf_positioner_struct(); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } } - arg1 = (long *)(argp1); - result = (longArray *)longArray_frompointer(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_longArray, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_positioner_struct, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *longArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_longArray, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_get_local_integer_byte_order(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_delete_cbf_positioner_struct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - char **arg1 = (char **) 0 ; - int *arg2 = (int *) 0 ; - char *temp1 = 0 ; - int tempn1 ; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; - arg1 = &temp1; arg2 = &tempn1; - if (!PyArg_ParseTuple(args,(char *)":get_local_integer_byte_order")) SWIG_fail; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_cbf_positioner_struct" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + } + arg1 = (cbf_positioner_struct *)(argp1); { error_status=0; - get_local_integer_byte_order(arg1,arg2); + delete_cbf_positioner_struct(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -6168,38 +6656,41 @@ SWIGINTERN PyObject *_wrap_get_local_integer_byte_order(PyObject *SWIGUNUSEDPARM } } resultobj = SWIG_Py_Void(); - if (*arg1) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg1,*arg2)); - free(*arg1); - } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_compute_cell_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_get_rotation_axis(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - double *arg1 ; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; double *arg2 = (double *) 0 ; - double temp1[6] ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; double temp2 ; int res2 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:compute_cell_volume",&obj0)) SWIG_fail; - { - if (obj0 == Py_None) arg1 = NULL; - else - if (!convert_darray(obj0,temp1,6)) { - return NULL; - } - arg1 = &temp1[0]; + arg3 = &temp3; + arg4 = &temp4; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_get_rotation_axis" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); } + arg1 = (cbf_positioner_struct *)(argp1); { error_status=0; - compute_cell_volume(arg1,arg2); + cbf_positioner_struct_get_rotation_axis(arg1,arg2,arg3,arg4); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -6213,24 +6704,49 @@ SWIGINTERN PyObject *_wrap_compute_cell_volume(PyObject *SWIGUNUSEDPARM(self), P int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_get_local_real_format(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_get_rotation_range(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - char **arg1 = (char **) 0 ; - int *arg2 = (int *) 0 ; - char *temp1 = 0 ; - int tempn1 ; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; - arg1 = &temp1; arg2 = &tempn1; - if (!PyArg_ParseTuple(args,(char *)":get_local_real_format")) SWIG_fail; + arg2 = &temp2; + arg3 = &temp3; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_get_rotation_range" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + } + arg1 = (cbf_positioner_struct *)(argp1); { error_status=0; - get_local_real_format(arg1,arg2); + cbf_positioner_struct_get_rotation_range(arg1,arg2,arg3); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -6238,9 +6754,17 @@ SWIGINTERN PyObject *_wrap_get_local_real_format(PyObject *SWIGUNUSEDPARM(self), } } resultobj = SWIG_Py_Void(); - if (*arg1) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg1,*arg2)); - free(*arg1); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); } return resultobj; fail: @@ -6248,17 +6772,18 @@ SWIGINTERN PyObject *_wrap_get_local_real_format(PyObject *SWIGUNUSEDPARM(self), } -SWIGINTERN PyObject *_wrap_airy_disk(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_rotate_vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - double arg1 ; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; double arg2 ; double arg3 ; double arg4 ; double arg5 ; - double arg6 ; + double *arg6 = (double *) 0 ; double *arg7 = (double *) 0 ; - double val1 ; - int ecode1 = 0 ; + double *arg8 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; @@ -6267,52 +6792,46 @@ SWIGINTERN PyObject *_wrap_airy_disk(PyObject *SWIGUNUSEDPARM(self), PyObject *a int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; - double val6 ; - int ecode6 = 0 ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; double temp7 ; int res7 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; + double temp8 ; + int res8 = SWIG_TMPOBJ ; + PyObject *swig_obj[5] ; + arg6 = &temp6; arg7 = &temp7; - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:airy_disk",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "airy_disk" "', argument " "1"" of type '" "double""'"); - } - arg1 = (double)(val1); - ecode2 = SWIG_AsVal_double(obj1, &val2); + arg8 = &temp8; + if (!SWIG_Python_UnpackTuple(args, "cbf_positioner_struct_rotate_vector", 5, 5, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_rotate_vector" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + } + arg1 = (cbf_positioner_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "airy_disk" "', argument " "2"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_positioner_struct_rotate_vector" "', argument " "2"" of type '" "double""'"); } arg2 = (double)(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "airy_disk" "', argument " "3"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_positioner_struct_rotate_vector" "', argument " "3"" of type '" "double""'"); } arg3 = (double)(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "airy_disk" "', argument " "4"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_positioner_struct_rotate_vector" "', argument " "4"" of type '" "double""'"); } arg4 = (double)(val4); - ecode5 = SWIG_AsVal_double(obj4, &val5); + ecode5 = SWIG_AsVal_double(swig_obj[4], &val5); if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "airy_disk" "', argument " "5"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_positioner_struct_rotate_vector" "', argument " "5"" of type '" "double""'"); } arg5 = (double)(val5); - ecode6 = SWIG_AsVal_double(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "airy_disk" "', argument " "6"" of type '" "double""'"); - } - arg6 = (double)(val6); { error_status=0; - airy_disk(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + cbf_positioner_struct_rotate_vector(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -6320,40 +6839,122 @@ SWIGINTERN PyObject *_wrap_airy_disk(PyObject *SWIGUNUSEDPARM(self), PyObject *a } } resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } if (SWIG_IsTmpObj(res7)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); } else { int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); } + if (SWIG_IsTmpObj(res8)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg8))); + } else { + int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_get_local_real_byte_order(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_get_reciprocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - char **arg1 = (char **) 0 ; - int *arg2 = (int *) 0 ; - char *temp1 = 0 ; - int tempn1 ; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + double arg2 ; + double arg3 ; + double arg4 ; + double arg5 ; + double arg6 ; + double *arg7 = (double *) 0 ; + double *arg8 = (double *) 0 ; + double *arg9 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double val6 ; + int ecode6 = 0 ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + double temp8 ; + int res8 = SWIG_TMPOBJ ; + double temp9 ; + int res9 = SWIG_TMPOBJ ; + PyObject *swig_obj[6] ; - arg1 = &temp1; arg2 = &tempn1; - if (!PyArg_ParseTuple(args,(char *)":get_local_real_byte_order")) SWIG_fail; + arg7 = &temp7; + arg8 = &temp8; + arg9 = &temp9; + if (!SWIG_Python_UnpackTuple(args, "cbf_positioner_struct_get_reciprocal", 6, 6, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_get_reciprocal" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + } + arg1 = (cbf_positioner_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_positioner_struct_get_reciprocal" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_positioner_struct_get_reciprocal" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_positioner_struct_get_reciprocal" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); + ecode5 = SWIG_AsVal_double(swig_obj[4], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_positioner_struct_get_reciprocal" "', argument " "5"" of type '" "double""'"); + } + arg5 = (double)(val5); + ecode6 = SWIG_AsVal_double(swig_obj[5], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_positioner_struct_get_reciprocal" "', argument " "6"" of type '" "double""'"); + } + arg6 = (double)(val6); { error_status=0; - get_local_real_byte_order(arg1,arg2); + cbf_positioner_struct_get_reciprocal(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); - if (*arg1) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg1,*arg2)); - free(*arg1); + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res8)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg8))); + } else { + int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res9)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg9))); + } else { + int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_double, new_flags)); } return resultobj; fail: @@ -6361,18 +6962,21 @@ SWIGINTERN PyObject *_wrap_get_local_real_byte_order(PyObject *SWIGUNUSEDPARM(se } -SWIGINTERN PyObject *_wrap_compute_reciprocal_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_positioner_struct_get_goniometer_poise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - double *arg1 ; - double *arg2 = (double *) 0 ; + cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + double arg2 ; double *arg3 = (double *) 0 ; double *arg4 = (double *) 0 ; double *arg5 = (double *) 0 ; double *arg6 = (double *) 0 ; double *arg7 = (double *) 0 ; - double temp1[6] ; - double temp2 ; - int res2 = SWIG_TMPOBJ ; + double *arg8 = (double *) 0 ; + double *arg9 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; double temp3 ; int res3 = SWIG_TMPOBJ ; double temp4 ; @@ -6383,26 +6987,33 @@ SWIGINTERN PyObject *_wrap_compute_reciprocal_cell(PyObject *SWIGUNUSEDPARM(self int res6 = SWIG_TMPOBJ ; double temp7 ; int res7 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + double temp8 ; + int res8 = SWIG_TMPOBJ ; + double temp9 ; + int res9 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; - arg2 = &temp2; arg3 = &temp3; arg4 = &temp4; arg5 = &temp5; arg6 = &temp6; arg7 = &temp7; - if (!PyArg_ParseTuple(args,(char *)"O:compute_reciprocal_cell",&obj0)) SWIG_fail; - { - if (obj0 == Py_None) arg1 = NULL; - else - if (!convert_darray(obj0,temp1,6)) { - return NULL; - } - arg1 = &temp1[0]; + arg8 = &temp8; + arg9 = &temp9; + if (!SWIG_Python_UnpackTuple(args, "cbf_positioner_struct_get_goniometer_poise", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_get_goniometer_poise" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); } + arg1 = (cbf_positioner_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_positioner_struct_get_goniometer_poise" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); { error_status=0; - compute_reciprocal_cell(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + cbf_positioner_struct_get_goniometer_poise(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -6410,12 +7021,6 @@ SWIGINTERN PyObject *_wrap_compute_reciprocal_cell(PyObject *SWIGUNUSEDPARM(self } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); - } if (SWIG_IsTmpObj(res3)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); } else { @@ -6446,102 +7051,12 @@ SWIGINTERN PyObject *_wrap_compute_reciprocal_cell(PyObject *SWIGUNUSEDPARM(self int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_airy_disk_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - double arg1 ; - double arg2 ; - double arg3 ; - double arg4 ; - double arg5 ; - double arg6 ; - double arg7 ; - double arg8 ; - double *arg9 = (double *) 0 ; - double val1 ; - int ecode1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - double val6 ; - int ecode6 = 0 ; - double val7 ; - int ecode7 = 0 ; - double val8 ; - int ecode8 = 0 ; - double temp9 ; - int res9 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - - arg9 = &temp9; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:airy_disk_volume",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "airy_disk_volume" "', argument " "1"" of type '" "double""'"); - } - arg1 = (double)(val1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "airy_disk_volume" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "airy_disk_volume" "', argument " "3"" of type '" "double""'"); - } - arg3 = (double)(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "airy_disk_volume" "', argument " "4"" of type '" "double""'"); - } - arg4 = (double)(val4); - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "airy_disk_volume" "', argument " "5"" of type '" "double""'"); - } - arg5 = (double)(val5); - ecode6 = SWIG_AsVal_double(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "airy_disk_volume" "', argument " "6"" of type '" "double""'"); - } - arg6 = (double)(val6); - ecode7 = SWIG_AsVal_double(obj6, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "airy_disk_volume" "', argument " "7"" of type '" "double""'"); - } - arg7 = (double)(val7); - ecode8 = SWIG_AsVal_double(obj7, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "airy_disk_volume" "', argument " "8"" of type '" "double""'"); - } - arg8 = (double)(val8); - { - error_status=0; - airy_disk_volume(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } + if (SWIG_IsTmpObj(res8)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg8))); + } else { + int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_double, new_flags)); } - resultobj = SWIG_Py_Void(); if (SWIG_IsTmpObj(res9)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg9))); } else { @@ -6554,43 +7069,39 @@ SWIGINTERN PyObject *_wrap_airy_disk_volume(PyObject *SWIGUNUSEDPARM(self), PyOb } -SWIGINTERN PyObject *_wrap_cbf_positioner_struct_matrix_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *cbf_positioner_struct_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cbf_positioner_struct, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *cbf_positioner_struct_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_cbf_detector_struct_positioner_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; - double (*arg2)[4] ; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + cbf_positioner arg2 = (cbf_positioner) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_positioner_struct_matrix_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_positioner_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_matrix_set" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_positioner_set" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } - arg1 = (cbf_positioner_struct *)(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_a_4__double, 0 | 0 ); + arg1 = (cbf_detector_struct *)(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cbf_positioner_struct, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_positioner_struct_matrix_set" "', argument " "2"" of type '" "double [3][4]""'"); - } - arg2 = (double (*)[4])(argp2); - { - if (arg2) { - size_t ii = 0; - for (; ii < (size_t)3; ++ii) { - if (arg2[ii]) { - size_t jj = 0; - for (; jj < (size_t)4; ++jj) arg1->matrix[ii][jj] = arg2[ii][jj]; - } else { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""matrix""' of type '""double [3][4]""'"); - } - } - } else { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""matrix""' of type '""double [3][4]""'"); - } + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_detector_struct_positioner_set" "', argument " "2"" of type '" "cbf_positioner""'"); } + arg2 = (cbf_positioner)(argp2); + if (arg1) (arg1)->positioner = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -6598,51 +7109,60 @@ SWIGINTERN PyObject *_wrap_cbf_positioner_struct_matrix_set(PyObject *SWIGUNUSED } -SWIGINTERN PyObject *_wrap_cbf_positioner_struct_matrix_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_positioner_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - double (*result)[4] = 0 ; + PyObject *swig_obj[1] ; + cbf_positioner result; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_positioner_struct_matrix_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_matrix_get" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_positioner_get" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } - arg1 = (cbf_positioner_struct *)(argp1); - result = (double (*)[4])(double (*)[4]) ((arg1)->matrix); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_a_4__double, 0 | 0 ); + arg1 = (cbf_detector_struct *)(argp1); + result = (cbf_positioner) ((arg1)->positioner); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_positioner_struct_axis_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_displacement_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; - cbf_axis_struct *arg2 = (cbf_axis_struct *) 0 ; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + double temp2[2] ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_positioner_struct_axis_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_displacement_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_axis_set" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_displacement_set" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } - arg1 = (cbf_positioner_struct *)(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_cbf_axis_struct, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_positioner_struct_axis_set" "', argument " "2"" of type '" "cbf_axis_struct *""'"); + arg1 = (cbf_detector_struct *)(argp1); + { + if (swig_obj[1] == Py_None) arg2 = NULL; + else + if (!convert_darray(swig_obj[1],temp2,2)) { + return NULL; + } + arg2 = &temp2[0]; + } + { + if (arg2) { + size_t ii = 0; + for (; ii < (size_t)2; ++ii) *(double *)&arg1->displacement[ii] = *((double *)arg2 + ii); + } else { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""displacement""' of type '""double [2]""'"); + } } - arg2 = (cbf_axis_struct *)(argp2); - if (arg1) (arg1)->axis = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -6650,51 +7170,60 @@ SWIGINTERN PyObject *_wrap_cbf_positioner_struct_axis_set(PyObject *SWIGUNUSEDPA } -SWIGINTERN PyObject *_wrap_cbf_positioner_struct_axis_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_displacement_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - cbf_axis_struct *result = 0 ; + PyObject *swig_obj[1] ; + double *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_positioner_struct_axis_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_axis_get" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_displacement_get" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } - arg1 = (cbf_positioner_struct *)(argp1); - result = (cbf_axis_struct *) ((arg1)->axis); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_axis_struct, 0 | 0 ); + arg1 = (cbf_detector_struct *)(argp1); + result = (double *)(double *) ((arg1)->displacement); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_positioner_struct_axes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_increment_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; - size_t arg2 ; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 ; void *argp1 = 0 ; int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + double temp2[2] ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_positioner_struct_axes_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_increment_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_axes_set" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_increment_set" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); + { + if (swig_obj[1] == Py_None) arg2 = NULL; + else + if (!convert_darray(swig_obj[1],temp2,2)) { + return NULL; + } + arg2 = &temp2[0]; + } + { + if (arg2) { + size_t ii = 0; + for (; ii < (size_t)2; ++ii) *(double *)&arg1->increment[ii] = *((double *)arg2 + ii); + } else { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""increment""' of type '""double [2]""'"); + } } - arg1 = (cbf_positioner_struct *)(argp1); - ecode2 = SWIG_AsVal_size_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_positioner_struct_axes_set" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = (size_t)(val2); - if (arg1) (arg1)->axes = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -6702,51 +7231,51 @@ SWIGINTERN PyObject *_wrap_cbf_positioner_struct_axes_set(PyObject *SWIGUNUSEDPA } -SWIGINTERN PyObject *_wrap_cbf_positioner_struct_axes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_increment_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - size_t result; + PyObject *swig_obj[1] ; + double *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_positioner_struct_axes_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_axes_get" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_increment_get" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } - arg1 = (cbf_positioner_struct *)(argp1); - result = ((arg1)->axes); - resultobj = SWIG_From_size_t((size_t)(result)); + arg1 = (cbf_detector_struct *)(argp1); + result = (double *)(double *) ((arg1)->increment); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_positioner_struct_matrix_is_valid_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_axes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; - int arg2 ; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + size_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + size_t val2 ; int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_positioner_struct_matrix_is_valid_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_axes_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_matrix_is_valid_set" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_axes_set" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } - arg1 = (cbf_positioner_struct *)(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + arg1 = (cbf_detector_struct *)(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_positioner_struct_matrix_is_valid_set" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_axes_set" "', argument " "2"" of type '" "size_t""'"); } - arg2 = (int)(val2); - if (arg1) (arg1)->matrix_is_valid = arg2; + arg2 = (size_t)(val2); + if (arg1) (arg1)->axes = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -6754,51 +7283,58 @@ SWIGINTERN PyObject *_wrap_cbf_positioner_struct_matrix_is_valid_set(PyObject *S } -SWIGINTERN PyObject *_wrap_cbf_positioner_struct_matrix_is_valid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_axes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; + PyObject *swig_obj[1] ; + size_t result; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_positioner_struct_matrix_is_valid_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_matrix_is_valid_get" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_axes_get" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } - arg1 = (cbf_positioner_struct *)(argp1); - result = (int) ((arg1)->matrix_is_valid); - resultobj = SWIG_From_int((int)(result)); + arg1 = (cbf_detector_struct *)(argp1); + result = ((arg1)->axes); + resultobj = SWIG_From_size_t((size_t)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_positioner_struct_matrix_ratio_used_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_index_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; - double arg2 ; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + size_t *arg2 ; void *argp1 = 0 ; int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_positioner_struct_matrix_ratio_used_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_index_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_matrix_ratio_used_set" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_index_set" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } - arg1 = (cbf_positioner_struct *)(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_positioner_struct_matrix_ratio_used_set" "', argument " "2"" of type '" "double""'"); + arg1 = (cbf_detector_struct *)(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_size_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_detector_struct_index_set" "', argument " "2"" of type '" "size_t [2]""'"); } - arg2 = (double)(val2); - if (arg1) (arg1)->matrix_ratio_used = arg2; + arg2 = (size_t *)(argp2); + { + if (arg2) { + size_t ii = 0; + for (; ii < (size_t)2; ++ii) *(size_t *)&arg1->index[ii] = *((size_t *)arg2 + ii); + } else { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""index""' of type '""size_t [2]""'"); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -6806,117 +7342,183 @@ SWIGINTERN PyObject *_wrap_cbf_positioner_struct_matrix_ratio_used_set(PyObject } -SWIGINTERN PyObject *_wrap_cbf_positioner_struct_matrix_ratio_used_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - double result; + PyObject *swig_obj[1] ; + size_t *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_positioner_struct_matrix_ratio_used_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_matrix_ratio_used_get" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_index_get" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } - arg1 = (cbf_positioner_struct *)(argp1); - result = (double) ((arg1)->matrix_ratio_used); - resultobj = SWIG_From_double((double)(result)); + arg1 = (cbf_detector_struct *)(argp1); + result = (size_t *)(size_t *) ((arg1)->index); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_size_t, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_positioner_struct_axis_index_limit_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_new_cbf_detector_struct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; - size_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + cbf_detector_struct *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_positioner_struct_axis_index_limit_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_axis_index_limit_set" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + if (!SWIG_Python_UnpackTuple(args, "new_cbf_detector_struct", 0, 0, 0)) SWIG_fail; + { + error_status=0; + result = (cbf_detector_struct *)new_cbf_detector_struct(); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } } - arg1 = (cbf_positioner_struct *)(argp1); - ecode2 = SWIG_AsVal_size_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_positioner_struct_axis_index_limit_set" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = (size_t)(val2); - if (arg1) (arg1)->axis_index_limit = arg2; - resultobj = SWIG_Py_Void(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_detector_struct, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_positioner_struct_axis_index_limit_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_delete_cbf_detector_struct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - size_t result; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_positioner_struct_axis_index_limit_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_axis_index_limit_get" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_cbf_detector_struct" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } - arg1 = (cbf_positioner_struct *)(argp1); - result = ((arg1)->axis_index_limit); - resultobj = SWIG_From_size_t((size_t)(result)); + arg1 = (cbf_detector_struct *)(argp1); + { + error_status=0; + delete_cbf_detector_struct(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_new_cbf_positioner_struct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_beam_center(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_positioner_struct *result = 0 ; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)":new_cbf_positioner_struct")) SWIG_fail; + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_beam_center" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); { error_status=0; - result = (cbf_positioner_struct *)new_cbf_positioner_struct(); + cbf_detector_struct_get_beam_center(arg1,arg2,arg3,arg4,arg5); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_positioner_struct, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_delete_cbf_positioner_struct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_beam_center_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:delete_cbf_positioner_struct",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_positioner_struct, SWIG_POINTER_DISOWN | 0 ); + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_cbf_positioner_struct" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_beam_center_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } - arg1 = (cbf_positioner_struct *)(argp1); + arg1 = (cbf_detector_struct *)(argp1); { error_status=0; - delete_cbf_positioner_struct(arg1); + cbf_detector_struct_get_beam_center_fs(arg1,arg2,arg3,arg4,arg5); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -6924,36 +7526,69 @@ SWIGINTERN PyObject *_wrap_delete_cbf_positioner_struct(PyObject *SWIGUNUSEDPARM } } resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_positioner_struct_get_rotation_range(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_beam_center_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; double *arg2 = (double *) 0 ; double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; double temp2 ; int res2 = SWIG_TMPOBJ ; double temp3 ; int res3 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; arg2 = &temp2; arg3 = &temp3; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_positioner_struct_get_rotation_range",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + arg4 = &temp4; + arg5 = &temp5; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_get_rotation_range" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_beam_center_sf" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } - arg1 = (cbf_positioner_struct *)(argp1); + arg1 = (cbf_detector_struct *)(argp1); { error_status=0; - cbf_positioner_struct_get_rotation_range(arg1,arg2,arg3); + cbf_detector_struct_get_beam_center_sf(arg1,arg2,arg3,arg4,arg5); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -6973,100 +7608,17 @@ SWIGINTERN PyObject *_wrap_cbf_positioner_struct_get_rotation_range(PyObject *SW int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_positioner_struct_rotate_vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; - double arg2 ; - double arg3 ; - double arg4 ; - double arg5 ; - double *arg6 = (double *) 0 ; - double *arg7 = (double *) 0 ; - double *arg8 = (double *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - double temp6 ; - int res6 = SWIG_TMPOBJ ; - double temp7 ; - int res7 = SWIG_TMPOBJ ; - double temp8 ; - int res8 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - arg6 = &temp6; - arg7 = &temp7; - arg8 = &temp8; - if (!PyArg_ParseTuple(args,(char *)"OOOOO:cbf_positioner_struct_rotate_vector",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_rotate_vector" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); - } - arg1 = (cbf_positioner_struct *)(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_positioner_struct_rotate_vector" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_positioner_struct_rotate_vector" "', argument " "3"" of type '" "double""'"); - } - arg3 = (double)(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_positioner_struct_rotate_vector" "', argument " "4"" of type '" "double""'"); - } - arg4 = (double)(val4); - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_positioner_struct_rotate_vector" "', argument " "5"" of type '" "double""'"); - } - arg5 = (double)(val5); - { - error_status=0; - cbf_positioner_struct_rotate_vector(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } - } - resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res6)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); - } else { - int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res7)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); } else { - int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); } - if (SWIG_IsTmpObj(res8)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg8))); + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); } else { - int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_double, new_flags)); + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); } return resultobj; fail: @@ -7074,59 +7626,39 @@ SWIGINTERN PyObject *_wrap_cbf_positioner_struct_rotate_vector(PyObject *SWIGUNU } -SWIGINTERN PyObject *_wrap_cbf_positioner_struct_get_goniometer_poise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_set_beam_center(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; - double arg2 ; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 = (double *) 0 ; double *arg3 = (double *) 0 ; double *arg4 = (double *) 0 ; double *arg5 = (double *) 0 ; - double *arg6 = (double *) 0 ; - double *arg7 = (double *) 0 ; - double *arg8 = (double *) 0 ; - double *arg9 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; double temp3 ; int res3 = SWIG_TMPOBJ ; double temp4 ; int res4 = SWIG_TMPOBJ ; double temp5 ; int res5 = SWIG_TMPOBJ ; - double temp6 ; - int res6 = SWIG_TMPOBJ ; - double temp7 ; - int res7 = SWIG_TMPOBJ ; - double temp8 ; - int res8 = SWIG_TMPOBJ ; - double temp9 ; - int res9 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + PyObject *swig_obj[1] ; + arg2 = &temp2; arg3 = &temp3; arg4 = &temp4; arg5 = &temp5; - arg6 = &temp6; - arg7 = &temp7; - arg8 = &temp8; - arg9 = &temp9; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_positioner_struct_get_goniometer_poise",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_get_goniometer_poise" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_set_beam_center" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } - arg1 = (cbf_positioner_struct *)(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_positioner_struct_get_goniometer_poise" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); + arg1 = (cbf_detector_struct *)(argp1); { error_status=0; - cbf_positioner_struct_get_goniometer_poise(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + cbf_detector_struct_set_beam_center(arg1,arg2,arg3,arg4,arg5); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -7134,6 +7666,12 @@ SWIGINTERN PyObject *_wrap_cbf_positioner_struct_get_goniometer_poise(PyObject * } } resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } if (SWIG_IsTmpObj(res3)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); } else { @@ -7152,109 +7690,45 @@ SWIGINTERN PyObject *_wrap_cbf_positioner_struct_get_goniometer_poise(PyObject * int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); } - if (SWIG_IsTmpObj(res6)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); - } else { - int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res7)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); - } else { - int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res8)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg8))); - } else { - int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res9)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg9))); - } else { - int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_double, new_flags)); - } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_positioner_struct_get_reciprocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_set_beam_center_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; - double arg2 ; - double arg3 ; - double arg4 ; - double arg5 ; - double arg6 ; - double *arg7 = (double *) 0 ; - double *arg8 = (double *) 0 ; - double *arg9 = (double *) 0 ; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; - int ecode5 = 0 ; - double val6 ; - int ecode6 = 0 ; - double temp7 ; - int res7 = SWIG_TMPOBJ ; - double temp8 ; - int res8 = SWIG_TMPOBJ ; - double temp9 ; - int res9 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; - arg7 = &temp7; - arg8 = &temp8; - arg9 = &temp9; - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cbf_positioner_struct_get_reciprocal",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_get_reciprocal" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_set_beam_center_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } - arg1 = (cbf_positioner_struct *)(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_positioner_struct_get_reciprocal" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_positioner_struct_get_reciprocal" "', argument " "3"" of type '" "double""'"); - } - arg3 = (double)(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_positioner_struct_get_reciprocal" "', argument " "4"" of type '" "double""'"); - } - arg4 = (double)(val4); - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_positioner_struct_get_reciprocal" "', argument " "5"" of type '" "double""'"); - } - arg5 = (double)(val5); - ecode6 = SWIG_AsVal_double(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_positioner_struct_get_reciprocal" "', argument " "6"" of type '" "double""'"); - } - arg6 = (double)(val6); + arg1 = (cbf_detector_struct *)(argp1); { error_status=0; - cbf_positioner_struct_get_reciprocal(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + cbf_detector_struct_set_beam_center_fs(arg1,arg2,arg3,arg4,arg5); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -7262,23 +7736,29 @@ SWIGINTERN PyObject *_wrap_cbf_positioner_struct_get_reciprocal(PyObject *SWIGUN } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res7)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); } else { - int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); } - if (SWIG_IsTmpObj(res8)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg8))); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); } else { - int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_double, new_flags)); + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); } - if (SWIG_IsTmpObj(res9)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg9))); + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); } else { - int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_double, new_flags)); + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); } return resultobj; fail: @@ -7286,12 +7766,13 @@ SWIGINTERN PyObject *_wrap_cbf_positioner_struct_get_reciprocal(PyObject *SWIGUN } -SWIGINTERN PyObject *_wrap_cbf_positioner_struct_get_rotation_axis(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_set_beam_center_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_positioner_struct *arg1 = (cbf_positioner_struct *) 0 ; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; double *arg2 = (double *) 0 ; double *arg3 = (double *) 0 ; double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; double temp2 ; @@ -7300,20 +7781,24 @@ SWIGINTERN PyObject *_wrap_cbf_positioner_struct_get_rotation_axis(PyObject *SWI int res3 = SWIG_TMPOBJ ; double temp4 ; int res4 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; arg2 = &temp2; arg3 = &temp3; arg4 = &temp4; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_positioner_struct_get_rotation_axis",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + arg5 = &temp5; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_positioner_struct_get_rotation_axis" "', argument " "1"" of type '" "cbf_positioner_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_set_beam_center_sf" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } - arg1 = (cbf_positioner_struct *)(argp1); + arg1 = (cbf_detector_struct *)(argp1); { error_status=0; - cbf_positioner_struct_get_rotation_axis(arg1,arg2,arg3,arg4); + cbf_detector_struct_set_beam_center_sf(arg1,arg2,arg3,arg4,arg5); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -7339,341 +7824,417 @@ SWIGINTERN PyObject *_wrap_cbf_positioner_struct_get_rotation_axis(PyObject *SWI int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *cbf_positioner_struct_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cbf_positioner_struct, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_cbf_detector_struct_positioner_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - cbf_positioner arg2 = (cbf_positioner) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_detector_struct_positioner_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_positioner_set" "', argument " "1"" of type '" "cbf_detector_struct *""'"); - } - arg1 = (cbf_detector_struct *)(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_cbf_positioner_struct, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_detector_struct_positioner_set" "', argument " "2"" of type '" "cbf_positioner""'"); - } - arg2 = (cbf_positioner)(argp2); - if (arg1) (arg1)->positioner = arg2; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_detector_struct_positioner_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - cbf_positioner result; - - if (!PyArg_ParseTuple(args,(char *)"O:cbf_detector_struct_positioner_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_positioner_get" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); } - arg1 = (cbf_detector_struct *)(argp1); - result = (cbf_positioner) ((arg1)->positioner); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_displacement_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_set_reference_beam_center(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - double *arg2 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - double temp2[2] ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_detector_struct_displacement_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_displacement_set" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_set_reference_beam_center" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } arg1 = (cbf_detector_struct *)(argp1); { - if (obj1 == Py_None) arg2 = NULL; - else - if (!convert_darray(obj1,temp2,2)) { + error_status=0; + cbf_detector_struct_set_reference_beam_center(arg1,arg2,arg3,arg4,arg5); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); return NULL; } - arg2 = &temp2[0]; - } - { - if (arg2) { - size_t ii = 0; - for (; ii < (size_t)2; ++ii) *(double *)&arg1->displacement[ii] = *((double *)arg2 + ii); - } else { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""displacement""' of type '""double [2]""'"); - } } resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_detector_struct_displacement_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - double *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:cbf_detector_struct_displacement_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_displacement_get" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); } - arg1 = (cbf_detector_struct *)(argp1); - result = (double *)(double *) ((arg1)->displacement); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_increment_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_set_reference_beam_center_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - double *arg2 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - double temp2[2] ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_detector_struct_increment_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_increment_set" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_set_reference_beam_center_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } arg1 = (cbf_detector_struct *)(argp1); { - if (obj1 == Py_None) arg2 = NULL; - else - if (!convert_darray(obj1,temp2,2)) { + error_status=0; + cbf_detector_struct_set_reference_beam_center_fs(arg1,arg2,arg3,arg4,arg5); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); return NULL; } - arg2 = &temp2[0]; - } - { - if (arg2) { - size_t ii = 0; - for (; ii < (size_t)2; ++ii) *(double *)&arg1->increment[ii] = *((double *)arg2 + ii); - } else { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""increment""' of type '""double [2]""'"); - } } resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_detector_struct_increment_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - double *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:cbf_detector_struct_increment_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_increment_get" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); } - arg1 = (cbf_detector_struct *)(argp1); - result = (double *)(double *) ((arg1)->increment); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_detector_struct_axes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - size_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_detector_struct_axes_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_axes_set" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); } - arg1 = (cbf_detector_struct *)(argp1); - ecode2 = SWIG_AsVal_size_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_axes_set" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = (size_t)(val2); - if (arg1) (arg1)->axes = arg2; - resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_axes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_set_reference_beam_center_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - size_t result; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_detector_struct_axes_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_axes_get" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_set_reference_beam_center_sf" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } arg1 = (cbf_detector_struct *)(argp1); - result = ((arg1)->axes); - resultobj = SWIG_From_size_t((size_t)(result)); + { + error_status=0; + cbf_detector_struct_set_reference_beam_center_sf(arg1,arg2,arg3,arg4,arg5); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_index_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - size_t *arg2 ; + double *arg2 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_detector_struct_index_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + arg2 = &temp2; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_index_set" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_detector_distance" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } arg1 = (cbf_detector_struct *)(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_size_t, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_detector_struct_index_set" "', argument " "2"" of type '" "size_t [2]""'"); - } - arg2 = (size_t *)(argp2); { - if (arg2) { - size_t ii = 0; - for (; ii < (size_t)2; ++ii) *(size_t *)&arg1->index[ii] = *((size_t *)arg2 + ii); - } else { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""index""' of type '""size_t [2]""'"); + error_status=0; + cbf_detector_struct_get_detector_distance(arg1,arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; } } resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_normal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - size_t *result = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_detector_struct_index_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_index_get" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_detector_normal" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } arg1 = (cbf_detector_struct *)(argp1); - result = (size_t *)(size_t *) ((arg1)->index); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_size_t, 0 | 0 ); + { + error_status=0; + cbf_detector_struct_get_detector_normal(arg1,arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_new_cbf_detector_struct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_axis_slow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_detector_struct *result = 0 ; + cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)":new_cbf_detector_struct")) SWIG_fail; + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_detector_axis_slow" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + } + arg1 = (cbf_detector_struct *)(argp1); { error_status=0; - result = (cbf_detector_struct *)new_cbf_detector_struct(); + cbf_detector_struct_get_detector_axis_slow(arg1,arg2,arg3,arg4); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_detector_struct, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_delete_cbf_detector_struct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_axis_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:delete_cbf_detector_struct",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, SWIG_POINTER_DISOWN | 0 ); + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_cbf_detector_struct" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_detector_axis_fast" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } arg1 = (cbf_detector_struct *)(argp1); { error_status=0; - delete_cbf_detector_struct(arg1); + cbf_detector_struct_get_detector_axis_fast(arg1,arg2,arg3,arg4); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -7681,64 +8242,71 @@ SWIGINTERN PyObject *_wrap_delete_cbf_detector_struct(PyObject *SWIGUNUSEDPARM(s } } resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_set_beam_center_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_axes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; double *arg2 = (double *) 0 ; double *arg3 = (double *) 0 ; double *arg4 = (double *) 0 ; double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + double *arg7 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - void *argp5 = 0 ; - int res5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:cbf_detector_struct_set_beam_center_fs",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_set_beam_center_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_detector_axes" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } arg1 = (cbf_detector_struct *)(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_detector_struct_set_beam_center_fs" "', argument " "2"" of type '" "double *""'"); - } - arg2 = (double *)(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "cbf_detector_struct_set_beam_center_fs" "', argument " "3"" of type '" "double *""'"); - } - arg3 = (double *)(argp3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_detector_struct_set_beam_center_fs" "', argument " "4"" of type '" "double *""'"); - } - arg4 = (double *)(argp4); - res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "cbf_detector_struct_set_beam_center_fs" "', argument " "5"" of type '" "double *""'"); - } - arg5 = (double *)(argp5); { error_status=0; - cbf_detector_struct_set_beam_center_fs(arg1,arg2,arg3,arg4,arg5); + cbf_detector_struct_get_detector_axes(arg1,arg2,arg3,arg4,arg5,arg6,arg7); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -7746,84 +8314,57 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_set_beam_center_fs(PyObject *SWIG } } resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_detector_struct_set_reference_beam_center_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - double *arg2 = (double *) 0 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - double *arg5 = (double *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - void *argp5 = 0 ; - int res5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:cbf_detector_struct_set_reference_beam_center_fs",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_set_reference_beam_center_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); } - arg1 = (cbf_detector_struct *)(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_detector_struct_set_reference_beam_center_fs" "', argument " "2"" of type '" "double *""'"); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); } - arg2 = (double *)(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "cbf_detector_struct_set_reference_beam_center_fs" "', argument " "3"" of type '" "double *""'"); + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); } - arg3 = (double *)(argp3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_detector_struct_set_reference_beam_center_fs" "', argument " "4"" of type '" "double *""'"); + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); } - arg4 = (double *)(argp4); - res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "cbf_detector_struct_set_reference_beam_center_fs" "', argument " "5"" of type '" "double *""'"); + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); } - arg5 = (double *)(argp5); - { - error_status=0; - cbf_detector_struct_set_reference_beam_center_fs(arg1,arg2,arg3,arg4,arg5); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); } - resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_beam_center(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_axes_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; double *arg2 = (double *) 0 ; double *arg3 = (double *) 0 ; double *arg4 = (double *) 0 ; double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + double *arg7 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; double temp2 ; @@ -7834,21 +8375,28 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_beam_center(PyObject *SWIGUNU int res4 = SWIG_TMPOBJ ; double temp5 ; int res5 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; arg2 = &temp2; arg3 = &temp3; arg4 = &temp4; arg5 = &temp5; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_detector_struct_get_beam_center",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + arg6 = &temp6; + arg7 = &temp7; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_beam_center" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_detector_axes_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } arg1 = (cbf_detector_struct *)(argp1); { error_status=0; - cbf_detector_struct_get_beam_center(arg1,arg2,arg3,arg4,arg5); + cbf_detector_struct_get_detector_axes_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -7880,58 +8428,65 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_beam_center(PyObject *SWIGUNU int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_coordinates_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_axes_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - double arg2 ; - double arg3 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; double *arg4 = (double *) 0 ; double *arg5 = (double *) 0 ; double *arg6 = (double *) 0 ; + double *arg7 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; double temp4 ; int res4 = SWIG_TMPOBJ ; double temp5 ; int res5 = SWIG_TMPOBJ ; double temp6 ; int res6 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + arg2 = &temp2; + arg3 = &temp3; arg4 = &temp4; arg5 = &temp5; arg6 = &temp6; - if (!PyArg_ParseTuple(args,(char *)"OOO:cbf_detector_struct_get_pixel_coordinates_fs",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + arg7 = &temp7; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_pixel_coordinates_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_detector_axes_sf" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } arg1 = (cbf_detector_struct *)(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_pixel_coordinates_fs" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_detector_struct_get_pixel_coordinates_fs" "', argument " "3"" of type '" "double""'"); - } - arg3 = (double)(val3); { error_status=0; - cbf_detector_struct_get_pixel_coordinates_fs(arg1,arg2,arg3,arg4,arg5,arg6); + cbf_detector_struct_get_detector_axes_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -7939,6 +8494,18 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_coordinates_fs(PyObject } } resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } if (SWIG_IsTmpObj(res4)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); } else { @@ -7957,67 +8524,64 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_coordinates_fs(PyObject int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_inferred_pixel_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_surface_axes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - unsigned int arg2 ; - double *arg3 = (double *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; - double temp3 ; - int res3 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; - arg3 = &temp3; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_detector_struct_get_inferred_pixel_size",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_get_detector_surface_axes", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_inferred_pixel_size" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_detector_surface_axes" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } arg1 = (cbf_detector_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_inferred_pixel_size" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_detector_surface_axes" "', argument " "2"" of type '" "int""'"); } - arg2 = (unsigned int)(val2); + arg2 = (int)(val2); { error_status=0; - cbf_detector_struct_get_inferred_pixel_size(arg1,arg2,arg3); + result = (char *)cbf_detector_struct_get_detector_surface_axes(arg1,arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); - } + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_coordinates(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; double arg2 ; double arg3 ; double *arg4 = (double *) 0 ; double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -8028,31 +8592,32 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_area(PyObject *SWIGUNUS int res4 = SWIG_TMPOBJ ; double temp5 ; int res5 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + PyObject *swig_obj[3] ; arg4 = &temp4; arg5 = &temp5; - if (!PyArg_ParseTuple(args,(char *)"OOO:cbf_detector_struct_get_pixel_area",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + arg6 = &temp6; + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_get_pixel_coordinates", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_pixel_area" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_pixel_coordinates" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } arg1 = (cbf_detector_struct *)(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_pixel_area" "', argument " "2"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_pixel_coordinates" "', argument " "2"" of type '" "double""'"); } arg2 = (double)(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_detector_struct_get_pixel_area" "', argument " "3"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_detector_struct_get_pixel_coordinates" "', argument " "3"" of type '" "double""'"); } arg3 = (double)(val3); { error_status=0; - cbf_detector_struct_get_pixel_area(arg1,arg2,arg3,arg4,arg5); + cbf_detector_struct_get_pixel_coordinates(arg1,arg2,arg3,arg4,arg5,arg6); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -8072,13 +8637,19 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_area(PyObject *SWIGUNUS int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_normal_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_coordinates_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; double arg2 ; @@ -8098,32 +8669,30 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_normal_fs(PyObject *SWI int res5 = SWIG_TMPOBJ ; double temp6 ; int res6 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; + PyObject *swig_obj[3] ; arg4 = &temp4; arg5 = &temp5; arg6 = &temp6; - if (!PyArg_ParseTuple(args,(char *)"OOO:cbf_detector_struct_get_pixel_normal_fs",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_get_pixel_coordinates_fs", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_pixel_normal_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_pixel_coordinates_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } arg1 = (cbf_detector_struct *)(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_pixel_normal_fs" "', argument " "2"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_pixel_coordinates_fs" "', argument " "2"" of type '" "double""'"); } arg2 = (double)(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_detector_struct_get_pixel_normal_fs" "', argument " "3"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_detector_struct_get_pixel_coordinates_fs" "', argument " "3"" of type '" "double""'"); } arg3 = (double)(val3); { error_status=0; - cbf_detector_struct_get_pixel_normal_fs(arg1,arg2,arg3,arg4,arg5,arg6); + cbf_detector_struct_get_pixel_coordinates_fs(arg1,arg2,arg3,arg4,arg5,arg6); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -8155,85 +8724,50 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_normal_fs(PyObject *SWI } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_surface_axes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_detector_struct_get_detector_surface_axes",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_detector_surface_axes" "', argument " "1"" of type '" "cbf_detector_struct *""'"); - } - arg1 = (cbf_detector_struct *)(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_detector_surface_axes" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - { - error_status=0; - result = (char *)cbf_detector_struct_get_detector_surface_axes(arg1,arg2); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } - } - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_axes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_coordinates_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - double *arg2 = (double *) 0 ; - double *arg3 = (double *) 0 ; + double arg2 ; + double arg3 ; double *arg4 = (double *) 0 ; double *arg5 = (double *) 0 ; double *arg6 = (double *) 0 ; - double *arg7 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - double temp2 ; - int res2 = SWIG_TMPOBJ ; - double temp3 ; - int res3 = SWIG_TMPOBJ ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; double temp4 ; int res4 = SWIG_TMPOBJ ; double temp5 ; int res5 = SWIG_TMPOBJ ; double temp6 ; int res6 = SWIG_TMPOBJ ; - double temp7 ; - int res7 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[3] ; - arg2 = &temp2; - arg3 = &temp3; arg4 = &temp4; arg5 = &temp5; arg6 = &temp6; - arg7 = &temp7; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_detector_struct_get_detector_axes",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_get_pixel_coordinates_sf", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_detector_axes" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_pixel_coordinates_sf" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } arg1 = (cbf_detector_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_pixel_coordinates_sf" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_detector_struct_get_pixel_coordinates_sf" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); { error_status=0; - cbf_detector_struct_get_detector_axes(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + cbf_detector_struct_get_pixel_coordinates_sf(arg1,arg2,arg3,arg4,arg5,arg6); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -8241,18 +8775,6 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_axes(PyObject *SWIGU } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); - } if (SWIG_IsTmpObj(res4)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); } else { @@ -8271,70 +8793,56 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_axes(PyObject *SWIGU int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); } - if (SWIG_IsTmpObj(res7)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); - } else { - int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); - } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_set_reference_beam_center(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_normal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - double *arg2 = (double *) 0 ; - double *arg3 = (double *) 0 ; + double arg2 ; + double arg3 ; double *arg4 = (double *) 0 ; double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - void *argp5 = 0 ; - int res5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:cbf_detector_struct_set_reference_beam_center",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + PyObject *swig_obj[3] ; + + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_get_pixel_normal", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_set_reference_beam_center" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_pixel_normal" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } arg1 = (cbf_detector_struct *)(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_detector_struct_set_reference_beam_center" "', argument " "2"" of type '" "double *""'"); - } - arg2 = (double *)(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "cbf_detector_struct_set_reference_beam_center" "', argument " "3"" of type '" "double *""'"); - } - arg3 = (double *)(argp3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_detector_struct_set_reference_beam_center" "', argument " "4"" of type '" "double *""'"); - } - arg4 = (double *)(argp4); - res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "cbf_detector_struct_set_reference_beam_center" "', argument " "5"" of type '" "double *""'"); - } - arg5 = (double *)(argp5); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_pixel_normal" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_detector_struct_get_pixel_normal" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); { error_status=0; - cbf_detector_struct_set_reference_beam_center(arg1,arg2,arg3,arg4,arg5); + cbf_detector_struct_get_pixel_normal(arg1,arg2,arg3,arg4,arg5,arg6); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -8342,40 +8850,74 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_set_reference_beam_center(PyObjec } } resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_axis_slow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_normal_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - double *arg2 = (double *) 0 ; - double *arg3 = (double *) 0 ; + double arg2 ; + double arg3 ; double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - double temp2 ; - int res2 = SWIG_TMPOBJ ; - double temp3 ; - int res3 = SWIG_TMPOBJ ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; double temp4 ; int res4 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + PyObject *swig_obj[3] ; - arg2 = &temp2; - arg3 = &temp3; arg4 = &temp4; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_detector_struct_get_detector_axis_slow",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + arg5 = &temp5; + arg6 = &temp6; + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_get_pixel_normal_fs", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_detector_axis_slow" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_pixel_normal_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } arg1 = (cbf_detector_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_pixel_normal_fs" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_detector_struct_get_pixel_normal_fs" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); { error_status=0; - cbf_detector_struct_get_detector_axis_slow(arg1,arg2,arg3,arg4); + cbf_detector_struct_get_pixel_normal_fs(arg1,arg2,arg3,arg4,arg5,arg6); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -8383,50 +8925,70 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_axis_slow(PyObject * } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); - } if (SWIG_IsTmpObj(res4)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); } else { int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - double *arg2 = (double *) 0 ; + double arg2 ; + double arg3 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - double temp2 ; - int res2 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[3] ; - arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_detector_struct_get_detector_distance",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + arg4 = &temp4; + arg5 = &temp5; + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_get_pixel_area", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_detector_distance" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_pixel_area" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } arg1 = (cbf_detector_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_pixel_area" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_detector_struct_get_pixel_area" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); { error_status=0; - cbf_detector_struct_get_detector_distance(arg1,arg2); + cbf_detector_struct_get_pixel_area(arg1,arg2,arg3,arg4,arg5); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -8434,11 +8996,17 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_distance(PyObject *S } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); } return resultobj; fail: @@ -8446,35 +9014,46 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_distance(PyObject *S } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_inferred_pixel_size_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_area_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - unsigned int arg2 ; - double *arg3 = (double *) 0 ; + double arg2 ; + double arg3 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + double val2 ; int ecode2 = 0 ; - double temp3 ; - int res3 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + double val3 ; + int ecode3 = 0 ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[3] ; - arg3 = &temp3; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_detector_struct_get_inferred_pixel_size_fs",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + arg4 = &temp4; + arg5 = &temp5; + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_get_pixel_area_fs", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_inferred_pixel_size_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_pixel_area_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } arg1 = (cbf_detector_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_inferred_pixel_size_fs" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_pixel_area_fs" "', argument " "2"" of type '" "double""'"); } - arg2 = (unsigned int)(val2); + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_detector_struct_get_pixel_area_fs" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); { error_status=0; - cbf_detector_struct_get_inferred_pixel_size_fs(arg1,arg2,arg3); + cbf_detector_struct_get_pixel_area_fs(arg1,arg2,arg3,arg4,arg5); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -8482,11 +9061,17 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_inferred_pixel_size_fs(PyObje } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); } return resultobj; fail: @@ -8494,34 +9079,46 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_inferred_pixel_size_fs(PyObje } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_normal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_area_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - double *arg2 = (double *) 0 ; - double *arg3 = (double *) 0 ; + double arg2 ; + double arg3 ; double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - double temp2 ; - int res2 = SWIG_TMPOBJ ; - double temp3 ; - int res3 = SWIG_TMPOBJ ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; double temp4 ; int res4 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[3] ; - arg2 = &temp2; - arg3 = &temp3; arg4 = &temp4; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_detector_struct_get_detector_normal",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + arg5 = &temp5; + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_get_pixel_area_sf", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_detector_normal" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_pixel_area_sf" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } arg1 = (cbf_detector_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_pixel_area_sf" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_detector_struct_get_pixel_area_sf" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); { error_status=0; - cbf_detector_struct_get_detector_normal(arg1,arg2,arg3,arg4); + cbf_detector_struct_get_pixel_area_sf(arg1,arg2,arg3,arg4,arg5); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -8529,58 +9126,52 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_normal(PyObject *SWI } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); - } if (SWIG_IsTmpObj(res4)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); } else { int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_axis_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_inferred_pixel_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - double *arg2 = (double *) 0 ; + unsigned int arg2 ; double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - double temp2 ; - int res2 = SWIG_TMPOBJ ; + unsigned int val2 ; + int ecode2 = 0 ; double temp3 ; int res3 = SWIG_TMPOBJ ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[2] ; - arg2 = &temp2; arg3 = &temp3; - arg4 = &temp4; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_detector_struct_get_detector_axis_fast",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_get_inferred_pixel_size", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_detector_axis_fast" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_inferred_pixel_size" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } arg1 = (cbf_detector_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_inferred_pixel_size" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); { error_status=0; - cbf_detector_struct_get_detector_axis_fast(arg1,arg2,arg3,arg4); + cbf_detector_struct_get_inferred_pixel_size(arg1,arg2,arg3); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -8588,70 +9179,46 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_axis_fast(PyObject * } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); - } if (SWIG_IsTmpObj(res3)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); } else { int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); - } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_axes_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_inferred_pixel_size_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - double *arg2 = (double *) 0 ; + unsigned int arg2 ; double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - double *arg5 = (double *) 0 ; - double *arg6 = (double *) 0 ; - double *arg7 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - double temp2 ; - int res2 = SWIG_TMPOBJ ; + unsigned int val2 ; + int ecode2 = 0 ; double temp3 ; int res3 = SWIG_TMPOBJ ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - double temp5 ; - int res5 = SWIG_TMPOBJ ; - double temp6 ; - int res6 = SWIG_TMPOBJ ; - double temp7 ; - int res7 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[2] ; - arg2 = &temp2; arg3 = &temp3; - arg4 = &temp4; - arg5 = &temp5; - arg6 = &temp6; - arg7 = &temp7; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_detector_struct_get_detector_axes_fs",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_get_inferred_pixel_size_fs", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_detector_axes_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_inferred_pixel_size_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } arg1 = (cbf_detector_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_inferred_pixel_size_fs" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); { error_status=0; - cbf_detector_struct_get_detector_axes_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + cbf_detector_struct_get_inferred_pixel_size_fs(arg1,arg2,arg3); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -8659,88 +9226,46 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_axes_fs(PyObject *SW } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); - } if (SWIG_IsTmpObj(res3)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); } else { int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res6)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); - } else { - int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res7)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); - } else { - int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); - } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_axes_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_inferred_pixel_size_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - double *arg2 = (double *) 0 ; + unsigned int arg2 ; double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - double *arg5 = (double *) 0 ; - double *arg6 = (double *) 0 ; - double *arg7 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - double temp2 ; - int res2 = SWIG_TMPOBJ ; + unsigned int val2 ; + int ecode2 = 0 ; double temp3 ; int res3 = SWIG_TMPOBJ ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - double temp5 ; - int res5 = SWIG_TMPOBJ ; - double temp6 ; - int res6 = SWIG_TMPOBJ ; - double temp7 ; - int res7 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[2] ; - arg2 = &temp2; arg3 = &temp3; - arg4 = &temp4; - arg5 = &temp5; - arg6 = &temp6; - arg7 = &temp7; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_detector_struct_get_detector_axes_sf",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_detector_struct_get_inferred_pixel_size_sf", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_detector_axes_sf" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_inferred_pixel_size_sf" "', argument " "1"" of type '" "cbf_detector_struct *""'"); } arg1 = (cbf_detector_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_inferred_pixel_size_sf" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); { error_status=0; - cbf_detector_struct_get_detector_axes_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + cbf_detector_struct_get_inferred_pixel_size_sf(arg1,arg2,arg3); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -8748,355 +9273,223 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_detector_axes_sf(PyObject *SW } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); - } if (SWIG_IsTmpObj(res3)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); } else { int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *cbf_detector_struct_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_cbf_detector_struct, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *cbf_detector_struct_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_node_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + cbf_node *arg2 = (cbf_node *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_node_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_node_set" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } - if (SWIG_IsTmpObj(res6)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); - } else { - int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cbf_node, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_node_set" "', argument " "2"" of type '" "cbf_node *""'"); } - if (SWIG_IsTmpObj(res7)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); - } else { - int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + arg2 = (cbf_node *)(argp2); + if (arg1) (arg1)->node = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_node_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cbf_node *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_node_get" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } + arg1 = (cbf_handle_struct *)(argp1); + result = (cbf_node *) ((arg1)->node); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_node, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_coordinates_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_row_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - double arg2 ; - double arg3 ; - double *arg4 = (double *) 0 ; - double *arg5 = (double *) 0 ; - double *arg6 = (double *) 0 ; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - double temp5 ; - int res5 = SWIG_TMPOBJ ; - double temp6 ; - int res6 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; - arg4 = &temp4; - arg5 = &temp5; - arg6 = &temp6; - if (!PyArg_ParseTuple(args,(char *)"OOO:cbf_detector_struct_get_pixel_coordinates_sf",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_row_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_pixel_coordinates_sf" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_row_set" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } - arg1 = (cbf_detector_struct *)(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_pixel_coordinates_sf" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_detector_struct_get_pixel_coordinates_sf" "', argument " "3"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_row_set" "', argument " "2"" of type '" "int""'"); } - arg3 = (double)(val3); - { - error_status=0; - cbf_detector_struct_get_pixel_coordinates_sf(arg1,arg2,arg3,arg4,arg5,arg6); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } - } + arg2 = (int)(val2); + if (arg1) (arg1)->row = arg2; resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res6)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); - } else { - int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); - } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_set_beam_center(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_row_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - double *arg2 = (double *) 0 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - double *arg5 = (double *) 0 ; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - void *argp5 = 0 ; - int res5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:cbf_detector_struct_set_beam_center",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_set_beam_center" "', argument " "1"" of type '" "cbf_detector_struct *""'"); - } - arg1 = (cbf_detector_struct *)(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_detector_struct_set_beam_center" "', argument " "2"" of type '" "double *""'"); - } - arg2 = (double *)(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "cbf_detector_struct_set_beam_center" "', argument " "3"" of type '" "double *""'"); - } - arg3 = (double *)(argp3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_detector_struct_set_beam_center" "', argument " "4"" of type '" "double *""'"); - } - arg4 = (double *)(argp4); - res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "cbf_detector_struct_set_beam_center" "', argument " "5"" of type '" "double *""'"); - } - arg5 = (double *)(argp5); - { - error_status=0; - cbf_detector_struct_set_beam_center(arg1,arg2,arg3,arg4,arg5); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_row_get" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } - resultobj = SWIG_Py_Void(); + arg1 = (cbf_handle_struct *)(argp1); + result = (int) ((arg1)->row); + resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_area_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_search_row_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - double arg2 ; - double arg3 ; - double *arg4 = (double *) 0 ; - double *arg5 = (double *) 0 ; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - double val2 ; + int val2 ; int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - double temp5 ; - int res5 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; + PyObject *swig_obj[2] ; - arg4 = &temp4; - arg5 = &temp5; - if (!PyArg_ParseTuple(args,(char *)"OOO:cbf_detector_struct_get_pixel_area_fs",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_search_row_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_pixel_area_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_search_row_set" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } - arg1 = (cbf_detector_struct *)(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_pixel_area_fs" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_detector_struct_get_pixel_area_fs" "', argument " "3"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_search_row_set" "', argument " "2"" of type '" "int""'"); } - arg3 = (double)(val3); - { - error_status=0; - cbf_detector_struct_get_pixel_area_fs(arg1,arg2,arg3,arg4,arg5); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } - } + arg2 = (int)(val2); + if (arg1) (arg1)->search_row = arg2; resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); - } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_beam_center_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_search_row_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - double *arg2 = (double *) 0 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - double *arg5 = (double *) 0 ; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - double temp2 ; - int res2 = SWIG_TMPOBJ ; - double temp3 ; - int res3 = SWIG_TMPOBJ ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - double temp5 ; - int res5 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; + int result; - arg2 = &temp2; - arg3 = &temp3; - arg4 = &temp4; - arg5 = &temp5; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_detector_struct_get_beam_center_fs",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_beam_center_fs" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_search_row_get" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } - arg1 = (cbf_detector_struct *)(argp1); + arg1 = (cbf_handle_struct *)(argp1); + result = (int) ((arg1)->search_row); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_cbf_handle_struct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "new_cbf_handle_struct", 0, 0, 0)) SWIG_fail; { error_status=0; - cbf_detector_struct_get_beam_center_fs(arg1,arg2,arg3,arg4,arg5); + result = (cbf_handle_struct *)new_cbf_handle_struct(); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); - } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_handle_struct, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_inferred_pixel_size_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_delete_cbf_handle_struct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - unsigned int arg2 ; - double *arg3 = (double *) 0 ; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - double temp3 ; - int res3 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + PyObject *swig_obj[1] ; - arg3 = &temp3; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_detector_struct_get_inferred_pixel_size_sf",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_inferred_pixel_size_sf" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_cbf_handle_struct" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } - arg1 = (cbf_detector_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_inferred_pixel_size_sf" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); + arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - cbf_detector_struct_get_inferred_pixel_size_sf(arg1,arg2,arg3); + delete_cbf_handle_struct(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -9104,64 +9497,45 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_inferred_pixel_size_sf(PyObje } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); - } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_coordinates(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_read_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - double arg2 ; - double arg3 ; - double *arg4 = (double *) 0 ; - double *arg5 = (double *) 0 ; - double *arg6 = (double *) 0 ; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; void *argp1 = 0 ; int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; int ecode3 = 0 ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - double temp5 ; - int res5 = SWIG_TMPOBJ ; - double temp6 ; - int res6 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; + PyObject *swig_obj[3] ; - arg4 = &temp4; - arg5 = &temp5; - arg6 = &temp6; - if (!PyArg_ParseTuple(args,(char *)"OOO:cbf_detector_struct_get_pixel_coordinates",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_read_file", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_pixel_coordinates" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_read_file" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_read_file" "', argument " "2"" of type '" "char *""'"); } - arg1 = (cbf_detector_struct *)(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_pixel_coordinates" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); + arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_detector_struct_get_pixel_coordinates" "', argument " "3"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_read_file" "', argument " "3"" of type '" "int""'"); } - arg3 = (double)(val3); + arg3 = (int)(val3); { error_status=0; - cbf_detector_struct_get_pixel_coordinates(arg1,arg2,arg3,arg4,arg5,arg6); + cbf_handle_struct_read_file(arg1,arg2,arg3); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -9169,62 +9543,47 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_coordinates(PyObject *S } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res6)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); - } else { - int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); - } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_beam_center_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_read_widefile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - double *arg2 = (double *) 0 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - double *arg5 = (double *) 0 ; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; void *argp1 = 0 ; int res1 = 0 ; - double temp2 ; - int res2 = SWIG_TMPOBJ ; - double temp3 ; - int res3 = SWIG_TMPOBJ ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - double temp5 ; - int res5 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; - arg2 = &temp2; - arg3 = &temp3; - arg4 = &temp4; - arg5 = &temp5; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_detector_struct_get_beam_center_sf",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_read_widefile", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_beam_center_sf" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_read_widefile" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } - arg1 = (cbf_detector_struct *)(argp1); + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_read_widefile" "', argument " "2"" of type '" "char *""'"); + } + arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_read_widefile" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); { error_status=0; - cbf_detector_struct_get_beam_center_sf(arg1,arg2,arg3,arg4,arg5); + cbf_handle_struct_read_widefile(arg1,arg2,arg3); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -9232,78 +9591,63 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_beam_center_sf(PyObject *SWIG } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); - } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_area_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_write_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - double arg2 ; - double arg3 ; - double *arg4 = (double *) 0 ; - double *arg5 = (double *) 0 ; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + int arg4 ; + int arg5 ; void *argp1 = 0 ; int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; int ecode3 = 0 ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - double temp5 ; - int res5 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; + int val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + PyObject *swig_obj[5] ; - arg4 = &temp4; - arg5 = &temp5; - if (!PyArg_ParseTuple(args,(char *)"OOO:cbf_detector_struct_get_pixel_area_sf",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_write_file", 5, 5, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_pixel_area_sf" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_write_file" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } - arg1 = (cbf_detector_struct *)(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_pixel_area_sf" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_write_file" "', argument " "2"" of type '" "char *""'"); + } + arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_detector_struct_get_pixel_area_sf" "', argument " "3"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_write_file" "', argument " "3"" of type '" "int""'"); } - arg3 = (double)(val3); + arg3 = (int)(val3); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_write_file" "', argument " "4"" of type '" "int""'"); + } + arg4 = (int)(val4); + ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_write_file" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); { error_status=0; - cbf_detector_struct_get_pixel_area_sf(arg1,arg2,arg3,arg4,arg5); + cbf_handle_struct_write_file(arg1,arg2,arg3,arg4,arg5); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -9311,56 +9655,63 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_area_sf(PyObject *SWIGU } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); - } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_set_reference_beam_center_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_write_widefile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - double *arg2 = (double *) 0 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - double *arg5 = (double *) 0 ; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + int arg4 ; + int arg5 ; void *argp1 = 0 ; int res1 = 0 ; - double temp2 ; - int res2 = SWIG_TMPOBJ ; - double temp3 ; - int res3 = SWIG_TMPOBJ ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - double temp5 ; - int res5 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + PyObject *swig_obj[5] ; - arg2 = &temp2; - arg3 = &temp3; - arg4 = &temp4; - arg5 = &temp5; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_detector_struct_set_reference_beam_center_sf",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_write_widefile", 5, 5, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_set_reference_beam_center_sf" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_write_widefile" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } - arg1 = (cbf_detector_struct *)(argp1); + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_write_widefile" "', argument " "2"" of type '" "char *""'"); + } + arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_write_widefile" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_write_widefile" "', argument " "4"" of type '" "int""'"); + } + arg4 = (int)(val4); + ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_write_widefile" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); { error_status=0; - cbf_detector_struct_set_reference_beam_center_sf(arg1,arg2,arg3,arg4,arg5); + cbf_handle_struct_write_widefile(arg1,arg2,arg3,arg4,arg5); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -9368,68 +9719,39 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_set_reference_beam_center_sf(PyOb } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); - } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } - - -SWIGINTERN PyObject *_wrap_cbf_detector_struct_set_beam_center_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - double *arg2 = (double *) 0 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - double *arg5 = (double *) 0 ; + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_new_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - double temp2 ; - int res2 = SWIG_TMPOBJ ; - double temp3 ; - int res3 = SWIG_TMPOBJ ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - double temp5 ; - int res5 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; - arg2 = &temp2; - arg3 = &temp3; - arg4 = &temp4; - arg5 = &temp5; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_detector_struct_set_beam_center_sf",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_new_datablock", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_set_beam_center_sf" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_new_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } - arg1 = (cbf_detector_struct *)(argp1); + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_new_datablock" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); { error_status=0; - cbf_detector_struct_set_beam_center_sf(arg1,arg2,arg3,arg4,arg5); + cbf_handle_struct_new_datablock(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -9437,82 +9759,39 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_set_beam_center_sf(PyObject *SWIG } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); - } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_normal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_new_saveframe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - cbf_detector_struct *arg1 = (cbf_detector_struct *) 0 ; - double arg2 ; - double arg3 ; - double *arg4 = (double *) 0 ; - double *arg5 = (double *) 0 ; - double *arg6 = (double *) 0 ; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - double temp5 ; - int res5 = SWIG_TMPOBJ ; - double temp6 ; - int res6 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; - arg4 = &temp4; - arg5 = &temp5; - arg6 = &temp6; - if (!PyArg_ParseTuple(args,(char *)"OOO:cbf_detector_struct_get_pixel_normal",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_new_saveframe", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_detector_struct_get_pixel_normal" "', argument " "1"" of type '" "cbf_detector_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_new_saveframe" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } - arg1 = (cbf_detector_struct *)(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_detector_struct_get_pixel_normal" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_detector_struct_get_pixel_normal" "', argument " "3"" of type '" "double""'"); - } - arg3 = (double)(val3); + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_new_saveframe" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); { error_status=0; - cbf_detector_struct_get_pixel_normal(arg1,arg2,arg3,arg4,arg5,arg6); + cbf_handle_struct_new_saveframe(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -9520,230 +9799,268 @@ SWIGINTERN PyObject *_wrap_cbf_detector_struct_get_pixel_normal(PyObject *SWIGUN } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res6)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); - } else { - int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); - } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *cbf_detector_struct_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_cbf_detector_struct, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_cbf_handle_struct_node_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_force_new_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - cbf_node *arg2 = (cbf_node *) 0 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_node_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_force_new_datablock", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_node_set" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_force_new_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_cbf_node, SWIG_POINTER_DISOWN | 0 ); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_node_set" "', argument " "2"" of type '" "cbf_node *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_force_new_datablock" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_force_new_datablock(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } } - arg2 = (cbf_node *)(argp2); - if (arg1) (arg1)->node = arg2; resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_node_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_force_new_saveframe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - cbf_node *result = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_node_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_force_new_saveframe", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_node_get" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_force_new_saveframe" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - result = (cbf_node *) ((arg1)->node); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_node, 0 | 0 ); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_force_new_saveframe" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_force_new_saveframe(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_row_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_new_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int arg2 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_row_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_new_category", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_row_set" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_new_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_row_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - if (arg1) (arg1)->row = arg2; + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_new_category" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_new_category(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_row_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_force_new_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_row_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_force_new_category", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_row_get" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_force_new_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - result = (int) ((arg1)->row); - resultobj = SWIG_From_int((int)(result)); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_force_new_category" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_force_new_category(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_search_row_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_new_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int arg2 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_search_row_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_new_column", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_search_row_set" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_new_column" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_new_column" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_new_column(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } } - arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_search_row_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - if (arg1) (arg1)->search_row = arg2; resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_search_row_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_new_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_search_row_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_search_row_get" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_new_row" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - result = (int) ((arg1)->search_row); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_cbf_handle_struct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_handle_struct *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":new_cbf_handle_struct")) SWIG_fail; { error_status=0; - result = (cbf_handle_struct *)new_cbf_handle_struct(); + cbf_handle_struct_new_row(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_handle_struct, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_delete_cbf_handle_struct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_insert_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"O:delete_cbf_handle_struct",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_insert_row", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_cbf_handle_struct" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_insert_row" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_insert_row" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); { error_status=0; - delete_cbf_handle_struct(arg1); + cbf_handle_struct_insert_row(arg1,arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -9757,7 +10074,7 @@ SWIGINTERN PyObject *_wrap_delete_cbf_handle_struct(PyObject *SWIGUNUSEDPARM(sel } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_select_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_delete_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; unsigned int arg2 ; @@ -9765,23 +10082,22 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_select_datablock(PyObject *SWIGUNUS int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_select_datablock",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_delete_row", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_select_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_delete_row" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_select_datablock" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_delete_row" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); { error_status=0; - cbf_handle_struct_select_datablock(arg1,arg2); + cbf_handle_struct_delete_row(arg1,arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -9795,7 +10111,7 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_select_datablock(PyObject *SWIGUNUS } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_force_new_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_datablockname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; char *arg2 = (char *) 0 ; @@ -9804,23 +10120,22 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_force_new_datablock(PyObject *SWIGU int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_force_new_datablock",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_datablockname", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_force_new_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_datablockname" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_force_new_datablock" "', argument " "2"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_datablockname" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_force_new_datablock(arg1,(char const *)arg2); + cbf_handle_struct_set_datablockname(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -9836,81 +10151,31 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_force_new_datablock(PyObject *SWIGU } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_fs_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_saveframename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int arg2 ; - char **arg3 = (char **) 0 ; - int *arg4 = (int *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; - int arg8 ; - int arg9 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - char *temp3 = 0 ; - int tempn3 ; - int val5 ; - int ecode5 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - int val8 ; - int ecode8 = 0 ; - int val9 ; - int ecode9 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; - arg3 = &temp3; arg4 = &tempn3; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:cbf_handle_struct_get_3d_image_fs_as_string",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_saveframename", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_3d_image_fs_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_saveframename" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_3d_image_fs_as_string" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - ecode5 = SWIG_AsVal_int(obj2, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_3d_image_fs_as_string" "', argument " "5"" of type '" "int""'"); - } - arg5 = (int)(val5); - ecode6 = SWIG_AsVal_int(obj3, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_3d_image_fs_as_string" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj4, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_3d_image_fs_as_string" "', argument " "7"" of type '" "int""'"); - } - arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj5, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_3d_image_fs_as_string" "', argument " "8"" of type '" "int""'"); - } - arg8 = (int)(val8); - ecode9 = SWIG_AsVal_int(obj6, &val9); - if (!SWIG_IsOK(ecode9)) { - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_get_3d_image_fs_as_string" "', argument " "9"" of type '" "int""'"); - } - arg9 = (int)(val9); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_saveframename" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_get_3d_image_fs_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + cbf_handle_struct_set_saveframename(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -9918,12 +10183,10 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_fs_as_string(PyObject } } resultobj = SWIG_Py_Void(); - if (*arg3) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); - free(*arg3); - } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } @@ -9933,10 +10196,11 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_reset_datablocks(PyObject *SWIGUNUS cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_reset_datablocks",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_reset_datablocks" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } @@ -9957,42 +10221,23 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_reset_datablocks(PyObject *SWIGUNUS } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_tag_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_reset_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int res3 ; - char *buf3 = 0 ; - int alloc3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"OOO:cbf_handle_struct_set_tag_category",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_tag_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_reset_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_tag_category" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "cbf_handle_struct_set_tag_category" "', argument " "3"" of type '" "char const *""'"); - } - arg3 = (char *)(buf3); { error_status=0; - cbf_handle_struct_set_tag_category(arg1,(char const *)arg2,(char const *)arg3); + cbf_handle_struct_reset_datablock(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -10000,171 +10245,119 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_tag_category(PyObject *SWIGUNUS } } resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_tag_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_reset_saveframe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_require_tag_root",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_tag_root" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_reset_saveframe" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_tag_root" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); { error_status=0; - result = (char *)cbf_handle_struct_require_tag_root(arg1,(char const *)arg2); + cbf_handle_struct_reset_saveframe(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_FromCharPtr((const char *)result); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + resultobj = SWIG_Py_Void(); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_row_number(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_reset_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - unsigned int result; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_row_number",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_row_number" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_reset_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - result = (unsigned int)cbf_handle_struct_row_number(arg1); + cbf_handle_struct_reset_category(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_remove_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - unsigned int arg3 ; - char *arg4 = (char *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; - int arg8 ; - int arg9 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - unsigned int val3 ; - int ecode3 = 0 ; - int res4 ; - char *buf4 = 0 ; - size_t size4 = 0 ; - int alloc4 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - int val8 ; - int ecode8 = 0 ; - int val9 ; - int ecode9 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cbf_handle_struct_set_image",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_image" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_remove_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + cbf_handle_struct_remove_datablock(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_remove_saveframe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_remove_saveframe" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_image" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_image" "', argument " "3"" of type '" "unsigned int""'"); - } - arg3 = (unsigned int)(val3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, &size4, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_image" "', argument " "4"" of type '" "char *""'"); - } - arg4 = (char *)(buf4); - arg5 = (int)(size4 - 1); - ecode6 = SWIG_AsVal_int(obj4, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_image" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj5, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_image" "', argument " "7"" of type '" "int""'"); - } - arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj6, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_image" "', argument " "8"" of type '" "int""'"); - } - arg8 = (int)(val8); - ecode9 = SWIG_AsVal_int(obj7, &val9); - if (!SWIG_IsOK(ecode9)) { - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_image" "', argument " "9"" of type '" "int""'"); - } - arg9 = (int)(val9); { error_status=0; - cbf_handle_struct_set_image(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + cbf_handle_struct_remove_saveframe(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -10172,57 +10365,29 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_image(PyObject *SWIGUNUSEDPARM( } } resultobj = SWIG_Py_Void(); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return resultobj; fail: - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_bin_sizes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_remove_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int arg2 ; - double arg3 ; - double arg4 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"OOOO:cbf_handle_struct_set_bin_sizes",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_bin_sizes" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_remove_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_bin_sizes" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_bin_sizes" "', argument " "3"" of type '" "double""'"); - } - arg3 = (double)(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_bin_sizes" "', argument " "4"" of type '" "double""'"); - } - arg4 = (double)(val4); { error_status=0; - cbf_handle_struct_set_bin_sizes(arg1,arg2,arg3,arg4); + cbf_handle_struct_remove_category(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -10236,22 +10401,23 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_bin_sizes(PyObject *SWIGUNUSEDP } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_new_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_remove_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_new_row",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_new_row" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_remove_column" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - cbf_handle_struct_new_row(arg1); + cbf_handle_struct_remove_column(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -10265,22 +10431,23 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_new_row(PyObject *SWIGUNUSEDPARM(se } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_rewind_saveframe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_remove_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_rewind_saveframe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_rewind_saveframe" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_remove_row" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - cbf_handle_struct_rewind_saveframe(arg1); + cbf_handle_struct_remove_row(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -10294,38 +10461,23 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_rewind_saveframe(PyObject *SWIGUNUS } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_realarrayparameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_rewind_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int *arg2 = (int *) 0 ; - int *arg3 = (int *) 0 ; - int *arg4 = (int *) 0 ; - int *arg5 = (int *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int temp2 ; - int res2 = SWIG_TMPOBJ ; - int temp3 ; - int res3 = SWIG_TMPOBJ ; - int temp4 ; - int res4 = SWIG_TMPOBJ ; - int temp5 ; - int res5 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - arg2 = &temp2; - arg3 = &temp3; - arg4 = &temp4; - arg5 = &temp5; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_realarrayparameters",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_realarrayparameters" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_rewind_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - cbf_handle_struct_get_realarrayparameters(arg1,arg2,arg3,arg4,arg5); + cbf_handle_struct_rewind_datablock(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -10333,74 +10485,29 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_realarrayparameters(PyObject *S } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); - } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_pixel_size_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_rewind_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - unsigned int arg3 ; - double *arg4 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - unsigned int val3 ; - int ecode3 = 0 ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; + PyObject *swig_obj[1] ; - arg4 = &temp4; - if (!PyArg_ParseTuple(args,(char *)"OOO:cbf_handle_struct_get_pixel_size_sf",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_pixel_size_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_rewind_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_pixel_size_sf" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_get_pixel_size_sf" "', argument " "3"" of type '" "unsigned int""'"); - } - arg3 = (unsigned int)(val3); { error_status=0; - cbf_handle_struct_get_pixel_size_sf(arg1,arg2,arg3,arg4); + cbf_handle_struct_rewind_category(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -10408,44 +10515,29 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_pixel_size_sf(PyObject *SWIGUNU } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); - } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_force_new_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_rewind_saveframe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_force_new_category",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_force_new_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_rewind_saveframe" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_force_new_category" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_force_new_category(arg1,(char const *)arg2); + cbf_handle_struct_rewind_saveframe(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -10453,111 +10545,90 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_force_new_category(PyObject *SWIGUN } } resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_force_new_saveframe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_rewind_blockitem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + PyObject *swig_obj[1] ; + CBF_NODETYPE result; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_force_new_saveframe",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_force_new_saveframe" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_rewind_blockitem" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_force_new_saveframe" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_force_new_saveframe(arg1,(char const *)arg2); + result = (CBF_NODETYPE)cbf_handle_struct_rewind_blockitem(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + resultobj = SWIG_From_int((int)(result)); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_count_datablocks(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_rewind_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - unsigned int result; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_count_datablocks",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_count_datablocks" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_rewind_column" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - result = (unsigned int)cbf_handle_struct_count_datablocks(arg1); + cbf_handle_struct_rewind_column(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_rewind_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_find_row",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_find_row" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_rewind_row" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_find_row" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_find_row(arg1,(char const *)arg2); + cbf_handle_struct_rewind_row(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -10565,39 +10636,29 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_row(PyObject *SWIGUNUSEDPARM(s } } resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_select_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_next_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_select_column",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_select_column" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_next_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_select_column" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); { error_status=0; - cbf_handle_struct_select_column(arg1,arg2); + cbf_handle_struct_next_datablock(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -10611,103 +10672,83 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_select_column(PyObject *SWIGUNUSEDP } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_construct_detector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_next_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - cbf_detector result; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_construct_detector",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_construct_detector" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_next_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_construct_detector" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); { error_status=0; - result = (cbf_detector)cbf_handle_struct_construct_detector(arg1,arg2); + cbf_handle_struct_next_category(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_depends_on(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_next_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_get_axis_depends_on",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_depends_on" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_next_column" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_depends_on" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); { error_status=0; - result = (char *)cbf_handle_struct_get_axis_depends_on(arg1,(char const *)arg2); + cbf_handle_struct_next_column(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_FromCharPtr((const char *)result); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + resultobj = SWIG_Py_Void(); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_rewind_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_next_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_rewind_column",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_rewind_column" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_next_row" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - cbf_handle_struct_rewind_column(arg1); + cbf_handle_struct_next_row(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -10721,7 +10762,7 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_rewind_column(PyObject *SWIGUNUSEDP } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_construct_reference_positioner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; char *arg2 = (char *) 0 ; @@ -10730,31 +10771,29 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_construct_reference_positioner(PyOb int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - cbf_positioner result; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_construct_reference_positioner",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_find_datablock", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_construct_reference_positioner" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_find_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_construct_reference_positioner" "', argument " "2"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_find_datablock" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); { error_status=0; - result = (cbf_positioner)cbf_handle_struct_construct_reference_positioner(arg1,(char const *)arg2); + cbf_handle_struct_find_datablock(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: @@ -10763,45 +10802,31 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_construct_reference_positioner(PyOb } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_column_doublevalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; char *arg2 = (char *) 0 ; - double *arg3 = (double *) 0 ; - double arg4 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; - double temp3 ; - int res3 = SWIG_TMPOBJ ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; + PyObject *swig_obj[2] ; - arg3 = &temp3; - if (!PyArg_ParseTuple(args,(char *)"OOO:cbf_handle_struct_require_column_doublevalue",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_find_category", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_column_doublevalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_find_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_column_doublevalue" "', argument " "2"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_find_category" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); - ecode4 = SWIG_AsVal_double(obj2, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_require_column_doublevalue" "', argument " "4"" of type '" "double""'"); - } - arg4 = (double)(val4); { error_status=0; - cbf_handle_struct_require_column_doublevalue(arg1,(char const *)arg2,arg3,arg4); + cbf_handle_struct_find_category(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -10809,12 +10834,6 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_column_doublevalue(PyObject } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); - } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: @@ -10823,50 +10842,31 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_column_doublevalue(PyObject } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_datestamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int *arg2 = (int *) 0 ; - int *arg3 = (int *) 0 ; - int *arg4 = (int *) 0 ; - int *arg5 = (int *) 0 ; - int *arg6 = (int *) 0 ; - double *arg7 = (double *) 0 ; - int *arg8 = (int *) 0 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int temp2 ; - int res2 = SWIG_TMPOBJ ; - int temp3 ; - int res3 = SWIG_TMPOBJ ; - int temp4 ; - int res4 = SWIG_TMPOBJ ; - int temp5 ; - int res5 = SWIG_TMPOBJ ; - int temp6 ; - int res6 = SWIG_TMPOBJ ; - double temp7 ; - int res7 = SWIG_TMPOBJ ; - int temp8 ; - int res8 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; - arg2 = &temp2; - arg3 = &temp3; - arg4 = &temp4; - arg5 = &temp5; - arg6 = &temp6; - arg7 = &temp7; - arg8 = &temp8; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_datestamp",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_find_column", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_datestamp" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_find_column" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_find_column" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_get_datestamp(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + cbf_handle_struct_find_column(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -10874,380 +10874,242 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_datestamp(PyObject *SWIGUNUSEDP } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res6)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6))); - } else { - int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res7)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7))); - } else { - int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res8)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8))); - } else { - int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags)); - } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integervalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_integervalue",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_find_row", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_integervalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_find_row" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_find_row" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); { error_status=0; - result = (int)cbf_handle_struct_get_integervalue(arg1); + cbf_handle_struct_find_row(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_From_int((int)(result)); + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_crystal_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_nextrow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - char *result = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_crystal_id",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_find_nextrow", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_crystal_id" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_find_nextrow" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_find_nextrow" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); { error_status=0; - result = (char *)cbf_handle_struct_get_crystal_id(arg1); + cbf_handle_struct_find_nextrow(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_FromCharPtr((const char *)result); + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_doublevalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_count_datablocks(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - double result; + PyObject *swig_obj[1] ; + unsigned int result; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_doublevalue",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_doublevalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_count_datablocks" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - result = (double)cbf_handle_struct_get_doublevalue(arg1); + result = (unsigned int)cbf_handle_struct_count_datablocks(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_From_double((double)(result)); + resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_unit_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_count_categories(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - double *arg2 = (double *) 0 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - double *arg5 = (double *) 0 ; - double *arg6 = (double *) 0 ; - double *arg7 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - double temp2 ; - int res2 = SWIG_TMPOBJ ; - double temp3 ; - int res3 = SWIG_TMPOBJ ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - double temp5 ; - int res5 = SWIG_TMPOBJ ; - double temp6 ; - int res6 = SWIG_TMPOBJ ; - double temp7 ; - int res7 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; + unsigned int result; - arg2 = &temp2; - arg3 = &temp3; - arg4 = &temp4; - arg5 = &temp5; - arg6 = &temp6; - arg7 = &temp7; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_unit_cell",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_unit_cell" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_count_categories" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - cbf_handle_struct_get_unit_cell(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + result = (unsigned int)cbf_handle_struct_count_categories(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res6)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); - } else { - int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res7)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); - } else { - int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); - } + resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); return resultobj; fail: return NULL; } - - -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_unit_cell_esd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - double *arg2 = (double *) 0 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - double *arg5 = (double *) 0 ; - double *arg6 = (double *) 0 ; - double *arg7 = (double *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - double temp2 ; - int res2 = SWIG_TMPOBJ ; - double temp3 ; - int res3 = SWIG_TMPOBJ ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - double temp5 ; - int res5 = SWIG_TMPOBJ ; - double temp6 ; - int res6 = SWIG_TMPOBJ ; - double temp7 ; - int res7 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_count_columns(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + unsigned int result; - arg2 = &temp2; - arg3 = &temp3; - arg4 = &temp4; - arg5 = &temp5; - arg6 = &temp6; - arg7 = &temp7; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_unit_cell_esd",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_unit_cell_esd" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_count_columns" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - cbf_handle_struct_get_unit_cell_esd(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + result = (unsigned int)cbf_handle_struct_count_columns(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res6)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); - } else { - int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res7)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); - } else { - int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); - } + resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_count_rows(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; + PyObject *swig_obj[1] ; + unsigned int result; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_get_axis_type",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_type" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_count_rows" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_type" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); { error_status=0; - result = (char *)cbf_handle_struct_get_axis_type(arg1,(char const *)arg2); + result = (unsigned int)cbf_handle_struct_count_rows(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_FromCharPtr((const char *)result); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_remove_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_select_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_remove_column",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_select_datablock", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_remove_column" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_select_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_select_datablock" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); { error_status=0; - cbf_handle_struct_remove_column(arg1); + cbf_handle_struct_select_datablock(arg1,arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -11261,328 +11123,259 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_remove_column(PyObject *SWIGUNUSEDP } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_rewind_blockitem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_select_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - CBF_NODETYPE result; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_rewind_blockitem",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_select_category", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_rewind_blockitem" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_select_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_select_category" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); { error_status=0; - result = (CBF_NODETYPE)cbf_handle_struct_rewind_blockitem(arg1); + cbf_handle_struct_select_category(arg1,arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_From_int((int)(result)); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_select_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - char *result = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_value",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_select_column", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_value" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_select_column" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_select_column" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); { error_status=0; - result = (char *)cbf_handle_struct_get_value(arg1); + cbf_handle_struct_select_column(arg1,arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_FromCharPtr((const char *)result); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_count_categories(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_select_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - unsigned int result; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_count_categories",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_select_row", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_count_categories" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_select_row" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_select_row" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); { error_status=0; - result = (unsigned int)cbf_handle_struct_count_categories(arg1); + cbf_handle_struct_select_row(arg1,arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_read_widefile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_datablock_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; - int arg3 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOO:cbf_handle_struct_read_widefile",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_read_widefile" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_datablock_name" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_read_widefile" "', argument " "2"" of type '" "char *""'"); - } - arg2 = (char *)(buf2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_read_widefile" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); { error_status=0; - cbf_handle_struct_read_widefile(arg1,arg2,arg3); + result = (char *)cbf_handle_struct_datablock_name(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_wavelength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_category_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - double arg2 ; void *argp1 = 0 ; int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_set_wavelength",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_wavelength" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_category_name" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_wavelength" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); { error_status=0; - cbf_handle_struct_set_wavelength(arg1,arg2); + result = (char *)cbf_handle_struct_category_name(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_column_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - double *arg5 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - double temp3 ; - int res3 = SWIG_TMPOBJ ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - double temp5 ; - int res5 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; - arg3 = &temp3; - arg4 = &temp4; - arg5 = &temp5; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_get_axis_vector",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_vector" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_column_name" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_vector" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_get_axis_vector(arg1,(char const *)arg2,arg3,arg4,arg5); + result = (char *)cbf_handle_struct_column_name(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); - } - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_pixel_size_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_row_number(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - unsigned int arg3 ; - double arg4 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - unsigned int val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; + PyObject *swig_obj[1] ; + unsigned int result; - if (!PyArg_ParseTuple(args,(char *)"OOOO:cbf_handle_struct_set_pixel_size_sf",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_pixel_size_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); - } - arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_pixel_size_sf" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_pixel_size_sf" "', argument " "3"" of type '" "unsigned int""'"); - } - arg3 = (unsigned int)(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_pixel_size_sf" "', argument " "4"" of type '" "double""'"); - } - arg4 = (double)(val4); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_row_number" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - cbf_handle_struct_set_pixel_size_sf(arg1,arg2,arg3,arg4); + result = (unsigned int)cbf_handle_struct_row_number(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); + resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_diffrn_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; char *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_diffrn_id",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_diffrn_id" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_value" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - result = (char *)cbf_handle_struct_get_diffrn_id(arg1); + result = (char *)cbf_handle_struct_get_value(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -11596,49 +11389,39 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_diffrn_id(PyObject *SWIGUNUSEDP } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_rotation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; char *arg2 = (char *) 0 ; - double *arg3 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; - double temp3 ; - int res3 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; - arg3 = &temp3; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_get_axis_rotation",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_require_value", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_rotation" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_value" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_rotation" "', argument " "2"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_value" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_get_axis_rotation(arg1,(char const *)arg2,arg3); + result = (char *)cbf_handle_struct_require_value(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); - } + resultobj = SWIG_FromCharPtr((const char *)result); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: @@ -11647,7 +11430,7 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_rotation(PyObject *SWIGUNU } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; char *arg2 = (char *) 0 ; @@ -11656,23 +11439,22 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_datablock(PyObject *SWIGUNUSED int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_find_datablock",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_value", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_find_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_value" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_find_datablock" "', argument " "2"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_value" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_find_datablock(arg1,(char const *)arg2); + cbf_handle_struct_set_value(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -11688,131 +11470,62 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_datablock(PyObject *SWIGUNUSED } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_polarization(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_typeofvalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - double *arg2 = (double *) 0 ; - double *arg3 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - double temp2 ; - int res2 = SWIG_TMPOBJ ; - double temp3 ; - int res3 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; - arg2 = &temp2; - arg3 = &temp3; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_polarization",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_polarization" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_typeofvalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - cbf_handle_struct_get_polarization(arg1,arg2,arg3); + result = (char *)cbf_handle_struct_get_typeofvalue(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); - } + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_select_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_typeofvalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_select_category",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_typeofvalue", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_select_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_typeofvalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_select_category" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); - { - error_status=0; - cbf_handle_struct_select_category(arg1,arg2); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_pixel_size_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - unsigned int arg3 ; - double *arg4 = (double *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - unsigned int val3 ; - int ecode3 = 0 ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - arg4 = &temp4; - if (!PyArg_ParseTuple(args,(char *)"OOO:cbf_handle_struct_get_pixel_size_fs",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_pixel_size_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_typeofvalue" "', argument " "2"" of type '" "char const *""'"); } - arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_pixel_size_fs" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_get_pixel_size_fs" "', argument " "3"" of type '" "unsigned int""'"); - } - arg3 = (unsigned int)(val3); + arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_get_pixel_size_fs(arg1,arg2,arg3,arg4); + cbf_handle_struct_set_typeofvalue(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -11820,185 +11533,73 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_pixel_size_fs(PyObject *SWIGUNU } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); - } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_poise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integervalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - double arg2 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - double *arg5 = (double *) 0 ; - double *arg6 = (double *) 0 ; - double *arg7 = (double *) 0 ; - double *arg8 = (double *) 0 ; - double *arg9 = (double *) 0 ; - char *arg10 = (char *) 0 ; - char *arg11 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double temp3 ; - int res3 = SWIG_TMPOBJ ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - double temp5 ; - int res5 = SWIG_TMPOBJ ; - double temp6 ; - int res6 = SWIG_TMPOBJ ; - double temp7 ; - int res7 = SWIG_TMPOBJ ; - double temp8 ; - int res8 = SWIG_TMPOBJ ; - double temp9 ; - int res9 = SWIG_TMPOBJ ; - int res10 ; - char *buf10 = 0 ; - int alloc10 = 0 ; - int res11 ; - char *buf11 = 0 ; - int alloc11 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; + PyObject *swig_obj[1] ; + int result; - arg3 = &temp3; - arg4 = &temp4; - arg5 = &temp5; - arg6 = &temp6; - arg7 = &temp7; - arg8 = &temp8; - arg9 = &temp9; - if (!PyArg_ParseTuple(args,(char *)"OOOO:cbf_handle_struct_get_axis_poise",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_poise" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_integervalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_axis_poise" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - res10 = SWIG_AsCharPtrAndSize(obj2, &buf10, NULL, &alloc10); - if (!SWIG_IsOK(res10)) { - SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "cbf_handle_struct_get_axis_poise" "', argument " "10"" of type '" "char const *""'"); - } - arg10 = (char *)(buf10); - res11 = SWIG_AsCharPtrAndSize(obj3, &buf11, NULL, &alloc11); - if (!SWIG_IsOK(res11)) { - SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "cbf_handle_struct_get_axis_poise" "', argument " "11"" of type '" "char const *""'"); - } - arg11 = (char *)(buf11); { error_status=0; - cbf_handle_struct_get_axis_poise(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,(char const *)arg10,(char const *)arg11); + result = (int)cbf_handle_struct_get_integervalue(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res6)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); - } else { - int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res7)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); - } else { - int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res8)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg8))); - } else { - int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res9)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg9))); - } else { - int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_double, new_flags)); - } - if (alloc10 == SWIG_NEWOBJ) free((char*)buf10); - if (alloc11 == SWIG_NEWOBJ) free((char*)buf11); + resultobj = SWIG_From_int((int)(result)); return resultobj; fail: - if (alloc10 == SWIG_NEWOBJ) free((char*)buf10); - if (alloc11 == SWIG_NEWOBJ) free((char*)buf11); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_read_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_integervalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; + int *arg2 = (int *) 0 ; int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int temp2 ; + int res2 = SWIG_TMPOBJ ; int val3 ; int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OOO:cbf_handle_struct_read_file",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg2 = &temp2; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_require_integervalue", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_read_file" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_integervalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_read_file" "', argument " "2"" of type '" "char *""'"); - } - arg2 = (char *)(buf2); - ecode3 = SWIG_AsVal_int(obj2, &val3); + ecode3 = SWIG_AsVal_int(swig_obj[1], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_read_file" "', argument " "3"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_require_integervalue" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { error_status=0; - cbf_handle_struct_read_file(arg1,arg2,arg3); + cbf_handle_struct_require_integervalue(arg1,arg2,arg3); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -12006,280 +11607,166 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_read_file(PyObject *SWIGUNUSEDPARM( } } resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); + } return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_datablock_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_integervalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - char *result = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_datablock_name",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_integervalue", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_datablock_name" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_integervalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_integervalue" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); { error_status=0; - result = (char *)cbf_handle_struct_datablock_name(arg1); + cbf_handle_struct_set_integervalue(arg1,arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_FromCharPtr((const char *)result); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_realarray_wdims(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_doublevalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - int arg3 ; - char *arg4 = (char *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; - char *arg8 = (char *) 0 ; - int arg9 ; - int arg10 ; - int arg11 ; - int arg12 ; - int arg13 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int res4 ; - char *buf4 = 0 ; - size_t size4 = 0 ; - int alloc4 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - int res8 ; - char *buf8 = 0 ; - size_t size8 = 0 ; - int alloc8 = 0 ; - int val10 ; - int ecode10 = 0 ; - int val11 ; - int ecode11 = 0 ; - int val12 ; - int ecode12 = 0 ; - int val13 ; - int ecode13 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:cbf_handle_struct_set_realarray_wdims",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_doublevalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, &size4, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "4"" of type '" "char *""'"); - } - arg4 = (char *)(buf4); - arg5 = (int)(size4 - 1); - ecode6 = SWIG_AsVal_int(obj4, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj5, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "7"" of type '" "int""'"); - } - arg7 = (int)(val7); - res8 = SWIG_AsCharPtrAndSize(obj6, &buf8, &size8, &alloc8); - if (!SWIG_IsOK(res8)) { - SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "8"" of type '" "char *""'"); - } - arg8 = (char *)(buf8); - arg9 = (int)(size8 - 1); - ecode10 = SWIG_AsVal_int(obj7, &val10); - if (!SWIG_IsOK(ecode10)) { - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "10"" of type '" "int""'"); - } - arg10 = (int)(val10); - ecode11 = SWIG_AsVal_int(obj8, &val11); - if (!SWIG_IsOK(ecode11)) { - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "11"" of type '" "int""'"); - } - arg11 = (int)(val11); - ecode12 = SWIG_AsVal_int(obj9, &val12); - if (!SWIG_IsOK(ecode12)) { - SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "12"" of type '" "int""'"); - } - arg12 = (int)(val12); - ecode13 = SWIG_AsVal_int(obj10, &val13); - if (!SWIG_IsOK(ecode13)) { - SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "13"" of type '" "int""'"); - } - arg13 = (int)(val13); { error_status=0; - cbf_handle_struct_set_realarray_wdims(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13); + result = (double)cbf_handle_struct_get_doublevalue(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - if (alloc8 == SWIG_NEWOBJ) free((char*)buf8); + resultobj = SWIG_From_double((double)(result)); return resultobj; fail: - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - if (alloc8 == SWIG_NEWOBJ) free((char*)buf8); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_construct_reference_detector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_doublevalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; + double *arg2 = (double *) 0 ; + double arg3 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - cbf_detector result; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_construct_reference_detector",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg2 = &temp2; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_require_doublevalue", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_construct_reference_detector" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_doublevalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_construct_reference_detector" "', argument " "2"" of type '" "unsigned int""'"); + ecode3 = SWIG_AsVal_double(swig_obj[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_require_doublevalue" "', argument " "3"" of type '" "double""'"); } - arg2 = (unsigned int)(val2); + arg3 = (double)(val3); { error_status=0; - result = (cbf_detector)cbf_handle_struct_construct_reference_detector(arg1,arg2); + cbf_handle_struct_require_doublevalue(arg1,arg2,arg3); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_real_3d_image_fs_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_doublevalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int arg2 ; - char **arg3 = (char **) 0 ; - int *arg4 = (int *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; - int arg8 ; + char *arg2 = (char *) 0 ; + double arg3 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - char *temp3 = 0 ; - int tempn3 ; - int val5 ; - int ecode5 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - int val8 ; - int ecode8 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; - arg3 = &temp3; arg4 = &tempn3; - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cbf_handle_struct_get_real_3d_image_fs_as_string",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_doublevalue", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_real_3d_image_fs_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_doublevalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_real_3d_image_fs_as_string" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - ecode5 = SWIG_AsVal_int(obj2, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_real_3d_image_fs_as_string" "', argument " "5"" of type '" "int""'"); - } - arg5 = (int)(val5); - ecode6 = SWIG_AsVal_int(obj3, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_real_3d_image_fs_as_string" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj4, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_real_3d_image_fs_as_string" "', argument " "7"" of type '" "int""'"); - } - arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj5, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_real_3d_image_fs_as_string" "', argument " "8"" of type '" "int""'"); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_doublevalue" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_doublevalue" "', argument " "3"" of type '" "double""'"); } - arg8 = (int)(val8); + arg3 = (double)(val3); { error_status=0; - cbf_handle_struct_get_real_3d_image_fs_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + cbf_handle_struct_set_doublevalue(arg1,(char const *)arg2,arg3); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -12287,32 +11774,63 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_real_3d_image_fs_as_string(PyOb } } resultobj = SWIG_Py_Void(); - if (*arg3) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); - free(*arg3); - } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_rewind_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarrayparameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int *arg2 = (int *) 0 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; + int *arg5 = (int *) 0 ; + int *arg6 = (int *) 0 ; + int *arg7 = (int *) 0 ; + int *arg8 = (int *) 0 ; + int *arg9 = (int *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + int temp2 ; + int res2 = SWIG_TMPOBJ ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + int temp5 ; + int res5 = SWIG_TMPOBJ ; + int temp6 ; + int res6 = SWIG_TMPOBJ ; + int temp7 ; + int res7 = SWIG_TMPOBJ ; + int temp8 ; + int res8 = SWIG_TMPOBJ ; + int temp9 ; + int res9 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_rewind_row",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + arg8 = &temp8; + arg9 = &temp9; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_rewind_row" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_integerarrayparameters" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - cbf_handle_struct_rewind_row(arg1); + cbf_handle_struct_get_integerarrayparameters(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -12320,46 +11838,130 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_rewind_row(PyObject *SWIGUNUSEDPARM } } resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res8)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8))); + } else { + int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res9)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9))); + } else { + int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_setting(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarrayparameters_wdims(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; + int *arg2 = (int *) 0 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; + int *arg5 = (int *) 0 ; + int *arg6 = (int *) 0 ; + int *arg7 = (int *) 0 ; + int *arg8 = (int *) 0 ; + int *arg9 = (int *) 0 ; + char **arg10 = (char **) 0 ; + int *arg11 = (int *) 0 ; + int *arg12 = (int *) 0 ; + int *arg13 = (int *) 0 ; + int *arg14 = (int *) 0 ; + int *arg15 = (int *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - double temp3 ; + int temp2 ; + int res2 = SWIG_TMPOBJ ; + int temp3 ; int res3 = SWIG_TMPOBJ ; - double temp4 ; + int temp4 ; int res4 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + int temp5 ; + int res5 = SWIG_TMPOBJ ; + int temp6 ; + int res6 = SWIG_TMPOBJ ; + int temp7 ; + int res7 = SWIG_TMPOBJ ; + int temp8 ; + int res8 = SWIG_TMPOBJ ; + int temp9 ; + int res9 = SWIG_TMPOBJ ; + char *temp10 = 0 ; + int tempn10 ; + int temp12 ; + int res12 = SWIG_TMPOBJ ; + int temp13 ; + int res13 = SWIG_TMPOBJ ; + int temp14 ; + int res14 = SWIG_TMPOBJ ; + int temp15 ; + int res15 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + arg2 = &temp2; arg3 = &temp3; arg4 = &temp4; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_get_axis_setting",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + arg8 = &temp8; + arg9 = &temp9; + arg10 = &temp10; arg11 = &tempn10; + arg12 = &temp12; + arg13 = &temp13; + arg14 = &temp14; + arg15 = &temp15; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_setting" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_integerarrayparameters_wdims" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_setting" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_get_axis_setting(arg1,(char const *)arg2,arg3,arg4); + cbf_handle_struct_get_integerarrayparameters_wdims(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -12367,52 +11969,158 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_setting(PyObject *SWIGUNUS } } resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); + } if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); } else { int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); } if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); } else { int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res8)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8))); + } else { + int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res9)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9))); + } else { + int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags)); + } + if (*arg10) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg10,*arg11)); + free(*arg10); + } + if (SWIG_IsTmpObj(res12)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg12))); + } else { + int new_flags = SWIG_IsNewObj(res12) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg12), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res13)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg13))); + } else { + int new_flags = SWIG_IsNewObj(res13) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg13), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res14)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg14))); + } else { + int new_flags = SWIG_IsNewObj(res14) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg14), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res15)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg15))); + } else { + int new_flags = SWIG_IsNewObj(res15) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg15), SWIGTYPE_p_int, new_flags)); } - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarrayparameters_wdims_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; + int *arg2 = (int *) 0 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; + int *arg5 = (int *) 0 ; + int *arg6 = (int *) 0 ; + int *arg7 = (int *) 0 ; + int *arg8 = (int *) 0 ; + int *arg9 = (int *) 0 ; + char **arg10 = (char **) 0 ; + int *arg11 = (int *) 0 ; + int *arg12 = (int *) 0 ; + int *arg13 = (int *) 0 ; + int *arg14 = (int *) 0 ; + int *arg15 = (int *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + int temp2 ; + int res2 = SWIG_TMPOBJ ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + int temp5 ; + int res5 = SWIG_TMPOBJ ; + int temp6 ; + int res6 = SWIG_TMPOBJ ; + int temp7 ; + int res7 = SWIG_TMPOBJ ; + int temp8 ; + int res8 = SWIG_TMPOBJ ; + int temp9 ; + int res9 = SWIG_TMPOBJ ; + char *temp10 = 0 ; + int tempn10 ; + int temp12 ; + int res12 = SWIG_TMPOBJ ; + int temp13 ; + int res13 = SWIG_TMPOBJ ; + int temp14 ; + int res14 = SWIG_TMPOBJ ; + int temp15 ; + int res15 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_require_column",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + arg8 = &temp8; + arg9 = &temp9; + arg10 = &temp10; arg11 = &tempn10; + arg12 = &temp12; + arg13 = &temp13; + arg14 = &temp14; + arg15 = &temp15; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_column" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_integerarrayparameters_wdims_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_column" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_require_column(arg1,(char const *)arg2); + cbf_handle_struct_get_integerarrayparameters_wdims_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -12420,38 +12128,158 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_column(PyObject *SWIGUNUSED } } resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res8)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8))); + } else { + int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res9)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9))); + } else { + int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags)); + } + if (*arg10) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg10,*arg11)); + free(*arg10); + } + if (SWIG_IsTmpObj(res12)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg12))); + } else { + int new_flags = SWIG_IsNewObj(res12) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg12), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res13)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg13))); + } else { + int new_flags = SWIG_IsNewObj(res13) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg13), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res14)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg14))); + } else { + int new_flags = SWIG_IsNewObj(res14) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg14), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res15)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg15))); + } else { + int new_flags = SWIG_IsNewObj(res15) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg15), SWIGTYPE_p_int, new_flags)); + } return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_timestamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarrayparameters_wdims_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - double *arg2 = (double *) 0 ; + int *arg2 = (int *) 0 ; int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; + int *arg5 = (int *) 0 ; + int *arg6 = (int *) 0 ; + int *arg7 = (int *) 0 ; + int *arg8 = (int *) 0 ; + int *arg9 = (int *) 0 ; + char **arg10 = (char **) 0 ; + int *arg11 = (int *) 0 ; + int *arg12 = (int *) 0 ; + int *arg13 = (int *) 0 ; + int *arg14 = (int *) 0 ; + int *arg15 = (int *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - double temp2 ; + int temp2 ; int res2 = SWIG_TMPOBJ ; int temp3 ; int res3 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + int temp5 ; + int res5 = SWIG_TMPOBJ ; + int temp6 ; + int res6 = SWIG_TMPOBJ ; + int temp7 ; + int res7 = SWIG_TMPOBJ ; + int temp8 ; + int res8 = SWIG_TMPOBJ ; + int temp9 ; + int res9 = SWIG_TMPOBJ ; + char *temp10 = 0 ; + int tempn10 ; + int temp12 ; + int res12 = SWIG_TMPOBJ ; + int temp13 ; + int res13 = SWIG_TMPOBJ ; + int temp14 ; + int res14 = SWIG_TMPOBJ ; + int temp15 ; + int res15 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; arg2 = &temp2; arg3 = &temp3; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_timestamp",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + arg8 = &temp8; + arg9 = &temp9; + arg10 = &temp10; arg11 = &tempn10; + arg12 = &temp12; + arg13 = &temp13; + arg14 = &temp14; + arg15 = &temp15; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_timestamp" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_integerarrayparameters_wdims_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - cbf_handle_struct_get_timestamp(arg1,arg2,arg3); + cbf_handle_struct_get_integerarrayparameters_wdims_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -12460,10 +12288,10 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_timestamp(PyObject *SWIGUNUSEDP } resultobj = SWIG_Py_Void(); if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); } else { int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); } if (SWIG_IsTmpObj(res3)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); @@ -12471,96 +12299,147 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_timestamp(PyObject *SWIGUNUSEDP int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_nextrow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_find_nextrow",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_find_nextrow" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); } - arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_find_nextrow" "', argument " "2"" of type '" "char const *""'"); + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); } - arg2 = (char *)(buf2); - { - error_status=0; - cbf_handle_struct_find_nextrow(arg1,(char const *)arg2); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res8)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8))); + } else { + int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res9)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9))); + } else { + int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags)); + } + if (*arg10) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg10,*arg11)); + free(*arg10); + } + if (SWIG_IsTmpObj(res12)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg12))); + } else { + int new_flags = SWIG_IsNewObj(res12) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg12), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res13)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg13))); + } else { + int new_flags = SWIG_IsNewObj(res13) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg13), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res14)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg14))); + } else { + int new_flags = SWIG_IsNewObj(res14) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg14), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res15)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg15))); + } else { + int new_flags = SWIG_IsNewObj(res15) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg15), SWIGTYPE_p_int, new_flags)); } - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_equipment_component(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_realarrayparameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; + int *arg2 = (int *) 0 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; + int *arg5 = (int *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; + int temp2 ; + int res2 = SWIG_TMPOBJ ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + int temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_get_axis_equipment_component",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_equipment_component" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_realarrayparameters" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_equipment_component" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); { error_status=0; - result = (char *)cbf_handle_struct_get_axis_equipment_component(arg1,(char const *)arg2); + cbf_handle_struct_get_realarrayparameters(arg1,arg2,arg3,arg4,arg5); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_FromCharPtr((const char *)result); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); + } return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_realarrayparameters_wdims_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_realarrayparameters_wdims(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; int *arg2 = (int *) 0 ; @@ -12593,7 +12472,7 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_realarrayparameters_wdims_sf(Py int res10 = SWIG_TMPOBJ ; int temp11 ; int res11 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; arg2 = &temp2; arg3 = &temp3; @@ -12604,15 +12483,16 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_realarrayparameters_wdims_sf(Py arg9 = &temp9; arg10 = &temp10; arg11 = &temp11; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_realarrayparameters_wdims_sf",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_realarrayparameters_wdims_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_realarrayparameters_wdims" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - cbf_handle_struct_get_realarrayparameters_wdims_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); + cbf_handle_struct_get_realarrayparameters_wdims(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -12678,22 +12558,60 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_realarrayparameters_wdims_sf(Py } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_reset_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_realarrayparameters_wdims_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int *arg2 = (int *) 0 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; + int *arg5 = (int *) 0 ; + char **arg6 = (char **) 0 ; + int *arg7 = (int *) 0 ; + int *arg8 = (int *) 0 ; + int *arg9 = (int *) 0 ; + int *arg10 = (int *) 0 ; + int *arg11 = (int *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + int temp2 ; + int res2 = SWIG_TMPOBJ ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + int temp5 ; + int res5 = SWIG_TMPOBJ ; + char *temp6 = 0 ; + int tempn6 ; + int temp8 ; + int res8 = SWIG_TMPOBJ ; + int temp9 ; + int res9 = SWIG_TMPOBJ ; + int temp10 ; + int res10 = SWIG_TMPOBJ ; + int temp11 ; + int res11 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_reset_datablock",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; arg7 = &tempn6; + arg8 = &temp8; + arg9 = &temp9; + arg10 = &temp10; + arg11 = &temp11; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_reset_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_realarrayparameters_wdims_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - cbf_handle_struct_reset_datablock(arg1); + cbf_handle_struct_get_realarrayparameters_wdims_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -12701,201 +12619,57 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_reset_datablock(PyObject *SWIGUNUSE } } resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_3d_image_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - unsigned int arg3 ; - char *arg4 = (char *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; - int arg8 ; - int arg9 ; - int arg10 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - unsigned int val3 ; - int ecode3 = 0 ; - int res4 ; - char *buf4 = 0 ; - size_t size4 = 0 ; - int alloc4 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - int val8 ; - int ecode8 = 0 ; - int val9 ; - int ecode9 = 0 ; - int val10 ; - int ecode10 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:cbf_handle_struct_set_3d_image_fs",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); } - arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "3"" of type '" "unsigned int""'"); - } - arg3 = (unsigned int)(val3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, &size4, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "4"" of type '" "char *""'"); - } - arg4 = (char *)(buf4); - arg5 = (int)(size4 - 1); - ecode6 = SWIG_AsVal_int(obj4, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj5, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "7"" of type '" "int""'"); - } - arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj6, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "8"" of type '" "int""'"); - } - arg8 = (int)(val8); - ecode9 = SWIG_AsVal_int(obj7, &val9); - if (!SWIG_IsOK(ecode9)) { - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "9"" of type '" "int""'"); - } - arg9 = (int)(val9); - ecode10 = SWIG_AsVal_int(obj8, &val10); - if (!SWIG_IsOK(ecode10)) { - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "10"" of type '" "int""'"); - } - arg10 = (int)(val10); - { - error_status=0; - cbf_handle_struct_set_3d_image_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); } - resultobj = SWIG_Py_Void(); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - return resultobj; -fail: - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_saveframename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_set_saveframename",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_saveframename" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); } - arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_saveframename" "', argument " "2"" of type '" "char const *""'"); + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); } - arg2 = (char *)(buf2); - { - error_status=0; - cbf_handle_struct_set_saveframename(arg1,(char const *)arg2); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } + if (*arg6) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg6,*arg7)); + free(*arg6); } - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_integervalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int *arg2 = (int *) 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int temp2 ; - int res2 = SWIG_TMPOBJ ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_require_integervalue",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_integervalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + if (SWIG_IsTmpObj(res8)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8))); + } else { + int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags)); } - arg1 = (cbf_handle_struct *)(argp1); - ecode3 = SWIG_AsVal_int(obj1, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_require_integervalue" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - { - error_status=0; - cbf_handle_struct_require_integervalue(arg1,arg2,arg3); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } + if (SWIG_IsTmpObj(res9)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9))); + } else { + int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags)); } - resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); + if (SWIG_IsTmpObj(res10)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg10))); } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); + int new_flags = SWIG_IsNewObj(res10) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg10), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res11)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg11))); + } else { + int new_flags = SWIG_IsNewObj(res11) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg11), SWIGTYPE_p_int, new_flags)); } return resultobj; fail: @@ -12903,17 +12677,19 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_integervalue(PyObject *SWIG } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarrayparameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_realarrayparameters_wdims_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; int *arg2 = (int *) 0 ; int *arg3 = (int *) 0 ; int *arg4 = (int *) 0 ; int *arg5 = (int *) 0 ; - int *arg6 = (int *) 0 ; + char **arg6 = (char **) 0 ; int *arg7 = (int *) 0 ; int *arg8 = (int *) 0 ; int *arg9 = (int *) 0 ; + int *arg10 = (int *) 0 ; + int *arg11 = (int *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int temp2 ; @@ -12924,33 +12700,37 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarrayparameters(PyObject int res4 = SWIG_TMPOBJ ; int temp5 ; int res5 = SWIG_TMPOBJ ; - int temp6 ; - int res6 = SWIG_TMPOBJ ; - int temp7 ; - int res7 = SWIG_TMPOBJ ; + char *temp6 = 0 ; + int tempn6 ; int temp8 ; int res8 = SWIG_TMPOBJ ; int temp9 ; int res9 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + int temp10 ; + int res10 = SWIG_TMPOBJ ; + int temp11 ; + int res11 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; arg2 = &temp2; arg3 = &temp3; arg4 = &temp4; arg5 = &temp5; - arg6 = &temp6; - arg7 = &temp7; + arg6 = &temp6; arg7 = &tempn6; arg8 = &temp8; arg9 = &temp9; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_integerarrayparameters",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg10 = &temp10; + arg11 = &temp11; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_integerarrayparameters" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_realarrayparameters_wdims_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - cbf_handle_struct_get_integerarrayparameters(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + cbf_handle_struct_get_realarrayparameters_wdims_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -12982,17 +12762,9 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarrayparameters(PyObject int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); } - if (SWIG_IsTmpObj(res6)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6))); - } else { - int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res7)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7))); - } else { - int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags)); + if (*arg6) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg6,*arg7)); + free(*arg6); } if (SWIG_IsTmpObj(res8)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8))); @@ -13006,250 +12778,46 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarrayparameters(PyObject int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags)); } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_real_3d_image_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - unsigned int arg3 ; - char *arg4 = (char *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; - int arg8 ; - int arg9 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - unsigned int val3 ; - int ecode3 = 0 ; - int res4 ; - char *buf4 = 0 ; - size_t size4 = 0 ; - int alloc4 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - int val8 ; - int ecode8 = 0 ; - int val9 ; - int ecode9 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cbf_handle_struct_set_real_3d_image_sf",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_real_3d_image_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); - } - arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_real_3d_image_sf" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_real_3d_image_sf" "', argument " "3"" of type '" "unsigned int""'"); - } - arg3 = (unsigned int)(val3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, &size4, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_real_3d_image_sf" "', argument " "4"" of type '" "char *""'"); - } - arg4 = (char *)(buf4); - arg5 = (int)(size4 - 1); - ecode6 = SWIG_AsVal_int(obj4, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_real_3d_image_sf" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj5, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_real_3d_image_sf" "', argument " "7"" of type '" "int""'"); - } - arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj6, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_real_3d_image_sf" "', argument " "8"" of type '" "int""'"); - } - arg8 = (int)(val8); - ecode9 = SWIG_AsVal_int(obj7, &val9); - if (!SWIG_IsOK(ecode9)) { - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_real_3d_image_sf" "', argument " "9"" of type '" "int""'"); - } - arg9 = (int)(val9); - { - error_status=0; - cbf_handle_struct_set_real_3d_image_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } - } - resultobj = SWIG_Py_Void(); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - return resultobj; -fail: - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_handle_struct_write_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; - int arg3 ; - int arg4 ; - int arg5 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:cbf_handle_struct_write_file",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_write_file" "', argument " "1"" of type '" "cbf_handle_struct *""'"); - } - arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_write_file" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_write_file" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_write_file" "', argument " "4"" of type '" "int""'"); - } - arg4 = (int)(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_write_file" "', argument " "5"" of type '" "int""'"); - } - arg5 = (int)(val5); - { - error_status=0; - cbf_handle_struct_write_file(arg1,(char const *)arg2,arg3,arg4,arg5); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } - } - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_divergence(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - double arg2 ; - double arg3 ; - double arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:cbf_handle_struct_set_divergence",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_divergence" "', argument " "1"" of type '" "cbf_handle_struct *""'"); - } - arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_divergence" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_divergence" "', argument " "3"" of type '" "double""'"); - } - arg3 = (double)(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_divergence" "', argument " "4"" of type '" "double""'"); - } - arg4 = (double)(val4); - { - error_status=0; - cbf_handle_struct_set_divergence(arg1,arg2,arg3,arg4); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } + if (SWIG_IsTmpObj(res10)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg10))); + } else { + int new_flags = SWIG_IsNewObj(res10) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg10), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res11)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg11))); + } else { + int new_flags = SWIG_IsNewObj(res11) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg11), SWIGTYPE_p_int, new_flags)); } - resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_remove_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarray_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char **arg2 = (char **) 0 ; + int *arg3 = (int *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + char *temp2 = 0 ; + int tempn2 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_remove_datablock",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg2 = &temp2; arg3 = &tempn2; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_remove_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_integerarray_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - cbf_handle_struct_remove_datablock(arg1); + cbf_handle_struct_get_integerarray_as_string(arg1,arg2,arg3); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -13257,58 +12825,70 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_remove_datablock(PyObject *SWIGUNUS } } resultobj = SWIG_Py_Void(); + if (*arg2) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg2,*arg3)); + free(*arg2); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_count_elements(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_realarray_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char **arg2 = (char **) 0 ; + int *arg3 = (int *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - unsigned int result; + char *temp2 = 0 ; + int tempn2 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_count_elements",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg2 = &temp2; arg3 = &tempn2; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_count_elements" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_realarray_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - result = (unsigned int)cbf_handle_struct_count_elements(arg1); + cbf_handle_struct_get_realarray_as_string(arg1,arg2,arg3); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); + resultobj = SWIG_Py_Void(); + if (*arg2) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg2,*arg3)); + free(*arg2); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_image_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_integerarray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; unsigned int arg2 ; - unsigned int arg3 ; + int arg3 ; char *arg4 = (char *) 0 ; int arg5 ; int arg6 ; int arg7 ; int arg8 ; - int arg9 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; - unsigned int val3 ; + int val3 ; int ecode3 = 0 ; int res4 ; char *buf4 = 0 ; @@ -13320,62 +12900,48 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_image_fs(PyObject *SWIGUNUSEDPA int ecode7 = 0 ; int val8 ; int ecode8 = 0 ; - int val9 ; - int ecode9 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cbf_handle_struct_set_image_fs",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + PyObject *swig_obj[7] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_integerarray", 7, 7, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_image_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_integerarray" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_image_fs" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_integerarray" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_image_fs" "', argument " "3"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_integerarray" "', argument " "3"" of type '" "int""'"); } - arg3 = (unsigned int)(val3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, &size4, &alloc4); + arg3 = (int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_image_fs" "', argument " "4"" of type '" "char *""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_integerarray" "', argument " "4"" of type '" "char *""'"); } arg4 = (char *)(buf4); arg5 = (int)(size4 - 1); - ecode6 = SWIG_AsVal_int(obj4, &val6); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_image_fs" "', argument " "6"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_integerarray" "', argument " "6"" of type '" "int""'"); } arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj5, &val7); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_image_fs" "', argument " "7"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_integerarray" "', argument " "7"" of type '" "int""'"); } arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj6, &val8); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_image_fs" "', argument " "8"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_integerarray" "', argument " "8"" of type '" "int""'"); } arg8 = (int)(val8); - ecode9 = SWIG_AsVal_int(obj7, &val9); - if (!SWIG_IsOK(ecode9)) { - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_image_fs" "', argument " "9"" of type '" "int""'"); - } - arg9 = (int)(val9); { error_status=0; - cbf_handle_struct_set_image_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + cbf_handle_struct_set_integerarray(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -13391,223 +12957,118 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_image_fs(PyObject *SWIGUNUSEDPA } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_reference_detector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_integerarray_wdims(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; unsigned int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - cbf_detector result; - - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_require_reference_detector",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_reference_detector" "', argument " "1"" of type '" "cbf_handle_struct *""'"); - } - arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_require_reference_detector" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); - { - error_status=0; - result = (cbf_detector)cbf_handle_struct_require_reference_detector(arg1,arg2); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_handle_struct_next_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_next_category",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_next_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); - } - arg1 = (cbf_handle_struct *)(argp1); - { - error_status=0; - cbf_handle_struct_next_category(arg1); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_diffrn_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_set_diffrn_id",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_diffrn_id" "', argument " "1"" of type '" "cbf_handle_struct *""'"); - } - arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_diffrn_id" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - { - error_status=0; - cbf_handle_struct_set_diffrn_id(arg1,(char const *)arg2); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } - } - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_timestamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - double arg2 ; int arg3 ; - double arg4 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + char *arg9 = (char *) 0 ; + int arg10 ; + int arg11 ; + int arg12 ; + int arg13 ; + int arg14 ; void *argp1 = 0 ; int res1 = 0 ; - double val2 ; + unsigned int val2 ; int ecode2 = 0 ; int val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:cbf_handle_struct_set_timestamp",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_timestamp" "', argument " "1"" of type '" "cbf_handle_struct *""'"); - } - arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_timestamp" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_timestamp" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_timestamp" "', argument " "4"" of type '" "double""'"); - } - arg4 = (double)(val4); - { - error_status=0; - cbf_handle_struct_set_timestamp(arg1,arg2,arg3,arg4); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_orientation_matrix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - double *arg2 = (double *) 0 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - double *arg5 = (double *) 0 ; - double *arg6 = (double *) 0 ; - double *arg7 = (double *) 0 ; - double *arg8 = (double *) 0 ; - double *arg9 = (double *) 0 ; - double *arg10 = (double *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - double temp2 ; - int res2 = SWIG_TMPOBJ ; - double temp3 ; - int res3 = SWIG_TMPOBJ ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - double temp5 ; - int res5 = SWIG_TMPOBJ ; - double temp6 ; - int res6 = SWIG_TMPOBJ ; - double temp7 ; - int res7 = SWIG_TMPOBJ ; - double temp8 ; - int res8 = SWIG_TMPOBJ ; - double temp9 ; - int res9 = SWIG_TMPOBJ ; - double temp10 ; - int res10 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int res9 ; + char *buf9 = 0 ; + size_t size9 = 0 ; + int alloc9 = 0 ; + int val11 ; + int ecode11 = 0 ; + int val12 ; + int ecode12 = 0 ; + int val13 ; + int ecode13 = 0 ; + int val14 ; + int ecode14 = 0 ; + PyObject *swig_obj[12] ; - arg2 = &temp2; - arg3 = &temp3; - arg4 = &temp4; - arg5 = &temp5; - arg6 = &temp6; - arg7 = &temp7; - arg8 = &temp8; - arg9 = &temp9; - arg10 = &temp10; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_orientation_matrix",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_integerarray_wdims", 12, 12, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_orientation_matrix" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + res9 = SWIG_AsCharPtrAndSize(swig_obj[7], &buf9, &size9, &alloc9); + if (!SWIG_IsOK(res9)) { + SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "9"" of type '" "char *""'"); + } + arg9 = (char *)(buf9); + arg10 = (int)(size9 - 1); + ecode11 = SWIG_AsVal_int(swig_obj[8], &val11); + if (!SWIG_IsOK(ecode11)) { + SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "11"" of type '" "int""'"); + } + arg11 = (int)(val11); + ecode12 = SWIG_AsVal_int(swig_obj[9], &val12); + if (!SWIG_IsOK(ecode12)) { + SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "12"" of type '" "int""'"); + } + arg12 = (int)(val12); + ecode13 = SWIG_AsVal_int(swig_obj[10], &val13); + if (!SWIG_IsOK(ecode13)) { + SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "13"" of type '" "int""'"); + } + arg13 = (int)(val13); + ecode14 = SWIG_AsVal_int(swig_obj[11], &val14); + if (!SWIG_IsOK(ecode14)) { + SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "14"" of type '" "int""'"); + } + arg14 = (int)(val14); { error_status=0; - cbf_handle_struct_get_orientation_matrix(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); + cbf_handle_struct_set_integerarray_wdims(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -13615,99 +13076,128 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_orientation_matrix(PyObject *SW } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res6)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); - } else { - int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res7)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); - } else { - int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res8)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg8))); - } else { - int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res9)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg9))); - } else { - int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res10)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg10))); - } else { - int new_flags = SWIG_IsNewObj(res10) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg10), SWIGTYPE_p_double, new_flags)); - } + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc9 == SWIG_NEWOBJ) free((char*)buf9); return resultobj; fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc9 == SWIG_NEWOBJ) free((char*)buf9); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_image_size_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_integerarray_wdims_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; unsigned int arg2 ; - int *arg3 = (int *) 0 ; - int *arg4 = (int *) 0 ; + int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + char *arg9 = (char *) 0 ; + int arg10 ; + int arg11 ; + int arg12 ; + int arg13 ; + int arg14 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; - int temp3 ; - int res3 = SWIG_TMPOBJ ; - int temp4 ; - int res4 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int res9 ; + char *buf9 = 0 ; + size_t size9 = 0 ; + int alloc9 = 0 ; + int val11 ; + int ecode11 = 0 ; + int val12 ; + int ecode12 = 0 ; + int val13 ; + int ecode13 = 0 ; + int val14 ; + int ecode14 = 0 ; + PyObject *swig_obj[12] ; - arg3 = &temp3; - arg4 = &temp4; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_get_image_size_fs",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_integerarray_wdims_fs", 12, 12, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_image_size_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_image_size_fs" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + res9 = SWIG_AsCharPtrAndSize(swig_obj[7], &buf9, &size9, &alloc9); + if (!SWIG_IsOK(res9)) { + SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "9"" of type '" "char *""'"); + } + arg9 = (char *)(buf9); + arg10 = (int)(size9 - 1); + ecode11 = SWIG_AsVal_int(swig_obj[8], &val11); + if (!SWIG_IsOK(ecode11)) { + SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "11"" of type '" "int""'"); + } + arg11 = (int)(val11); + ecode12 = SWIG_AsVal_int(swig_obj[9], &val12); + if (!SWIG_IsOK(ecode12)) { + SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "12"" of type '" "int""'"); + } + arg12 = (int)(val12); + ecode13 = SWIG_AsVal_int(swig_obj[10], &val13); + if (!SWIG_IsOK(ecode13)) { + SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "13"" of type '" "int""'"); + } + arg13 = (int)(val13); + ecode14 = SWIG_AsVal_int(swig_obj[11], &val14); + if (!SWIG_IsOK(ecode14)) { + SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "14"" of type '" "int""'"); + } + arg14 = (int)(val14); { error_status=0; - cbf_handle_struct_get_image_size_fs(arg1,arg2,arg3,arg4); + cbf_handle_struct_set_integerarray_wdims_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -13715,52 +13205,128 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_image_size_fs(PyObject *SWIGUNU } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); - } + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc9 == SWIG_NEWOBJ) free((char*)buf9); return resultobj; fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc9 == SWIG_NEWOBJ) free((char*)buf9); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_divergence(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_integerarray_wdims_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - double *arg2 = (double *) 0 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; + unsigned int arg2 ; + int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + char *arg9 = (char *) 0 ; + int arg10 ; + int arg11 ; + int arg12 ; + int arg13 ; + int arg14 ; void *argp1 = 0 ; int res1 = 0 ; - double temp2 ; - int res2 = SWIG_TMPOBJ ; - double temp3 ; - int res3 = SWIG_TMPOBJ ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int res9 ; + char *buf9 = 0 ; + size_t size9 = 0 ; + int alloc9 = 0 ; + int val11 ; + int ecode11 = 0 ; + int val12 ; + int ecode12 = 0 ; + int val13 ; + int ecode13 = 0 ; + int val14 ; + int ecode14 = 0 ; + PyObject *swig_obj[12] ; - arg2 = &temp2; - arg3 = &temp3; - arg4 = &temp4; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_divergence",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_integerarray_wdims_sf", 12, 12, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_divergence" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + res9 = SWIG_AsCharPtrAndSize(swig_obj[7], &buf9, &size9, &alloc9); + if (!SWIG_IsOK(res9)) { + SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "9"" of type '" "char *""'"); + } + arg9 = (char *)(buf9); + arg10 = (int)(size9 - 1); + ecode11 = SWIG_AsVal_int(swig_obj[8], &val11); + if (!SWIG_IsOK(ecode11)) { + SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "11"" of type '" "int""'"); + } + arg11 = (int)(val11); + ecode12 = SWIG_AsVal_int(swig_obj[9], &val12); + if (!SWIG_IsOK(ecode12)) { + SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "12"" of type '" "int""'"); + } + arg12 = (int)(val12); + ecode13 = SWIG_AsVal_int(swig_obj[10], &val13); + if (!SWIG_IsOK(ecode13)) { + SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "13"" of type '" "int""'"); + } + arg13 = (int)(val13); + ecode14 = SWIG_AsVal_int(swig_obj[11], &val14); + if (!SWIG_IsOK(ecode14)) { + SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "14"" of type '" "int""'"); + } + arg14 = (int)(val14); { error_status=0; - cbf_handle_struct_get_divergence(arg1,arg2,arg3,arg4); + cbf_handle_struct_set_integerarray_wdims_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -13768,46 +13334,76 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_divergence(PyObject *SWIGUNUSED } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); - } + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc9 == SWIG_NEWOBJ) free((char*)buf9); return resultobj; fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc9 == SWIG_NEWOBJ) free((char*)buf9); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_rewind_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_realarray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + PyObject *swig_obj[6] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_rewind_category",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_realarray", 6, 6, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_rewind_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_realarray" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_realarray" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_realarray" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_realarray" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_realarray" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_realarray" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); { error_status=0; - cbf_handle_struct_rewind_category(arg1); + cbf_handle_struct_set_realarray(arg1,arg2,arg3,arg4,arg5,arg6,arg7); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -13815,38 +13411,118 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_rewind_category(PyObject *SWIGUNUSE } } resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return resultobj; fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_read_template(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_realarray_wdims(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; + unsigned int arg2 ; + int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + char *arg8 = (char *) 0 ; + int arg9 ; + int arg10 ; + int arg11 ; + int arg12 ; + int arg13 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int res8 ; + char *buf8 = 0 ; + size_t size8 = 0 ; + int alloc8 = 0 ; + int val10 ; + int ecode10 = 0 ; + int val11 ; + int ecode11 = 0 ; + int val12 ; + int ecode12 = 0 ; + int val13 ; + int ecode13 = 0 ; + PyObject *swig_obj[11] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_read_template",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_realarray_wdims", 11, 11, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_read_template" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_read_template" "', argument " "2"" of type '" "char *""'"); - } - arg2 = (char *)(buf2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + res8 = SWIG_AsCharPtrAndSize(swig_obj[6], &buf8, &size8, &alloc8); + if (!SWIG_IsOK(res8)) { + SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "8"" of type '" "char *""'"); + } + arg8 = (char *)(buf8); + arg9 = (int)(size8 - 1); + ecode10 = SWIG_AsVal_int(swig_obj[7], &val10); + if (!SWIG_IsOK(ecode10)) { + SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "10"" of type '" "int""'"); + } + arg10 = (int)(val10); + ecode11 = SWIG_AsVal_int(swig_obj[8], &val11); + if (!SWIG_IsOK(ecode11)) { + SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "11"" of type '" "int""'"); + } + arg11 = (int)(val11); + ecode12 = SWIG_AsVal_int(swig_obj[9], &val12); + if (!SWIG_IsOK(ecode12)) { + SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "12"" of type '" "int""'"); + } + arg12 = (int)(val12); + ecode13 = SWIG_AsVal_int(swig_obj[10], &val13); + if (!SWIG_IsOK(ecode13)) { + SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "cbf_handle_struct_set_realarray_wdims" "', argument " "13"" of type '" "int""'"); + } + arg13 = (int)(val13); { error_status=0; - cbf_handle_struct_read_template(arg1,arg2); + cbf_handle_struct_set_realarray_wdims(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -13854,39 +13530,120 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_read_template(PyObject *SWIGUNUSEDP } } resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc8 == SWIG_NEWOBJ) free((char*)buf8); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc8 == SWIG_NEWOBJ) free((char*)buf8); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_select_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_realarray_wdims_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; unsigned int arg2 ; + int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + char *arg8 = (char *) 0 ; + int arg9 ; + int arg10 ; + int arg11 ; + int arg12 ; + int arg13 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int res8 ; + char *buf8 = 0 ; + size_t size8 = 0 ; + int alloc8 = 0 ; + int val10 ; + int ecode10 = 0 ; + int val11 ; + int ecode11 = 0 ; + int val12 ; + int ecode12 = 0 ; + int val13 ; + int ecode13 = 0 ; + PyObject *swig_obj[11] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_select_row",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_realarray_wdims_fs", 11, 11, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_select_row" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_select_row" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + res8 = SWIG_AsCharPtrAndSize(swig_obj[6], &buf8, &size8, &alloc8); + if (!SWIG_IsOK(res8)) { + SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "8"" of type '" "char *""'"); + } + arg8 = (char *)(buf8); + arg9 = (int)(size8 - 1); + ecode10 = SWIG_AsVal_int(swig_obj[7], &val10); + if (!SWIG_IsOK(ecode10)) { + SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "10"" of type '" "int""'"); + } + arg10 = (int)(val10); + ecode11 = SWIG_AsVal_int(swig_obj[8], &val11); + if (!SWIG_IsOK(ecode11)) { + SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "11"" of type '" "int""'"); + } + arg11 = (int)(val11); + ecode12 = SWIG_AsVal_int(swig_obj[9], &val12); + if (!SWIG_IsOK(ecode12)) { + SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "12"" of type '" "int""'"); + } + arg12 = (int)(val12); + ecode13 = SWIG_AsVal_int(swig_obj[10], &val13); + if (!SWIG_IsOK(ecode13)) { + SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "13"" of type '" "int""'"); + } + arg13 = (int)(val13); { error_status=0; - cbf_handle_struct_select_row(arg1,arg2); + cbf_handle_struct_set_realarray_wdims_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -13894,78 +13651,120 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_select_row(PyObject *SWIGUNUSEDPARM } } resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc8 == SWIG_NEWOBJ) free((char*)buf8); return resultobj; fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc8 == SWIG_NEWOBJ) free((char*)buf8); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_image_fs_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_realarray_wdims_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int arg2 ; - char **arg3 = (char **) 0 ; - int *arg4 = (int *) 0 ; + unsigned int arg2 ; + int arg3 ; + char *arg4 = (char *) 0 ; int arg5 ; int arg6 ; int arg7 ; - int arg8 ; + char *arg8 = (char *) 0 ; + int arg9 ; + int arg10 ; + int arg11 ; + int arg12 ; + int arg13 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; - char *temp3 = 0 ; - int tempn3 ; - int val5 ; - int ecode5 = 0 ; + int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; - int val8 ; - int ecode8 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; + int res8 ; + char *buf8 = 0 ; + size_t size8 = 0 ; + int alloc8 = 0 ; + int val10 ; + int ecode10 = 0 ; + int val11 ; + int ecode11 = 0 ; + int val12 ; + int ecode12 = 0 ; + int val13 ; + int ecode13 = 0 ; + PyObject *swig_obj[11] ; - arg3 = &temp3; arg4 = &tempn3; - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cbf_handle_struct_get_image_fs_as_string",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_realarray_wdims_sf", 11, 11, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_image_fs_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_image_fs_as_string" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "2"" of type '" "unsigned int""'"); } - arg2 = (int)(val2); - ecode5 = SWIG_AsVal_int(obj2, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_image_fs_as_string" "', argument " "5"" of type '" "int""'"); + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "3"" of type '" "int""'"); } - arg5 = (int)(val5); - ecode6 = SWIG_AsVal_int(obj3, &val6); + arg3 = (int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_image_fs_as_string" "', argument " "6"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "6"" of type '" "int""'"); } arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj4, &val7); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_image_fs_as_string" "', argument " "7"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "7"" of type '" "int""'"); } arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj5, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_image_fs_as_string" "', argument " "8"" of type '" "int""'"); + res8 = SWIG_AsCharPtrAndSize(swig_obj[6], &buf8, &size8, &alloc8); + if (!SWIG_IsOK(res8)) { + SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "8"" of type '" "char *""'"); + } + arg8 = (char *)(buf8); + arg9 = (int)(size8 - 1); + ecode10 = SWIG_AsVal_int(swig_obj[7], &val10); + if (!SWIG_IsOK(ecode10)) { + SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "10"" of type '" "int""'"); } - arg8 = (int)(val8); + arg10 = (int)(val10); + ecode11 = SWIG_AsVal_int(swig_obj[8], &val11); + if (!SWIG_IsOK(ecode11)) { + SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "11"" of type '" "int""'"); + } + arg11 = (int)(val11); + ecode12 = SWIG_AsVal_int(swig_obj[9], &val12); + if (!SWIG_IsOK(ecode12)) { + SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "12"" of type '" "int""'"); + } + arg12 = (int)(val12); + ecode13 = SWIG_AsVal_int(swig_obj[10], &val13); + if (!SWIG_IsOK(ecode13)) { + SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "13"" of type '" "int""'"); + } + arg13 = (int)(val13); { error_status=0; - cbf_handle_struct_get_image_fs_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + cbf_handle_struct_set_realarray_wdims_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -13973,49 +13772,41 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_image_fs_as_string(PyObject *SW } } resultobj = SWIG_Py_Void(); - if (*arg3) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); - free(*arg3); - } + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc8 == SWIG_NEWOBJ) free((char*)buf8); return resultobj; fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc8 == SWIG_NEWOBJ) free((char*)buf8); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_image_size_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - int *arg3 = (int *) 0 ; - int *arg4 = (int *) 0 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - int temp3 ; - int res3 = SWIG_TMPOBJ ; - int temp4 ; - int res4 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; - arg3 = &temp3; - arg4 = &temp4; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_get_image_size_sf",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_require_datablock", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_image_size_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_image_size_sf" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_datablock" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_get_image_size_sf(arg1,arg2,arg3,arg4); + cbf_handle_struct_require_datablock(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -14023,81 +13814,79 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_image_size_sf(PyObject *SWIGUNU } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_require_category", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_category" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_require_category(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_real_image_fs_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int arg2 ; - char **arg3 = (char **) 0 ; - int *arg4 = (int *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - char *temp3 = 0 ; - int tempn3 ; - int val5 ; - int ecode5 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; - arg3 = &temp3; arg4 = &tempn3; - if (!PyArg_ParseTuple(args,(char *)"OOOOO:cbf_handle_struct_get_real_image_fs_as_string",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_require_column", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_real_image_fs_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_column" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_real_image_fs_as_string" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - ecode5 = SWIG_AsVal_int(obj2, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_real_image_fs_as_string" "', argument " "5"" of type '" "int""'"); - } - arg5 = (int)(val5); - ecode6 = SWIG_AsVal_int(obj3, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_real_image_fs_as_string" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj4, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_real_image_fs_as_string" "', argument " "7"" of type '" "int""'"); - } - arg7 = (int)(val7); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_column" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_get_real_image_fs_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + cbf_handle_struct_require_column(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -14105,115 +13894,103 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_real_image_fs_as_string(PyObjec } } resultobj = SWIG_Py_Void(); - if (*arg3) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); - free(*arg3); - } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_count_columns(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_column_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - unsigned int result; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + PyObject *swig_obj[3] ; + char *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_count_columns",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_require_column_value", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_count_columns" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_column_value" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_column_value" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "cbf_handle_struct_require_column_value" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = (char *)(buf3); { error_status=0; - result = (unsigned int)cbf_handle_struct_count_columns(arg1); + result = (char *)cbf_handle_struct_require_column_value(arg1,(char const *)arg2,(char const *)arg3); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarrayparameters_wdims(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_column_integervalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int *arg2 = (int *) 0 ; + char *arg2 = (char *) 0 ; int *arg3 = (int *) 0 ; - int *arg4 = (int *) 0 ; - int *arg5 = (int *) 0 ; - int *arg6 = (int *) 0 ; - int *arg7 = (int *) 0 ; - int *arg8 = (int *) 0 ; - int *arg9 = (int *) 0 ; - char **arg10 = (char **) 0 ; - int *arg11 = (int *) 0 ; - int *arg12 = (int *) 0 ; - int *arg13 = (int *) 0 ; - int *arg14 = (int *) 0 ; - int *arg15 = (int *) 0 ; + int arg4 ; void *argp1 = 0 ; int res1 = 0 ; - int temp2 ; - int res2 = SWIG_TMPOBJ ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; int temp3 ; int res3 = SWIG_TMPOBJ ; - int temp4 ; - int res4 = SWIG_TMPOBJ ; - int temp5 ; - int res5 = SWIG_TMPOBJ ; - int temp6 ; - int res6 = SWIG_TMPOBJ ; - int temp7 ; - int res7 = SWIG_TMPOBJ ; - int temp8 ; - int res8 = SWIG_TMPOBJ ; - int temp9 ; - int res9 = SWIG_TMPOBJ ; - char *temp10 = 0 ; - int tempn10 ; - int temp12 ; - int res12 = SWIG_TMPOBJ ; - int temp13 ; - int res13 = SWIG_TMPOBJ ; - int temp14 ; - int res14 = SWIG_TMPOBJ ; - int temp15 ; - int res15 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + int val4 ; + int ecode4 = 0 ; + PyObject *swig_obj[3] ; - arg2 = &temp2; arg3 = &temp3; - arg4 = &temp4; - arg5 = &temp5; - arg6 = &temp6; - arg7 = &temp7; - arg8 = &temp8; - arg9 = &temp9; - arg10 = &temp10; arg11 = &tempn10; - arg12 = &temp12; - arg13 = &temp13; - arg14 = &temp14; - arg15 = &temp15; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_integerarrayparameters_wdims",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_require_column_integervalue", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_integerarrayparameters_wdims" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_column_integervalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_column_integervalue" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + ecode4 = SWIG_AsVal_int(swig_obj[2], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_require_column_integervalue" "', argument " "4"" of type '" "int""'"); + } + arg4 = (int)(val4); { error_status=0; - cbf_handle_struct_get_integerarrayparameters_wdims(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15); + cbf_handle_struct_require_column_integervalue(arg1,(char const *)arg2,arg3,arg4); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -14221,121 +13998,133 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarrayparameters_wdims(Py } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); - } if (SWIG_IsTmpObj(res3)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); } else { int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res6)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6))); - } else { - int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res7)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7))); - } else { - int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res8)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8))); - } else { - int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res9)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9))); - } else { - int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags)); - } - if (*arg10) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg10,*arg11)); - free(*arg10); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_column_doublevalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + double *arg3 = (double *) 0 ; + double arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double val4 ; + int ecode4 = 0 ; + PyObject *swig_obj[3] ; + + arg3 = &temp3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_require_column_doublevalue", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_column_doublevalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } - if (SWIG_IsTmpObj(res12)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg12))); - } else { - int new_flags = SWIG_IsNewObj(res12) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg12), SWIGTYPE_p_int, new_flags)); + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_column_doublevalue" "', argument " "2"" of type '" "char const *""'"); } - if (SWIG_IsTmpObj(res13)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg13))); - } else { - int new_flags = SWIG_IsNewObj(res13) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg13), SWIGTYPE_p_int, new_flags)); + arg2 = (char *)(buf2); + ecode4 = SWIG_AsVal_double(swig_obj[2], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_require_column_doublevalue" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); + { + error_status=0; + cbf_handle_struct_require_column_doublevalue(arg1,(char const *)arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } } - if (SWIG_IsTmpObj(res14)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg14))); + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); } else { - int new_flags = SWIG_IsNewObj(res14) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg14), SWIGTYPE_p_int, new_flags)); + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); } - if (SWIG_IsTmpObj(res15)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg15))); - } else { - int new_flags = SWIG_IsNewObj(res15) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg15), SWIGTYPE_p_int, new_flags)); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_dictionary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + cbf_handle result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_dictionary" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } + arg1 = (cbf_handle_struct *)(argp1); + { + error_status=0; + result = (cbf_handle)cbf_handle_struct_get_dictionary(arg1); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_gain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_dictionary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; + cbf_handle arg2 = (cbf_handle) 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - double temp3 ; - int res3 = SWIG_TMPOBJ ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; - arg3 = &temp3; - arg4 = &temp4; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_get_gain",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_dictionary", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_gain" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_dictionary" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_gain" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_dictionary" "', argument " "2"" of type '" "cbf_handle""'"); + } + arg2 = (cbf_handle)(argp2); { error_status=0; - cbf_handle_struct_get_gain(arg1,arg2,arg3,arg4); + cbf_handle_struct_set_dictionary(arg1,arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -14343,50 +14132,87 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_gain(PyObject *SWIGUNUSEDPARM(s } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_category_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_find_category_root", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_find_category_root" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_find_category_root" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + result = (char *)cbf_handle_struct_find_category_root(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } } + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_new_saveframe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_category_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + PyObject *swig_obj[3] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_new_saveframe",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_category_root", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_new_saveframe" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_category_root" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_new_saveframe" "', argument " "2"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_category_root" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "cbf_handle_struct_set_category_root" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = (char *)(buf3); { error_status=0; - cbf_handle_struct_new_saveframe(arg1,(char const *)arg2); + cbf_handle_struct_set_category_root(arg1,(char const *)arg2,(char const *)arg3); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -14395,183 +14221,131 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_new_saveframe(PyObject *SWIGUNUSEDP } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_polarization(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_category_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - double arg2 ; - double arg3 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOO:cbf_handle_struct_set_polarization",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_require_category_root", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_polarization" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_category_root" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_polarization" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_polarization" "', argument " "3"" of type '" "double""'"); - } - arg3 = (double)(val3); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_category_root" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_set_polarization(arg1,arg2,arg3); + result = (char *)cbf_handle_struct_require_category_root(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_real_3d_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_tag_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - unsigned int arg3 ; - char *arg4 = (char *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; - int arg8 ; - int arg9 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - unsigned int val3 ; - int ecode3 = 0 ; - int res4 ; - char *buf4 = 0 ; - size_t size4 = 0 ; - int alloc4 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - int val8 ; - int ecode8 = 0 ; - int val9 ; - int ecode9 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cbf_handle_struct_set_real_3d_image",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_find_tag_root", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_real_3d_image" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_find_tag_root" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_real_3d_image" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_real_3d_image" "', argument " "3"" of type '" "unsigned int""'"); - } - arg3 = (unsigned int)(val3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, &size4, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_real_3d_image" "', argument " "4"" of type '" "char *""'"); - } - arg4 = (char *)(buf4); - arg5 = (int)(size4 - 1); - ecode6 = SWIG_AsVal_int(obj4, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_real_3d_image" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj5, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_real_3d_image" "', argument " "7"" of type '" "int""'"); - } - arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj6, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_real_3d_image" "', argument " "8"" of type '" "int""'"); - } - arg8 = (int)(val8); - ecode9 = SWIG_AsVal_int(obj7, &val9); - if (!SWIG_IsOK(ecode9)) { - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_real_3d_image" "', argument " "9"" of type '" "int""'"); - } - arg9 = (int)(val9); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_find_tag_root" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_set_real_3d_image(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + result = (char *)cbf_handle_struct_find_tag_root(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_delete_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_tag_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + PyObject *swig_obj[3] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_delete_row",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_tag_root", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_delete_row" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_tag_root" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_delete_row" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_tag_root" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "cbf_handle_struct_set_tag_root" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = (char *)(buf3); { error_status=0; - cbf_handle_struct_delete_row(arg1,arg2); + cbf_handle_struct_set_tag_root(arg1,(char const *)arg2,(char const *)arg3); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -14579,29 +14353,42 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_delete_row(PyObject *SWIGUNUSEDPARM } } resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_column_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_tag_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; char *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_column_name",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_require_tag_root", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_column_name" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_tag_root" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_tag_root" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); { error_status=0; - result = (char *)cbf_handle_struct_column_name(arg1); + result = (char *)cbf_handle_struct_require_tag_root(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -14609,164 +14396,89 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_column_name(PyObject *SWIGUNUSEDPAR } } resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_remove_saveframe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_tag_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_remove_saveframe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_find_tag_category", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_remove_saveframe" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_find_tag_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_find_tag_category" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_remove_saveframe(arg1); + result = (char *)cbf_handle_struct_find_tag_category(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_integerarray_wdims_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_tag_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - int arg3 ; - char *arg4 = (char *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; - int arg8 ; - char *arg9 = (char *) 0 ; - int arg10 ; - int arg11 ; - int arg12 ; - int arg13 ; - int arg14 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int res4 ; - char *buf4 = 0 ; - size_t size4 = 0 ; - int alloc4 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - int val8 ; - int ecode8 = 0 ; - int res9 ; - char *buf9 = 0 ; - size_t size9 = 0 ; - int alloc9 = 0 ; - int val11 ; - int ecode11 = 0 ; - int val12 ; - int ecode12 = 0 ; - int val13 ; - int ecode13 = 0 ; - int val14 ; - int ecode14 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; - PyObject * obj11 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOO:cbf_handle_struct_set_integerarray_wdims_sf",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + PyObject *swig_obj[3] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_tag_category", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_tag_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, &size4, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "4"" of type '" "char *""'"); - } - arg4 = (char *)(buf4); - arg5 = (int)(size4 - 1); - ecode6 = SWIG_AsVal_int(obj4, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj5, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "7"" of type '" "int""'"); - } - arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj6, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "8"" of type '" "int""'"); - } - arg8 = (int)(val8); - res9 = SWIG_AsCharPtrAndSize(obj7, &buf9, &size9, &alloc9); - if (!SWIG_IsOK(res9)) { - SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "9"" of type '" "char *""'"); - } - arg9 = (char *)(buf9); - arg10 = (int)(size9 - 1); - ecode11 = SWIG_AsVal_int(obj8, &val11); - if (!SWIG_IsOK(ecode11)) { - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "11"" of type '" "int""'"); - } - arg11 = (int)(val11); - ecode12 = SWIG_AsVal_int(obj9, &val12); - if (!SWIG_IsOK(ecode12)) { - SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "12"" of type '" "int""'"); - } - arg12 = (int)(val12); - ecode13 = SWIG_AsVal_int(obj10, &val13); - if (!SWIG_IsOK(ecode13)) { - SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "13"" of type '" "int""'"); - } - arg13 = (int)(val13); - ecode14 = SWIG_AsVal_int(obj11, &val14); - if (!SWIG_IsOK(ecode14)) { - SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "cbf_handle_struct_set_integerarray_wdims_sf" "', argument " "14"" of type '" "int""'"); - } - arg14 = (int)(val14); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_tag_category" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "cbf_handle_struct_set_tag_category" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = (char *)(buf3); { error_status=0; - cbf_handle_struct_set_integerarray_wdims_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14); + cbf_handle_struct_set_tag_category(arg1,(char const *)arg2,(char const *)arg3); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -14774,17 +14486,17 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_integerarray_wdims_sf(PyObject } } resultobj = SWIG_Py_Void(); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - if (alloc9 == SWIG_NEWOBJ) free((char*)buf9); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return resultobj; fail: - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - if (alloc9 == SWIG_NEWOBJ) free((char*)buf9); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_read_template(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; char *arg2 = (char *) 0 ; @@ -14793,31 +14505,29 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_value(PyObject *SWIGUNUSEDP int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_require_value",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_read_template", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_value" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_read_template" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_value" "', argument " "2"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_read_template" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); { error_status=0; - result = (char *)cbf_handle_struct_require_value(arg1,(char const *)arg2); + cbf_handle_struct_read_template(arg1,arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_FromCharPtr((const char *)result); + resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: @@ -14826,109 +14536,62 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_value(PyObject *SWIGUNUSEDP } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_column_integervalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_diffrn_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; - int *arg3 = (int *) 0 ; - int arg4 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int temp3 ; - int res3 = SWIG_TMPOBJ ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; - arg3 = &temp3; - if (!PyArg_ParseTuple(args,(char *)"OOO:cbf_handle_struct_require_column_integervalue",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_column_integervalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_diffrn_id" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_column_integervalue" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - ecode4 = SWIG_AsVal_int(obj2, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_require_column_integervalue" "', argument " "4"" of type '" "int""'"); - } - arg4 = (int)(val4); { error_status=0; - cbf_handle_struct_require_column_integervalue(arg1,(char const *)arg2,arg3,arg4); + result = (char *)cbf_handle_struct_get_diffrn_id(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); - } - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_pixel_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_diffrn_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - unsigned int arg3 ; - double arg4 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - unsigned int val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OOOO:cbf_handle_struct_set_pixel_size",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_diffrn_id", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_pixel_size" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_diffrn_id" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_pixel_size" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_pixel_size" "', argument " "3"" of type '" "unsigned int""'"); - } - arg3 = (unsigned int)(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_pixel_size" "', argument " "4"" of type '" "double""'"); - } - arg4 = (double)(val4); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_diffrn_id" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_set_pixel_size(arg1,arg2,arg3,arg4); + cbf_handle_struct_set_diffrn_id(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -14936,78 +14599,70 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_pixel_size(PyObject *SWIGUNUSED } } resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_next_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_crystal_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_next_column",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_next_column" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_crystal_id" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - cbf_handle_struct_next_column(arg1); + result = (char *)cbf_handle_struct_get_crystal_id(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_size_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_crystal_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - int *arg3 = (int *) 0 ; - int *arg4 = (int *) 0 ; - int *arg5 = (int *) 0 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - int temp3 ; - int res3 = SWIG_TMPOBJ ; - int temp4 ; - int res4 = SWIG_TMPOBJ ; - int temp5 ; - int res5 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; - arg3 = &temp3; - arg4 = &temp4; - arg5 = &temp5; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_get_3d_image_size_sf",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_crystal_id", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_3d_image_size_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_crystal_id" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_3d_image_size_sf" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_crystal_id" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_get_3d_image_size_sf(arg1,arg2,arg3,arg4,arg5); + cbf_handle_struct_set_crystal_id(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -15015,169 +14670,69 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_size_sf(PyObject *SWIG } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); - } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_realarrayparameters_wdims_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_wavelength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int *arg2 = (int *) 0 ; - int *arg3 = (int *) 0 ; - int *arg4 = (int *) 0 ; - int *arg5 = (int *) 0 ; - char **arg6 = (char **) 0 ; - int *arg7 = (int *) 0 ; - int *arg8 = (int *) 0 ; - int *arg9 = (int *) 0 ; - int *arg10 = (int *) 0 ; - int *arg11 = (int *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int temp2 ; - int res2 = SWIG_TMPOBJ ; - int temp3 ; - int res3 = SWIG_TMPOBJ ; - int temp4 ; - int res4 = SWIG_TMPOBJ ; - int temp5 ; - int res5 = SWIG_TMPOBJ ; - char *temp6 = 0 ; - int tempn6 ; - int temp8 ; - int res8 = SWIG_TMPOBJ ; - int temp9 ; - int res9 = SWIG_TMPOBJ ; - int temp10 ; - int res10 = SWIG_TMPOBJ ; - int temp11 ; - int res11 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; + double result; - arg2 = &temp2; - arg3 = &temp3; - arg4 = &temp4; - arg5 = &temp5; - arg6 = &temp6; arg7 = &tempn6; - arg8 = &temp8; - arg9 = &temp9; - arg10 = &temp10; - arg11 = &temp11; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_realarrayparameters_wdims_fs",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_realarrayparameters_wdims_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_wavelength" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - cbf_handle_struct_get_realarrayparameters_wdims_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); + result = (double)cbf_handle_struct_get_wavelength(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); - } - if (*arg6) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg6,*arg7)); - free(*arg6); - } - if (SWIG_IsTmpObj(res8)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8))); - } else { - int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res9)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9))); - } else { - int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res10)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg10))); - } else { - int new_flags = SWIG_IsNewObj(res10) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg10), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res11)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg11))); - } else { - int new_flags = SWIG_IsNewObj(res11) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg11), SWIGTYPE_p_int, new_flags)); - } + resultobj = SWIG_From_double((double)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_realarray_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_wavelength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char **arg2 = (char **) 0 ; - int *arg3 = (int *) 0 ; + double arg2 ; void *argp1 = 0 ; int res1 = 0 ; - char *temp2 = 0 ; - int tempn2 ; - PyObject * obj0 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; - arg2 = &temp2; arg3 = &tempn2; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_realarray_as_string",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_wavelength", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_realarray_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_wavelength" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_wavelength" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); { error_status=0; - cbf_handle_struct_get_realarray_as_string(arg1,arg2,arg3); + cbf_handle_struct_set_wavelength(arg1,arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -15185,49 +14740,37 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_realarray_as_string(PyObject *S } } resultobj = SWIG_Py_Void(); - if (*arg2) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg2,*arg3)); - free(*arg2); - } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_bin_sizes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_polarization(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int arg2 ; + double *arg2 = (double *) 0 ; double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; double temp3 ; int res3 = SWIG_TMPOBJ ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + PyObject *swig_obj[1] ; + arg2 = &temp2; arg3 = &temp3; - arg4 = &temp4; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_get_bin_sizes",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_bin_sizes" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_polarization" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_bin_sizes" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); { error_status=0; - cbf_handle_struct_get_bin_sizes(arg1,arg2,arg3,arg4); + cbf_handle_struct_get_polarization(arg1,arg2,arg3); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -15235,40 +14778,56 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_bin_sizes(PyObject *SWIGUNUSEDP } } resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } if (SWIG_IsTmpObj(res3)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); } else { int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); - } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_reset_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_polarization(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double arg2 ; + double arg3 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_reset_category",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_polarization", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_reset_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_polarization" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_polarization" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_polarization" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); { error_status=0; - cbf_handle_struct_reset_category(arg1); + cbf_handle_struct_set_polarization(arg1,arg2,arg3); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -15282,36 +14841,35 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_reset_category(PyObject *SWIGUNUSED } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_count_axis_ancestors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_divergence(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; - int *arg3 = (int *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int temp3 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; int res3 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + arg2 = &temp2; arg3 = &temp3; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_count_axis_ancestors",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg4 = &temp4; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_count_axis_ancestors" "', argument " "1"" of type '" "cbf_handle_struct *""'"); - } - arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_count_axis_ancestors" "', argument " "2"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_divergence" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } - arg2 = (char *)(buf2); + arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - cbf_handle_struct_count_axis_ancestors(arg1,(char const *)arg2,arg3); + cbf_handle_struct_get_divergence(arg1,arg2,arg3,arg4); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -15319,87 +14877,110 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_count_axis_ancestors(PyObject *SWIG } } resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); } else { int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); } - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_construct_goniometer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_divergence(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double arg2 ; + double arg3 ; + double arg4 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - cbf_goniometer result; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject *swig_obj[4] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_construct_goniometer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_divergence", 4, 4, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_construct_goniometer" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_divergence" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_divergence" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_divergence" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_divergence" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); { error_status=0; - result = (cbf_goniometer)cbf_handle_struct_construct_goniometer(arg1); + cbf_handle_struct_set_divergence(arg1,arg2,arg3,arg4); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_datablockname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_count_elements(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + PyObject *swig_obj[1] ; + unsigned int result; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_set_datablockname",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_datablockname" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_count_elements" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_datablockname" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_set_datablockname(arg1,(char const *)arg2); + result = (unsigned int)cbf_handle_struct_count_elements(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } @@ -15409,10 +14990,11 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_element_number(PyObject *SWIGUN cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_element_number",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_element_number" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } @@ -15433,68 +15015,76 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_element_number(PyObject *SWIGUN } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_crystal_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_element_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; + unsigned int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_set_crystal_id",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_element_id", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_crystal_id" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_element_id" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_crystal_id" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_element_id" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); { error_status=0; - cbf_handle_struct_set_crystal_id(arg1,(char const *)arg2); + result = (char *)cbf_handle_struct_get_element_id(arg1,arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarray_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_gain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char **arg2 = (char **) 0 ; - int *arg3 = (int *) 0 ; + unsigned int arg2 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - char *temp2 = 0 ; - int tempn2 ; - PyObject * obj0 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; - arg2 = &temp2; arg3 = &tempn2; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_integerarray_as_string",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg3 = &temp3; + arg4 = &temp4; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_gain", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_integerarray_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_gain" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_gain" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); { error_status=0; - cbf_handle_struct_get_integerarray_as_string(arg1,arg2,arg3); + cbf_handle_struct_get_gain(arg1,arg2,arg3,arg4); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -15502,9 +15092,17 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarray_as_string(PyObject } } resultobj = SWIG_Py_Void(); - if (*arg2) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg2,*arg3)); - free(*arg2); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); } return resultobj; fail: @@ -15512,138 +15110,46 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarray_as_string(PyObject } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_3d_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_gain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; unsigned int arg2 ; - unsigned int arg3 ; - char *arg4 = (char *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; - int arg8 ; - int arg9 ; - int arg10 ; + double arg3 ; + double arg4 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; - unsigned int val3 ; + double val3 ; int ecode3 = 0 ; - int res4 ; - char *buf4 = 0 ; - size_t size4 = 0 ; - int alloc4 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - int val8 ; - int ecode8 = 0 ; - int val9 ; - int ecode9 = 0 ; - int val10 ; - int ecode10 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:cbf_handle_struct_set_3d_image",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + double val4 ; + int ecode4 = 0 ; + PyObject *swig_obj[4] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_gain", 4, 4, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_gain" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_gain" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "3"" of type '" "unsigned int""'"); - } - arg3 = (unsigned int)(val3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, &size4, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "4"" of type '" "char *""'"); - } - arg4 = (char *)(buf4); - arg5 = (int)(size4 - 1); - ecode6 = SWIG_AsVal_int(obj4, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj5, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "7"" of type '" "int""'"); - } - arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj6, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "8"" of type '" "int""'"); - } - arg8 = (int)(val8); - ecode9 = SWIG_AsVal_int(obj7, &val9); - if (!SWIG_IsOK(ecode9)) { - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "9"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_gain" "', argument " "3"" of type '" "double""'"); } - arg9 = (int)(val9); - ecode10 = SWIG_AsVal_int(obj8, &val10); - if (!SWIG_IsOK(ecode10)) { - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "10"" of type '" "int""'"); + arg3 = (double)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_gain" "', argument " "4"" of type '" "double""'"); } - arg10 = (int)(val10); - { - error_status=0; - cbf_handle_struct_set_3d_image(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } - } - resultobj = SWIG_Py_Void(); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - return resultobj; -fail: - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_dictionary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - cbf_handle arg2 = (cbf_handle) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_set_dictionary",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_dictionary" "', argument " "1"" of type '" "cbf_handle_struct *""'"); - } - arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_dictionary" "', argument " "2"" of type '" "cbf_handle""'"); - } - arg2 = (cbf_handle)(argp2); + arg4 = (double)(val4); { error_status=0; - cbf_handle_struct_set_dictionary(arg1,arg2); + cbf_handle_struct_set_gain(arg1,arg2,arg3,arg4); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -15657,114 +15163,85 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_dictionary(PyObject *SWIGUNUSED } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_tag_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_overload(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; + unsigned int arg2 ; + double *arg3 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_find_tag_category",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg3 = &temp3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_overload", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_find_tag_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_overload" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_find_tag_category" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_overload" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); { error_status=0; - result = (char *)cbf_handle_struct_find_tag_category(arg1,(char const *)arg2); + cbf_handle_struct_get_overload(arg1,arg2,arg3); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_FromCharPtr((const char *)result); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_real_3d_image_sf_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_overload(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int arg2 ; - char **arg3 = (char **) 0 ; - int *arg4 = (int *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; - int arg8 ; + unsigned int arg2 ; + double arg3 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; - char *temp3 = 0 ; - int tempn3 ; - int val5 ; - int ecode5 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - int val8 ; - int ecode8 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; - arg3 = &temp3; arg4 = &tempn3; - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cbf_handle_struct_get_real_3d_image_sf_as_string",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_overload", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_real_3d_image_sf_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_overload" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_real_3d_image_sf_as_string" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - ecode5 = SWIG_AsVal_int(obj2, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_real_3d_image_sf_as_string" "', argument " "5"" of type '" "int""'"); - } - arg5 = (int)(val5); - ecode6 = SWIG_AsVal_int(obj3, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_real_3d_image_sf_as_string" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj4, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_real_3d_image_sf_as_string" "', argument " "7"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_overload" "', argument " "2"" of type '" "unsigned int""'"); } - arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj5, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_real_3d_image_sf_as_string" "', argument " "8"" of type '" "int""'"); + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_overload" "', argument " "3"" of type '" "double""'"); } - arg8 = (int)(val8); + arg3 = (double)(val3); { error_status=0; - cbf_handle_struct_get_real_3d_image_sf_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + cbf_handle_struct_set_overload(arg1,arg2,arg3); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -15772,42 +15249,33 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_real_3d_image_sf_as_string(PyOb } } resultobj = SWIG_Py_Void(); - if (*arg3) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); - free(*arg3); - } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_typeofvalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integration_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; + double *arg2 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_set_typeofvalue",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg2 = &temp2; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_typeofvalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_integration_time" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_typeofvalue" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_set_typeofvalue(arg1,(char const *)arg2); + cbf_handle_struct_get_integration_time(arg1,arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -15815,179 +15283,80 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_typeofvalue(PyObject *SWIGUNUSE } } resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_rotation_axis(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_integration_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; + double arg2 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_get_axis_rotation_axis",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_integration_time", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_rotation_axis" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_integration_time" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_rotation_axis" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_integration_time" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); { error_status=0; - result = (char *)cbf_handle_struct_get_axis_rotation_axis(arg1,(char const *)arg2); + cbf_handle_struct_set_integration_time(arg1,arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_FromCharPtr((const char *)result); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + resultobj = SWIG_Py_Void(); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_integerarray_wdims(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_timestamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - int arg3 ; - char *arg4 = (char *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; - int arg8 ; - char *arg9 = (char *) 0 ; - int arg10 ; - int arg11 ; - int arg12 ; - int arg13 ; - int arg14 ; + double *arg2 = (double *) 0 ; + int *arg3 = (int *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int res4 ; - char *buf4 = 0 ; - size_t size4 = 0 ; - int alloc4 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - int val8 ; - int ecode8 = 0 ; - int res9 ; - char *buf9 = 0 ; - size_t size9 = 0 ; - int alloc9 = 0 ; - int val11 ; - int ecode11 = 0 ; - int val12 ; - int ecode12 = 0 ; - int val13 ; - int ecode13 = 0 ; - int val14 ; - int ecode14 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; - PyObject * obj11 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOO:cbf_handle_struct_set_integerarray_wdims",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + double temp2 ; + int res2 = SWIG_TMPOBJ ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_timestamp" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, &size4, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "4"" of type '" "char *""'"); - } - arg4 = (char *)(buf4); - arg5 = (int)(size4 - 1); - ecode6 = SWIG_AsVal_int(obj4, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj5, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "7"" of type '" "int""'"); - } - arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj6, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "8"" of type '" "int""'"); - } - arg8 = (int)(val8); - res9 = SWIG_AsCharPtrAndSize(obj7, &buf9, &size9, &alloc9); - if (!SWIG_IsOK(res9)) { - SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "9"" of type '" "char *""'"); - } - arg9 = (char *)(buf9); - arg10 = (int)(size9 - 1); - ecode11 = SWIG_AsVal_int(obj8, &val11); - if (!SWIG_IsOK(ecode11)) { - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "11"" of type '" "int""'"); - } - arg11 = (int)(val11); - ecode12 = SWIG_AsVal_int(obj9, &val12); - if (!SWIG_IsOK(ecode12)) { - SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "12"" of type '" "int""'"); - } - arg12 = (int)(val12); - ecode13 = SWIG_AsVal_int(obj10, &val13); - if (!SWIG_IsOK(ecode13)) { - SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "13"" of type '" "int""'"); - } - arg13 = (int)(val13); - ecode14 = SWIG_AsVal_int(obj11, &val14); - if (!SWIG_IsOK(ecode14)) { - SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "cbf_handle_struct_set_integerarray_wdims" "', argument " "14"" of type '" "int""'"); - } - arg14 = (int)(val14); { error_status=0; - cbf_handle_struct_set_integerarray_wdims(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14); + cbf_handle_struct_get_timestamp(arg1,arg2,arg3); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -15995,41 +15364,64 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_integerarray_wdims(PyObject *SW } } resultobj = SWIG_Py_Void(); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - if (alloc9 == SWIG_NEWOBJ) free((char*)buf9); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } return resultobj; fail: - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - if (alloc9 == SWIG_NEWOBJ) free((char*)buf9); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_integration_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_timestamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; double arg2 ; + int arg3 ; + double arg4 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + int val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject *swig_obj[4] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_set_integration_time",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_timestamp", 4, 4, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_integration_time" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_timestamp" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_integration_time" "', argument " "2"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_timestamp" "', argument " "2"" of type '" "double""'"); } arg2 = (double)(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_timestamp" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_timestamp" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); { error_status=0; - cbf_handle_struct_set_integration_time(arg1,arg2); + cbf_handle_struct_set_timestamp(arg1,arg2,arg3,arg4); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -16043,50 +15435,51 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_integration_time(PyObject *SWIG } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_axis_setting(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_datestamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; - double arg3 ; - double arg4 ; + int *arg2 = (int *) 0 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; + int *arg5 = (int *) 0 ; + int *arg6 = (int *) 0 ; + double *arg7 = (double *) 0 ; + int *arg8 = (int *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; + int temp2 ; + int res2 = SWIG_TMPOBJ ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + int temp5 ; + int res5 = SWIG_TMPOBJ ; + int temp6 ; + int res6 = SWIG_TMPOBJ ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + int temp8 ; + int res8 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"OOOO:cbf_handle_struct_set_axis_setting",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + arg8 = &temp8; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_axis_setting" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_datestamp" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_axis_setting" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_axis_setting" "', argument " "3"" of type '" "double""'"); - } - arg3 = (double)(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_axis_setting" "', argument " "4"" of type '" "double""'"); - } - arg4 = (double)(val4); { error_status=0; - cbf_handle_struct_set_axis_setting(arg1,(char const *)arg2,arg3,arg4); + cbf_handle_struct_get_datestamp(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -16094,71 +15487,134 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_axis_setting(PyObject *SWIGUNUS } } resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res8)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8))); + } else { + int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags)); + } return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_real_image_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_datestamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; int arg2 ; - char **arg3 = (char **) 0 ; - int *arg4 = (int *) 0 ; + int arg3 ; + int arg4 ; int arg5 ; int arg6 ; - int arg7 ; + double arg7 ; + int arg8 ; + double arg9 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; - char *temp3 = 0 ; - int tempn3 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; - int val7 ; + double val7 ; int ecode7 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; + int val8 ; + int ecode8 = 0 ; + double val9 ; + int ecode9 = 0 ; + PyObject *swig_obj[9] ; - arg3 = &temp3; arg4 = &tempn3; - if (!PyArg_ParseTuple(args,(char *)"OOOOO:cbf_handle_struct_get_real_image_as_string",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_datestamp", 9, 9, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_real_image_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_real_image_as_string" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); - ecode5 = SWIG_AsVal_int(obj2, &val5); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "4"" of type '" "int""'"); + } + arg4 = (int)(val4); + ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_real_image_as_string" "', argument " "5"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "5"" of type '" "int""'"); } arg5 = (int)(val5); - ecode6 = SWIG_AsVal_int(obj3, &val6); + ecode6 = SWIG_AsVal_int(swig_obj[5], &val6); if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_real_image_as_string" "', argument " "6"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "6"" of type '" "int""'"); } arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj4, &val7); + ecode7 = SWIG_AsVal_double(swig_obj[6], &val7); if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_real_image_as_string" "', argument " "7"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "7"" of type '" "double""'"); } - arg7 = (int)(val7); + arg7 = (double)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[7], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + ecode9 = SWIG_AsVal_double(swig_obj[8], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "9"" of type '" "double""'"); + } + arg9 = (double)(val9); { error_status=0; - cbf_handle_struct_get_real_image_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + cbf_handle_struct_set_datestamp(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -16166,142 +15622,81 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_real_image_as_string(PyObject * } } resultobj = SWIG_Py_Void(); - if (*arg3) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); - free(*arg3); - } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_ancestor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_current_timestamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; - int arg3 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char *result = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OOO:cbf_handle_struct_get_axis_ancestor",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_current_timestamp", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_ancestor" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_current_timestamp" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_ancestor" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_get_axis_ancestor" "', argument " "3"" of type '" "int""'"); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_current_timestamp" "', argument " "2"" of type '" "int""'"); } - arg3 = (int)(val3); + arg2 = (int)(val2); { error_status=0; - result = (char *)cbf_handle_struct_get_axis_ancestor(arg1,(char const *)arg2,arg3); + cbf_handle_struct_set_current_timestamp(arg1,arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_FromCharPtr((const char *)result); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + resultobj = SWIG_Py_Void(); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_sf_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_image_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int arg2 ; - char **arg3 = (char **) 0 ; + unsigned int arg2 ; + int *arg3 = (int *) 0 ; int *arg4 = (int *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; - int arg8 ; - int arg9 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; - char *temp3 = 0 ; - int tempn3 ; - int val5 ; - int ecode5 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - int val8 ; - int ecode8 = 0 ; - int val9 ; - int ecode9 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; - arg3 = &temp3; arg4 = &tempn3; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:cbf_handle_struct_get_3d_image_sf_as_string",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_3d_image_sf_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); - } - arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_3d_image_sf_as_string" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - ecode5 = SWIG_AsVal_int(obj2, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_3d_image_sf_as_string" "', argument " "5"" of type '" "int""'"); - } - arg5 = (int)(val5); - ecode6 = SWIG_AsVal_int(obj3, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_3d_image_sf_as_string" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj4, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_3d_image_sf_as_string" "', argument " "7"" of type '" "int""'"); - } - arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj5, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_3d_image_sf_as_string" "', argument " "8"" of type '" "int""'"); - } - arg8 = (int)(val8); - ecode9 = SWIG_AsVal_int(obj6, &val9); - if (!SWIG_IsOK(ecode9)) { - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_get_3d_image_sf_as_string" "', argument " "9"" of type '" "int""'"); + arg3 = &temp3; + arg4 = &temp4; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_image_size", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_image_size" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_image_size" "', argument " "2"" of type '" "unsigned int""'"); } - arg9 = (int)(val9); + arg2 = (unsigned int)(val2); { error_status=0; - cbf_handle_struct_get_3d_image_sf_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + cbf_handle_struct_get_image_size(arg1,arg2,arg3,arg4); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -16309,9 +15704,17 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_sf_as_string(PyObject } } resultobj = SWIG_Py_Void(); - if (*arg3) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); - free(*arg3); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); } return resultobj; fail: @@ -16319,80 +15722,38 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_sf_as_string(PyObject } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_real_image_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_image_size_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; unsigned int arg2 ; - unsigned int arg3 ; - char *arg4 = (char *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; - int arg8 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; - unsigned int val3 ; - int ecode3 = 0 ; - int res4 ; - char *buf4 = 0 ; - size_t size4 = 0 ; - int alloc4 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - int val8 ; - int ecode8 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:cbf_handle_struct_set_real_image_fs",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg3 = &temp3; + arg4 = &temp4; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_image_size_fs", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_real_image_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_image_size_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_real_image_fs" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_image_size_fs" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_real_image_fs" "', argument " "3"" of type '" "unsigned int""'"); - } - arg3 = (unsigned int)(val3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, &size4, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_real_image_fs" "', argument " "4"" of type '" "char *""'"); - } - arg4 = (char *)(buf4); - arg5 = (int)(size4 - 1); - ecode6 = SWIG_AsVal_int(obj4, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_real_image_fs" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj5, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_real_image_fs" "', argument " "7"" of type '" "int""'"); - } - arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj6, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_real_image_fs" "', argument " "8"" of type '" "int""'"); - } - arg8 = (int)(val8); { error_status=0; - cbf_handle_struct_set_real_image_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + cbf_handle_struct_get_image_size_fs(arg1,arg2,arg3,arg4); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -16400,43 +15761,56 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_real_image_fs(PyObject *SWIGUNU } } resultobj = SWIG_Py_Void(); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + } return resultobj; fail: - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_overload(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_image_size_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; unsigned int arg2 ; - double *arg3 = (double *) 0 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; - double temp3 ; + int temp3 ; int res3 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; arg3 = &temp3; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_get_overload",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg4 = &temp4; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_image_size_sf", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_overload" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_image_size_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_overload" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_image_size_sf" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); { error_status=0; - cbf_handle_struct_get_overload(arg1,arg2,arg3); + cbf_handle_struct_get_image_size_sf(arg1,arg2,arg3,arg4); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -16445,10 +15819,16 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_overload(PyObject *SWIGUNUSEDPA } resultobj = SWIG_Py_Void(); if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); } else { int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); } return resultobj; fail: @@ -16456,52 +15836,109 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_overload(PyObject *SWIGUNUSEDPA } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_wavelength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; + int *arg5 = (int *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - double result; + unsigned int val2 ; + int ecode2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + int temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_wavelength",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_3d_image_size", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_wavelength" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_3d_image_size" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_3d_image_size" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); { error_status=0; - result = (double)cbf_handle_struct_get_wavelength(arg1); + cbf_handle_struct_get_3d_image_size(arg1,arg2,arg3,arg4,arg5); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_From_double((double)(result)); + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_next_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_size_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + int *arg3 = (int *) 0 ; + int *arg4 = (int *) 0 ; + int *arg5 = (int *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int temp4 ; + int res4 = SWIG_TMPOBJ ; + int temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_next_datablock",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_3d_image_size_fs", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_next_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_3d_image_size_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_3d_image_size_fs" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); { error_status=0; - cbf_handle_struct_next_datablock(arg1); + cbf_handle_struct_get_3d_image_size_fs(arg1,arg2,arg3,arg4,arg5); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -16509,78 +15946,73 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_next_datablock(PyObject *SWIGUNUSED } } resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_realarrayparameters_wdims(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_size_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int *arg2 = (int *) 0 ; + unsigned int arg2 ; int *arg3 = (int *) 0 ; int *arg4 = (int *) 0 ; int *arg5 = (int *) 0 ; - char **arg6 = (char **) 0 ; - int *arg7 = (int *) 0 ; - int *arg8 = (int *) 0 ; - int *arg9 = (int *) 0 ; - int *arg10 = (int *) 0 ; - int *arg11 = (int *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int temp2 ; - int res2 = SWIG_TMPOBJ ; + unsigned int val2 ; + int ecode2 = 0 ; int temp3 ; int res3 = SWIG_TMPOBJ ; int temp4 ; int res4 = SWIG_TMPOBJ ; int temp5 ; int res5 = SWIG_TMPOBJ ; - char *temp6 = 0 ; - int tempn6 ; - int temp8 ; - int res8 = SWIG_TMPOBJ ; - int temp9 ; - int res9 = SWIG_TMPOBJ ; - int temp10 ; - int res10 = SWIG_TMPOBJ ; - int temp11 ; - int res11 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[2] ; - arg2 = &temp2; arg3 = &temp3; arg4 = &temp4; arg5 = &temp5; - arg6 = &temp6; arg7 = &tempn6; - arg8 = &temp8; - arg9 = &temp9; - arg10 = &temp10; - arg11 = &temp11; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_realarrayparameters_wdims",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_3d_image_size_sf", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_realarrayparameters_wdims" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_3d_image_size_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_3d_image_size_sf" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); { error_status=0; - cbf_handle_struct_get_realarrayparameters_wdims(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); + cbf_handle_struct_get_3d_image_size_sf(arg1,arg2,arg3,arg4,arg5); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } - } - resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); + return NULL; + } } + resultobj = SWIG_Py_Void(); if (SWIG_IsTmpObj(res3)) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); } else { @@ -16599,137 +16031,73 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_realarrayparameters_wdims(PyObj int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); } - if (*arg6) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg6,*arg7)); - free(*arg6); - } - if (SWIG_IsTmpObj(res8)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8))); - } else { - int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res9)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9))); - } else { - int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res10)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg10))); - } else { - int new_flags = SWIG_IsNewObj(res10) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg10), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res11)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg11))); - } else { - int new_flags = SWIG_IsNewObj(res11) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg11), SWIGTYPE_p_int, new_flags)); - } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_orientation_matrix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_image_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - double arg2 ; - double arg3 ; - double arg4 ; - double arg5 ; - double arg6 ; - double arg7 ; - double arg8 ; - double arg9 ; - double arg10 ; + int arg2 ; + char **arg3 = (char **) 0 ; + int *arg4 = (int *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; void *argp1 = 0 ; int res1 = 0 ; - double val2 ; + int val2 ; int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - double val5 ; + char *temp3 = 0 ; + int tempn3 ; + int val5 ; int ecode5 = 0 ; - double val6 ; + int val6 ; int ecode6 = 0 ; - double val7 ; + int val7 ; int ecode7 = 0 ; - double val8 ; + int val8 ; int ecode8 = 0 ; - double val9 ; - int ecode9 = 0 ; - double val10 ; - int ecode10 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:cbf_handle_struct_set_orientation_matrix",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + PyObject *swig_obj[6] ; + + arg3 = &temp3; arg4 = &tempn3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_image_as_string", 6, 6, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_image_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "3"" of type '" "double""'"); - } - arg3 = (double)(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "4"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_image_as_string" "', argument " "2"" of type '" "int""'"); } - arg4 = (double)(val4); - ecode5 = SWIG_AsVal_double(obj4, &val5); + arg2 = (int)(val2); + ecode5 = SWIG_AsVal_int(swig_obj[2], &val5); if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "5"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_image_as_string" "', argument " "5"" of type '" "int""'"); } - arg5 = (double)(val5); - ecode6 = SWIG_AsVal_double(obj5, &val6); + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[3], &val6); if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "6"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_image_as_string" "', argument " "6"" of type '" "int""'"); } - arg6 = (double)(val6); - ecode7 = SWIG_AsVal_double(obj6, &val7); + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[4], &val7); if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "7"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_image_as_string" "', argument " "7"" of type '" "int""'"); } - arg7 = (double)(val7); - ecode8 = SWIG_AsVal_double(obj7, &val8); + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[5], &val8); if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "8"" of type '" "double""'"); - } - arg8 = (double)(val8); - ecode9 = SWIG_AsVal_double(obj8, &val9); - if (!SWIG_IsOK(ecode9)) { - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "9"" of type '" "double""'"); - } - arg9 = (double)(val9); - ecode10 = SWIG_AsVal_double(obj9, &val10); - if (!SWIG_IsOK(ecode10)) { - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "10"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_image_as_string" "', argument " "8"" of type '" "int""'"); } - arg10 = (double)(val10); + arg8 = (int)(val8); { error_status=0; - cbf_handle_struct_set_orientation_matrix(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); + cbf_handle_struct_get_image_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -16737,96 +16105,77 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_orientation_matrix(PyObject *SW } } resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_handle_struct_new_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_new_category",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_new_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); - } - arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_new_category" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - { - error_status=0; - cbf_handle_struct_new_category(arg1,(char const *)arg2); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } + if (*arg3) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); + free(*arg3); } - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_gain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_image_fs_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - double arg3 ; - double arg4 ; + int arg2 ; + char **arg3 = (char **) 0 ; + int *arg4 = (int *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; + char *temp3 = 0 ; + int tempn3 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + PyObject *swig_obj[6] ; - if (!PyArg_ParseTuple(args,(char *)"OOOO:cbf_handle_struct_set_gain",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg3 = &temp3; arg4 = &tempn3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_image_fs_as_string", 6, 6, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_gain" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_image_fs_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_gain" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_image_fs_as_string" "', argument " "2"" of type '" "int""'"); } - arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_gain" "', argument " "3"" of type '" "double""'"); + arg2 = (int)(val2); + ecode5 = SWIG_AsVal_int(swig_obj[2], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_image_fs_as_string" "', argument " "5"" of type '" "int""'"); } - arg3 = (double)(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_gain" "', argument " "4"" of type '" "double""'"); + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[3], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_image_fs_as_string" "', argument " "6"" of type '" "int""'"); } - arg4 = (double)(val4); + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[4], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_image_fs_as_string" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[5], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_image_fs_as_string" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); { error_status=0; - cbf_handle_struct_set_gain(arg1,arg2,arg3,arg4); + cbf_handle_struct_get_image_fs_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -16834,38 +16183,77 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_gain(PyObject *SWIGUNUSEDPARM(s } } resultobj = SWIG_Py_Void(); + if (*arg3) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); + free(*arg3); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_image_sf_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; + int arg2 ; + char **arg3 = (char **) 0 ; + int *arg4 = (int *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + int val2 ; + int ecode2 = 0 ; + char *temp3 = 0 ; + int tempn3 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + PyObject *swig_obj[6] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_find_column",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg3 = &temp3; arg4 = &tempn3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_image_sf_as_string", 6, 6, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_find_column" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_image_sf_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_find_column" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_image_sf_as_string" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode5 = SWIG_AsVal_int(swig_obj[2], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_image_sf_as_string" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[3], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_image_sf_as_string" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[4], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_image_sf_as_string" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[5], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_image_sf_as_string" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); { error_status=0; - cbf_handle_struct_find_column(arg1,(char const *)arg2); + cbf_handle_struct_get_image_sf_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -16873,30 +16261,69 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_column(PyObject *SWIGUNUSEDPAR } } resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (*arg3) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); + free(*arg3); + } return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_remove_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_real_image_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + int arg2 ; + char **arg3 = (char **) 0 ; + int *arg4 = (int *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + int val2 ; + int ecode2 = 0 ; + char *temp3 = 0 ; + int tempn3 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + PyObject *swig_obj[5] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_remove_category",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg3 = &temp3; arg4 = &tempn3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_real_image_as_string", 5, 5, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_remove_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_real_image_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_real_image_as_string" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode5 = SWIG_AsVal_int(swig_obj[2], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_real_image_as_string" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[3], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_real_image_as_string" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[4], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_real_image_as_string" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); { error_status=0; - cbf_handle_struct_remove_category(arg1); + cbf_handle_struct_get_real_image_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -16904,81 +16331,69 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_remove_category(PyObject *SWIGUNUSE } } resultobj = SWIG_Py_Void(); + if (*arg3) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); + free(*arg3); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarrayparameters_wdims_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_real_image_fs_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int *arg2 = (int *) 0 ; - int *arg3 = (int *) 0 ; + int arg2 ; + char **arg3 = (char **) 0 ; int *arg4 = (int *) 0 ; - int *arg5 = (int *) 0 ; - int *arg6 = (int *) 0 ; - int *arg7 = (int *) 0 ; - int *arg8 = (int *) 0 ; - int *arg9 = (int *) 0 ; - char **arg10 = (char **) 0 ; - int *arg11 = (int *) 0 ; - int *arg12 = (int *) 0 ; - int *arg13 = (int *) 0 ; - int *arg14 = (int *) 0 ; - int *arg15 = (int *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; void *argp1 = 0 ; int res1 = 0 ; - int temp2 ; - int res2 = SWIG_TMPOBJ ; - int temp3 ; - int res3 = SWIG_TMPOBJ ; - int temp4 ; - int res4 = SWIG_TMPOBJ ; - int temp5 ; - int res5 = SWIG_TMPOBJ ; - int temp6 ; - int res6 = SWIG_TMPOBJ ; - int temp7 ; - int res7 = SWIG_TMPOBJ ; - int temp8 ; - int res8 = SWIG_TMPOBJ ; - int temp9 ; - int res9 = SWIG_TMPOBJ ; - char *temp10 = 0 ; - int tempn10 ; - int temp12 ; - int res12 = SWIG_TMPOBJ ; - int temp13 ; - int res13 = SWIG_TMPOBJ ; - int temp14 ; - int res14 = SWIG_TMPOBJ ; - int temp15 ; - int res15 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + int val2 ; + int ecode2 = 0 ; + char *temp3 = 0 ; + int tempn3 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + PyObject *swig_obj[5] ; - arg2 = &temp2; - arg3 = &temp3; - arg4 = &temp4; - arg5 = &temp5; - arg6 = &temp6; - arg7 = &temp7; - arg8 = &temp8; - arg9 = &temp9; - arg10 = &temp10; arg11 = &tempn10; - arg12 = &temp12; - arg13 = &temp13; - arg14 = &temp14; - arg15 = &temp15; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_integerarrayparameters_wdims_sf",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg3 = &temp3; arg4 = &tempn3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_real_image_fs_as_string", 5, 5, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_integerarrayparameters_wdims_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_real_image_fs_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_real_image_fs_as_string" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode5 = SWIG_AsVal_int(swig_obj[2], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_real_image_fs_as_string" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[3], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_real_image_fs_as_string" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[4], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_real_image_fs_as_string" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); { error_status=0; - cbf_handle_struct_get_integerarrayparameters_wdims_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15); + cbf_handle_struct_get_real_image_fs_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -16986,81 +16401,9 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarrayparameters_wdims_sf } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res6)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6))); - } else { - int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res7)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7))); - } else { - int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res8)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8))); - } else { - int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res9)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9))); - } else { - int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags)); - } - if (*arg10) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg10,*arg11)); - free(*arg10); - } - if (SWIG_IsTmpObj(res12)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg12))); - } else { - int new_flags = SWIG_IsNewObj(res12) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg12), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res13)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg13))); - } else { - int new_flags = SWIG_IsNewObj(res13) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg13), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res14)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg14))); - } else { - int new_flags = SWIG_IsNewObj(res14) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg14), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res15)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg15))); - } else { - int new_flags = SWIG_IsNewObj(res15) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg15), SWIGTYPE_p_int, new_flags)); + if (*arg3) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); + free(*arg3); } return resultobj; fail: @@ -17068,44 +16411,59 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarrayparameters_wdims_sf } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_pixel_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_real_image_sf_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - unsigned int arg3 ; - double *arg4 = (double *) 0 ; + int arg2 ; + char **arg3 = (char **) 0 ; + int *arg4 = (int *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; - unsigned int val3 ; - int ecode3 = 0 ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; + char *temp3 = 0 ; + int tempn3 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + PyObject *swig_obj[5] ; - arg4 = &temp4; - if (!PyArg_ParseTuple(args,(char *)"OOO:cbf_handle_struct_get_pixel_size",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg3 = &temp3; arg4 = &tempn3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_real_image_sf_as_string", 5, 5, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_pixel_size" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_real_image_sf_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_pixel_size" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_real_image_sf_as_string" "', argument " "2"" of type '" "int""'"); } - arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_get_pixel_size" "', argument " "3"" of type '" "unsigned int""'"); + arg2 = (int)(val2); + ecode5 = SWIG_AsVal_int(swig_obj[2], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_real_image_sf_as_string" "', argument " "5"" of type '" "int""'"); } - arg3 = (unsigned int)(val3); + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[3], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_real_image_sf_as_string" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[4], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_real_image_sf_as_string" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); { error_status=0; - cbf_handle_struct_get_pixel_size(arg1,arg2,arg3,arg4); + cbf_handle_struct_get_real_image_sf_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -17113,11 +16471,9 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_pixel_size(PyObject *SWIGUNUSED } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + if (*arg3) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); + free(*arg3); } return resultobj; fail: @@ -17125,80 +16481,75 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_pixel_size(PyObject *SWIGUNUSED } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_real_image_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - unsigned int arg3 ; - char *arg4 = (char *) 0 ; + int arg2 ; + char **arg3 = (char **) 0 ; + int *arg4 = (int *) 0 ; int arg5 ; int arg6 ; int arg7 ; int arg8 ; + int arg9 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; - unsigned int val3 ; - int ecode3 = 0 ; - int res4 ; - char *buf4 = 0 ; - size_t size4 = 0 ; - int alloc4 = 0 ; + char *temp3 = 0 ; + int tempn3 ; + int val5 ; + int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; int val8 ; int ecode8 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; + int val9 ; + int ecode9 = 0 ; + PyObject *swig_obj[7] ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:cbf_handle_struct_set_real_image_sf",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg3 = &temp3; arg4 = &tempn3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_3d_image_as_string", 7, 7, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_real_image_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_3d_image_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_real_image_sf" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_3d_image_as_string" "', argument " "2"" of type '" "int""'"); } - arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_real_image_sf" "', argument " "3"" of type '" "unsigned int""'"); + arg2 = (int)(val2); + ecode5 = SWIG_AsVal_int(swig_obj[2], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_3d_image_as_string" "', argument " "5"" of type '" "int""'"); } - arg3 = (unsigned int)(val3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, &size4, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_real_image_sf" "', argument " "4"" of type '" "char *""'"); - } - arg4 = (char *)(buf4); - arg5 = (int)(size4 - 1); - ecode6 = SWIG_AsVal_int(obj4, &val6); + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[3], &val6); if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_real_image_sf" "', argument " "6"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_3d_image_as_string" "', argument " "6"" of type '" "int""'"); } arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj5, &val7); + ecode7 = SWIG_AsVal_int(swig_obj[4], &val7); if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_real_image_sf" "', argument " "7"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_3d_image_as_string" "', argument " "7"" of type '" "int""'"); } arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj6, &val8); + ecode8 = SWIG_AsVal_int(swig_obj[5], &val8); if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_real_image_sf" "', argument " "8"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_3d_image_as_string" "', argument " "8"" of type '" "int""'"); } arg8 = (int)(val8); + ecode9 = SWIG_AsVal_int(swig_obj[6], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_get_3d_image_as_string" "', argument " "9"" of type '" "int""'"); + } + arg9 = (int)(val9); { error_status=0; - cbf_handle_struct_set_real_image_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + cbf_handle_struct_get_3d_image_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -17206,95 +16557,85 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_real_image_sf(PyObject *SWIGUNU } } resultobj = SWIG_Py_Void(); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - return resultobj; -fail: - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_require_category",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); - } - arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_category" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - { - error_status=0; - cbf_handle_struct_require_category(arg1,(char const *)arg2); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } + if (*arg3) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); + free(*arg3); } - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_reciprocal_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_fs_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - double *arg2 = (double *) 0 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - double *arg5 = (double *) 0 ; - double *arg6 = (double *) 0 ; - double *arg7 = (double *) 0 ; + int arg2 ; + char **arg3 = (char **) 0 ; + int *arg4 = (int *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + int arg9 ; void *argp1 = 0 ; int res1 = 0 ; - double temp2 ; - int res2 = SWIG_TMPOBJ ; - double temp3 ; - int res3 = SWIG_TMPOBJ ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - double temp5 ; - int res5 = SWIG_TMPOBJ ; - double temp6 ; - int res6 = SWIG_TMPOBJ ; - double temp7 ; - int res7 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + int val2 ; + int ecode2 = 0 ; + char *temp3 = 0 ; + int tempn3 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int val9 ; + int ecode9 = 0 ; + PyObject *swig_obj[7] ; - arg2 = &temp2; - arg3 = &temp3; - arg4 = &temp4; - arg5 = &temp5; - arg6 = &temp6; - arg7 = &temp7; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_reciprocal_cell",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg3 = &temp3; arg4 = &tempn3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_3d_image_fs_as_string", 7, 7, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_reciprocal_cell" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_3d_image_fs_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_3d_image_fs_as_string" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode5 = SWIG_AsVal_int(swig_obj[2], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_3d_image_fs_as_string" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[3], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_3d_image_fs_as_string" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[4], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_3d_image_fs_as_string" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[5], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_3d_image_fs_as_string" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + ecode9 = SWIG_AsVal_int(swig_obj[6], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_get_3d_image_fs_as_string" "', argument " "9"" of type '" "int""'"); + } + arg9 = (int)(val9); { error_status=0; - cbf_handle_struct_get_reciprocal_cell(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + cbf_handle_struct_get_3d_image_fs_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -17302,41 +16643,9 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_reciprocal_cell(PyObject *SWIGU } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res6)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); - } else { - int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res7)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); - } else { - int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + if (*arg3) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); + free(*arg3); } return resultobj; fail: @@ -17344,46 +16653,75 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_reciprocal_cell(PyObject *SWIGU } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_reciprocal_cell_esd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_sf_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - double *arg2 = (double *) 0 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - double *arg5 = (double *) 0 ; - double *arg6 = (double *) 0 ; - double *arg7 = (double *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - double temp2 ; - int res2 = SWIG_TMPOBJ ; - double temp3 ; - int res3 = SWIG_TMPOBJ ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - double temp5 ; - int res5 = SWIG_TMPOBJ ; - double temp6 ; - int res6 = SWIG_TMPOBJ ; - double temp7 ; - int res7 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + int arg2 ; + char **arg3 = (char **) 0 ; + int *arg4 = (int *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + int arg9 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + char *temp3 = 0 ; + int tempn3 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int val9 ; + int ecode9 = 0 ; + PyObject *swig_obj[7] ; - arg2 = &temp2; - arg3 = &temp3; - arg4 = &temp4; - arg5 = &temp5; - arg6 = &temp6; - arg7 = &temp7; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_reciprocal_cell_esd",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg3 = &temp3; arg4 = &tempn3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_3d_image_sf_as_string", 7, 7, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_reciprocal_cell_esd" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_3d_image_sf_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_3d_image_sf_as_string" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode5 = SWIG_AsVal_int(swig_obj[2], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_3d_image_sf_as_string" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[3], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_3d_image_sf_as_string" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[4], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_3d_image_sf_as_string" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[5], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_3d_image_sf_as_string" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + ecode9 = SWIG_AsVal_int(swig_obj[6], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_get_3d_image_sf_as_string" "', argument " "9"" of type '" "int""'"); + } + arg9 = (int)(val9); { error_status=0; - cbf_handle_struct_get_reciprocal_cell_esd(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + cbf_handle_struct_get_3d_image_sf_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -17391,41 +16729,9 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_reciprocal_cell_esd(PyObject *S } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res6)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); - } else { - int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res7)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); - } else { - int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + if (*arg3) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); + free(*arg3); } return resultobj; fail: @@ -17433,43 +16739,67 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_reciprocal_cell_esd(PyObject *S } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_real_3d_image_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - int *arg3 = (int *) 0 ; + int arg2 ; + char **arg3 = (char **) 0 ; int *arg4 = (int *) 0 ; - int *arg5 = (int *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; - int temp3 ; - int res3 = SWIG_TMPOBJ ; - int temp4 ; - int res4 = SWIG_TMPOBJ ; - int temp5 ; - int res5 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + char *temp3 = 0 ; + int tempn3 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + PyObject *swig_obj[6] ; - arg3 = &temp3; - arg4 = &temp4; - arg5 = &temp5; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_get_3d_image_size",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg3 = &temp3; arg4 = &tempn3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_real_3d_image_as_string", 6, 6, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_3d_image_size" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_real_3d_image_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_3d_image_size" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_real_3d_image_as_string" "', argument " "2"" of type '" "int""'"); } - arg2 = (unsigned int)(val2); + arg2 = (int)(val2); + ecode5 = SWIG_AsVal_int(swig_obj[2], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_real_3d_image_as_string" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[3], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_real_3d_image_as_string" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[4], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_real_3d_image_as_string" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[5], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_real_3d_image_as_string" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); { error_status=0; - cbf_handle_struct_get_3d_image_size(arg1,arg2,arg3,arg4,arg5); + cbf_handle_struct_get_real_3d_image_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -17477,23 +16807,9 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_size(PyObject *SWIGUNU } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); + if (*arg3) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); + free(*arg3); } return resultobj; fail: @@ -17501,110 +16817,178 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_size(PyObject *SWIGUNU } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_tag_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_real_3d_image_fs_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; + int arg2 ; + char **arg3 = (char **) 0 ; + int *arg4 = (int *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; + int val2 ; + int ecode2 = 0 ; + char *temp3 = 0 ; + int tempn3 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + PyObject *swig_obj[6] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_find_tag_root",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg3 = &temp3; arg4 = &tempn3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_real_3d_image_fs_as_string", 6, 6, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_find_tag_root" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_real_3d_image_fs_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_find_tag_root" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_real_3d_image_fs_as_string" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode5 = SWIG_AsVal_int(swig_obj[2], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_real_3d_image_fs_as_string" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[3], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_real_3d_image_fs_as_string" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[4], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_real_3d_image_fs_as_string" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[5], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_real_3d_image_fs_as_string" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); { error_status=0; - result = (char *)cbf_handle_struct_find_tag_root(arg1,(char const *)arg2); + cbf_handle_struct_get_real_3d_image_fs_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_FromCharPtr((const char *)result); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + resultobj = SWIG_Py_Void(); + if (*arg3) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); + free(*arg3); + } return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_category_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_real_3d_image_sf_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; + int arg2 ; + char **arg3 = (char **) 0 ; + int *arg4 = (int *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; + int val2 ; + int ecode2 = 0 ; + char *temp3 = 0 ; + int tempn3 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + PyObject *swig_obj[6] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_require_category_root",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg3 = &temp3; arg4 = &tempn3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_real_3d_image_sf_as_string", 6, 6, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_category_root" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_real_3d_image_sf_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_category_root" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_real_3d_image_sf_as_string" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode5 = SWIG_AsVal_int(swig_obj[2], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_real_3d_image_sf_as_string" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(swig_obj[3], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_real_3d_image_sf_as_string" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[4], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_real_3d_image_sf_as_string" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[5], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_real_3d_image_sf_as_string" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); { error_status=0; - result = (char *)cbf_handle_struct_require_category_root(arg1,(char const *)arg2); + cbf_handle_struct_get_real_3d_image_sf_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_FromCharPtr((const char *)result); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + resultobj = SWIG_Py_Void(); + if (*arg3) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); + free(*arg3); + } return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_realarray_wdims_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; unsigned int arg2 ; - int arg3 ; + unsigned int arg3 ; char *arg4 = (char *) 0 ; int arg5 ; int arg6 ; int arg7 ; - char *arg8 = (char *) 0 ; + int arg8 ; int arg9 ; - int arg10 ; - int arg11 ; - int arg12 ; - int arg13 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; - int val3 ; + unsigned int val3 ; int ecode3 = 0 ; int res4 ; char *buf4 = 0 ; @@ -17614,91 +16998,57 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_realarray_wdims_sf(PyObject *SW int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; - int res8 ; - char *buf8 = 0 ; - size_t size8 = 0 ; - int alloc8 = 0 ; - int val10 ; - int ecode10 = 0 ; - int val11 ; - int ecode11 = 0 ; - int val12 ; - int ecode12 = 0 ; - int val13 ; - int ecode13 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:cbf_handle_struct_set_realarray_wdims_sf",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + int val8 ; + int ecode8 = 0 ; + int val9 ; + int ecode9 = 0 ; + PyObject *swig_obj[8] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_image", 8, 8, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_image" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_image" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "3"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_image" "', argument " "3"" of type '" "unsigned int""'"); } - arg3 = (int)(val3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, &size4, &alloc4); + arg3 = (unsigned int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "4"" of type '" "char *""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_image" "', argument " "4"" of type '" "char *""'"); } arg4 = (char *)(buf4); arg5 = (int)(size4 - 1); - ecode6 = SWIG_AsVal_int(obj4, &val6); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "6"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_image" "', argument " "6"" of type '" "int""'"); } arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj5, &val7); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "7"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_image" "', argument " "7"" of type '" "int""'"); } arg7 = (int)(val7); - res8 = SWIG_AsCharPtrAndSize(obj6, &buf8, &size8, &alloc8); - if (!SWIG_IsOK(res8)) { - SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "8"" of type '" "char *""'"); - } - arg8 = (char *)(buf8); - arg9 = (int)(size8 - 1); - ecode10 = SWIG_AsVal_int(obj7, &val10); - if (!SWIG_IsOK(ecode10)) { - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "10"" of type '" "int""'"); - } - arg10 = (int)(val10); - ecode11 = SWIG_AsVal_int(obj8, &val11); - if (!SWIG_IsOK(ecode11)) { - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "11"" of type '" "int""'"); - } - arg11 = (int)(val11); - ecode12 = SWIG_AsVal_int(obj9, &val12); - if (!SWIG_IsOK(ecode12)) { - SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "12"" of type '" "int""'"); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_image" "', argument " "8"" of type '" "int""'"); } - arg12 = (int)(val12); - ecode13 = SWIG_AsVal_int(obj10, &val13); - if (!SWIG_IsOK(ecode13)) { - SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "cbf_handle_struct_set_realarray_wdims_sf" "', argument " "13"" of type '" "int""'"); + arg8 = (int)(val8); + ecode9 = SWIG_AsVal_int(swig_obj[7], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_image" "', argument " "9"" of type '" "int""'"); } - arg13 = (int)(val13); + arg9 = (int)(val9); { error_status=0; - cbf_handle_struct_set_realarray_wdims_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13); + cbf_handle_struct_set_image(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -17707,40 +17057,89 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_realarray_wdims_sf(PyObject *SW } resultobj = SWIG_Py_Void(); if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - if (alloc8 == SWIG_NEWOBJ) free((char*)buf8); return resultobj; fail: if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - if (alloc8 == SWIG_NEWOBJ) free((char*)buf8); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_integervalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_image_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int arg2 ; + unsigned int arg2 ; + unsigned int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + int arg9 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int val9 ; + int ecode9 = 0 ; + PyObject *swig_obj[8] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_set_integervalue",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_image_fs", 8, 8, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_integervalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_image_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_integervalue" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_image_fs" "', argument " "2"" of type '" "unsigned int""'"); } - arg2 = (int)(val2); + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_image_fs" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_image_fs" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_image_fs" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_image_fs" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_image_fs" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + ecode9 = SWIG_AsVal_int(swig_obj[7], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_image_fs" "', argument " "9"" of type '" "int""'"); + } + arg9 = (int)(val9); { error_status=0; - cbf_handle_struct_set_integervalue(arg1,arg2); + cbf_handle_struct_set_image_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -17748,68 +17147,101 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_integervalue(PyObject *SWIGUNUS } } resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return resultobj; fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_category_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - char *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_category_name",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_category_name" "', argument " "1"" of type '" "cbf_handle_struct *""'"); - } - arg1 = (cbf_handle_struct *)(argp1); - { - error_status=0; - result = (char *)cbf_handle_struct_category_name(arg1); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } - } - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_typeofvalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_image_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + int arg9 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - char *result = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int val9 ; + int ecode9 = 0 ; + PyObject *swig_obj[8] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_typeofvalue",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_image_sf", 8, 8, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_typeofvalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_image_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_image_sf" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_image_sf" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_image_sf" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_image_sf" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_image_sf" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_image_sf" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + ecode9 = SWIG_AsVal_int(swig_obj[7], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_image_sf" "', argument " "9"" of type '" "int""'"); + } + arg9 = (int)(val9); { error_status=0; - result = (char *)cbf_handle_struct_get_typeofvalue(arg1); + cbf_handle_struct_set_image_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_FromCharPtr((const char *)result); + resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return resultobj; fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return NULL; } @@ -17840,47 +17272,41 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_real_image(PyObject *SWIGUNUSED int ecode7 = 0 ; int val8 ; int ecode8 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; + PyObject *swig_obj[7] ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:cbf_handle_struct_set_real_image",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_real_image", 7, 7, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_real_image" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_real_image" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_real_image" "', argument " "3"" of type '" "unsigned int""'"); } arg3 = (unsigned int)(val3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, &size4, &alloc4); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_real_image" "', argument " "4"" of type '" "char *""'"); } arg4 = (char *)(buf4); arg5 = (int)(size4 - 1); - ecode6 = SWIG_AsVal_int(obj4, &val6); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_real_image" "', argument " "6"" of type '" "int""'"); } arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj5, &val7); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_real_image" "', argument " "7"" of type '" "int""'"); } arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj6, &val8); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_real_image" "', argument " "8"" of type '" "int""'"); } @@ -17903,81 +17329,74 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_real_image(PyObject *SWIGUNUSED } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_real_image_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int arg2 ; - char **arg3 = (char **) 0 ; - int *arg4 = (int *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + char *arg4 = (char *) 0 ; int arg5 ; int arg6 ; int arg7 ; int arg8 ; - int arg9 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; - char *temp3 = 0 ; - int tempn3 ; - int val5 ; - int ecode5 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; int val8 ; int ecode8 = 0 ; - int val9 ; - int ecode9 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; + PyObject *swig_obj[7] ; - arg3 = &temp3; arg4 = &tempn3; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:cbf_handle_struct_get_3d_image_as_string",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_real_image_fs", 7, 7, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_3d_image_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_real_image_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_3d_image_as_string" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_real_image_fs" "', argument " "2"" of type '" "unsigned int""'"); } - arg2 = (int)(val2); - ecode5 = SWIG_AsVal_int(obj2, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_3d_image_as_string" "', argument " "5"" of type '" "int""'"); + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_real_image_fs" "', argument " "3"" of type '" "unsigned int""'"); } - arg5 = (int)(val5); - ecode6 = SWIG_AsVal_int(obj3, &val6); + arg3 = (unsigned int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_real_image_fs" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_3d_image_as_string" "', argument " "6"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_real_image_fs" "', argument " "6"" of type '" "int""'"); } arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj4, &val7); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_3d_image_as_string" "', argument " "7"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_real_image_fs" "', argument " "7"" of type '" "int""'"); } arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj5, &val8); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_3d_image_as_string" "', argument " "8"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_real_image_fs" "', argument " "8"" of type '" "int""'"); } arg8 = (int)(val8); - ecode9 = SWIG_AsVal_int(obj6, &val9); - if (!SWIG_IsOK(ecode9)) { - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_get_3d_image_as_string" "', argument " "9"" of type '" "int""'"); - } - arg9 = (int)(val9); { error_status=0; - cbf_handle_struct_get_3d_image_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + cbf_handle_struct_set_real_image_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -17985,66 +17404,82 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_as_string(PyObject *SW } } resultobj = SWIG_Py_Void(); - if (*arg3) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); - free(*arg3); - } + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return resultobj; fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_reference_poise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_real_image_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - double *arg2 = (double *) 0 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - double *arg5 = (double *) 0 ; - double *arg6 = (double *) 0 ; - double *arg7 = (double *) 0 ; - char *arg8 = (char *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; void *argp1 = 0 ; int res1 = 0 ; - double temp2 ; - int res2 = SWIG_TMPOBJ ; - double temp3 ; - int res3 = SWIG_TMPOBJ ; - double temp4 ; - int res4 = SWIG_TMPOBJ ; - double temp5 ; - int res5 = SWIG_TMPOBJ ; - double temp6 ; - int res6 = SWIG_TMPOBJ ; - double temp7 ; - int res7 = SWIG_TMPOBJ ; - int res8 ; - char *buf8 = 0 ; - int alloc8 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + PyObject *swig_obj[7] ; - arg2 = &temp2; - arg3 = &temp3; - arg4 = &temp4; - arg5 = &temp5; - arg6 = &temp6; - arg7 = &temp7; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_get_axis_reference_poise",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_real_image_sf", 7, 7, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_reference_poise" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_real_image_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res8 = SWIG_AsCharPtrAndSize(obj1, &buf8, NULL, &alloc8); - if (!SWIG_IsOK(res8)) { - SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "cbf_handle_struct_get_axis_reference_poise" "', argument " "8"" of type '" "char const *""'"); - } - arg8 = (char *)(buf8); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_real_image_sf" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_real_image_sf" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_real_image_sf" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_real_image_sf" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_real_image_sf" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_real_image_sf" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); { error_status=0; - cbf_handle_struct_get_axis_reference_poise(arg1,arg2,arg3,arg4,arg5,arg6,arg7,(char const *)arg8); + cbf_handle_struct_set_real_image_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -18052,66 +17487,98 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_reference_poise(PyObject * } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res6)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); - } else { - int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); - } - if (SWIG_IsTmpObj(res7)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); - } else { - int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); - } - if (alloc8 == SWIG_NEWOBJ) free((char*)buf8); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return resultobj; fail: - if (alloc8 == SWIG_NEWOBJ) free((char*)buf8); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_remove_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_3d_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + int arg9 ; + int arg10 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int val9 ; + int ecode9 = 0 ; + int val10 ; + int ecode10 = 0 ; + PyObject *swig_obj[9] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_remove_row",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_3d_image", 9, 9, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_remove_row" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + ecode9 = SWIG_AsVal_int(swig_obj[7], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "9"" of type '" "int""'"); + } + arg9 = (int)(val9); + ecode10 = SWIG_AsVal_int(swig_obj[8], &val10); + if (!SWIG_IsOK(ecode10)) { + SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "cbf_handle_struct_set_3d_image" "', argument " "10"" of type '" "int""'"); + } + arg10 = (int)(val10); { error_status=0; - cbf_handle_struct_remove_row(arg1); + cbf_handle_struct_set_3d_image(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -18119,46 +17586,98 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_remove_row(PyObject *SWIGUNUSEDPARM } } resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return resultobj; fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_overload(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_3d_image_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; unsigned int arg2 ; - double arg3 ; + unsigned int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + int arg9 ; + int arg10 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; - double val3 ; + unsigned int val3 ; int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int val9 ; + int ecode9 = 0 ; + int val10 ; + int ecode10 = 0 ; + PyObject *swig_obj[9] ; - if (!PyArg_ParseTuple(args,(char *)"OOO:cbf_handle_struct_set_overload",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_3d_image_fs", 9, 9, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_overload" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_overload" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_overload" "', argument " "3"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "3"" of type '" "unsigned int""'"); } - arg3 = (double)(val3); + arg3 = (unsigned int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + ecode9 = SWIG_AsVal_int(swig_obj[7], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "9"" of type '" "int""'"); + } + arg9 = (int)(val9); + ecode10 = SWIG_AsVal_int(swig_obj[8], &val10); + if (!SWIG_IsOK(ecode10)) { + SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "cbf_handle_struct_set_3d_image_fs" "', argument " "10"" of type '" "int""'"); + } + arg10 = (int)(val10); { error_status=0; - cbf_handle_struct_set_overload(arg1,arg2,arg3); + cbf_handle_struct_set_3d_image_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -18166,45 +17685,98 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_overload(PyObject *SWIGUNUSEDPA } } resultobj = SWIG_Py_Void(); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return resultobj; fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_image_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_3d_image_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; unsigned int arg2 ; - int *arg3 = (int *) 0 ; - int *arg4 = (int *) 0 ; + unsigned int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; + int arg8 ; + int arg9 ; + int arg10 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; - int temp3 ; - int res3 = SWIG_TMPOBJ ; - int temp4 ; - int res4 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + int val8 ; + int ecode8 = 0 ; + int val9 ; + int ecode9 = 0 ; + int val10 ; + int ecode10 = 0 ; + PyObject *swig_obj[9] ; - arg3 = &temp3; - arg4 = &temp4; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_get_image_size",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_3d_image_sf", 9, 9, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_image_size" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_image_size" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + ecode9 = SWIG_AsVal_int(swig_obj[7], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "9"" of type '" "int""'"); + } + arg9 = (int)(val9); + ecode10 = SWIG_AsVal_int(swig_obj[8], &val10); + if (!SWIG_IsOK(ecode10)) { + SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "10"" of type '" "int""'"); + } + arg10 = (int)(val10); { error_status=0; - cbf_handle_struct_get_image_size(arg1,arg2,arg3,arg4); + cbf_handle_struct_set_3d_image_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -18212,25 +17784,15 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_image_size(PyObject *SWIGUNUSED } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); - } else { - int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); - } + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return resultobj; fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_3d_image_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_real_3d_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; unsigned int arg2 ; @@ -18241,7 +17803,6 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_3d_image_sf(PyObject *SWIGUNUSE int arg7 ; int arg8 ; int arg9 ; - int arg10 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -18260,68 +17821,53 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_3d_image_sf(PyObject *SWIGUNUSE int ecode8 = 0 ; int val9 ; int ecode9 = 0 ; - int val10 ; - int ecode10 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:cbf_handle_struct_set_3d_image_sf",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + PyObject *swig_obj[8] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_real_3d_image", 8, 8, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_real_3d_image" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_real_3d_image" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "3"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_real_3d_image" "', argument " "3"" of type '" "unsigned int""'"); } arg3 = (unsigned int)(val3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, &size4, &alloc4); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "4"" of type '" "char *""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_real_3d_image" "', argument " "4"" of type '" "char *""'"); } arg4 = (char *)(buf4); arg5 = (int)(size4 - 1); - ecode6 = SWIG_AsVal_int(obj4, &val6); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "6"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_real_3d_image" "', argument " "6"" of type '" "int""'"); } arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj5, &val7); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "7"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_real_3d_image" "', argument " "7"" of type '" "int""'"); } arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj6, &val8); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "8"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_real_3d_image" "', argument " "8"" of type '" "int""'"); } arg8 = (int)(val8); - ecode9 = SWIG_AsVal_int(obj7, &val9); + ecode9 = SWIG_AsVal_int(swig_obj[7], &val9); if (!SWIG_IsOK(ecode9)) { - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "9"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_real_3d_image" "', argument " "9"" of type '" "int""'"); } arg9 = (int)(val9); - ecode10 = SWIG_AsVal_int(obj8, &val10); - if (!SWIG_IsOK(ecode10)) { - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "cbf_handle_struct_set_3d_image_sf" "', argument " "10"" of type '" "int""'"); - } - arg10 = (int)(val10); { error_status=0; - cbf_handle_struct_set_3d_image_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); + cbf_handle_struct_set_real_3d_image(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -18337,63 +17883,82 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_3d_image_sf(PyObject *SWIGUNUSE } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_real_image_sf_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_real_3d_image_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int arg2 ; - char **arg3 = (char **) 0 ; - int *arg4 = (int *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + char *arg4 = (char *) 0 ; int arg5 ; int arg6 ; int arg7 ; + int arg8 ; + int arg9 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; - char *temp3 = 0 ; - int tempn3 ; - int val5 ; - int ecode5 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; + int val8 ; + int ecode8 = 0 ; + int val9 ; + int ecode9 = 0 ; + PyObject *swig_obj[8] ; - arg3 = &temp3; arg4 = &tempn3; - if (!PyArg_ParseTuple(args,(char *)"OOOOO:cbf_handle_struct_get_real_image_sf_as_string",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_real_3d_image_fs", 8, 8, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_real_image_sf_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_real_3d_image_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_real_image_sf_as_string" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_real_3d_image_fs" "', argument " "2"" of type '" "unsigned int""'"); } - arg2 = (int)(val2); - ecode5 = SWIG_AsVal_int(obj2, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_real_image_sf_as_string" "', argument " "5"" of type '" "int""'"); + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_real_3d_image_fs" "', argument " "3"" of type '" "unsigned int""'"); } - arg5 = (int)(val5); - ecode6 = SWIG_AsVal_int(obj3, &val6); + arg3 = (unsigned int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_real_3d_image_fs" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_real_image_sf_as_string" "', argument " "6"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_real_3d_image_fs" "', argument " "6"" of type '" "int""'"); } arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj4, &val7); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_real_image_sf_as_string" "', argument " "7"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_real_3d_image_fs" "', argument " "7"" of type '" "int""'"); } arg7 = (int)(val7); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_real_3d_image_fs" "', argument " "8"" of type '" "int""'"); + } + arg8 = (int)(val8); + ecode9 = SWIG_AsVal_int(swig_obj[7], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_real_3d_image_fs" "', argument " "9"" of type '" "int""'"); + } + arg9 = (int)(val9); { error_status=0; - cbf_handle_struct_get_real_image_sf_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + cbf_handle_struct_set_real_3d_image_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -18401,82 +17966,90 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_real_image_sf_as_string(PyObjec } } resultobj = SWIG_Py_Void(); - if (*arg3) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); - free(*arg3); - } + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return resultobj; fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_image_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_real_3d_image_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int arg2 ; - char **arg3 = (char **) 0 ; - int *arg4 = (int *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + char *arg4 = (char *) 0 ; int arg5 ; int arg6 ; int arg7 ; int arg8 ; + int arg9 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; - char *temp3 = 0 ; - int tempn3 ; - int val5 ; - int ecode5 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + size_t size4 = 0 ; + int alloc4 = 0 ; int val6 ; int ecode6 = 0 ; int val7 ; int ecode7 = 0 ; int val8 ; int ecode8 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; + int val9 ; + int ecode9 = 0 ; + PyObject *swig_obj[8] ; - arg3 = &temp3; arg4 = &tempn3; - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cbf_handle_struct_get_image_as_string",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_real_3d_image_sf", 8, 8, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_image_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_real_3d_image_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_image_as_string" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_real_3d_image_sf" "', argument " "2"" of type '" "unsigned int""'"); } - arg2 = (int)(val2); - ecode5 = SWIG_AsVal_int(obj2, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_image_as_string" "', argument " "5"" of type '" "int""'"); + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_real_3d_image_sf" "', argument " "3"" of type '" "unsigned int""'"); } - arg5 = (int)(val5); - ecode6 = SWIG_AsVal_int(obj3, &val6); + arg3 = (unsigned int)(val3); + res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, &size4, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_real_3d_image_sf" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + arg5 = (int)(size4 - 1); + ecode6 = SWIG_AsVal_int(swig_obj[4], &val6); if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_image_as_string" "', argument " "6"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_real_3d_image_sf" "', argument " "6"" of type '" "int""'"); } arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj4, &val7); + ecode7 = SWIG_AsVal_int(swig_obj[5], &val7); if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_image_as_string" "', argument " "7"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_real_3d_image_sf" "', argument " "7"" of type '" "int""'"); } arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj5, &val8); + ecode8 = SWIG_AsVal_int(swig_obj[6], &val8); if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_image_as_string" "', argument " "8"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_real_3d_image_sf" "', argument " "8"" of type '" "int""'"); } arg8 = (int)(val8); + ecode9 = SWIG_AsVal_int(swig_obj[7], &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_real_3d_image_sf" "', argument " "9"" of type '" "int""'"); + } + arg9 = (int)(val9); { error_status=0; - cbf_handle_struct_get_image_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + cbf_handle_struct_set_real_3d_image_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -18484,52 +18057,43 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_image_as_string(PyObject *SWIGU } } resultobj = SWIG_Py_Void(); - if (*arg3) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); - free(*arg3); - } + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return resultobj; fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_tag_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_count_axis_ancestors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; + int *arg3 = (int *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; - int res3 ; - char *buf3 = 0 ; - int alloc3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OOO:cbf_handle_struct_set_tag_root",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg3 = &temp3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_count_axis_ancestors", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_tag_root" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_count_axis_ancestors" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_tag_root" "', argument " "2"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_count_axis_ancestors" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "cbf_handle_struct_set_tag_root" "', argument " "3"" of type '" "char const *""'"); - } - arg3 = (char *)(buf3); { error_status=0; - cbf_handle_struct_set_tag_root(arg1,(char const *)arg2,(char const *)arg3); + cbf_handle_struct_count_axis_ancestors(arg1,(char const *)arg2,arg3); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -18537,23 +18101,25 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_tag_root(PyObject *SWIGUNUSEDPA } } resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_write_widefile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_ancestor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; - int arg4 ; - int arg5 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -18561,52 +18127,35 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_write_widefile(PyObject *SWIGUNUSED int alloc2 = 0 ; int val3 ; int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; + PyObject *swig_obj[3] ; + char *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOO:cbf_handle_struct_write_widefile",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_axis_ancestor", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_write_widefile" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_ancestor" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_write_widefile" "', argument " "2"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_ancestor" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); - ecode3 = SWIG_AsVal_int(obj2, &val3); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_write_widefile" "', argument " "3"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_get_axis_ancestor" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_write_widefile" "', argument " "4"" of type '" "int""'"); - } - arg4 = (int)(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_write_widefile" "', argument " "5"" of type '" "int""'"); - } - arg5 = (int)(val5); { error_status=0; - cbf_handle_struct_write_widefile(arg1,(char const *)arg2,arg3,arg4,arg5); + result = (char *)cbf_handle_struct_get_axis_ancestor(arg1,(char const *)arg2,arg3); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); + resultobj = SWIG_FromCharPtr((const char *)result); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: @@ -18615,37 +18164,48 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_write_widefile(PyObject *SWIGUNUSED } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_count_rows(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_depends_on(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - unsigned int result; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_count_rows",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_axis_depends_on", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_count_rows" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_depends_on" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_depends_on" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); { error_status=0; - result = (unsigned int)cbf_handle_struct_count_rows(arg1); + result = (char *)cbf_handle_struct_get_axis_depends_on(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_equipment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; char *arg2 = (char *) 0 ; @@ -18654,30 +18214,30 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_datablock(PyObject *SWIGUNU int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_require_datablock",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_axis_equipment", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_equipment" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_datablock" "', argument " "2"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_equipment" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_require_datablock(arg1,(char const *)arg2); + result = (char *)cbf_handle_struct_get_axis_equipment(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); + resultobj = SWIG_FromCharPtr((const char *)result); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: @@ -18686,121 +18246,146 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_datablock(PyObject *SWIGUNU } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_integerarray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_equipment_component(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - int arg3 ; - char *arg4 = (char *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; - int arg8 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int res4 ; - char *buf4 = 0 ; - size_t size4 = 0 ; - int alloc4 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - int val8 ; - int ecode8 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:cbf_handle_struct_set_integerarray",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_axis_equipment_component", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_integerarray" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_equipment_component" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_integerarray" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_integerarray" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, &size4, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_integerarray" "', argument " "4"" of type '" "char *""'"); - } - arg4 = (char *)(buf4); - arg5 = (int)(size4 - 1); - ecode6 = SWIG_AsVal_int(obj4, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_integerarray" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj5, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_integerarray" "', argument " "7"" of type '" "int""'"); - } - arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj6, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_integerarray" "', argument " "8"" of type '" "int""'"); - } - arg8 = (int)(val8); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_equipment_component" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_set_integerarray(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + result = (char *)cbf_handle_struct_get_axis_equipment_component(arg1,(char const *)arg2); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); + return NULL; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; + + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_axis_offset", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_offset" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_offset" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + error_status=0; + cbf_handle_struct_get_axis_offset(arg1,(char const *)arg2,arg3,arg4,arg5); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_new_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_rotation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; char *arg2 = (char *) 0 ; + double *arg3 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_new_datablock",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg3 = &temp3; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_axis_rotation", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_new_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_rotation" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_new_datablock" "', argument " "2"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_rotation" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_new_datablock(arg1,(char const *)arg2); + cbf_handle_struct_get_axis_rotation(arg1,(char const *)arg2,arg3); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -18808,6 +18393,12 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_new_datablock(PyObject *SWIGUNUSEDP } } resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: @@ -18816,123 +18407,80 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_new_datablock(PyObject *SWIGUNUSEDP } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_datestamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_rotation_axis(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int arg2 ; - int arg3 ; - int arg4 ; - int arg5 ; - int arg6 ; - double arg7 ; - int arg8 ; - double arg9 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - int val6 ; - int ecode6 = 0 ; - double val7 ; - int ecode7 = 0 ; - int val8 ; - int ecode8 = 0 ; - double val9 ; - int ecode9 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:cbf_handle_struct_set_datestamp",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_axis_rotation_axis", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_rotation_axis" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "4"" of type '" "int""'"); - } - arg4 = (int)(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "5"" of type '" "int""'"); - } - arg5 = (int)(val5); - ecode6 = SWIG_AsVal_int(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_double(obj6, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "7"" of type '" "double""'"); - } - arg7 = (double)(val7); - ecode8 = SWIG_AsVal_int(obj7, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "8"" of type '" "int""'"); - } - arg8 = (int)(val8); - ecode9 = SWIG_AsVal_double(obj8, &val9); - if (!SWIG_IsOK(ecode9)) { - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_datestamp" "', argument " "9"" of type '" "double""'"); - } - arg9 = (double)(val9); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_rotation_axis" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_set_datestamp(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + result = (char *)cbf_handle_struct_get_axis_rotation_axis(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_next_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_setting(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + char *arg2 = (char *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_next_row",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg3 = &temp3; + arg4 = &temp4; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_axis_setting", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_next_row" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_setting" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_setting" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_next_row(arg1); + cbf_handle_struct_get_axis_setting(arg1,(char const *)arg2,arg3,arg4); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -18940,66 +18488,68 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_next_row(PyObject *SWIGUNUSEDPARM(s } } resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_category_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; - int res3 ; - char *buf3 = 0 ; - int alloc3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; + PyObject *swig_obj[2] ; + char *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOO:cbf_handle_struct_set_category_root",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_axis_type", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_category_root" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_type" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_category_root" "', argument " "2"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_type" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "cbf_handle_struct_set_category_root" "', argument " "3"" of type '" "char const *""'"); - } - arg3 = (char *)(buf3); { error_status=0; - cbf_handle_struct_set_category_root(arg1,(char const *)arg2,(char const *)arg3); + result = (char *)cbf_handle_struct_get_axis_type(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); + resultobj = SWIG_FromCharPtr((const char *)result); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; char *arg2 = (char *) 0 ; @@ -19017,26 +18567,25 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_offset(PyObject *SWIGUNUSE int res4 = SWIG_TMPOBJ ; double temp5 ; int res5 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + PyObject *swig_obj[2] ; arg3 = &temp3; arg4 = &temp4; arg5 = &temp5; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_get_axis_offset",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_axis_vector", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_offset" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_vector" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_offset" "', argument " "2"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_vector" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_get_axis_offset(arg1,(char const *)arg2,arg3,arg4,arg5); + cbf_handle_struct_get_axis_vector(arg1,(char const *)arg2,arg3,arg4,arg5); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -19070,126 +18619,47 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_offset(PyObject *SWIGUNUSE } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_pixel_size_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - unsigned int arg3 ; - double arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - unsigned int val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:cbf_handle_struct_set_pixel_size_fs",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_pixel_size_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); - } - arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_pixel_size_fs" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_pixel_size_fs" "', argument " "3"" of type '" "unsigned int""'"); - } - arg3 = (unsigned int)(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_pixel_size_fs" "', argument " "4"" of type '" "double""'"); - } - arg4 = (double)(val4); - { - error_status=0; - cbf_handle_struct_set_pixel_size_fs(arg1,arg2,arg3,arg4); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_handle_struct_insert_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_insert_row",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_insert_row" "', argument " "1"" of type '" "cbf_handle_struct *""'"); - } - arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_insert_row" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); - { - error_status=0; - cbf_handle_struct_insert_row(arg1,arg2); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_handle_struct_new_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_axis_setting(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; char *arg2 = (char *) 0 ; + double arg3 ; + double arg4 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject *swig_obj[4] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_new_column",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_axis_setting", 4, 4, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_new_column" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_axis_setting" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_new_column" "', argument " "2"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_axis_setting" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_axis_setting" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_axis_setting" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); { error_status=0; - cbf_handle_struct_new_column(arg1,(char const *)arg2); + cbf_handle_struct_set_axis_setting(arg1,(char const *)arg2,arg3,arg4); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -19205,209 +18675,114 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_new_column(PyObject *SWIGUNUSEDPARM } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_real_3d_image_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_construct_goniometer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int arg2 ; - char **arg3 = (char **) 0 ; - int *arg4 = (int *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; - int arg8 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - char *temp3 = 0 ; - int tempn3 ; - int val5 ; - int ecode5 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - int val8 ; - int ecode8 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; + PyObject *swig_obj[1] ; + cbf_goniometer result; - arg3 = &temp3; arg4 = &tempn3; - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cbf_handle_struct_get_real_3d_image_as_string",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_real_3d_image_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_construct_goniometer" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_real_3d_image_as_string" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - ecode5 = SWIG_AsVal_int(obj2, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_real_3d_image_as_string" "', argument " "5"" of type '" "int""'"); - } - arg5 = (int)(val5); - ecode6 = SWIG_AsVal_int(obj3, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_real_3d_image_as_string" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj4, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_real_3d_image_as_string" "', argument " "7"" of type '" "int""'"); - } - arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj5, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_real_3d_image_as_string" "', argument " "8"" of type '" "int""'"); - } - arg8 = (int)(val8); { error_status=0; - cbf_handle_struct_get_real_3d_image_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + result = (cbf_goniometer)cbf_handle_struct_construct_goniometer(arg1); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); - if (*arg3) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); - free(*arg3); - } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integration_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_construct_detector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - double *arg2 = (double *) 0 ; + unsigned int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - double temp2 ; - int res2 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + cbf_detector result; - arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_integration_time",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_construct_detector", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_integration_time" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_construct_detector" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_construct_detector" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); { error_status=0; - cbf_handle_struct_get_integration_time(arg1,arg2); + result = (cbf_detector)cbf_handle_struct_construct_detector(arg1,arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); - } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_realarray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_construct_reference_detector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; unsigned int arg2 ; - int arg3 ; - char *arg4 = (char *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int res4 ; - char *buf4 = 0 ; - size_t size4 = 0 ; - int alloc4 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; + PyObject *swig_obj[2] ; + cbf_detector result; - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cbf_handle_struct_set_realarray",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_construct_reference_detector", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_realarray" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_construct_reference_detector" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_realarray" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_construct_reference_detector" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_realarray" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, &size4, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_realarray" "', argument " "4"" of type '" "char *""'"); - } - arg4 = (char *)(buf4); - arg5 = (int)(size4 - 1); - ecode6 = SWIG_AsVal_int(obj4, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_realarray" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj5, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_realarray" "', argument " "7"" of type '" "int""'"); - } - arg7 = (int)(val7); { error_status=0; - cbf_handle_struct_set_realarray(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + result = (cbf_detector)cbf_handle_struct_construct_reference_detector(arg1,arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); return resultobj; fail: - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_element_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_reference_detector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; unsigned int arg2 ; @@ -19415,121 +18790,78 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_element_id(PyObject *SWIGUNUSED int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; + PyObject *swig_obj[2] ; + cbf_detector result; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_get_element_id",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_require_reference_detector", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_element_id" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_reference_detector" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_element_id" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_require_reference_detector" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); { error_status=0; - result = (char *)cbf_handle_struct_get_element_id(arg1,arg2); + result = (cbf_detector)cbf_handle_struct_require_reference_detector(arg1,arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_FromCharPtr((const char *)result); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_detector_struct, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_image_sf_as_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_construct_positioner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int arg2 ; - char **arg3 = (char **) 0 ; - int *arg4 = (int *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; - int arg8 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - char *temp3 = 0 ; - int tempn3 ; - int val5 ; - int ecode5 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - int val8 ; - int ecode8 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject *swig_obj[2] ; + cbf_positioner result; - arg3 = &temp3; arg4 = &tempn3; - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:cbf_handle_struct_get_image_sf_as_string",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_construct_positioner", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_image_sf_as_string" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_construct_positioner" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_image_sf_as_string" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - ecode5 = SWIG_AsVal_int(obj2, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_get_image_sf_as_string" "', argument " "5"" of type '" "int""'"); - } - arg5 = (int)(val5); - ecode6 = SWIG_AsVal_int(obj3, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_get_image_sf_as_string" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj4, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_get_image_sf_as_string" "', argument " "7"" of type '" "int""'"); - } - arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj5, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_get_image_sf_as_string" "', argument " "8"" of type '" "int""'"); - } - arg8 = (int)(val8); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_construct_positioner" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); { error_status=0; - cbf_handle_struct_get_image_sf_as_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + result = (cbf_positioner)cbf_handle_struct_construct_positioner(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_Py_Void(); - if (*arg3) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg3,*arg4)); - free(*arg3); - } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_positioner_struct, 0 | 0 ); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_construct_positioner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_construct_reference_positioner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; char *arg2 = (char *) 0 ; @@ -19538,24 +18870,23 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_construct_positioner(PyObject *SWIG int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + PyObject *swig_obj[2] ; cbf_positioner result; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_construct_positioner",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_construct_reference_positioner", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_construct_positioner" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_construct_reference_positioner" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_construct_positioner" "', argument " "2"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_construct_reference_positioner" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); { error_status=0; - result = (cbf_positioner)cbf_handle_struct_construct_positioner(arg1,(char const *)arg2); + result = (cbf_positioner)cbf_handle_struct_construct_reference_positioner(arg1,(char const *)arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -19571,43 +18902,42 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_construct_positioner(PyObject *SWIG } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_size_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_pixel_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; unsigned int arg2 ; - int *arg3 = (int *) 0 ; - int *arg4 = (int *) 0 ; - int *arg5 = (int *) 0 ; + unsigned int arg3 ; + double *arg4 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; - int temp3 ; - int res3 = SWIG_TMPOBJ ; - int temp4 ; + unsigned int val3 ; + int ecode3 = 0 ; + double temp4 ; int res4 = SWIG_TMPOBJ ; - int temp5 ; - int res5 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + PyObject *swig_obj[3] ; - arg3 = &temp3; arg4 = &temp4; - arg5 = &temp5; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_get_3d_image_size_fs",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_pixel_size", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_3d_image_size_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_pixel_size" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_3d_image_size_fs" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_pixel_size" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_get_pixel_size" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); { error_status=0; - cbf_handle_struct_get_3d_image_size_fs(arg1,arg2,arg3,arg4,arg5); + cbf_handle_struct_get_pixel_size(arg1,arg2,arg3,arg4); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -19615,23 +18945,11 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_size_fs(PyObject *SWIG } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); - } else { - int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); - } if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); } else { int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); - } else { - int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); } return resultobj; fail: @@ -19639,32 +18957,42 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_3d_image_size_fs(PyObject *SWIG } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_pixel_size_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + double *arg4 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[3] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_set_value",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg4 = &temp4; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_pixel_size_fs", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_value" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_pixel_size_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_value" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_pixel_size_fs" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_get_pixel_size_fs" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); { error_status=0; - cbf_handle_struct_set_value(arg1,(char const *)arg2); + cbf_handle_struct_get_pixel_size_fs(arg1,arg2,arg3,arg4); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -19672,39 +19000,54 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_value(PyObject *SWIGUNUSEDPARM( } } resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_current_timestamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_pixel_size_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int arg2 ; + unsigned int arg2 ; + unsigned int arg3 ; + double *arg4 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[3] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_set_current_timestamp",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg4 = &temp4; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_pixel_size_sf", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_current_timestamp" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_pixel_size_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_current_timestamp" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_pixel_size_sf" "', argument " "2"" of type '" "unsigned int""'"); } - arg2 = (int)(val2); + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_get_pixel_size_sf" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); { error_status=0; - cbf_handle_struct_set_current_timestamp(arg1,arg2); + cbf_handle_struct_get_pixel_size_sf(arg1,arg2,arg3,arg4); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -19712,41 +19055,58 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_current_timestamp(PyObject *SWI } } resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_doublevalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_pixel_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - double *arg2 = (double *) 0 ; - double arg3 ; + unsigned int arg2 ; + unsigned int arg3 ; + double arg4 ; void *argp1 = 0 ; int res1 = 0 ; - double temp2 ; - int res2 = SWIG_TMPOBJ ; - double val3 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject *swig_obj[4] ; - arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_require_doublevalue",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_pixel_size", 4, 4, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_doublevalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_pixel_size" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode3 = SWIG_AsVal_double(obj1, &val3); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_pixel_size" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_require_doublevalue" "', argument " "3"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_pixel_size" "', argument " "3"" of type '" "unsigned int""'"); } - arg3 = (double)(val3); + arg3 = (unsigned int)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_pixel_size" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); { error_status=0; - cbf_handle_struct_require_doublevalue(arg1,arg2,arg3); + cbf_handle_struct_set_pixel_size(arg1,arg2,arg3,arg4); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -19754,34 +19114,52 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_doublevalue(PyObject *SWIGU } } resultobj = SWIG_Py_Void(); - if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); - } else { - int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); - } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_rewind_datablock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_pixel_size_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + double arg4 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject *swig_obj[4] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_rewind_datablock",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_pixel_size_fs", 4, 4, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_rewind_datablock" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_pixel_size_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_pixel_size_fs" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_pixel_size_fs" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_pixel_size_fs" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); { error_status=0; - cbf_handle_struct_rewind_datablock(arg1); + cbf_handle_struct_set_pixel_size_fs(arg1,arg2,arg3,arg4); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -19795,106 +19173,190 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_rewind_datablock(PyObject *SWIGUNUS } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_require_column_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_pixel_size_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + double arg4 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int res3 ; - char *buf3 = 0 ; - int alloc3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char *result = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject *swig_obj[4] ; - if (!PyArg_ParseTuple(args,(char *)"OOO:cbf_handle_struct_require_column_value",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_pixel_size_sf", 4, 4, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_require_column_value" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_pixel_size_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_require_column_value" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "cbf_handle_struct_require_column_value" "', argument " "3"" of type '" "char const *""'"); - } - arg3 = (char *)(buf3); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_pixel_size_sf" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_pixel_size_sf" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = (unsigned int)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_pixel_size_sf" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); { error_status=0; - result = (char *)cbf_handle_struct_require_column_value(arg1,(char const *)arg2,(char const *)arg3); + cbf_handle_struct_set_pixel_size_sf(arg1,arg2,arg3,arg4); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_FromCharPtr((const char *)result); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + resultobj = SWIG_Py_Void(); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_dictionary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_unit_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + double *arg7 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; - cbf_handle result; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_dictionary",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_dictionary" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_unit_cell" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - result = (cbf_handle)cbf_handle_struct_get_dictionary(arg1); + cbf_handle_struct_get_unit_cell(arg1,arg2,arg3,arg4,arg5,arg6,arg7); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_reset_saveframe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_unit_cell_esd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + double *arg7 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_reset_saveframe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_reset_saveframe" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_unit_cell_esd" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - cbf_handle_struct_reset_saveframe(arg1); + cbf_handle_struct_get_unit_cell_esd(arg1,arg2,arg3,arg4,arg5,arg6,arg7); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -19902,39 +19364,74 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_reset_saveframe(PyObject *SWIGUNUSE } } resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_reciprocal_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_unit_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; double *arg2 ; void *argp1 = 0 ; int res1 = 0 ; double temp2[6] ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_set_reciprocal_cell",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_unit_cell", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_reciprocal_cell" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_unit_cell" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { - if (obj1 == Py_None) arg2 = NULL; + if (swig_obj[1] == Py_None) arg2 = NULL; else - if (!convert_darray(obj1,temp2,6)) { + if (!convert_darray(swig_obj[1],temp2,6)) { return NULL; } arg2 = &temp2[0]; } { error_status=0; - cbf_handle_struct_set_reciprocal_cell(arg1,arg2); + cbf_handle_struct_set_unit_cell(arg1,arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -19948,33 +19445,32 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_reciprocal_cell(PyObject *SWIGU } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_reciprocal_cell_esd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_unit_cell_esd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; double *arg2 ; void *argp1 = 0 ; int res1 = 0 ; double temp2[6] ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_set_reciprocal_cell_esd",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_unit_cell_esd", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_reciprocal_cell_esd" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_unit_cell_esd" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { - if (obj1 == Py_None) arg2 = NULL; + if (swig_obj[1] == Py_None) arg2 = NULL; else - if (!convert_darray(obj1,temp2,6)) { + if (!convert_darray(swig_obj[1],temp2,6)) { return NULL; } arg2 = &temp2[0]; } { error_status=0; - cbf_handle_struct_set_reciprocal_cell_esd(arg1,arg2); + cbf_handle_struct_set_unit_cell_esd(arg1,arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -19988,89 +19484,47 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_reciprocal_cell_esd(PyObject *S } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_real_3d_image_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_reciprocal_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - unsigned int arg3 ; - char *arg4 = (char *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; - int arg8 ; - int arg9 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + double *arg7 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - unsigned int val3 ; - int ecode3 = 0 ; - int res4 ; - char *buf4 = 0 ; - size_t size4 = 0 ; - int alloc4 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - int val8 ; - int ecode8 = 0 ; - int val9 ; - int ecode9 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cbf_handle_struct_set_real_3d_image_fs",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_real_3d_image_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_reciprocal_cell" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_real_3d_image_fs" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_real_3d_image_fs" "', argument " "3"" of type '" "unsigned int""'"); - } - arg3 = (unsigned int)(val3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, &size4, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_real_3d_image_fs" "', argument " "4"" of type '" "char *""'"); - } - arg4 = (char *)(buf4); - arg5 = (int)(size4 - 1); - ecode6 = SWIG_AsVal_int(obj4, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_real_3d_image_fs" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj5, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_real_3d_image_fs" "', argument " "7"" of type '" "int""'"); - } - arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj6, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_real_3d_image_fs" "', argument " "8"" of type '" "int""'"); - } - arg8 = (int)(val8); - ecode9 = SWIG_AsVal_int(obj7, &val9); - if (!SWIG_IsOK(ecode9)) { - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_real_3d_image_fs" "', argument " "9"" of type '" "int""'"); - } - arg9 = (int)(val9); { error_status=0; - cbf_handle_struct_set_real_3d_image_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + cbf_handle_struct_get_reciprocal_cell(arg1,arg2,arg3,arg4,arg5,arg6,arg7); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -20078,151 +19532,72 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_real_3d_image_fs(PyObject *SWIG } } resultobj = SWIG_Py_Void(); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - return resultobj; -fail: - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_doublevalue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; - double arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:cbf_handle_struct_set_doublevalue",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_doublevalue" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); } - arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_set_doublevalue" "', argument " "2"" of type '" "char const *""'"); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); } - arg2 = (char *)(buf2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_doublevalue" "', argument " "3"" of type '" "double""'"); - } - arg3 = (double)(val3); - { - error_status=0; - cbf_handle_struct_set_doublevalue(arg1,(char const *)arg2,arg3); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); } - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_find_category",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_find_category" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); } - arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_find_category" "', argument " "2"" of type '" "char const *""'"); + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); } - arg2 = (char *)(buf2); - { - error_status=0; - cbf_handle_struct_find_category(arg1,(char const *)arg2); - if (error_status){ - get_error_message(); - PyErr_SetString(PyExc_Exception,error_message); - return NULL; - } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); } - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarrayparameters_wdims_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_reciprocal_cell_esd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - int *arg2 = (int *) 0 ; - int *arg3 = (int *) 0 ; - int *arg4 = (int *) 0 ; - int *arg5 = (int *) 0 ; - int *arg6 = (int *) 0 ; - int *arg7 = (int *) 0 ; - int *arg8 = (int *) 0 ; - int *arg9 = (int *) 0 ; - char **arg10 = (char **) 0 ; - int *arg11 = (int *) 0 ; - int *arg12 = (int *) 0 ; - int *arg13 = (int *) 0 ; - int *arg14 = (int *) 0 ; - int *arg15 = (int *) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + double *arg7 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int temp2 ; + double temp2 ; int res2 = SWIG_TMPOBJ ; - int temp3 ; + double temp3 ; int res3 = SWIG_TMPOBJ ; - int temp4 ; + double temp4 ; int res4 = SWIG_TMPOBJ ; - int temp5 ; + double temp5 ; int res5 = SWIG_TMPOBJ ; - int temp6 ; + double temp6 ; int res6 = SWIG_TMPOBJ ; - int temp7 ; + double temp7 ; int res7 = SWIG_TMPOBJ ; - int temp8 ; - int res8 = SWIG_TMPOBJ ; - int temp9 ; - int res9 = SWIG_TMPOBJ ; - char *temp10 = 0 ; - int tempn10 ; - int temp12 ; - int res12 = SWIG_TMPOBJ ; - int temp13 ; - int res13 = SWIG_TMPOBJ ; - int temp14 ; - int res14 = SWIG_TMPOBJ ; - int temp15 ; - int res15 = SWIG_TMPOBJ ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; arg2 = &temp2; arg3 = &temp3; @@ -20230,22 +19605,16 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarrayparameters_wdims_fs arg5 = &temp5; arg6 = &temp6; arg7 = &temp7; - arg8 = &temp8; - arg9 = &temp9; - arg10 = &temp10; arg11 = &tempn10; - arg12 = &temp12; - arg13 = &temp13; - arg14 = &temp14; - arg15 = &temp15; - if (!PyArg_ParseTuple(args,(char *)"O:cbf_handle_struct_get_integerarrayparameters_wdims_fs",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_integerarrayparameters_wdims_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_reciprocal_cell_esd" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); { error_status=0; - cbf_handle_struct_get_integerarrayparameters_wdims_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15); + cbf_handle_struct_get_reciprocal_cell_esd(arg1,arg2,arg3,arg4,arg5,arg6,arg7); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -20254,80 +19623,40 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarrayparameters_wdims_fs } resultobj = SWIG_Py_Void(); if (SWIG_IsTmpObj(res2)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); } else { int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); } if (SWIG_IsTmpObj(res3)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); } else { int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); } if (SWIG_IsTmpObj(res4)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4))); + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); } else { int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); } if (SWIG_IsTmpObj(res5)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5))); + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); } else { int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); } if (SWIG_IsTmpObj(res6)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6))); + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); } else { int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags)); + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); } if (SWIG_IsTmpObj(res7)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7))); + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); } else { int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res8)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8))); - } else { - int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res9)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9))); - } else { - int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags)); - } - if (*arg10) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(*arg10,*arg11)); - free(*arg10); - } - if (SWIG_IsTmpObj(res12)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg12))); - } else { - int new_flags = SWIG_IsNewObj(res12) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg12), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res13)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg13))); - } else { - int new_flags = SWIG_IsNewObj(res13) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg13), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res14)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg14))); - } else { - int new_flags = SWIG_IsNewObj(res14) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg14), SWIGTYPE_p_int, new_flags)); - } - if (SWIG_IsTmpObj(res15)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg15))); - } else { - int new_flags = SWIG_IsNewObj(res15) ? (SWIG_POINTER_OWN | 0 ) : 0 ; - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg15), SWIGTYPE_p_int, new_flags)); + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); } return resultobj; fail: @@ -20335,120 +19664,32 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_integerarrayparameters_wdims_fs } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_realarray_wdims_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_reciprocal_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - int arg3 ; - char *arg4 = (char *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; - char *arg8 = (char *) 0 ; - int arg9 ; - int arg10 ; - int arg11 ; - int arg12 ; - int arg13 ; + double *arg2 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int res4 ; - char *buf4 = 0 ; - size_t size4 = 0 ; - int alloc4 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - int res8 ; - char *buf8 = 0 ; - size_t size8 = 0 ; - int alloc8 = 0 ; - int val10 ; - int ecode10 = 0 ; - int val11 ; - int ecode11 = 0 ; - int val12 ; - int ecode12 = 0 ; - int val13 ; - int ecode13 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:cbf_handle_struct_set_realarray_wdims_fs",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + double temp2[6] ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_reciprocal_cell", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_reciprocal_cell" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, &size4, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "4"" of type '" "char *""'"); - } - arg4 = (char *)(buf4); - arg5 = (int)(size4 - 1); - ecode6 = SWIG_AsVal_int(obj4, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj5, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "7"" of type '" "int""'"); - } - arg7 = (int)(val7); - res8 = SWIG_AsCharPtrAndSize(obj6, &buf8, &size8, &alloc8); - if (!SWIG_IsOK(res8)) { - SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "8"" of type '" "char *""'"); - } - arg8 = (char *)(buf8); - arg9 = (int)(size8 - 1); - ecode10 = SWIG_AsVal_int(obj7, &val10); - if (!SWIG_IsOK(ecode10)) { - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "10"" of type '" "int""'"); - } - arg10 = (int)(val10); - ecode11 = SWIG_AsVal_int(obj8, &val11); - if (!SWIG_IsOK(ecode11)) { - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "11"" of type '" "int""'"); - } - arg11 = (int)(val11); - ecode12 = SWIG_AsVal_int(obj9, &val12); - if (!SWIG_IsOK(ecode12)) { - SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "12"" of type '" "int""'"); - } - arg12 = (int)(val12); - ecode13 = SWIG_AsVal_int(obj10, &val13); - if (!SWIG_IsOK(ecode13)) { - SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "cbf_handle_struct_set_realarray_wdims_fs" "', argument " "13"" of type '" "int""'"); - } - arg13 = (int)(val13); + { + if (swig_obj[1] == Py_None) arg2 = NULL; + else + if (!convert_darray(swig_obj[1],temp2,6)) { + return NULL; + } + arg2 = &temp2[0]; + } { error_status=0; - cbf_handle_struct_set_realarray_wdims_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13); + cbf_handle_struct_set_reciprocal_cell(arg1,arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -20456,181 +19697,104 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_realarray_wdims_fs(PyObject *SW } } resultobj = SWIG_Py_Void(); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - if (alloc8 == SWIG_NEWOBJ) free((char*)buf8); return resultobj; fail: - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - if (alloc8 == SWIG_NEWOBJ) free((char*)buf8); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_find_category_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_reciprocal_cell_esd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; + double *arg2 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; + double temp2[6] ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_find_category_root",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_reciprocal_cell_esd", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_find_category_root" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_reciprocal_cell_esd" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_find_category_root" "', argument " "2"" of type '" "char const *""'"); + { + if (swig_obj[1] == Py_None) arg2 = NULL; + else + if (!convert_darray(swig_obj[1],temp2,6)) { + return NULL; + } + arg2 = &temp2[0]; } - arg2 = (char *)(buf2); { error_status=0; - result = (char *)cbf_handle_struct_find_category_root(arg1,(char const *)arg2); + cbf_handle_struct_set_reciprocal_cell_esd(arg1,arg2); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_FromCharPtr((const char *)result); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + resultobj = SWIG_Py_Void(); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_integerarray_wdims_fs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_orientation_matrix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - int arg3 ; - char *arg4 = (char *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; - int arg8 ; - char *arg9 = (char *) 0 ; - int arg10 ; - int arg11 ; - int arg12 ; - int arg13 ; - int arg14 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + double *arg7 = (double *) 0 ; + double *arg8 = (double *) 0 ; + double *arg9 = (double *) 0 ; + double *arg10 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int res4 ; - char *buf4 = 0 ; - size_t size4 = 0 ; - int alloc4 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - int val8 ; - int ecode8 = 0 ; - int res9 ; - char *buf9 = 0 ; - size_t size9 = 0 ; - int alloc9 = 0 ; - int val11 ; - int ecode11 = 0 ; - int val12 ; - int ecode12 = 0 ; - int val13 ; - int ecode13 = 0 ; - int val14 ; - int ecode14 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - PyObject * obj9 = 0 ; - PyObject * obj10 = 0 ; - PyObject * obj11 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOO:cbf_handle_struct_set_integerarray_wdims_fs",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + double temp8 ; + int res8 = SWIG_TMPOBJ ; + double temp9 ; + int res9 = SWIG_TMPOBJ ; + double temp10 ; + int res10 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + arg8 = &temp8; + arg9 = &temp9; + arg10 = &temp10; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_orientation_matrix" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, &size4, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "4"" of type '" "char *""'"); - } - arg4 = (char *)(buf4); - arg5 = (int)(size4 - 1); - ecode6 = SWIG_AsVal_int(obj4, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj5, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "7"" of type '" "int""'"); - } - arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj6, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "8"" of type '" "int""'"); - } - arg8 = (int)(val8); - res9 = SWIG_AsCharPtrAndSize(obj7, &buf9, &size9, &alloc9); - if (!SWIG_IsOK(res9)) { - SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "9"" of type '" "char *""'"); - } - arg9 = (char *)(buf9); - arg10 = (int)(size9 - 1); - ecode11 = SWIG_AsVal_int(obj8, &val11); - if (!SWIG_IsOK(ecode11)) { - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "11"" of type '" "int""'"); - } - arg11 = (int)(val11); - ecode12 = SWIG_AsVal_int(obj9, &val12); - if (!SWIG_IsOK(ecode12)) { - SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "12"" of type '" "int""'"); - } - arg12 = (int)(val12); - ecode13 = SWIG_AsVal_int(obj10, &val13); - if (!SWIG_IsOK(ecode13)) { - SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "13"" of type '" "int""'"); - } - arg13 = (int)(val13); - ecode14 = SWIG_AsVal_int(obj11, &val14); - if (!SWIG_IsOK(ecode14)) { - SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "cbf_handle_struct_set_integerarray_wdims_fs" "', argument " "14"" of type '" "int""'"); - } - arg14 = (int)(val14); { error_status=0; - cbf_handle_struct_set_integerarray_wdims_fs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14); + cbf_handle_struct_get_orientation_matrix(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -20638,99 +19802,154 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_integerarray_wdims_fs(PyObject } } resultobj = SWIG_Py_Void(); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - if (alloc9 == SWIG_NEWOBJ) free((char*)buf9); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res8)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg8))); + } else { + int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res9)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg9))); + } else { + int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res10)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg10))); + } else { + int new_flags = SWIG_IsNewObj(res10) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg10), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - if (alloc9 == SWIG_NEWOBJ) free((char*)buf9); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_image_sf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_orientation_matrix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - unsigned int arg2 ; - unsigned int arg3 ; - char *arg4 = (char *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; - int arg8 ; - int arg9 ; + double arg2 ; + double arg3 ; + double arg4 ; + double arg5 ; + double arg6 ; + double arg7 ; + double arg8 ; + double arg9 ; + double arg10 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + double val2 ; int ecode2 = 0 ; - unsigned int val3 ; + double val3 ; int ecode3 = 0 ; - int res4 ; - char *buf4 = 0 ; - size_t size4 = 0 ; - int alloc4 = 0 ; - int val6 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double val6 ; int ecode6 = 0 ; - int val7 ; + double val7 ; int ecode7 = 0 ; - int val8 ; + double val8 ; int ecode8 = 0 ; - int val9 ; + double val9 ; int ecode9 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:cbf_handle_struct_set_image_sf",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + double val10 ; + int ecode10 = 0 ; + PyObject *swig_obj[10] ; + + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_orientation_matrix", 10, 10, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_image_sf" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_image_sf" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "2"" of type '" "double""'"); } - arg2 = (unsigned int)(val2); - ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); + arg2 = (double)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_image_sf" "', argument " "3"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "3"" of type '" "double""'"); } - arg3 = (unsigned int)(val3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, &size4, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cbf_handle_struct_set_image_sf" "', argument " "4"" of type '" "char *""'"); - } - arg4 = (char *)(buf4); - arg5 = (int)(size4 - 1); - ecode6 = SWIG_AsVal_int(obj4, &val6); + arg3 = (double)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); + ecode5 = SWIG_AsVal_double(swig_obj[4], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "5"" of type '" "double""'"); + } + arg5 = (double)(val5); + ecode6 = SWIG_AsVal_double(swig_obj[5], &val6); if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_image_sf" "', argument " "6"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "6"" of type '" "double""'"); } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(obj5, &val7); + arg6 = (double)(val6); + ecode7 = SWIG_AsVal_double(swig_obj[6], &val7); if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_image_sf" "', argument " "7"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "7"" of type '" "double""'"); } - arg7 = (int)(val7); - ecode8 = SWIG_AsVal_int(obj6, &val8); + arg7 = (double)(val7); + ecode8 = SWIG_AsVal_double(swig_obj[7], &val8); if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_image_sf" "', argument " "8"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "8"" of type '" "double""'"); } - arg8 = (int)(val8); - ecode9 = SWIG_AsVal_int(obj7, &val9); + arg8 = (double)(val8); + ecode9 = SWIG_AsVal_double(swig_obj[8], &val9); if (!SWIG_IsOK(ecode9)) { - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_image_sf" "', argument " "9"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "9"" of type '" "double""'"); } - arg9 = (int)(val9); + arg9 = (double)(val9); + ecode10 = SWIG_AsVal_double(swig_obj[9], &val10); + if (!SWIG_IsOK(ecode10)) { + SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "cbf_handle_struct_set_orientation_matrix" "', argument " "10"" of type '" "double""'"); + } + arg10 = (double)(val10); { error_status=0; - cbf_handle_struct_set_image_sf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + cbf_handle_struct_set_orientation_matrix(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -20738,83 +19957,192 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_image_sf(PyObject *SWIGUNUSEDPA } } resultobj = SWIG_Py_Void(); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return resultobj; fail: - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_equipment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_bin_sizes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - char *arg2 = (char *) 0 ; + int arg2 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *result = 0 ; + int val2 ; + int ecode2 = 0 ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_get_axis_equipment",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg3 = &temp3; + arg4 = &temp4; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_bin_sizes", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_equipment" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_bin_sizes" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cbf_handle_struct_get_axis_equipment" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_bin_sizes" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); { error_status=0; - result = (char *)cbf_handle_struct_get_axis_equipment(arg1,(char const *)arg2); + cbf_handle_struct_get_bin_sizes(arg1,arg2,arg3,arg4); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); return NULL; } } - resultobj = SWIG_FromCharPtr((const char *)result); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_unit_cell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_bin_sizes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - double *arg2 ; + int arg2 ; + double arg3 ; + double arg4 ; void *argp1 = 0 ; int res1 = 0 ; - double temp2[6] ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + int val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject *swig_obj[4] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_set_unit_cell",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_set_bin_sizes", 4, 4, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_unit_cell" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_bin_sizes" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_set_bin_sizes" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cbf_handle_struct_set_bin_sizes" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cbf_handle_struct_set_bin_sizes" "', argument " "4"" of type '" "double""'"); + } + arg4 = (double)(val4); { - if (obj1 == Py_None) arg2 = NULL; - else - if (!convert_darray(obj1,temp2,6)) { + error_status=0; + cbf_handle_struct_set_bin_sizes(arg1,arg2,arg3,arg4); + if (error_status){ + get_error_message(); + PyErr_SetString(PyExc_Exception,error_message); return NULL; } - arg2 = &temp2[0]; } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_poise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; + double arg2 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + double *arg7 = (double *) 0 ; + double *arg8 = (double *) 0 ; + double *arg9 = (double *) 0 ; + char *arg10 = (char *) 0 ; + char *arg11 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + double temp8 ; + int res8 = SWIG_TMPOBJ ; + double temp9 ; + int res9 = SWIG_TMPOBJ ; + int res10 ; + char *buf10 = 0 ; + int alloc10 = 0 ; + int res11 ; + char *buf11 = 0 ; + int alloc11 = 0 ; + PyObject *swig_obj[4] ; + + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + arg8 = &temp8; + arg9 = &temp9; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_axis_poise", 4, 4, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_poise" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + } + arg1 = (cbf_handle_struct *)(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cbf_handle_struct_get_axis_poise" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + res10 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf10, NULL, &alloc10); + if (!SWIG_IsOK(res10)) { + SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "cbf_handle_struct_get_axis_poise" "', argument " "10"" of type '" "char const *""'"); + } + arg10 = (char *)(buf10); + res11 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf11, NULL, &alloc11); + if (!SWIG_IsOK(res11)) { + SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "cbf_handle_struct_get_axis_poise" "', argument " "11"" of type '" "char const *""'"); + } + arg11 = (char *)(buf11); { error_status=0; - cbf_handle_struct_set_unit_cell(arg1,arg2); + cbf_handle_struct_get_axis_poise(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,(char const *)arg10,(char const *)arg11); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -20822,39 +20150,107 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_unit_cell(PyObject *SWIGUNUSEDP } } resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res8)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg8))); + } else { + int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res9)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg9))); + } else { + int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_double, new_flags)); + } + if (alloc10 == SWIG_NEWOBJ) free((char*)buf10); + if (alloc11 == SWIG_NEWOBJ) free((char*)buf11); return resultobj; fail: + if (alloc10 == SWIG_NEWOBJ) free((char*)buf10); + if (alloc11 == SWIG_NEWOBJ) free((char*)buf11); return NULL; } -SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_unit_cell_esd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_cbf_handle_struct_get_axis_reference_poise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cbf_handle_struct *arg1 = (cbf_handle_struct *) 0 ; - double *arg2 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double *arg4 = (double *) 0 ; + double *arg5 = (double *) 0 ; + double *arg6 = (double *) 0 ; + double *arg7 = (double *) 0 ; + char *arg8 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - double temp2[6] ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + double temp2 ; + int res2 = SWIG_TMPOBJ ; + double temp3 ; + int res3 = SWIG_TMPOBJ ; + double temp4 ; + int res4 = SWIG_TMPOBJ ; + double temp5 ; + int res5 = SWIG_TMPOBJ ; + double temp6 ; + int res6 = SWIG_TMPOBJ ; + double temp7 ; + int res7 = SWIG_TMPOBJ ; + int res8 ; + char *buf8 = 0 ; + int alloc8 = 0 ; + PyObject *swig_obj[2] ; - if (!PyArg_ParseTuple(args,(char *)"OO:cbf_handle_struct_set_unit_cell_esd",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); + arg2 = &temp2; + arg3 = &temp3; + arg4 = &temp4; + arg5 = &temp5; + arg6 = &temp6; + arg7 = &temp7; + if (!SWIG_Python_UnpackTuple(args, "cbf_handle_struct_get_axis_reference_poise", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cbf_handle_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_set_unit_cell_esd" "', argument " "1"" of type '" "cbf_handle_struct *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cbf_handle_struct_get_axis_reference_poise" "', argument " "1"" of type '" "cbf_handle_struct *""'"); } arg1 = (cbf_handle_struct *)(argp1); - { - if (obj1 == Py_None) arg2 = NULL; - else - if (!convert_darray(obj1,temp2,6)) { - return NULL; - } - arg2 = &temp2[0]; + res8 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf8, NULL, &alloc8); + if (!SWIG_IsOK(res8)) { + SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "cbf_handle_struct_get_axis_reference_poise" "', argument " "8"" of type '" "char const *""'"); } + arg8 = (char *)(buf8); { error_status=0; - cbf_handle_struct_set_unit_cell_esd(arg1,arg2); + cbf_handle_struct_get_axis_reference_poise(arg1,arg2,arg3,arg4,arg5,arg6,arg7,(char const *)arg8); if (error_status){ get_error_message(); PyErr_SetString(PyExc_Exception,error_message); @@ -20862,50 +20258,96 @@ SWIGINTERN PyObject *_wrap_cbf_handle_struct_set_unit_cell_esd(PyObject *SWIGUNU } } resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res4)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res5)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5))); + } else { + int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res6)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6))); + } else { + int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags)); + } + if (SWIG_IsTmpObj(res7)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7))); + } else { + int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags)); + } + if (alloc8 == SWIG_NEWOBJ) free((char*)buf8); return resultobj; fail: + if (alloc8 == SWIG_NEWOBJ) free((char*)buf8); return NULL; } SWIGINTERN PyObject *cbf_handle_struct_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_cbf_handle_struct, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } +SWIGINTERN PyObject *cbf_handle_struct_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + static PyMethodDef SwigMethods[] = { - { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, - { (char *)"new_doubleArray", _wrap_new_doubleArray, METH_VARARGS, NULL}, - { (char *)"delete_doubleArray", _wrap_delete_doubleArray, METH_VARARGS, NULL}, - { (char *)"doubleArray___getitem__", _wrap_doubleArray___getitem__, METH_VARARGS, NULL}, - { (char *)"doubleArray___setitem__", _wrap_doubleArray___setitem__, METH_VARARGS, NULL}, - { (char *)"doubleArray_cast", _wrap_doubleArray_cast, METH_VARARGS, NULL}, - { (char *)"doubleArray_frompointer", _wrap_doubleArray_frompointer, METH_VARARGS, NULL}, - { (char *)"doubleArray_swigregister", doubleArray_swigregister, METH_VARARGS, NULL}, - { (char *)"new_intArray", _wrap_new_intArray, METH_VARARGS, NULL}, - { (char *)"delete_intArray", _wrap_delete_intArray, METH_VARARGS, NULL}, - { (char *)"intArray___getitem__", _wrap_intArray___getitem__, METH_VARARGS, NULL}, - { (char *)"intArray___setitem__", _wrap_intArray___setitem__, METH_VARARGS, NULL}, - { (char *)"intArray_cast", _wrap_intArray_cast, METH_VARARGS, NULL}, - { (char *)"intArray_frompointer", _wrap_intArray_frompointer, METH_VARARGS, NULL}, - { (char *)"intArray_swigregister", intArray_swigregister, METH_VARARGS, NULL}, - { (char *)"new_shortArray", _wrap_new_shortArray, METH_VARARGS, NULL}, - { (char *)"delete_shortArray", _wrap_delete_shortArray, METH_VARARGS, NULL}, - { (char *)"shortArray___getitem__", _wrap_shortArray___getitem__, METH_VARARGS, NULL}, - { (char *)"shortArray___setitem__", _wrap_shortArray___setitem__, METH_VARARGS, NULL}, - { (char *)"shortArray_cast", _wrap_shortArray_cast, METH_VARARGS, NULL}, - { (char *)"shortArray_frompointer", _wrap_shortArray_frompointer, METH_VARARGS, NULL}, - { (char *)"shortArray_swigregister", shortArray_swigregister, METH_VARARGS, NULL}, - { (char *)"new_longArray", _wrap_new_longArray, METH_VARARGS, NULL}, - { (char *)"delete_longArray", _wrap_delete_longArray, METH_VARARGS, NULL}, - { (char *)"longArray___getitem__", _wrap_longArray___getitem__, METH_VARARGS, NULL}, - { (char *)"longArray___setitem__", _wrap_longArray___setitem__, METH_VARARGS, NULL}, - { (char *)"longArray_cast", _wrap_longArray_cast, METH_VARARGS, NULL}, - { (char *)"longArray_frompointer", _wrap_longArray_frompointer, METH_VARARGS, NULL}, - { (char *)"longArray_swigregister", longArray_swigregister, METH_VARARGS, NULL}, - { (char *)"get_local_integer_byte_order", _wrap_get_local_integer_byte_order, METH_VARARGS, (char *)"\n" + { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL}, + { "new_doubleArray", _wrap_new_doubleArray, METH_O, NULL}, + { "delete_doubleArray", _wrap_delete_doubleArray, METH_O, NULL}, + { "doubleArray___getitem__", _wrap_doubleArray___getitem__, METH_VARARGS, NULL}, + { "doubleArray___setitem__", _wrap_doubleArray___setitem__, METH_VARARGS, NULL}, + { "doubleArray_cast", _wrap_doubleArray_cast, METH_O, NULL}, + { "doubleArray_frompointer", _wrap_doubleArray_frompointer, METH_O, NULL}, + { "doubleArray_swigregister", doubleArray_swigregister, METH_O, NULL}, + { "doubleArray_swiginit", doubleArray_swiginit, METH_VARARGS, NULL}, + { "new_intArray", _wrap_new_intArray, METH_O, NULL}, + { "delete_intArray", _wrap_delete_intArray, METH_O, NULL}, + { "intArray___getitem__", _wrap_intArray___getitem__, METH_VARARGS, NULL}, + { "intArray___setitem__", _wrap_intArray___setitem__, METH_VARARGS, NULL}, + { "intArray_cast", _wrap_intArray_cast, METH_O, NULL}, + { "intArray_frompointer", _wrap_intArray_frompointer, METH_O, NULL}, + { "intArray_swigregister", intArray_swigregister, METH_O, NULL}, + { "intArray_swiginit", intArray_swiginit, METH_VARARGS, NULL}, + { "new_shortArray", _wrap_new_shortArray, METH_O, NULL}, + { "delete_shortArray", _wrap_delete_shortArray, METH_O, NULL}, + { "shortArray___getitem__", _wrap_shortArray___getitem__, METH_VARARGS, NULL}, + { "shortArray___setitem__", _wrap_shortArray___setitem__, METH_VARARGS, NULL}, + { "shortArray_cast", _wrap_shortArray_cast, METH_O, NULL}, + { "shortArray_frompointer", _wrap_shortArray_frompointer, METH_O, NULL}, + { "shortArray_swigregister", shortArray_swigregister, METH_O, NULL}, + { "shortArray_swiginit", shortArray_swiginit, METH_VARARGS, NULL}, + { "new_longArray", _wrap_new_longArray, METH_O, NULL}, + { "delete_longArray", _wrap_delete_longArray, METH_O, NULL}, + { "longArray___getitem__", _wrap_longArray___getitem__, METH_VARARGS, NULL}, + { "longArray___setitem__", _wrap_longArray___setitem__, METH_VARARGS, NULL}, + { "longArray_cast", _wrap_longArray_cast, METH_O, NULL}, + { "longArray_frompointer", _wrap_longArray_frompointer, METH_O, NULL}, + { "longArray_swigregister", longArray_swigregister, METH_O, NULL}, + { "longArray_swiginit", longArray_swiginit, METH_VARARGS, NULL}, + { "get_local_integer_byte_order", _wrap_get_local_integer_byte_order, METH_NOARGS, "\n" "\n" "Returns : char **bo,int *bolen\n" "*args : \n" @@ -20936,28 +20378,38 @@ static PyMethodDef SwigMethods[] = { "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"compute_cell_volume", _wrap_compute_cell_volume, METH_VARARGS, (char *)"\n" + { "get_local_real_byte_order", _wrap_get_local_real_byte_order, METH_NOARGS, "\n" "\n" - "Returns : Float volume\n" - "*args : double cell[6]\n" + "Returns : char **bo,int *bolen\n" + "*args : \n" "\n" - "C prototype: int cbf_compute_cell_volume ( double cell[6], double *volume );\n" + "C prototype: int cbf_get_local_real_byte_order (char ** byte_order);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_compute_cell_volume sets *volume to point to the volume of the \n" - "unit cell computed from the double values in cell[0:2] for the cell \n" - "edge lengths a, b and c in AAngstroms and the double values given in \n" - "cell[3:5] for the cell angles a, b and g in degrees.\n" + "cbf_get_local_integer_byte_order returns the byte order of integers \n" + "on the machine on which the API is being run in the form of a \n" + "character string returned as the value pointed to by byte_order. \n" + "cbf_get_local_real_byte_order returns the byte order of reals on the \n" + "machine on which the API is being run in the form of a character \n" + "string returned as the value pointed to by byte_order. \n" + "cbf_get_local_real_format returns the format of floats on the machine \n" + "on which the API is being run in the form of a character string \n" + "returned as the value pointed to by real_format. The strings returned \n" + "must not be modified in any way.\n" + "The values returned in byte_order may be the strings \"little_endian \n" + "\" or \"big-endian \". The values returned in real_format may be the \n" + "strings \"ieee 754-1985 \" or \"other \". Additional values may be \n" + "returned by future versions of the API.\n" "ARGUMENTS\n" - "cell Pointer to the array of 6 doubles giving the cell \n" - "parameters. volume Pointer to the doubles for cell volume.\n" + "byte_order pointer to the returned string real_format pointer to \n" + "the returned string\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"get_local_real_format", _wrap_get_local_real_format, METH_VARARGS, (char *)"\n" + { "get_local_real_format", _wrap_get_local_real_format, METH_NOARGS, "\n" "\n" "Returns : char **rf,int *rflen\n" "*args : \n" @@ -20988,7 +20440,56 @@ static PyMethodDef SwigMethods[] = { "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"airy_disk", _wrap_airy_disk, METH_VARARGS, (char *)"\n" + { "compute_cell_volume", _wrap_compute_cell_volume, METH_O, "\n" + "\n" + "Returns : Float volume\n" + "*args : double cell[6]\n" + "\n" + "C prototype: int cbf_compute_cell_volume ( double cell[6], double *volume );\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_compute_cell_volume sets *volume to point to the volume of the \n" + "unit cell computed from the double values in cell[0:2] for the cell \n" + "edge lengths a, b and c in AAngstroms and the double values given in \n" + "cell[3:5] for the cell angles a, b and g in degrees.\n" + "ARGUMENTS\n" + "cell Pointer to the array of 6 doubles giving the cell \n" + "parameters. volume Pointer to the doubles for cell volume.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "compute_reciprocal_cell", _wrap_compute_reciprocal_cell, METH_O, "\n" + "\n" + "Returns : Float astar,Float bstar,Float cstar,Float alphastar,Float betastar,\n" + " Float gammastar\n" + "*args : double cell[6]\n" + "\n" + "C prototype: int cbf_compute_reciprocal_cell ( double cell[6],\n" + " double rcell[6] );\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_compute_reciprocal_cell sets rcell to point to the array of \n" + "reciprocal cell parameters computed from the double values cell[0:2] \n" + "giving the cell edge lengths a, b and c in AAngstroms, and the double \n" + "values cell[3:5] giving the cell angles a, b and g in degrees. The \n" + "double values rcell[0:2] will be set to the reciprocal cell lengths \n" + "a*, b* and c* in AAngstroms-1 and the double values rcell[3:5] will \n" + "be set to the reciprocal cell angles a*, b* and g* in degrees.\n" + "ARGUMENTS\n" + "cell Pointer to the array of 6 doubles giving the cell \n" + "parameters. rcell Pointer to the destination array of 6 doubles \n" + "giving the reciprocal cell parameters. volume Pointer to the \n" + "doubles for cell volume.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "airy_disk", _wrap_airy_disk, METH_VARARGS, "\n" "\n" "Returns : Float value\n" "*args : double x,double y,double cenx,double ceny,double volume,double fwhm\n" @@ -21011,339 +20512,659 @@ static PyMethodDef SwigMethods[] = { "minimum, after which it is forced to zero, so it cannot be used to \n" "simulate diffraction rings.\n" "ARGUMENTS\n" - "x the x-coordinate of a point in the real plane y \n" - "the y-coordinate of a point in the real plane xlo the \n" - "x-coordinate of a point in the real plane marking the left bound of \n" - "integration ylo the y-coordinate of a point in the real plane \n" - "marking the bottom bound of integration xhi the x-coordinate \n" - "of a point in the real plane marking the right bound of integration \n" - "yhi the y-coordinate of a point in the real plane marking the \n" - "top bound of integration cenx the x-coordinate of a point in \n" - "the real plane marking the PSF center ceny the y-coordinate of \n" - "a point in the real plane marking the PSF center volume the \n" - "total volume of the PSF fwhm the full-width at half max of the \n" - "PSF value Pointer to the value of the Airy function volumeout \n" - "Pointer to the value of the integral/TR>\n" + "x the x-coordinate of a point in the real plane y \n" + "the y-coordinate of a point in the real plane xlo the \n" + "x-coordinate of a point in the real plane marking the left bound of \n" + "integration ylo the y-coordinate of a point in the real plane \n" + "marking the bottom bound of integration xhi the x-coordinate \n" + "of a point in the real plane marking the right bound of integration \n" + "yhi the y-coordinate of a point in the real plane marking the \n" + "top bound of integration cenx the x-coordinate of a point in \n" + "the real plane marking the PSF center ceny the y-coordinate of \n" + "a point in the real plane marking the PSF center volume the \n" + "total volume of the PSF fwhm the full-width at half max of the \n" + "PSF value Pointer to the value of the Airy function volumeout \n" + "Pointer to the value of the integral/TR>\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "airy_disk_volume", _wrap_airy_disk_volume, METH_VARARGS, "\n" + "\n" + "Returns : Float volumeout\n" + "*args : double xlo,double ylo,double xhi,double yhi,double cenx,double ceny,\n" + " double volumein,double fwhm\n" + "\n" + "C prototype: int cbf_airy_disk_volume(double xlo, double ylo, double xhi,\n" + " double yhi, double cenx, double ceny, double volume,\n" + " double fwhm, double * volumeout);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_airy_disk sets value to point to the value taken at (x,y) of an \n" + "truncated Airy function approximation to a point-spread function of \n" + "total included volume volume and full width at half max fwhm centered \n" + "on (cenx, ceny).\n" + "cbf_airy_disk_volume sets to point to the integral in the box with \n" + "diagonal corners (xlo, ylo) and of (xhi, yhi) of a truncated Airy \n" + "function approximation to a point-spread function of total included \n" + "volume volume and full width at half max fwhm centered on (cenx, \n" + "ceny).\n" + "The Airy function used is an 8-digit approximation up to the first \n" + "minimum, after which it is forced to zero, so it cannot be used to \n" + "simulate diffraction rings.\n" + "ARGUMENTS\n" + "x the x-coordinate of a point in the real plane y \n" + "the y-coordinate of a point in the real plane xlo the \n" + "x-coordinate of a point in the real plane marking the left bound of \n" + "integration ylo the y-coordinate of a point in the real plane \n" + "marking the bottom bound of integration xhi the x-coordinate \n" + "of a point in the real plane marking the right bound of integration \n" + "yhi the y-coordinate of a point in the real plane marking the \n" + "top bound of integration cenx the x-coordinate of a point in \n" + "the real plane marking the PSF center ceny the y-coordinate of \n" + "a point in the real plane marking the PSF center volume the \n" + "total volume of the PSF fwhm the full-width at half max of the \n" + "PSF value Pointer to the value of the Airy function volumeout \n" + "Pointer to the value of the integral/TR>\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_positioner_struct_matrix_set", _wrap_cbf_positioner_struct_matrix_set, METH_VARARGS, "cbf_positioner_struct_matrix_set(cbf_positioner_struct self, double [3][4] matrix)"}, + { "cbf_positioner_struct_matrix_get", _wrap_cbf_positioner_struct_matrix_get, METH_O, "cbf_positioner_struct_matrix_get(cbf_positioner_struct self) -> double [3][4]"}, + { "cbf_positioner_struct_axis_set", _wrap_cbf_positioner_struct_axis_set, METH_VARARGS, "cbf_positioner_struct_axis_set(cbf_positioner_struct self, cbf_axis_struct * axis)"}, + { "cbf_positioner_struct_axis_get", _wrap_cbf_positioner_struct_axis_get, METH_O, "cbf_positioner_struct_axis_get(cbf_positioner_struct self) -> cbf_axis_struct *"}, + { "cbf_positioner_struct_axes_set", _wrap_cbf_positioner_struct_axes_set, METH_VARARGS, "cbf_positioner_struct_axes_set(cbf_positioner_struct self, size_t axes)"}, + { "cbf_positioner_struct_axes_get", _wrap_cbf_positioner_struct_axes_get, METH_O, "cbf_positioner_struct_axes_get(cbf_positioner_struct self) -> size_t"}, + { "cbf_positioner_struct_matrix_is_valid_set", _wrap_cbf_positioner_struct_matrix_is_valid_set, METH_VARARGS, "cbf_positioner_struct_matrix_is_valid_set(cbf_positioner_struct self, int matrix_is_valid)"}, + { "cbf_positioner_struct_matrix_is_valid_get", _wrap_cbf_positioner_struct_matrix_is_valid_get, METH_O, "cbf_positioner_struct_matrix_is_valid_get(cbf_positioner_struct self) -> int"}, + { "cbf_positioner_struct_matrix_ratio_used_set", _wrap_cbf_positioner_struct_matrix_ratio_used_set, METH_VARARGS, "cbf_positioner_struct_matrix_ratio_used_set(cbf_positioner_struct self, double matrix_ratio_used)"}, + { "cbf_positioner_struct_matrix_ratio_used_get", _wrap_cbf_positioner_struct_matrix_ratio_used_get, METH_O, "cbf_positioner_struct_matrix_ratio_used_get(cbf_positioner_struct self) -> double"}, + { "cbf_positioner_struct_axis_index_limit_set", _wrap_cbf_positioner_struct_axis_index_limit_set, METH_VARARGS, "cbf_positioner_struct_axis_index_limit_set(cbf_positioner_struct self, size_t axis_index_limit)"}, + { "cbf_positioner_struct_axis_index_limit_get", _wrap_cbf_positioner_struct_axis_index_limit_get, METH_O, "cbf_positioner_struct_axis_index_limit_get(cbf_positioner_struct self) -> size_t"}, + { "new_cbf_positioner_struct", _wrap_new_cbf_positioner_struct, METH_NOARGS, "new_cbf_positioner_struct() -> cbf_positioner_struct"}, + { "delete_cbf_positioner_struct", _wrap_delete_cbf_positioner_struct, METH_O, "delete_cbf_positioner_struct(cbf_positioner_struct self)"}, + { "cbf_positioner_struct_get_rotation_axis", _wrap_cbf_positioner_struct_get_rotation_axis, METH_O, "\n" + "\n" + "Returns : double vector1,double vector2,double vector3\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_rotation_axis (cbf_goniometer goniometer,\n" + " unsigned int reserved, double *vector1, double *vector2,\n" + " double *vector3);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_rotation_axis sets *vector1, *vector2, and *vector3 to the 3 \n" + "components of the goniometer rotation axis used for the exposure.\n" + "Any of the destination pointers may be NULL.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "goniometer Goniometer handle. reserved Unused. Any value other \n" + "than 0 is invalid. vector1 Pointer to the destination x \n" + "component of the rotation axis. vector2 Pointer to the \n" + "destination y component of the rotation axis. vector3 Pointer to \n" + "the destination z component of the rotation axis.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_positioner_struct_get_rotation_range", _wrap_cbf_positioner_struct_get_rotation_range, METH_O, "\n" + "\n" + "Returns : Float start,Float increment\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_rotation_range (cbf_goniometer goniometer,\n" + " unsigned int reserved, double *start, double *increment);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_rotation_range sets *start and *increment to the \n" + "corresponding values of the goniometer rotation axis used for the \n" + "exposure.\n" + "Either of the destination pointers may be NULL.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "goniometer Goniometer handle. reserved Unused. Any value other \n" + "than 0 is invalid. start Pointer to the destination start \n" + "value. increment Pointer to the destination increment value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_positioner_struct_rotate_vector", _wrap_cbf_positioner_struct_rotate_vector, METH_VARARGS, "\n" + "\n" + "Returns : double final1,double final2,double final3\n" + "*args : double ratio,double initial1,double initial2,double initial3\n" + "\n" + "C prototype: int cbf_rotate_vector (cbf_goniometer goniometer,\n" + " unsigned int reserved, double ratio, double initial1,\n" + " double initial2, double initial3, double *final1,\n" + " double *final2, double *final3);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_rotate_vector sets *final1, *final2, and *final3 to the 3 \n" + "components of the of the vector (initial1, initial2, initial3) after \n" + "reorientation by applying the goniometer rotations. The value ratio \n" + "specif ies the goniometer setting and varies from 0.0 at the \n" + "beginning of the exposure to 1.0 at the end, irrespective of the \n" + "actual rotation range.\n" + "Any of the destination pointers may be NULL.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "goniometer Goniometer handle. reserved Unused. Any value other \n" + "than 0 is invalid. ratio Goniometer setting. 0 = beginning of \n" + "exposure, 1 = end. initial1 x component of the initial vector. \n" + "initial2 y component of the initial vector. initial3 z \n" + "component of the initial vector. vector1 Pointer to the \n" + "destination x component of the final vector. vector2 Pointer to \n" + "the destination y component of the final vector. vector3 Pointer \n" + "to the destination z component of the final vector.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"get_local_real_byte_order", _wrap_get_local_real_byte_order, METH_VARARGS, (char *)"\n" + { "cbf_positioner_struct_get_reciprocal", _wrap_cbf_positioner_struct_get_reciprocal, METH_VARARGS, "\n" "\n" - "Returns : char **bo,int *bolen\n" - "*args : \n" + "Returns : double reciprocal1,double reciprocal2,double reciprocal3\n" + "*args : double ratio,double wavelength,double real1,double real2,double real3\n" "\n" - "C prototype: int cbf_get_local_real_byte_order (char ** byte_order);\n" + "C prototype: int cbf_get_reciprocal (cbf_goniometer goniometer,\n" + " unsigned int reserved, double ratio, double wavelength,\n" + " double real1, double real2, double real3,\n" + " double *reciprocal1, double *reciprocal2,\n" + " double *reciprocal3);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_local_integer_byte_order returns the byte order of integers \n" - "on the machine on which the API is being run in the form of a \n" - "character string returned as the value pointed to by byte_order. \n" - "cbf_get_local_real_byte_order returns the byte order of reals on the \n" - "machine on which the API is being run in the form of a character \n" - "string returned as the value pointed to by byte_order. \n" - "cbf_get_local_real_format returns the format of floats on the machine \n" - "on which the API is being run in the form of a character string \n" - "returned as the value pointed to by real_format. The strings returned \n" - "must not be modified in any way.\n" - "The values returned in byte_order may be the strings \"little_endian \n" - "\" or \"big-endian \". The values returned in real_format may be the \n" - "strings \"ieee 754-1985 \" or \"other \". Additional values may be \n" - "returned by future versions of the API.\n" + "cbf_get_reciprocal sets *reciprocal1, * reciprocal2, and * \n" + "reciprocal3 to the 3 components of the of the reciprocal-space vector \n" + "corresponding to the real-space vector (real1, real2, real3). The \n" + "reciprocal-space vector is oriented to correspond to the goniometer \n" + "setting with all axes at 0. The value wavelength is the wavlength in \n" + "AA and the value ratio specifies the current goniometer setting and \n" + "varies from 0.0 at the beginning of the exposur e to 1.0 at the end, \n" + "irrespective of the actual rotation range.\n" + "Any of the destination pointers may be NULL.\n" + "The parameter reserved is presently unused and should be set to 0.\n" "ARGUMENTS\n" - "byte_order pointer to the returned string real_format pointer to \n" - "the returned string\n" + "goniometer Goniometer handle. reserved Unused. Any value \n" + "other than 0 is invalid. ratio Goniometer setting. 0 = \n" + "beginning of exposure, 1 = end. wavelength Wavelength in AA. real1 \n" + " x component of the real-space vector. real2 y \n" + "component of the real-space vector. real3 z component of the \n" + "real-space vector. reciprocal1 Pointer to the destination x \n" + "component of the reciprocal-space vector. reciprocal2 Pointer to \n" + "the destination y component of the reciprocal-space vector. \n" + "reciprocal3 Pointer to the destination z component of the \n" + "reciprocal-space vector.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"compute_reciprocal_cell", _wrap_compute_reciprocal_cell, METH_VARARGS, (char *)"\n" + { "cbf_positioner_struct_get_goniometer_poise", _wrap_cbf_positioner_struct_get_goniometer_poise, METH_VARARGS, "\n" "\n" - "Returns : Float astar,Float bstar,Float cstar,Float alphastar,Float betastar,\n" - " Float gammastar\n" - "*args : double cell[6]\n" + "Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2,\n" + " Float offset3,Float angle\n" + "*args : Float ratio\n" "\n" - "C prototype: int cbf_compute_reciprocal_cell ( double cell[6],\n" - " double rcell[6] );\n" + "C prototype: int cbf_get_goniometer_poise(cbf_goniometer goniometer,\n" + " double ratio, double * vector1, double * vector2,\n" + " double * vector3, double * offset1, double * offset2,\n" + " double * offset3, double * angle);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_compute_reciprocal_cell sets rcell to point to the array of \n" - "reciprocal cell parameters computed from the double values cell[0:2] \n" - "giving the cell edge lengths a, b and c in AAngstroms, and the double \n" - "values cell[3:5] giving the cell angles a, b and g in degrees. The \n" - "double values rcell[0:2] will be set to the reciprocal cell lengths \n" - "a*, b* and c* in AAngstroms-1 and the double values rcell[3:5] will \n" - "be set to the reciprocal cell angles a*, b* and g* in degrees.\n" + "cbf_get_axis_poise sets vector1, vector2, vector3 to point to the \n" + "components of the axis vector for axis axis_id, offset1, offset2, \n" + "offset3 to point to the components of the axis base offset vector for \n" + "axis axis_id, and angle to point to the angle of rotation of axis \n" + "axis_id after application of the axis settings for frame frame_id, \n" + "using ratio, a value between 0 and 1, indicating how far into the \n" + "internal motion in the frame to go. If frame_id is the string \". \n" + "\", the first frame found is used. If there is more than one frame, \n" + "which frame will be found is indeterminate. If frame_id is NULL, the \n" + "overall setting for the scan are used, rather than those for any \n" + "particular frame. The vector and offset reported are the reference \n" + "vector and offset of the axis axis_id transformed by application of \n" + "all motions of the axes on which axis_id depends.\n" + "cbf_get_goniometer_poise vector1, vector2, vector3 to point to the \n" + "components of the axis vector for the goniometer axis, offset1, \n" + "offset2, offset3 to point to the components of the axis base offset \n" + "vector for the goniometer axis, and angle to point to the angle of \n" + "rotation of the goniometer axis after application of all axis \n" + "settings in the goniometer deriving the vector, offset and angle from \n" + "the resulting matrix. Calculation of the vector is indeterminate if \n" + "the angle is zero.\n" + "cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point \n" + "to the components of the axis vector for axis axis_id, offset1, \n" + "offset2, offset3 to point to the components of the axis base offset \n" + "vector for axis axis_id unmodified by axis rotations. Any of the \n" + "pointers may be specified as NULL.\n" "ARGUMENTS\n" - "cell Pointer to the array of 6 doubles giving the cell \n" - "parameters. rcell Pointer to the destination array of 6 doubles \n" - "giving the reciprocal cell parameters. volume Pointer to the \n" - "doubles for cell volume.\n" + "handle CBF handle. ratio A number between 0 and 1 \n" + "indication how far into the frame to go vector1 Pointer to the \n" + "first component of the axis vector vector2 Pointer to the second \n" + "component of the axis vector vector3 Pointer to the third \n" + "component of the axis vector offset1 Pointer to the first \n" + "component of the axis offset offset2 Pointer to the second \n" + "component of the axis offset offset3 Pointer to the third \n" + "component of the axis offset angle Pointer to the rotation \n" + "angle axis_id The specified axis frame_id The specified \n" + "frame positioner CBF goniometer\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"airy_disk_volume", _wrap_airy_disk_volume, METH_VARARGS, (char *)"\n" + { "cbf_positioner_struct_swigregister", cbf_positioner_struct_swigregister, METH_O, NULL}, + { "cbf_positioner_struct_swiginit", cbf_positioner_struct_swiginit, METH_VARARGS, NULL}, + { "cbf_detector_struct_positioner_set", _wrap_cbf_detector_struct_positioner_set, METH_VARARGS, "cbf_detector_struct_positioner_set(cbf_detector_struct self, cbf_positioner_struct positioner)"}, + { "cbf_detector_struct_positioner_get", _wrap_cbf_detector_struct_positioner_get, METH_O, "cbf_detector_struct_positioner_get(cbf_detector_struct self) -> cbf_positioner_struct"}, + { "cbf_detector_struct_displacement_set", _wrap_cbf_detector_struct_displacement_set, METH_VARARGS, "cbf_detector_struct_displacement_set(cbf_detector_struct self, double [2] displacement)"}, + { "cbf_detector_struct_displacement_get", _wrap_cbf_detector_struct_displacement_get, METH_O, "cbf_detector_struct_displacement_get(cbf_detector_struct self) -> double [2]"}, + { "cbf_detector_struct_increment_set", _wrap_cbf_detector_struct_increment_set, METH_VARARGS, "cbf_detector_struct_increment_set(cbf_detector_struct self, double [2] increment)"}, + { "cbf_detector_struct_increment_get", _wrap_cbf_detector_struct_increment_get, METH_O, "cbf_detector_struct_increment_get(cbf_detector_struct self) -> double [2]"}, + { "cbf_detector_struct_axes_set", _wrap_cbf_detector_struct_axes_set, METH_VARARGS, "cbf_detector_struct_axes_set(cbf_detector_struct self, size_t axes)"}, + { "cbf_detector_struct_axes_get", _wrap_cbf_detector_struct_axes_get, METH_O, "cbf_detector_struct_axes_get(cbf_detector_struct self) -> size_t"}, + { "cbf_detector_struct_index_set", _wrap_cbf_detector_struct_index_set, METH_VARARGS, "cbf_detector_struct_index_set(cbf_detector_struct self, size_t [2] index)"}, + { "cbf_detector_struct_index_get", _wrap_cbf_detector_struct_index_get, METH_O, "cbf_detector_struct_index_get(cbf_detector_struct self) -> size_t [2]"}, + { "new_cbf_detector_struct", _wrap_new_cbf_detector_struct, METH_NOARGS, "new_cbf_detector_struct() -> cbf_detector_struct"}, + { "delete_cbf_detector_struct", _wrap_delete_cbf_detector_struct, METH_O, "delete_cbf_detector_struct(cbf_detector_struct self)"}, + { "cbf_detector_struct_get_beam_center", _wrap_cbf_detector_struct_get_beam_center, METH_O, "\n" "\n" - "Returns : Float volumeout\n" - "*args : double xlo,double ylo,double xhi,double yhi,double cenx,double ceny,\n" - " double volumein,double fwhm\n" + "Returns : double index1,double index2,double center1,double center2\n" + "*args : \n" "\n" - "C prototype: int cbf_airy_disk_volume(double xlo, double ylo, double xhi,\n" - " double yhi, double cenx, double ceny, double volume,\n" - " double fwhm, double * volumeout);\n" + "C prototype: int cbf_get_beam_center (cbf_detector detector,\n" + " double *indexslow, double *indexfast, double *centerslow,\n" + " double *centerfast);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_airy_disk sets value to point to the value taken at (x,y) of an \n" - "truncated Airy function approximation to a point-spread function of \n" - "total included volume volume and full width at half max fwhm centered \n" - "on (cenx, ceny).\n" - "cbf_airy_disk_volume sets to point to the integral in the box with \n" - "diagonal corners (xlo, ylo) and of (xhi, yhi) of a truncated Airy \n" - "function approximation to a point-spread function of total included \n" - "volume volume and full width at half max fwhm centered on (cenx, \n" - "ceny).\n" - "The Airy function used is an 8-digit approximation up to the first \n" - "minimum, after which it is forced to zero, so it cannot be used to \n" - "simulate diffraction rings.\n" + "cbf_get_beam_center sets *centerfast and *centerslow to the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector and *indexfast and \n" + "*indexslow to the corresponding indices. cbf_set_beam_center sets the \n" + "offsets in the axis category for the detector element axis with \n" + "precedence 1 to place the beam center at the position given in mm by \n" + "*centerfast and *centerslow as the displacements in mm along the \n" + "detector axes from pixel (0, 0) to the point at which the beam \n" + "intersects the detector at the indices given *indexfast and \n" + "*indexslow. cbf_set_reference_beam_center sets the displacments in \n" + "the array_structure_list_axis category to place the beam center at \n" + "the position given in mm by *centerfast and *centerslow as the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector at the indices given \n" + "by *indexfast and *indexslow. In order to achieve consistent results, \n" + "a reference detector should be used for detector to have all axes at \n" + "their reference settings.\n" + "Note that the precedence 1 axis is the fastest axis, so that \n" + "*centerfast and *indexfast are the fast axis components of the center \n" + "and *centerslow and *indexslow are the slow axis components of the \n" + "center.\n" + "The _fs calls give the displacments in a fast-to-slow order. The \n" + "calls with no suffix and the calls _sf calls give the displacements \n" + "in slow-to-fast order\n" + "Any of the destination pointers may be NULL for getting the beam \n" + "center. For setting the beam axis, either the indices of the center \n" + "must not be NULL.\n" + "The indices are non-negative for beam centers within the detector \n" + "surface, but the center for an axis with a negative increment will be \n" + "negative for a beam center within the detector surface.\n" + "For cbf_set_beam_center if the diffrn_data_frame category exists with \n" + "a row for the corresponding element id, the values will be set for \n" + "_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in \n" + "millimetres and the value of _diffrn_data_frame.center_units will be \n" + "set to 'mm'.\n" + "For cbf_set_reference_beam_center if the diffrn_detector_element \n" + "category exists with a row for the corresponding element id, the \n" + "values will be set for _diffrn_detector_element.reference_center_fast \n" + "and _diffrn_detector_element.reference_center_slow in millimetres and \n" + "the value of _diffrn_detector_element.reference_units will be set to \n" + "'mm'.\n" "ARGUMENTS\n" - "x the x-coordinate of a point in the real plane y \n" - "the y-coordinate of a point in the real plane xlo the \n" - "x-coordinate of a point in the real plane marking the left bound of \n" - "integration ylo the y-coordinate of a point in the real plane \n" - "marking the bottom bound of integration xhi the x-coordinate \n" - "of a point in the real plane marking the right bound of integration \n" - "yhi the y-coordinate of a point in the real plane marking the \n" - "top bound of integration cenx the x-coordinate of a point in \n" - "the real plane marking the PSF center ceny the y-coordinate of \n" - "a point in the real plane marking the PSF center volume the \n" - "total volume of the PSF fwhm the full-width at half max of the \n" - "PSF value Pointer to the value of the Airy function volumeout \n" - "Pointer to the value of the integral/TR>\n" + "detector Detector handle. indexfast Pointer to the destination \n" + "fast index. indexslow Pointer to the destination slow index. \n" + "centerfast Pointer to the destination displacement along the fast \n" + "axis. centerslow Pointer to the destination displacement along the \n" + "slow axis.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_positioner_struct_matrix_set", _wrap_cbf_positioner_struct_matrix_set, METH_VARARGS, (char *)"cbf_positioner_struct_matrix_set(cbf_positioner_struct self, double [3][4] matrix)"}, - { (char *)"cbf_positioner_struct_matrix_get", _wrap_cbf_positioner_struct_matrix_get, METH_VARARGS, (char *)"cbf_positioner_struct_matrix_get(cbf_positioner_struct self) -> double [3][4]"}, - { (char *)"cbf_positioner_struct_axis_set", _wrap_cbf_positioner_struct_axis_set, METH_VARARGS, (char *)"cbf_positioner_struct_axis_set(cbf_positioner_struct self, cbf_axis_struct * axis)"}, - { (char *)"cbf_positioner_struct_axis_get", _wrap_cbf_positioner_struct_axis_get, METH_VARARGS, (char *)"cbf_positioner_struct_axis_get(cbf_positioner_struct self) -> cbf_axis_struct *"}, - { (char *)"cbf_positioner_struct_axes_set", _wrap_cbf_positioner_struct_axes_set, METH_VARARGS, (char *)"cbf_positioner_struct_axes_set(cbf_positioner_struct self, size_t axes)"}, - { (char *)"cbf_positioner_struct_axes_get", _wrap_cbf_positioner_struct_axes_get, METH_VARARGS, (char *)"cbf_positioner_struct_axes_get(cbf_positioner_struct self) -> size_t"}, - { (char *)"cbf_positioner_struct_matrix_is_valid_set", _wrap_cbf_positioner_struct_matrix_is_valid_set, METH_VARARGS, (char *)"cbf_positioner_struct_matrix_is_valid_set(cbf_positioner_struct self, int matrix_is_valid)"}, - { (char *)"cbf_positioner_struct_matrix_is_valid_get", _wrap_cbf_positioner_struct_matrix_is_valid_get, METH_VARARGS, (char *)"cbf_positioner_struct_matrix_is_valid_get(cbf_positioner_struct self) -> int"}, - { (char *)"cbf_positioner_struct_matrix_ratio_used_set", _wrap_cbf_positioner_struct_matrix_ratio_used_set, METH_VARARGS, (char *)"cbf_positioner_struct_matrix_ratio_used_set(cbf_positioner_struct self, double matrix_ratio_used)"}, - { (char *)"cbf_positioner_struct_matrix_ratio_used_get", _wrap_cbf_positioner_struct_matrix_ratio_used_get, METH_VARARGS, (char *)"cbf_positioner_struct_matrix_ratio_used_get(cbf_positioner_struct self) -> double"}, - { (char *)"cbf_positioner_struct_axis_index_limit_set", _wrap_cbf_positioner_struct_axis_index_limit_set, METH_VARARGS, (char *)"cbf_positioner_struct_axis_index_limit_set(cbf_positioner_struct self, size_t axis_index_limit)"}, - { (char *)"cbf_positioner_struct_axis_index_limit_get", _wrap_cbf_positioner_struct_axis_index_limit_get, METH_VARARGS, (char *)"cbf_positioner_struct_axis_index_limit_get(cbf_positioner_struct self) -> size_t"}, - { (char *)"new_cbf_positioner_struct", _wrap_new_cbf_positioner_struct, METH_VARARGS, (char *)"new_cbf_positioner_struct() -> cbf_positioner_struct"}, - { (char *)"delete_cbf_positioner_struct", _wrap_delete_cbf_positioner_struct, METH_VARARGS, (char *)"delete_cbf_positioner_struct(cbf_positioner_struct self)"}, - { (char *)"cbf_positioner_struct_get_rotation_range", _wrap_cbf_positioner_struct_get_rotation_range, METH_VARARGS, (char *)"\n" + { "cbf_detector_struct_get_beam_center_fs", _wrap_cbf_detector_struct_get_beam_center_fs, METH_O, "\n" "\n" - "Returns : Float start,Float increment\n" + "Returns : double indexfast,double indexslow,double centerfast,double centerslow\n" "*args : \n" "\n" - "C prototype: int cbf_get_rotation_range (cbf_goniometer goniometer,\n" - " unsigned int reserved, double *start, double *increment);\n" + "C prototype: int cbf_get_beam_center_fs (cbf_detector detector,\n" + " double *indexfast, double *indexslow, double *centerfast,\n" + " double *centerslow);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_rotation_range sets *start and *increment to the \n" - "corresponding values of the goniometer rotation axis used for the \n" - "exposure.\n" - "Either of the destination pointers may be NULL.\n" - "The parameter reserved is presently unused and should be set to 0.\n" + "cbf_get_beam_center sets *centerfast and *centerslow to the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector and *indexfast and \n" + "*indexslow to the corresponding indices. cbf_set_beam_center sets the \n" + "offsets in the axis category for the detector element axis with \n" + "precedence 1 to place the beam center at the position given in mm by \n" + "*centerfast and *centerslow as the displacements in mm along the \n" + "detector axes from pixel (0, 0) to the point at which the beam \n" + "intersects the detector at the indices given *indexfast and \n" + "*indexslow. cbf_set_reference_beam_center sets the displacments in \n" + "the array_structure_list_axis category to place the beam center at \n" + "the position given in mm by *centerfast and *centerslow as the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector at the indices given \n" + "by *indexfast and *indexslow. In order to achieve consistent results, \n" + "a reference detector should be used for detector to have all axes at \n" + "their reference settings.\n" + "Note that the precedence 1 axis is the fastest axis, so that \n" + "*centerfast and *indexfast are the fast axis components of the center \n" + "and *centerslow and *indexslow are the slow axis components of the \n" + "center.\n" + "The _fs calls give the displacments in a fast-to-slow order. The \n" + "calls with no suffix and the calls _sf calls give the displacements \n" + "in slow-to-fast order\n" + "Any of the destination pointers may be NULL for getting the beam \n" + "center. For setting the beam axis, either the indices of the center \n" + "must not be NULL.\n" + "The indices are non-negative for beam centers within the detector \n" + "surface, but the center for an axis with a negative increment will be \n" + "negative for a beam center within the detector surface.\n" + "For cbf_set_beam_center if the diffrn_data_frame category exists with \n" + "a row for the corresponding element id, the values will be set for \n" + "_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in \n" + "millimetres and the value of _diffrn_data_frame.center_units will be \n" + "set to 'mm'.\n" + "For cbf_set_reference_beam_center if the diffrn_detector_element \n" + "category exists with a row for the corresponding element id, the \n" + "values will be set for _diffrn_detector_element.reference_center_fast \n" + "and _diffrn_detector_element.reference_center_slow in millimetres and \n" + "the value of _diffrn_detector_element.reference_units will be set to \n" + "'mm'.\n" "ARGUMENTS\n" - "goniometer Goniometer handle. reserved Unused. Any value other \n" - "than 0 is invalid. start Pointer to the destination start \n" - "value. increment Pointer to the destination increment value.\n" + "detector Detector handle. indexfast Pointer to the destination \n" + "fast index. indexslow Pointer to the destination slow index. \n" + "centerfast Pointer to the destination displacement along the fast \n" + "axis. centerslow Pointer to the destination displacement along the \n" + "slow axis.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_positioner_struct_rotate_vector", _wrap_cbf_positioner_struct_rotate_vector, METH_VARARGS, (char *)"\n" + { "cbf_detector_struct_get_beam_center_sf", _wrap_cbf_detector_struct_get_beam_center_sf, METH_O, "\n" "\n" - "Returns : double final1,double final2,double final3\n" - "*args : double ratio,double initial1,double initial2,double initial3\n" + "Returns : double indexslow,double indexfast,double centerslow,double centerfast\n" + "*args : \n" "\n" - "C prototype: int cbf_rotate_vector (cbf_goniometer goniometer,\n" - " unsigned int reserved, double ratio, double initial1,\n" - " double initial2, double initial3, double *final1,\n" - " double *final2, double *final3);\n" + "C prototype: int cbf_get_beam_center_sf (cbf_detector detector,\n" + " double *indexslow, double *indexfast, double *centerslow,\n" + " double *centerfast);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_rotate_vector sets *final1, *final2, and *final3 to the 3 \n" - "components of the of the vector (initial1, initial2, initial3) after \n" - "reorientation by applying the goniometer rotations. The value ratio \n" - "specif ies the goniometer setting and varies from 0.0 at the \n" - "beginning of the exposure to 1.0 at the end, irrespective of the \n" - "actual rotation range.\n" - "Any of the destination pointers may be NULL.\n" - "The parameter reserved is presently unused and should be set to 0.\n" + "cbf_get_beam_center sets *centerfast and *centerslow to the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector and *indexfast and \n" + "*indexslow to the corresponding indices. cbf_set_beam_center sets the \n" + "offsets in the axis category for the detector element axis with \n" + "precedence 1 to place the beam center at the position given in mm by \n" + "*centerfast and *centerslow as the displacements in mm along the \n" + "detector axes from pixel (0, 0) to the point at which the beam \n" + "intersects the detector at the indices given *indexfast and \n" + "*indexslow. cbf_set_reference_beam_center sets the displacments in \n" + "the array_structure_list_axis category to place the beam center at \n" + "the position given in mm by *centerfast and *centerslow as the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector at the indices given \n" + "by *indexfast and *indexslow. In order to achieve consistent results, \n" + "a reference detector should be used for detector to have all axes at \n" + "their reference settings.\n" + "Note that the precedence 1 axis is the fastest axis, so that \n" + "*centerfast and *indexfast are the fast axis components of the center \n" + "and *centerslow and *indexslow are the slow axis components of the \n" + "center.\n" + "The _fs calls give the displacments in a fast-to-slow order. The \n" + "calls with no suffix and the calls _sf calls give the displacements \n" + "in slow-to-fast order\n" + "Any of the destination pointers may be NULL for getting the beam \n" + "center. For setting the beam axis, either the indices of the center \n" + "must not be NULL.\n" + "The indices are non-negative for beam centers within the detector \n" + "surface, but the center for an axis with a negative increment will be \n" + "negative for a beam center within the detector surface.\n" + "For cbf_set_beam_center if the diffrn_data_frame category exists with \n" + "a row for the corresponding element id, the values will be set for \n" + "_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in \n" + "millimetres and the value of _diffrn_data_frame.center_units will be \n" + "set to 'mm'.\n" + "For cbf_set_reference_beam_center if the diffrn_detector_element \n" + "category exists with a row for the corresponding element id, the \n" + "values will be set for _diffrn_detector_element.reference_center_fast \n" + "and _diffrn_detector_element.reference_center_slow in millimetres and \n" + "the value of _diffrn_detector_element.reference_units will be set to \n" + "'mm'.\n" "ARGUMENTS\n" - "goniometer Goniometer handle. reserved Unused. Any value other \n" - "than 0 is invalid. ratio Goniometer setting. 0 = beginning of \n" - "exposure, 1 = end. initial1 x component of the initial vector. \n" - "initial2 y component of the initial vector. initial3 z \n" - "component of the initial vector. vector1 Pointer to the \n" - "destination x component of the final vector. vector2 Pointer to \n" - "the destination y component of the final vector. vector3 Pointer \n" - "to the destination z component of the final vector.\n" + "detector Detector handle. indexfast Pointer to the destination \n" + "fast index. indexslow Pointer to the destination slow index. \n" + "centerfast Pointer to the destination displacement along the fast \n" + "axis. centerslow Pointer to the destination displacement along the \n" + "slow axis.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_positioner_struct_get_goniometer_poise", _wrap_cbf_positioner_struct_get_goniometer_poise, METH_VARARGS, (char *)"\n" + { "cbf_detector_struct_set_beam_center", _wrap_cbf_detector_struct_set_beam_center, METH_O, "\n" "\n" - "Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2,\n" - " Float offset3,Float angle\n" - "*args : Float ratio\n" + "Returns : \n" + "*args : double indexslow,double indexfast,double centerslow,double centerfast\n" "\n" - "C prototype: int cbf_get_goniometer_poise(cbf_goniometer goniometer,\n" - " double ratio, double * vector1, double * vector2,\n" - " double * vector3, double * offset1, double * offset2,\n" - " double * offset3, double * angle);\n" + "C prototype: int cbf_set_beam_center (cbf_detector detector,\n" + " double *indexslow, double *indexfast, double *centerslow,\n" + " double *centerfast);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_axis_poise sets vector1, vector2, vector3 to point to the \n" - "components of the axis vector for axis axis_id, offset1, offset2, \n" - "offset3 to point to the components of the axis base offset vector for \n" - "axis axis_id, and angle to point to the angle of rotation of axis \n" - "axis_id after application of the axis settings for frame frame_id, \n" - "using ratio, a value between 0 and 1, indicating how far into the \n" - "internal motion in the frame to go. If frame_id is the string \". \n" - "\", the first frame found is used. If there is more than one frame, \n" - "which frame will be found is indeterminate. If frame_id is NULL, the \n" - "overall setting for the scan are used, rather than those for any \n" - "particular frame. The vector and offset reported are the reference \n" - "vector and offset of the axis axis_id transformed by application of \n" - "all motions of the axes on which axis_id depends.\n" - "cbf_get_goniometer_poise vector1, vector2, vector3 to point to the \n" - "components of the axis vector for the goniometer axis, offset1, \n" - "offset2, offset3 to point to the components of the axis base offset \n" - "vector for the goniometer axis, and angle to point to the angle of \n" - "rotation of the goniometer axis after application of all axis \n" - "settings in the goniometer deriving the vector, offset and angle from \n" - "the resulting matrix. Calculation of the vector is indeterminate if \n" - "the angle is zero.\n" - "cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point \n" - "to the components of the axis vector for axis axis_id, offset1, \n" - "offset2, offset3 to point to the components of the axis base offset \n" - "vector for axis axis_id unmodified by axis rotations. Any of the \n" - "pointers may be specified as NULL.\n" + "cbf_get_beam_center sets *centerfast and *centerslow to the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector and *indexfast and \n" + "*indexslow to the corresponding indices. cbf_set_beam_center sets the \n" + "offsets in the axis category for the detector element axis with \n" + "precedence 1 to place the beam center at the position given in mm by \n" + "*centerfast and *centerslow as the displacements in mm along the \n" + "detector axes from pixel (0, 0) to the point at which the beam \n" + "intersects the detector at the indices given *indexfast and \n" + "*indexslow. cbf_set_reference_beam_center sets the displacments in \n" + "the array_structure_list_axis category to place the beam center at \n" + "the position given in mm by *centerfast and *centerslow as the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector at the indices given \n" + "by *indexfast and *indexslow. In order to achieve consistent results, \n" + "a reference detector should be used for detector to have all axes at \n" + "their reference settings.\n" + "Note that the precedence 1 axis is the fastest axis, so that \n" + "*centerfast and *indexfast are the fast axis components of the center \n" + "and *centerslow and *indexslow are the slow axis components of the \n" + "center.\n" + "The _fs calls give the displacments in a fast-to-slow order. The \n" + "calls with no suffix and the calls _sf calls give the displacements \n" + "in slow-to-fast order\n" + "Any of the destination pointers may be NULL for getting the beam \n" + "center. For setting the beam axis, either the indices of the center \n" + "must not be NULL.\n" + "The indices are non-negative for beam centers within the detector \n" + "surface, but the center for an axis with a negative increment will be \n" + "negative for a beam center within the detector surface.\n" + "For cbf_set_beam_center if the diffrn_data_frame category exists with \n" + "a row for the corresponding element id, the values will be set for \n" + "_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in \n" + "millimetres and the value of _diffrn_data_frame.center_units will be \n" + "set to 'mm'.\n" + "For cbf_set_reference_beam_center if the diffrn_detector_element \n" + "category exists with a row for the corresponding element id, the \n" + "values will be set for _diffrn_detector_element.reference_center_fast \n" + "and _diffrn_detector_element.reference_center_slow in millimetres and \n" + "the value of _diffrn_detector_element.reference_units will be set to \n" + "'mm'.\n" "ARGUMENTS\n" - "handle CBF handle. ratio A number between 0 and 1 \n" - "indication how far into the frame to go vector1 Pointer to the \n" - "first component of the axis vector vector2 Pointer to the second \n" - "component of the axis vector vector3 Pointer to the third \n" - "component of the axis vector offset1 Pointer to the first \n" - "component of the axis offset offset2 Pointer to the second \n" - "component of the axis offset offset3 Pointer to the third \n" - "component of the axis offset angle Pointer to the rotation \n" - "angle axis_id The specified axis frame_id The specified \n" - "frame positioner CBF goniometer\n" + "detector Detector handle. indexfast Pointer to the destination \n" + "fast index. indexslow Pointer to the destination slow index. \n" + "centerfast Pointer to the destination displacement along the fast \n" + "axis. centerslow Pointer to the destination displacement along the \n" + "slow axis.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_positioner_struct_get_reciprocal", _wrap_cbf_positioner_struct_get_reciprocal, METH_VARARGS, (char *)"\n" + { "cbf_detector_struct_set_beam_center_fs", _wrap_cbf_detector_struct_set_beam_center_fs, METH_O, "\n" "\n" - "Returns : double reciprocal1,double reciprocal2,double reciprocal3\n" - "*args : double ratio,double wavelength,double real1,double real2,double real3\n" + "Returns : \n" + "*args : double indexfast,double indexslow,double centerfast,double centerslow\n" "\n" - "C prototype: int cbf_get_reciprocal (cbf_goniometer goniometer,\n" - " unsigned int reserved, double ratio, double wavelength,\n" - " double real1, double real2, double real3,\n" - " double *reciprocal1, double *reciprocal2,\n" - " double *reciprocal3);\n" + "C prototype: int cbf_set_beam_center_fs (cbf_detector detector,\n" + " double *indexfast, double *indexslow, double *centerfast,\n" + " double *centerslow);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_reciprocal sets *reciprocal1, * reciprocal2, and * \n" - "reciprocal3 to the 3 components of the of the reciprocal-space vector \n" - "corresponding to the real-space vector (real1, real2, real3). The \n" - "reciprocal-space vector is oriented to correspond to the goniometer \n" - "setting with all axes at 0. The value wavelength is the wavlength in \n" - "AA and the value ratio specifies the current goniometer setting and \n" - "varies from 0.0 at the beginning of the exposur e to 1.0 at the end, \n" - "irrespective of the actual rotation range.\n" - "Any of the destination pointers may be NULL.\n" - "The parameter reserved is presently unused and should be set to 0.\n" + "cbf_get_beam_center sets *centerfast and *centerslow to the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector and *indexfast and \n" + "*indexslow to the corresponding indices. cbf_set_beam_center sets the \n" + "offsets in the axis category for the detector element axis with \n" + "precedence 1 to place the beam center at the position given in mm by \n" + "*centerfast and *centerslow as the displacements in mm along the \n" + "detector axes from pixel (0, 0) to the point at which the beam \n" + "intersects the detector at the indices given *indexfast and \n" + "*indexslow. cbf_set_reference_beam_center sets the displacments in \n" + "the array_structure_list_axis category to place the beam center at \n" + "the position given in mm by *centerfast and *centerslow as the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector at the indices given \n" + "by *indexfast and *indexslow. In order to achieve consistent results, \n" + "a reference detector should be used for detector to have all axes at \n" + "their reference settings.\n" + "Note that the precedence 1 axis is the fastest axis, so that \n" + "*centerfast and *indexfast are the fast axis components of the center \n" + "and *centerslow and *indexslow are the slow axis components of the \n" + "center.\n" + "The _fs calls give the displacments in a fast-to-slow order. The \n" + "calls with no suffix and the calls _sf calls give the displacements \n" + "in slow-to-fast order\n" + "Any of the destination pointers may be NULL for getting the beam \n" + "center. For setting the beam axis, either the indices of the center \n" + "must not be NULL.\n" + "The indices are non-negative for beam centers within the detector \n" + "surface, but the center for an axis with a negative increment will be \n" + "negative for a beam center within the detector surface.\n" + "For cbf_set_beam_center if the diffrn_data_frame category exists with \n" + "a row for the corresponding element id, the values will be set for \n" + "_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in \n" + "millimetres and the value of _diffrn_data_frame.center_units will be \n" + "set to 'mm'.\n" + "For cbf_set_reference_beam_center if the diffrn_detector_element \n" + "category exists with a row for the corresponding element id, the \n" + "values will be set for _diffrn_detector_element.reference_center_fast \n" + "and _diffrn_detector_element.reference_center_slow in millimetres and \n" + "the value of _diffrn_detector_element.reference_units will be set to \n" + "'mm'.\n" "ARGUMENTS\n" - "goniometer Goniometer handle. reserved Unused. Any value \n" - "other than 0 is invalid. ratio Goniometer setting. 0 = \n" - "beginning of exposure, 1 = end. wavelength Wavelength in AA. real1 \n" - " x component of the real-space vector. real2 y \n" - "component of the real-space vector. real3 z component of the \n" - "real-space vector. reciprocal1 Pointer to the destination x \n" - "component of the reciprocal-space vector. reciprocal2 Pointer to \n" - "the destination y component of the reciprocal-space vector. \n" - "reciprocal3 Pointer to the destination z component of the \n" - "reciprocal-space vector.\n" + "detector Detector handle. indexfast Pointer to the destination \n" + "fast index. indexslow Pointer to the destination slow index. \n" + "centerfast Pointer to the destination displacement along the fast \n" + "axis. centerslow Pointer to the destination displacement along the \n" + "slow axis.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_positioner_struct_get_rotation_axis", _wrap_cbf_positioner_struct_get_rotation_axis, METH_VARARGS, (char *)"\n" + { "cbf_detector_struct_set_beam_center_sf", _wrap_cbf_detector_struct_set_beam_center_sf, METH_O, "\n" "\n" - "Returns : double vector1,double vector2,double vector3\n" - "*args : \n" + "Returns : \n" + "*args : double indexslow,double indexfast,double centerslow,double centerfast\n" "\n" - "C prototype: int cbf_get_rotation_axis (cbf_goniometer goniometer,\n" - " unsigned int reserved, double *vector1, double *vector2,\n" - " double *vector3);\n" + "C prototype: int cbf_set_beam_center_sf (cbf_detector detector,\n" + " double *indexslow, double *indexfast, double *centerslow,\n" + " double *centerfast);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_rotation_axis sets *vector1, *vector2, and *vector3 to the 3 \n" - "components of the goniometer rotation axis used for the exposure.\n" - "Any of the destination pointers may be NULL.\n" - "The parameter reserved is presently unused and should be set to 0.\n" + "cbf_get_beam_center sets *centerfast and *centerslow to the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector and *indexfast and \n" + "*indexslow to the corresponding indices. cbf_set_beam_center sets the \n" + "offsets in the axis category for the detector element axis with \n" + "precedence 1 to place the beam center at the position given in mm by \n" + "*centerfast and *centerslow as the displacements in mm along the \n" + "detector axes from pixel (0, 0) to the point at which the beam \n" + "intersects the detector at the indices given *indexfast and \n" + "*indexslow. cbf_set_reference_beam_center sets the displacments in \n" + "the array_structure_list_axis category to place the beam center at \n" + "the position given in mm by *centerfast and *centerslow as the \n" + "displacements in mm along the detector axes from pixel (0, 0) to the \n" + "point at which the beam intersects the detector at the indices given \n" + "by *indexfast and *indexslow. In order to achieve consistent results, \n" + "a reference detector should be used for detector to have all axes at \n" + "their reference settings.\n" + "Note that the precedence 1 axis is the fastest axis, so that \n" + "*centerfast and *indexfast are the fast axis components of the center \n" + "and *centerslow and *indexslow are the slow axis components of the \n" + "center.\n" + "The _fs calls give the displacments in a fast-to-slow order. The \n" + "calls with no suffix and the calls _sf calls give the displacements \n" + "in slow-to-fast order\n" + "Any of the destination pointers may be NULL for getting the beam \n" + "center. For setting the beam axis, either the indices of the center \n" + "must not be NULL.\n" + "The indices are non-negative for beam centers within the detector \n" + "surface, but the center for an axis with a negative increment will be \n" + "negative for a beam center within the detector surface.\n" + "For cbf_set_beam_center if the diffrn_data_frame category exists with \n" + "a row for the corresponding element id, the values will be set for \n" + "_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in \n" + "millimetres and the value of _diffrn_data_frame.center_units will be \n" + "set to 'mm'.\n" + "For cbf_set_reference_beam_center if the diffrn_detector_element \n" + "category exists with a row for the corresponding element id, the \n" + "values will be set for _diffrn_detector_element.reference_center_fast \n" + "and _diffrn_detector_element.reference_center_slow in millimetres and \n" + "the value of _diffrn_detector_element.reference_units will be set to \n" + "'mm'.\n" "ARGUMENTS\n" - "goniometer Goniometer handle. reserved Unused. Any value other \n" - "than 0 is invalid. vector1 Pointer to the destination x \n" - "component of the rotation axis. vector2 Pointer to the \n" - "destination y component of the rotation axis. vector3 Pointer to \n" - "the destination z component of the rotation axis.\n" + "detector Detector handle. indexfast Pointer to the destination \n" + "fast index. indexslow Pointer to the destination slow index. \n" + "centerfast Pointer to the destination displacement along the fast \n" + "axis. centerslow Pointer to the destination displacement along the \n" + "slow axis.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_positioner_struct_swigregister", cbf_positioner_struct_swigregister, METH_VARARGS, NULL}, - { (char *)"cbf_detector_struct_positioner_set", _wrap_cbf_detector_struct_positioner_set, METH_VARARGS, (char *)"cbf_detector_struct_positioner_set(cbf_detector_struct self, cbf_positioner_struct positioner)"}, - { (char *)"cbf_detector_struct_positioner_get", _wrap_cbf_detector_struct_positioner_get, METH_VARARGS, (char *)"cbf_detector_struct_positioner_get(cbf_detector_struct self) -> cbf_positioner_struct"}, - { (char *)"cbf_detector_struct_displacement_set", _wrap_cbf_detector_struct_displacement_set, METH_VARARGS, (char *)"cbf_detector_struct_displacement_set(cbf_detector_struct self, double [2] displacement)"}, - { (char *)"cbf_detector_struct_displacement_get", _wrap_cbf_detector_struct_displacement_get, METH_VARARGS, (char *)"cbf_detector_struct_displacement_get(cbf_detector_struct self) -> double [2]"}, - { (char *)"cbf_detector_struct_increment_set", _wrap_cbf_detector_struct_increment_set, METH_VARARGS, (char *)"cbf_detector_struct_increment_set(cbf_detector_struct self, double [2] increment)"}, - { (char *)"cbf_detector_struct_increment_get", _wrap_cbf_detector_struct_increment_get, METH_VARARGS, (char *)"cbf_detector_struct_increment_get(cbf_detector_struct self) -> double [2]"}, - { (char *)"cbf_detector_struct_axes_set", _wrap_cbf_detector_struct_axes_set, METH_VARARGS, (char *)"cbf_detector_struct_axes_set(cbf_detector_struct self, size_t axes)"}, - { (char *)"cbf_detector_struct_axes_get", _wrap_cbf_detector_struct_axes_get, METH_VARARGS, (char *)"cbf_detector_struct_axes_get(cbf_detector_struct self) -> size_t"}, - { (char *)"cbf_detector_struct_index_set", _wrap_cbf_detector_struct_index_set, METH_VARARGS, (char *)"cbf_detector_struct_index_set(cbf_detector_struct self, size_t [2] index)"}, - { (char *)"cbf_detector_struct_index_get", _wrap_cbf_detector_struct_index_get, METH_VARARGS, (char *)"cbf_detector_struct_index_get(cbf_detector_struct self) -> size_t [2]"}, - { (char *)"new_cbf_detector_struct", _wrap_new_cbf_detector_struct, METH_VARARGS, (char *)"new_cbf_detector_struct() -> cbf_detector_struct"}, - { (char *)"delete_cbf_detector_struct", _wrap_delete_cbf_detector_struct, METH_VARARGS, (char *)"delete_cbf_detector_struct(cbf_detector_struct self)"}, - { (char *)"cbf_detector_struct_set_beam_center_fs", _wrap_cbf_detector_struct_set_beam_center_fs, METH_VARARGS, (char *)"\n" + { "cbf_detector_struct_set_reference_beam_center", _wrap_cbf_detector_struct_set_reference_beam_center, METH_O, "\n" "\n" "Returns : \n" - "*args : double indexfast,double indexslow,double centerfast,double centerslow\n" + "*args : double indexslow,double indexfast,double centerslow,double centerfast\n" "\n" - "C prototype: int cbf_set_beam_center_fs (cbf_detector detector,\n" - " double *indexfast, double *indexslow, double *centerfast,\n" - " double *centerslow);\n" + "C prototype: int cbf_set_reference_beam_center (cbf_detector detector,\n" + " double *indexslow, double *indexfast, double *centerslow,\n" + " double *centerfast);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" @@ -21399,7 +21220,7 @@ static PyMethodDef SwigMethods[] = { "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_detector_struct_set_reference_beam_center_fs", _wrap_cbf_detector_struct_set_reference_beam_center_fs, METH_VARARGS, (char *)"\n" + { "cbf_detector_struct_set_reference_beam_center_fs", _wrap_cbf_detector_struct_set_reference_beam_center_fs, METH_O, "\n" "\n" "Returns : \n" "*args : double indexfast,double indexslow,double centerfast,double centerslow\n" @@ -21462,13 +21283,13 @@ static PyMethodDef SwigMethods[] = { "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_detector_struct_get_beam_center", _wrap_cbf_detector_struct_get_beam_center, METH_VARARGS, (char *)"\n" + { "cbf_detector_struct_set_reference_beam_center_sf", _wrap_cbf_detector_struct_set_reference_beam_center_sf, METH_O, "\n" "\n" - "Returns : double index1,double index2,double center1,double center2\n" - "*args : \n" + "Returns : \n" + "*args : double indexslow,double indexfast,double centerslow,double centerfast\n" "\n" - "C prototype: int cbf_get_beam_center (cbf_detector detector,\n" - " double *indexslow, double *indexfast, double *centerslow,\n" + "C prototype: int cbf_set_reference_beam_center_sf (cbf_detector detector,\n" + " double *indexslow, double *indexfast, double *centerslow,\n" " double *centerfast);\n" "\n" "CBFLib documentation:\n" @@ -21515,24 +21336,238 @@ static PyMethodDef SwigMethods[] = { "the value of _diffrn_detector_element.reference_units will be set to \n" "'mm'.\n" "ARGUMENTS\n" - "detector Detector handle. indexfast Pointer to the destination \n" - "fast index. indexslow Pointer to the destination slow index. \n" - "centerfast Pointer to the destination displacement along the fast \n" - "axis. centerslow Pointer to the destination displacement along the \n" - "slow axis.\n" + "detector Detector handle. indexfast Pointer to the destination \n" + "fast index. indexslow Pointer to the destination slow index. \n" + "centerfast Pointer to the destination displacement along the fast \n" + "axis. centerslow Pointer to the destination displacement along the \n" + "slow axis.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_detector_distance", _wrap_cbf_detector_struct_get_detector_distance, METH_O, "\n" + "\n" + "Returns : double distance\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_detector_distance (cbf_detector detector,\n" + " double *distance);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_detector_distance sets *distance to the nearest distance from \n" + "the sample position to the detector plane.\n" + "ARGUMENTS\n" + "detector Detector handle. distance Pointer to the destination \n" + "distance.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_detector_normal", _wrap_cbf_detector_struct_get_detector_normal, METH_O, "\n" + "\n" + "Returns : double normal1,double normal2,double normal3\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_detector_normal (cbf_detector detector,\n" + " double *normal1, double *normal2, double *normal3);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_detector_normal sets *normal1, *normal2, and *normal3 to the \n" + "3 components of the of the normal vector to the detector plane. The \n" + "vector is normalized.\n" + "Any of the destination pointers may be NULL.\n" + "ARGUMENTS\n" + "detector Detector handle. normal1 Pointer to the destination x \n" + "component of the normal vector. normal2 Pointer to the destination \n" + "y component of the normal vector. normal3 Pointer to the \n" + "destination z component of the normal vector.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_detector_axis_slow", _wrap_cbf_detector_struct_get_detector_axis_slow, METH_O, "\n" + "\n" + "Returns : double slowaxis1,double slowaxis2,double slowaxis3\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_detector_axis_slow (cbf_detector detector,\n" + " double *slowaxis1, double *slowaxis2, double *slowaxis3);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and \n" + "*slowaxis3 to the 3 components of the slow axis of the specified \n" + "detector at the current settings of all axes. \n" + "cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and \n" + "*fastaxis3 to the 3 components of the fast axis of the specified \n" + "detector at the current settings of all axes. cbf_get_detector_axes, \n" + "cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set \n" + "*slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the \n" + "slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 \n" + "components of the fast axis of the specified detector at the current \n" + "settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 \n" + "and *axis_id2 to the names of the two surface axes of the detector or \n" + " \". \",\n" + "Any of the destination pointers may be NULL.\n" + "ARGUMENTS\n" + "detector Detector handle. slowaxis1 Pointer to the destination x \n" + "component of the slow axis vector. slowaxis2 Pointer to the \n" + "destination y component of the slow axis vector. slowaxis3 Pointer \n" + "to the destination z component of the slow axis vector. fastaxis1 \n" + "Pointer to the destination x component of the fast axis vector. \n" + "fastaxis2 Pointer to the destination y component of the fast axis \n" + "vector. fastaxis3 Pointer to the destination z component of the \n" + "fast axis vector. axis_id1 Pointer to the destination first \n" + "surface axis name. axis_id1 Pointer to the destination first \n" + "surface axis name. axis_id2 Pointer to the destination second \n" + "surface axis name.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_detector_axis_fast", _wrap_cbf_detector_struct_get_detector_axis_fast, METH_O, "\n" + "\n" + "Returns : double fastaxis1,double fastaxis2,double fastaxis3\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_detector_axis_fast (cbf_detector detector,\n" + " double *fastaxis1, double *fastaxis2, double *fastaxis3);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and \n" + "*slowaxis3 to the 3 components of the slow axis of the specified \n" + "detector at the current settings of all axes. \n" + "cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and \n" + "*fastaxis3 to the 3 components of the fast axis of the specified \n" + "detector at the current settings of all axes. cbf_get_detector_axes, \n" + "cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set \n" + "*slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the \n" + "slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 \n" + "components of the fast axis of the specified detector at the current \n" + "settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 \n" + "and *axis_id2 to the names of the two surface axes of the detector or \n" + " \". \",\n" + "Any of the destination pointers may be NULL.\n" + "ARGUMENTS\n" + "detector Detector handle. slowaxis1 Pointer to the destination x \n" + "component of the slow axis vector. slowaxis2 Pointer to the \n" + "destination y component of the slow axis vector. slowaxis3 Pointer \n" + "to the destination z component of the slow axis vector. fastaxis1 \n" + "Pointer to the destination x component of the fast axis vector. \n" + "fastaxis2 Pointer to the destination y component of the fast axis \n" + "vector. fastaxis3 Pointer to the destination z component of the \n" + "fast axis vector. axis_id1 Pointer to the destination first \n" + "surface axis name. axis_id1 Pointer to the destination first \n" + "surface axis name. axis_id2 Pointer to the destination second \n" + "surface axis name.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_detector_axes", _wrap_cbf_detector_struct_get_detector_axes, METH_O, "\n" + "\n" + "Returns : double slowaxis1,double slowaxis2,double slowaxis3,double fastaxis1,\n" + " double fastaxis2,double fastaxis3\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_detector_axes (cbf_detector detector,\n" + " double *slowaxis1, double *slowaxis2, double *slowaxis3,\n" + " double *fastaxis1, double *fastaxis2, double *fastaxis3);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and \n" + "*slowaxis3 to the 3 components of the slow axis of the specified \n" + "detector at the current settings of all axes. \n" + "cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and \n" + "*fastaxis3 to the 3 components of the fast axis of the specified \n" + "detector at the current settings of all axes. cbf_get_detector_axes, \n" + "cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set \n" + "*slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the \n" + "slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 \n" + "components of the fast axis of the specified detector at the current \n" + "settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 \n" + "and *axis_id2 to the names of the two surface axes of the detector or \n" + " \". \",\n" + "Any of the destination pointers may be NULL.\n" + "ARGUMENTS\n" + "detector Detector handle. slowaxis1 Pointer to the destination x \n" + "component of the slow axis vector. slowaxis2 Pointer to the \n" + "destination y component of the slow axis vector. slowaxis3 Pointer \n" + "to the destination z component of the slow axis vector. fastaxis1 \n" + "Pointer to the destination x component of the fast axis vector. \n" + "fastaxis2 Pointer to the destination y component of the fast axis \n" + "vector. fastaxis3 Pointer to the destination z component of the \n" + "fast axis vector. axis_id1 Pointer to the destination first \n" + "surface axis name. axis_id1 Pointer to the destination first \n" + "surface axis name. axis_id2 Pointer to the destination second \n" + "surface axis name.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_detector_struct_get_detector_axes_fs", _wrap_cbf_detector_struct_get_detector_axes_fs, METH_O, "cbf_detector_struct_get_detector_axes_fs(cbf_detector_struct self)"}, + { "cbf_detector_struct_get_detector_axes_sf", _wrap_cbf_detector_struct_get_detector_axes_sf, METH_O, "\n" + "\n" + "Returns : double slowaxis1,double slowaxis2,double slowaxis3,double fastaxis1,\n" + " double fastaxis2,double fastaxis3\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_detector_axes_sf (cbf_detector detector,\n" + " double *slowaxis1, double *slowaxis2, double *slowaxis3,\n" + " double *fastaxis1, double *fastaxis2, double *fastaxis3);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and \n" + "*slowaxis3 to the 3 components of the slow axis of the specified \n" + "detector at the current settings of all axes. \n" + "cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and \n" + "*fastaxis3 to the 3 components of the fast axis of the specified \n" + "detector at the current settings of all axes. cbf_get_detector_axes, \n" + "cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set \n" + "*slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the \n" + "slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 \n" + "components of the fast axis of the specified detector at the current \n" + "settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 \n" + "and *axis_id2 to the names of the two surface axes of the detector or \n" + " \". \",\n" + "Any of the destination pointers may be NULL.\n" + "ARGUMENTS\n" + "detector Detector handle. slowaxis1 Pointer to the destination x \n" + "component of the slow axis vector. slowaxis2 Pointer to the \n" + "destination y component of the slow axis vector. slowaxis3 Pointer \n" + "to the destination z component of the slow axis vector. fastaxis1 \n" + "Pointer to the destination x component of the fast axis vector. \n" + "fastaxis2 Pointer to the destination y component of the fast axis \n" + "vector. fastaxis3 Pointer to the destination z component of the \n" + "fast axis vector. axis_id1 Pointer to the destination first \n" + "surface axis name. axis_id1 Pointer to the destination first \n" + "surface axis name. axis_id2 Pointer to the destination second \n" + "surface axis name.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_detector_struct_get_pixel_coordinates_fs", _wrap_cbf_detector_struct_get_pixel_coordinates_fs, METH_VARARGS, (char *)"\n" + { "cbf_detector_struct_get_detector_surface_axes", _wrap_cbf_detector_struct_get_detector_surface_axes, METH_VARARGS, "cbf_detector_struct_get_detector_surface_axes(cbf_detector_struct self, int index) -> char const *"}, + { "cbf_detector_struct_get_pixel_coordinates", _wrap_cbf_detector_struct_get_pixel_coordinates, METH_VARARGS, "\n" "\n" "Returns : double coordinate1,double coordinate2,double coordinate3\n" - "*args : double indexfast,double indexslow\n" + "*args : double index1,double index2\n" "\n" - "C prototype: int cbf_get_pixel_coordinates_fs (cbf_detector detector,\n" - " double indexfast, double indexslow, double *coordinate1,\n" - " double *coordinate2, double *coordinate3);\n" + "C prototype: int cbf_get_pixel_coordinates (cbf_detector detector,\n" + " double indexslow, double indexfast, double *coordinate1,\n" + " double *coordinate2, double *coordinate3);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" @@ -21552,69 +21587,67 @@ static PyMethodDef SwigMethods[] = { "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_detector_struct_get_inferred_pixel_size", _wrap_cbf_detector_struct_get_inferred_pixel_size, METH_VARARGS, (char *)"\n" + { "cbf_detector_struct_get_pixel_coordinates_fs", _wrap_cbf_detector_struct_get_pixel_coordinates_fs, METH_VARARGS, "\n" "\n" - "Returns : Float pixel size\n" - "*args : Int axis_number\n" + "Returns : double coordinate1,double coordinate2,double coordinate3\n" + "*args : double indexfast,double indexslow\n" "\n" - "C prototype: int cbf_get_inferred_pixel_size (cbf_detector detector,\n" - " int axis_number, double *psize);\n" + "C prototype: int cbf_get_pixel_coordinates_fs (cbf_detector detector,\n" + " double indexfast, double indexslow, double *coordinate1,\n" + " double *coordinate2, double *coordinate3);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_sf set \n" - "*psize to point to the double value in millimeters of the pixel size \n" - "for the axis axis_number value. The slow index is treated as axis 1 \n" - "and the next faster index is treated as axis 2. \n" - "cbf_get_inferred_pixel_size_fs sets *psize to point to the double \n" - "value in millimeters of the pixel size for the axis axis_number \n" - "value. The fast index is treated as axis 1 and the next slower index \n" - "is treated as axis 2.\n" - "If the axis number is negative, the axes are used in the reverse \n" - "order so that an axis_number of -1 indicates the fast axes in a call \n" - "to cbf_get_inferred_pixel_size or cbf_get_inferred_pixel_size_sf and \n" - "indicates the fast axis in a call to cbf_get_inferred_pixel_size_fs.\n" + "cbf_get_pixel_coordinates, cbf_get_pixel_coordinates_fs and \n" + "cbf_get_pixel_coordinates_sf ses *coordinate1, *coordinate2, and \n" + "*coordinate3 to the vector position of pixel (indexfast, indexslow) \n" + "on the detector surface. If indexslow and indexfast are integers then \n" + "the coordinates correspond to the center of a pixel.\n" + "Any of the destination pointers may be NULL.\n" "ARGUMENTS\n" - "detector Detector handle. axis_number The number of the axis. \n" - "area Pointer to the destination pizel size in mm.\n" + "detector Detector handle. indexslow Slow index. indexfast \n" + " Fast index. coordinate1 Pointer to the destination x component. \n" + "coordinate2 Pointer to the destination y component. coordinate3 \n" + "Pointer to the destination z component.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_detector_struct_get_pixel_area", _wrap_cbf_detector_struct_get_pixel_area, METH_VARARGS, (char *)"\n" + { "cbf_detector_struct_get_pixel_coordinates_sf", _wrap_cbf_detector_struct_get_pixel_coordinates_sf, METH_VARARGS, "\n" "\n" - "Returns : double area,double projected_area\n" - "*args : double index1,double index2\n" + "Returns : double coordinate1,double coordinate2,double coordinate3\n" + "*args : double indexslow,double indexfast\n" "\n" - "C prototype: int cbf_get_pixel_area (cbf_detector detector, double indexslow,\n" - " double indexfast, double *area, double *projected_area);\n" + "C prototype: int cbf_get_pixel_coordinates_sf (cbf_detector detector,\n" + " double indexslow, double indexfast, double *coordinate1,\n" + " double *coordinate2, double *coordinate3);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_pixel_area, cbf_get_pixel_area_fs and cbf_get_pixel_area_sf \n" - "set *area to the area of the pixel at (indexfast, indexslow) on the \n" - "detector surface and *projected_area to the apparent area of the \n" - "pixel as viewed from the sample position, with indexslow being the \n" - "slow axis and indexfast being the fast axis.\n" - "Either of the destination pointers may be NULL.\n" + "cbf_get_pixel_coordinates, cbf_get_pixel_coordinates_fs and \n" + "cbf_get_pixel_coordinates_sf ses *coordinate1, *coordinate2, and \n" + "*coordinate3 to the vector position of pixel (indexfast, indexslow) \n" + "on the detector surface. If indexslow and indexfast are integers then \n" + "the coordinates correspond to the center of a pixel.\n" + "Any of the destination pointers may be NULL.\n" "ARGUMENTS\n" - "detector Detector handle. indexfast Fast index. \n" - "indexslow Slow index. area Pointer to the \n" - "destination area in mm2. projected_area Pointer to the destination \n" - "apparent area in mm2.\n" + "detector Detector handle. indexslow Slow index. indexfast \n" + " Fast index. coordinate1 Pointer to the destination x component. \n" + "coordinate2 Pointer to the destination y component. coordinate3 \n" + "Pointer to the destination z component.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_detector_struct_get_pixel_normal_fs", _wrap_cbf_detector_struct_get_pixel_normal_fs, METH_VARARGS, (char *)"\n" + { "cbf_detector_struct_get_pixel_normal", _wrap_cbf_detector_struct_get_pixel_normal, METH_VARARGS, "\n" "\n" "Returns : double normal1,double normal2,double normal3\n" - "*args : double indexfast,double indexslow\n" + "*args : double index1,double index2\n" "\n" - "C prototype: int cbf_get_pixel_normal_fs (cbf_detector detector,\n" - " double indexfast, double indexslow, double *normal1,\n" + "C prototype: int cbf_get_pixel_normal (cbf_detector detector,\n" + " double indexslow, double indexfast, double *normal1,\n" " double *normal2, double *normal3);\n" "\n" "CBFLib documentation:\n" @@ -21635,181 +21668,120 @@ static PyMethodDef SwigMethods[] = { "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_detector_struct_get_detector_surface_axes", _wrap_cbf_detector_struct_get_detector_surface_axes, METH_VARARGS, (char *)"cbf_detector_struct_get_detector_surface_axes(cbf_detector_struct self, int index) -> char const *"}, - { (char *)"cbf_detector_struct_get_detector_axes", _wrap_cbf_detector_struct_get_detector_axes, METH_VARARGS, (char *)"\n" + { "cbf_detector_struct_get_pixel_normal_fs", _wrap_cbf_detector_struct_get_pixel_normal_fs, METH_VARARGS, "\n" "\n" - "Returns : double slowaxis1,double slowaxis2,double slowaxis3,double fastaxis1,\n" - " double fastaxis2,double fastaxis3\n" - "*args : \n" + "Returns : double normal1,double normal2,double normal3\n" + "*args : double indexfast,double indexslow\n" "\n" - "C prototype: int cbf_get_detector_axes (cbf_detector detector,\n" - " double *slowaxis1, double *slowaxis2, double *slowaxis3,\n" - " double *fastaxis1, double *fastaxis2, double *fastaxis3);\n" + "C prototype: int cbf_get_pixel_normal_fs (cbf_detector detector,\n" + " double indexfast, double indexslow, double *normal1,\n" + " double *normal2, double *normal3);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and \n" - "*slowaxis3 to the 3 components of the slow axis of the specified \n" - "detector at the current settings of all axes. \n" - "cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and \n" - "*fastaxis3 to the 3 components of the fast axis of the specified \n" - "detector at the current settings of all axes. cbf_get_detector_axes, \n" - "cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set \n" - "*slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the \n" - "slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 \n" - "components of the fast axis of the specified detector at the current \n" - "settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 \n" - "and *axis_id2 to the names of the two surface axes of the detector or \n" - " \". \",\n" + "cbf_get_detector_normal, cbf_get_pixel_normal_fs and \n" + "cbf_get_pixel_normal_sf set *normal1, *normal2, and *normal3 to the 3 \n" + "components of the of the normal vector to the pixel at (indexfast, \n" + "indexslow). The vector is normalized.\n" "Any of the destination pointers may be NULL.\n" "ARGUMENTS\n" - "detector Detector handle. slowaxis1 Pointer to the destination x \n" - "component of the slow axis vector. slowaxis2 Pointer to the \n" - "destination y component of the slow axis vector. slowaxis3 Pointer \n" - "to the destination z component of the slow axis vector. fastaxis1 \n" - "Pointer to the destination x component of the fast axis vector. \n" - "fastaxis2 Pointer to the destination y component of the fast axis \n" - "vector. fastaxis3 Pointer to the destination z component of the \n" - "fast axis vector. axis_id1 Pointer to the destination first \n" - "surface axis name. axis_id1 Pointer to the destination first \n" - "surface axis name. axis_id2 Pointer to the destination second \n" - "surface axis name.\n" + "detector Detector handle. indexslow Slow index. indexfast Fast \n" + "index. normal1 Pointer to the destination x component of the \n" + "normal vector. normal2 Pointer to the destination y component of \n" + "the normal vector. normal3 Pointer to the destination z component \n" + "of the normal vector.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_detector_struct_set_reference_beam_center", _wrap_cbf_detector_struct_set_reference_beam_center, METH_VARARGS, (char *)"\n" + { "cbf_detector_struct_get_pixel_area", _wrap_cbf_detector_struct_get_pixel_area, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : double indexslow,double indexfast,double centerslow,double centerfast\n" + "Returns : double area,double projected_area\n" + "*args : double index1,double index2\n" "\n" - "C prototype: int cbf_set_reference_beam_center (cbf_detector detector,\n" - " double *indexslow, double *indexfast, double *centerslow,\n" - " double *centerfast);\n" + "C prototype: int cbf_get_pixel_area (cbf_detector detector, double indexslow,\n" + " double indexfast, double *area, double *projected_area);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_beam_center sets *centerfast and *centerslow to the \n" - "displacements in mm along the detector axes from pixel (0, 0) to the \n" - "point at which the beam intersects the detector and *indexfast and \n" - "*indexslow to the corresponding indices. cbf_set_beam_center sets the \n" - "offsets in the axis category for the detector element axis with \n" - "precedence 1 to place the beam center at the position given in mm by \n" - "*centerfast and *centerslow as the displacements in mm along the \n" - "detector axes from pixel (0, 0) to the point at which the beam \n" - "intersects the detector at the indices given *indexfast and \n" - "*indexslow. cbf_set_reference_beam_center sets the displacments in \n" - "the array_structure_list_axis category to place the beam center at \n" - "the position given in mm by *centerfast and *centerslow as the \n" - "displacements in mm along the detector axes from pixel (0, 0) to the \n" - "point at which the beam intersects the detector at the indices given \n" - "by *indexfast and *indexslow. In order to achieve consistent results, \n" - "a reference detector should be used for detector to have all axes at \n" - "their reference settings.\n" - "Note that the precedence 1 axis is the fastest axis, so that \n" - "*centerfast and *indexfast are the fast axis components of the center \n" - "and *centerslow and *indexslow are the slow axis components of the \n" - "center.\n" - "The _fs calls give the displacments in a fast-to-slow order. The \n" - "calls with no suffix and the calls _sf calls give the displacements \n" - "in slow-to-fast order\n" - "Any of the destination pointers may be NULL for getting the beam \n" - "center. For setting the beam axis, either the indices of the center \n" - "must not be NULL.\n" - "The indices are non-negative for beam centers within the detector \n" - "surface, but the center for an axis with a negative increment will be \n" - "negative for a beam center within the detector surface.\n" - "For cbf_set_beam_center if the diffrn_data_frame category exists with \n" - "a row for the corresponding element id, the values will be set for \n" - "_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in \n" - "millimetres and the value of _diffrn_data_frame.center_units will be \n" - "set to 'mm'.\n" - "For cbf_set_reference_beam_center if the diffrn_detector_element \n" - "category exists with a row for the corresponding element id, the \n" - "values will be set for _diffrn_detector_element.reference_center_fast \n" - "and _diffrn_detector_element.reference_center_slow in millimetres and \n" - "the value of _diffrn_detector_element.reference_units will be set to \n" - "'mm'.\n" + "cbf_get_pixel_area, cbf_get_pixel_area_fs and cbf_get_pixel_area_sf \n" + "set *area to the area of the pixel at (indexfast, indexslow) on the \n" + "detector surface and *projected_area to the apparent area of the \n" + "pixel as viewed from the sample position, with indexslow being the \n" + "slow axis and indexfast being the fast axis.\n" + "Either of the destination pointers may be NULL.\n" "ARGUMENTS\n" - "detector Detector handle. indexfast Pointer to the destination \n" - "fast index. indexslow Pointer to the destination slow index. \n" - "centerfast Pointer to the destination displacement along the fast \n" - "axis. centerslow Pointer to the destination displacement along the \n" - "slow axis.\n" + "detector Detector handle. indexfast Fast index. \n" + "indexslow Slow index. area Pointer to the \n" + "destination area in mm2. projected_area Pointer to the destination \n" + "apparent area in mm2.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" - "\n" - ""}, - { (char *)"cbf_detector_struct_get_detector_axis_slow", _wrap_cbf_detector_struct_get_detector_axis_slow, METH_VARARGS, (char *)"\n" - "\n" - "Returns : double slowaxis1,double slowaxis2,double slowaxis3\n" - "*args : \n" - "\n" - "C prototype: int cbf_get_detector_axis_slow (cbf_detector detector,\n" - " double *slowaxis1, double *slowaxis2, double *slowaxis3);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and \n" - "*slowaxis3 to the 3 components of the slow axis of the specified \n" - "detector at the current settings of all axes. \n" - "cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and \n" - "*fastaxis3 to the 3 components of the fast axis of the specified \n" - "detector at the current settings of all axes. cbf_get_detector_axes, \n" - "cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set \n" - "*slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the \n" - "slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 \n" - "components of the fast axis of the specified detector at the current \n" - "settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 \n" - "and *axis_id2 to the names of the two surface axes of the detector or \n" - " \". \",\n" - "Any of the destination pointers may be NULL.\n" + "\n" + ""}, + { "cbf_detector_struct_get_pixel_area_fs", _wrap_cbf_detector_struct_get_pixel_area_fs, METH_VARARGS, "\n" + "\n" + "Returns : double area,double projected_area\n" + "*args : double indexfast,double indexslow\n" + "\n" + "C prototype: int cbf_get_pixel_area_fs(cbf_detector detector,\n" + " double indexfast, double indexslow, double *area,\n" + " double *projected_area);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_pixel_area, cbf_get_pixel_area_fs and cbf_get_pixel_area_sf \n" + "set *area to the area of the pixel at (indexfast, indexslow) on the \n" + "detector surface and *projected_area to the apparent area of the \n" + "pixel as viewed from the sample position, with indexslow being the \n" + "slow axis and indexfast being the fast axis.\n" + "Either of the destination pointers may be NULL.\n" "ARGUMENTS\n" - "detector Detector handle. slowaxis1 Pointer to the destination x \n" - "component of the slow axis vector. slowaxis2 Pointer to the \n" - "destination y component of the slow axis vector. slowaxis3 Pointer \n" - "to the destination z component of the slow axis vector. fastaxis1 \n" - "Pointer to the destination x component of the fast axis vector. \n" - "fastaxis2 Pointer to the destination y component of the fast axis \n" - "vector. fastaxis3 Pointer to the destination z component of the \n" - "fast axis vector. axis_id1 Pointer to the destination first \n" - "surface axis name. axis_id1 Pointer to the destination first \n" - "surface axis name. axis_id2 Pointer to the destination second \n" - "surface axis name.\n" + "detector Detector handle. indexfast Fast index. \n" + "indexslow Slow index. area Pointer to the \n" + "destination area in mm2. projected_area Pointer to the destination \n" + "apparent area in mm2.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_detector_struct_get_detector_distance", _wrap_cbf_detector_struct_get_detector_distance, METH_VARARGS, (char *)"\n" + { "cbf_detector_struct_get_pixel_area_sf", _wrap_cbf_detector_struct_get_pixel_area_sf, METH_VARARGS, "\n" "\n" - "Returns : double distance\n" - "*args : \n" + "Returns : double area,double projected_area\n" + "*args : double indexslow,double indexfast\n" "\n" - "C prototype: int cbf_get_detector_distance (cbf_detector detector,\n" - " double *distance);\n" + "C prototype: int cbf_get_pixel_area_sf(cbf_detector detector,\n" + " double indexslow, double indexfast, double *area,\n" + " double *projected_area);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_detector_distance sets *distance to the nearest distance from \n" - "the sample position to the detector plane.\n" + "cbf_get_pixel_area, cbf_get_pixel_area_fs and cbf_get_pixel_area_sf \n" + "set *area to the area of the pixel at (indexfast, indexslow) on the \n" + "detector surface and *projected_area to the apparent area of the \n" + "pixel as viewed from the sample position, with indexslow being the \n" + "slow axis and indexfast being the fast axis.\n" + "Either of the destination pointers may be NULL.\n" "ARGUMENTS\n" - "detector Detector handle. distance Pointer to the destination \n" - "distance.\n" + "detector Detector handle. indexfast Fast index. \n" + "indexslow Slow index. area Pointer to the \n" + "destination area in mm2. projected_area Pointer to the destination \n" + "apparent area in mm2.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_detector_struct_get_inferred_pixel_size_fs", _wrap_cbf_detector_struct_get_inferred_pixel_size_fs, METH_VARARGS, (char *)"\n" + { "cbf_detector_struct_get_inferred_pixel_size", _wrap_cbf_detector_struct_get_inferred_pixel_size, METH_VARARGS, "\n" "\n" "Returns : Float pixel size\n" "*args : Int axis_number\n" "\n" - "C prototype: int cbf_get_inferred_pixel_size_fs(cbf_detector detector,\n" - " int axis_number, double *psize);\n" + "C prototype: int cbf_get_inferred_pixel_size (cbf_detector detector,\n" + " int axis_number, double *psize);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" @@ -21833,693 +21805,549 @@ static PyMethodDef SwigMethods[] = { "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_detector_struct_get_detector_normal", _wrap_cbf_detector_struct_get_detector_normal, METH_VARARGS, (char *)"\n" - "\n" - "Returns : double normal1,double normal2,double normal3\n" - "*args : \n" - "\n" - "C prototype: int cbf_get_detector_normal (cbf_detector detector,\n" - " double *normal1, double *normal2, double *normal3);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_get_detector_normal sets *normal1, *normal2, and *normal3 to the \n" - "3 components of the of the normal vector to the detector plane. The \n" - "vector is normalized.\n" - "Any of the destination pointers may be NULL.\n" - "ARGUMENTS\n" - "detector Detector handle. normal1 Pointer to the destination x \n" - "component of the normal vector. normal2 Pointer to the destination \n" - "y component of the normal vector. normal3 Pointer to the \n" - "destination z component of the normal vector.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" - "\n" - ""}, - { (char *)"cbf_detector_struct_get_detector_axis_fast", _wrap_cbf_detector_struct_get_detector_axis_fast, METH_VARARGS, (char *)"\n" + { "cbf_detector_struct_get_inferred_pixel_size_fs", _wrap_cbf_detector_struct_get_inferred_pixel_size_fs, METH_VARARGS, "\n" "\n" - "Returns : double fastaxis1,double fastaxis2,double fastaxis3\n" - "*args : \n" + "Returns : Float pixel size\n" + "*args : Int axis_number\n" "\n" - "C prototype: int cbf_get_detector_axis_fast (cbf_detector detector,\n" - " double *fastaxis1, double *fastaxis2, double *fastaxis3);\n" + "C prototype: int cbf_get_inferred_pixel_size_fs(cbf_detector detector,\n" + " int axis_number, double *psize);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and \n" - "*slowaxis3 to the 3 components of the slow axis of the specified \n" - "detector at the current settings of all axes. \n" - "cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and \n" - "*fastaxis3 to the 3 components of the fast axis of the specified \n" - "detector at the current settings of all axes. cbf_get_detector_axes, \n" - "cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set \n" - "*slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the \n" - "slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 \n" - "components of the fast axis of the specified detector at the current \n" - "settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 \n" - "and *axis_id2 to the names of the two surface axes of the detector or \n" - " \". \",\n" - "Any of the destination pointers may be NULL.\n" + "cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_sf set \n" + "*psize to point to the double value in millimeters of the pixel size \n" + "for the axis axis_number value. The slow index is treated as axis 1 \n" + "and the next faster index is treated as axis 2. \n" + "cbf_get_inferred_pixel_size_fs sets *psize to point to the double \n" + "value in millimeters of the pixel size for the axis axis_number \n" + "value. The fast index is treated as axis 1 and the next slower index \n" + "is treated as axis 2.\n" + "If the axis number is negative, the axes are used in the reverse \n" + "order so that an axis_number of -1 indicates the fast axes in a call \n" + "to cbf_get_inferred_pixel_size or cbf_get_inferred_pixel_size_sf and \n" + "indicates the fast axis in a call to cbf_get_inferred_pixel_size_fs.\n" "ARGUMENTS\n" - "detector Detector handle. slowaxis1 Pointer to the destination x \n" - "component of the slow axis vector. slowaxis2 Pointer to the \n" - "destination y component of the slow axis vector. slowaxis3 Pointer \n" - "to the destination z component of the slow axis vector. fastaxis1 \n" - "Pointer to the destination x component of the fast axis vector. \n" - "fastaxis2 Pointer to the destination y component of the fast axis \n" - "vector. fastaxis3 Pointer to the destination z component of the \n" - "fast axis vector. axis_id1 Pointer to the destination first \n" - "surface axis name. axis_id1 Pointer to the destination first \n" - "surface axis name. axis_id2 Pointer to the destination second \n" - "surface axis name.\n" + "detector Detector handle. axis_number The number of the axis. \n" + "area Pointer to the destination pizel size in mm.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_detector_struct_get_detector_axes_fs", _wrap_cbf_detector_struct_get_detector_axes_fs, METH_VARARGS, (char *)"cbf_detector_struct_get_detector_axes_fs(cbf_detector_struct self)"}, - { (char *)"cbf_detector_struct_get_detector_axes_sf", _wrap_cbf_detector_struct_get_detector_axes_sf, METH_VARARGS, (char *)"\n" + { "cbf_detector_struct_get_inferred_pixel_size_sf", _wrap_cbf_detector_struct_get_inferred_pixel_size_sf, METH_VARARGS, "\n" "\n" - "Returns : double slowaxis1,double slowaxis2,double slowaxis3,double fastaxis1,\n" - " double fastaxis2,double fastaxis3\n" - "*args : \n" + "Returns : Float pixel size\n" + "*args : Int axis_number\n" "\n" - "C prototype: int cbf_get_detector_axes_sf (cbf_detector detector,\n" - " double *slowaxis1, double *slowaxis2, double *slowaxis3,\n" - " double *fastaxis1, double *fastaxis2, double *fastaxis3);\n" + "C prototype: int cbf_get_inferred_pixel_size_sf(cbf_detector detector,\n" + " int axis_number, double *psize);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_detector_axis_slow sets *slowaxis1, *slowaxis2, and \n" - "*slowaxis3 to the 3 components of the slow axis of the specified \n" - "detector at the current settings of all axes. \n" - "cbf_get_detector_axis_slow sets *fastaxis1, *fastaxis2, and \n" - "*fastaxis3 to the 3 components of the fast axis of the specified \n" - "detector at the current settings of all axes. cbf_get_detector_axes, \n" - "cbf_get_detector_axes_fs and int cbf_get_detector_axes_sf set \n" - "*slowaxis1, *slowaxis2, and *slowaxis3 to the 3 components of the \n" - "slow axis and *fastaxis1, *fastaxis2, and *fastaxis3 to the 3 \n" - "components of the fast axis of the specified detector at the current \n" - "settings of all axes. cbf_get_detector_surface_axes sets *axis_id1 \n" - "and *axis_id2 to the names of the two surface axes of the detector or \n" - " \". \",\n" - "Any of the destination pointers may be NULL.\n" + "cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_sf set \n" + "*psize to point to the double value in millimeters of the pixel size \n" + "for the axis axis_number value. The slow index is treated as axis 1 \n" + "and the next faster index is treated as axis 2. \n" + "cbf_get_inferred_pixel_size_fs sets *psize to point to the double \n" + "value in millimeters of the pixel size for the axis axis_number \n" + "value. The fast index is treated as axis 1 and the next slower index \n" + "is treated as axis 2.\n" + "If the axis number is negative, the axes are used in the reverse \n" + "order so that an axis_number of -1 indicates the fast axes in a call \n" + "to cbf_get_inferred_pixel_size or cbf_get_inferred_pixel_size_sf and \n" + "indicates the fast axis in a call to cbf_get_inferred_pixel_size_fs.\n" "ARGUMENTS\n" - "detector Detector handle. slowaxis1 Pointer to the destination x \n" - "component of the slow axis vector. slowaxis2 Pointer to the \n" - "destination y component of the slow axis vector. slowaxis3 Pointer \n" - "to the destination z component of the slow axis vector. fastaxis1 \n" - "Pointer to the destination x component of the fast axis vector. \n" - "fastaxis2 Pointer to the destination y component of the fast axis \n" - "vector. fastaxis3 Pointer to the destination z component of the \n" - "fast axis vector. axis_id1 Pointer to the destination first \n" - "surface axis name. axis_id1 Pointer to the destination first \n" - "surface axis name. axis_id2 Pointer to the destination second \n" - "surface axis name.\n" + "detector Detector handle. axis_number The number of the axis. \n" + "area Pointer to the destination pizel size in mm.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_detector_struct_get_pixel_coordinates_sf", _wrap_cbf_detector_struct_get_pixel_coordinates_sf, METH_VARARGS, (char *)"\n" + { "cbf_detector_struct_swigregister", cbf_detector_struct_swigregister, METH_O, NULL}, + { "cbf_detector_struct_swiginit", cbf_detector_struct_swiginit, METH_VARARGS, NULL}, + { "cbf_handle_struct_node_set", _wrap_cbf_handle_struct_node_set, METH_VARARGS, "cbf_handle_struct_node_set(cbf_handle_struct self, cbf_node * node)"}, + { "cbf_handle_struct_node_get", _wrap_cbf_handle_struct_node_get, METH_O, "cbf_handle_struct_node_get(cbf_handle_struct self) -> cbf_node *"}, + { "cbf_handle_struct_row_set", _wrap_cbf_handle_struct_row_set, METH_VARARGS, "cbf_handle_struct_row_set(cbf_handle_struct self, int row)"}, + { "cbf_handle_struct_row_get", _wrap_cbf_handle_struct_row_get, METH_O, "cbf_handle_struct_row_get(cbf_handle_struct self) -> int"}, + { "cbf_handle_struct_search_row_set", _wrap_cbf_handle_struct_search_row_set, METH_VARARGS, "cbf_handle_struct_search_row_set(cbf_handle_struct self, int search_row)"}, + { "cbf_handle_struct_search_row_get", _wrap_cbf_handle_struct_search_row_get, METH_O, "cbf_handle_struct_search_row_get(cbf_handle_struct self) -> int"}, + { "new_cbf_handle_struct", _wrap_new_cbf_handle_struct, METH_NOARGS, "new_cbf_handle_struct() -> cbf_handle_struct"}, + { "delete_cbf_handle_struct", _wrap_delete_cbf_handle_struct, METH_O, "delete_cbf_handle_struct(cbf_handle_struct self)"}, + { "cbf_handle_struct_read_file", _wrap_cbf_handle_struct_read_file, METH_VARARGS, "\n" "\n" - "Returns : double coordinate1,double coordinate2,double coordinate3\n" - "*args : double indexslow,double indexfast\n" + "Returns : \n" + "*args : String filename,Integer headers\n" "\n" - "C prototype: int cbf_get_pixel_coordinates_sf (cbf_detector detector,\n" - " double indexslow, double indexfast, double *coordinate1,\n" - " double *coordinate2, double *coordinate3);\n" + "C prototype: int cbf_read_file (cbf_handle handle, FILE *file, int flags);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_pixel_coordinates, cbf_get_pixel_coordinates_fs and \n" - "cbf_get_pixel_coordinates_sf ses *coordinate1, *coordinate2, and \n" - "*coordinate3 to the vector position of pixel (indexfast, indexslow) \n" - "on the detector surface. If indexslow and indexfast are integers then \n" - "the coordinates correspond to the center of a pixel.\n" - "Any of the destination pointers may be NULL.\n" - "ARGUMENTS\n" - "detector Detector handle. indexslow Slow index. indexfast \n" - " Fast index. coordinate1 Pointer to the destination x component. \n" - "coordinate2 Pointer to the destination y component. coordinate3 \n" - "Pointer to the destination z component.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "cbf_read_file reads the CBF or CIF file file into the CBF object \n" + "specified by handle, using the CIF 1.0 convention of 80 character \n" + "lines. cbf_read_widefile reads the CBF or CIF file file into the CBF \n" + "object specified by handle, using the CIF 1.1 convention of 2048 \n" + "character lines. A warning is issued to stderr for ascii lines over \n" + "the limit. No test is performed on binary sections.\n" + "Validation is performed in three ways levels: during the lexical \n" + "scan, during the parse, and, if a dictionary was converted, against \n" + "the value types, value enumerations, categories and parent-child \n" + "relationships specified in the dictionary.\n" + "flags controls the interpretation of binary section headers, the \n" + "parsing of brackets constructs and the parsing of treble-quoted \n" + "strings.\n" + "MSG_DIGEST: Instructs CBFlib to check that the digest \n" + "of the binary section matches any header digest value. If the digests \n" + "do not match, the call will return CBF_FORMAT. This evaluation and \n" + "comparison is delayed (a \"lazy \" evaluation) to ensure maximal \n" + "processing efficiency. If an immediately evaluation is required, see \n" + "MSG_DIGESTNOW, below. MSG_DIGESTNOW: Instructs CBFlib to \n" + "check that the digest of the binary section matches any header \n" + "digeste value. If the digests do not match, the call will return \n" + "CBF_FORMAT. This evaluation and comparison is performed during \n" + "initial parsing of the section to ensure timely error reporting at \n" + "the expense of processing efficiency. If a more efficient delayed ( \n" + "\"lazy \") evaluation is required, see MSG_DIGEST, above. \n" + "MSG_DIGESTWARN: Instructs CBFlib to check that the digest \n" + "of the binary section matches any header digeste value. If the \n" + "digests do not match, a warning message will be sent to stderr, but \n" + "processing will attempt to continue. This evaluation and comparison \n" + "is first performed during initial parsing of the section to ensure \n" + "timely error reporting at the expense of processing efficiency. An \n" + "mismatch of the message digest usually indicates a serious error, but \n" + "it is sometimes worth continuing processing to try to isolate the \n" + "cause of the error. Use this option with caution. MSG_NODIGEST: \n" + " Do not check the digest (default). PARSE_BRACKETS: \n" + "Accept DDLm bracket-delimited [item,item,...item] or \n" + "{item,item,...item} or (item,item,...item) constructs as valid, \n" + "stripping non-quoted embedded whitespace and comments. These \n" + "constructs may span multiple lines. PARSE_LIBERAL_BRACKETS: Accept \n" + "DDLm bracket-delimited [item,item,...item] or {item,item,...item} or \n" + "(item,item,...item) constructs as valid, stripping embedded \n" + "non-quoted, non-separating whitespace and comments. These constructs \n" + "may span multiple lines. In this case, whitespace may be used as an \n" + "alternative to the comma. PARSE_TRIPLE_QUOTES: Accept DDLm \n" + "triple-quoted \" \" \"item,item,...item \" \" \" or \n" + "'''item,item,...item''' constructs as valid, stripping embedded \n" + "whitespace and comments. These constructs may span multiple lines. If \n" + "this flag is set, then ''' will not be interpreted as a quoted \n" + "apoptrophe and \" \" \" will not be interpreted as a quoted double \n" + "quote mark and PARSE_NOBRACKETS: Do not accept DDLm \n" + "bracket-delimited [item,item,...item] or {item,item,...item} or \n" + "(item,item,...item) constructs as valid, stripping non-quoted \n" + "embedded whitespace and comments. These constructs may span multiple \n" + "lines. PARSE_NOTRIPLE_QUOTES: No not accept DDLm triple-quoted \" \n" + "\" \"item,item,...item \" \" \" or '''item,item,...item''' constructs \n" + "as valid, stripping embedded whitespace and comments. These \n" + "constructs may span multiple lines. If this flag is set, then ''' \n" + "will be interpreted as a quoted apostrophe and \" \" \" will be \n" + "interpreted as a quoted double quote mark.\n" + "CBFlib defers reading binary sections as long as possible. In the \n" + "current version of CBFlib, this means that:\n" + "1. The file must be a random-access file opened in binary mode (fopen \n" + "( ,\n" "\n" ""}, - { (char *)"cbf_detector_struct_set_beam_center", _wrap_cbf_detector_struct_set_beam_center, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_read_widefile", _wrap_cbf_handle_struct_read_widefile, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : double indexslow,double indexfast,double centerslow,double centerfast\n" + "*args : String filename,Integer headers\n" "\n" - "C prototype: int cbf_set_beam_center (cbf_detector detector,\n" - " double *indexslow, double *indexfast, double *centerslow,\n" - " double *centerfast);\n" + "C prototype: int cbf_read_widefile (cbf_handle handle, FILE *file, int flags);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_beam_center sets *centerfast and *centerslow to the \n" - "displacements in mm along the detector axes from pixel (0, 0) to the \n" - "point at which the beam intersects the detector and *indexfast and \n" - "*indexslow to the corresponding indices. cbf_set_beam_center sets the \n" - "offsets in the axis category for the detector element axis with \n" - "precedence 1 to place the beam center at the position given in mm by \n" - "*centerfast and *centerslow as the displacements in mm along the \n" - "detector axes from pixel (0, 0) to the point at which the beam \n" - "intersects the detector at the indices given *indexfast and \n" - "*indexslow. cbf_set_reference_beam_center sets the displacments in \n" - "the array_structure_list_axis category to place the beam center at \n" - "the position given in mm by *centerfast and *centerslow as the \n" - "displacements in mm along the detector axes from pixel (0, 0) to the \n" - "point at which the beam intersects the detector at the indices given \n" - "by *indexfast and *indexslow. In order to achieve consistent results, \n" - "a reference detector should be used for detector to have all axes at \n" - "their reference settings.\n" - "Note that the precedence 1 axis is the fastest axis, so that \n" - "*centerfast and *indexfast are the fast axis components of the center \n" - "and *centerslow and *indexslow are the slow axis components of the \n" - "center.\n" - "The _fs calls give the displacments in a fast-to-slow order. The \n" - "calls with no suffix and the calls _sf calls give the displacements \n" - "in slow-to-fast order\n" - "Any of the destination pointers may be NULL for getting the beam \n" - "center. For setting the beam axis, either the indices of the center \n" - "must not be NULL.\n" - "The indices are non-negative for beam centers within the detector \n" - "surface, but the center for an axis with a negative increment will be \n" - "negative for a beam center within the detector surface.\n" - "For cbf_set_beam_center if the diffrn_data_frame category exists with \n" - "a row for the corresponding element id, the values will be set for \n" - "_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in \n" - "millimetres and the value of _diffrn_data_frame.center_units will be \n" - "set to 'mm'.\n" - "For cbf_set_reference_beam_center if the diffrn_detector_element \n" - "category exists with a row for the corresponding element id, the \n" - "values will be set for _diffrn_detector_element.reference_center_fast \n" - "and _diffrn_detector_element.reference_center_slow in millimetres and \n" - "the value of _diffrn_detector_element.reference_units will be set to \n" - "'mm'.\n" - "ARGUMENTS\n" - "detector Detector handle. indexfast Pointer to the destination \n" - "fast index. indexslow Pointer to the destination slow index. \n" - "centerfast Pointer to the destination displacement along the fast \n" - "axis. centerslow Pointer to the destination displacement along the \n" - "slow axis.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "cbf_read_file reads the CBF or CIF file file into the CBF object \n" + "specified by handle, using the CIF 1.0 convention of 80 character \n" + "lines. cbf_read_widefile reads the CBF or CIF file file into the CBF \n" + "object specified by handle, using the CIF 1.1 convention of 2048 \n" + "character lines. A warning is issued to stderr for ascii lines over \n" + "the limit. No test is performed on binary sections.\n" + "Validation is performed in three ways levels: during the lexical \n" + "scan, during the parse, and, if a dictionary was converted, against \n" + "the value types, value enumerations, categories and parent-child \n" + "relationships specified in the dictionary.\n" + "flags controls the interpretation of binary section headers, the \n" + "parsing of brackets constructs and the parsing of treble-quoted \n" + "strings.\n" + "MSG_DIGEST: Instructs CBFlib to check that the digest \n" + "of the binary section matches any header digest value. If the digests \n" + "do not match, the call will return CBF_FORMAT. This evaluation and \n" + "comparison is delayed (a \"lazy \" evaluation) to ensure maximal \n" + "processing efficiency. If an immediately evaluation is required, see \n" + "MSG_DIGESTNOW, below. MSG_DIGESTNOW: Instructs CBFlib to \n" + "check that the digest of the binary section matches any header \n" + "digeste value. If the digests do not match, the call will return \n" + "CBF_FORMAT. This evaluation and comparison is performed during \n" + "initial parsing of the section to ensure timely error reporting at \n" + "the expense of processing efficiency. If a more efficient delayed ( \n" + "\"lazy \") evaluation is required, see MSG_DIGEST, above. \n" + "MSG_DIGESTWARN: Instructs CBFlib to check that the digest \n" + "of the binary section matches any header digeste value. If the \n" + "digests do not match, a warning message will be sent to stderr, but \n" + "processing will attempt to continue. This evaluation and comparison \n" + "is first performed during initial parsing of the section to ensure \n" + "timely error reporting at the expense of processing efficiency. An \n" + "mismatch of the message digest usually indicates a serious error, but \n" + "it is sometimes worth continuing processing to try to isolate the \n" + "cause of the error. Use this option with caution. MSG_NODIGEST: \n" + " Do not check the digest (default). PARSE_BRACKETS: \n" + "Accept DDLm bracket-delimited [item,item,...item] or \n" + "{item,item,...item} or (item,item,...item) constructs as valid, \n" + "stripping non-quoted embedded whitespace and comments. These \n" + "constructs may span multiple lines. PARSE_LIBERAL_BRACKETS: Accept \n" + "DDLm bracket-delimited [item,item,...item] or {item,item,...item} or \n" + "(item,item,...item) constructs as valid, stripping embedded \n" + "non-quoted, non-separating whitespace and comments. These constructs \n" + "may span multiple lines. In this case, whitespace may be used as an \n" + "alternative to the comma. PARSE_TRIPLE_QUOTES: Accept DDLm \n" + "triple-quoted \" \" \"item,item,...item \" \" \" or \n" + "'''item,item,...item''' constructs as valid, stripping embedded \n" + "whitespace and comments. These constructs may span multiple lines. If \n" + "this flag is set, then ''' will not be interpreted as a quoted \n" + "apoptrophe and \" \" \" will not be interpreted as a quoted double \n" + "quote mark and PARSE_NOBRACKETS: Do not accept DDLm \n" + "bracket-delimited [item,item,...item] or {item,item,...item} or \n" + "(item,item,...item) constructs as valid, stripping non-quoted \n" + "embedded whitespace and comments. These constructs may span multiple \n" + "lines. PARSE_NOTRIPLE_QUOTES: No not accept DDLm triple-quoted \" \n" + "\" \"item,item,...item \" \" \" or '''item,item,...item''' constructs \n" + "as valid, stripping embedded whitespace and comments. These \n" + "constructs may span multiple lines. If this flag is set, then ''' \n" + "will be interpreted as a quoted apostrophe and \" \" \" will be \n" + "interpreted as a quoted double quote mark.\n" + "CBFlib defers reading binary sections as long as possible. In the \n" + "current version of CBFlib, this means that:\n" + "1. The file must be a random-access file opened in binary mode (fopen \n" + "( ,\n" "\n" ""}, - { (char *)"cbf_detector_struct_get_pixel_area_fs", _wrap_cbf_detector_struct_get_pixel_area_fs, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_write_file", _wrap_cbf_handle_struct_write_file, METH_VARARGS, "\n" "\n" - "Returns : double area,double projected_area\n" - "*args : double indexfast,double indexslow\n" + "Returns : \n" + "*args : String filename,Integer ciforcbf,Integer Headers,Integer encoding\n" "\n" - "C prototype: int cbf_get_pixel_area_fs(cbf_detector detector,\n" - " double indexfast, double indexslow, double *area,\n" - " double *projected_area);\n" + "C prototype: int cbf_write_file (cbf_handle handle, FILE *file, int readable,\n" + " int ciforcbf, int flags, int encoding);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_pixel_area, cbf_get_pixel_area_fs and cbf_get_pixel_area_sf \n" - "set *area to the area of the pixel at (indexfast, indexslow) on the \n" - "detector surface and *projected_area to the apparent area of the \n" - "pixel as viewed from the sample position, with indexslow being the \n" - "slow axis and indexfast being the fast axis.\n" - "Either of the destination pointers may be NULL.\n" - "ARGUMENTS\n" - "detector Detector handle. indexfast Fast index. \n" - "indexslow Slow index. area Pointer to the \n" - "destination area in mm2. projected_area Pointer to the destination \n" - "apparent area in mm2.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "cbf_write_file writes the CBF object specified by handle into the \n" + "file file, following CIF 1.0 conventions of 80 character lines. \n" + "cbf_write_widefile writes the CBF object specified by handle into the \n" + "file file, following CIF 1.1 conventions of 2048 character lines. A \n" + "warning is issued to stderr for ascii lines over the limit, and an \n" + "attempt is made to fold lines to fit. No test is performed on binary \n" + "sections.\n" + "If a dictionary has been provided, aliases will be applied on output.\n" + "Unlike cbf_read_file, the file does not have to be random-access.\n" + "If the file is random-access and readable, readable can be set to \n" + "non-0 to indicate to CBFlib that the file can be used as a buffer to \n" + "conserve disk space. If the file is not random-access or not \n" + "readable, readable must be 0.\n" "\n" ""}, - { (char *)"cbf_detector_struct_get_beam_center_fs", _wrap_cbf_detector_struct_get_beam_center_fs, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_write_widefile", _wrap_cbf_handle_struct_write_widefile, METH_VARARGS, "\n" "\n" - "Returns : double indexfast,double indexslow,double centerfast,double centerslow\n" - "*args : \n" + "Returns : \n" + "*args : String filename,Integer ciforcbf,Integer Headers,Integer encoding\n" "\n" - "C prototype: int cbf_get_beam_center_fs (cbf_detector detector,\n" - " double *indexfast, double *indexslow, double *centerfast,\n" - " double *centerslow);\n" + "C prototype: int cbf_write_widefile (cbf_handle handle, FILE *file,\n" + " int readable, int ciforcbf, int flags, int encoding);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_beam_center sets *centerfast and *centerslow to the \n" - "displacements in mm along the detector axes from pixel (0, 0) to the \n" - "point at which the beam intersects the detector and *indexfast and \n" - "*indexslow to the corresponding indices. cbf_set_beam_center sets the \n" - "offsets in the axis category for the detector element axis with \n" - "precedence 1 to place the beam center at the position given in mm by \n" - "*centerfast and *centerslow as the displacements in mm along the \n" - "detector axes from pixel (0, 0) to the point at which the beam \n" - "intersects the detector at the indices given *indexfast and \n" - "*indexslow. cbf_set_reference_beam_center sets the displacments in \n" - "the array_structure_list_axis category to place the beam center at \n" - "the position given in mm by *centerfast and *centerslow as the \n" - "displacements in mm along the detector axes from pixel (0, 0) to the \n" - "point at which the beam intersects the detector at the indices given \n" - "by *indexfast and *indexslow. In order to achieve consistent results, \n" - "a reference detector should be used for detector to have all axes at \n" - "their reference settings.\n" - "Note that the precedence 1 axis is the fastest axis, so that \n" - "*centerfast and *indexfast are the fast axis components of the center \n" - "and *centerslow and *indexslow are the slow axis components of the \n" - "center.\n" - "The _fs calls give the displacments in a fast-to-slow order. The \n" - "calls with no suffix and the calls _sf calls give the displacements \n" - "in slow-to-fast order\n" - "Any of the destination pointers may be NULL for getting the beam \n" - "center. For setting the beam axis, either the indices of the center \n" - "must not be NULL.\n" - "The indices are non-negative for beam centers within the detector \n" - "surface, but the center for an axis with a negative increment will be \n" - "negative for a beam center within the detector surface.\n" - "For cbf_set_beam_center if the diffrn_data_frame category exists with \n" - "a row for the corresponding element id, the values will be set for \n" - "_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in \n" - "millimetres and the value of _diffrn_data_frame.center_units will be \n" - "set to 'mm'.\n" - "For cbf_set_reference_beam_center if the diffrn_detector_element \n" - "category exists with a row for the corresponding element id, the \n" - "values will be set for _diffrn_detector_element.reference_center_fast \n" - "and _diffrn_detector_element.reference_center_slow in millimetres and \n" - "the value of _diffrn_detector_element.reference_units will be set to \n" - "'mm'.\n" - "ARGUMENTS\n" - "detector Detector handle. indexfast Pointer to the destination \n" - "fast index. indexslow Pointer to the destination slow index. \n" - "centerfast Pointer to the destination displacement along the fast \n" - "axis. centerslow Pointer to the destination displacement along the \n" - "slow axis.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "cbf_write_file writes the CBF object specified by handle into the \n" + "file file, following CIF 1.0 conventions of 80 character lines. \n" + "cbf_write_widefile writes the CBF object specified by handle into the \n" + "file file, following CIF 1.1 conventions of 2048 character lines. A \n" + "warning is issued to stderr for ascii lines over the limit, and an \n" + "attempt is made to fold lines to fit. No test is performed on binary \n" + "sections.\n" + "If a dictionary has been provided, aliases will be applied on output.\n" + "Unlike cbf_read_file, the file does not have to be random-access.\n" + "If the file is random-access and readable, readable can be set to \n" + "non-0 to indicate to CBFlib that the file can be used as a buffer to \n" + "conserve disk space. If the file is not random-access or not \n" + "readable, readable must be 0.\n" "\n" ""}, - { (char *)"cbf_detector_struct_get_inferred_pixel_size_sf", _wrap_cbf_detector_struct_get_inferred_pixel_size_sf, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_new_datablock", _wrap_cbf_handle_struct_new_datablock, METH_VARARGS, "\n" "\n" - "Returns : Float pixel size\n" - "*args : Int axis_number\n" + "Returns : string\n" + "*args : \n" "\n" - "C prototype: int cbf_get_inferred_pixel_size_sf(cbf_detector detector,\n" - " int axis_number, double *psize);\n" + "C prototype: int cbf_new_datablock (cbf_handle handle,\n" + " const char *datablockname);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_inferred_pixel_size, cbf_get_inferred_pixel_size_sf set \n" - "*psize to point to the double value in millimeters of the pixel size \n" - "for the axis axis_number value. The slow index is treated as axis 1 \n" - "and the next faster index is treated as axis 2. \n" - "cbf_get_inferred_pixel_size_fs sets *psize to point to the double \n" - "value in millimeters of the pixel size for the axis axis_number \n" - "value. The fast index is treated as axis 1 and the next slower index \n" - "is treated as axis 2.\n" - "If the axis number is negative, the axes are used in the reverse \n" - "order so that an axis_number of -1 indicates the fast axes in a call \n" - "to cbf_get_inferred_pixel_size or cbf_get_inferred_pixel_size_sf and \n" - "indicates the fast axis in a call to cbf_get_inferred_pixel_size_fs.\n" + "cbf_new_datablock creates a new data block with name datablockname \n" + "and makes it the current data block. cbf_new_saveframe creates a new \n" + "save frame with name saveframename within the current data block and \n" + "makes the new save frame the current save frame.\n" + "If a data block or save frame with this name already exists, the \n" + "existing data block or save frame becomes the current data block or \n" + "save frame.\n" "ARGUMENTS\n" - "detector Detector handle. axis_number The number of the axis. \n" - "area Pointer to the destination pizel size in mm.\n" + "handle CBF handle. datablockname The name of the new data \n" + "block. saveframename The name of the new save frame.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_detector_struct_get_pixel_coordinates", _wrap_cbf_detector_struct_get_pixel_coordinates, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_new_saveframe", _wrap_cbf_handle_struct_new_saveframe, METH_VARARGS, "\n" "\n" - "Returns : double coordinate1,double coordinate2,double coordinate3\n" - "*args : double index1,double index2\n" + "Returns : string\n" + "*args : \n" "\n" - "C prototype: int cbf_get_pixel_coordinates (cbf_detector detector,\n" - " double indexslow, double indexfast, double *coordinate1,\n" - " double *coordinate2, double *coordinate3);\n" + "C prototype: int cbf_new_saveframe (cbf_handle handle,\n" + " const char *saveframename);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_pixel_coordinates, cbf_get_pixel_coordinates_fs and \n" - "cbf_get_pixel_coordinates_sf ses *coordinate1, *coordinate2, and \n" - "*coordinate3 to the vector position of pixel (indexfast, indexslow) \n" - "on the detector surface. If indexslow and indexfast are integers then \n" - "the coordinates correspond to the center of a pixel.\n" - "Any of the destination pointers may be NULL.\n" + "cbf_new_datablock creates a new data block with name datablockname \n" + "and makes it the current data block. cbf_new_saveframe creates a new \n" + "save frame with name saveframename within the current data block and \n" + "makes the new save frame the current save frame.\n" + "If a data block or save frame with this name already exists, the \n" + "existing data block or save frame becomes the current data block or \n" + "save frame.\n" "ARGUMENTS\n" - "detector Detector handle. indexslow Slow index. indexfast \n" - " Fast index. coordinate1 Pointer to the destination x component. \n" - "coordinate2 Pointer to the destination y component. coordinate3 \n" - "Pointer to the destination z component.\n" + "handle CBF handle. datablockname The name of the new data \n" + "block. saveframename The name of the new save frame.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_detector_struct_get_beam_center_sf", _wrap_cbf_detector_struct_get_beam_center_sf, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_force_new_datablock", _wrap_cbf_handle_struct_force_new_datablock, METH_VARARGS, "\n" "\n" - "Returns : double indexslow,double indexfast,double centerslow,double centerfast\n" + "Returns : string\n" "*args : \n" "\n" - "C prototype: int cbf_get_beam_center_sf (cbf_detector detector,\n" - " double *indexslow, double *indexfast, double *centerslow,\n" - " double *centerfast);\n" + "C prototype: int cbf_force_new_datablock (cbf_handle handle,\n" + " const char *datablockname);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_beam_center sets *centerfast and *centerslow to the \n" - "displacements in mm along the detector axes from pixel (0, 0) to the \n" - "point at which the beam intersects the detector and *indexfast and \n" - "*indexslow to the corresponding indices. cbf_set_beam_center sets the \n" - "offsets in the axis category for the detector element axis with \n" - "precedence 1 to place the beam center at the position given in mm by \n" - "*centerfast and *centerslow as the displacements in mm along the \n" - "detector axes from pixel (0, 0) to the point at which the beam \n" - "intersects the detector at the indices given *indexfast and \n" - "*indexslow. cbf_set_reference_beam_center sets the displacments in \n" - "the array_structure_list_axis category to place the beam center at \n" - "the position given in mm by *centerfast and *centerslow as the \n" - "displacements in mm along the detector axes from pixel (0, 0) to the \n" - "point at which the beam intersects the detector at the indices given \n" - "by *indexfast and *indexslow. In order to achieve consistent results, \n" - "a reference detector should be used for detector to have all axes at \n" - "their reference settings.\n" - "Note that the precedence 1 axis is the fastest axis, so that \n" - "*centerfast and *indexfast are the fast axis components of the center \n" - "and *centerslow and *indexslow are the slow axis components of the \n" - "center.\n" - "The _fs calls give the displacments in a fast-to-slow order. The \n" - "calls with no suffix and the calls _sf calls give the displacements \n" - "in slow-to-fast order\n" - "Any of the destination pointers may be NULL for getting the beam \n" - "center. For setting the beam axis, either the indices of the center \n" - "must not be NULL.\n" - "The indices are non-negative for beam centers within the detector \n" - "surface, but the center for an axis with a negative increment will be \n" - "negative for a beam center within the detector surface.\n" - "For cbf_set_beam_center if the diffrn_data_frame category exists with \n" - "a row for the corresponding element id, the values will be set for \n" - "_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in \n" - "millimetres and the value of _diffrn_data_frame.center_units will be \n" - "set to 'mm'.\n" - "For cbf_set_reference_beam_center if the diffrn_detector_element \n" - "category exists with a row for the corresponding element id, the \n" - "values will be set for _diffrn_detector_element.reference_center_fast \n" - "and _diffrn_detector_element.reference_center_slow in millimetres and \n" - "the value of _diffrn_detector_element.reference_units will be set to \n" - "'mm'.\n" + "cbf_force_new_datablock creates a new data block with name \n" + "datablockname and makes it the current data block. Duplicate data \n" + "block names are allowed. cbf_force_new_saveframe creates a new savew \n" + "frame with name saveframename and makes it the current save frame. \n" + "Duplicate save frame names are allowed.\n" + "Even if a save frame with this name already exists, a new save frame \n" + "is created and becomes the current save frame.\n" "ARGUMENTS\n" - "detector Detector handle. indexfast Pointer to the destination \n" - "fast index. indexslow Pointer to the destination slow index. \n" - "centerfast Pointer to the destination displacement along the fast \n" - "axis. centerslow Pointer to the destination displacement along the \n" - "slow axis.\n" + "handle CBF handle. datablockname The name of the new data \n" + "block. saveframename The name of the new save frame.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_detector_struct_get_pixel_area_sf", _wrap_cbf_detector_struct_get_pixel_area_sf, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_force_new_saveframe", _wrap_cbf_handle_struct_force_new_saveframe, METH_VARARGS, "\n" "\n" - "Returns : double area,double projected_area\n" - "*args : double indexslow,double indexfast\n" + "Returns : string\n" + "*args : \n" "\n" - "C prototype: int cbf_get_pixel_area_sf(cbf_detector detector,\n" - " double indexslow, double indexfast, double *area,\n" - " double *projected_area);\n" + "C prototype: int cbf_force_new_saveframe (cbf_handle handle,\n" + " const char *saveframename);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_pixel_area, cbf_get_pixel_area_fs and cbf_get_pixel_area_sf \n" - "set *area to the area of the pixel at (indexfast, indexslow) on the \n" - "detector surface and *projected_area to the apparent area of the \n" - "pixel as viewed from the sample position, with indexslow being the \n" - "slow axis and indexfast being the fast axis.\n" - "Either of the destination pointers may be NULL.\n" + "cbf_force_new_datablock creates a new data block with name \n" + "datablockname and makes it the current data block. Duplicate data \n" + "block names are allowed. cbf_force_new_saveframe creates a new savew \n" + "frame with name saveframename and makes it the current save frame. \n" + "Duplicate save frame names are allowed.\n" + "Even if a save frame with this name already exists, a new save frame \n" + "is created and becomes the current save frame.\n" "ARGUMENTS\n" - "detector Detector handle. indexfast Fast index. \n" - "indexslow Slow index. area Pointer to the \n" - "destination area in mm2. projected_area Pointer to the destination \n" - "apparent area in mm2.\n" + "handle CBF handle. datablockname The name of the new data \n" + "block. saveframename The name of the new save frame.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_detector_struct_set_reference_beam_center_sf", _wrap_cbf_detector_struct_set_reference_beam_center_sf, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_new_category", _wrap_cbf_handle_struct_new_category, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : double indexslow,double indexfast,double centerslow,double centerfast\n" + "Returns : string\n" + "*args : \n" "\n" - "C prototype: int cbf_set_reference_beam_center_sf (cbf_detector detector,\n" - " double *indexslow, double *indexfast, double *centerslow,\n" - " double *centerfast);\n" + "C prototype: int cbf_new_category (cbf_handle handle,\n" + " const char *categoryname);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_beam_center sets *centerfast and *centerslow to the \n" - "displacements in mm along the detector axes from pixel (0, 0) to the \n" - "point at which the beam intersects the detector and *indexfast and \n" - "*indexslow to the corresponding indices. cbf_set_beam_center sets the \n" - "offsets in the axis category for the detector element axis with \n" - "precedence 1 to place the beam center at the position given in mm by \n" - "*centerfast and *centerslow as the displacements in mm along the \n" - "detector axes from pixel (0, 0) to the point at which the beam \n" - "intersects the detector at the indices given *indexfast and \n" - "*indexslow. cbf_set_reference_beam_center sets the displacments in \n" - "the array_structure_list_axis category to place the beam center at \n" - "the position given in mm by *centerfast and *centerslow as the \n" - "displacements in mm along the detector axes from pixel (0, 0) to the \n" - "point at which the beam intersects the detector at the indices given \n" - "by *indexfast and *indexslow. In order to achieve consistent results, \n" - "a reference detector should be used for detector to have all axes at \n" - "their reference settings.\n" - "Note that the precedence 1 axis is the fastest axis, so that \n" - "*centerfast and *indexfast are the fast axis components of the center \n" - "and *centerslow and *indexslow are the slow axis components of the \n" - "center.\n" - "The _fs calls give the displacments in a fast-to-slow order. The \n" - "calls with no suffix and the calls _sf calls give the displacements \n" - "in slow-to-fast order\n" - "Any of the destination pointers may be NULL for getting the beam \n" - "center. For setting the beam axis, either the indices of the center \n" - "must not be NULL.\n" - "The indices are non-negative for beam centers within the detector \n" - "surface, but the center for an axis with a negative increment will be \n" - "negative for a beam center within the detector surface.\n" - "For cbf_set_beam_center if the diffrn_data_frame category exists with \n" - "a row for the corresponding element id, the values will be set for \n" - "_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in \n" - "millimetres and the value of _diffrn_data_frame.center_units will be \n" - "set to 'mm'.\n" - "For cbf_set_reference_beam_center if the diffrn_detector_element \n" - "category exists with a row for the corresponding element id, the \n" - "values will be set for _diffrn_detector_element.reference_center_fast \n" - "and _diffrn_detector_element.reference_center_slow in millimetres and \n" - "the value of _diffrn_detector_element.reference_units will be set to \n" - "'mm'.\n" + "cbf_new_category creates a new category in the current data block \n" + "with name categoryname and makes it the current category.\n" + "If a category with this name already exists, the existing category \n" + "becomes the current category.\n" "ARGUMENTS\n" - "detector Detector handle. indexfast Pointer to the destination \n" - "fast index. indexslow Pointer to the destination slow index. \n" - "centerfast Pointer to the destination displacement along the fast \n" - "axis. centerslow Pointer to the destination displacement along the \n" - "slow axis.\n" + "handle CBF handle. categoryname The name of the new \n" + "category.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_detector_struct_set_beam_center_sf", _wrap_cbf_detector_struct_set_beam_center_sf, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_force_new_category", _wrap_cbf_handle_struct_force_new_category, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : double indexslow,double indexfast,double centerslow,double centerfast\n" + "Returns : string\n" + "*args : \n" "\n" - "C prototype: int cbf_set_beam_center_sf (cbf_detector detector,\n" - " double *indexslow, double *indexfast, double *centerslow,\n" - " double *centerfast);\n" + "C prototype: int cbf_force_new_category (cbf_handle handle,\n" + " const char *categoryname);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_beam_center sets *centerfast and *centerslow to the \n" - "displacements in mm along the detector axes from pixel (0, 0) to the \n" - "point at which the beam intersects the detector and *indexfast and \n" - "*indexslow to the corresponding indices. cbf_set_beam_center sets the \n" - "offsets in the axis category for the detector element axis with \n" - "precedence 1 to place the beam center at the position given in mm by \n" - "*centerfast and *centerslow as the displacements in mm along the \n" - "detector axes from pixel (0, 0) to the point at which the beam \n" - "intersects the detector at the indices given *indexfast and \n" - "*indexslow. cbf_set_reference_beam_center sets the displacments in \n" - "the array_structure_list_axis category to place the beam center at \n" - "the position given in mm by *centerfast and *centerslow as the \n" - "displacements in mm along the detector axes from pixel (0, 0) to the \n" - "point at which the beam intersects the detector at the indices given \n" - "by *indexfast and *indexslow. In order to achieve consistent results, \n" - "a reference detector should be used for detector to have all axes at \n" - "their reference settings.\n" - "Note that the precedence 1 axis is the fastest axis, so that \n" - "*centerfast and *indexfast are the fast axis components of the center \n" - "and *centerslow and *indexslow are the slow axis components of the \n" - "center.\n" - "The _fs calls give the displacments in a fast-to-slow order. The \n" - "calls with no suffix and the calls _sf calls give the displacements \n" - "in slow-to-fast order\n" - "Any of the destination pointers may be NULL for getting the beam \n" - "center. For setting the beam axis, either the indices of the center \n" - "must not be NULL.\n" - "The indices are non-negative for beam centers within the detector \n" - "surface, but the center for an axis with a negative increment will be \n" - "negative for a beam center within the detector surface.\n" - "For cbf_set_beam_center if the diffrn_data_frame category exists with \n" - "a row for the corresponding element id, the values will be set for \n" - "_diffrn_data_frame.center_fast and _diffrn_data_frame.center_slow in \n" - "millimetres and the value of _diffrn_data_frame.center_units will be \n" - "set to 'mm'.\n" - "For cbf_set_reference_beam_center if the diffrn_detector_element \n" - "category exists with a row for the corresponding element id, the \n" - "values will be set for _diffrn_detector_element.reference_center_fast \n" - "and _diffrn_detector_element.reference_center_slow in millimetres and \n" - "the value of _diffrn_detector_element.reference_units will be set to \n" - "'mm'.\n" + "cbf_force_new_category creates a new category in the current data \n" + "block with name categoryname and makes it the current category. \n" + "Duplicate category names are allowed.\n" + "Even if a category with this name already exists, a new category of \n" + "the same name is created and becomes the current category. The allows \n" + "for the creation of unlooped tag/value lists drawn from the same \n" + "category.\n" "ARGUMENTS\n" - "detector Detector handle. indexfast Pointer to the destination \n" - "fast index. indexslow Pointer to the destination slow index. \n" - "centerfast Pointer to the destination displacement along the fast \n" - "axis. centerslow Pointer to the destination displacement along the \n" - "slow axis.\n" + "handle CBF handle. categoryname The name of the new \n" + "category.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_detector_struct_get_pixel_normal", _wrap_cbf_detector_struct_get_pixel_normal, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_new_column", _wrap_cbf_handle_struct_new_column, METH_VARARGS, "\n" "\n" - "Returns : double normal1,double normal2,double normal3\n" - "*args : double index1,double index2\n" + "Returns : string\n" + "*args : \n" "\n" - "C prototype: int cbf_get_pixel_normal (cbf_detector detector,\n" - " double indexslow, double indexfast, double *normal1,\n" - " double *normal2, double *normal3);\n" + "C prototype: int cbf_new_column (cbf_handle handle, const char *columnname);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_detector_normal, cbf_get_pixel_normal_fs and \n" - "cbf_get_pixel_normal_sf set *normal1, *normal2, and *normal3 to the 3 \n" - "components of the of the normal vector to the pixel at (indexfast, \n" - "indexslow). The vector is normalized.\n" - "Any of the destination pointers may be NULL.\n" + "cbf_new_column creates a new column in the current category with name \n" + "columnname and makes it the current column.\n" + "If a column with this name already exists, the existing column \n" + "becomes the current category.\n" "ARGUMENTS\n" - "detector Detector handle. indexslow Slow index. indexfast Fast \n" - "index. normal1 Pointer to the destination x component of the \n" - "normal vector. normal2 Pointer to the destination y component of \n" - "the normal vector. normal3 Pointer to the destination z component \n" - "of the normal vector.\n" + "handle CBF handle. columnname The name of the new column.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_new_row", _wrap_cbf_handle_struct_new_row, METH_O, "\n" + "\n" + "Returns : \n" + "*args : \n" + "\n" + "C prototype: int cbf_new_row (cbf_handle handle);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_new_row adds a new row to the current category and makes it the \n" + "current row.\n" + "ARGUMENTS\n" + "handle CBF handle.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_detector_struct_swigregister", cbf_detector_struct_swigregister, METH_VARARGS, NULL}, - { (char *)"cbf_handle_struct_node_set", _wrap_cbf_handle_struct_node_set, METH_VARARGS, (char *)"cbf_handle_struct_node_set(cbf_handle_struct self, cbf_node * node)"}, - { (char *)"cbf_handle_struct_node_get", _wrap_cbf_handle_struct_node_get, METH_VARARGS, (char *)"cbf_handle_struct_node_get(cbf_handle_struct self) -> cbf_node *"}, - { (char *)"cbf_handle_struct_row_set", _wrap_cbf_handle_struct_row_set, METH_VARARGS, (char *)"cbf_handle_struct_row_set(cbf_handle_struct self, int row)"}, - { (char *)"cbf_handle_struct_row_get", _wrap_cbf_handle_struct_row_get, METH_VARARGS, (char *)"cbf_handle_struct_row_get(cbf_handle_struct self) -> int"}, - { (char *)"cbf_handle_struct_search_row_set", _wrap_cbf_handle_struct_search_row_set, METH_VARARGS, (char *)"cbf_handle_struct_search_row_set(cbf_handle_struct self, int search_row)"}, - { (char *)"cbf_handle_struct_search_row_get", _wrap_cbf_handle_struct_search_row_get, METH_VARARGS, (char *)"cbf_handle_struct_search_row_get(cbf_handle_struct self) -> int"}, - { (char *)"new_cbf_handle_struct", _wrap_new_cbf_handle_struct, METH_VARARGS, (char *)"new_cbf_handle_struct() -> cbf_handle_struct"}, - { (char *)"delete_cbf_handle_struct", _wrap_delete_cbf_handle_struct, METH_VARARGS, (char *)"delete_cbf_handle_struct(cbf_handle_struct self)"}, - { (char *)"cbf_handle_struct_select_datablock", _wrap_cbf_handle_struct_select_datablock, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_insert_row", _wrap_cbf_handle_struct_insert_row, METH_VARARGS, "\n" "\n" "Returns : \n" "*args : Integer\n" "\n" - "C prototype: int cbf_select_datablock (cbf_handle handle,\n" - " unsigned int datablock);\n" + "C prototype: int cbf_insert_row (cbf_handle handle, unsigned int rownumber);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_select_datablock selects data block number datablock as the \n" - "current data block.\n" - "The first data block is number 0.\n" - "If the data block does not exist, the function returns CBF_NOTFOUND.\n" + "cbf_insert_row adds a new row to the current category. The new row is \n" + "inserted as row rownumber and existing rows starting from rownumber \n" + "are moved up by 1. The new row becomes the current row.\n" + "If the category has fewer than rownumber rows, the function returns \n" + "CBF_NOTFOUND.\n" + "The row numbers start from 0.\n" "ARGUMENTS\n" - "handle CBF handle. datablock Number of the data block to \n" - "select.\n" + "handle CBF handle. rownumber The row number of the new row.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_delete_row", _wrap_cbf_handle_struct_delete_row, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : Integer\n" + "\n" + "C prototype: int cbf_delete_row (cbf_handle handle, unsigned int rownumber);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_delete_row deletes a row from the current category. Rows starting \n" + "from rownumber +1 are moved down by 1. If the current row was higher \n" + "than rownumber, or if the current row is the last row, it will also \n" + "move down by 1.\n" + "The row numbers start from 0.\n" + "ARGUMENTS\n" + "handle CBF handle. rownumber The number of the row to delete.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_force_new_datablock", _wrap_cbf_handle_struct_force_new_datablock, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_datablockname", _wrap_cbf_handle_struct_set_datablockname, METH_VARARGS, "\n" "\n" "Returns : string\n" "*args : \n" "\n" - "C prototype: int cbf_force_new_datablock (cbf_handle handle,\n" - " const char *datablockname);\n" + "C prototype: int cbf_set_datablockname (cbf_handle handle,\n" + " const char *datablockname);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_force_new_datablock creates a new data block with name \n" - "datablockname and makes it the current data block. Duplicate data \n" - "block names are allowed. cbf_force_new_saveframe creates a new savew \n" - "frame with name saveframename and makes it the current save frame. \n" - "Duplicate save frame names are allowed.\n" - "Even if a save frame with this name already exists, a new save frame \n" - "is created and becomes the current save frame.\n" + "cbf_set_datablockname changes the name of the current data block to \n" + "datablockname. cbf_set_saveframename changes the name of the current \n" + "save frame to saveframename.\n" + "If a data block or save frame with this name already exists \n" + "(comparison is case-insensitive), the function returns CBF_IDENTICAL.\n" "ARGUMENTS\n" - "handle CBF handle. datablockname The name of the new data \n" - "block. saveframename The name of the new save frame.\n" + "handle CBF handle. datablockname The new data block name. \n" + "datablockname The new save frame name.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_3d_image_fs_as_string", _wrap_cbf_handle_struct_get_3d_image_fs_as_string, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_saveframename", _wrap_cbf_handle_struct_set_saveframename, METH_VARARGS, "\n" "\n" - "Returns : (Binary)String\n" - "*args : int element_number,int elsize,int elsign,int ndimfast,int ndimmid,\n" - " int ndimslow\n" + "Returns : string\n" + "*args : \n" "\n" - "C prototype: int cbf_get_3d_image_fs (cbf_handle handle,\n" - " unsigned int reserved, unsigned int element_number,\n" - " void *array, size_t elsize, int elsign, size_t ndimfast,\n" - " size_t ndimmid, size_t ndimslow);\n" + "C prototype: int cbf_set_saveframename (cbf_handle handle,\n" + " const char *saveframename);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" - "array for element number element_number into an array. The array \n" - "consists of ndimslow *ndimfast elements of elsize bytes each, \n" - "starting at array. The elements are signed if elsign is non-0 and \n" - "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" - "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" - "for element number element_number into an array. A real array is \n" - "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" - "cbf_get_3d_image_sf read the 3D image array for element number \n" - "element_number into an array. The array consists of ndimslow *ndimmid \n" - "*ndimfast elements of elsize bytes each, starting at array. The \n" - "elements are signed if elsign is non-0 and unsigned otherwise. \n" - "cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" - "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" - "floats for element number element_number into an array. A real array \n" - "is always signed.\n" - "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" - "with no suffix and the calls _sf calls give the dimensions in \n" - "slow-to-fast order\n" - "The structure of the array as a 1-, 2- or 3-dimensional array should \n" - "agree with the structure of the array given in the \n" - "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" - "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" - "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" - "being processed. If the array is 2-dimensional and a 3D call is used, \n" - "ndimslow and ndimmid should be the\n" + "cbf_set_datablockname changes the name of the current data block to \n" + "datablockname. cbf_set_saveframename changes the name of the current \n" + "save frame to saveframename.\n" + "If a data block or save frame with this name already exists \n" + "(comparison is case-insensitive), the function returns CBF_IDENTICAL.\n" + "ARGUMENTS\n" + "handle CBF handle. datablockname The new data block name. \n" + "datablockname The new save frame name.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_reset_datablocks", _wrap_cbf_handle_struct_reset_datablocks, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_reset_datablocks", _wrap_cbf_handle_struct_reset_datablocks, METH_O, "\n" "\n" "Returns : \n" "*args : \n" @@ -22537,195 +22365,110 @@ static PyMethodDef SwigMethods[] = { "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_tag_category", _wrap_cbf_handle_struct_set_tag_category, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_reset_datablock", _wrap_cbf_handle_struct_reset_datablock, METH_O, "\n" "\n" "Returns : \n" - "*args : String tagname,String categoryname_in\n" + "*args : \n" "\n" - "C prototype: int cbf_set_tag_category (cbf_handle handle, const char* tagname,\n" - " const char* categoryname_in);\n" + "C prototype: int cbf_reset_datablock (cbf_handle handle);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_find_tag_category sets categoryname to the category associated \n" - "with tagname in the dictionary associated with handle. \n" - "cbf_set_tag_category upddates the dictionary associated with handle \n" - "to indicated that tagname is in category categoryname_in.\n" + "cbf_reset_datablock deletes all categories from the current data \n" + "block. cbf_reset_saveframe deletes all categories from the current \n" + "save frame.\n" "ARGUMENTS\n" - "handle CBF handle. tagname tag name. \n" - "categoryname pointer to a returned category name. \n" - "categoryname_in input category name.\n" + "handle CBF handle.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_require_tag_root", _wrap_cbf_handle_struct_require_tag_root, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_reset_saveframe", _wrap_cbf_handle_struct_reset_saveframe, METH_O, "\n" "\n" - "Returns : String tagroot\n" - "*args : String tagname\n" + "Returns : \n" + "*args : \n" "\n" - "C prototype: int cbf_require_tag_root (cbf_handle handle, const char* tagname,\n" - " const char** tagroot);\n" + "C prototype: int cbf_reset_saveframe (cbf_handle handle);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_find_tag_root sets *tagroot to the root tag of which tagname is \n" - "an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in \n" - "the dictionary associated with handle, creating the dictionary if \n" - "necessary. cbf_require_tag_root sets *tagroot to the root tag of \n" - "which tagname is an alias, if there is one, or to the value of \n" - "tagname, if tagname is not an alias.\n" - "A returned tagroot string must not be modified in any way.\n" + "cbf_reset_datablock deletes all categories from the current data \n" + "block. cbf_reset_saveframe deletes all categories from the current \n" + "save frame.\n" "ARGUMENTS\n" - "handle CBF handle. tagname tag name which may be an alias. \n" - "tagroot pointer to a returned tag root name. tagroot_in input \n" - "tag root name.\n" + "handle CBF handle.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_row_number", _wrap_cbf_handle_struct_row_number, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_reset_category", _wrap_cbf_handle_struct_reset_category, METH_O, "\n" "\n" - "Returns : Integer\n" + "Returns : \n" "*args : \n" "\n" - "C prototype: int cbf_row_number (cbf_handle handle, unsigned int *row);\n" + "C prototype: int cbf_reset_category (cbf_handle handle);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_row_number sets *row to the number of the current row of the \n" - "current category.\n" + "cbf_reset_category deletes all columns and rows from current category.\n" "ARGUMENTS\n" - "handle CBF handle. row Pointer to the destination row number.\n" + "handle CBF handle.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_image", _wrap_cbf_handle_struct_set_image, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_remove_datablock", _wrap_cbf_handle_struct_remove_datablock, METH_O, "\n" "\n" "Returns : \n" - "*args : int element_number,int compression,(binary) String data,int elsize,\n" - " int elsign,int dimslow,int dimfast\n" - "\n" - "C prototype: int cbf_set_image (cbf_handle handle, unsigned int reserved,\n" - " unsigned int element_number, unsigned int compression,\n" - " void *array, size_t elsize, int elsign, size_t ndimslow,\n" - " size_t ndimfast);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" - "array for element number element_number. The array consists of \n" - "ndimfast *ndimslow elements of elsize bytes each, starting at array. \n" - "The elements are signed if elsign is non-zero and unsigned otherwise. \n" - "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" - "write the image array for element number element_number. The array \n" - "consists of ndimfast *ndimslow IEEE double or float elements of \n" - "elsize bytes each, starting at array. cbf_set_3d_image, \n" - "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" - "for element number element_number. The array consists of ndimfast \n" - "*ndimmid *ndimslow elements of elsize bytes each, starting at array. \n" - "The elements are signed if elsign is non-0 and unsigned otherwise. \n" - "cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" - "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" - "element_number. The array consists of ndimfast *ndimmid *ndimslow \n" - "IEEE double or float elements of elsize bytes each, starting at \n" - "array.\n" - "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" - "with no suffix and the calls _sf calls give the dimensions in \n" - "slow-to-fast order\n" - "If the array is 1-dimensional, ndimslow should be the array size and \n" - "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" - "array is 2-dimensional and the 3D calls are used, ndimslow and \n" - "ndimmid should be used for the array dimensions and ndimfast should \n" - "be set to 1.\n" - "The array will be compressed using the compression scheme specifed by \n" - "compression. Currently, the available schemes are:\n" - "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" - "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" - " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" - "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" - "\"nibble_offset \" compression. CBF_NONE No compression.\n" - "The values compressed are limited to 64 bits. If any element in the \n" - "array is larger than 64 bits, the value compressed is the nearest \n" - "64-bit value.\n" - "Currently, the source array must consist of chars, shorts or ints \n" - "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" - "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" - "(int), sizeof(double) or sizeof(float), the function returns \n" - "CBF_ARGUMENT.\n" - "The parameter reserved is presently unused and should be set to 0.\n" + "*args : \n" + "\n" + "C prototype: int cbf_remove_datablock (cbf_handle handle);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_remove_datablock deletes the current data block. \n" + "cbf_remove_saveframe deletes the current save frame.\n" + "The current data block becomes undefined.\n" "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any value other \n" - "than 0 is invalid. element_number The number of the detector \n" - "element counting from 0 by order of appearance in the \n" - "\"diffrn_data_frame \" category. compression Compression type. \n" - "array Pointer to the image array. elsize Size in \n" - "bytes of each image array element. elsigned Set to non-0 if \n" - "the image array elements are signed. ndimslow Slowest array \n" - "dimension. ndimmid Second slowest array dimension. ndimfast \n" - " Fastest array dimension.\n" + "handle CBF handle.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_bin_sizes", _wrap_cbf_handle_struct_set_bin_sizes, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_remove_saveframe", _wrap_cbf_handle_struct_remove_saveframe, METH_O, "\n" "\n" "Returns : \n" - "*args : Integer element_number,Float slowbinsize_in,Float fastbinsize_in\n" + "*args : \n" "\n" - "C prototype: int cbf_set_bin_sizes(cbf_handle handle,\n" - " unsigned int element_number, double slowbinsize_in,\n" - " double fastbinsize_in);\n" + "C prototype: int cbf_remove_saveframe (cbf_handle handle);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_bin_sizes sets slowbinsize to point to the value of the \n" - "number of pixels composing one array element in the dimension that \n" - "changes at the second-fastest rate and fastbinsize to point to the \n" - "value of the number of pixels composing one array element in the \n" - "dimension that changes at the fastest rate for the dectector element \n" - "with the ordinal element_number. cbf_set_bin_sizes sets the the pixel \n" - "bin sizes in the \"array_intensities \" category to the values of \n" - "slowbinsize_in for the number of pixels composing one array element \n" - "in the dimension that changes at the second-fastest rate and \n" - "fastbinsize_in for the number of pixels composing one array element \n" - "in the dimension that changes at the fastest rate for the dectector \n" - "element with the ordinal element_number.\n" - "In order to allow for software binning involving fractions of pixels, \n" - "the bin sizes are doubles rather than ints.\n" + "cbf_remove_datablock deletes the current data block. \n" + "cbf_remove_saveframe deletes the current save frame.\n" + "The current data block becomes undefined.\n" "ARGUMENTS\n" - "handle CBF handle. element_number The number of the \n" - "detector element counting from 0 by order of appearance in the \n" - "\"diffrn_data_frame \" category. slowbinsize Pointer to the \n" - "returned number of pixels composing one array element in the \n" - "dimension that changes at the second-fastest rate. fastbinsize \n" - "Pointer to the returned number of pixels composing one array element \n" - "in the dimension that changes at the fastest rate. slowbinsize_in \n" - "The number of pixels composing one array element in the dimension \n" - "that changes at the second-fastest rate. fastbinsize_in The number \n" - "of pixels composing one array element in the dimension that changes \n" - "at the fastest rate.\n" + "handle CBF handle.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_new_row", _wrap_cbf_handle_struct_new_row, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_remove_category", _wrap_cbf_handle_struct_remove_category, METH_O, "\n" "\n" "Returns : \n" "*args : \n" "\n" - "C prototype: int cbf_new_row (cbf_handle handle);\n" + "C prototype: int cbf_remove_category (cbf_handle handle);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_new_row adds a new row to the current category and makes it the \n" - "current row.\n" + "cbf_remove_category deletes the current category.\n" + "The current category becomes undefined.\n" "ARGUMENTS\n" "handle CBF handle.\n" "RETURN VALUE\n" @@ -22733,341 +22476,252 @@ static PyMethodDef SwigMethods[] = { "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_rewind_saveframe", _wrap_cbf_handle_struct_rewind_saveframe, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_remove_column", _wrap_cbf_handle_struct_remove_column, METH_O, "\n" "\n" "Returns : \n" "*args : \n" "\n" - "C prototype: int cbf_rewind_saveframe (cbf_handle handle);\n" + "C prototype: int cbf_remove_column (cbf_handle handle);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_rewind_category makes the first category in the current data \n" - "block the current category. cbf_rewind_saveframe makes the first \n" - "saveframe in the current data block the current saveframe. \n" - "cbf_rewind_blockitem makes the first blockitem (category or \n" - "saveframe) in the current data block the current blockitem. The type \n" - "of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type.\n" - "If there are no categories, saveframes or blockitems the function \n" - "returns CBF_NOTFOUND.\n" - "The current column and row become undefined.\n" + "cbf_remove_column deletes the current column.\n" + "The current column becomes undefined.\n" "ARGUMENTS\n" - "handle CBF handle. type CBF handle.\n" + "handle CBF handle.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_realarrayparameters", _wrap_cbf_handle_struct_get_realarrayparameters, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_remove_row", _wrap_cbf_handle_struct_remove_row, METH_O, "\n" "\n" - "Returns : int compression,int binary_id,int elsize,int elements\n" + "Returns : \n" "*args : \n" "\n" - "C prototype: int cbf_get_realarrayparameters (cbf_handle handle,\n" - " unsigned int *compression, int *binary_id, size_t *elsize,\n" - " size_t *elements);\n" + "C prototype: int cbf_remove_row (cbf_handle handle);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_integerarrayparameters sets *compression, *binary_id, \n" - "*elsize, *elsigned, *elunsigned, *elements, *minelement and \n" - "*maxelement to values read from the binary value of the item at the \n" - "current column and row. This provides all the arguments needed for a \n" - "subsequent call to cbf_set_integerarray, if a copy of the array is to \n" - "be made into another CIF or CBF. cbf_get_realarrayparameters sets \n" - "*compression, *binary_id, *elsize, *elements to values read from the \n" - "binary value of the item at the current column and row. This provides \n" - "all the arguments needed for a subsequent call to cbf_set_realarray, \n" - "if a copy of the arry is to be made into another CIF or CBF.\n" - "The variants cbf_get_integerarrayparameters_wdims, \n" - "cbf_get_integerarrayparameters_wdims_fs, \n" - "cbf_get_integerarrayparameters_wdims_sf, \n" - "cbf_get_realarrayparameters_wdims, \n" - "cbf_get_realarrayparameters_wdims_fs, \n" - "cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, \n" - "*dimmid, *dimslow, and *padding as well, providing the additional \n" - "parameters needed for a subsequent call to cbf_set_integerarray_wdims \n" - "or cbf_set_realarray_wdims.\n" - "The value returned in *byteorder is a pointer either to the string \n" - "\"little_endian \" or to the string \"big_endian \". This should be \n" - "the byte order of the data, not necessarily of the host machine. No \n" - "attempt should be made to modify this string. At this time only \n" - "\"little_endian \" will be returned.\n" - "The values returned in *dimfast, *dimmid and *dimslow are the sizes \n" - "of the fastest changing, second fastest changing and third fastest \n" - "changing dimensions of the array, if specified, or zero, if not \n" - "specified.\n" - "The value returned in *padding is the size of the post-data padding, \n" - "if any and if specified in the data header. The value is given as a \n" - "count of octets.\n" - "If the value is not binary, the function returns CBF_ASCII.\n" + "cbf_remove_row deletes the current row in the current category.\n" + "If the current row was the last row, it will move down by 1, \n" + "otherwise, it will remain the same.\n" "ARGUMENTS\n" - "handle CBF handle. compression Compression method used. \n" - "elsize Size in bytes of each array element. binary_id \n" - "Pointer to the destination integer binary identifier. elsigned \n" - "Pointer to an integer. Set to 1 if the elements can be read as signed \n" - "integers. elunsigned Pointer to an integer. Set to 1 if the \n" - "elements can be read as unsigned integers. elements Pointer to \n" - "the destination number of elements. minelement Pointer to the \n" - "destination smallest element. maxelement Pointer to the \n" - "destination largest element. byteorder Pointer to the destination \n" - "byte order. dimfast Pointer to the destination fastest \n" - "dimension. dimmid Pointer to the destination second fastest \n" - "dimension. dimslow Pointer to the destination third fastest \n" - "dimension. padding Pointer to the destination padding size.\n" + "handle CBF handle.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_pixel_size_sf", _wrap_cbf_handle_struct_get_pixel_size_sf, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_rewind_datablock", _wrap_cbf_handle_struct_rewind_datablock, METH_O, "\n" "\n" - "Returns : Float pixel_size\n" - "*args : Int element_number,Int axis_number\n" + "Returns : \n" + "*args : \n" "\n" - "C prototype: int cbf_get_pixel_size_sf(cbf_handle handle,\n" - " unsigned int element_number, int axis_number,\n" - " double *psize);\n" + "C prototype: int cbf_rewind_datablock (cbf_handle handle);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to \n" - "the double value in millimeters of the axis axis_number of the \n" - "detector element element_number. The axis_number is numbered from 1, \n" - "starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to \n" - "point to the double value in millimeters of the axis axis_number of \n" - "the detector element element_number. The axis_number is numbered from \n" - "1, starting with the fastest axis.\n" - "If a negative axis number is given, the order of axes is reversed, so \n" - "that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the \n" - "fastest axis for cbf_get_pixel_size_sf.\n" - "If the pixel size is not given explcitly in the \"array_element_size \n" - "\" category, the function returns CBF_NOTFOUND.\n" + "cbf_rewind_datablock makes the first data block the current data \n" + "block.\n" + "If there are no data blocks, the function returns CBF_NOTFOUND.\n" + "The current category becomes undefined.\n" "ARGUMENTS\n" - "handle CBF handle. element_number The number of the \n" - "detector element counting from 0 by order of appearance in the \n" - "\"diffrn_data_frame \" category. axis_number The number of the \n" - "axis, starting from 1 for the fastest for cbf_get_pixel_size and \n" - "cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. \n" - "psize Pointer to the destination pixel size.\n" + "handle CBF handle.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_force_new_category", _wrap_cbf_handle_struct_force_new_category, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_rewind_category", _wrap_cbf_handle_struct_rewind_category, METH_O, "\n" "\n" - "Returns : string\n" + "Returns : \n" "*args : \n" "\n" - "C prototype: int cbf_force_new_category (cbf_handle handle,\n" - " const char *categoryname);\n" + "C prototype: int cbf_rewind_category (cbf_handle handle);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_force_new_category creates a new category in the current data \n" - "block with name categoryname and makes it the current category. \n" - "Duplicate category names are allowed.\n" - "Even if a category with this name already exists, a new category of \n" - "the same name is created and becomes the current category. The allows \n" - "for the creation of unlooped tag/value lists drawn from the same \n" - "category.\n" + "cbf_rewind_category makes the first category in the current data \n" + "block the current category. cbf_rewind_saveframe makes the first \n" + "saveframe in the current data block the current saveframe. \n" + "cbf_rewind_blockitem makes the first blockitem (category or \n" + "saveframe) in the current data block the current blockitem. The type \n" + "of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type.\n" + "If there are no categories, saveframes or blockitems the function \n" + "returns CBF_NOTFOUND.\n" + "The current column and row become undefined.\n" "ARGUMENTS\n" - "handle CBF handle. categoryname The name of the new \n" - "category.\n" + "handle CBF handle. type CBF handle.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_force_new_saveframe", _wrap_cbf_handle_struct_force_new_saveframe, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_rewind_saveframe", _wrap_cbf_handle_struct_rewind_saveframe, METH_O, "\n" "\n" - "Returns : string\n" + "Returns : \n" "*args : \n" "\n" - "C prototype: int cbf_force_new_saveframe (cbf_handle handle,\n" - " const char *saveframename);\n" + "C prototype: int cbf_rewind_saveframe (cbf_handle handle);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_force_new_datablock creates a new data block with name \n" - "datablockname and makes it the current data block. Duplicate data \n" - "block names are allowed. cbf_force_new_saveframe creates a new savew \n" - "frame with name saveframename and makes it the current save frame. \n" - "Duplicate save frame names are allowed.\n" - "Even if a save frame with this name already exists, a new save frame \n" - "is created and becomes the current save frame.\n" + "cbf_rewind_category makes the first category in the current data \n" + "block the current category. cbf_rewind_saveframe makes the first \n" + "saveframe in the current data block the current saveframe. \n" + "cbf_rewind_blockitem makes the first blockitem (category or \n" + "saveframe) in the current data block the current blockitem. The type \n" + "of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type.\n" + "If there are no categories, saveframes or blockitems the function \n" + "returns CBF_NOTFOUND.\n" + "The current column and row become undefined.\n" "ARGUMENTS\n" - "handle CBF handle. datablockname The name of the new data \n" - "block. saveframename The name of the new save frame.\n" + "handle CBF handle. type CBF handle.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_count_datablocks", _wrap_cbf_handle_struct_count_datablocks, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_rewind_blockitem", _wrap_cbf_handle_struct_rewind_blockitem, METH_O, "\n" "\n" - "Returns : Integer\n" + "Returns : CBF_NODETYPE\n" "*args : \n" "\n" - "C prototype: int cbf_count_datablocks (cbf_handle handle,\n" - " unsigned int *datablocks);\n" + "C prototype: int cbf_rewind_blockitem (cbf_handle handle,\n" + " CBF_NODETYPE * type);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_count_datablocks puts the number of data blocks in *datablocks .\n" + "cbf_rewind_category makes the first category in the current data \n" + "block the current category. cbf_rewind_saveframe makes the first \n" + "saveframe in the current data block the current saveframe. \n" + "cbf_rewind_blockitem makes the first blockitem (category or \n" + "saveframe) in the current data block the current blockitem. The type \n" + "of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type.\n" + "If there are no categories, saveframes or blockitems the function \n" + "returns CBF_NOTFOUND.\n" + "The current column and row become undefined.\n" "ARGUMENTS\n" - "handle CBF handle. datablocks Pointer to the destination data \n" - "block count.\n" + "handle CBF handle. type CBF handle.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_find_row", _wrap_cbf_handle_struct_find_row, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_rewind_column", _wrap_cbf_handle_struct_rewind_column, METH_O, "\n" "\n" - "Returns : string\n" + "Returns : \n" "*args : \n" "\n" - "C prototype: int cbf_find_row (cbf_handle handle, const char *value);\n" + "C prototype: int cbf_rewind_column (cbf_handle handle);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_rewind_column makes the first column in the current category the \n" + "current column.\n" + "If there are no columns, the function returns CBF_NOTFOUND.\n" + "The current row is not affected.\n" + "ARGUMENTS\n" + "handle CBF handle.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" + "\n" + ""}, + { "cbf_handle_struct_rewind_row", _wrap_cbf_handle_struct_rewind_row, METH_O, "\n" + "\n" + "Returns : \n" + "*args : \n" + "\n" + "C prototype: int cbf_rewind_row (cbf_handle handle);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_find_row makes the first row in the current column with value \n" - "value the current row.\n" - "The comparison is case-sensitive.\n" - "If a matching row does not exist, the function returns CBF_NOTFOUND.\n" + "cbf_rewind_row makes the first row in the current category the \n" + "current row.\n" + "If there are no rows, the function returns CBF_NOTFOUND.\n" "The current column is not affected.\n" "ARGUMENTS\n" - "handle CBF handle. value The value of the row to find.\n" + "handle CBF handle.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_select_column", _wrap_cbf_handle_struct_select_column, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_next_datablock", _wrap_cbf_handle_struct_next_datablock, METH_O, "\n" "\n" "Returns : \n" - "*args : Integer\n" + "*args : \n" "\n" - "C prototype: int cbf_select_column (cbf_handle handle, unsigned int column);\n" + "C prototype: int cbf_next_datablock (cbf_handle handle);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_select_column selects column number column in the current \n" - "category as the current column.\n" - "The first column is number 0.\n" - "The current row is not affected\n" - "If the column does not exist, the function returns CBF_NOTFOUND.\n" + "cbf_next_datablock makes the data block following the current data \n" + "block the current data block.\n" + "If there are no more data blocks, the function returns CBF_NOTFOUND.\n" + "The current category becomes undefined.\n" "ARGUMENTS\n" - "handle CBF handle. column Number of the column to select.\n" + "handle CBF handle.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_construct_detector", _wrap_cbf_handle_struct_construct_detector, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_next_category", _wrap_cbf_handle_struct_next_category, METH_O, "\n" "\n" - "Returns : pycbf detector object\n" - "*args : Integer element_number\n" + "Returns : \n" + "*args : \n" "\n" - "C prototype: int cbf_construct_detector (cbf_handle handle,\n" - " cbf_detector *detector, unsigned int element_number);\n" + "C prototype: int cbf_next_category (cbf_handle handle);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_construct_detector constructs a detector object for detector \n" - "element number element_number using the description in the CBF object \n" - "handle and initialises the detector handle *detector.\n" - "cbf_construct_reference_detector constructs a detector object for \n" - "detector element number element_number using the description in the \n" - "CBF object handle and initialises the detector handle *detector using \n" - "the reference settings of the axes. cbf_require_reference_detector is \n" - "similar, but try to force the creations of missing intermediate \n" - "categories needed to construct a detector object.\n" + "cbf_next_category makes the category following the current category \n" + "in the current data block the current category.\n" + "If there are no more categories, the function returns CBF_NOTFOUND.\n" + "The current column and row become undefined.\n" "ARGUMENTS\n" - "handle CBF handle. detector Pointer to the \n" - "destination detector handle. element_number The number of the \n" - "detector element counting from 0 by order of appearance in the \n" - "\"diffrn_data_frame \" category.\n" + "handle CBF handle.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_axis_depends_on", _wrap_cbf_handle_struct_get_axis_depends_on, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_next_column", _wrap_cbf_handle_struct_next_column, METH_O, "\n" "\n" - "Returns : String\n" - "*args : String axis_id\n" + "Returns : \n" + "*args : \n" "\n" - "C prototype: int cbf_get_axis_depends_on (cbf_handle handle,\n" - " const char *axis_id, const char * *depends_on);\n" + "C prototype: int cbf_next_column (cbf_handle handle);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" - "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" - "axis of index ancestor_index of axis axis_id, starting with axis_id \n" - "for ancestor_index 0.\n" - "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" - "axis_id or to \". \" if there is no such ancestor. \n" - "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" - "to \". \" if there is no such equipment. \n" - "cbf_get_axis_equipment_component sets *equipment_component to the \n" - "equipment_component of axis_id or to \". \" if there is no such \n" - "equipment_component.\n" - "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" - "components of the ofset of axis_id.\n" - "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" - "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" - "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" - "is no such rotation_axis.\n" - "cbf_get_axis_setting sets *start and *increment to the corresponding \n" - "values of the axis axis_id. Any of the destination pointers may be \n" - "NULL.\n" - "cbf_get_axis_type sets axis_type to the type of axis_id.\n" - "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" - "components of the vector of axis_id.\n" - "The parameter reserved is presently unused and should be set to 0.\n" + "cbf_next_column makes the column following the current column in the \n" + "current category the current column.\n" + "If there are no more columns, the function returns CBF_NOTFOUND.\n" + "The current row is not affected.\n" "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any \n" - "value other than 0 is invalid. axis_id Axis id. \n" - "ancestor_index Integer index of the desired ancestor, starting \n" - "with 0 for the current axis_id. ancestor Pointer to \n" - "destination ancestor name pointer. depends_on Pointer to \n" - "destination depends_on name pointer. equipment Pointer to \n" - "destination equipment name pointer. equipment_component Pointer to \n" - "destination equipment_component name pointer. offset1 \n" - "Pointer to destination first offset component value. offset2 \n" - " Pointer to destination second offset component value. offset3 \n" - " Pointer to destination third offset component value. \n" - "rotation Pointer to destination rotation value. \n" - "rotation_axis Pointer to destination rotation_axisn name \n" - "pointer. start Pointer to the destination start \n" - "value. increment Pointer to the destination increment \n" - "value. type Pointer to destination axis type of type \n" - ". vector1 Pointer to destination first vector component \n" - "value. vector2 Pointer to destination second vector \n" - "component value. vector3 Pointer to destination third \n" - "vector component value.\n" + "handle CBF handle.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_rewind_column", _wrap_cbf_handle_struct_rewind_column, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_next_row", _wrap_cbf_handle_struct_next_row, METH_O, "\n" "\n" "Returns : \n" "*args : \n" "\n" - "C prototype: int cbf_rewind_column (cbf_handle handle);\n" + "C prototype: int cbf_next_row (cbf_handle handle);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_rewind_column makes the first column in the current category the \n" - "current column.\n" - "If there are no columns, the function returns CBF_NOTFOUND.\n" - "The current row is not affected.\n" + "cbf_next_row makes the row following the current row in the current \n" + "category the current row.\n" + "If there are no more rows, the function returns CBF_NOTFOUND.\n" + "The current column is not affected.\n" "ARGUMENTS\n" "handle CBF handle.\n" "RETURN VALUE\n" @@ -23075,1210 +22729,987 @@ static PyMethodDef SwigMethods[] = { "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_construct_reference_positioner", _wrap_cbf_handle_struct_construct_reference_positioner, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_find_datablock", _wrap_cbf_handle_struct_find_datablock, METH_VARARGS, "\n" "\n" - "Returns : pycbf positioner object\n" - "*args : String axis_id\n" + "Returns : string\n" + "*args : \n" "\n" - "C prototype: int cbf_construct_reference_positioner (cbf_handle handle,\n" - " cbf_positioner *positioner, const char *axis_id);\n" + "C prototype: int cbf_find_datablock (cbf_handle handle,\n" + " const char *datablockname);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_construct_positioner constructs a positioner object for the axis \n" - "given by axis_id using the description in the CBF object handle and \n" - "initialises the positioner handle *positioner.\n" - "cbf_construct_reference positioner constructs a positioner object for \n" - "the axis given by axis_id using the description in the CBF object \n" - "handle and initialises the detector handle *detector using the \n" - "reference settings of the axes.\n" + "cbf_find_datablock makes the data block with name datablockname the \n" + "current data block.\n" + "The comparison is case-insensitive.\n" + "If the data block does not exist, the function returns CBF_NOTFOUND.\n" + "The current category becomes undefined.\n" "ARGUMENTS\n" - "handle CBF handle. detector Pointer to the destination detector \n" - "handle. axis_id The identifier of the axis in the \"axis \" \n" - "category.\n" + "handle CBF handle. datablockname The name of the data \n" + "block to find.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_require_column_doublevalue", _wrap_cbf_handle_struct_require_column_doublevalue, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_find_category", _wrap_cbf_handle_struct_find_category, METH_VARARGS, "\n" "\n" - "Returns : Float defaultvalue\n" - "*args : String columnname,Float Value\n" + "Returns : string\n" + "*args : \n" "\n" - "C prototype: int cbf_require_column_doublevalue (cbf_handle handle,\n" - " const char *columnname, double *number,\n" - " const double defaultvalue);\n" + "C prototype: int cbf_find_category (cbf_handle handle,\n" + " const char *categoryname);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_require_column_doublevalue sets *number to the value of the ASCII \n" - "item at the current row for the column given with the name given by \n" - "*columnname, with the value interpreted as a decimal floating-point \n" - "number, or to the number given by defaultvalue if the item cannot be \n" - "found.\n" + "cbf_find_category makes the category in the current data block with \n" + "name categoryname the current category.\n" + "The comparison is case-insensitive.\n" + "If the category does not exist, the function returns CBF_NOTFOUND.\n" + "The current column and row become undefined.\n" "ARGUMENTS\n" - "handle CBF handle. columnname Name of the column \n" - "containing the number. number pointer to the location to \n" - "receive the floating-point value. defaultvalue Value to use if the \n" - "requested column and value cannot be found.\n" + "handle CBF handle. categoryname The name of the category to \n" + "find.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_datestamp", _wrap_cbf_handle_struct_get_datestamp, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_find_column", _wrap_cbf_handle_struct_find_column, METH_VARARGS, "\n" "\n" - "Returns : int year,int month,int day,int hour,int minute,double second,\n" - " int timezone\n" + "Returns : string\n" "*args : \n" "\n" - "C prototype: int cbf_get_datestamp (cbf_handle handle, unsigned int reserved,\n" - " int *year, int *month, int *day, int *hour, int *minute,\n" - " double *second, int *timezone);\n" + "C prototype: int cbf_find_column (cbf_handle handle, const char *columnname);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_datestamp sets *year, *month, *day, *hour, *minute and \n" - "*second to the corresponding values of the collection timestamp. \n" - "*timezone is set to timezone difference from UTC in minutes. The \n" - "parameter < i>reserved is presently unused and should be set to 0.\n" - "Any of the destination pointers may be NULL.\n" + "cbf_find_column makes the columns in the current category with name \n" + "columnname the current column.\n" + "The comparison is case-insensitive.\n" + "If the column does not exist, the function returns CBF_NOTFOUND.\n" + "The current row is not affected.\n" "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any value other than 0 is \n" - "invalid. year Pointer to the destination timestamp year. month \n" - " Pointer to the destination timestamp month (1-12). day \n" - "Pointer to the destination timestamp day (1-31). hour Pointer \n" - "to the destination timestamp hour (0-23). minute Pointer to the \n" - "destination timestamp minute (0-59). second Pointer to the \n" - "destination timestamp second (0-60.0). timezone Pointer to the \n" - "destination timezone difference from UTC in minutes.\n" + "handle CBF handle. columnname The name of column to find.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_integervalue", _wrap_cbf_handle_struct_get_integervalue, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_find_row", _wrap_cbf_handle_struct_find_row, METH_VARARGS, "\n" "\n" - "Returns : int\n" + "Returns : string\n" "*args : \n" "\n" - "C prototype: int cbf_get_integervalue (cbf_handle handle, int *number);\n" + "C prototype: int cbf_find_row (cbf_handle handle, const char *value);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_integervalue sets *number to the value of the ASCII item at \n" - "the current column and row interpreted as a decimal integer. \n" - "cbf_require_integervalue sets *number to the value of the ASCII item \n" - "at the current column and row interpreted as a decimal integer, \n" - "setting it to defaultvalue if necessary.\n" - "If the value is not ASCII, the function returns CBF_BINARY.\n" + "cbf_find_row makes the first row in the current column with value \n" + "value the current row.\n" + "The comparison is case-sensitive.\n" + "If a matching row does not exist, the function returns CBF_NOTFOUND.\n" + "The current column is not affected.\n" "ARGUMENTS\n" - "handle CBF handle. number pointer to the number. \n" - "defaultvalue default number value.\n" + "handle CBF handle. value The value of the row to find.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_crystal_id", _wrap_cbf_handle_struct_get_crystal_id, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_find_nextrow", _wrap_cbf_handle_struct_find_nextrow, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : string\n" + "Returns : string\n" + "*args : \n" "\n" - "C prototype: int cbf_get_crystal_id (cbf_handle handle,\n" - " const char **crystal_id);\n" + "C prototype: int cbf_find_nextrow (cbf_handle handle, const char *value);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_crystal_id sets *crystal_id to point to the ASCII value of \n" - "the \"diffrn.crystal_id \" entry.\n" - "If the value is not ASCII, the function returns CBF_BINARY.\n" - "The value will be valid as long as the item exists and has not been \n" - "set to a new value.\n" - "The value must not be modified by the program in any way.\n" + "cbf_find_nextrow makes the makes the next row in the current column \n" + "with value value the current row. The search starts from the row \n" + "following the last row found with cbf_find_row or cbf_find_nextrow, \n" + "or from the current row if the current row was defined using any \n" + "other function.\n" + "The comparison is case-sensitive.\n" + "If no more matching rows exist, the function returns CBF_NOTFOUND.\n" + "The current column is not affected.\n" "ARGUMENTS\n" - "handle CBF handle. crystal_id Pointer to the destination \n" - "value pointer.\n" + "handle CBF handle. value the value to search for.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_doublevalue", _wrap_cbf_handle_struct_get_doublevalue, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_count_datablocks", _wrap_cbf_handle_struct_count_datablocks, METH_O, "\n" "\n" - "Returns : double\n" + "Returns : Integer\n" "*args : \n" "\n" - "C prototype: int cbf_get_doublevalue (cbf_handle handle, double *number);\n" + "C prototype: int cbf_count_datablocks (cbf_handle handle,\n" + " unsigned int *datablocks);\n" "\n" "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_get_doublevalue sets *number to the value of the ASCII item at \n" - "the current column and row interpreted as a decimal floating-point \n" - "number. cbf_require_doublevalue sets *number to the value of the \n" - "ASCII item at the current column and row interpreted as a decimal \n" - "floating-point number, setting it to defaultvalue if necessary.\n" - "If the value is not ASCII, the function returns CBF_BINARY.\n" + "DESCRIPTION\n" + "cbf_count_datablocks puts the number of data blocks in *datablocks .\n" "ARGUMENTS\n" - "handle CBF handle. number Pointer to the destination \n" - "number. defaultvalue default number value.\n" + "handle CBF handle. datablocks Pointer to the destination data \n" + "block count.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_unit_cell", _wrap_cbf_handle_struct_get_unit_cell, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_count_categories", _wrap_cbf_handle_struct_count_categories, METH_O, "\n" "\n" - "Returns : Float a,Float b,Float c,Float alpha,Float beta,Float gamma\n" + "Returns : Integer\n" "*args : \n" "\n" - "C prototype: int cbf_get_unit_cell (cbf_handle handle, double cell[6],\n" - " double cell_esd[6] );\n" + "C prototype: int cbf_count_categories (cbf_handle handle,\n" + " unsigned int *categories);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_unit_cell sets cell[0:2] to the double values of the cell \n" - "edge lengths a, b and c in AAngstroms, cell[3:5] to the double values \n" - "of the cell angles a, b and g in degrees, cell_esd[0:2] to the double \n" - "values of the estimated strandard deviations of the cell edge lengths \n" - "a, b and c in AAngstroms, cell_esd[3:5] to the double values of the \n" - "estimated standard deviations of the the cell angles a, b and g in \n" - "degrees.\n" - "The values returned are retrieved from the first row of the \"cell \n" - "\" category. The value of \"_cell.entry_id \" is ignored.\n" - "cell or cell_esd may be NULL.\n" - "If cell is NULL, the cell parameters are not retrieved.\n" - "If cell_esd is NULL, the cell parameter esds are not retrieved.\n" - "If the \"cell \" category is present, but some of the values are \n" - "missing, zeros are returned for the missing values.\n" + "cbf_count_categories puts the number of categories in the current \n" + "data block in *categories.\n" "ARGUMENTS\n" - "handle CBF handle. cell Pointer to the destination array of \n" - "6 doubles for the cell parameters. cell_esd Pointer to the \n" - "destination array of 6 doubles for the cell parameter esds.\n" + "handle CBF handle. categories Pointer to the destination \n" + "category count.\n" "RETURN VALUE\n" - "Returns an error code on failure or 0 for success. No errors is \n" - "returned for missing values if the \"cell \" category exists.\n" + "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_unit_cell_esd", _wrap_cbf_handle_struct_get_unit_cell_esd, METH_VARARGS, (char *)"cbf_handle_struct_get_unit_cell_esd(cbf_handle_struct self)"}, - { (char *)"cbf_handle_struct_get_axis_type", _wrap_cbf_handle_struct_get_axis_type, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_count_columns", _wrap_cbf_handle_struct_count_columns, METH_O, "\n" "\n" - "Returns : String\n" - "*args : String axis_id\n" + "Returns : Integer\n" + "*args : \n" "\n" - "C prototype: int cbf_get_axis_type (cbf_handle handle, const char *axis_id,\n" - " cbf_axis_type *axis_type);\n" + "C prototype: int cbf_count_columns (cbf_handle handle, unsigned int *columns);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" - "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" - "axis of index ancestor_index of axis axis_id, starting with axis_id \n" - "for ancestor_index 0.\n" - "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" - "axis_id or to \". \" if there is no such ancestor. \n" - "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" - "to \". \" if there is no such equipment. \n" - "cbf_get_axis_equipment_component sets *equipment_component to the \n" - "equipment_component of axis_id or to \". \" if there is no such \n" - "equipment_component.\n" - "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" - "components of the ofset of axis_id.\n" - "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" - "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" - "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" - "is no such rotation_axis.\n" - "cbf_get_axis_setting sets *start and *increment to the corresponding \n" - "values of the axis axis_id. Any of the destination pointers may be \n" - "NULL.\n" - "cbf_get_axis_type sets axis_type to the type of axis_id.\n" - "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" - "components of the vector of axis_id.\n" - "The parameter reserved is presently unused and should be set to 0.\n" + "cbf_count_columns puts the number of columns in the current category \n" + "in *columns.\n" "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any \n" - "value other than 0 is invalid. axis_id Axis id. \n" - "ancestor_index Integer index of the desired ancestor, starting \n" - "with 0 for the current axis_id. ancestor Pointer to \n" - "destination ancestor name pointer. depends_on Pointer to \n" - "destination depends_on name pointer. equipment Pointer to \n" - "destination equipment name pointer. equipment_component Pointer to \n" - "destination equipment_component name pointer. offset1 \n" - "Pointer to destination first offset component value. offset2 \n" - " Pointer to destination second offset component value. offset3 \n" - " Pointer to destination third offset component value. \n" - "rotation Pointer to destination rotation value. \n" - "rotation_axis Pointer to destination rotation_axisn name \n" - "pointer. start Pointer to the destination start \n" - "value. increment Pointer to the destination increment \n" - "value. type Pointer to destination axis type of type \n" - ". vector1 Pointer to destination first vector component \n" - "value. vector2 Pointer to destination second vector \n" - "component value. vector3 Pointer to destination third \n" - "vector component value.\n" + "handle CBF handle. columns Pointer to the destination column \n" + "count.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_remove_column", _wrap_cbf_handle_struct_remove_column, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_count_rows", _wrap_cbf_handle_struct_count_rows, METH_O, "\n" "\n" - "Returns : \n" + "Returns : Integer\n" "*args : \n" "\n" - "C prototype: int cbf_remove_column (cbf_handle handle);\n" + "C prototype: int cbf_count_rows (cbf_handle handle, unsigned int *rows);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_remove_column deletes the current column.\n" - "The current column becomes undefined.\n" + "cbf_count_rows puts the number of rows in the current category in \n" + "*rows .\n" "ARGUMENTS\n" - "handle CBF handle.\n" + "handle CBF handle. rows Pointer to the destination row count.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_rewind_blockitem", _wrap_cbf_handle_struct_rewind_blockitem, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_select_datablock", _wrap_cbf_handle_struct_select_datablock, METH_VARARGS, "\n" "\n" - "Returns : CBF_NODETYPE\n" - "*args : \n" + "Returns : \n" + "*args : Integer\n" "\n" - "C prototype: int cbf_rewind_blockitem (cbf_handle handle,\n" - " CBF_NODETYPE * type);\n" + "C prototype: int cbf_select_datablock (cbf_handle handle,\n" + " unsigned int datablock);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_rewind_category makes the first category in the current data \n" - "block the current category. cbf_rewind_saveframe makes the first \n" - "saveframe in the current data block the current saveframe. \n" - "cbf_rewind_blockitem makes the first blockitem (category or \n" - "saveframe) in the current data block the current blockitem. The type \n" - "of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type.\n" - "If there are no categories, saveframes or blockitems the function \n" - "returns CBF_NOTFOUND.\n" - "The current column and row become undefined.\n" + "cbf_select_datablock selects data block number datablock as the \n" + "current data block.\n" + "The first data block is number 0.\n" + "If the data block does not exist, the function returns CBF_NOTFOUND.\n" "ARGUMENTS\n" - "handle CBF handle. type CBF handle.\n" + "handle CBF handle. datablock Number of the data block to \n" + "select.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_value", _wrap_cbf_handle_struct_get_value, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_select_category", _wrap_cbf_handle_struct_select_category, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : string\n" + "*args : Integer\n" "\n" - "C prototype: int cbf_get_value (cbf_handle handle, const char **value);\n" + "C prototype: int cbf_select_category (cbf_handle handle,\n" + " unsigned int category);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_value sets *value to point to the ASCII value of the item at \n" - "the current column and row. cbf_require_value sets *value to point to \n" - "the ASCII value of the item at the current column and row, creating \n" - "the data item if necessary and initializing it to a copy of \n" - "defaultvalue.\n" - "If the value is not ASCII, the function returns CBF_BINARY.\n" - "The value will be valid as long as the item exists and has not been \n" - "set to a new value.\n" - "The value must not be modified by the program in any way.\n" + "cbf_select_category selects category number category in the current \n" + "data block as the current category.\n" + "The first category is number 0.\n" + "The current column and row become undefined.\n" + "If the category does not exist, the function returns CBF_NOTFOUND.\n" "ARGUMENTS\n" - "handle CBF handle. value Pointer to the destination \n" - "value pointer. defaultvalue Default value character string.\n" + "handle CBF handle. category Number of the category to select.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_count_categories", _wrap_cbf_handle_struct_count_categories, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_select_column", _wrap_cbf_handle_struct_select_column, METH_VARARGS, "\n" "\n" - "Returns : Integer\n" - "*args : \n" + "Returns : \n" + "*args : Integer\n" "\n" - "C prototype: int cbf_count_categories (cbf_handle handle,\n" - " unsigned int *categories);\n" + "C prototype: int cbf_select_column (cbf_handle handle, unsigned int column);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_count_categories puts the number of categories in the current \n" - "data block in *categories.\n" + "cbf_select_column selects column number column in the current \n" + "category as the current column.\n" + "The first column is number 0.\n" + "The current row is not affected\n" + "If the column does not exist, the function returns CBF_NOTFOUND.\n" "ARGUMENTS\n" - "handle CBF handle. categories Pointer to the destination \n" - "category count.\n" + "handle CBF handle. column Number of the column to select.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_read_widefile", _wrap_cbf_handle_struct_read_widefile, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_select_row", _wrap_cbf_handle_struct_select_row, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : String filename,Integer headers\n" + "*args : Integer\n" "\n" - "C prototype: int cbf_read_widefile (cbf_handle handle, FILE *file, int flags);\n" + "C prototype: int cbf_select_row (cbf_handle handle, unsigned int row);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_read_file reads the CBF or CIF file file into the CBF object \n" - "specified by handle, using the CIF 1.0 convention of 80 character \n" - "lines. cbf_read_widefile reads the CBF or CIF file file into the CBF \n" - "object specified by handle, using the CIF 1.1 convention of 2048 \n" - "character lines. A warning is issued to stderr for ascii lines over \n" - "the limit. No test is performed on binary sections.\n" - "Validation is performed in three ways levels: during the lexical \n" - "scan, during the parse, and, if a dictionary was converted, against \n" - "the value types, value enumerations, categories and parent-child \n" - "relationships specified in the dictionary.\n" - "flags controls the interpretation of binary section headers, the \n" - "parsing of brackets constructs and the parsing of treble-quoted \n" - "strings.\n" - "MSG_DIGEST: Instructs CBFlib to check that the digest \n" - "of the binary section matches any header digest value. If the digests \n" - "do not match, the call will return CBF_FORMAT. This evaluation and \n" - "comparison is delayed (a \"lazy \" evaluation) to ensure maximal \n" - "processing efficiency. If an immediately evaluation is required, see \n" - "MSG_DIGESTNOW, below. MSG_DIGESTNOW: Instructs CBFlib to \n" - "check that the digest of the binary section matches any header \n" - "digeste value. If the digests do not match, the call will return \n" - "CBF_FORMAT. This evaluation and comparison is performed during \n" - "initial parsing of the section to ensure timely error reporting at \n" - "the expense of processing efficiency. If a more efficient delayed ( \n" - "\"lazy \") evaluation is required, see MSG_DIGEST, above. \n" - "MSG_DIGESTWARN: Instructs CBFlib to check that the digest \n" - "of the binary section matches any header digeste value. If the \n" - "digests do not match, a warning message will be sent to stderr, but \n" - "processing will attempt to continue. This evaluation and comparison \n" - "is first performed during initial parsing of the section to ensure \n" - "timely error reporting at the expense of processing efficiency. An \n" - "mismatch of the message digest usually indicates a serious error, but \n" - "it is sometimes worth continuing processing to try to isolate the \n" - "cause of the error. Use this option with caution. MSG_NODIGEST: \n" - " Do not check the digest (default). PARSE_BRACKETS: \n" - "Accept DDLm bracket-delimited [item,item,...item] or \n" - "{item,item,...item} or (item,item,...item) constructs as valid, \n" - "stripping non-quoted embedded whitespace and comments. These \n" - "constructs may span multiple lines. PARSE_LIBERAL_BRACKETS: Accept \n" - "DDLm bracket-delimited [item,item,...item] or {item,item,...item} or \n" - "(item,item,...item) constructs as valid, stripping embedded \n" - "non-quoted, non-separating whitespace and comments. These constructs \n" - "may span multiple lines. In this case, whitespace may be used as an \n" - "alternative to the comma. PARSE_TRIPLE_QUOTES: Accept DDLm \n" - "triple-quoted \" \" \"item,item,...item \" \" \" or \n" - "'''item,item,...item''' constructs as valid, stripping embedded \n" - "whitespace and comments. These constructs may span multiple lines. If \n" - "this flag is set, then ''' will not be interpreted as a quoted \n" - "apoptrophe and \" \" \" will not be interpreted as a quoted double \n" - "quote mark and PARSE_NOBRACKETS: Do not accept DDLm \n" - "bracket-delimited [item,item,...item] or {item,item,...item} or \n" - "(item,item,...item) constructs as valid, stripping non-quoted \n" - "embedded whitespace and comments. These constructs may span multiple \n" - "lines. PARSE_NOTRIPLE_QUOTES: No not accept DDLm triple-quoted \" \n" - "\" \"item,item,...item \" \" \" or '''item,item,...item''' constructs \n" - "as valid, stripping embedded whitespace and comments. These \n" - "constructs may span multiple lines. If this flag is set, then ''' \n" - "will be interpreted as a quoted apostrophe and \" \" \" will be \n" - "interpreted as a quoted double quote mark.\n" - "CBFlib defers reading binary sections as long as possible. In the \n" - "current version of CBFlib, this means that:\n" - "1. The file must be a random-access file opened in binary mode (fopen \n" - "( ,\n" + "cbf_select_row selects row number row in the current category as the \n" + "current row.\n" + "The first row is number 0.\n" + "The current column is not affected\n" + "If the row does not exist, the function returns CBF_NOTFOUND.\n" + "ARGUMENTS\n" + "handle CBF handle. row Number of the row to select.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_wavelength", _wrap_cbf_handle_struct_set_wavelength, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_datablock_name", _wrap_cbf_handle_struct_datablock_name, METH_O, "\n" "\n" - "Returns : double wavelength\n" - "*args : \n" + "Returns : \n" + "*args : string\n" "\n" - "C prototype: int cbf_set_wavelength (cbf_handle handle, double wavelength);\n" + "C prototype: int cbf_datablock_name (cbf_handle handle,\n" + " const char **datablockname);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_wavelength sets the current wavelength in AA to wavelength.\n" + "cbf_datablock_name sets *datablockname to point to the name of the \n" + "current data block.\n" + "The data block name will be valid as long as the data block exists \n" + "and has not been renamed.\n" + "The name must not be modified by the program in any way.\n" "ARGUMENTS\n" - "handle CBF handle. wavelength Wavelength in AA.\n" + "handle CBF handle. datablockname Pointer to the \n" + "destination data block name pointer.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_axis_vector", _wrap_cbf_handle_struct_get_axis_vector, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_category_name", _wrap_cbf_handle_struct_category_name, METH_O, "\n" "\n" - "Returns : Float vector1,Float vector2,Float vector3\n" - "*args : String axis_id\n" + "Returns : \n" + "*args : string\n" "\n" - "C prototype: int cbf_get_axis_vector (cbf_handle handle, const char *axis_id,\n" - " double *vector1, double *vector2, double *vector3);\n" + "C prototype: int cbf_category_name (cbf_handle handle,\n" + " const char **categoryname);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" - "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" - "axis of index ancestor_index of axis axis_id, starting with axis_id \n" - "for ancestor_index 0.\n" - "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" - "axis_id or to \". \" if there is no such ancestor. \n" - "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" - "to \". \" if there is no such equipment. \n" - "cbf_get_axis_equipment_component sets *equipment_component to the \n" - "equipment_component of axis_id or to \". \" if there is no such \n" - "equipment_component.\n" - "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" - "components of the ofset of axis_id.\n" - "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" - "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" - "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" - "is no such rotation_axis.\n" - "cbf_get_axis_setting sets *start and *increment to the corresponding \n" - "values of the axis axis_id. Any of the destination pointers may be \n" - "NULL.\n" - "cbf_get_axis_type sets axis_type to the type of axis_id.\n" - "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" - "components of the vector of axis_id.\n" - "The parameter reserved is presently unused and should be set to 0.\n" + "cbf_category_name sets *categoryname to point to the name of the \n" + "current category of the current data block.\n" + "The category name will be valid as long as the category exists.\n" + "The name must not be modified by the program in any way.\n" "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any \n" - "value other than 0 is invalid. axis_id Axis id. \n" - "ancestor_index Integer index of the desired ancestor, starting \n" - "with 0 for the current axis_id. ancestor Pointer to \n" - "destination ancestor name pointer. depends_on Pointer to \n" - "destination depends_on name pointer. equipment Pointer to \n" - "destination equipment name pointer. equipment_component Pointer to \n" - "destination equipment_component name pointer. offset1 \n" - "Pointer to destination first offset component value. offset2 \n" - " Pointer to destination second offset component value. offset3 \n" - " Pointer to destination third offset component value. \n" - "rotation Pointer to destination rotation value. \n" - "rotation_axis Pointer to destination rotation_axisn name \n" - "pointer. start Pointer to the destination start \n" - "value. increment Pointer to the destination increment \n" - "value. type Pointer to destination axis type of type \n" - ". vector1 Pointer to destination first vector component \n" - "value. vector2 Pointer to destination second vector \n" - "component value. vector3 Pointer to destination third \n" - "vector component value.\n" + "handle CBF handle. categoryname Pointer to the destination \n" + "category name pointer.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_pixel_size_sf", _wrap_cbf_handle_struct_set_pixel_size_sf, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_column_name", _wrap_cbf_handle_struct_column_name, METH_O, "\n" "\n" "Returns : \n" - "*args : Int element_number,Int axis_number,Float pixel size\n" + "*args : string\n" "\n" - "C prototype: int cbf_set_pixel_size_sf(cbf_handle handle,\n" - " unsigned int element_number, int axis_number,\n" - " double psize);\n" + "C prototype: int cbf_column_name (cbf_handle handle, const char **columnname);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the \n" - ""e;size"e; column of the \"array_structure_list \" category \n" - "at the row which matches axis axis_number of the detector element \n" - "element_number converting the double pixel size psize from meters to \n" - "millimeters in storing it in the \"size \" column for the axis \n" - "axis_number of the detector element element_number. The axis_number \n" - "is numbered from 1, starting with the slowest axis. \n" - "cbf_set_pixel_size_fs sets the item\n" + "cbf_column_name sets *columnname to point to the name of the current \n" + "column of the current category.\n" + "The column name will be valid as long as the column exists.\n" + "The name must not be modified by the program in any way.\n" + "cbf_set_column_name sets the name of the current column to \n" + "newcolumnname\n" + "ARGUMENTS\n" + "handle CBF handle. columnname Pointer to the \n" + "destination column name pointer. newcolumnname New column name \n" + "pointer.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_diffrn_id", _wrap_cbf_handle_struct_get_diffrn_id, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_row_number", _wrap_cbf_handle_struct_row_number, METH_O, "\n" "\n" - "Returns : \n" - "*args : string\n" + "Returns : Integer\n" + "*args : \n" "\n" - "C prototype: int cbf_get_diffrn_id (cbf_handle handle,\n" - " const char **diffrn_id);\n" + "C prototype: int cbf_row_number (cbf_handle handle, unsigned int *row);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_diffrn_id sets *diffrn_id to point to the ASCII value of the \n" - "\"diffrn.id \" entry. cbf_require_diffrn_id also sets *diffrn_id to \n" - "point to the ASCII value of the \"diffrn.id \" entry, but, if the \n" - "\"diffrn.id \" entry does not exist, it sets the value in the CBF and \n" - "in*diffrn_id to the character string given by default_id, creating \n" - "the category and column is necessary.\n" - "The diffrn_id will be valid as long as the item exists and has not \n" - "been set to a new value.\n" - "The diffrn_id must not be modified by the program in any way.\n" + "cbf_row_number sets *row to the number of the current row of the \n" + "current category.\n" "ARGUMENTS\n" - "handle CBF handle. diffrn_id Pointer to the destination \n" - "value pointer. default_id Character string default value.\n" + "handle CBF handle. row Pointer to the destination row number.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_axis_rotation", _wrap_cbf_handle_struct_get_axis_rotation, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_value", _wrap_cbf_handle_struct_get_value, METH_O, "\n" "\n" - "Returns : Float\n" - "*args : String axis_id\n" + "Returns : \n" + "*args : string\n" "\n" - "C prototype: int cbf_get_axis_rotation (cbf_handle handle,\n" - " const char *axis_id, double *rotation);\n" + "C prototype: int cbf_get_value (cbf_handle handle, const char **value);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" - "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" - "axis of index ancestor_index of axis axis_id, starting with axis_id \n" - "for ancestor_index 0.\n" - "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" - "axis_id or to \". \" if there is no such ancestor. \n" - "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" - "to \". \" if there is no such equipment. \n" - "cbf_get_axis_equipment_component sets *equipment_component to the \n" - "equipment_component of axis_id or to \". \" if there is no such \n" - "equipment_component.\n" - "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" - "components of the ofset of axis_id.\n" - "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" - "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" - "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" - "is no such rotation_axis.\n" - "cbf_get_axis_setting sets *start and *increment to the corresponding \n" - "values of the axis axis_id. Any of the destination pointers may be \n" - "NULL.\n" - "cbf_get_axis_type sets axis_type to the type of axis_id.\n" - "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" - "components of the vector of axis_id.\n" - "The parameter reserved is presently unused and should be set to 0.\n" + "cbf_get_value sets *value to point to the ASCII value of the item at \n" + "the current column and row. cbf_require_value sets *value to point to \n" + "the ASCII value of the item at the current column and row, creating \n" + "the data item if necessary and initializing it to a copy of \n" + "defaultvalue.\n" + "If the value is not ASCII, the function returns CBF_BINARY.\n" + "The value will be valid as long as the item exists and has not been \n" + "set to a new value.\n" + "The value must not be modified by the program in any way.\n" "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any \n" - "value other than 0 is invalid. axis_id Axis id. \n" - "ancestor_index Integer index of the desired ancestor, starting \n" - "with 0 for the current axis_id. ancestor Pointer to \n" - "destination ancestor name pointer. depends_on Pointer to \n" - "destination depends_on name pointer. equipment Pointer to \n" - "destination equipment name pointer. equipment_component Pointer to \n" - "destination equipment_component name pointer. offset1 \n" - "Pointer to destination first offset component value. offset2 \n" - " Pointer to destination second offset component value. offset3 \n" - " Pointer to destination third offset component value. \n" - "rotation Pointer to destination rotation value. \n" - "rotation_axis Pointer to destination rotation_axisn name \n" - "pointer. start Pointer to the destination start \n" - "value. increment Pointer to the destination increment \n" - "value. type Pointer to destination axis type of type \n" - ". vector1 Pointer to destination first vector component \n" - "value. vector2 Pointer to destination second vector \n" - "component value. vector3 Pointer to destination third \n" - "vector component value.\n" + "handle CBF handle. value Pointer to the destination \n" + "value pointer. defaultvalue Default value character string.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_find_datablock", _wrap_cbf_handle_struct_find_datablock, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_require_value", _wrap_cbf_handle_struct_require_value, METH_VARARGS, "\n" "\n" - "Returns : string\n" - "*args : \n" + "Returns : String Value\n" + "*args : String defaultvalue\n" "\n" - "C prototype: int cbf_find_datablock (cbf_handle handle,\n" - " const char *datablockname);\n" + "C prototype: int cbf_require_value (cbf_handle handle, const char **value,\n" + " const char *defaultvalue );\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_find_datablock makes the data block with name datablockname the \n" - "current data block.\n" - "The comparison is case-insensitive.\n" - "If the data block does not exist, the function returns CBF_NOTFOUND.\n" - "The current category becomes undefined.\n" + "cbf_get_value sets *value to point to the ASCII value of the item at \n" + "the current column and row. cbf_require_value sets *value to point to \n" + "the ASCII value of the item at the current column and row, creating \n" + "the data item if necessary and initializing it to a copy of \n" + "defaultvalue.\n" + "If the value is not ASCII, the function returns CBF_BINARY.\n" + "The value will be valid as long as the item exists and has not been \n" + "set to a new value.\n" + "The value must not be modified by the program in any way.\n" "ARGUMENTS\n" - "handle CBF handle. datablockname The name of the data \n" - "block to find.\n" + "handle CBF handle. value Pointer to the destination \n" + "value pointer. defaultvalue Default value character string.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_polarization", _wrap_cbf_handle_struct_get_polarization, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_value", _wrap_cbf_handle_struct_set_value, METH_VARARGS, "\n" "\n" - "Returns : float polarizn_source_ratio,float polarizn_source_norm\n" + "Returns : string\n" "*args : \n" "\n" - "C prototype: int cbf_get_polarization (cbf_handle handle,\n" - " double *polarizn_source_ratio,\n" - " double *polarizn_source_norm);\n" + "C prototype: int cbf_set_value (cbf_handle handle, const char *value);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_polarization sets *polarizn_source_ratio and \n" - "*polarizn_source_norm to the corresponding source polarization \n" - "parameters.\n" - "Either destination pointer may be NULL.\n" + "cbf_set_value sets the item at the current column and row to the \n" + "ASCII value value.\n" "ARGUMENTS\n" - "handle CBF handle. polarizn_source_ratio Pointer \n" - "to the destination polarizn_source_ratio. polarizn_source_norm \n" - "Pointer to the destination polarizn_source_norm.\n" + "handle CBF handle. value ASCII value.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_select_category", _wrap_cbf_handle_struct_select_category, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_typeofvalue", _wrap_cbf_handle_struct_get_typeofvalue, METH_O, "\n" "\n" "Returns : \n" - "*args : Integer\n" + "*args : string\n" "\n" - "C prototype: int cbf_select_category (cbf_handle handle,\n" - " unsigned int category);\n" + "C prototype: int cbf_get_typeofvalue (cbf_handle handle,\n" + " const char **typeofvalue);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_select_category selects category number category in the current \n" - "data block as the current category.\n" - "The first category is number 0.\n" - "The current column and row become undefined.\n" - "If the category does not exist, the function returns CBF_NOTFOUND.\n" + "cbf_get_value sets *typeofvalue to point an ASCII descriptor of the \n" + "value of the item at the current column and row. The strings that may \n" + "be returned are:\n" + " \"null \" for a null value indicated by a \". \" or a \"? \" \n" + "\"bnry \" for a binary value \"word \" for an unquoted string \n" + "\"dblq \" for a double-quoted string \"sglq \" for a single-quoted \n" + "string \"text \" for a semicolon-quoted string (multiline text \n" + "field) \"prns \" for a parenthesis-bracketed string (multiline text \n" + "field) \"brcs \" for a brace-bracketed string (multiline text field) \n" + " \"bkts \" for a square-bracket-bracketed string (multiline text \n" + "field) \"tsqs \" for a treble-single-quote quoted string (multiline \n" + "text field) \"tdqs \" for a treble-double-quote quoted string \n" + "(multiline text field)\n" + "Not all types are valid for all type of CIF files. In partcular the \n" + "types \"prns \", \"brcs \", \"bkts \" were introduced with DDLm \n" + "and are not valid in DDL1 or DDL2 CIFS. The types \"tsqs \" and \n" + "\"tdqs \" are not formally part of the CIF syntax. A field for which \n" + "no value has been set sets *typeofvalue to NULL rather than to the \n" + "string \"null \".\n" + "The typeofvalue must not be modified by the program in any way.\n" "ARGUMENTS\n" - "handle CBF handle. category Number of the category to select.\n" + "handle CBF handle. typeofvalue Pointer to the destination \n" + "type-of-value string pointer.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_pixel_size_fs", _wrap_cbf_handle_struct_get_pixel_size_fs, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_typeofvalue", _wrap_cbf_handle_struct_set_typeofvalue, METH_VARARGS, "\n" "\n" - "Returns : Float pixel_size\n" - "*args : Int element_number,Int axis_number\n" + "Returns : string\n" + "*args : \n" "\n" - "C prototype: int cbf_get_pixel_size_fs(cbf_handle handle,\n" - " unsigned int element_number, int axis_number,\n" - " double *psize);\n" + "C prototype: int cbf_set_typeofvalue (cbf_handle handle,\n" + " const char *typeofvalue);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to \n" - "the double value in millimeters of the axis axis_number of the \n" - "detector element element_number. The axis_number is numbered from 1, \n" - "starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to \n" - "point to the double value in millimeters of the axis axis_number of \n" - "the detector element element_number. The axis_number is numbered from \n" - "1, starting with the fastest axis.\n" - "If a negative axis number is given, the order of axes is reversed, so \n" - "that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the \n" - "fastest axis for cbf_get_pixel_size_sf.\n" - "If the pixel size is not given explcitly in the \"array_element_size \n" - "\" category, the function returns CBF_NOTFOUND.\n" + "cbf_set_typeofvalue sets the type of the item at the current column \n" + "and row to the type specified by the ASCII character string given by \n" + "typeofvalue. The strings that may be used are:\n" + " \"null \" for a null value indicated by a \". \" or a \"? \" \n" + "\"bnry \" for a binary value \"word \" for an unquoted string \n" + "\"dblq \" for a double-quoted string \"sglq \" for a single-quoted \n" + "string \"text \" for a semicolon-quoted string (multiline text \n" + "field) \"prns \" for a parenthesis-bracketed string (multiline text \n" + "field) \"brcs \" for a brace-bracketed string (multiline text field) \n" + " \"bkts \" for a square-bracket-bracketed string (multiline text \n" + "field) \"tsqs \" for a treble-single-quote quoted string (multiline \n" + "text field) \"tdqs \" for a treble-double-quote quoted string \n" + "(multiline text field)\n" + "Not all types may be used for all values. Not all types are valid for \n" + "all type of CIF files. In partcular the types \"prns \", \"brcs \", \n" + " \"bkts \" were introduced with DDLm and are not valid in DDL1 or \n" + "DDL2 CIFS. The types \"tsqs \" and \"tdqs \" are not formally part \n" + "of the CIF syntax. No changes may be made to the type of binary \n" + "values. You may not set the type of a string that contains a single \n" + "quote followed by a blank or a tab or which contains multiple lines \n" + "to \"sglq \". You may not set the type of a string that contains a \n" + "double quote followed by a blank or a tab or which contains multiple \n" + "lines to \"dblq \".\n" "ARGUMENTS\n" - "handle CBF handle. element_number The number of the \n" - "detector element counting from 0 by order of appearance in the \n" - "\"diffrn_data_frame \" category. axis_number The number of the \n" - "axis, starting from 1 for the fastest for cbf_get_pixel_size and \n" - "cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. \n" - "psize Pointer to the destination pixel size.\n" + "handle CBF handle. typeofvalue ASCII string for desired type \n" + "of value.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_axis_poise", _wrap_cbf_handle_struct_get_axis_poise, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_integervalue", _wrap_cbf_handle_struct_get_integervalue, METH_O, "\n" "\n" - "Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2,\n" - " Float offset3,Float angle\n" - "*args : Float ratio,String axis_id,String frame_id\n" + "Returns : int\n" + "*args : \n" "\n" - "C prototype: int cbf_get_axis_poise(cbf_handle handle, double ratio,\n" - " double * vector1, double * vector2, double * vector3,\n" - " double * offset1, double * offset2, double * offset3,\n" - " double * angle, const char * axis_id,\n" - " const char * frame_id);\n" + "C prototype: int cbf_get_integervalue (cbf_handle handle, int *number);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_axis_poise sets vector1, vector2, vector3 to point to the \n" - "components of the axis vector for axis axis_id, offset1, offset2, \n" - "offset3 to point to the components of the axis base offset vector for \n" - "axis axis_id, and angle to point to the angle of rotation of axis \n" - "axis_id after application of the axis settings for frame frame_id, \n" - "using ratio, a value between 0 and 1, indicating how far into the \n" - "internal motion in the frame to go. If frame_id is the string \". \n" - "\", the first frame found is used. If there is more than one frame, \n" - "which frame will be found is indeterminate. If frame_id is NULL, the \n" - "overall setting for the scan are used, rather than those for any \n" - "particular frame. The vector and offset reported are the reference \n" - "vector and offset of the axis axis_id transformed by application of \n" - "all motions of the axes on which axis_id depends.\n" - "cbf_get_goniometer_poise vector1, vector2, vector3 to point to the \n" - "components of the axis vector for the goniometer axis, offset1, \n" - "offset2, offset3 to point to the components of the axis base offset \n" - "vector for the goniometer axis, and angle to point to the angle of \n" - "rotation of the goniometer axis after application of all axis \n" - "settings in the goniometer deriving the vector, offset and angle from \n" - "the resulting matrix. Calculation of the vector is indeterminate if \n" - "the angle is zero.\n" - "cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point \n" - "to the components of the axis vector for axis axis_id, offset1, \n" - "offset2, offset3 to point to the components of the axis base offset \n" - "vector for axis axis_id unmodified by axis rotations. Any of the \n" - "pointers may be specified as NULL.\n" + "cbf_get_integervalue sets *number to the value of the ASCII item at \n" + "the current column and row interpreted as a decimal integer. \n" + "cbf_require_integervalue sets *number to the value of the ASCII item \n" + "at the current column and row interpreted as a decimal integer, \n" + "setting it to defaultvalue if necessary.\n" + "If the value is not ASCII, the function returns CBF_BINARY.\n" "ARGUMENTS\n" - "handle CBF handle. ratio A number between 0 and 1 \n" - "indication how far into the frame to go vector1 Pointer to the \n" - "first component of the axis vector vector2 Pointer to the second \n" - "component of the axis vector vector3 Pointer to the third \n" - "component of the axis vector offset1 Pointer to the first \n" - "component of the axis offset offset2 Pointer to the second \n" - "component of the axis offset offset3 Pointer to the third \n" - "component of the axis offset angle Pointer to the rotation \n" - "angle axis_id The specified axis frame_id The specified \n" - "frame positioner CBF goniometer\n" + "handle CBF handle. number pointer to the number. \n" + "defaultvalue default number value.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_read_file", _wrap_cbf_handle_struct_read_file, METH_VARARGS, (char *)"\n" - "\n" - "Returns : \n" - "*args : String filename,Integer headers\n" - "\n" - "C prototype: int cbf_read_file (cbf_handle handle, FILE *file, int flags);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_read_file reads the CBF or CIF file file into the CBF object \n" - "specified by handle, using the CIF 1.0 convention of 80 character \n" - "lines. cbf_read_widefile reads the CBF or CIF file file into the CBF \n" - "object specified by handle, using the CIF 1.1 convention of 2048 \n" - "character lines. A warning is issued to stderr for ascii lines over \n" - "the limit. No test is performed on binary sections.\n" - "Validation is performed in three ways levels: during the lexical \n" - "scan, during the parse, and, if a dictionary was converted, against \n" - "the value types, value enumerations, categories and parent-child \n" - "relationships specified in the dictionary.\n" - "flags controls the interpretation of binary section headers, the \n" - "parsing of brackets constructs and the parsing of treble-quoted \n" - "strings.\n" - "MSG_DIGEST: Instructs CBFlib to check that the digest \n" - "of the binary section matches any header digest value. If the digests \n" - "do not match, the call will return CBF_FORMAT. This evaluation and \n" - "comparison is delayed (a \"lazy \" evaluation) to ensure maximal \n" - "processing efficiency. If an immediately evaluation is required, see \n" - "MSG_DIGESTNOW, below. MSG_DIGESTNOW: Instructs CBFlib to \n" - "check that the digest of the binary section matches any header \n" - "digeste value. If the digests do not match, the call will return \n" - "CBF_FORMAT. This evaluation and comparison is performed during \n" - "initial parsing of the section to ensure timely error reporting at \n" - "the expense of processing efficiency. If a more efficient delayed ( \n" - "\"lazy \") evaluation is required, see MSG_DIGEST, above. \n" - "MSG_DIGESTWARN: Instructs CBFlib to check that the digest \n" - "of the binary section matches any header digeste value. If the \n" - "digests do not match, a warning message will be sent to stderr, but \n" - "processing will attempt to continue. This evaluation and comparison \n" - "is first performed during initial parsing of the section to ensure \n" - "timely error reporting at the expense of processing efficiency. An \n" - "mismatch of the message digest usually indicates a serious error, but \n" - "it is sometimes worth continuing processing to try to isolate the \n" - "cause of the error. Use this option with caution. MSG_NODIGEST: \n" - " Do not check the digest (default). PARSE_BRACKETS: \n" - "Accept DDLm bracket-delimited [item,item,...item] or \n" - "{item,item,...item} or (item,item,...item) constructs as valid, \n" - "stripping non-quoted embedded whitespace and comments. These \n" - "constructs may span multiple lines. PARSE_LIBERAL_BRACKETS: Accept \n" - "DDLm bracket-delimited [item,item,...item] or {item,item,...item} or \n" - "(item,item,...item) constructs as valid, stripping embedded \n" - "non-quoted, non-separating whitespace and comments. These constructs \n" - "may span multiple lines. In this case, whitespace may be used as an \n" - "alternative to the comma. PARSE_TRIPLE_QUOTES: Accept DDLm \n" - "triple-quoted \" \" \"item,item,...item \" \" \" or \n" - "'''item,item,...item''' constructs as valid, stripping embedded \n" - "whitespace and comments. These constructs may span multiple lines. If \n" - "this flag is set, then ''' will not be interpreted as a quoted \n" - "apoptrophe and \" \" \" will not be interpreted as a quoted double \n" - "quote mark and PARSE_NOBRACKETS: Do not accept DDLm \n" - "bracket-delimited [item,item,...item] or {item,item,...item} or \n" - "(item,item,...item) constructs as valid, stripping non-quoted \n" - "embedded whitespace and comments. These constructs may span multiple \n" - "lines. PARSE_NOTRIPLE_QUOTES: No not accept DDLm triple-quoted \" \n" - "\" \"item,item,...item \" \" \" or '''item,item,...item''' constructs \n" - "as valid, stripping embedded whitespace and comments. These \n" - "constructs may span multiple lines. If this flag is set, then ''' \n" - "will be interpreted as a quoted apostrophe and \" \" \" will be \n" - "interpreted as a quoted double quote mark.\n" - "CBFlib defers reading binary sections as long as possible. In the \n" - "current version of CBFlib, this means that:\n" - "1. The file must be a random-access file opened in binary mode (fopen \n" - "( ,\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_datablock_name", _wrap_cbf_handle_struct_datablock_name, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_require_integervalue", _wrap_cbf_handle_struct_require_integervalue, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : string\n" + "Returns : Int number\n" + "*args : Int thedefault\n" "\n" - "C prototype: int cbf_datablock_name (cbf_handle handle,\n" - " const char **datablockname);\n" + "C prototype: int cbf_require_integervalue (cbf_handle handle, int *number,\n" + " int defaultvalue);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_datablock_name sets *datablockname to point to the name of the \n" - "current data block.\n" - "The data block name will be valid as long as the data block exists \n" - "and has not been renamed.\n" - "The name must not be modified by the program in any way.\n" + "cbf_get_integervalue sets *number to the value of the ASCII item at \n" + "the current column and row interpreted as a decimal integer. \n" + "cbf_require_integervalue sets *number to the value of the ASCII item \n" + "at the current column and row interpreted as a decimal integer, \n" + "setting it to defaultvalue if necessary.\n" + "If the value is not ASCII, the function returns CBF_BINARY.\n" "ARGUMENTS\n" - "handle CBF handle. datablockname Pointer to the \n" - "destination data block name pointer.\n" + "handle CBF handle. number pointer to the number. \n" + "defaultvalue default number value.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_realarray_wdims", _wrap_cbf_handle_struct_set_realarray_wdims, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_integervalue", _wrap_cbf_handle_struct_set_integervalue, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : int compression,int binary_id,(binary) String data,int elsize,\n" - " int elements,String byteorder,int dimfast,int dimmid,int dimslow,\n" - " int padding\n" - "\n" - "C prototype: int cbf_set_realarray_wdims (cbf_handle handle,\n" - " unsigned int compression, int binary_id, void *array,\n" - " size_t elsize, size_t elements, const char *byteorder,\n" - " size_t dimfast, size_t dimmid, size_t dimslow,\n" - " size_t padding);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_set_integerarray sets the binary value of the item at the current \n" - "column and row to an integer array. The array consists of elements \n" - "elements of elsize bytes each, starting at array. The elements are \n" - "signed if elsigned is non-0 and unsigned otherwise. binary_id is the \n" - "binary section identifier. cbf_set_realarray sets the binary value of \n" - "the item at the current column and row to an integer array. The array \n" - "consists of elements elements of elsize bytes each, starting at \n" - "array. binary_id is the binary section identifier.\n" - "The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, \n" - "cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, \n" - "cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants \n" - "allow the data header values of byteorder, dimfast, dimmid, dimslow \n" - "and padding to be set to the data byte order, the fastest, second \n" - "fastest and third fastest array dimensions and the size in byte of \n" - "the post data padding to be used.\n" - "The array will be compressed using the compression scheme specifed by \n" - "compression. Currently, the available schemes are:\n" - "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" - "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" - " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" - " Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" - "\"nibble_offset \" compression. CBF_NONE No compression. \n" - "NOTE: This scheme is by far the slowest of the four and uses much \n" - "more disk space. It is intended for routine use with small arrays \n" - "only. With large arrays (like images) it should be used only for \n" - "debugging.\n" - "The values compressed are limited to 64 bits. If any element in the \n" - "array is larger than 64 bits, the value compressed is the nearest \n" - "64-bit value.\n" - "Currently, the source array must consist of chars, shorts or ints \n" - "(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or \n" - "floats for cbf_set_realarray. If elsize is not equal to sizeof \n" - "(char), sizeof (short) or sizeof (int), the function returns \n" - "CBF_ARGUMENT.\n" + "Returns : int number\n" + "*args : \n" + "\n" + "C prototype: int cbf_set_integervalue (cbf_handle handle, int number);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_integervalue sets the item at the current column and row to \n" + "the integer value number written as a decimal ASCII string.\n" "ARGUMENTS\n" - "handle CBF handle. compression Compression method to use. \n" - "binary_id Integer binary identifier. array Pointer to the \n" - "source array. elsize Size in bytes of each source array \n" - "element. elsigned Set to non-0 if the source array elements are \n" - "signed. elements: The number of elements in the array.\n" + "handle CBF handle. number Integer value.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_construct_reference_detector", _wrap_cbf_handle_struct_construct_reference_detector, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_doublevalue", _wrap_cbf_handle_struct_get_doublevalue, METH_O, "\n" "\n" - "Returns : pycbf detector object\n" - "*args : Integer element_number\n" + "Returns : double\n" + "*args : \n" "\n" - "C prototype: int cbf_construct_reference_detector (cbf_handle handle,\n" - " cbf_detector *detector, unsigned int element_number);\n" + "C prototype: int cbf_get_doublevalue (cbf_handle handle, double *number);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_construct_detector constructs a detector object for detector \n" - "element number element_number using the description in the CBF object \n" - "handle and initialises the detector handle *detector.\n" - "cbf_construct_reference_detector constructs a detector object for \n" - "detector element number element_number using the description in the \n" - "CBF object handle and initialises the detector handle *detector using \n" - "the reference settings of the axes. cbf_require_reference_detector is \n" - "similar, but try to force the creations of missing intermediate \n" - "categories needed to construct a detector object.\n" + "cbf_get_doublevalue sets *number to the value of the ASCII item at \n" + "the current column and row interpreted as a decimal floating-point \n" + "number. cbf_require_doublevalue sets *number to the value of the \n" + "ASCII item at the current column and row interpreted as a decimal \n" + "floating-point number, setting it to defaultvalue if necessary.\n" + "If the value is not ASCII, the function returns CBF_BINARY.\n" "ARGUMENTS\n" - "handle CBF handle. detector Pointer to the \n" - "destination detector handle. element_number The number of the \n" - "detector element counting from 0 by order of appearance in the \n" - "\"diffrn_data_frame \" category.\n" + "handle CBF handle. number Pointer to the destination \n" + "number. defaultvalue default number value.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_real_3d_image_fs_as_string", _wrap_cbf_handle_struct_get_real_3d_image_fs_as_string, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_require_doublevalue", _wrap_cbf_handle_struct_require_doublevalue, METH_VARARGS, "\n" "\n" - "Returns : (Binary)String\n" - "*args : int element_number,int elsize,int ndimfast,int ndimmid,int ndimslow\n" + "Returns : Float Number\n" + "*args : Float Default\n" "\n" - "C prototype: int cbf_get_real_3d_image_fs (cbf_handle handle,\n" - " unsigned int reserved, unsigned int element_number,\n" - " void *array, size_t elsize, size_t ndimfast,\n" - " size_t ndimmid, size_t ndimslow);\n" + "C prototype: int cbf_require_doublevalue (cbf_handle handle, double *number,\n" + " double defaultvalue);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" - "array for element number element_number into an array. The array \n" - "consists of ndimslow *ndimfast elements of elsize bytes each, \n" - "starting at array. The elements are signed if elsign is non-0 and \n" - "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" - "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" - "for element number element_number into an array. A real array is \n" - "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" - "cbf_get_3d_image_sf read the 3D image array for element number \n" - "element_number into an array. The array consists of ndimslow *ndimmid \n" - "*ndimfast elements of elsize bytes each, starting at array. The \n" - "elements are signed if elsign is non-0 and unsigned otherwise. \n" - "cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" - "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" - "floats for element number element_number into an array. A real array \n" - "is always signed.\n" - "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" - "with no suffix and the calls _sf calls give the dimensions in \n" - "slow-to-fast order\n" - "The structure of the array as a 1-, 2- or 3-dimensional array should \n" - "agree with the structure of the array given in the \n" - "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" - "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" - "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" - "being processed. If the array is 2-dimensional and a 3D call is used, \n" - "ndimslow and ndimmid should be the\n" + "cbf_get_doublevalue sets *number to the value of the ASCII item at \n" + "the current column and row interpreted as a decimal floating-point \n" + "number. cbf_require_doublevalue sets *number to the value of the \n" + "ASCII item at the current column and row interpreted as a decimal \n" + "floating-point number, setting it to defaultvalue if necessary.\n" + "If the value is not ASCII, the function returns CBF_BINARY.\n" + "ARGUMENTS\n" + "handle CBF handle. number Pointer to the destination \n" + "number. defaultvalue default number value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_rewind_row", _wrap_cbf_handle_struct_rewind_row, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_doublevalue", _wrap_cbf_handle_struct_set_doublevalue, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : \n" + "*args : String format,Float number\n" "\n" - "C prototype: int cbf_rewind_row (cbf_handle handle);\n" + "C prototype: int cbf_set_doublevalue (cbf_handle handle, const char *format,\n" + " double number);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_rewind_row makes the first row in the current category the \n" - "current row.\n" - "If there are no rows, the function returns CBF_NOTFOUND.\n" - "The current column is not affected.\n" + "cbf_set_doublevalue sets the item at the current column and row to \n" + "the floating-point value number written as an ASCII string with the \n" + "format specified by format as appropriate for the printf function.\n" "ARGUMENTS\n" - "handle CBF handle.\n" + "handle CBF handle. format Format for the number. number \n" + "Floating-point value.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_axis_setting", _wrap_cbf_handle_struct_get_axis_setting, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_integerarrayparameters", _wrap_cbf_handle_struct_get_integerarrayparameters, METH_O, "\n" "\n" - "Returns : Float start,Float increment\n" - "*args : String axis_id\n" + "Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned,\n" + " int elements,int minelement,int maxelement\n" + "*args : \n" "\n" - "C prototype: int cbf_get_axis_setting (cbf_handle handle,\n" - " unsigned int reserved, const char *axis_id, double *start,\n" - " double *increment);\n" + "C prototype: int cbf_get_integerarrayparameters (cbf_handle handle,\n" + " unsigned int *compression, int *binary_id, size_t *elsize,\n" + " int *elsigned, int *elunsigned, size_t *elements,\n" + " int *minelement, int *maxelement);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" - "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" - "axis of index ancestor_index of axis axis_id, starting with axis_id \n" - "for ancestor_index 0.\n" - "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" - "axis_id or to \". \" if there is no such ancestor. \n" - "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" - "to \". \" if there is no such equipment. \n" - "cbf_get_axis_equipment_component sets *equipment_component to the \n" - "equipment_component of axis_id or to \". \" if there is no such \n" - "equipment_component.\n" - "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" - "components of the ofset of axis_id.\n" - "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" - "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" - "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" - "is no such rotation_axis.\n" - "cbf_get_axis_setting sets *start and *increment to the corresponding \n" - "values of the axis axis_id. Any of the destination pointers may be \n" - "NULL.\n" - "cbf_get_axis_type sets axis_type to the type of axis_id.\n" - "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" - "components of the vector of axis_id.\n" - "The parameter reserved is presently unused and should be set to 0.\n" + "cbf_get_integerarrayparameters sets *compression, *binary_id, \n" + "*elsize, *elsigned, *elunsigned, *elements, *minelement and \n" + "*maxelement to values read from the binary value of the item at the \n" + "current column and row. This provides all the arguments needed for a \n" + "subsequent call to cbf_set_integerarray, if a copy of the array is to \n" + "be made into another CIF or CBF. cbf_get_realarrayparameters sets \n" + "*compression, *binary_id, *elsize, *elements to values read from the \n" + "binary value of the item at the current column and row. This provides \n" + "all the arguments needed for a subsequent call to cbf_set_realarray, \n" + "if a copy of the arry is to be made into another CIF or CBF.\n" + "The variants cbf_get_integerarrayparameters_wdims, \n" + "cbf_get_integerarrayparameters_wdims_fs, \n" + "cbf_get_integerarrayparameters_wdims_sf, \n" + "cbf_get_realarrayparameters_wdims, \n" + "cbf_get_realarrayparameters_wdims_fs, \n" + "cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, \n" + "*dimmid, *dimslow, and *padding as well, providing the additional \n" + "parameters needed for a subsequent call to cbf_set_integerarray_wdims \n" + "or cbf_set_realarray_wdims.\n" + "The value returned in *byteorder is a pointer either to the string \n" + "\"little_endian \" or to the string \"big_endian \". This should be \n" + "the byte order of the data, not necessarily of the host machine. No \n" + "attempt should be made to modify this string. At this time only \n" + "\"little_endian \" will be returned.\n" + "The values returned in *dimfast, *dimmid and *dimslow are the sizes \n" + "of the fastest changing, second fastest changing and third fastest \n" + "changing dimensions of the array, if specified, or zero, if not \n" + "specified.\n" + "The value returned in *padding is the size of the post-data padding, \n" + "if any and if specified in the data header. The value is given as a \n" + "count of octets.\n" + "If the value is not binary, the function returns CBF_ASCII.\n" "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any \n" - "value other than 0 is invalid. axis_id Axis id. \n" - "ancestor_index Integer index of the desired ancestor, starting \n" - "with 0 for the current axis_id. ancestor Pointer to \n" - "destination ancestor name pointer. depends_on Pointer to \n" - "destination depends_on name pointer. equipment Pointer to \n" - "destination equipment name pointer. equipment_component Pointer to \n" - "destination equipment_component name pointer. offset1 \n" - "Pointer to destination first offset component value. offset2 \n" - " Pointer to destination second offset component value. offset3 \n" - " Pointer to destination third offset component value. \n" - "rotation Pointer to destination rotation value. \n" - "rotation_axis Pointer to destination rotation_axisn name \n" - "pointer. start Pointer to the destination start \n" - "value. increment Pointer to the destination increment \n" - "value. type Pointer to destination axis type of type \n" - ". vector1 Pointer to destination first vector component \n" - "value. vector2 Pointer to destination second vector \n" - "component value. vector3 Pointer to destination third \n" - "vector component value.\n" + "handle CBF handle. compression Compression method used. \n" + "elsize Size in bytes of each array element. binary_id \n" + "Pointer to the destination integer binary identifier. elsigned \n" + "Pointer to an integer. Set to 1 if the elements can be read as signed \n" + "integers. elunsigned Pointer to an integer. Set to 1 if the \n" + "elements can be read as unsigned integers. elements Pointer to \n" + "the destination number of elements. minelement Pointer to the \n" + "destination smallest element. maxelement Pointer to the \n" + "destination largest element. byteorder Pointer to the destination \n" + "byte order. dimfast Pointer to the destination fastest \n" + "dimension. dimmid Pointer to the destination second fastest \n" + "dimension. dimslow Pointer to the destination third fastest \n" + "dimension. padding Pointer to the destination padding size.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_require_column", _wrap_cbf_handle_struct_require_column, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_integerarrayparameters_wdims", _wrap_cbf_handle_struct_get_integerarrayparameters_wdims, METH_O, "\n" "\n" - "Returns : string\n" + "Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned,\n" + " int elements,int minelement,int maxelement,char **bo,int *bolen,\n" + " int dimfast,int dimmid,int dimslow,int padding\n" "*args : \n" "\n" - "C prototype: int cbf_require_column (cbf_handle handle,\n" - " const char *columnname);\n" + "C prototype: int cbf_get_integerarrayparameters_wdims (cbf_handle handle,\n" + " unsigned int *compression, int *binary_id, size_t *elsize,\n" + " int *elsigned, int *elunsigned, size_t *elements,\n" + " int *minelement, int *maxelement, const char **byteorder,\n" + " size_t *dimfast, size_t *dimmid, size_t *dimslow,\n" + " size_t *padding);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_require_column makes the columns in the current category with \n" - "name columnname the current column, if it exists, or creates it if it \n" - "does not.\n" - "The comparison is case-insensitive.\n" - "The current row is not affected.\n" + "cbf_get_integerarrayparameters sets *compression, *binary_id, \n" + "*elsize, *elsigned, *elunsigned, *elements, *minelement and \n" + "*maxelement to values read from the binary value of the item at the \n" + "current column and row. This provides all the arguments needed for a \n" + "subsequent call to cbf_set_integerarray, if a copy of the array is to \n" + "be made into another CIF or CBF. cbf_get_realarrayparameters sets \n" + "*compression, *binary_id, *elsize, *elements to values read from the \n" + "binary value of the item at the current column and row. This provides \n" + "all the arguments needed for a subsequent call to cbf_set_realarray, \n" + "if a copy of the arry is to be made into another CIF or CBF.\n" + "The variants cbf_get_integerarrayparameters_wdims, \n" + "cbf_get_integerarrayparameters_wdims_fs, \n" + "cbf_get_integerarrayparameters_wdims_sf, \n" + "cbf_get_realarrayparameters_wdims, \n" + "cbf_get_realarrayparameters_wdims_fs, \n" + "cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, \n" + "*dimmid, *dimslow, and *padding as well, providing the additional \n" + "parameters needed for a subsequent call to cbf_set_integerarray_wdims \n" + "or cbf_set_realarray_wdims.\n" + "The value returned in *byteorder is a pointer either to the string \n" + "\"little_endian \" or to the string \"big_endian \". This should be \n" + "the byte order of the data, not necessarily of the host machine. No \n" + "attempt should be made to modify this string. At this time only \n" + "\"little_endian \" will be returned.\n" + "The values returned in *dimfast, *dimmid and *dimslow are the sizes \n" + "of the fastest changing, second fastest changing and third fastest \n" + "changing dimensions of the array, if specified, or zero, if not \n" + "specified.\n" + "The value returned in *padding is the size of the post-data padding, \n" + "if any and if specified in the data header. The value is given as a \n" + "count of octets.\n" + "If the value is not binary, the function returns CBF_ASCII.\n" "ARGUMENTS\n" - "handle CBF handle. columnname The name of column to find.\n" + "handle CBF handle. compression Compression method used. \n" + "elsize Size in bytes of each array element. binary_id \n" + "Pointer to the destination integer binary identifier. elsigned \n" + "Pointer to an integer. Set to 1 if the elements can be read as signed \n" + "integers. elunsigned Pointer to an integer. Set to 1 if the \n" + "elements can be read as unsigned integers. elements Pointer to \n" + "the destination number of elements. minelement Pointer to the \n" + "destination smallest element. maxelement Pointer to the \n" + "destination largest element. byteorder Pointer to the destination \n" + "byte order. dimfast Pointer to the destination fastest \n" + "dimension. dimmid Pointer to the destination second fastest \n" + "dimension. dimslow Pointer to the destination third fastest \n" + "dimension. padding Pointer to the destination padding size.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_timestamp", _wrap_cbf_handle_struct_get_timestamp, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_integerarrayparameters_wdims_fs", _wrap_cbf_handle_struct_get_integerarrayparameters_wdims_fs, METH_O, "\n" "\n" - "Returns : Float time,Integer timezone\n" + "Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned,\n" + " int elements,int minelement,int maxelement,char **bo,int *bolen,\n" + " int dimfast,int dimmid,int dimslow,int padding\n" "*args : \n" "\n" - "C prototype: int cbf_get_timestamp (cbf_handle handle, unsigned int reserved,\n" - " double *time, int *timezone);\n" + "C prototype: int cbf_get_integerarrayparameters_wdims_fs (cbf_handle handle,\n" + " unsigned int *compression, int *binary_id, size_t *elsize,\n" + " int *elsigned, int *elunsigned, size_t *elements,\n" + " int *minelement, int *maxelement, const char **byteorder,\n" + " size_t *dimfast, size_t *dimmid, size_t *dimslow,\n" + " size_t *padding);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_timestamp sets *time to the collection timestamp in seconds \n" - "since January 1 1970. *timezone is set to timezone difference from \n" - "UTC in minutes. The parameter reserved is presently unused and should \n" - "be set to 0.\n" - "Either of the destination pointers may be NULL.\n" + "cbf_get_integerarrayparameters sets *compression, *binary_id, \n" + "*elsize, *elsigned, *elunsigned, *elements, *minelement and \n" + "*maxelement to values read from the binary value of the item at the \n" + "current column and row. This provides all the arguments needed for a \n" + "subsequent call to cbf_set_integerarray, if a copy of the array is to \n" + "be made into another CIF or CBF. cbf_get_realarrayparameters sets \n" + "*compression, *binary_id, *elsize, *elements to values read from the \n" + "binary value of the item at the current column and row. This provides \n" + "all the arguments needed for a subsequent call to cbf_set_realarray, \n" + "if a copy of the arry is to be made into another CIF or CBF.\n" + "The variants cbf_get_integerarrayparameters_wdims, \n" + "cbf_get_integerarrayparameters_wdims_fs, \n" + "cbf_get_integerarrayparameters_wdims_sf, \n" + "cbf_get_realarrayparameters_wdims, \n" + "cbf_get_realarrayparameters_wdims_fs, \n" + "cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, \n" + "*dimmid, *dimslow, and *padding as well, providing the additional \n" + "parameters needed for a subsequent call to cbf_set_integerarray_wdims \n" + "or cbf_set_realarray_wdims.\n" + "The value returned in *byteorder is a pointer either to the string \n" + "\"little_endian \" or to the string \"big_endian \". This should be \n" + "the byte order of the data, not necessarily of the host machine. No \n" + "attempt should be made to modify this string. At this time only \n" + "\"little_endian \" will be returned.\n" + "The values returned in *dimfast, *dimmid and *dimslow are the sizes \n" + "of the fastest changing, second fastest changing and third fastest \n" + "changing dimensions of the array, if specified, or zero, if not \n" + "specified.\n" + "The value returned in *padding is the size of the post-data padding, \n" + "if any and if specified in the data header. The value is given as a \n" + "count of octets.\n" + "If the value is not binary, the function returns CBF_ASCII.\n" "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any value other than 0 is \n" - "invalid. time Pointer to the destination collection timestamp. \n" - "timezone Pointer to the destination timezone difference.\n" + "handle CBF handle. compression Compression method used. \n" + "elsize Size in bytes of each array element. binary_id \n" + "Pointer to the destination integer binary identifier. elsigned \n" + "Pointer to an integer. Set to 1 if the elements can be read as signed \n" + "integers. elunsigned Pointer to an integer. Set to 1 if the \n" + "elements can be read as unsigned integers. elements Pointer to \n" + "the destination number of elements. minelement Pointer to the \n" + "destination smallest element. maxelement Pointer to the \n" + "destination largest element. byteorder Pointer to the destination \n" + "byte order. dimfast Pointer to the destination fastest \n" + "dimension. dimmid Pointer to the destination second fastest \n" + "dimension. dimslow Pointer to the destination third fastest \n" + "dimension. padding Pointer to the destination padding size.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_find_nextrow", _wrap_cbf_handle_struct_find_nextrow, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_integerarrayparameters_wdims_sf", _wrap_cbf_handle_struct_get_integerarrayparameters_wdims_sf, METH_O, "\n" "\n" - "Returns : string\n" + "Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned,\n" + " int elements,int minelement,int maxelement,char **bo,int *bolen,\n" + " int dimslow,int dimmid,int dimfast,int padding\n" "*args : \n" "\n" - "C prototype: int cbf_find_nextrow (cbf_handle handle, const char *value);\n" + "C prototype: int cbf_get_integerarrayparameters_wdims_sf (cbf_handle handle,\n" + " unsigned int *compression, int *binary_id, size_t *elsize,\n" + " int *elsigned, int *elunsigned, size_t *elements,\n" + " int *minelement, int *maxelement, const char **byteorder,\n" + " size_t *dimslow, size_t *dimmid, size_t *dimfast,\n" + " size_t *padding);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_find_nextrow makes the makes the next row in the current column \n" - "with value value the current row. The search starts from the row \n" - "following the last row found with cbf_find_row or cbf_find_nextrow, \n" - "or from the current row if the current row was defined using any \n" - "other function.\n" - "The comparison is case-sensitive.\n" - "If no more matching rows exist, the function returns CBF_NOTFOUND.\n" - "The current column is not affected.\n" + "cbf_get_integerarrayparameters sets *compression, *binary_id, \n" + "*elsize, *elsigned, *elunsigned, *elements, *minelement and \n" + "*maxelement to values read from the binary value of the item at the \n" + "current column and row. This provides all the arguments needed for a \n" + "subsequent call to cbf_set_integerarray, if a copy of the array is to \n" + "be made into another CIF or CBF. cbf_get_realarrayparameters sets \n" + "*compression, *binary_id, *elsize, *elements to values read from the \n" + "binary value of the item at the current column and row. This provides \n" + "all the arguments needed for a subsequent call to cbf_set_realarray, \n" + "if a copy of the arry is to be made into another CIF or CBF.\n" + "The variants cbf_get_integerarrayparameters_wdims, \n" + "cbf_get_integerarrayparameters_wdims_fs, \n" + "cbf_get_integerarrayparameters_wdims_sf, \n" + "cbf_get_realarrayparameters_wdims, \n" + "cbf_get_realarrayparameters_wdims_fs, \n" + "cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, \n" + "*dimmid, *dimslow, and *padding as well, providing the additional \n" + "parameters needed for a subsequent call to cbf_set_integerarray_wdims \n" + "or cbf_set_realarray_wdims.\n" + "The value returned in *byteorder is a pointer either to the string \n" + "\"little_endian \" or to the string \"big_endian \". This should be \n" + "the byte order of the data, not necessarily of the host machine. No \n" + "attempt should be made to modify this string. At this time only \n" + "\"little_endian \" will be returned.\n" + "The values returned in *dimfast, *dimmid and *dimslow are the sizes \n" + "of the fastest changing, second fastest changing and third fastest \n" + "changing dimensions of the array, if specified, or zero, if not \n" + "specified.\n" + "The value returned in *padding is the size of the post-data padding, \n" + "if any and if specified in the data header. The value is given as a \n" + "count of octets.\n" + "If the value is not binary, the function returns CBF_ASCII.\n" "ARGUMENTS\n" - "handle CBF handle. value the value to search for.\n" + "handle CBF handle. compression Compression method used. \n" + "elsize Size in bytes of each array element. binary_id \n" + "Pointer to the destination integer binary identifier. elsigned \n" + "Pointer to an integer. Set to 1 if the elements can be read as signed \n" + "integers. elunsigned Pointer to an integer. Set to 1 if the \n" + "elements can be read as unsigned integers. elements Pointer to \n" + "the destination number of elements. minelement Pointer to the \n" + "destination smallest element. maxelement Pointer to the \n" + "destination largest element. byteorder Pointer to the destination \n" + "byte order. dimfast Pointer to the destination fastest \n" + "dimension. dimmid Pointer to the destination second fastest \n" + "dimension. dimslow Pointer to the destination third fastest \n" + "dimension. padding Pointer to the destination padding size.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_axis_equipment_component", _wrap_cbf_handle_struct_get_axis_equipment_component, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_realarrayparameters", _wrap_cbf_handle_struct_get_realarrayparameters, METH_O, "\n" "\n" - "Returns : String\n" - "*args : String axis_id\n" + "Returns : int compression,int binary_id,int elsize,int elements\n" + "*args : \n" "\n" - "C prototype: int cbf_get_axis_equipment_component (cbf_handle handle,\n" - " const char *axis_id, const char * *equipment_component);\n" + "C prototype: int cbf_get_realarrayparameters (cbf_handle handle,\n" + " unsigned int *compression, int *binary_id, size_t *elsize,\n" + " size_t *elements);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" - "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" - "axis of index ancestor_index of axis axis_id, starting with axis_id \n" - "for ancestor_index 0.\n" - "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" - "axis_id or to \". \" if there is no such ancestor. \n" - "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" - "to \". \" if there is no such equipment. \n" - "cbf_get_axis_equipment_component sets *equipment_component to the \n" - "equipment_component of axis_id or to \". \" if there is no such \n" - "equipment_component.\n" - "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" - "components of the ofset of axis_id.\n" - "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" - "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" - "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" - "is no such rotation_axis.\n" - "cbf_get_axis_setting sets *start and *increment to the corresponding \n" - "values of the axis axis_id. Any of the destination pointers may be \n" - "NULL.\n" - "cbf_get_axis_type sets axis_type to the type of axis_id.\n" - "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" - "components of the vector of axis_id.\n" - "The parameter reserved is presently unused and should be set to 0.\n" + "cbf_get_integerarrayparameters sets *compression, *binary_id, \n" + "*elsize, *elsigned, *elunsigned, *elements, *minelement and \n" + "*maxelement to values read from the binary value of the item at the \n" + "current column and row. This provides all the arguments needed for a \n" + "subsequent call to cbf_set_integerarray, if a copy of the array is to \n" + "be made into another CIF or CBF. cbf_get_realarrayparameters sets \n" + "*compression, *binary_id, *elsize, *elements to values read from the \n" + "binary value of the item at the current column and row. This provides \n" + "all the arguments needed for a subsequent call to cbf_set_realarray, \n" + "if a copy of the arry is to be made into another CIF or CBF.\n" + "The variants cbf_get_integerarrayparameters_wdims, \n" + "cbf_get_integerarrayparameters_wdims_fs, \n" + "cbf_get_integerarrayparameters_wdims_sf, \n" + "cbf_get_realarrayparameters_wdims, \n" + "cbf_get_realarrayparameters_wdims_fs, \n" + "cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, \n" + "*dimmid, *dimslow, and *padding as well, providing the additional \n" + "parameters needed for a subsequent call to cbf_set_integerarray_wdims \n" + "or cbf_set_realarray_wdims.\n" + "The value returned in *byteorder is a pointer either to the string \n" + "\"little_endian \" or to the string \"big_endian \". This should be \n" + "the byte order of the data, not necessarily of the host machine. No \n" + "attempt should be made to modify this string. At this time only \n" + "\"little_endian \" will be returned.\n" + "The values returned in *dimfast, *dimmid and *dimslow are the sizes \n" + "of the fastest changing, second fastest changing and third fastest \n" + "changing dimensions of the array, if specified, or zero, if not \n" + "specified.\n" + "The value returned in *padding is the size of the post-data padding, \n" + "if any and if specified in the data header. The value is given as a \n" + "count of octets.\n" + "If the value is not binary, the function returns CBF_ASCII.\n" "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any \n" - "value other than 0 is invalid. axis_id Axis id. \n" - "ancestor_index Integer index of the desired ancestor, starting \n" - "with 0 for the current axis_id. ancestor Pointer to \n" - "destination ancestor name pointer. depends_on Pointer to \n" - "destination depends_on name pointer. equipment Pointer to \n" - "destination equipment name pointer. equipment_component Pointer to \n" - "destination equipment_component name pointer. offset1 \n" - "Pointer to destination first offset component value. offset2 \n" - " Pointer to destination second offset component value. offset3 \n" - " Pointer to destination third offset component value. \n" - "rotation Pointer to destination rotation value. \n" - "rotation_axis Pointer to destination rotation_axisn name \n" - "pointer. start Pointer to the destination start \n" - "value. increment Pointer to the destination increment \n" - "value. type Pointer to destination axis type of type \n" - ". vector1 Pointer to destination first vector component \n" - "value. vector2 Pointer to destination second vector \n" - "component value. vector3 Pointer to destination third \n" - "vector component value.\n" + "handle CBF handle. compression Compression method used. \n" + "elsize Size in bytes of each array element. binary_id \n" + "Pointer to the destination integer binary identifier. elsigned \n" + "Pointer to an integer. Set to 1 if the elements can be read as signed \n" + "integers. elunsigned Pointer to an integer. Set to 1 if the \n" + "elements can be read as unsigned integers. elements Pointer to \n" + "the destination number of elements. minelement Pointer to the \n" + "destination smallest element. maxelement Pointer to the \n" + "destination largest element. byteorder Pointer to the destination \n" + "byte order. dimfast Pointer to the destination fastest \n" + "dimension. dimmid Pointer to the destination second fastest \n" + "dimension. dimslow Pointer to the destination third fastest \n" + "dimension. padding Pointer to the destination padding size.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_realarrayparameters_wdims_sf", _wrap_cbf_handle_struct_get_realarrayparameters_wdims_sf, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_realarrayparameters_wdims", _wrap_cbf_handle_struct_get_realarrayparameters_wdims, METH_O, "\n" "\n" "Returns : int compression,int binary_id,int elsize,int elements,char **bo,\n" - " int *bolen,int dimslow,int dimmid,int dimfast,int padding\n" + " int *bolen,int dimfast,int dimmid,int dimslow,int padding\n" "*args : \n" "\n" - "C prototype: int cbf_get_realarrayparameters_wdims_sf (cbf_handle handle,\n" + "C prototype: int cbf_get_realarrayparameters_wdims (cbf_handle handle,\n" " unsigned int *compression, int *binary_id, size_t *elsize,\n" - " size_t *elements, const char **byteorder, size_t *dimslow,\n" - " size_t *dimmid, size_t *dimfast, size_t *padding);\n" + " size_t *elements, const char **byteorder, size_t *dimfast,\n" + " size_t *dimmid, size_t *dimslow, size_t *padding);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" @@ -24333,151 +23764,16 @@ static PyMethodDef SwigMethods[] = { "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_reset_datablock", _wrap_cbf_handle_struct_reset_datablock, METH_VARARGS, (char *)"\n" - "\n" - "Returns : \n" - "*args : \n" - "\n" - "C prototype: int cbf_reset_datablock (cbf_handle handle);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_reset_datablock deletes all categories from the current data \n" - "block. cbf_reset_saveframe deletes all categories from the current \n" - "save frame.\n" - "ARGUMENTS\n" - "handle CBF handle.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_set_3d_image_fs", _wrap_cbf_handle_struct_set_3d_image_fs, METH_VARARGS, (char *)"\n" - "\n" - "Returns : \n" - "*args : int element_number,int compression,(binary) String data,int elsize,\n" - " int elsign,int dimfast,int dimmid,int dimslow\n" - "\n" - "C prototype: int cbf_set_3d_image_fs(cbf_handle handle, unsigned int reserved,\n" - " unsigned int element_number, unsigned int compression,\n" - " void *array, size_t elsize, int elsign, size_t ndimfast,\n" - " size_t ndimmid, size_t ndimslow);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" - "array for element number element_number. The array consists of \n" - "ndimfast *ndimslow elements of elsize bytes each, starting at array. \n" - "The elements are signed if elsign is non-zero and unsigned otherwise. \n" - "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" - "write the image array for element number element_number. The array \n" - "consists of ndimfast *ndimslow IEEE double or float elements of \n" - "elsize bytes each, starting at array. cbf_set_3d_image, \n" - "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" - "for element number element_number. The array consists of ndimfast \n" - "*ndimmid *ndimslow elements of elsize bytes each, starting at array. \n" - "The elements are signed if elsign is non-0 and unsigned otherwise. \n" - "cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" - "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" - "element_number. The array consists of ndimfast *ndimmid *ndimslow \n" - "IEEE double or float elements of elsize bytes each, starting at \n" - "array.\n" - "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" - "with no suffix and the calls _sf calls give the dimensions in \n" - "slow-to-fast order\n" - "If the array is 1-dimensional, ndimslow should be the array size and \n" - "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" - "array is 2-dimensional and the 3D calls are used, ndimslow and \n" - "ndimmid should be used for the array dimensions and ndimfast should \n" - "be set to 1.\n" - "The array will be compressed using the compression scheme specifed by \n" - "compression. Currently, the available schemes are:\n" - "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" - "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" - " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" - "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" - "\"nibble_offset \" compression. CBF_NONE No compression.\n" - "The values compressed are limited to 64 bits. If any element in the \n" - "array is larger than 64 bits, the value compressed is the nearest \n" - "64-bit value.\n" - "Currently, the source array must consist of chars, shorts or ints \n" - "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" - "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" - "(int), sizeof(double) or sizeof(float), the function returns \n" - "CBF_ARGUMENT.\n" - "The parameter reserved is presently unused and should be set to 0.\n" - "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any value other \n" - "than 0 is invalid. element_number The number of the detector \n" - "element counting from 0 by order of appearance in the \n" - "\"diffrn_data_frame \" category. compression Compression type. \n" - "array Pointer to the image array. elsize Size in \n" - "bytes of each image array element. elsigned Set to non-0 if \n" - "the image array elements are signed. ndimslow Slowest array \n" - "dimension. ndimmid Second slowest array dimension. ndimfast \n" - " Fastest array dimension.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_set_saveframename", _wrap_cbf_handle_struct_set_saveframename, METH_VARARGS, (char *)"\n" - "\n" - "Returns : string\n" - "*args : \n" - "\n" - "C prototype: int cbf_set_saveframename (cbf_handle handle,\n" - " const char *saveframename);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_set_datablockname changes the name of the current data block to \n" - "datablockname. cbf_set_saveframename changes the name of the current \n" - "save frame to saveframename.\n" - "If a data block or save frame with this name already exists \n" - "(comparison is case-insensitive), the function returns CBF_IDENTICAL.\n" - "ARGUMENTS\n" - "handle CBF handle. datablockname The new data block name. \n" - "datablockname The new save frame name.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_require_integervalue", _wrap_cbf_handle_struct_require_integervalue, METH_VARARGS, (char *)"\n" - "\n" - "Returns : Int number\n" - "*args : Int thedefault\n" - "\n" - "C prototype: int cbf_require_integervalue (cbf_handle handle, int *number,\n" - " int defaultvalue);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_get_integervalue sets *number to the value of the ASCII item at \n" - "the current column and row interpreted as a decimal integer. \n" - "cbf_require_integervalue sets *number to the value of the ASCII item \n" - "at the current column and row interpreted as a decimal integer, \n" - "setting it to defaultvalue if necessary.\n" - "If the value is not ASCII, the function returns CBF_BINARY.\n" - "ARGUMENTS\n" - "handle CBF handle. number pointer to the number. \n" - "defaultvalue default number value.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_get_integerarrayparameters", _wrap_cbf_handle_struct_get_integerarrayparameters, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_realarrayparameters_wdims_fs", _wrap_cbf_handle_struct_get_realarrayparameters_wdims_fs, METH_O, "\n" "\n" - "Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned,\n" - " int elements,int minelement,int maxelement\n" + "Returns : int compression,int binary_id,int elsize,int elements,char **bo,\n" + " int *bolen,int dimfast,int dimmid,int dimslow,int padding\n" "*args : \n" "\n" - "C prototype: int cbf_get_integerarrayparameters (cbf_handle handle,\n" + "C prototype: int cbf_get_realarrayparameters_wdims_fs (cbf_handle handle,\n" " unsigned int *compression, int *binary_id, size_t *elsize,\n" - " int *elsigned, int *elunsigned, size_t *elements,\n" - " int *minelement, int *maxelement);\n" + " size_t *elements, const char **byteorder, size_t *dimfast,\n" + " size_t *dimmid, size_t *dimslow, size_t *padding);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" @@ -24525,1751 +23821,1691 @@ static PyMethodDef SwigMethods[] = { "destination largest element. byteorder Pointer to the destination \n" "byte order. dimfast Pointer to the destination fastest \n" "dimension. dimmid Pointer to the destination second fastest \n" - "dimension. dimslow Pointer to the destination third fastest \n" - "dimension. padding Pointer to the destination padding size.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_set_real_3d_image_sf", _wrap_cbf_handle_struct_set_real_3d_image_sf, METH_VARARGS, (char *)"\n" - "\n" - "Returns : \n" - "*args : int element_number,int compression,(binary) String data,int elsize,\n" - " int dimslow,int dimmid,int dimfast\n" - "\n" - "C prototype: int cbf_set_real_3d_image_sf(cbf_handle handle,\n" - " unsigned int reserved, unsigned int element_number,\n" - " unsigned int compression, void *array,size_t elsize,\n" - " size_t ndimslow, size_t ndimmid, size_t ndimfast);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" - "array for element number element_number. The array consists of \n" - "ndimfast *ndimslow elements of elsize bytes each, starting at array. \n" - "The elements are signed if elsign is non-zero and unsigned otherwise. \n" - "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" - "write the image array for element number element_number. The array \n" - "consists of ndimfast *ndimslow IEEE double or float elements of \n" - "elsize bytes each, starting at array. cbf_set_3d_image, \n" - "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" - "for element number element_number. The array consists of ndimfast \n" - "*ndimmid *ndimslow elements of elsize bytes each, starting at array. \n" - "The elements are signed if elsign is non-0 and unsigned otherwise. \n" - "cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" - "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" - "element_number. The array consists of ndimfast *ndimmid *ndimslow \n" - "IEEE double or float elements of elsize bytes each, starting at \n" - "array.\n" - "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" - "with no suffix and the calls _sf calls give the dimensions in \n" - "slow-to-fast order\n" - "If the array is 1-dimensional, ndimslow should be the array size and \n" - "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" - "array is 2-dimensional and the 3D calls are used, ndimslow and \n" - "ndimmid should be used for the array dimensions and ndimfast should \n" - "be set to 1.\n" - "The array will be compressed using the compression scheme specifed by \n" - "compression. Currently, the available schemes are:\n" - "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" - "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" - " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" - "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" - "\"nibble_offset \" compression. CBF_NONE No compression.\n" - "The values compressed are limited to 64 bits. If any element in the \n" - "array is larger than 64 bits, the value compressed is the nearest \n" - "64-bit value.\n" - "Currently, the source array must consist of chars, shorts or ints \n" - "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" - "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" - "(int), sizeof(double) or sizeof(float), the function returns \n" - "CBF_ARGUMENT.\n" - "The parameter reserved is presently unused and should be set to 0.\n" - "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any value other \n" - "than 0 is invalid. element_number The number of the detector \n" - "element counting from 0 by order of appearance in the \n" - "\"diffrn_data_frame \" category. compression Compression type. \n" - "array Pointer to the image array. elsize Size in \n" - "bytes of each image array element. elsigned Set to non-0 if \n" - "the image array elements are signed. ndimslow Slowest array \n" - "dimension. ndimmid Second slowest array dimension. ndimfast \n" - " Fastest array dimension.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_write_file", _wrap_cbf_handle_struct_write_file, METH_VARARGS, (char *)"\n" - "\n" - "Returns : \n" - "*args : String filename,Integer ciforcbf,Integer Headers,Integer encoding\n" - "\n" - "C prototype: int cbf_write_file (cbf_handle handle, FILE *file, int readable,\n" - " int ciforcbf, int flags, int encoding);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_write_file writes the CBF object specified by handle into the \n" - "file file, following CIF 1.0 conventions of 80 character lines. \n" - "cbf_write_widefile writes the CBF object specified by handle into the \n" - "file file, following CIF 1.1 conventions of 2048 character lines. A \n" - "warning is issued to stderr for ascii lines over the limit, and an \n" - "attempt is made to fold lines to fit. No test is performed on binary \n" - "sections.\n" - "If a dictionary has been provided, aliases will be applied on output.\n" - "Unlike cbf_read_file, the file does not have to be random-access.\n" - "If the file is random-access and readable, readable can be set to \n" - "non-0 to indicate to CBFlib that the file can be used as a buffer to \n" - "conserve disk space. If the file is not random-access or not \n" - "readable, readable must be 0.\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_set_divergence", _wrap_cbf_handle_struct_set_divergence, METH_VARARGS, (char *)"\n" - "\n" - "Returns : \n" - "*args : Float div_x_source,Float div_y_source,Float div_x_y_source\n" - "\n" - "C prototype: int cbf_set_divergence (cbf_handle handle, double div_x_source,\n" - " double div_y_source, double div_x_y_source);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_set_divergence sets the source divergence parameters to the \n" - "values specified by div_x_source, div_y_source and div_x_y_source.\n" - "ARGUMENTS\n" - "handle CBF handle. div_x_source New value of \n" - "div_x_source. div_y_source New value of div_y_source. \n" - "div_x_y_source New value of div_x_y_source.\n" + "dimension. dimslow Pointer to the destination third fastest \n" + "dimension. padding Pointer to the destination padding size.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_remove_datablock", _wrap_cbf_handle_struct_remove_datablock, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_realarrayparameters_wdims_sf", _wrap_cbf_handle_struct_get_realarrayparameters_wdims_sf, METH_O, "\n" "\n" - "Returns : \n" + "Returns : int compression,int binary_id,int elsize,int elements,char **bo,\n" + " int *bolen,int dimslow,int dimmid,int dimfast,int padding\n" "*args : \n" "\n" - "C prototype: int cbf_remove_datablock (cbf_handle handle);\n" + "C prototype: int cbf_get_realarrayparameters_wdims_sf (cbf_handle handle,\n" + " unsigned int *compression, int *binary_id, size_t *elsize,\n" + " size_t *elements, const char **byteorder, size_t *dimslow,\n" + " size_t *dimmid, size_t *dimfast, size_t *padding);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_remove_datablock deletes the current data block. \n" - "cbf_remove_saveframe deletes the current save frame.\n" - "The current data block becomes undefined.\n" + "cbf_get_integerarrayparameters sets *compression, *binary_id, \n" + "*elsize, *elsigned, *elunsigned, *elements, *minelement and \n" + "*maxelement to values read from the binary value of the item at the \n" + "current column and row. This provides all the arguments needed for a \n" + "subsequent call to cbf_set_integerarray, if a copy of the array is to \n" + "be made into another CIF or CBF. cbf_get_realarrayparameters sets \n" + "*compression, *binary_id, *elsize, *elements to values read from the \n" + "binary value of the item at the current column and row. This provides \n" + "all the arguments needed for a subsequent call to cbf_set_realarray, \n" + "if a copy of the arry is to be made into another CIF or CBF.\n" + "The variants cbf_get_integerarrayparameters_wdims, \n" + "cbf_get_integerarrayparameters_wdims_fs, \n" + "cbf_get_integerarrayparameters_wdims_sf, \n" + "cbf_get_realarrayparameters_wdims, \n" + "cbf_get_realarrayparameters_wdims_fs, \n" + "cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, \n" + "*dimmid, *dimslow, and *padding as well, providing the additional \n" + "parameters needed for a subsequent call to cbf_set_integerarray_wdims \n" + "or cbf_set_realarray_wdims.\n" + "The value returned in *byteorder is a pointer either to the string \n" + "\"little_endian \" or to the string \"big_endian \". This should be \n" + "the byte order of the data, not necessarily of the host machine. No \n" + "attempt should be made to modify this string. At this time only \n" + "\"little_endian \" will be returned.\n" + "The values returned in *dimfast, *dimmid and *dimslow are the sizes \n" + "of the fastest changing, second fastest changing and third fastest \n" + "changing dimensions of the array, if specified, or zero, if not \n" + "specified.\n" + "The value returned in *padding is the size of the post-data padding, \n" + "if any and if specified in the data header. The value is given as a \n" + "count of octets.\n" + "If the value is not binary, the function returns CBF_ASCII.\n" "ARGUMENTS\n" - "handle CBF handle.\n" + "handle CBF handle. compression Compression method used. \n" + "elsize Size in bytes of each array element. binary_id \n" + "Pointer to the destination integer binary identifier. elsigned \n" + "Pointer to an integer. Set to 1 if the elements can be read as signed \n" + "integers. elunsigned Pointer to an integer. Set to 1 if the \n" + "elements can be read as unsigned integers. elements Pointer to \n" + "the destination number of elements. minelement Pointer to the \n" + "destination smallest element. maxelement Pointer to the \n" + "destination largest element. byteorder Pointer to the destination \n" + "byte order. dimfast Pointer to the destination fastest \n" + "dimension. dimmid Pointer to the destination second fastest \n" + "dimension. dimslow Pointer to the destination third fastest \n" + "dimension. padding Pointer to the destination padding size.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_count_elements", _wrap_cbf_handle_struct_count_elements, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_integerarray_as_string", _wrap_cbf_handle_struct_get_integerarray_as_string, METH_O, "\n" "\n" - "Returns : Integer\n" + "Returns : (Binary)String\n" "*args : \n" "\n" - "C prototype: int cbf_count_elements (cbf_handle handle,\n" - " unsigned int *elements);\n" + "C prototype: int cbf_get_integerarray (cbf_handle handle, int *binary_id,\n" + " void *array, size_t elsize, int elsigned, size_t elements,\n" + " size_t *elements_read);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_count_elements sets *elements to the number of detector elements.\n" + "cbf_get_integerarray reads the binary value of the item at the \n" + "current column and row into an integer array. The array consists of \n" + "elements elements of elsize bytes each, starting at array. The \n" + "elements are signed if elsigned is non-0 and unsigned otherwise. \n" + "*binary_id is set to the binary section identifier and *elements_read \n" + "to the number of elements actually read. cbf_get_realarray reads the \n" + "binary value of the item at the current column and row into a real \n" + "array. The array consists of elements elements of elsize bytes each, \n" + "starting at array. *binary_id is set to the binary section identifier \n" + "and *elements_read to the number of elements actually read.\n" + "If any element in the integer binary data cant fit into the \n" + "destination element, the destination is set the nearest possible \n" + "value.\n" + "If the value is not binary, the function returns CBF_ASCII.\n" + "If the requested number of elements cant be read, the function will \n" + "read as many as it can and then return CBF_ENDOFDATA.\n" + "Currently, the destination array must consist of chars, shorts or \n" + "ints (signed or unsigned). If elsize is not equal to sizeof (char), \n" + "sizeof (short) or sizeof (int), for cbf_get_integerarray, or \n" + "sizeof(double) or sizeof(float), for cbf_get_realarray the function \n" + "returns CBF_ARGUMENT.\n" + "An additional restriction in the current version of CBFlib is that \n" + "values too large to fit in an int are not correctly decompressed. As \n" + "an example, if the machine with 32-bit ints is reading an array \n" + "containing a value outside the range 0 .. 2^32-1 (unsigned) or -2^31 \n" + ".. 2^31-1 (signed), the array will not be correctly decompressed. \n" + "This restriction will be removed in a future release. For \n" + "cbf_get_realarray, only IEEE format is supported. No conversion to \n" + "other floating point formats is done at this time.\n" "ARGUMENTS\n" - "handle CBF handle. elements Pointer to the destination count.\n" + "handle CBF handle. binary_id Pointer to the \n" + "destination integer binary identifier. array Pointer to the \n" + "destination array. elsize Size in bytes of each destination \n" + "array element. elsigned Set to non-0 if the destination array \n" + "elements are signed. elements The number of elements to read. \n" + "elements_read Pointer to the destination number of elements \n" + "actually read.\n" "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "Returns an error code on failure or 0 for success. SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_image_fs", _wrap_cbf_handle_struct_set_image_fs, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_realarray_as_string", _wrap_cbf_handle_struct_get_realarray_as_string, METH_O, "\n" "\n" - "Returns : \n" - "*args : int element_number,int compression,(binary) String data,int elsize,\n" - " int elsign,int dimfast,int dimslow\n" + "Returns : (Binary)String\n" + "*args : \n" "\n" - "C prototype: int cbf_set_image_fs(cbf_handle handle, unsigned int reserved,\n" - " unsigned int element_number, unsigned int compression,\n" - " void *array, size_t elsize, int elsign, size_t ndimfast,\n" - " size_t ndimslow);\n" + "C prototype: int cbf_get_realarray (cbf_handle handle, int *binary_id,\n" + " void *array, size_t elsize, size_t elements,\n" + " size_t *elements_read);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" - "array for element number element_number. The array consists of \n" - "ndimfast *ndimslow elements of elsize bytes each, starting at array. \n" - "The elements are signed if elsign is non-zero and unsigned otherwise. \n" - "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" - "write the image array for element number element_number. The array \n" - "consists of ndimfast *ndimslow IEEE double or float elements of \n" - "elsize bytes each, starting at array. cbf_set_3d_image, \n" - "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" - "for element number element_number. The array consists of ndimfast \n" - "*ndimmid *ndimslow elements of elsize bytes each, starting at array. \n" - "The elements are signed if elsign is non-0 and unsigned otherwise. \n" - "cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" - "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" - "element_number. The array consists of ndimfast *ndimmid *ndimslow \n" - "IEEE double or float elements of elsize bytes each, starting at \n" - "array.\n" - "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" - "with no suffix and the calls _sf calls give the dimensions in \n" - "slow-to-fast order\n" - "If the array is 1-dimensional, ndimslow should be the array size and \n" - "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" - "array is 2-dimensional and the 3D calls are used, ndimslow and \n" - "ndimmid should be used for the array dimensions and ndimfast should \n" - "be set to 1.\n" - "The array will be compressed using the compression scheme specifed by \n" - "compression. Currently, the available schemes are:\n" - "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" - "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" - " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" - "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" - "\"nibble_offset \" compression. CBF_NONE No compression.\n" - "The values compressed are limited to 64 bits. If any element in the \n" - "array is larger than 64 bits, the value compressed is the nearest \n" - "64-bit value.\n" - "Currently, the source array must consist of chars, shorts or ints \n" - "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" - "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" - "(int), sizeof(double) or sizeof(float), the function returns \n" - "CBF_ARGUMENT.\n" - "The parameter reserved is presently unused and should be set to 0.\n" + "cbf_get_integerarray reads the binary value of the item at the \n" + "current column and row into an integer array. The array consists of \n" + "elements elements of elsize bytes each, starting at array. The \n" + "elements are signed if elsigned is non-0 and unsigned otherwise. \n" + "*binary_id is set to the binary section identifier and *elements_read \n" + "to the number of elements actually read. cbf_get_realarray reads the \n" + "binary value of the item at the current column and row into a real \n" + "array. The array consists of elements elements of elsize bytes each, \n" + "starting at array. *binary_id is set to the binary section identifier \n" + "and *elements_read to the number of elements actually read.\n" + "If any element in the integer binary data cant fit into the \n" + "destination element, the destination is set the nearest possible \n" + "value.\n" + "If the value is not binary, the function returns CBF_ASCII.\n" + "If the requested number of elements cant be read, the function will \n" + "read as many as it can and then return CBF_ENDOFDATA.\n" + "Currently, the destination array must consist of chars, shorts or \n" + "ints (signed or unsigned). If elsize is not equal to sizeof (char), \n" + "sizeof (short) or sizeof (int), for cbf_get_integerarray, or \n" + "sizeof(double) or sizeof(float), for cbf_get_realarray the function \n" + "returns CBF_ARGUMENT.\n" + "An additional restriction in the current version of CBFlib is that \n" + "values too large to fit in an int are not correctly decompressed. As \n" + "an example, if the machine with 32-bit ints is reading an array \n" + "containing a value outside the range 0 .. 2^32-1 (unsigned) or -2^31 \n" + ".. 2^31-1 (signed), the array will not be correctly decompressed. \n" + "This restriction will be removed in a future release. For \n" + "cbf_get_realarray, only IEEE format is supported. No conversion to \n" + "other floating point formats is done at this time.\n" "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any value other \n" - "than 0 is invalid. element_number The number of the detector \n" - "element counting from 0 by order of appearance in the \n" - "\"diffrn_data_frame \" category. compression Compression type. \n" - "array Pointer to the image array. elsize Size in \n" - "bytes of each image array element. elsigned Set to non-0 if \n" - "the image array elements are signed. ndimslow Slowest array \n" - "dimension. ndimmid Second slowest array dimension. ndimfast \n" - " Fastest array dimension.\n" + "handle CBF handle. binary_id Pointer to the \n" + "destination integer binary identifier. array Pointer to the \n" + "destination array. elsize Size in bytes of each destination \n" + "array element. elsigned Set to non-0 if the destination array \n" + "elements are signed. elements The number of elements to read. \n" + "elements_read Pointer to the destination number of elements \n" + "actually read.\n" "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "Returns an error code on failure or 0 for success. SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_require_reference_detector", _wrap_cbf_handle_struct_require_reference_detector, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_integerarray", _wrap_cbf_handle_struct_set_integerarray, METH_VARARGS, "\n" "\n" - "Returns : pycbf detector object\n" - "*args : Integer element_number\n" + "Returns : \n" + "*args : int compression,int binary_id,(binary) String data,int elsize,\n" + " int elsigned,int elements\n" "\n" - "C prototype: int cbf_require_reference_detector (cbf_handle handle,\n" - " cbf_detector *detector, unsigned int element_number);\n" + "C prototype: int cbf_set_integerarray (cbf_handle handle,\n" + " unsigned int compression, int binary_id, void *array,\n" + " size_t elsize, int elsigned, size_t elements);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_construct_detector constructs a detector object for detector \n" - "element number element_number using the description in the CBF object \n" - "handle and initialises the detector handle *detector.\n" - "cbf_construct_reference_detector constructs a detector object for \n" - "detector element number element_number using the description in the \n" - "CBF object handle and initialises the detector handle *detector using \n" - "the reference settings of the axes. cbf_require_reference_detector is \n" - "similar, but try to force the creations of missing intermediate \n" - "categories needed to construct a detector object.\n" + "cbf_set_integerarray sets the binary value of the item at the current \n" + "column and row to an integer array. The array consists of elements \n" + "elements of elsize bytes each, starting at array. The elements are \n" + "signed if elsigned is non-0 and unsigned otherwise. binary_id is the \n" + "binary section identifier. cbf_set_realarray sets the binary value of \n" + "the item at the current column and row to an integer array. The array \n" + "consists of elements elements of elsize bytes each, starting at \n" + "array. binary_id is the binary section identifier.\n" + "The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, \n" + "cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, \n" + "cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants \n" + "allow the data header values of byteorder, dimfast, dimmid, dimslow \n" + "and padding to be set to the data byte order, the fastest, second \n" + "fastest and third fastest array dimensions and the size in byte of \n" + "the post data padding to be used.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + " Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression. \n" + "NOTE: This scheme is by far the slowest of the four and uses much \n" + "more disk space. It is intended for routine use with small arrays \n" + "only. With large arrays (like images) it should be used only for \n" + "debugging.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or \n" + "floats for cbf_set_realarray. If elsize is not equal to sizeof \n" + "(char), sizeof (short) or sizeof (int), the function returns \n" + "CBF_ARGUMENT.\n" "ARGUMENTS\n" - "handle CBF handle. detector Pointer to the \n" - "destination detector handle. element_number The number of the \n" - "detector element counting from 0 by order of appearance in the \n" - "\"diffrn_data_frame \" category.\n" + "handle CBF handle. compression Compression method to use. \n" + "binary_id Integer binary identifier. array Pointer to the \n" + "source array. elsize Size in bytes of each source array \n" + "element. elsigned Set to non-0 if the source array elements are \n" + "signed. elements: The number of elements in the array.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_next_category", _wrap_cbf_handle_struct_next_category, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_integerarray_wdims", _wrap_cbf_handle_struct_set_integerarray_wdims, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : \n" + "*args : int compression,int binary_id,(binary) String data,int elsize,\n" + " int elsigned,int elements,String byteorder,int dimfast,int dimmid,\n" + " int dimslow,int padding\n" "\n" - "C prototype: int cbf_next_category (cbf_handle handle);\n" + "C prototype: int cbf_set_integerarray_wdims (cbf_handle handle,\n" + " unsigned int compression, int binary_id, void *array,\n" + " size_t elsize, int elsigned, size_t elements,\n" + " const char *byteorder, size_t dimfast, size_t dimmid,\n" + " size_t dimslow, size_t padding);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_next_category makes the category following the current category \n" - "in the current data block the current category.\n" - "If there are no more categories, the function returns CBF_NOTFOUND.\n" - "The current column and row become undefined.\n" + "cbf_set_integerarray sets the binary value of the item at the current \n" + "column and row to an integer array. The array consists of elements \n" + "elements of elsize bytes each, starting at array. The elements are \n" + "signed if elsigned is non-0 and unsigned otherwise. binary_id is the \n" + "binary section identifier. cbf_set_realarray sets the binary value of \n" + "the item at the current column and row to an integer array. The array \n" + "consists of elements elements of elsize bytes each, starting at \n" + "array. binary_id is the binary section identifier.\n" + "The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, \n" + "cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, \n" + "cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants \n" + "allow the data header values of byteorder, dimfast, dimmid, dimslow \n" + "and padding to be set to the data byte order, the fastest, second \n" + "fastest and third fastest array dimensions and the size in byte of \n" + "the post data padding to be used.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + " Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression. \n" + "NOTE: This scheme is by far the slowest of the four and uses much \n" + "more disk space. It is intended for routine use with small arrays \n" + "only. With large arrays (like images) it should be used only for \n" + "debugging.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or \n" + "floats for cbf_set_realarray. If elsize is not equal to sizeof \n" + "(char), sizeof (short) or sizeof (int), the function returns \n" + "CBF_ARGUMENT.\n" "ARGUMENTS\n" - "handle CBF handle.\n" + "handle CBF handle. compression Compression method to use. \n" + "binary_id Integer binary identifier. array Pointer to the \n" + "source array. elsize Size in bytes of each source array \n" + "element. elsigned Set to non-0 if the source array elements are \n" + "signed. elements: The number of elements in the array.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_diffrn_id", _wrap_cbf_handle_struct_set_diffrn_id, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_integerarray_wdims_fs", _wrap_cbf_handle_struct_set_integerarray_wdims_fs, METH_VARARGS, "\n" "\n" - "Returns : string\n" - "*args : \n" + "Returns : \n" + "*args : int compression,int binary_id,(binary) String data,int elsize,\n" + " int elsigned,int elements,String byteorder,int dimfast,int dimmid,\n" + " int dimslow,int padding\n" "\n" - "C prototype: int cbf_set_diffrn_id (cbf_handle handle, const char *diffrn_id);\n" + "C prototype: int cbf_set_integerarray_wdims_fs (cbf_handle handle,\n" + " unsigned int compression, int binary_id, void *array,\n" + " size_t elsize, int elsigned, size_t elements,\n" + " const char *byteorder, size_t dimfast, size_t dimmid,\n" + " size_t dimslow, size_t padding);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_diffrn_id sets the \"diffrn.id \" entry of the current \n" - "datablock to the ASCII value diffrn_id.\n" - "This function also changes corresponding \"diffrn_id \" entries in \n" - "the \"diffrn_source \", \"diffrn_radiation \", \"diffrn_detector \n" - "\" and \"diffrn_measurement \" categories.\n" + "cbf_set_integerarray sets the binary value of the item at the current \n" + "column and row to an integer array. The array consists of elements \n" + "elements of elsize bytes each, starting at array. The elements are \n" + "signed if elsigned is non-0 and unsigned otherwise. binary_id is the \n" + "binary section identifier. cbf_set_realarray sets the binary value of \n" + "the item at the current column and row to an integer array. The array \n" + "consists of elements elements of elsize bytes each, starting at \n" + "array. binary_id is the binary section identifier.\n" + "The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, \n" + "cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, \n" + "cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants \n" + "allow the data header values of byteorder, dimfast, dimmid, dimslow \n" + "and padding to be set to the data byte order, the fastest, second \n" + "fastest and third fastest array dimensions and the size in byte of \n" + "the post data padding to be used.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + " Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression. \n" + "NOTE: This scheme is by far the slowest of the four and uses much \n" + "more disk space. It is intended for routine use with small arrays \n" + "only. With large arrays (like images) it should be used only for \n" + "debugging.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or \n" + "floats for cbf_set_realarray. If elsize is not equal to sizeof \n" + "(char), sizeof (short) or sizeof (int), the function returns \n" + "CBF_ARGUMENT.\n" "ARGUMENTS\n" - "handle CBF handle. diffrn_id ASCII value.\n" + "handle CBF handle. compression Compression method to use. \n" + "binary_id Integer binary identifier. array Pointer to the \n" + "source array. elsize Size in bytes of each source array \n" + "element. elsigned Set to non-0 if the source array elements are \n" + "signed. elements: The number of elements in the array.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_timestamp", _wrap_cbf_handle_struct_set_timestamp, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_integerarray_wdims_sf", _wrap_cbf_handle_struct_set_integerarray_wdims_sf, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : Float time,Integer timezone,Float precision\n" - "\n" - "C prototype: int cbf_set_timestamp (cbf_handle handle, unsigned int reserved,\n" - " double time, int timezone, double precision);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_set_timestamp sets the collection timestamp in seconds since \n" - "January 1 1970 to the value specified by time. The timezone \n" - "difference from UTC\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_get_orientation_matrix", _wrap_cbf_handle_struct_get_orientation_matrix, METH_VARARGS, (char *)"\n" - "\n" - "Returns : Float matrix_0,Float matrix_1,Float matrix_2,Float matrix_3,\n" - " Float matrix_4,Float matrix_5,Float matrix_6,Float matrix_7,\n" - " Float matrix_8\n" - "*args : \n" + "*args : int compression,int binary_id,(binary) String data,int elsize,\n" + " int elsigned,int elements,String byteorder,int dimslow,int dimmid,\n" + " int dimfast,int padding\n" "\n" - "C prototype: int cbf_get_orientation_matrix (cbf_handle handle,\n" - " double ub_matrix[9]);\n" + "C prototype: int cbf_set_integerarray_wdims_sf (cbf_handle handle,\n" + " unsigned int compression, int binary_id, void *array,\n" + " size_t elsize, int elsigned, size_t elements,\n" + " const char *byteorder, size_t dimslow, size_t dimmid,\n" + " size_t dimfast, size_t padding);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_orientation_matrix sets ub_matrix to point to the array of \n" - "orientation matrix entries in the \"diffrn \" category in the order \n" - "of columns:\n" - " \"UB[1][1] \" \"UB[1][2] \" \"UB[1][3] \" \"UB[2][1] \" \n" - "\"UB[2][2] \" \"UB[2][3] \" \"UB[3][1] \" \"UB[3][2] \" \n" - "\"UB[3][3] \"\n" - "cbf_set_orientation_matrix sets the values in the \"diffrn \" \n" - "category to the values pointed to by ub_matrix.\n" + "cbf_set_integerarray sets the binary value of the item at the current \n" + "column and row to an integer array. The array consists of elements \n" + "elements of elsize bytes each, starting at array. The elements are \n" + "signed if elsigned is non-0 and unsigned otherwise. binary_id is the \n" + "binary section identifier. cbf_set_realarray sets the binary value of \n" + "the item at the current column and row to an integer array. The array \n" + "consists of elements elements of elsize bytes each, starting at \n" + "array. binary_id is the binary section identifier.\n" + "The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, \n" + "cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, \n" + "cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants \n" + "allow the data header values of byteorder, dimfast, dimmid, dimslow \n" + "and padding to be set to the data byte order, the fastest, second \n" + "fastest and third fastest array dimensions and the size in byte of \n" + "the post data padding to be used.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + " Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression. \n" + "NOTE: This scheme is by far the slowest of the four and uses much \n" + "more disk space. It is intended for routine use with small arrays \n" + "only. With large arrays (like images) it should be used only for \n" + "debugging.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or \n" + "floats for cbf_set_realarray. If elsize is not equal to sizeof \n" + "(char), sizeof (short) or sizeof (int), the function returns \n" + "CBF_ARGUMENT.\n" "ARGUMENTS\n" - "handle CBF handle. ubmatric Source or destination array of 9 \n" - "doubles giving the orientation matrix parameters.\n" + "handle CBF handle. compression Compression method to use. \n" + "binary_id Integer binary identifier. array Pointer to the \n" + "source array. elsize Size in bytes of each source array \n" + "element. elsigned Set to non-0 if the source array elements are \n" + "signed. elements: The number of elements in the array.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_image_size_fs", _wrap_cbf_handle_struct_get_image_size_fs, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_realarray", _wrap_cbf_handle_struct_set_realarray, METH_VARARGS, "\n" "\n" - "Returns : size_t ndimfast,size_t ndimslow\n" - "*args : Integer element_number\n" + "Returns : \n" + "*args : int compression,int binary_id,(binary) String data,int elsize,\n" + " int elements\n" "\n" - "C prototype: int cbf_get_image_size_fs (cbf_handle handle,\n" - " unsigned int reserved, unsigned int element_number,\n" - " size_t *ndimfast, size_t *ndimslow);\n" + "C prototype: int cbf_set_realarray (cbf_handle handle,\n" + " unsigned int compression, int binary_id, void *array,\n" + " size_t elsize, size_t elements);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf \n" - "set *ndimslow and *ndimfast to the slow and fast dimensions of the \n" - "image array for element number element_number. If the array is \n" - "1-dimensional, *ndimslow will be set to the array size and *ndimfast \n" - "will be set to 1. If the array is 3-dimensional an error code will be \n" - "returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and \n" - "cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the \n" - "slowest, next fastest and fastest dimensions, respectively, of the 3D \n" - "image array for element number element_number. If the array is \n" - "1-dimensional, *ndimslow will be set to the array size and *ndimmid \n" - "and\n" + "cbf_set_integerarray sets the binary value of the item at the current \n" + "column and row to an integer array. The array consists of elements \n" + "elements of elsize bytes each, starting at array. The elements are \n" + "signed if elsigned is non-0 and unsigned otherwise. binary_id is the \n" + "binary section identifier. cbf_set_realarray sets the binary value of \n" + "the item at the current column and row to an integer array. The array \n" + "consists of elements elements of elsize bytes each, starting at \n" + "array. binary_id is the binary section identifier.\n" + "The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, \n" + "cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, \n" + "cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants \n" + "allow the data header values of byteorder, dimfast, dimmid, dimslow \n" + "and padding to be set to the data byte order, the fastest, second \n" + "fastest and third fastest array dimensions and the size in byte of \n" + "the post data padding to be used.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + " Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression. \n" + "NOTE: This scheme is by far the slowest of the four and uses much \n" + "more disk space. It is intended for routine use with small arrays \n" + "only. With large arrays (like images) it should be used only for \n" + "debugging.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or \n" + "floats for cbf_set_realarray. If elsize is not equal to sizeof \n" + "(char), sizeof (short) or sizeof (int), the function returns \n" + "CBF_ARGUMENT.\n" + "ARGUMENTS\n" + "handle CBF handle. compression Compression method to use. \n" + "binary_id Integer binary identifier. array Pointer to the \n" + "source array. elsize Size in bytes of each source array \n" + "element. elsigned Set to non-0 if the source array elements are \n" + "signed. elements: The number of elements in the array.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_divergence", _wrap_cbf_handle_struct_get_divergence, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_realarray_wdims", _wrap_cbf_handle_struct_set_realarray_wdims, METH_VARARGS, "\n" "\n" - "Returns : Float div_x_source,Float div_y_source,Float div_x_y_source\n" - "*args : \n" + "Returns : \n" + "*args : int compression,int binary_id,(binary) String data,int elsize,\n" + " int elements,String byteorder,int dimfast,int dimmid,int dimslow,\n" + " int padding\n" "\n" - "C prototype: int cbf_get_divergence (cbf_handle handle, double *div_x_source,\n" - " double *div_y_source, double *div_x_y_source);\n" + "C prototype: int cbf_set_realarray_wdims (cbf_handle handle,\n" + " unsigned int compression, int binary_id, void *array,\n" + " size_t elsize, size_t elements, const char *byteorder,\n" + " size_t dimfast, size_t dimmid, size_t dimslow,\n" + " size_t padding);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_divergence sets *div_x_source, *div_y_source and \n" - "*div_x_y_source to the corresponding source divergence parameters.\n" - "Any of the destination pointers may be NULL.\n" + "cbf_set_integerarray sets the binary value of the item at the current \n" + "column and row to an integer array. The array consists of elements \n" + "elements of elsize bytes each, starting at array. The elements are \n" + "signed if elsigned is non-0 and unsigned otherwise. binary_id is the \n" + "binary section identifier. cbf_set_realarray sets the binary value of \n" + "the item at the current column and row to an integer array. The array \n" + "consists of elements elements of elsize bytes each, starting at \n" + "array. binary_id is the binary section identifier.\n" + "The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, \n" + "cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, \n" + "cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants \n" + "allow the data header values of byteorder, dimfast, dimmid, dimslow \n" + "and padding to be set to the data byte order, the fastest, second \n" + "fastest and third fastest array dimensions and the size in byte of \n" + "the post data padding to be used.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + " Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression. \n" + "NOTE: This scheme is by far the slowest of the four and uses much \n" + "more disk space. It is intended for routine use with small arrays \n" + "only. With large arrays (like images) it should be used only for \n" + "debugging.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or \n" + "floats for cbf_set_realarray. If elsize is not equal to sizeof \n" + "(char), sizeof (short) or sizeof (int), the function returns \n" + "CBF_ARGUMENT.\n" "ARGUMENTS\n" - "handle CBF handle. div_x_source Pointer to the \n" - "destination div_x_source. div_y_source Pointer to the destination \n" - "div_y_source. div_x_y_source Pointer to the destination \n" - "div_x_y_source.\n" + "handle CBF handle. compression Compression method to use. \n" + "binary_id Integer binary identifier. array Pointer to the \n" + "source array. elsize Size in bytes of each source array \n" + "element. elsigned Set to non-0 if the source array elements are \n" + "signed. elements: The number of elements in the array.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_rewind_category", _wrap_cbf_handle_struct_rewind_category, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_realarray_wdims_fs", _wrap_cbf_handle_struct_set_realarray_wdims_fs, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : \n" + "*args : int compression,int binary_id,(binary) String data,int elsize,\n" + " int elements,String byteorder,int dimfast,int dimmid,int dimslow,\n" + " int padding\n" "\n" - "C prototype: int cbf_rewind_category (cbf_handle handle);\n" + "C prototype: int cbf_set_realarray_wdims_fs (cbf_handle handle,\n" + " unsigned int compression, int binary_id, void *array,\n" + " size_t elsize, size_t elements, const char *byteorder,\n" + " size_t dimfast, size_t dimmid, size_t dimslow,\n" + " size_t padding);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_rewind_category makes the first category in the current data \n" - "block the current category. cbf_rewind_saveframe makes the first \n" - "saveframe in the current data block the current saveframe. \n" - "cbf_rewind_blockitem makes the first blockitem (category or \n" - "saveframe) in the current data block the current blockitem. The type \n" - "of the blockitem (CBF_CATEGORY or CBF_SAVEFRAME) is returned in type.\n" - "If there are no categories, saveframes or blockitems the function \n" - "returns CBF_NOTFOUND.\n" - "The current column and row become undefined.\n" + "cbf_set_integerarray sets the binary value of the item at the current \n" + "column and row to an integer array. The array consists of elements \n" + "elements of elsize bytes each, starting at array. The elements are \n" + "signed if elsigned is non-0 and unsigned otherwise. binary_id is the \n" + "binary section identifier. cbf_set_realarray sets the binary value of \n" + "the item at the current column and row to an integer array. The array \n" + "consists of elements elements of elsize bytes each, starting at \n" + "array. binary_id is the binary section identifier.\n" + "The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, \n" + "cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, \n" + "cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants \n" + "allow the data header values of byteorder, dimfast, dimmid, dimslow \n" + "and padding to be set to the data byte order, the fastest, second \n" + "fastest and third fastest array dimensions and the size in byte of \n" + "the post data padding to be used.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + " Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression. \n" + "NOTE: This scheme is by far the slowest of the four and uses much \n" + "more disk space. It is intended for routine use with small arrays \n" + "only. With large arrays (like images) it should be used only for \n" + "debugging.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or \n" + "floats for cbf_set_realarray. If elsize is not equal to sizeof \n" + "(char), sizeof (short) or sizeof (int), the function returns \n" + "CBF_ARGUMENT.\n" "ARGUMENTS\n" - "handle CBF handle. type CBF handle.\n" + "handle CBF handle. compression Compression method to use. \n" + "binary_id Integer binary identifier. array Pointer to the \n" + "source array. elsize Size in bytes of each source array \n" + "element. elsigned Set to non-0 if the source array elements are \n" + "signed. elements: The number of elements in the array.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_read_template", _wrap_cbf_handle_struct_read_template, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_realarray_wdims_sf", _wrap_cbf_handle_struct_set_realarray_wdims_sf, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : String filename\n" + "*args : int compression,int binary_id,(binary) String data,int elsize,\n" + " int elements,String byteorder,int dimslow,int dimmid,int dimfast,\n" + " int padding\n" "\n" - "C prototype: int cbf_read_template (cbf_handle handle, FILE *file);\n" + "C prototype: int cbf_set_realarray_wdims_sf (cbf_handle handle,\n" + " unsigned int compression, int binary_id, void *array,\n" + " size_t elsize, size_t elements, const char *byteorder,\n" + " size_t dimslow, size_t dimmid, size_t dimfast,\n" + " size_t padding);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_read_template reads the CBF or CIF file file into the CBF object \n" - "specified by handle and selects the first datablock as the current \n" - "datablock.\n" + "cbf_set_integerarray sets the binary value of the item at the current \n" + "column and row to an integer array. The array consists of elements \n" + "elements of elsize bytes each, starting at array. The elements are \n" + "signed if elsigned is non-0 and unsigned otherwise. binary_id is the \n" + "binary section identifier. cbf_set_realarray sets the binary value of \n" + "the item at the current column and row to an integer array. The array \n" + "consists of elements elements of elsize bytes each, starting at \n" + "array. binary_id is the binary section identifier.\n" + "The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, \n" + "cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, \n" + "cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants \n" + "allow the data header values of byteorder, dimfast, dimmid, dimslow \n" + "and padding to be set to the data byte order, the fastest, second \n" + "fastest and third fastest array dimensions and the size in byte of \n" + "the post data padding to be used.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + " Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression. \n" + "NOTE: This scheme is by far the slowest of the four and uses much \n" + "more disk space. It is intended for routine use with small arrays \n" + "only. With large arrays (like images) it should be used only for \n" + "debugging.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or \n" + "floats for cbf_set_realarray. If elsize is not equal to sizeof \n" + "(char), sizeof (short) or sizeof (int), the function returns \n" + "CBF_ARGUMENT.\n" "ARGUMENTS\n" - "handle Pointer to a CBF handle. file Pointer to a file \n" - "descriptor.\n" + "handle CBF handle. compression Compression method to use. \n" + "binary_id Integer binary identifier. array Pointer to the \n" + "source array. elsize Size in bytes of each source array \n" + "element. elsigned Set to non-0 if the source array elements are \n" + "signed. elements: The number of elements in the array.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_select_row", _wrap_cbf_handle_struct_select_row, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_require_datablock", _wrap_cbf_handle_struct_require_datablock, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : Integer\n" + "Returns : string\n" + "*args : \n" "\n" - "C prototype: int cbf_select_row (cbf_handle handle, unsigned int row);\n" + "C prototype: int cbf_require_datablock (cbf_handle handle,\n" + " const char *datablockname);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_select_row selects row number row in the current category as the \n" - "current row.\n" - "The first row is number 0.\n" - "The current column is not affected\n" - "If the row does not exist, the function returns CBF_NOTFOUND.\n" + "cbf_require_datablock makes the data block with name datablockname \n" + "the current data block, if it exists, or creates it if it does not.\n" + "The comparison is case-insensitive.\n" + "The current category becomes undefined.\n" "ARGUMENTS\n" - "handle CBF handle. row Number of the row to select.\n" + "handle CBF handle. datablockname The name of the data \n" + "block to find or create.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_image_fs_as_string", _wrap_cbf_handle_struct_get_image_fs_as_string, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_require_category", _wrap_cbf_handle_struct_require_category, METH_VARARGS, "\n" "\n" - "Returns : (Binary)String\n" - "*args : int element_number,int elsize,int elsign,int ndimfast,int ndimslow\n" + "Returns : string\n" + "*args : \n" "\n" - "C prototype: int cbf_get_image_fs (cbf_handle handle, unsigned int reserved,\n" - " unsigned int element_number, void *array, size_t elsize,\n" - " int elsign, size_t ndimfast, size_t ndimslow);\n" + "C prototype: int cbf_require_category (cbf_handle handle,\n" + " const char *categoryname);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" - "array for element number element_number into an array. The array \n" - "consists of ndimslow *ndimfast elements of elsize bytes each, \n" - "starting at array. The elements are signed if elsign is non-0 and \n" - "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" - "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" - "for element number element_number into an array. A real array is \n" - "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" - "cbf_get_3d_image_sf read the 3D image array for element number \n" - "element_number into an array. The array consists of ndimslow *ndimmid \n" - "*ndimfast elements of elsize bytes each, starting at array. The \n" - "elements are signed if elsign is non-0 and unsigned otherwise. \n" - "cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" - "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" - "floats for element number element_number into an array. A real array \n" - "is always signed.\n" - "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" - "with no suffix and the calls _sf calls give the dimensions in \n" - "slow-to-fast order\n" - "The structure of the array as a 1-, 2- or 3-dimensional array should \n" - "agree with the structure of the array given in the \n" - "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" - "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" - "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" - "being processed. If the array is 2-dimensional and a 3D call is used, \n" - "ndimslow and ndimmid should be the\n" + "cbf_rewuire_category makes the category in the current data block \n" + "with name categoryname the current category, if it exists, or creates \n" + "the catagory if it does not exist.\n" + "The comparison is case-insensitive.\n" + "The current column and row become undefined.\n" + "ARGUMENTS\n" + "handle CBF handle. categoryname The name of the category to \n" + "find.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_image_size_sf", _wrap_cbf_handle_struct_get_image_size_sf, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_require_column", _wrap_cbf_handle_struct_require_column, METH_VARARGS, "\n" "\n" - "Returns : size_t ndimslow,size_t ndimfast\n" - "*args : Integer element_number\n" + "Returns : string\n" + "*args : \n" "\n" - "C prototype: int cbf_get_image_size_sf (cbf_handle handle,\n" - " unsigned int reserved, unsigned int element_number,\n" - " size_t *ndimslow, size_t *ndimfast);\n" + "C prototype: int cbf_require_column (cbf_handle handle,\n" + " const char *columnname);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf \n" - "set *ndimslow and *ndimfast to the slow and fast dimensions of the \n" - "image array for element number element_number. If the array is \n" - "1-dimensional, *ndimslow will be set to the array size and *ndimfast \n" - "will be set to 1. If the array is 3-dimensional an error code will be \n" - "returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and \n" - "cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the \n" - "slowest, next fastest and fastest dimensions, respectively, of the 3D \n" - "image array for element number element_number. If the array is \n" - "1-dimensional, *ndimslow will be set to the array size and *ndimmid \n" - "and\n" + "cbf_require_column makes the columns in the current category with \n" + "name columnname the current column, if it exists, or creates it if it \n" + "does not.\n" + "The comparison is case-insensitive.\n" + "The current row is not affected.\n" + "ARGUMENTS\n" + "handle CBF handle. columnname The name of column to find.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_real_image_fs_as_string", _wrap_cbf_handle_struct_get_real_image_fs_as_string, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_require_column_value", _wrap_cbf_handle_struct_require_column_value, METH_VARARGS, "\n" "\n" - "Returns : (Binary)String\n" - "*args : int element_number,int elsize,int ndimfast,int ndimslow\n" + "Returns : String Name\n" + "*args : String columnnanme,String Default\n" "\n" - "C prototype: int cbf_get_real_image_fs (cbf_handle handle,\n" - " unsigned int reserved, unsigned int element_number,\n" - " void *array, size_t elsize, size_t ndimfast,\n" - " size_t ndimslow);\n" + "C prototype: int cbf_require_column_value (cbf_handle handle,\n" + " const char *columnname, const char **value,\n" + " const char *defaultvalue);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" - "array for element number element_number into an array. The array \n" - "consists of ndimslow *ndimfast elements of elsize bytes each, \n" - "starting at array. The elements are signed if elsign is non-0 and \n" - "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" - "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" - "for element number element_number into an array. A real array is \n" - "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" - "cbf_get_3d_image_sf read the 3D image array for element number \n" - "element_number into an array. The array consists of ndimslow *ndimmid \n" - "*ndimfast elements of elsize bytes each, starting at array. The \n" - "elements are signed if elsign is non-0 and unsigned otherwise. \n" - "cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" - "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" - "floats for element number element_number into an array. A real array \n" - "is always signed.\n" - "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" - "with no suffix and the calls _sf calls give the dimensions in \n" - "slow-to-fast order\n" - "The structure of the array as a 1-, 2- or 3-dimensional array should \n" - "agree with the structure of the array given in the \n" - "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" - "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" - "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" - "being processed. If the array is 2-dimensional and a 3D call is used, \n" - "ndimslow and ndimmid should be the\n" + "cbf_require_column_doublevalue sets *value to the ASCII item at the \n" + "current row for the column given with the name given by *columnname, \n" + "or to the string given by defaultvalue if the item cannot be found.\n" + "ARGUMENTS\n" + "handle CBF handle. columnname Name of the column \n" + "containing the number. value pointer to the location to \n" + "receive the value. defaultvalue Value to use if the requested \n" + "column and value cannot be found.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_count_columns", _wrap_cbf_handle_struct_count_columns, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_require_column_integervalue", _wrap_cbf_handle_struct_require_column_integervalue, METH_VARARGS, "\n" "\n" - "Returns : Integer\n" - "*args : \n" + "Returns : Int Value\n" + "*args : String Columnvalue,Int default\n" "\n" - "C prototype: int cbf_count_columns (cbf_handle handle, unsigned int *columns);\n" + "C prototype: int cbf_require_column_integervalue (cbf_handle handle,\n" + " const char *columnname, int *number,\n" + " const int defaultvalue);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_count_columns puts the number of columns in the current category \n" - "in *columns.\n" + "cbf_require_column_doublevalue sets *number to the value of the ASCII \n" + "item at the current row for the column given with the name given by \n" + "*columnname, with the value interpreted as an integer number, or to \n" + "the number given by defaultvalue if the item cannot be found.\n" "ARGUMENTS\n" - "handle CBF handle. columns Pointer to the destination column \n" - "count.\n" + "handle CBF handle. columnname Name of the column \n" + "containing the number. number pointer to the location to \n" + "receive the integer value. defaultvalue Value to use if the \n" + "requested column and value cannot be found.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_integerarrayparameters_wdims", _wrap_cbf_handle_struct_get_integerarrayparameters_wdims, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_require_column_doublevalue", _wrap_cbf_handle_struct_require_column_doublevalue, METH_VARARGS, "\n" "\n" - "Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned,\n" - " int elements,int minelement,int maxelement,char **bo,int *bolen,\n" - " int dimfast,int dimmid,int dimslow,int padding\n" - "*args : \n" + "Returns : Float defaultvalue\n" + "*args : String columnname,Float Value\n" "\n" - "C prototype: int cbf_get_integerarrayparameters_wdims (cbf_handle handle,\n" - " unsigned int *compression, int *binary_id, size_t *elsize,\n" - " int *elsigned, int *elunsigned, size_t *elements,\n" - " int *minelement, int *maxelement, const char **byteorder,\n" - " size_t *dimfast, size_t *dimmid, size_t *dimslow,\n" - " size_t *padding);\n" + "C prototype: int cbf_require_column_doublevalue (cbf_handle handle,\n" + " const char *columnname, double *number,\n" + " const double defaultvalue);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_integerarrayparameters sets *compression, *binary_id, \n" - "*elsize, *elsigned, *elunsigned, *elements, *minelement and \n" - "*maxelement to values read from the binary value of the item at the \n" - "current column and row. This provides all the arguments needed for a \n" - "subsequent call to cbf_set_integerarray, if a copy of the array is to \n" - "be made into another CIF or CBF. cbf_get_realarrayparameters sets \n" - "*compression, *binary_id, *elsize, *elements to values read from the \n" - "binary value of the item at the current column and row. This provides \n" - "all the arguments needed for a subsequent call to cbf_set_realarray, \n" - "if a copy of the arry is to be made into another CIF or CBF.\n" - "The variants cbf_get_integerarrayparameters_wdims, \n" - "cbf_get_integerarrayparameters_wdims_fs, \n" - "cbf_get_integerarrayparameters_wdims_sf, \n" - "cbf_get_realarrayparameters_wdims, \n" - "cbf_get_realarrayparameters_wdims_fs, \n" - "cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, \n" - "*dimmid, *dimslow, and *padding as well, providing the additional \n" - "parameters needed for a subsequent call to cbf_set_integerarray_wdims \n" - "or cbf_set_realarray_wdims.\n" - "The value returned in *byteorder is a pointer either to the string \n" - "\"little_endian \" or to the string \"big_endian \". This should be \n" - "the byte order of the data, not necessarily of the host machine. No \n" - "attempt should be made to modify this string. At this time only \n" - "\"little_endian \" will be returned.\n" - "The values returned in *dimfast, *dimmid and *dimslow are the sizes \n" - "of the fastest changing, second fastest changing and third fastest \n" - "changing dimensions of the array, if specified, or zero, if not \n" - "specified.\n" - "The value returned in *padding is the size of the post-data padding, \n" - "if any and if specified in the data header. The value is given as a \n" - "count of octets.\n" - "If the value is not binary, the function returns CBF_ASCII.\n" + "cbf_require_column_doublevalue sets *number to the value of the ASCII \n" + "item at the current row for the column given with the name given by \n" + "*columnname, with the value interpreted as a decimal floating-point \n" + "number, or to the number given by defaultvalue if the item cannot be \n" + "found.\n" "ARGUMENTS\n" - "handle CBF handle. compression Compression method used. \n" - "elsize Size in bytes of each array element. binary_id \n" - "Pointer to the destination integer binary identifier. elsigned \n" - "Pointer to an integer. Set to 1 if the elements can be read as signed \n" - "integers. elunsigned Pointer to an integer. Set to 1 if the \n" - "elements can be read as unsigned integers. elements Pointer to \n" - "the destination number of elements. minelement Pointer to the \n" - "destination smallest element. maxelement Pointer to the \n" - "destination largest element. byteorder Pointer to the destination \n" - "byte order. dimfast Pointer to the destination fastest \n" - "dimension. dimmid Pointer to the destination second fastest \n" - "dimension. dimslow Pointer to the destination third fastest \n" - "dimension. padding Pointer to the destination padding size.\n" + "handle CBF handle. columnname Name of the column \n" + "containing the number. number pointer to the location to \n" + "receive the floating-point value. defaultvalue Value to use if the \n" + "requested column and value cannot be found.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_gain", _wrap_cbf_handle_struct_get_gain, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_dictionary", _wrap_cbf_handle_struct_get_dictionary, METH_O, "\n" "\n" - "Returns : Float gain,Float gain_esd\n" + "Returns : CBFHandle dictionary\n" "*args : \n" "\n" - "C prototype: int cbf_get_gain (cbf_handle handle, unsigned int element_number,\n" - " double *gain, double *gain_esd);\n" + "C prototype: int cbf_get_dictionary (cbf_handle handle,\n" + " cbf_handle * dictionary);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_gain sets *gain and *gain_esd to the corresponding gain \n" - "parameters for element number element_number.\n" - "Either of the destination pointers may be NULL.\n" + "cbf_get_dictionary sets *dictionary to the handle of a CBF which has \n" + "been associated with the CBF handle by cbf_set_dictionary. \n" + "cbf_set_dictionary associates the CBF handle dictionary_in with \n" + "handle as its dictionary. cbf_require_dictionary sets *dictionary to \n" + "the handle of a CBF which has been associated with the CBF handle by \n" + "cbf_set_dictionary or creates a new empty CBF and associates it with \n" + "handle, returning the new handle in *dictionary.\n" "ARGUMENTS\n" - "handle CBF handle. element_number The number of the \n" - "detector element counting from 0 by order of appearance in the \n" - "\"diffrn_data_frame \" category. gain Pointer to the \n" - "destination gain. gain_esd Pointer to the destination \n" - "gain_esd.\n" + "handle CBF handle. dictionary Pointer to CBF handle of \n" + "dictionary. dictionary_in CBF handle of dcitionary.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_new_saveframe", _wrap_cbf_handle_struct_new_saveframe, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_dictionary", _wrap_cbf_handle_struct_set_dictionary, METH_VARARGS, "\n" "\n" - "Returns : string\n" - "*args : \n" + "Returns : \n" + "*args : CBFHandle dictionary\n" "\n" - "C prototype: int cbf_new_saveframe (cbf_handle handle,\n" - " const char *saveframename);\n" + "C prototype: int cbf_set_dictionary (cbf_handle handle,\n" + " cbf_handle dictionary_in);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_new_datablock creates a new data block with name datablockname \n" - "and makes it the current data block. cbf_new_saveframe creates a new \n" - "save frame with name saveframename within the current data block and \n" - "makes the new save frame the current save frame.\n" - "If a data block or save frame with this name already exists, the \n" - "existing data block or save frame becomes the current data block or \n" - "save frame.\n" + "cbf_get_dictionary sets *dictionary to the handle of a CBF which has \n" + "been associated with the CBF handle by cbf_set_dictionary. \n" + "cbf_set_dictionary associates the CBF handle dictionary_in with \n" + "handle as its dictionary. cbf_require_dictionary sets *dictionary to \n" + "the handle of a CBF which has been associated with the CBF handle by \n" + "cbf_set_dictionary or creates a new empty CBF and associates it with \n" + "handle, returning the new handle in *dictionary.\n" + "ARGUMENTS\n" + "handle CBF handle. dictionary Pointer to CBF handle of \n" + "dictionary. dictionary_in CBF handle of dcitionary.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_find_category_root", _wrap_cbf_handle_struct_find_category_root, METH_VARARGS, "\n" + "\n" + "Returns : String categoryroot\n" + "*args : String categoryname\n" + "\n" + "C prototype: int cbf_find_category_root (cbf_handle handle,\n" + " const char* categoryname, const char** categoryroot);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_find_category_root sets *categoryroot to the root category of \n" + "which categoryname is an alias. cbf_set_category_root sets \n" + "categoryname_in as an alias of categoryroot in the dictionary \n" + "associated with handle, creating the dictionary if necessary. \n" + "cbf_require_category_root sets *categoryroot to the root category of \n" + "which categoryname is an alias, if there is one, or to the value of \n" + "categoryname, if categoryname is not an alias.\n" + "A returned categoryroot string must not be modified in any way.\n" + "ARGUMENTS\n" + "handle CBF handle. categoryname category name which \n" + "may be an alias. categoryroot pointer to a returned category \n" + "root name. categoryroot_in input category root name.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_set_category_root", _wrap_cbf_handle_struct_set_category_root, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : String categoryname,String categoryroot\n" + "\n" + "C prototype: int cbf_set_category_root (cbf_handle handle,\n" + " const char* categoryname_in, const char*categoryroot);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_find_category_root sets *categoryroot to the root category of \n" + "which categoryname is an alias. cbf_set_category_root sets \n" + "categoryname_in as an alias of categoryroot in the dictionary \n" + "associated with handle, creating the dictionary if necessary. \n" + "cbf_require_category_root sets *categoryroot to the root category of \n" + "which categoryname is an alias, if there is one, or to the value of \n" + "categoryname, if categoryname is not an alias.\n" + "A returned categoryroot string must not be modified in any way.\n" "ARGUMENTS\n" - "handle CBF handle. datablockname The name of the new data \n" - "block. saveframename The name of the new save frame.\n" + "handle CBF handle. categoryname category name which \n" + "may be an alias. categoryroot pointer to a returned category \n" + "root name. categoryroot_in input category root name.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_polarization", _wrap_cbf_handle_struct_set_polarization, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_require_category_root", _wrap_cbf_handle_struct_require_category_root, METH_VARARGS, "cbf_handle_struct_require_category_root(cbf_handle_struct self, char const * categoryname) -> char const *"}, + { "cbf_handle_struct_find_tag_root", _wrap_cbf_handle_struct_find_tag_root, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : Float polarizn_source_ratio,Float polarizn_source_norm\n" + "Returns : String tagroot\n" + "*args : String tagname\n" "\n" - "C prototype: int cbf_set_polarization (cbf_handle handle,\n" - " double polarizn_source_ratio,\n" - " double polarizn_source_norm);\n" + "C prototype: int cbf_find_tag_root (cbf_handle handle, const char* tagname,\n" + " const char** tagroot);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_polarization sets the source polarization to the values \n" - "specified by polarizn_source_ratio and polarizn_source_norm.\n" + "cbf_find_tag_root sets *tagroot to the root tag of which tagname is \n" + "an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in \n" + "the dictionary associated with handle, creating the dictionary if \n" + "necessary. cbf_require_tag_root sets *tagroot to the root tag of \n" + "which tagname is an alias, if there is one, or to the value of \n" + "tagname, if tagname is not an alias.\n" + "A returned tagroot string must not be modified in any way.\n" "ARGUMENTS\n" - "handle CBF handle. polarizn_source_ratio New value \n" - "of polarizn_source_ratio. polarizn_source_norm New value of \n" - "polarizn_source_norm.\n" + "handle CBF handle. tagname tag name which may be an alias. \n" + "tagroot pointer to a returned tag root name. tagroot_in input \n" + "tag root name.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_real_3d_image", _wrap_cbf_handle_struct_set_real_3d_image, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_tag_root", _wrap_cbf_handle_struct_set_tag_root, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : int element_number,int compression,(binary) String data,int elsize,\n" - " int dimslow,int dimmid,int dimfast\n" + "*args : String tagname,String tagroot_in\n" "\n" - "C prototype: int cbf_set_real_3d_image (cbf_handle handle,\n" - " unsigned int reserved, unsigned int element_number,\n" - " unsigned int compression, void *array,size_t elsize,\n" - " size_t ndimslow, size_t ndimmid, size_t ndimfast);\n" + "C prototype: int cbf_set_tag_root (cbf_handle handle, const char* tagname,\n" + " const char*tagroot_in);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" - "array for element number element_number. The array consists of \n" - "ndimfast *ndimslow elements of elsize bytes each, starting at array. \n" - "The elements are signed if elsign is non-zero and unsigned otherwise. \n" - "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" - "write the image array for element number element_number. The array \n" - "consists of ndimfast *ndimslow IEEE double or float elements of \n" - "elsize bytes each, starting at array. cbf_set_3d_image, \n" - "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" - "for element number element_number. The array consists of ndimfast \n" - "*ndimmid *ndimslow elements of elsize bytes each, starting at array. \n" - "The elements are signed if elsign is non-0 and unsigned otherwise. \n" - "cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" - "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" - "element_number. The array consists of ndimfast *ndimmid *ndimslow \n" - "IEEE double or float elements of elsize bytes each, starting at \n" - "array.\n" - "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" - "with no suffix and the calls _sf calls give the dimensions in \n" - "slow-to-fast order\n" - "If the array is 1-dimensional, ndimslow should be the array size and \n" - "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" - "array is 2-dimensional and the 3D calls are used, ndimslow and \n" - "ndimmid should be used for the array dimensions and ndimfast should \n" - "be set to 1.\n" - "The array will be compressed using the compression scheme specifed by \n" - "compression. Currently, the available schemes are:\n" - "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" - "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" - " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" - "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" - "\"nibble_offset \" compression. CBF_NONE No compression.\n" - "The values compressed are limited to 64 bits. If any element in the \n" - "array is larger than 64 bits, the value compressed is the nearest \n" - "64-bit value.\n" - "Currently, the source array must consist of chars, shorts or ints \n" - "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" - "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" - "(int), sizeof(double) or sizeof(float), the function returns \n" - "CBF_ARGUMENT.\n" - "The parameter reserved is presently unused and should be set to 0.\n" + "cbf_find_tag_root sets *tagroot to the root tag of which tagname is \n" + "an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in \n" + "the dictionary associated with handle, creating the dictionary if \n" + "necessary. cbf_require_tag_root sets *tagroot to the root tag of \n" + "which tagname is an alias, if there is one, or to the value of \n" + "tagname, if tagname is not an alias.\n" + "A returned tagroot string must not be modified in any way.\n" "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any value other \n" - "than 0 is invalid. element_number The number of the detector \n" - "element counting from 0 by order of appearance in the \n" - "\"diffrn_data_frame \" category. compression Compression type. \n" - "array Pointer to the image array. elsize Size in \n" - "bytes of each image array element. elsigned Set to non-0 if \n" - "the image array elements are signed. ndimslow Slowest array \n" - "dimension. ndimmid Second slowest array dimension. ndimfast \n" - " Fastest array dimension.\n" + "handle CBF handle. tagname tag name which may be an alias. \n" + "tagroot pointer to a returned tag root name. tagroot_in input \n" + "tag root name.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_delete_row", _wrap_cbf_handle_struct_delete_row, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_require_tag_root", _wrap_cbf_handle_struct_require_tag_root, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : Integer\n" + "Returns : String tagroot\n" + "*args : String tagname\n" "\n" - "C prototype: int cbf_delete_row (cbf_handle handle, unsigned int rownumber);\n" + "C prototype: int cbf_require_tag_root (cbf_handle handle, const char* tagname,\n" + " const char** tagroot);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_delete_row deletes a row from the current category. Rows starting \n" - "from rownumber +1 are moved down by 1. If the current row was higher \n" - "than rownumber, or if the current row is the last row, it will also \n" - "move down by 1.\n" - "The row numbers start from 0.\n" + "cbf_find_tag_root sets *tagroot to the root tag of which tagname is \n" + "an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in \n" + "the dictionary associated with handle, creating the dictionary if \n" + "necessary. cbf_require_tag_root sets *tagroot to the root tag of \n" + "which tagname is an alias, if there is one, or to the value of \n" + "tagname, if tagname is not an alias.\n" + "A returned tagroot string must not be modified in any way.\n" "ARGUMENTS\n" - "handle CBF handle. rownumber The number of the row to delete.\n" + "handle CBF handle. tagname tag name which may be an alias. \n" + "tagroot pointer to a returned tag root name. tagroot_in input \n" + "tag root name.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_column_name", _wrap_cbf_handle_struct_column_name, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_find_tag_category", _wrap_cbf_handle_struct_find_tag_category, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : string\n" + "Returns : String categoryname\n" + "*args : String tagname\n" "\n" - "C prototype: int cbf_column_name (cbf_handle handle, const char **columnname);\n" + "C prototype: int cbf_find_tag_category (cbf_handle handle,\n" + " const char* tagname, const char** categoryname);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_column_name sets *columnname to point to the name of the current \n" - "column of the current category.\n" - "The column name will be valid as long as the column exists.\n" - "The name must not be modified by the program in any way.\n" - "cbf_set_column_name sets the name of the current column to \n" - "newcolumnname\n" + "cbf_find_tag_category sets categoryname to the category associated \n" + "with tagname in the dictionary associated with handle. \n" + "cbf_set_tag_category upddates the dictionary associated with handle \n" + "to indicated that tagname is in category categoryname_in.\n" "ARGUMENTS\n" - "handle CBF handle. columnname Pointer to the \n" - "destination column name pointer. newcolumnname New column name \n" - "pointer.\n" + "handle CBF handle. tagname tag name. \n" + "categoryname pointer to a returned category name. \n" + "categoryname_in input category name.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_remove_saveframe", _wrap_cbf_handle_struct_remove_saveframe, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_tag_category", _wrap_cbf_handle_struct_set_tag_category, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : \n" + "*args : String tagname,String categoryname_in\n" "\n" - "C prototype: int cbf_remove_saveframe (cbf_handle handle);\n" + "C prototype: int cbf_set_tag_category (cbf_handle handle, const char* tagname,\n" + " const char* categoryname_in);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_remove_datablock deletes the current data block. \n" - "cbf_remove_saveframe deletes the current save frame.\n" - "The current data block becomes undefined.\n" + "cbf_find_tag_category sets categoryname to the category associated \n" + "with tagname in the dictionary associated with handle. \n" + "cbf_set_tag_category upddates the dictionary associated with handle \n" + "to indicated that tagname is in category categoryname_in.\n" "ARGUMENTS\n" - "handle CBF handle.\n" + "handle CBF handle. tagname tag name. \n" + "categoryname pointer to a returned category name. \n" + "categoryname_in input category name.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_integerarray_wdims_sf", _wrap_cbf_handle_struct_set_integerarray_wdims_sf, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_read_template", _wrap_cbf_handle_struct_read_template, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : int compression,int binary_id,(binary) String data,int elsize,\n" - " int elsigned,int elements,String byteorder,int dimslow,int dimmid,\n" - " int dimfast,int padding\n" + "*args : String filename\n" "\n" - "C prototype: int cbf_set_integerarray_wdims_sf (cbf_handle handle,\n" - " unsigned int compression, int binary_id, void *array,\n" - " size_t elsize, int elsigned, size_t elements,\n" - " const char *byteorder, size_t dimslow, size_t dimmid,\n" - " size_t dimfast, size_t padding);\n" + "C prototype: int cbf_read_template (cbf_handle handle, FILE *file);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_integerarray sets the binary value of the item at the current \n" - "column and row to an integer array. The array consists of elements \n" - "elements of elsize bytes each, starting at array. The elements are \n" - "signed if elsigned is non-0 and unsigned otherwise. binary_id is the \n" - "binary section identifier. cbf_set_realarray sets the binary value of \n" - "the item at the current column and row to an integer array. The array \n" - "consists of elements elements of elsize bytes each, starting at \n" - "array. binary_id is the binary section identifier.\n" - "The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, \n" - "cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, \n" - "cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants \n" - "allow the data header values of byteorder, dimfast, dimmid, dimslow \n" - "and padding to be set to the data byte order, the fastest, second \n" - "fastest and third fastest array dimensions and the size in byte of \n" - "the post data padding to be used.\n" - "The array will be compressed using the compression scheme specifed by \n" - "compression. Currently, the available schemes are:\n" - "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" - "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" - " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" - " Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" - "\"nibble_offset \" compression. CBF_NONE No compression. \n" - "NOTE: This scheme is by far the slowest of the four and uses much \n" - "more disk space. It is intended for routine use with small arrays \n" - "only. With large arrays (like images) it should be used only for \n" - "debugging.\n" - "The values compressed are limited to 64 bits. If any element in the \n" - "array is larger than 64 bits, the value compressed is the nearest \n" - "64-bit value.\n" - "Currently, the source array must consist of chars, shorts or ints \n" - "(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or \n" - "floats for cbf_set_realarray. If elsize is not equal to sizeof \n" - "(char), sizeof (short) or sizeof (int), the function returns \n" - "CBF_ARGUMENT.\n" + "cbf_read_template reads the CBF or CIF file file into the CBF object \n" + "specified by handle and selects the first datablock as the current \n" + "datablock.\n" "ARGUMENTS\n" - "handle CBF handle. compression Compression method to use. \n" - "binary_id Integer binary identifier. array Pointer to the \n" - "source array. elsize Size in bytes of each source array \n" - "element. elsigned Set to non-0 if the source array elements are \n" - "signed. elements: The number of elements in the array.\n" + "handle Pointer to a CBF handle. file Pointer to a file \n" + "descriptor.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_require_value", _wrap_cbf_handle_struct_require_value, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_diffrn_id", _wrap_cbf_handle_struct_get_diffrn_id, METH_O, "\n" "\n" - "Returns : String Value\n" - "*args : String defaultvalue\n" + "Returns : \n" + "*args : string\n" "\n" - "C prototype: int cbf_require_value (cbf_handle handle, const char **value,\n" - " const char *defaultvalue );\n" + "C prototype: int cbf_get_diffrn_id (cbf_handle handle,\n" + " const char **diffrn_id);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_value sets *value to point to the ASCII value of the item at \n" - "the current column and row. cbf_require_value sets *value to point to \n" - "the ASCII value of the item at the current column and row, creating \n" - "the data item if necessary and initializing it to a copy of \n" - "defaultvalue.\n" - "If the value is not ASCII, the function returns CBF_BINARY.\n" - "The value will be valid as long as the item exists and has not been \n" - "set to a new value.\n" - "The value must not be modified by the program in any way.\n" + "cbf_get_diffrn_id sets *diffrn_id to point to the ASCII value of the \n" + "\"diffrn.id \" entry. cbf_require_diffrn_id also sets *diffrn_id to \n" + "point to the ASCII value of the \"diffrn.id \" entry, but, if the \n" + "\"diffrn.id \" entry does not exist, it sets the value in the CBF and \n" + "in*diffrn_id to the character string given by default_id, creating \n" + "the category and column is necessary.\n" + "The diffrn_id will be valid as long as the item exists and has not \n" + "been set to a new value.\n" + "The diffrn_id must not be modified by the program in any way.\n" "ARGUMENTS\n" - "handle CBF handle. value Pointer to the destination \n" - "value pointer. defaultvalue Default value character string.\n" + "handle CBF handle. diffrn_id Pointer to the destination \n" + "value pointer. default_id Character string default value.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_require_column_integervalue", _wrap_cbf_handle_struct_require_column_integervalue, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_diffrn_id", _wrap_cbf_handle_struct_set_diffrn_id, METH_VARARGS, "\n" "\n" - "Returns : Int Value\n" - "*args : String Columnvalue,Int default\n" + "Returns : string\n" + "*args : \n" "\n" - "C prototype: int cbf_require_column_integervalue (cbf_handle handle,\n" - " const char *columnname, int *number,\n" - " const int defaultvalue);\n" + "C prototype: int cbf_set_diffrn_id (cbf_handle handle, const char *diffrn_id);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_require_column_doublevalue sets *number to the value of the ASCII \n" - "item at the current row for the column given with the name given by \n" - "*columnname, with the value interpreted as an integer number, or to \n" - "the number given by defaultvalue if the item cannot be found.\n" + "cbf_set_diffrn_id sets the \"diffrn.id \" entry of the current \n" + "datablock to the ASCII value diffrn_id.\n" + "This function also changes corresponding \"diffrn_id \" entries in \n" + "the \"diffrn_source \", \"diffrn_radiation \", \"diffrn_detector \n" + "\" and \"diffrn_measurement \" categories.\n" "ARGUMENTS\n" - "handle CBF handle. columnname Name of the column \n" - "containing the number. number pointer to the location to \n" - "receive the integer value. defaultvalue Value to use if the \n" - "requested column and value cannot be found.\n" + "handle CBF handle. diffrn_id ASCII value.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_pixel_size", _wrap_cbf_handle_struct_set_pixel_size, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_crystal_id", _wrap_cbf_handle_struct_get_crystal_id, METH_O, "\n" "\n" "Returns : \n" - "*args : Int element_number,Int axis_number,Float pixel size\n" + "*args : string\n" "\n" - "C prototype: int cbf_set_pixel_size (cbf_handle handle,\n" - " unsigned int element_number, int axis_number,\n" - " double psize);\n" + "C prototype: int cbf_get_crystal_id (cbf_handle handle,\n" + " const char **crystal_id);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the \n" - ""e;size"e; column of the \"array_structure_list \" category \n" - "at the row which matches axis axis_number of the detector element \n" - "element_number converting the double pixel size psize from meters to \n" - "millimeters in storing it in the \"size \" column for the axis \n" - "axis_number of the detector element element_number. The axis_number \n" - "is numbered from 1, starting with the slowest axis. \n" - "cbf_set_pixel_size_fs sets the item\n" + "cbf_get_crystal_id sets *crystal_id to point to the ASCII value of \n" + "the \"diffrn.crystal_id \" entry.\n" + "If the value is not ASCII, the function returns CBF_BINARY.\n" + "The value will be valid as long as the item exists and has not been \n" + "set to a new value.\n" + "The value must not be modified by the program in any way.\n" + "ARGUMENTS\n" + "handle CBF handle. crystal_id Pointer to the destination \n" + "value pointer.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_next_column", _wrap_cbf_handle_struct_next_column, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_crystal_id", _wrap_cbf_handle_struct_set_crystal_id, METH_VARARGS, "\n" "\n" - "Returns : \n" + "Returns : string\n" "*args : \n" "\n" - "C prototype: int cbf_next_column (cbf_handle handle);\n" + "C prototype: int cbf_set_crystal_id (cbf_handle handle,\n" + " const char *crystal_id);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_next_column makes the column following the current column in the \n" - "current category the current column.\n" - "If there are no more columns, the function returns CBF_NOTFOUND.\n" - "The current row is not affected.\n" + "cbf_set_crystal_id sets the \"diffrn.crystal_id \" entry to the \n" + "ASCII value crystal_id.\n" "ARGUMENTS\n" - "handle CBF handle.\n" + "handle CBF handle. crystal_id ASCII value.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_3d_image_size_sf", _wrap_cbf_handle_struct_get_3d_image_size_sf, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_wavelength", _wrap_cbf_handle_struct_get_wavelength, METH_O, "\n" "\n" - "Returns : size_t ndimslow,size_t ndimmid,size_t ndimfast\n" - "*args : Integer element_number\n" + "Returns : double\n" + "*args : \n" "\n" - "C prototype: int cbf_get_3d_image_size_sf (cbf_handle handle,\n" - " unsigned int reserved, unsigned int element_number,\n" - " size_t *ndimslow, size_t *ndimmid, size_t *ndimfast);\n" + "C prototype: int cbf_get_wavelength (cbf_handle handle, double *wavelength);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf \n" - "set *ndimslow and *ndimfast to the slow and fast dimensions of the \n" - "image array for element number element_number. If the array is \n" - "1-dimensional, *ndimslow will be set to the array size and *ndimfast \n" - "will be set to 1. If the array is 3-dimensional an error code will be \n" - "returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and \n" - "cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the \n" - "slowest, next fastest and fastest dimensions, respectively, of the 3D \n" - "image array for element number element_number. If the array is \n" - "1-dimensional, *ndimslow will be set to the array size and *ndimmid \n" - "and\n" + "cbf_get_wavelength sets *wavelength to the current wavelength in AA.\n" + "ARGUMENTS\n" + "handle CBF handle. wavelength Pointer to the destination.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_realarrayparameters_wdims_fs", _wrap_cbf_handle_struct_get_realarrayparameters_wdims_fs, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_wavelength", _wrap_cbf_handle_struct_set_wavelength, METH_VARARGS, "\n" "\n" - "Returns : int compression,int binary_id,int elsize,int elements,char **bo,\n" - " int *bolen,int dimfast,int dimmid,int dimslow,int padding\n" + "Returns : double wavelength\n" "*args : \n" "\n" - "C prototype: int cbf_get_realarrayparameters_wdims_fs (cbf_handle handle,\n" - " unsigned int *compression, int *binary_id, size_t *elsize,\n" - " size_t *elements, const char **byteorder, size_t *dimfast,\n" - " size_t *dimmid, size_t *dimslow, size_t *padding);\n" + "C prototype: int cbf_set_wavelength (cbf_handle handle, double wavelength);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_integerarrayparameters sets *compression, *binary_id, \n" - "*elsize, *elsigned, *elunsigned, *elements, *minelement and \n" - "*maxelement to values read from the binary value of the item at the \n" - "current column and row. This provides all the arguments needed for a \n" - "subsequent call to cbf_set_integerarray, if a copy of the array is to \n" - "be made into another CIF or CBF. cbf_get_realarrayparameters sets \n" - "*compression, *binary_id, *elsize, *elements to values read from the \n" - "binary value of the item at the current column and row. This provides \n" - "all the arguments needed for a subsequent call to cbf_set_realarray, \n" - "if a copy of the arry is to be made into another CIF or CBF.\n" - "The variants cbf_get_integerarrayparameters_wdims, \n" - "cbf_get_integerarrayparameters_wdims_fs, \n" - "cbf_get_integerarrayparameters_wdims_sf, \n" - "cbf_get_realarrayparameters_wdims, \n" - "cbf_get_realarrayparameters_wdims_fs, \n" - "cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, \n" - "*dimmid, *dimslow, and *padding as well, providing the additional \n" - "parameters needed for a subsequent call to cbf_set_integerarray_wdims \n" - "or cbf_set_realarray_wdims.\n" - "The value returned in *byteorder is a pointer either to the string \n" - "\"little_endian \" or to the string \"big_endian \". This should be \n" - "the byte order of the data, not necessarily of the host machine. No \n" - "attempt should be made to modify this string. At this time only \n" - "\"little_endian \" will be returned.\n" - "The values returned in *dimfast, *dimmid and *dimslow are the sizes \n" - "of the fastest changing, second fastest changing and third fastest \n" - "changing dimensions of the array, if specified, or zero, if not \n" - "specified.\n" - "The value returned in *padding is the size of the post-data padding, \n" - "if any and if specified in the data header. The value is given as a \n" - "count of octets.\n" - "If the value is not binary, the function returns CBF_ASCII.\n" + "cbf_set_wavelength sets the current wavelength in AA to wavelength.\n" "ARGUMENTS\n" - "handle CBF handle. compression Compression method used. \n" - "elsize Size in bytes of each array element. binary_id \n" - "Pointer to the destination integer binary identifier. elsigned \n" - "Pointer to an integer. Set to 1 if the elements can be read as signed \n" - "integers. elunsigned Pointer to an integer. Set to 1 if the \n" - "elements can be read as unsigned integers. elements Pointer to \n" - "the destination number of elements. minelement Pointer to the \n" - "destination smallest element. maxelement Pointer to the \n" - "destination largest element. byteorder Pointer to the destination \n" - "byte order. dimfast Pointer to the destination fastest \n" - "dimension. dimmid Pointer to the destination second fastest \n" - "dimension. dimslow Pointer to the destination third fastest \n" - "dimension. padding Pointer to the destination padding size.\n" + "handle CBF handle. wavelength Wavelength in AA.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_realarray_as_string", _wrap_cbf_handle_struct_get_realarray_as_string, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_polarization", _wrap_cbf_handle_struct_get_polarization, METH_O, "\n" "\n" - "Returns : (Binary)String\n" + "Returns : float polarizn_source_ratio,float polarizn_source_norm\n" "*args : \n" "\n" - "C prototype: int cbf_get_realarray (cbf_handle handle, int *binary_id,\n" - " void *array, size_t elsize, size_t elements,\n" - " size_t *elements_read);\n" + "C prototype: int cbf_get_polarization (cbf_handle handle,\n" + " double *polarizn_source_ratio,\n" + " double *polarizn_source_norm);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_integerarray reads the binary value of the item at the \n" - "current column and row into an integer array. The array consists of \n" - "elements elements of elsize bytes each, starting at array. The \n" - "elements are signed if elsigned is non-0 and unsigned otherwise. \n" - "*binary_id is set to the binary section identifier and *elements_read \n" - "to the number of elements actually read. cbf_get_realarray reads the \n" - "binary value of the item at the current column and row into a real \n" - "array. The array consists of elements elements of elsize bytes each, \n" - "starting at array. *binary_id is set to the binary section identifier \n" - "and *elements_read to the number of elements actually read.\n" - "If any element in the integer binary data cant fit into the \n" - "destination element, the destination is set the nearest possible \n" - "value.\n" - "If the value is not binary, the function returns CBF_ASCII.\n" - "If the requested number of elements cant be read, the function will \n" - "read as many as it can and then return CBF_ENDOFDATA.\n" - "Currently, the destination array must consist of chars, shorts or \n" - "ints (signed or unsigned). If elsize is not equal to sizeof (char), \n" - "sizeof (short) or sizeof (int), for cbf_get_integerarray, or \n" - "sizeof(double) or sizeof(float), for cbf_get_realarray the function \n" - "returns CBF_ARGUMENT.\n" - "An additional restriction in the current version of CBFlib is that \n" - "values too large to fit in an int are not correctly decompressed. As \n" - "an example, if the machine with 32-bit ints is reading an array \n" - "containing a value outside the range 0 .. 2^32-1 (unsigned) or -2^31 \n" - ".. 2^31-1 (signed), the array will not be correctly decompressed. \n" - "This restriction will be removed in a future release. For \n" - "cbf_get_realarray, only IEEE format is supported. No conversion to \n" - "other floating point formats is done at this time.\n" + "cbf_get_polarization sets *polarizn_source_ratio and \n" + "*polarizn_source_norm to the corresponding source polarization \n" + "parameters.\n" + "Either destination pointer may be NULL.\n" "ARGUMENTS\n" - "handle CBF handle. binary_id Pointer to the \n" - "destination integer binary identifier. array Pointer to the \n" - "destination array. elsize Size in bytes of each destination \n" - "array element. elsigned Set to non-0 if the destination array \n" - "elements are signed. elements The number of elements to read. \n" - "elements_read Pointer to the destination number of elements \n" - "actually read.\n" + "handle CBF handle. polarizn_source_ratio Pointer \n" + "to the destination polarizn_source_ratio. polarizn_source_norm \n" + "Pointer to the destination polarizn_source_norm.\n" "RETURN VALUE\n" - "Returns an error code on failure or 0 for success. SEE ALSO\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_bin_sizes", _wrap_cbf_handle_struct_get_bin_sizes, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_polarization", _wrap_cbf_handle_struct_set_polarization, METH_VARARGS, "\n" "\n" - "Returns : Float slowbinsize,Float fastbinsize\n" - "*args : Integer element_number\n" + "Returns : \n" + "*args : Float polarizn_source_ratio,Float polarizn_source_norm\n" "\n" - "C prototype: int cbf_get_bin_sizes(cbf_handle handle,\n" - " unsigned int element_number, double * slowbinsize,\n" - " double * fastbinsize);\n" + "C prototype: int cbf_set_polarization (cbf_handle handle,\n" + " double polarizn_source_ratio,\n" + " double polarizn_source_norm);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_bin_sizes sets slowbinsize to point to the value of the \n" - "number of pixels composing one array element in the dimension that \n" - "changes at the second-fastest rate and fastbinsize to point to the \n" - "value of the number of pixels composing one array element in the \n" - "dimension that changes at the fastest rate for the dectector element \n" - "with the ordinal element_number. cbf_set_bin_sizes sets the the pixel \n" - "bin sizes in the \"array_intensities \" category to the values of \n" - "slowbinsize_in for the number of pixels composing one array element \n" - "in the dimension that changes at the second-fastest rate and \n" - "fastbinsize_in for the number of pixels composing one array element \n" - "in the dimension that changes at the fastest rate for the dectector \n" - "element with the ordinal element_number.\n" - "In order to allow for software binning involving fractions of pixels, \n" - "the bin sizes are doubles rather than ints.\n" + "cbf_set_polarization sets the source polarization to the values \n" + "specified by polarizn_source_ratio and polarizn_source_norm.\n" "ARGUMENTS\n" - "handle CBF handle. element_number The number of the \n" - "detector element counting from 0 by order of appearance in the \n" - "\"diffrn_data_frame \" category. slowbinsize Pointer to the \n" - "returned number of pixels composing one array element in the \n" - "dimension that changes at the second-fastest rate. fastbinsize \n" - "Pointer to the returned number of pixels composing one array element \n" - "in the dimension that changes at the fastest rate. slowbinsize_in \n" - "The number of pixels composing one array element in the dimension \n" - "that changes at the second-fastest rate. fastbinsize_in The number \n" - "of pixels composing one array element in the dimension that changes \n" - "at the fastest rate.\n" + "handle CBF handle. polarizn_source_ratio New value \n" + "of polarizn_source_ratio. polarizn_source_norm New value of \n" + "polarizn_source_norm.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_reset_category", _wrap_cbf_handle_struct_reset_category, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_divergence", _wrap_cbf_handle_struct_get_divergence, METH_O, "\n" "\n" - "Returns : \n" + "Returns : Float div_x_source,Float div_y_source,Float div_x_y_source\n" "*args : \n" "\n" - "C prototype: int cbf_reset_category (cbf_handle handle);\n" + "C prototype: int cbf_get_divergence (cbf_handle handle, double *div_x_source,\n" + " double *div_y_source, double *div_x_y_source);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_reset_category deletes all columns and rows from current category.\n" + "cbf_get_divergence sets *div_x_source, *div_y_source and \n" + "*div_x_y_source to the corresponding source divergence parameters.\n" + "Any of the destination pointers may be NULL.\n" "ARGUMENTS\n" - "handle CBF handle.\n" + "handle CBF handle. div_x_source Pointer to the \n" + "destination div_x_source. div_y_source Pointer to the destination \n" + "div_y_source. div_x_y_source Pointer to the destination \n" + "div_x_y_source.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_count_axis_ancestors", _wrap_cbf_handle_struct_count_axis_ancestors, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_divergence", _wrap_cbf_handle_struct_set_divergence, METH_VARARGS, "\n" "\n" - "Returns : Integer\n" - "*args : String axis_id\n" + "Returns : \n" + "*args : Float div_x_source,Float div_y_source,Float div_x_y_source\n" "\n" - "C prototype: int cbf_count_axis_ancestors (cbf_handle handle,\n" - " const char *axis_id, unsigned int *ancestors);\n" + "C prototype: int cbf_set_divergence (cbf_handle handle, double div_x_source,\n" + " double div_y_source, double div_x_y_source);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" - "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" - "axis of index ancestor_index of axis axis_id, starting with axis_id \n" - "for ancestor_index 0.\n" - "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" - "axis_id or to \". \" if there is no such ancestor. \n" - "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" - "to \". \" if there is no such equipment. \n" - "cbf_get_axis_equipment_component sets *equipment_component to the \n" - "equipment_component of axis_id or to \". \" if there is no such \n" - "equipment_component.\n" - "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" - "components of the ofset of axis_id.\n" - "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" - "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" - "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" - "is no such rotation_axis.\n" - "cbf_get_axis_setting sets *start and *increment to the corresponding \n" - "values of the axis axis_id. Any of the destination pointers may be \n" - "NULL.\n" - "cbf_get_axis_type sets axis_type to the type of axis_id.\n" - "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" - "components of the vector of axis_id.\n" - "The parameter reserved is presently unused and should be set to 0.\n" + "cbf_set_divergence sets the source divergence parameters to the \n" + "values specified by div_x_source, div_y_source and div_x_y_source.\n" "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any \n" - "value other than 0 is invalid. axis_id Axis id. \n" - "ancestor_index Integer index of the desired ancestor, starting \n" - "with 0 for the current axis_id. ancestor Pointer to \n" - "destination ancestor name pointer. depends_on Pointer to \n" - "destination depends_on name pointer. equipment Pointer to \n" - "destination equipment name pointer. equipment_component Pointer to \n" - "destination equipment_component name pointer. offset1 \n" - "Pointer to destination first offset component value. offset2 \n" - " Pointer to destination second offset component value. offset3 \n" - " Pointer to destination third offset component value. \n" - "rotation Pointer to destination rotation value. \n" - "rotation_axis Pointer to destination rotation_axisn name \n" - "pointer. start Pointer to the destination start \n" - "value. increment Pointer to the destination increment \n" - "value. type Pointer to destination axis type of type \n" - ". vector1 Pointer to destination first vector component \n" - "value. vector2 Pointer to destination second vector \n" - "component value. vector3 Pointer to destination third \n" - "vector component value.\n" + "handle CBF handle. div_x_source New value of \n" + "div_x_source. div_y_source New value of div_y_source. \n" + "div_x_y_source New value of div_x_y_source.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_construct_goniometer", _wrap_cbf_handle_struct_construct_goniometer, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_count_elements", _wrap_cbf_handle_struct_count_elements, METH_O, "\n" "\n" - "Returns : pycbf goniometer object\n" + "Returns : Integer\n" "*args : \n" "\n" - "C prototype: int cbf_construct_goniometer (cbf_handle handle,\n" - " cbf_goniometer *goniometer);\n" + "C prototype: int cbf_count_elements (cbf_handle handle,\n" + " unsigned int *elements);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_construct_goniometer constructs a goniometer object using the \n" - "description in the CBF object handle and initialises the goniometer \n" - "handle *goniometer.\n" + "cbf_count_elements sets *elements to the number of detector elements.\n" "ARGUMENTS\n" - "handle CBF handle. goniometer Pointer to the destination \n" - "goniometer handle.\n" + "handle CBF handle. elements Pointer to the destination count.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_datablockname", _wrap_cbf_handle_struct_set_datablockname, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_element_number", _wrap_cbf_handle_struct_get_element_number, METH_O, "cbf_handle_struct_get_element_number(cbf_handle_struct self)"}, + { "cbf_handle_struct_get_element_id", _wrap_cbf_handle_struct_get_element_id, METH_VARARGS, "\n" "\n" - "Returns : string\n" - "*args : \n" + "Returns : String\n" + "*args : Integer element_number\n" "\n" - "C prototype: int cbf_set_datablockname (cbf_handle handle,\n" - " const char *datablockname);\n" + "C prototype: int cbf_get_element_id (cbf_handle handle,\n" + " unsigned int element_number, const char **element_id);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_datablockname changes the name of the current data block to \n" - "datablockname. cbf_set_saveframename changes the name of the current \n" - "save frame to saveframename.\n" - "If a data block or save frame with this name already exists \n" - "(comparison is case-insensitive), the function returns CBF_IDENTICAL.\n" + "cbf_get_element_number sets element_number to a number that can be \n" + "used in other cbf_simple calls to identify the detector element \n" + "element_id and optionally the specific array_id> and \n" + "array_section_id. cbf_get_element_id sets *element_id to point to the \n" + "ASCII value of the element_number'th \n" + "\"diffrn_data_frame.detector_element_id \" entry, counting from 0. \n" + "The element_number is the ordinal of the detector element in the \n" + "DIFFRN_DETECTOR_ELEMENT category. If an array_section_id is specified \n" + "(i.e. is not NULL), the element_number is the sum of the ordinal of \n" + "the detector element plus the number of detector elements multiplied \n" + "by the ordinal of array_section_id for the specified array_id> in the \n" + "ARRAY_STRUCTURE_LIST_SECTION category.\n" + "If the detector element does not exist, the function returns \n" + "CBF_NOTFOUND.\n" + "The element_id will be valid as long as the item exists and has not \n" + "been set to a new value.\n" + "The element_id must not be modified by the program in any way.\n" "ARGUMENTS\n" - "handle CBF handle. datablockname The new data block name. \n" - "datablockname The new save frame name.\n" + "handle CBF handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. element_id Pointer to the \n" + "destination string for cbf_get_element_id, but the string itself for \n" + "cbf_get_element_number. array_id The optional array id or \n" + "NULL. array_section_id The optional array_section_id or NULL.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_element_number", _wrap_cbf_handle_struct_get_element_number, METH_VARARGS, (char *)"cbf_handle_struct_get_element_number(cbf_handle_struct self)"}, - { (char *)"cbf_handle_struct_set_crystal_id", _wrap_cbf_handle_struct_set_crystal_id, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_gain", _wrap_cbf_handle_struct_get_gain, METH_VARARGS, "\n" "\n" - "Returns : string\n" + "Returns : Float gain,Float gain_esd\n" "*args : \n" "\n" - "C prototype: int cbf_set_crystal_id (cbf_handle handle,\n" - " const char *crystal_id);\n" + "C prototype: int cbf_get_gain (cbf_handle handle, unsigned int element_number,\n" + " double *gain, double *gain_esd);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_crystal_id sets the \"diffrn.crystal_id \" entry to the \n" - "ASCII value crystal_id.\n" + "cbf_get_gain sets *gain and *gain_esd to the corresponding gain \n" + "parameters for element number element_number.\n" + "Either of the destination pointers may be NULL.\n" "ARGUMENTS\n" - "handle CBF handle. crystal_id ASCII value.\n" + "handle CBF handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. gain Pointer to the \n" + "destination gain. gain_esd Pointer to the destination \n" + "gain_esd.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_integerarray_as_string", _wrap_cbf_handle_struct_get_integerarray_as_string, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_gain", _wrap_cbf_handle_struct_set_gain, METH_VARARGS, "\n" "\n" - "Returns : (Binary)String\n" - "*args : \n" + "Returns : \n" + "*args : Float gain,Float gain_esd\n" "\n" - "C prototype: int cbf_get_integerarray (cbf_handle handle, int *binary_id,\n" - " void *array, size_t elsize, int elsigned, size_t elements,\n" - " size_t *elements_read);\n" + "C prototype: int cbf_set_gain (cbf_handle handle, unsigned int element_number,\n" + " double gain, double gain_esd);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_integerarray reads the binary value of the item at the \n" - "current column and row into an integer array. The array consists of \n" - "elements elements of elsize bytes each, starting at array. The \n" - "elements are signed if elsigned is non-0 and unsigned otherwise. \n" - "*binary_id is set to the binary section identifier and *elements_read \n" - "to the number of elements actually read. cbf_get_realarray reads the \n" - "binary value of the item at the current column and row into a real \n" - "array. The array consists of elements elements of elsize bytes each, \n" - "starting at array. *binary_id is set to the binary section identifier \n" - "and *elements_read to the number of elements actually read.\n" - "If any element in the integer binary data cant fit into the \n" - "destination element, the destination is set the nearest possible \n" - "value.\n" - "If the value is not binary, the function returns CBF_ASCII.\n" - "If the requested number of elements cant be read, the function will \n" - "read as many as it can and then return CBF_ENDOFDATA.\n" - "Currently, the destination array must consist of chars, shorts or \n" - "ints (signed or unsigned). If elsize is not equal to sizeof (char), \n" - "sizeof (short) or sizeof (int), for cbf_get_integerarray, or \n" - "sizeof(double) or sizeof(float), for cbf_get_realarray the function \n" - "returns CBF_ARGUMENT.\n" - "An additional restriction in the current version of CBFlib is that \n" - "values too large to fit in an int are not correctly decompressed. As \n" - "an example, if the machine with 32-bit ints is reading an array \n" - "containing a value outside the range 0 .. 2^32-1 (unsigned) or -2^31 \n" - ".. 2^31-1 (signed), the array will not be correctly decompressed. \n" - "This restriction will be removed in a future release. For \n" - "cbf_get_realarray, only IEEE format is supported. No conversion to \n" - "other floating point formats is done at this time.\n" + "cbf_set_gain sets the gain of element number element_number to the \n" + "values specified by gain and gain_esd.\n" "ARGUMENTS\n" - "handle CBF handle. binary_id Pointer to the \n" - "destination integer binary identifier. array Pointer to the \n" - "destination array. elsize Size in bytes of each destination \n" - "array element. elsigned Set to non-0 if the destination array \n" - "elements are signed. elements The number of elements to read. \n" - "elements_read Pointer to the destination number of elements \n" - "actually read.\n" + "handle CBF handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. gain New gain value. \n" + "gain_esd New gain_esd value.\n" "RETURN VALUE\n" - "Returns an error code on failure or 0 for success. SEE ALSO\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_3d_image", _wrap_cbf_handle_struct_set_3d_image, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_overload", _wrap_cbf_handle_struct_get_overload, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : int element_number,int compression,(binary) String data,int elsize,\n" - " int elsign,int dimslow,int dimmid,int dimfast\n" + "Returns : Float overload\n" + "*args : Integer element_number\n" "\n" - "C prototype: int cbf_set_3d_image (cbf_handle handle, unsigned int reserved,\n" - " unsigned int element_number, unsigned int compression,\n" - " void *array, size_t elsize, int elsign, size_t ndimslow,\n" - " size_t ndimmid, size_t ndimfast);\n" + "C prototype: int cbf_get_overload (cbf_handle handle,\n" + " unsigned int element_number, double *overload);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" - "array for element number element_number. The array consists of \n" - "ndimfast *ndimslow elements of elsize bytes each, starting at array. \n" - "The elements are signed if elsign is non-zero and unsigned otherwise. \n" - "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" - "write the image array for element number element_number. The array \n" - "consists of ndimfast *ndimslow IEEE double or float elements of \n" - "elsize bytes each, starting at array. cbf_set_3d_image, \n" - "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" - "for element number element_number. The array consists of ndimfast \n" - "*ndimmid *ndimslow elements of elsize bytes each, starting at array. \n" - "The elements are signed if elsign is non-0 and unsigned otherwise. \n" - "cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" - "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" - "element_number. The array consists of ndimfast *ndimmid *ndimslow \n" - "IEEE double or float elements of elsize bytes each, starting at \n" - "array.\n" - "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" - "with no suffix and the calls _sf calls give the dimensions in \n" - "slow-to-fast order\n" - "If the array is 1-dimensional, ndimslow should be the array size and \n" - "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" - "array is 2-dimensional and the 3D calls are used, ndimslow and \n" - "ndimmid should be used for the array dimensions and ndimfast should \n" - "be set to 1.\n" - "The array will be compressed using the compression scheme specifed by \n" - "compression. Currently, the available schemes are:\n" - "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" - "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" - " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" - "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" - "\"nibble_offset \" compression. CBF_NONE No compression.\n" - "The values compressed are limited to 64 bits. If any element in the \n" - "array is larger than 64 bits, the value compressed is the nearest \n" - "64-bit value.\n" - "Currently, the source array must consist of chars, shorts or ints \n" - "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" - "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" - "(int), sizeof(double) or sizeof(float), the function returns \n" - "CBF_ARGUMENT.\n" - "The parameter reserved is presently unused and should be set to 0.\n" + "cbf_get_overload sets *overload to the overload value for element \n" + "number element_number.\n" "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any value other \n" - "than 0 is invalid. element_number The number of the detector \n" - "element counting from 0 by order of appearance in the \n" - "\"diffrn_data_frame \" category. compression Compression type. \n" - "array Pointer to the image array. elsize Size in \n" - "bytes of each image array element. elsigned Set to non-0 if \n" - "the image array elements are signed. ndimslow Slowest array \n" - "dimension. ndimmid Second slowest array dimension. ndimfast \n" - " Fastest array dimension.\n" + "handle CBF handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. overload Pointer to the \n" + "destination overload.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_dictionary", _wrap_cbf_handle_struct_set_dictionary, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_overload", _wrap_cbf_handle_struct_set_overload, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : CBFHandle dictionary\n" + "*args : Integer element_number,Float overload\n" "\n" - "C prototype: int cbf_set_dictionary (cbf_handle handle,\n" - " cbf_handle dictionary_in);\n" + "C prototype: int cbf_set_overload (cbf_handle handle,\n" + " unsigned int element_number, double overload);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_dictionary sets *dictionary to the handle of a CBF which has \n" - "been associated with the CBF handle by cbf_set_dictionary. \n" - "cbf_set_dictionary associates the CBF handle dictionary_in with \n" - "handle as its dictionary. cbf_require_dictionary sets *dictionary to \n" - "the handle of a CBF which has been associated with the CBF handle by \n" - "cbf_set_dictionary or creates a new empty CBF and associates it with \n" - "handle, returning the new handle in *dictionary.\n" + "cbf_set_overload sets the overload value of element number \n" + "element_number to overload.\n" "ARGUMENTS\n" - "handle CBF handle. dictionary Pointer to CBF handle of \n" - "dictionary. dictionary_in CBF handle of dcitionary.\n" + "handle CBF handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. overload New overload value.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_find_tag_category", _wrap_cbf_handle_struct_find_tag_category, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_integration_time", _wrap_cbf_handle_struct_get_integration_time, METH_O, "\n" "\n" - "Returns : String categoryname\n" - "*args : String tagname\n" + "Returns : Float time\n" + "*args : \n" "\n" - "C prototype: int cbf_find_tag_category (cbf_handle handle,\n" - " const char* tagname, const char** categoryname);\n" + "C prototype: int cbf_get_integration_time (cbf_handle handle,\n" + " unsigned int reserved, double *time);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_find_tag_category sets categoryname to the category associated \n" - "with tagname in the dictionary associated with handle. \n" - "cbf_set_tag_category upddates the dictionary associated with handle \n" - "to indicated that tagname is in category categoryname_in.\n" + "cbf_get_integration_time sets *time to the integration time in \n" + "seconds. The parameter reserved is presently unused and should be set \n" + "to 0.\n" "ARGUMENTS\n" - "handle CBF handle. tagname tag name. \n" - "categoryname pointer to a returned category name. \n" - "categoryname_in input category name.\n" + "handle CBF handle. reserved Unused. Any value other than 0 is \n" + "invalid. time Pointer to the destination time.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_real_3d_image_sf_as_string", _wrap_cbf_handle_struct_get_real_3d_image_sf_as_string, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_integration_time", _wrap_cbf_handle_struct_set_integration_time, METH_VARARGS, "\n" "\n" - "Returns : (Binary)String\n" - "*args : int element_number,int elsize,int ndimslow,int ndimmid,int ndimfast\n" + "Returns : \n" + "*args : Float time\n" "\n" - "C prototype: int cbf_get_real_3d_image_sf (cbf_handle handle,\n" - " unsigned int reserved, unsigned int element_number,\n" - " void *array, size_t elsize, size_t ndimslow,\n" - " size_t ndimmid, size_t ndimfast);\n" + "C prototype: int cbf_set_integration_time (cbf_handle handle,\n" + " unsigned int reserved, double time);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" - "array for element number element_number into an array. The array \n" - "consists of ndimslow *ndimfast elements of elsize bytes each, \n" - "starting at array. The elements are signed if elsign is non-0 and \n" - "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" - "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" - "for element number element_number into an array. A real array is \n" - "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" - "cbf_get_3d_image_sf read the 3D image array for element number \n" - "element_number into an array. The array consists of ndimslow *ndimmid \n" - "*ndimfast elements of elsize bytes each, starting at array. The \n" - "elements are signed if elsign is non-0 and unsigned otherwise. \n" - "cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" - "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" - "floats for element number element_number into an array. A real array \n" - "is always signed.\n" - "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" - "with no suffix and the calls _sf calls give the dimensions in \n" - "slow-to-fast order\n" - "The structure of the array as a 1-, 2- or 3-dimensional array should \n" - "agree with the structure of the array given in the \n" - "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" - "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" - "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" - "being processed. If the array is 2-dimensional and a 3D call is used, \n" - "ndimslow and ndimmid should be the\n" + "cbf_set_integration_time sets the integration time in seconds to the \n" + "value specified by time. The parameter reserved is presently unused \n" + "and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any value \n" + "other than 0 is invalid. time Integration time in seconds.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_typeofvalue", _wrap_cbf_handle_struct_set_typeofvalue, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_timestamp", _wrap_cbf_handle_struct_get_timestamp, METH_O, "\n" "\n" - "Returns : string\n" + "Returns : Float time,Integer timezone\n" "*args : \n" "\n" - "C prototype: int cbf_set_typeofvalue (cbf_handle handle,\n" - " const char *typeofvalue);\n" + "C prototype: int cbf_get_timestamp (cbf_handle handle, unsigned int reserved,\n" + " double *time, int *timezone);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_typeofvalue sets the type of the item at the current column \n" - "and row to the type specified by the ASCII character string given by \n" - "typeofvalue. The strings that may be used are:\n" - " \"null \" for a null value indicated by a \". \" or a \"? \" \n" - "\"bnry \" for a binary value \"word \" for an unquoted string \n" - "\"dblq \" for a double-quoted string \"sglq \" for a single-quoted \n" - "string \"text \" for a semicolon-quoted string (multiline text \n" - "field) \"prns \" for a parenthesis-bracketed string (multiline text \n" - "field) \"brcs \" for a brace-bracketed string (multiline text field) \n" - " \"bkts \" for a square-bracket-bracketed string (multiline text \n" - "field) \"tsqs \" for a treble-single-quote quoted string (multiline \n" - "text field) \"tdqs \" for a treble-double-quote quoted string \n" - "(multiline text field)\n" - "Not all types may be used for all values. Not all types are valid for \n" - "all type of CIF files. In partcular the types \"prns \", \"brcs \", \n" - " \"bkts \" were introduced with DDLm and are not valid in DDL1 or \n" - "DDL2 CIFS. The types \"tsqs \" and \"tdqs \" are not formally part \n" - "of the CIF syntax. No changes may be made to the type of binary \n" - "values. You may not set the type of a string that contains a single \n" - "quote followed by a blank or a tab or which contains multiple lines \n" - "to \"sglq \". You may not set the type of a string that contains a \n" - "double quote followed by a blank or a tab or which contains multiple \n" - "lines to \"dblq \".\n" + "cbf_get_timestamp sets *time to the collection timestamp in seconds \n" + "since January 1 1970. *timezone is set to timezone difference from \n" + "UTC in minutes. The parameter reserved is presently unused and should \n" + "be set to 0.\n" + "Either of the destination pointers may be NULL.\n" "ARGUMENTS\n" - "handle CBF handle. typeofvalue ASCII string for desired type \n" - "of value.\n" + "handle CBF handle. reserved Unused. Any value other than 0 is \n" + "invalid. time Pointer to the destination collection timestamp. \n" + "timezone Pointer to the destination timezone difference.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_axis_rotation_axis", _wrap_cbf_handle_struct_get_axis_rotation_axis, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_timestamp", _wrap_cbf_handle_struct_set_timestamp, METH_VARARGS, "\n" "\n" - "Returns : String\n" - "*args : String axis_id\n" + "Returns : \n" + "*args : Float time,Integer timezone,Float precision\n" "\n" - "C prototype: int cbf_get_axis_rotation_axis (cbf_handle handle,\n" - " const char *axis_id, const char * *rotation_axis);\n" + "C prototype: int cbf_set_timestamp (cbf_handle handle, unsigned int reserved,\n" + " double time, int timezone, double precision);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" - "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" - "axis of index ancestor_index of axis axis_id, starting with axis_id \n" - "for ancestor_index 0.\n" - "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" - "axis_id or to \". \" if there is no such ancestor. \n" - "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" - "to \". \" if there is no such equipment. \n" - "cbf_get_axis_equipment_component sets *equipment_component to the \n" - "equipment_component of axis_id or to \". \" if there is no such \n" - "equipment_component.\n" - "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" - "components of the ofset of axis_id.\n" - "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" - "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" - "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" - "is no such rotation_axis.\n" - "cbf_get_axis_setting sets *start and *increment to the corresponding \n" - "values of the axis axis_id. Any of the destination pointers may be \n" - "NULL.\n" - "cbf_get_axis_type sets axis_type to the type of axis_id.\n" - "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" - "components of the vector of axis_id.\n" - "The parameter reserved is presently unused and should be set to 0.\n" - "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any \n" - "value other than 0 is invalid. axis_id Axis id. \n" - "ancestor_index Integer index of the desired ancestor, starting \n" - "with 0 for the current axis_id. ancestor Pointer to \n" - "destination ancestor name pointer. depends_on Pointer to \n" - "destination depends_on name pointer. equipment Pointer to \n" - "destination equipment name pointer. equipment_component Pointer to \n" - "destination equipment_component name pointer. offset1 \n" - "Pointer to destination first offset component value. offset2 \n" - " Pointer to destination second offset component value. offset3 \n" - " Pointer to destination third offset component value. \n" - "rotation Pointer to destination rotation value. \n" - "rotation_axis Pointer to destination rotation_axisn name \n" - "pointer. start Pointer to the destination start \n" - "value. increment Pointer to the destination increment \n" - "value. type Pointer to destination axis type of type \n" - ". vector1 Pointer to destination first vector component \n" - "value. vector2 Pointer to destination second vector \n" - "component value. vector3 Pointer to destination third \n" - "vector component value.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "cbf_set_timestamp sets the collection timestamp in seconds since \n" + "January 1 1970 to the value specified by time. The timezone \n" + "difference from UTC\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_integerarray_wdims", _wrap_cbf_handle_struct_set_integerarray_wdims, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_datestamp", _wrap_cbf_handle_struct_get_datestamp, METH_O, "\n" "\n" - "Returns : \n" - "*args : int compression,int binary_id,(binary) String data,int elsize,\n" - " int elsigned,int elements,String byteorder,int dimfast,int dimmid,\n" - " int dimslow,int padding\n" + "Returns : int year,int month,int day,int hour,int minute,double second,\n" + " int timezone\n" + "*args : \n" "\n" - "C prototype: int cbf_set_integerarray_wdims (cbf_handle handle,\n" - " unsigned int compression, int binary_id, void *array,\n" - " size_t elsize, int elsigned, size_t elements,\n" - " const char *byteorder, size_t dimfast, size_t dimmid,\n" - " size_t dimslow, size_t padding);\n" + "C prototype: int cbf_get_datestamp (cbf_handle handle, unsigned int reserved,\n" + " int *year, int *month, int *day, int *hour, int *minute,\n" + " double *second, int *timezone);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_integerarray sets the binary value of the item at the current \n" - "column and row to an integer array. The array consists of elements \n" - "elements of elsize bytes each, starting at array. The elements are \n" - "signed if elsigned is non-0 and unsigned otherwise. binary_id is the \n" - "binary section identifier. cbf_set_realarray sets the binary value of \n" - "the item at the current column and row to an integer array. The array \n" - "consists of elements elements of elsize bytes each, starting at \n" - "array. binary_id is the binary section identifier.\n" - "The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, \n" - "cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, \n" - "cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants \n" - "allow the data header values of byteorder, dimfast, dimmid, dimslow \n" - "and padding to be set to the data byte order, the fastest, second \n" - "fastest and third fastest array dimensions and the size in byte of \n" - "the post data padding to be used.\n" - "The array will be compressed using the compression scheme specifed by \n" - "compression. Currently, the available schemes are:\n" - "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" - "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" - " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" - " Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" - "\"nibble_offset \" compression. CBF_NONE No compression. \n" - "NOTE: This scheme is by far the slowest of the four and uses much \n" - "more disk space. It is intended for routine use with small arrays \n" - "only. With large arrays (like images) it should be used only for \n" - "debugging.\n" - "The values compressed are limited to 64 bits. If any element in the \n" - "array is larger than 64 bits, the value compressed is the nearest \n" - "64-bit value.\n" - "Currently, the source array must consist of chars, shorts or ints \n" - "(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or \n" - "floats for cbf_set_realarray. If elsize is not equal to sizeof \n" - "(char), sizeof (short) or sizeof (int), the function returns \n" - "CBF_ARGUMENT.\n" + "cbf_get_datestamp sets *year, *month, *day, *hour, *minute and \n" + "*second to the corresponding values of the collection timestamp. \n" + "*timezone is set to timezone difference from UTC in minutes. The \n" + "parameter < i>reserved is presently unused and should be set to 0.\n" + "Any of the destination pointers may be NULL.\n" "ARGUMENTS\n" - "handle CBF handle. compression Compression method to use. \n" - "binary_id Integer binary identifier. array Pointer to the \n" - "source array. elsize Size in bytes of each source array \n" - "element. elsigned Set to non-0 if the source array elements are \n" - "signed. elements: The number of elements in the array.\n" + "handle CBF handle. reserved Unused. Any value other than 0 is \n" + "invalid. year Pointer to the destination timestamp year. month \n" + " Pointer to the destination timestamp month (1-12). day \n" + "Pointer to the destination timestamp day (1-31). hour Pointer \n" + "to the destination timestamp hour (0-23). minute Pointer to the \n" + "destination timestamp minute (0-59). second Pointer to the \n" + "destination timestamp second (0-60.0). timezone Pointer to the \n" + "destination timezone difference from UTC in minutes.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_integration_time", _wrap_cbf_handle_struct_set_integration_time, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_datestamp", _wrap_cbf_handle_struct_set_datestamp, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : Float time\n" + "*args : int year,int month,int day,int hour,int minute,double second,\n" + " int timezone,Float precision\n" "\n" - "C prototype: int cbf_set_integration_time (cbf_handle handle,\n" - " unsigned int reserved, double time);\n" + "C prototype: int cbf_set_datestamp (cbf_handle handle, unsigned int reserved,\n" + " int year, int month, int day, int hour, int minute,\n" + " double second, int timezone, double precision);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_integration_time sets the integration time in seconds to the \n" - "value specified by time. The parameter reserved is presently unused \n" - "and should be set to 0.\n" - "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any value \n" - "other than 0 is invalid. time Integration time in seconds.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "cbf_set_datestamp sets the collection timestamp in seconds since \n" + "January 1 1970 to the value specified by time. The timezone \n" + "difference from UTC\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_axis_setting", _wrap_cbf_handle_struct_set_axis_setting, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_current_timestamp", _wrap_cbf_handle_struct_set_current_timestamp, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : String axis_id,Float start,Float increment\n" + "*args : Integer timezone\n" "\n" - "C prototype: int cbf_set_axis_setting (cbf_handle handle,\n" - " unsigned int reserved, const char *axis_id, double start,\n" - " double increment);\n" + "C prototype: int cbf_set_current_timestamp (cbf_handle handle,\n" + " unsigned int reserved, int timezone);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_axis_setting sets the starting and increment values of the \n" - "axis axis_id to start and increment.\n" + "cbf_set_current_timestamp sets the collection timestamp to the \n" + "current time. The timezone difference from UTC in minutes is set to \n" + "timezone. If no timezone is desired, timezone should be \n" + "CBF_NOTIMEZONE. If no timezone is used, the timest amp will be UTC. \n" "The parameter reserved is presently unused and should be set to 0.\n" + "The new timestamp will have a precision of 1 second.\n" "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any value other than 0 is \n" - "invalid. axis_id Axis id. start Start value. increment \n" - "Increment value.\n" + "handle CBF handle. reserved Unused. Any value other than 0 is \n" + "invalid. timezone Timezone difference from UTC in minutes or \n" + "CBF_NOTIMEZONE.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_real_image_as_string", _wrap_cbf_handle_struct_get_real_image_as_string, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_image_size", _wrap_cbf_handle_struct_get_image_size, METH_VARARGS, "\n" + "\n" + "Returns : size_t ndim1,size_t ndim2\n" + "*args : Integer element_number\n" + "\n" + "C prototype: int cbf_get_image_size (cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, size_t *ndimslow,\n" + " size_t *ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf \n" + "set *ndimslow and *ndimfast to the slow and fast dimensions of the \n" + "image array for element number element_number. If the array is \n" + "1-dimensional, *ndimslow will be set to the array size and *ndimfast \n" + "will be set to 1. If the array is 3-dimensional an error code will be \n" + "returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and \n" + "cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the \n" + "slowest, next fastest and fastest dimensions, respectively, of the 3D \n" + "image array for element number element_number. If the array is \n" + "1-dimensional, *ndimslow will be set to the array size and *ndimmid \n" + "and\n" + "\n" + ""}, + { "cbf_handle_struct_get_image_size_fs", _wrap_cbf_handle_struct_get_image_size_fs, METH_VARARGS, "\n" + "\n" + "Returns : size_t ndimfast,size_t ndimslow\n" + "*args : Integer element_number\n" + "\n" + "C prototype: int cbf_get_image_size_fs (cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " size_t *ndimfast, size_t *ndimslow);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf \n" + "set *ndimslow and *ndimfast to the slow and fast dimensions of the \n" + "image array for element number element_number. If the array is \n" + "1-dimensional, *ndimslow will be set to the array size and *ndimfast \n" + "will be set to 1. If the array is 3-dimensional an error code will be \n" + "returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and \n" + "cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the \n" + "slowest, next fastest and fastest dimensions, respectively, of the 3D \n" + "image array for element number element_number. If the array is \n" + "1-dimensional, *ndimslow will be set to the array size and *ndimmid \n" + "and\n" + "\n" + ""}, + { "cbf_handle_struct_get_image_size_sf", _wrap_cbf_handle_struct_get_image_size_sf, METH_VARARGS, "\n" + "\n" + "Returns : size_t ndimslow,size_t ndimfast\n" + "*args : Integer element_number\n" + "\n" + "C prototype: int cbf_get_image_size_sf (cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " size_t *ndimslow, size_t *ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf \n" + "set *ndimslow and *ndimfast to the slow and fast dimensions of the \n" + "image array for element number element_number. If the array is \n" + "1-dimensional, *ndimslow will be set to the array size and *ndimfast \n" + "will be set to 1. If the array is 3-dimensional an error code will be \n" + "returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and \n" + "cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the \n" + "slowest, next fastest and fastest dimensions, respectively, of the 3D \n" + "image array for element number element_number. If the array is \n" + "1-dimensional, *ndimslow will be set to the array size and *ndimmid \n" + "and\n" + "\n" + ""}, + { "cbf_handle_struct_get_3d_image_size", _wrap_cbf_handle_struct_get_3d_image_size, METH_VARARGS, "\n" + "\n" + "Returns : size_t ndimslow,size_t ndimmid,size_t ndimfast\n" + "*args : Integer element_number\n" + "\n" + "C prototype: int cbf_get_3d_image_size (cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " size_t *ndimslow, size_t *ndimmid, size_t *ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf \n" + "set *ndimslow and *ndimfast to the slow and fast dimensions of the \n" + "image array for element number element_number. If the array is \n" + "1-dimensional, *ndimslow will be set to the array size and *ndimfast \n" + "will be set to 1. If the array is 3-dimensional an error code will be \n" + "returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and \n" + "cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the \n" + "slowest, next fastest and fastest dimensions, respectively, of the 3D \n" + "image array for element number element_number. If the array is \n" + "1-dimensional, *ndimslow will be set to the array size and *ndimmid \n" + "and\n" + "\n" + ""}, + { "cbf_handle_struct_get_3d_image_size_fs", _wrap_cbf_handle_struct_get_3d_image_size_fs, METH_VARARGS, "cbf_handle_struct_get_3d_image_size_fs(cbf_handle_struct self, unsigned int element_number)"}, + { "cbf_handle_struct_get_3d_image_size_sf", _wrap_cbf_handle_struct_get_3d_image_size_sf, METH_VARARGS, "\n" + "\n" + "Returns : size_t ndimslow,size_t ndimmid,size_t ndimfast\n" + "*args : Integer element_number\n" + "\n" + "C prototype: int cbf_get_3d_image_size_sf (cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " size_t *ndimslow, size_t *ndimmid, size_t *ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf \n" + "set *ndimslow and *ndimfast to the slow and fast dimensions of the \n" + "image array for element number element_number. If the array is \n" + "1-dimensional, *ndimslow will be set to the array size and *ndimfast \n" + "will be set to 1. If the array is 3-dimensional an error code will be \n" + "returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and \n" + "cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the \n" + "slowest, next fastest and fastest dimensions, respectively, of the 3D \n" + "image array for element number element_number. If the array is \n" + "1-dimensional, *ndimslow will be set to the array size and *ndimmid \n" + "and\n" + "\n" + ""}, + { "cbf_handle_struct_get_image_as_string", _wrap_cbf_handle_struct_get_image_as_string, METH_VARARGS, "\n" "\n" "Returns : (Binary)String\n" - "*args : int element_number,int elsize,int ndimslow,int ndimfast\n" + "*args : int element_number,int elsize,int elsign,int ndimslow,int ndimfast\n" "\n" - "C prototype: int cbf_get_real_image (cbf_handle handle, unsigned int reserved,\n" - " unsigned int element_number, void *array, size_t elsize,\n" - " size_t ndimslow, size_t ndimfast);\n" + "C prototype: int cbf_get_image (cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, void *array, size_t elsize,\n" + " int elsign, size_t ndimslow, size_t ndimfast);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" @@ -26301,77 +25537,53 @@ static PyMethodDef SwigMethods[] = { "ndimslow and ndimmid should be the\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_axis_ancestor", _wrap_cbf_handle_struct_get_axis_ancestor, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_image_fs_as_string", _wrap_cbf_handle_struct_get_image_fs_as_string, METH_VARARGS, "\n" "\n" - "Returns : String\n" - "*args : String axis_id,Integer ancestor_index\n" + "Returns : (Binary)String\n" + "*args : int element_number,int elsize,int elsign,int ndimfast,int ndimslow\n" "\n" - "C prototype: int cbf_get_axis_ancestor (cbf_handle handle,\n" - " const char *axis_id, const unsigned int ancestor_index,\n" - " const char * *ancestor);\n" + "C prototype: int cbf_get_image_fs (cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, void *array, size_t elsize,\n" + " int elsign, size_t ndimfast, size_t ndimslow);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" - "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" - "axis of index ancestor_index of axis axis_id, starting with axis_id \n" - "for ancestor_index 0.\n" - "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" - "axis_id or to \". \" if there is no such ancestor. \n" - "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" - "to \". \" if there is no such equipment. \n" - "cbf_get_axis_equipment_component sets *equipment_component to the \n" - "equipment_component of axis_id or to \". \" if there is no such \n" - "equipment_component.\n" - "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" - "components of the ofset of axis_id.\n" - "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" - "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" - "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" - "is no such rotation_axis.\n" - "cbf_get_axis_setting sets *start and *increment to the corresponding \n" - "values of the axis axis_id. Any of the destination pointers may be \n" - "NULL.\n" - "cbf_get_axis_type sets axis_type to the type of axis_id.\n" - "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" - "components of the vector of axis_id.\n" - "The parameter reserved is presently unused and should be set to 0.\n" - "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any \n" - "value other than 0 is invalid. axis_id Axis id. \n" - "ancestor_index Integer index of the desired ancestor, starting \n" - "with 0 for the current axis_id. ancestor Pointer to \n" - "destination ancestor name pointer. depends_on Pointer to \n" - "destination depends_on name pointer. equipment Pointer to \n" - "destination equipment name pointer. equipment_component Pointer to \n" - "destination equipment_component name pointer. offset1 \n" - "Pointer to destination first offset component value. offset2 \n" - " Pointer to destination second offset component value. offset3 \n" - " Pointer to destination third offset component value. \n" - "rotation Pointer to destination rotation value. \n" - "rotation_axis Pointer to destination rotation_axisn name \n" - "pointer. start Pointer to the destination start \n" - "value. increment Pointer to the destination increment \n" - "value. type Pointer to destination axis type of type \n" - ". vector1 Pointer to destination first vector component \n" - "value. vector2 Pointer to destination second vector \n" - "component value. vector3 Pointer to destination third \n" - "vector component value.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" + "array for element number element_number into an array. The array \n" + "consists of ndimslow *ndimfast elements of elsize bytes each, \n" + "starting at array. The elements are signed if elsign is non-0 and \n" + "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" + "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" + "for element number element_number into an array. A real array is \n" + "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" + "cbf_get_3d_image_sf read the 3D image array for element number \n" + "element_number into an array. The array consists of ndimslow *ndimmid \n" + "*ndimfast elements of elsize bytes each, starting at array. The \n" + "elements are signed if elsign is non-0 and unsigned otherwise. \n" + "cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" + "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" + "floats for element number element_number into an array. A real array \n" + "is always signed.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "The structure of the array as a 1-, 2- or 3-dimensional array should \n" + "agree with the structure of the array given in the \n" + "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" + "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" + "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" + "being processed. If the array is 2-dimensional and a 3D call is used, \n" + "ndimslow and ndimmid should be the\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_3d_image_sf_as_string", _wrap_cbf_handle_struct_get_3d_image_sf_as_string, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_image_sf_as_string", _wrap_cbf_handle_struct_get_image_sf_as_string, METH_VARARGS, "\n" "\n" "Returns : (Binary)String\n" - "*args : int element_number,int elsize,int elsign,int ndimslow,int ndimmid,\n" - " int ndimfast\n" + "*args : int element_number,int elsize,int elsign,int ndimslow,int ndimfast\n" "\n" - "C prototype: int cbf_get_3d_image_sf (cbf_handle handle,\n" - " unsigned int reserved, unsigned int element_number,\n" - " void *array, size_t elsize, int elsign, size_t ndimslow,\n" - " size_t ndimmid, size_t ndimfast);\n" + "C prototype: int cbf_get_image_sf (cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, void *array, size_t elsize,\n" + " int elsign, size_t ndimslow, size_t ndimfast);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" @@ -26403,421 +25615,378 @@ static PyMethodDef SwigMethods[] = { "ndimslow and ndimmid should be the\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_real_image_fs", _wrap_cbf_handle_struct_set_real_image_fs, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_real_image_as_string", _wrap_cbf_handle_struct_get_real_image_as_string, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : int element_number,int compression,(binary) String data,int elsize,\n" - " int dimfast,int dimslow\n" + "Returns : (Binary)String\n" + "*args : int element_number,int elsize,int ndimslow,int ndimfast\n" "\n" - "C prototype: int cbf_set_real_image_fs(cbf_handle handle,\n" - " unsigned int reserved, unsigned int element_number,\n" - " unsigned int compression, void *array,size_t elsize,\n" - " size_t ndimfast, size_t ndimslow);\n" + "C prototype: int cbf_get_real_image (cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, void *array, size_t elsize,\n" + " size_t ndimslow, size_t ndimfast);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" - "array for element number element_number. The array consists of \n" - "ndimfast *ndimslow elements of elsize bytes each, starting at array. \n" - "The elements are signed if elsign is non-zero and unsigned otherwise. \n" - "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" - "write the image array for element number element_number. The array \n" - "consists of ndimfast *ndimslow IEEE double or float elements of \n" - "elsize bytes each, starting at array. cbf_set_3d_image, \n" - "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" - "for element number element_number. The array consists of ndimfast \n" - "*ndimmid *ndimslow elements of elsize bytes each, starting at array. \n" - "The elements are signed if elsign is non-0 and unsigned otherwise. \n" - "cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" - "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" - "element_number. The array consists of ndimfast *ndimmid *ndimslow \n" - "IEEE double or float elements of elsize bytes each, starting at \n" - "array.\n" + "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" + "array for element number element_number into an array. The array \n" + "consists of ndimslow *ndimfast elements of elsize bytes each, \n" + "starting at array. The elements are signed if elsign is non-0 and \n" + "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" + "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" + "for element number element_number into an array. A real array is \n" + "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" + "cbf_get_3d_image_sf read the 3D image array for element number \n" + "element_number into an array. The array consists of ndimslow *ndimmid \n" + "*ndimfast elements of elsize bytes each, starting at array. The \n" + "elements are signed if elsign is non-0 and unsigned otherwise. \n" + "cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" + "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" + "floats for element number element_number into an array. A real array \n" + "is always signed.\n" "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" "with no suffix and the calls _sf calls give the dimensions in \n" "slow-to-fast order\n" - "If the array is 1-dimensional, ndimslow should be the array size and \n" - "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" - "array is 2-dimensional and the 3D calls are used, ndimslow and \n" - "ndimmid should be used for the array dimensions and ndimfast should \n" - "be set to 1.\n" - "The array will be compressed using the compression scheme specifed by \n" - "compression. Currently, the available schemes are:\n" - "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" - "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" - " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" - "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" - "\"nibble_offset \" compression. CBF_NONE No compression.\n" - "The values compressed are limited to 64 bits. If any element in the \n" - "array is larger than 64 bits, the value compressed is the nearest \n" - "64-bit value.\n" - "Currently, the source array must consist of chars, shorts or ints \n" - "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" - "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" - "(int), sizeof(double) or sizeof(float), the function returns \n" - "CBF_ARGUMENT.\n" - "The parameter reserved is presently unused and should be set to 0.\n" - "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any value other \n" - "than 0 is invalid. element_number The number of the detector \n" - "element counting from 0 by order of appearance in the \n" - "\"diffrn_data_frame \" category. compression Compression type. \n" - "array Pointer to the image array. elsize Size in \n" - "bytes of each image array element. elsigned Set to non-0 if \n" - "the image array elements are signed. ndimslow Slowest array \n" - "dimension. ndimmid Second slowest array dimension. ndimfast \n" - " Fastest array dimension.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_get_overload", _wrap_cbf_handle_struct_get_overload, METH_VARARGS, (char *)"\n" - "\n" - "Returns : Float overload\n" - "*args : Integer element_number\n" - "\n" - "C prototype: int cbf_get_overload (cbf_handle handle,\n" - " unsigned int element_number, double *overload);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_get_overload sets *overload to the overload value for element \n" - "number element_number.\n" - "ARGUMENTS\n" - "handle CBF handle. element_number The number of the \n" - "detector element counting from 0 by order of appearance in the \n" - "\"diffrn_data_frame \" category. overload Pointer to the \n" - "destination overload.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_get_wavelength", _wrap_cbf_handle_struct_get_wavelength, METH_VARARGS, (char *)"\n" - "\n" - "Returns : double\n" - "*args : \n" - "\n" - "C prototype: int cbf_get_wavelength (cbf_handle handle, double *wavelength);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_get_wavelength sets *wavelength to the current wavelength in AA.\n" - "ARGUMENTS\n" - "handle CBF handle. wavelength Pointer to the destination.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_next_datablock", _wrap_cbf_handle_struct_next_datablock, METH_VARARGS, (char *)"\n" - "\n" - "Returns : \n" - "*args : \n" - "\n" - "C prototype: int cbf_next_datablock (cbf_handle handle);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_next_datablock makes the data block following the current data \n" - "block the current data block.\n" - "If there are no more data blocks, the function returns CBF_NOTFOUND.\n" - "The current category becomes undefined.\n" - "ARGUMENTS\n" - "handle CBF handle.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_get_realarrayparameters_wdims", _wrap_cbf_handle_struct_get_realarrayparameters_wdims, METH_VARARGS, (char *)"\n" - "\n" - "Returns : int compression,int binary_id,int elsize,int elements,char **bo,\n" - " int *bolen,int dimfast,int dimmid,int dimslow,int padding\n" - "*args : \n" - "\n" - "C prototype: int cbf_get_realarrayparameters_wdims (cbf_handle handle,\n" - " unsigned int *compression, int *binary_id, size_t *elsize,\n" - " size_t *elements, const char **byteorder, size_t *dimfast,\n" - " size_t *dimmid, size_t *dimslow, size_t *padding);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_get_integerarrayparameters sets *compression, *binary_id, \n" - "*elsize, *elsigned, *elunsigned, *elements, *minelement and \n" - "*maxelement to values read from the binary value of the item at the \n" - "current column and row. This provides all the arguments needed for a \n" - "subsequent call to cbf_set_integerarray, if a copy of the array is to \n" - "be made into another CIF or CBF. cbf_get_realarrayparameters sets \n" - "*compression, *binary_id, *elsize, *elements to values read from the \n" - "binary value of the item at the current column and row. This provides \n" - "all the arguments needed for a subsequent call to cbf_set_realarray, \n" - "if a copy of the arry is to be made into another CIF or CBF.\n" - "The variants cbf_get_integerarrayparameters_wdims, \n" - "cbf_get_integerarrayparameters_wdims_fs, \n" - "cbf_get_integerarrayparameters_wdims_sf, \n" - "cbf_get_realarrayparameters_wdims, \n" - "cbf_get_realarrayparameters_wdims_fs, \n" - "cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, \n" - "*dimmid, *dimslow, and *padding as well, providing the additional \n" - "parameters needed for a subsequent call to cbf_set_integerarray_wdims \n" - "or cbf_set_realarray_wdims.\n" - "The value returned in *byteorder is a pointer either to the string \n" - "\"little_endian \" or to the string \"big_endian \". This should be \n" - "the byte order of the data, not necessarily of the host machine. No \n" - "attempt should be made to modify this string. At this time only \n" - "\"little_endian \" will be returned.\n" - "The values returned in *dimfast, *dimmid and *dimslow are the sizes \n" - "of the fastest changing, second fastest changing and third fastest \n" - "changing dimensions of the array, if specified, or zero, if not \n" - "specified.\n" - "The value returned in *padding is the size of the post-data padding, \n" - "if any and if specified in the data header. The value is given as a \n" - "count of octets.\n" - "If the value is not binary, the function returns CBF_ASCII.\n" - "ARGUMENTS\n" - "handle CBF handle. compression Compression method used. \n" - "elsize Size in bytes of each array element. binary_id \n" - "Pointer to the destination integer binary identifier. elsigned \n" - "Pointer to an integer. Set to 1 if the elements can be read as signed \n" - "integers. elunsigned Pointer to an integer. Set to 1 if the \n" - "elements can be read as unsigned integers. elements Pointer to \n" - "the destination number of elements. minelement Pointer to the \n" - "destination smallest element. maxelement Pointer to the \n" - "destination largest element. byteorder Pointer to the destination \n" - "byte order. dimfast Pointer to the destination fastest \n" - "dimension. dimmid Pointer to the destination second fastest \n" - "dimension. dimslow Pointer to the destination third fastest \n" - "dimension. padding Pointer to the destination padding size.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "The structure of the array as a 1-, 2- or 3-dimensional array should \n" + "agree with the structure of the array given in the \n" + "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" + "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" + "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" + "being processed. If the array is 2-dimensional and a 3D call is used, \n" + "ndimslow and ndimmid should be the\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_orientation_matrix", _wrap_cbf_handle_struct_set_orientation_matrix, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_real_image_fs_as_string", _wrap_cbf_handle_struct_get_real_image_fs_as_string, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : Float matrix_0,Float matrix_1,Float matrix_2,Float matrix_3,\n" - " Float matrix_4,Float matrix_5,Float matrix_6,Float matrix_7,\n" - " Float matrix_8\n" + "Returns : (Binary)String\n" + "*args : int element_number,int elsize,int ndimfast,int ndimslow\n" "\n" - "C prototype: int cbf_set_orientation_matrix (cbf_handle handle,\n" - " double ub_matrix[9]);\n" + "C prototype: int cbf_get_real_image_fs (cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " void *array, size_t elsize, size_t ndimfast,\n" + " size_t ndimslow);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_orientation_matrix sets ub_matrix to point to the array of \n" - "orientation matrix entries in the \"diffrn \" category in the order \n" - "of columns:\n" - " \"UB[1][1] \" \"UB[1][2] \" \"UB[1][3] \" \"UB[2][1] \" \n" - "\"UB[2][2] \" \"UB[2][3] \" \"UB[3][1] \" \"UB[3][2] \" \n" - "\"UB[3][3] \"\n" - "cbf_set_orientation_matrix sets the values in the \"diffrn \" \n" - "category to the values pointed to by ub_matrix.\n" - "ARGUMENTS\n" - "handle CBF handle. ubmatric Source or destination array of 9 \n" - "doubles giving the orientation matrix parameters.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" + "array for element number element_number into an array. The array \n" + "consists of ndimslow *ndimfast elements of elsize bytes each, \n" + "starting at array. The elements are signed if elsign is non-0 and \n" + "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" + "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" + "for element number element_number into an array. A real array is \n" + "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" + "cbf_get_3d_image_sf read the 3D image array for element number \n" + "element_number into an array. The array consists of ndimslow *ndimmid \n" + "*ndimfast elements of elsize bytes each, starting at array. The \n" + "elements are signed if elsign is non-0 and unsigned otherwise. \n" + "cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" + "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" + "floats for element number element_number into an array. A real array \n" + "is always signed.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "The structure of the array as a 1-, 2- or 3-dimensional array should \n" + "agree with the structure of the array given in the \n" + "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" + "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" + "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" + "being processed. If the array is 2-dimensional and a 3D call is used, \n" + "ndimslow and ndimmid should be the\n" "\n" ""}, - { (char *)"cbf_handle_struct_new_category", _wrap_cbf_handle_struct_new_category, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_real_image_sf_as_string", _wrap_cbf_handle_struct_get_real_image_sf_as_string, METH_VARARGS, "\n" "\n" - "Returns : string\n" - "*args : \n" + "Returns : (Binary)String\n" + "*args : int element_number,int elsize,int ndimslow,int ndimfast\n" "\n" - "C prototype: int cbf_new_category (cbf_handle handle,\n" - " const char *categoryname);\n" + "C prototype: int cbf_get_real_image_sf (cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " void *array, size_t elsize, size_t ndimslow,\n" + " size_t ndimfast);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_new_category creates a new category in the current data block \n" - "with name categoryname and makes it the current category.\n" - "If a category with this name already exists, the existing category \n" - "becomes the current category.\n" - "ARGUMENTS\n" - "handle CBF handle. categoryname The name of the new \n" - "category.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" + "array for element number element_number into an array. The array \n" + "consists of ndimslow *ndimfast elements of elsize bytes each, \n" + "starting at array. The elements are signed if elsign is non-0 and \n" + "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" + "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" + "for element number element_number into an array. A real array is \n" + "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" + "cbf_get_3d_image_sf read the 3D image array for element number \n" + "element_number into an array. The array consists of ndimslow *ndimmid \n" + "*ndimfast elements of elsize bytes each, starting at array. The \n" + "elements are signed if elsign is non-0 and unsigned otherwise. \n" + "cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" + "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" + "floats for element number element_number into an array. A real array \n" + "is always signed.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "The structure of the array as a 1-, 2- or 3-dimensional array should \n" + "agree with the structure of the array given in the \n" + "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" + "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" + "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" + "being processed. If the array is 2-dimensional and a 3D call is used, \n" + "ndimslow and ndimmid should be the\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_gain", _wrap_cbf_handle_struct_set_gain, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_3d_image_as_string", _wrap_cbf_handle_struct_get_3d_image_as_string, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : Float gain,Float gain_esd\n" + "Returns : (Binary)String\n" + "*args : int element_number,int elsize,int elsign,int ndimslow,int ndimmid,\n" + " int ndimfast\n" "\n" - "C prototype: int cbf_set_gain (cbf_handle handle, unsigned int element_number,\n" - " double gain, double gain_esd);\n" + "C prototype: int cbf_get_3d_image (cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, void *array, size_t elsize,\n" + " int elsign, size_t ndimslow, size_t ndimmid,\n" + " size_t ndimfast);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_gain sets the gain of element number element_number to the \n" - "values specified by gain and gain_esd.\n" - "ARGUMENTS\n" - "handle CBF handle. element_number The number of the \n" - "detector element counting from 0 by order of appearance in the \n" - "\"diffrn_data_frame \" category. gain New gain value. \n" - "gain_esd New gain_esd value.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" + "array for element number element_number into an array. The array \n" + "consists of ndimslow *ndimfast elements of elsize bytes each, \n" + "starting at array. The elements are signed if elsign is non-0 and \n" + "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" + "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" + "for element number element_number into an array. A real array is \n" + "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" + "cbf_get_3d_image_sf read the 3D image array for element number \n" + "element_number into an array. The array consists of ndimslow *ndimmid \n" + "*ndimfast elements of elsize bytes each, starting at array. The \n" + "elements are signed if elsign is non-0 and unsigned otherwise. \n" + "cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" + "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" + "floats for element number element_number into an array. A real array \n" + "is always signed.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "The structure of the array as a 1-, 2- or 3-dimensional array should \n" + "agree with the structure of the array given in the \n" + "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" + "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" + "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" + "being processed. If the array is 2-dimensional and a 3D call is used, \n" + "ndimslow and ndimmid should be the\n" "\n" ""}, - { (char *)"cbf_handle_struct_find_column", _wrap_cbf_handle_struct_find_column, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_3d_image_fs_as_string", _wrap_cbf_handle_struct_get_3d_image_fs_as_string, METH_VARARGS, "\n" "\n" - "Returns : string\n" - "*args : \n" + "Returns : (Binary)String\n" + "*args : int element_number,int elsize,int elsign,int ndimfast,int ndimmid,\n" + " int ndimslow\n" "\n" - "C prototype: int cbf_find_column (cbf_handle handle, const char *columnname);\n" + "C prototype: int cbf_get_3d_image_fs (cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " void *array, size_t elsize, int elsign, size_t ndimfast,\n" + " size_t ndimmid, size_t ndimslow);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_find_column makes the columns in the current category with name \n" - "columnname the current column.\n" - "The comparison is case-insensitive.\n" - "If the column does not exist, the function returns CBF_NOTFOUND.\n" - "The current row is not affected.\n" - "ARGUMENTS\n" - "handle CBF handle. columnname The name of column to find.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" + "array for element number element_number into an array. The array \n" + "consists of ndimslow *ndimfast elements of elsize bytes each, \n" + "starting at array. The elements are signed if elsign is non-0 and \n" + "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" + "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" + "for element number element_number into an array. A real array is \n" + "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" + "cbf_get_3d_image_sf read the 3D image array for element number \n" + "element_number into an array. The array consists of ndimslow *ndimmid \n" + "*ndimfast elements of elsize bytes each, starting at array. The \n" + "elements are signed if elsign is non-0 and unsigned otherwise. \n" + "cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" + "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" + "floats for element number element_number into an array. A real array \n" + "is always signed.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "The structure of the array as a 1-, 2- or 3-dimensional array should \n" + "agree with the structure of the array given in the \n" + "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" + "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" + "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" + "being processed. If the array is 2-dimensional and a 3D call is used, \n" + "ndimslow and ndimmid should be the\n" "\n" ""}, - { (char *)"cbf_handle_struct_remove_category", _wrap_cbf_handle_struct_remove_category, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_3d_image_sf_as_string", _wrap_cbf_handle_struct_get_3d_image_sf_as_string, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : \n" + "Returns : (Binary)String\n" + "*args : int element_number,int elsize,int elsign,int ndimslow,int ndimmid,\n" + " int ndimfast\n" "\n" - "C prototype: int cbf_remove_category (cbf_handle handle);\n" + "C prototype: int cbf_get_3d_image_sf (cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " void *array, size_t elsize, int elsign, size_t ndimslow,\n" + " size_t ndimmid, size_t ndimfast);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_remove_category deletes the current category.\n" - "The current category becomes undefined.\n" - "ARGUMENTS\n" - "handle CBF handle.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" + "array for element number element_number into an array. The array \n" + "consists of ndimslow *ndimfast elements of elsize bytes each, \n" + "starting at array. The elements are signed if elsign is non-0 and \n" + "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" + "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" + "for element number element_number into an array. A real array is \n" + "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" + "cbf_get_3d_image_sf read the 3D image array for element number \n" + "element_number into an array. The array consists of ndimslow *ndimmid \n" + "*ndimfast elements of elsize bytes each, starting at array. The \n" + "elements are signed if elsign is non-0 and unsigned otherwise. \n" + "cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" + "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" + "floats for element number element_number into an array. A real array \n" + "is always signed.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "The structure of the array as a 1-, 2- or 3-dimensional array should \n" + "agree with the structure of the array given in the \n" + "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" + "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" + "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" + "being processed. If the array is 2-dimensional and a 3D call is used, \n" + "ndimslow and ndimmid should be the\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_integerarrayparameters_wdims_sf", _wrap_cbf_handle_struct_get_integerarrayparameters_wdims_sf, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_real_3d_image_as_string", _wrap_cbf_handle_struct_get_real_3d_image_as_string, METH_VARARGS, "\n" "\n" - "Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned,\n" - " int elements,int minelement,int maxelement,char **bo,int *bolen,\n" - " int dimslow,int dimmid,int dimfast,int padding\n" - "*args : \n" + "Returns : (Binary)String\n" + "*args : int element_number,int elsize,int ndimslow,int ndimmid,int ndimfast\n" "\n" - "C prototype: int cbf_get_integerarrayparameters_wdims_sf (cbf_handle handle,\n" - " unsigned int *compression, int *binary_id, size_t *elsize,\n" - " int *elsigned, int *elunsigned, size_t *elements,\n" - " int *minelement, int *maxelement, const char **byteorder,\n" - " size_t *dimslow, size_t *dimmid, size_t *dimfast,\n" - " size_t *padding);\n" + "C prototype: int cbf_get_real_3d_image (cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " void *array, size_t elsize, size_t ndimslow,\n" + " size_t ndimmid, size_t ndimfast);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_integerarrayparameters sets *compression, *binary_id, \n" - "*elsize, *elsigned, *elunsigned, *elements, *minelement and \n" - "*maxelement to values read from the binary value of the item at the \n" - "current column and row. This provides all the arguments needed for a \n" - "subsequent call to cbf_set_integerarray, if a copy of the array is to \n" - "be made into another CIF or CBF. cbf_get_realarrayparameters sets \n" - "*compression, *binary_id, *elsize, *elements to values read from the \n" - "binary value of the item at the current column and row. This provides \n" - "all the arguments needed for a subsequent call to cbf_set_realarray, \n" - "if a copy of the arry is to be made into another CIF or CBF.\n" - "The variants cbf_get_integerarrayparameters_wdims, \n" - "cbf_get_integerarrayparameters_wdims_fs, \n" - "cbf_get_integerarrayparameters_wdims_sf, \n" - "cbf_get_realarrayparameters_wdims, \n" - "cbf_get_realarrayparameters_wdims_fs, \n" - "cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, \n" - "*dimmid, *dimslow, and *padding as well, providing the additional \n" - "parameters needed for a subsequent call to cbf_set_integerarray_wdims \n" - "or cbf_set_realarray_wdims.\n" - "The value returned in *byteorder is a pointer either to the string \n" - "\"little_endian \" or to the string \"big_endian \". This should be \n" - "the byte order of the data, not necessarily of the host machine. No \n" - "attempt should be made to modify this string. At this time only \n" - "\"little_endian \" will be returned.\n" - "The values returned in *dimfast, *dimmid and *dimslow are the sizes \n" - "of the fastest changing, second fastest changing and third fastest \n" - "changing dimensions of the array, if specified, or zero, if not \n" - "specified.\n" - "The value returned in *padding is the size of the post-data padding, \n" - "if any and if specified in the data header. The value is given as a \n" - "count of octets.\n" - "If the value is not binary, the function returns CBF_ASCII.\n" - "ARGUMENTS\n" - "handle CBF handle. compression Compression method used. \n" - "elsize Size in bytes of each array element. binary_id \n" - "Pointer to the destination integer binary identifier. elsigned \n" - "Pointer to an integer. Set to 1 if the elements can be read as signed \n" - "integers. elunsigned Pointer to an integer. Set to 1 if the \n" - "elements can be read as unsigned integers. elements Pointer to \n" - "the destination number of elements. minelement Pointer to the \n" - "destination smallest element. maxelement Pointer to the \n" - "destination largest element. byteorder Pointer to the destination \n" - "byte order. dimfast Pointer to the destination fastest \n" - "dimension. dimmid Pointer to the destination second fastest \n" - "dimension. dimslow Pointer to the destination third fastest \n" - "dimension. padding Pointer to the destination padding size.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" + "array for element number element_number into an array. The array \n" + "consists of ndimslow *ndimfast elements of elsize bytes each, \n" + "starting at array. The elements are signed if elsign is non-0 and \n" + "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" + "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" + "for element number element_number into an array. A real array is \n" + "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" + "cbf_get_3d_image_sf read the 3D image array for element number \n" + "element_number into an array. The array consists of ndimslow *ndimmid \n" + "*ndimfast elements of elsize bytes each, starting at array. The \n" + "elements are signed if elsign is non-0 and unsigned otherwise. \n" + "cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" + "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" + "floats for element number element_number into an array. A real array \n" + "is always signed.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "The structure of the array as a 1-, 2- or 3-dimensional array should \n" + "agree with the structure of the array given in the \n" + "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" + "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" + "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" + "being processed. If the array is 2-dimensional and a 3D call is used, \n" + "ndimslow and ndimmid should be the\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_pixel_size", _wrap_cbf_handle_struct_get_pixel_size, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_real_3d_image_fs_as_string", _wrap_cbf_handle_struct_get_real_3d_image_fs_as_string, METH_VARARGS, "\n" "\n" - "Returns : Float pixel_size\n" - "*args : Int element_number,Int axis_number\n" + "Returns : (Binary)String\n" + "*args : int element_number,int elsize,int ndimfast,int ndimmid,int ndimslow\n" "\n" - "C prototype: int cbf_get_pixel_size (cbf_handle handle,\n" - " unsigned int element_number, int axis_number,\n" - " double *psize);\n" + "C prototype: int cbf_get_real_3d_image_fs (cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " void *array, size_t elsize, size_t ndimfast,\n" + " size_t ndimmid, size_t ndimslow);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to \n" - "the double value in millimeters of the axis axis_number of the \n" - "detector element element_number. The axis_number is numbered from 1, \n" - "starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to \n" - "point to the double value in millimeters of the axis axis_number of \n" - "the detector element element_number. The axis_number is numbered from \n" - "1, starting with the fastest axis.\n" - "If a negative axis number is given, the order of axes is reversed, so \n" - "that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the \n" - "fastest axis for cbf_get_pixel_size_sf.\n" - "If the pixel size is not given explcitly in the \"array_element_size \n" - "\" category, the function returns CBF_NOTFOUND.\n" - "ARGUMENTS\n" - "handle CBF handle. element_number The number of the \n" - "detector element counting from 0 by order of appearance in the \n" - "\"diffrn_data_frame \" category. axis_number The number of the \n" - "axis, starting from 1 for the fastest for cbf_get_pixel_size and \n" - "cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. \n" - "psize Pointer to the destination pixel size.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" + "array for element number element_number into an array. The array \n" + "consists of ndimslow *ndimfast elements of elsize bytes each, \n" + "starting at array. The elements are signed if elsign is non-0 and \n" + "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" + "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" + "for element number element_number into an array. A real array is \n" + "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" + "cbf_get_3d_image_sf read the 3D image array for element number \n" + "element_number into an array. The array consists of ndimslow *ndimmid \n" + "*ndimfast elements of elsize bytes each, starting at array. The \n" + "elements are signed if elsign is non-0 and unsigned otherwise. \n" + "cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" + "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" + "floats for element number element_number into an array. A real array \n" + "is always signed.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "The structure of the array as a 1-, 2- or 3-dimensional array should \n" + "agree with the structure of the array given in the \n" + "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" + "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" + "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" + "being processed. If the array is 2-dimensional and a 3D call is used, \n" + "ndimslow and ndimmid should be the\n" + "\n" + ""}, + { "cbf_handle_struct_get_real_3d_image_sf_as_string", _wrap_cbf_handle_struct_get_real_3d_image_sf_as_string, METH_VARARGS, "\n" + "\n" + "Returns : (Binary)String\n" + "*args : int element_number,int elsize,int ndimslow,int ndimmid,int ndimfast\n" + "\n" + "C prototype: int cbf_get_real_3d_image_sf (cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " void *array, size_t elsize, size_t ndimslow,\n" + " size_t ndimmid, size_t ndimfast);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" + "array for element number element_number into an array. The array \n" + "consists of ndimslow *ndimfast elements of elsize bytes each, \n" + "starting at array. The elements are signed if elsign is non-0 and \n" + "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" + "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" + "for element number element_number into an array. A real array is \n" + "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" + "cbf_get_3d_image_sf read the 3D image array for element number \n" + "element_number into an array. The array consists of ndimslow *ndimmid \n" + "*ndimfast elements of elsize bytes each, starting at array. The \n" + "elements are signed if elsign is non-0 and unsigned otherwise. \n" + "cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" + "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" + "floats for element number element_number into an array. A real array \n" + "is always signed.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "The structure of the array as a 1-, 2- or 3-dimensional array should \n" + "agree with the structure of the array given in the \n" + "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" + "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" + "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" + "being processed. If the array is 2-dimensional and a 3D call is used, \n" + "ndimslow and ndimmid should be the\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_real_image_sf", _wrap_cbf_handle_struct_set_real_image_sf, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_image", _wrap_cbf_handle_struct_set_image, METH_VARARGS, "\n" "\n" "Returns : \n" "*args : int element_number,int compression,(binary) String data,int elsize,\n" - " int dimslow,int dimfast\n" + " int elsign,int dimslow,int dimfast\n" "\n" - "C prototype: int cbf_set_real_image_sf(cbf_handle handle,\n" - " unsigned int reserved, unsigned int element_number,\n" - " unsigned int compression, void *array,size_t elsize,\n" - " size_t ndimslow, size_t ndimfast);\n" + "C prototype: int cbf_set_image (cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, unsigned int compression,\n" + " void *array, size_t elsize, int elsign, size_t ndimslow,\n" + " size_t ndimfast);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" @@ -26848,296 +26017,252 @@ static PyMethodDef SwigMethods[] = { "be set to 1.\n" "The array will be compressed using the compression scheme specifed by \n" "compression. Currently, the available schemes are:\n" - "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" - "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" - " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" - "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" - "\"nibble_offset \" compression. CBF_NONE No compression.\n" - "The values compressed are limited to 64 bits. If any element in the \n" - "array is larger than 64 bits, the value compressed is the nearest \n" - "64-bit value.\n" - "Currently, the source array must consist of chars, shorts or ints \n" - "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" - "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" - "(int), sizeof(double) or sizeof(float), the function returns \n" - "CBF_ARGUMENT.\n" - "The parameter reserved is presently unused and should be set to 0.\n" - "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any value other \n" - "than 0 is invalid. element_number The number of the detector \n" - "element counting from 0 by order of appearance in the \n" - "\"diffrn_data_frame \" category. compression Compression type. \n" - "array Pointer to the image array. elsize Size in \n" - "bytes of each image array element. elsigned Set to non-0 if \n" - "the image array elements are signed. ndimslow Slowest array \n" - "dimension. ndimmid Second slowest array dimension. ndimfast \n" - " Fastest array dimension.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_require_category", _wrap_cbf_handle_struct_require_category, METH_VARARGS, (char *)"\n" - "\n" - "Returns : string\n" - "*args : \n" - "\n" - "C prototype: int cbf_require_category (cbf_handle handle,\n" - " const char *categoryname);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_rewuire_category makes the category in the current data block \n" - "with name categoryname the current category, if it exists, or creates \n" - "the catagory if it does not exist.\n" - "The comparison is case-insensitive.\n" - "The current column and row become undefined.\n" - "ARGUMENTS\n" - "handle CBF handle. categoryname The name of the category to \n" - "find.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_get_reciprocal_cell", _wrap_cbf_handle_struct_get_reciprocal_cell, METH_VARARGS, (char *)"\n" - "\n" - "Returns : Float astar,Float bstar,Float cstar,Float alphastar,Float betastar,\n" - " Float gammastar\n" - "*args : \n" - "\n" - "C prototype: int cbf_get_reciprocal_cell (cbf_handle handle, double cell[6],\n" - " double cell_esd[6] );\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_get_reciprocal_cell sets cell[0:2] to the double values of the \n" - "reciprocal cell edge lengths a*, b* and c* in AAngstroms-1, cell[3:5] \n" - "to the double values of the reciprocal cell angles a*, b* and g* in \n" - "degrees, cell_esd[0:2] to the double values of the estimated \n" - "strandard deviations of the reciprocal cell edge lengths a*, b* and \n" - "c* in AAngstroms-1, cell_esd[3:5] to the double values of the \n" - "estimated standard deviations of the the reciprocal cell angles a*, \n" - "b* and g* in degrees.\n" - "The values returned are retrieved from the first row of the \"cell \n" - "\" category. The value of \"_cell.entry_id \" is ignored.\n" - "cell or cell_esd may be NULL.\n" - "If cell is NULL, the reciprocal cell parameters are not retrieved.\n" - "If cell_esd is NULL, the reciprocal cell parameter esds are not \n" - "retrieved.\n" - "If the \"cell \" category is present, but some of the values are \n" - "missing, zeros are returned for the missing values.\n" - "ARGUMENTS\n" - "handle CBF handle. cell Pointer to the destination array of \n" - "6 doubles for the reciprocal cell parameters. cell_esd Pointer to \n" - "the destination array of 6 doubles for the reciprocal cell parameter \n" - "esds.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success. No errors is \n" - "returned for missing values if the \"cell \" category exists.\n" - "SEE ALSO\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_get_reciprocal_cell_esd", _wrap_cbf_handle_struct_get_reciprocal_cell_esd, METH_VARARGS, (char *)"cbf_handle_struct_get_reciprocal_cell_esd(cbf_handle_struct self)"}, - { (char *)"cbf_handle_struct_get_3d_image_size", _wrap_cbf_handle_struct_get_3d_image_size, METH_VARARGS, (char *)"\n" - "\n" - "Returns : size_t ndimslow,size_t ndimmid,size_t ndimfast\n" - "*args : Integer element_number\n" - "\n" - "C prototype: int cbf_get_3d_image_size (cbf_handle handle,\n" - " unsigned int reserved, unsigned int element_number,\n" - " size_t *ndimslow, size_t *ndimmid, size_t *ndimfast);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf \n" - "set *ndimslow and *ndimfast to the slow and fast dimensions of the \n" - "image array for element number element_number. If the array is \n" - "1-dimensional, *ndimslow will be set to the array size and *ndimfast \n" - "will be set to 1. If the array is 3-dimensional an error code will be \n" - "returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and \n" - "cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the \n" - "slowest, next fastest and fastest dimensions, respectively, of the 3D \n" - "image array for element number element_number. If the array is \n" - "1-dimensional, *ndimslow will be set to the array size and *ndimmid \n" - "and\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_find_tag_root", _wrap_cbf_handle_struct_find_tag_root, METH_VARARGS, (char *)"\n" - "\n" - "Returns : String tagroot\n" - "*args : String tagname\n" - "\n" - "C prototype: int cbf_find_tag_root (cbf_handle handle, const char* tagname,\n" - " const char** tagroot);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_find_tag_root sets *tagroot to the root tag of which tagname is \n" - "an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in \n" - "the dictionary associated with handle, creating the dictionary if \n" - "necessary. cbf_require_tag_root sets *tagroot to the root tag of \n" - "which tagname is an alias, if there is one, or to the value of \n" - "tagname, if tagname is not an alias.\n" - "A returned tagroot string must not be modified in any way.\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" + "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" + "(int), sizeof(double) or sizeof(float), the function returns \n" + "CBF_ARGUMENT.\n" + "The parameter reserved is presently unused and should be set to 0.\n" "ARGUMENTS\n" - "handle CBF handle. tagname tag name which may be an alias. \n" - "tagroot pointer to a returned tag root name. tagroot_in input \n" - "tag root name.\n" + "handle CBF handle. reserved Unused. Any value other \n" + "than 0 is invalid. element_number The number of the detector \n" + "element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. compression Compression type. \n" + "array Pointer to the image array. elsize Size in \n" + "bytes of each image array element. elsigned Set to non-0 if \n" + "the image array elements are signed. ndimslow Slowest array \n" + "dimension. ndimmid Second slowest array dimension. ndimfast \n" + " Fastest array dimension.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_require_category_root", _wrap_cbf_handle_struct_require_category_root, METH_VARARGS, (char *)"cbf_handle_struct_require_category_root(cbf_handle_struct self, char const * categoryname) -> char const *"}, - { (char *)"cbf_handle_struct_set_realarray_wdims_sf", _wrap_cbf_handle_struct_set_realarray_wdims_sf, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_image_fs", _wrap_cbf_handle_struct_set_image_fs, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : int compression,int binary_id,(binary) String data,int elsize,\n" - " int elements,String byteorder,int dimslow,int dimmid,int dimfast,\n" - " int padding\n" + "*args : int element_number,int compression,(binary) String data,int elsize,\n" + " int elsign,int dimfast,int dimslow\n" "\n" - "C prototype: int cbf_set_realarray_wdims_sf (cbf_handle handle,\n" - " unsigned int compression, int binary_id, void *array,\n" - " size_t elsize, size_t elements, const char *byteorder,\n" - " size_t dimslow, size_t dimmid, size_t dimfast,\n" - " size_t padding);\n" + "C prototype: int cbf_set_image_fs(cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, unsigned int compression,\n" + " void *array, size_t elsize, int elsign, size_t ndimfast,\n" + " size_t ndimslow);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_integerarray sets the binary value of the item at the current \n" - "column and row to an integer array. The array consists of elements \n" - "elements of elsize bytes each, starting at array. The elements are \n" - "signed if elsigned is non-0 and unsigned otherwise. binary_id is the \n" - "binary section identifier. cbf_set_realarray sets the binary value of \n" - "the item at the current column and row to an integer array. The array \n" - "consists of elements elements of elsize bytes each, starting at \n" - "array. binary_id is the binary section identifier.\n" - "The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, \n" - "cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, \n" - "cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants \n" - "allow the data header values of byteorder, dimfast, dimmid, dimslow \n" - "and padding to be set to the data byte order, the fastest, second \n" - "fastest and third fastest array dimensions and the size in byte of \n" - "the post data padding to be used.\n" + "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" + "array for element number element_number. The array consists of \n" + "ndimfast *ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-zero and unsigned otherwise. \n" + "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" + "write the image array for element number element_number. The array \n" + "consists of ndimfast *ndimslow IEEE double or float elements of \n" + "elsize bytes each, starting at array. cbf_set_3d_image, \n" + "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" + "for element number element_number. The array consists of ndimfast \n" + "*ndimmid *ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-0 and unsigned otherwise. \n" + "cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" + "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" + "element_number. The array consists of ndimfast *ndimmid *ndimslow \n" + "IEEE double or float elements of elsize bytes each, starting at \n" + "array.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "If the array is 1-dimensional, ndimslow should be the array size and \n" + "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" + "array is 2-dimensional and the 3D calls are used, ndimslow and \n" + "ndimmid should be used for the array dimensions and ndimfast should \n" + "be set to 1.\n" "The array will be compressed using the compression scheme specifed by \n" "compression. Currently, the available schemes are:\n" - "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" - "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" - " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" - " Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" - "\"nibble_offset \" compression. CBF_NONE No compression. \n" - "NOTE: This scheme is by far the slowest of the four and uses much \n" - "more disk space. It is intended for routine use with small arrays \n" - "only. With large arrays (like images) it should be used only for \n" - "debugging.\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression.\n" "The values compressed are limited to 64 bits. If any element in the \n" "array is larger than 64 bits, the value compressed is the nearest \n" "64-bit value.\n" "Currently, the source array must consist of chars, shorts or ints \n" - "(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or \n" - "floats for cbf_set_realarray. If elsize is not equal to sizeof \n" - "(char), sizeof (short) or sizeof (int), the function returns \n" + "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" + "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" + "(int), sizeof(double) or sizeof(float), the function returns \n" "CBF_ARGUMENT.\n" + "The parameter reserved is presently unused and should be set to 0.\n" "ARGUMENTS\n" - "handle CBF handle. compression Compression method to use. \n" - "binary_id Integer binary identifier. array Pointer to the \n" - "source array. elsize Size in bytes of each source array \n" - "element. elsigned Set to non-0 if the source array elements are \n" - "signed. elements: The number of elements in the array.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_set_integervalue", _wrap_cbf_handle_struct_set_integervalue, METH_VARARGS, (char *)"\n" - "\n" - "Returns : int number\n" - "*args : \n" - "\n" - "C prototype: int cbf_set_integervalue (cbf_handle handle, int number);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_set_integervalue sets the item at the current column and row to \n" - "the integer value number written as a decimal ASCII string.\n" - "ARGUMENTS\n" - "handle CBF handle. number Integer value.\n" + "handle CBF handle. reserved Unused. Any value other \n" + "than 0 is invalid. element_number The number of the detector \n" + "element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. compression Compression type. \n" + "array Pointer to the image array. elsize Size in \n" + "bytes of each image array element. elsigned Set to non-0 if \n" + "the image array elements are signed. ndimslow Slowest array \n" + "dimension. ndimmid Second slowest array dimension. ndimfast \n" + " Fastest array dimension.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_category_name", _wrap_cbf_handle_struct_category_name, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_image_sf", _wrap_cbf_handle_struct_set_image_sf, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : string\n" + "*args : int element_number,int compression,(binary) String data,int elsize,\n" + " int elsign,int dimslow,int dimfast\n" "\n" - "C prototype: int cbf_category_name (cbf_handle handle,\n" - " const char **categoryname);\n" + "C prototype: int cbf_set_image_sf(cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, unsigned int compression,\n" + " void *array, size_t elsize, int elsign, size_t ndimslow,\n" + " size_t ndimfast);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_category_name sets *categoryname to point to the name of the \n" - "current category of the current data block.\n" - "The category name will be valid as long as the category exists.\n" - "The name must not be modified by the program in any way.\n" + "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" + "array for element number element_number. The array consists of \n" + "ndimfast *ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-zero and unsigned otherwise. \n" + "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" + "write the image array for element number element_number. The array \n" + "consists of ndimfast *ndimslow IEEE double or float elements of \n" + "elsize bytes each, starting at array. cbf_set_3d_image, \n" + "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" + "for element number element_number. The array consists of ndimfast \n" + "*ndimmid *ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-0 and unsigned otherwise. \n" + "cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" + "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" + "element_number. The array consists of ndimfast *ndimmid *ndimslow \n" + "IEEE double or float elements of elsize bytes each, starting at \n" + "array.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "If the array is 1-dimensional, ndimslow should be the array size and \n" + "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" + "array is 2-dimensional and the 3D calls are used, ndimslow and \n" + "ndimmid should be used for the array dimensions and ndimfast should \n" + "be set to 1.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" + "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" + "(int), sizeof(double) or sizeof(float), the function returns \n" + "CBF_ARGUMENT.\n" + "The parameter reserved is presently unused and should be set to 0.\n" "ARGUMENTS\n" - "handle CBF handle. categoryname Pointer to the destination \n" - "category name pointer.\n" + "handle CBF handle. reserved Unused. Any value other \n" + "than 0 is invalid. element_number The number of the detector \n" + "element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. compression Compression type. \n" + "array Pointer to the image array. elsize Size in \n" + "bytes of each image array element. elsigned Set to non-0 if \n" + "the image array elements are signed. ndimslow Slowest array \n" + "dimension. ndimmid Second slowest array dimension. ndimfast \n" + " Fastest array dimension.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_typeofvalue", _wrap_cbf_handle_struct_get_typeofvalue, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_real_image", _wrap_cbf_handle_struct_set_real_image, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : string\n" + "*args : int element_number,int compression,(binary) String data,int elsize,\n" + " int dimslow,int dimfast\n" "\n" - "C prototype: int cbf_get_typeofvalue (cbf_handle handle,\n" - " const char **typeofvalue);\n" + "C prototype: int cbf_set_real_image (cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, unsigned int compression,\n" + " void *array,size_t elsize, size_t ndimslow,\n" + " size_t ndimfast);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_value sets *typeofvalue to point an ASCII descriptor of the \n" - "value of the item at the current column and row. The strings that may \n" - "be returned are:\n" - " \"null \" for a null value indicated by a \". \" or a \"? \" \n" - "\"bnry \" for a binary value \"word \" for an unquoted string \n" - "\"dblq \" for a double-quoted string \"sglq \" for a single-quoted \n" - "string \"text \" for a semicolon-quoted string (multiline text \n" - "field) \"prns \" for a parenthesis-bracketed string (multiline text \n" - "field) \"brcs \" for a brace-bracketed string (multiline text field) \n" - " \"bkts \" for a square-bracket-bracketed string (multiline text \n" - "field) \"tsqs \" for a treble-single-quote quoted string (multiline \n" - "text field) \"tdqs \" for a treble-double-quote quoted string \n" - "(multiline text field)\n" - "Not all types are valid for all type of CIF files. In partcular the \n" - "types \"prns \", \"brcs \", \"bkts \" were introduced with DDLm \n" - "and are not valid in DDL1 or DDL2 CIFS. The types \"tsqs \" and \n" - "\"tdqs \" are not formally part of the CIF syntax. A field for which \n" - "no value has been set sets *typeofvalue to NULL rather than to the \n" - "string \"null \".\n" - "The typeofvalue must not be modified by the program in any way.\n" + "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" + "array for element number element_number. The array consists of \n" + "ndimfast *ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-zero and unsigned otherwise. \n" + "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" + "write the image array for element number element_number. The array \n" + "consists of ndimfast *ndimslow IEEE double or float elements of \n" + "elsize bytes each, starting at array. cbf_set_3d_image, \n" + "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" + "for element number element_number. The array consists of ndimfast \n" + "*ndimmid *ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-0 and unsigned otherwise. \n" + "cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" + "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" + "element_number. The array consists of ndimfast *ndimmid *ndimslow \n" + "IEEE double or float elements of elsize bytes each, starting at \n" + "array.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "If the array is 1-dimensional, ndimslow should be the array size and \n" + "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" + "array is 2-dimensional and the 3D calls are used, ndimslow and \n" + "ndimmid should be used for the array dimensions and ndimfast should \n" + "be set to 1.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" + "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" + "(int), sizeof(double) or sizeof(float), the function returns \n" + "CBF_ARGUMENT.\n" + "The parameter reserved is presently unused and should be set to 0.\n" "ARGUMENTS\n" - "handle CBF handle. typeofvalue Pointer to the destination \n" - "type-of-value string pointer.\n" + "handle CBF handle. reserved Unused. Any value other \n" + "than 0 is invalid. element_number The number of the detector \n" + "element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. compression Compression type. \n" + "array Pointer to the image array. elsize Size in \n" + "bytes of each image array element. elsigned Set to non-0 if \n" + "the image array elements are signed. ndimslow Slowest array \n" + "dimension. ndimmid Second slowest array dimension. ndimfast \n" + " Fastest array dimension.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_real_image", _wrap_cbf_handle_struct_set_real_image, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_real_image_fs", _wrap_cbf_handle_struct_set_real_image_fs, METH_VARARGS, "\n" "\n" "Returns : \n" "*args : int element_number,int compression,(binary) String data,int elsize,\n" - " int dimslow,int dimfast\n" + " int dimfast,int dimslow\n" "\n" - "C prototype: int cbf_set_real_image (cbf_handle handle, unsigned int reserved,\n" - " unsigned int element_number, unsigned int compression,\n" - " void *array,size_t elsize, size_t ndimslow,\n" - " size_t ndimfast);\n" + "C prototype: int cbf_set_real_image_fs(cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " unsigned int compression, void *array,size_t elsize,\n" + " size_t ndimfast, size_t ndimslow);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" @@ -27197,167 +26322,214 @@ static PyMethodDef SwigMethods[] = { "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_3d_image_as_string", _wrap_cbf_handle_struct_get_3d_image_as_string, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_real_image_sf", _wrap_cbf_handle_struct_set_real_image_sf, METH_VARARGS, "\n" "\n" - "Returns : (Binary)String\n" - "*args : int element_number,int elsize,int elsign,int ndimslow,int ndimmid,\n" - " int ndimfast\n" + "Returns : \n" + "*args : int element_number,int compression,(binary) String data,int elsize,\n" + " int dimslow,int dimfast\n" "\n" - "C prototype: int cbf_get_3d_image (cbf_handle handle, unsigned int reserved,\n" - " unsigned int element_number, void *array, size_t elsize,\n" - " int elsign, size_t ndimslow, size_t ndimmid,\n" - " size_t ndimfast);\n" + "C prototype: int cbf_set_real_image_sf(cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " unsigned int compression, void *array,size_t elsize,\n" + " size_t ndimslow, size_t ndimfast);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" - "array for element number element_number into an array. The array \n" - "consists of ndimslow *ndimfast elements of elsize bytes each, \n" - "starting at array. The elements are signed if elsign is non-0 and \n" - "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" - "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" - "for element number element_number into an array. A real array is \n" - "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" - "cbf_get_3d_image_sf read the 3D image array for element number \n" - "element_number into an array. The array consists of ndimslow *ndimmid \n" - "*ndimfast elements of elsize bytes each, starting at array. The \n" - "elements are signed if elsign is non-0 and unsigned otherwise. \n" - "cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" - "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" - "floats for element number element_number into an array. A real array \n" - "is always signed.\n" + "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" + "array for element number element_number. The array consists of \n" + "ndimfast *ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-zero and unsigned otherwise. \n" + "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" + "write the image array for element number element_number. The array \n" + "consists of ndimfast *ndimslow IEEE double or float elements of \n" + "elsize bytes each, starting at array. cbf_set_3d_image, \n" + "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" + "for element number element_number. The array consists of ndimfast \n" + "*ndimmid *ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-0 and unsigned otherwise. \n" + "cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" + "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" + "element_number. The array consists of ndimfast *ndimmid *ndimslow \n" + "IEEE double or float elements of elsize bytes each, starting at \n" + "array.\n" "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" "with no suffix and the calls _sf calls give the dimensions in \n" "slow-to-fast order\n" - "The structure of the array as a 1-, 2- or 3-dimensional array should \n" - "agree with the structure of the array given in the \n" - "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" - "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" - "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" - "being processed. If the array is 2-dimensional and a 3D call is used, \n" - "ndimslow and ndimmid should be the\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_get_axis_reference_poise", _wrap_cbf_handle_struct_get_axis_reference_poise, METH_VARARGS, (char *)"\n" - "\n" - "Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2,\n" - " Float offset3\n" - "*args : String axis_id\n" - "\n" - "C prototype: int cbf_get_axis_reference_poise(cbf_handle handle,\n" - " double * vector1, double * vector2, double * vector3,\n" - " double * offset1, double * offset2, double * offset3,\n" - " const char * axis_id);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_get_axis_poise sets vector1, vector2, vector3 to point to the \n" - "components of the axis vector for axis axis_id, offset1, offset2, \n" - "offset3 to point to the components of the axis base offset vector for \n" - "axis axis_id, and angle to point to the angle of rotation of axis \n" - "axis_id after application of the axis settings for frame frame_id, \n" - "using ratio, a value between 0 and 1, indicating how far into the \n" - "internal motion in the frame to go. If frame_id is the string \". \n" - "\", the first frame found is used. If there is more than one frame, \n" - "which frame will be found is indeterminate. If frame_id is NULL, the \n" - "overall setting for the scan are used, rather than those for any \n" - "particular frame. The vector and offset reported are the reference \n" - "vector and offset of the axis axis_id transformed by application of \n" - "all motions of the axes on which axis_id depends.\n" - "cbf_get_goniometer_poise vector1, vector2, vector3 to point to the \n" - "components of the axis vector for the goniometer axis, offset1, \n" - "offset2, offset3 to point to the components of the axis base offset \n" - "vector for the goniometer axis, and angle to point to the angle of \n" - "rotation of the goniometer axis after application of all axis \n" - "settings in the goniometer deriving the vector, offset and angle from \n" - "the resulting matrix. Calculation of the vector is indeterminate if \n" - "the angle is zero.\n" - "cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point \n" - "to the components of the axis vector for axis axis_id, offset1, \n" - "offset2, offset3 to point to the components of the axis base offset \n" - "vector for axis axis_id unmodified by axis rotations. Any of the \n" - "pointers may be specified as NULL.\n" + "If the array is 1-dimensional, ndimslow should be the array size and \n" + "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" + "array is 2-dimensional and the 3D calls are used, ndimslow and \n" + "ndimmid should be used for the array dimensions and ndimfast should \n" + "be set to 1.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" + "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" + "(int), sizeof(double) or sizeof(float), the function returns \n" + "CBF_ARGUMENT.\n" + "The parameter reserved is presently unused and should be set to 0.\n" "ARGUMENTS\n" - "handle CBF handle. ratio A number between 0 and 1 \n" - "indication how far into the frame to go vector1 Pointer to the \n" - "first component of the axis vector vector2 Pointer to the second \n" - "component of the axis vector vector3 Pointer to the third \n" - "component of the axis vector offset1 Pointer to the first \n" - "component of the axis offset offset2 Pointer to the second \n" - "component of the axis offset offset3 Pointer to the third \n" - "component of the axis offset angle Pointer to the rotation \n" - "angle axis_id The specified axis frame_id The specified \n" - "frame positioner CBF goniometer\n" + "handle CBF handle. reserved Unused. Any value other \n" + "than 0 is invalid. element_number The number of the detector \n" + "element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. compression Compression type. \n" + "array Pointer to the image array. elsize Size in \n" + "bytes of each image array element. elsigned Set to non-0 if \n" + "the image array elements are signed. ndimslow Slowest array \n" + "dimension. ndimmid Second slowest array dimension. ndimfast \n" + " Fastest array dimension.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_remove_row", _wrap_cbf_handle_struct_remove_row, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_3d_image", _wrap_cbf_handle_struct_set_3d_image, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : \n" + "*args : int element_number,int compression,(binary) String data,int elsize,\n" + " int elsign,int dimslow,int dimmid,int dimfast\n" "\n" - "C prototype: int cbf_remove_row (cbf_handle handle);\n" + "C prototype: int cbf_set_3d_image (cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, unsigned int compression,\n" + " void *array, size_t elsize, int elsign, size_t ndimslow,\n" + " size_t ndimmid, size_t ndimfast);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_remove_row deletes the current row in the current category.\n" - "If the current row was the last row, it will move down by 1, \n" - "otherwise, it will remain the same.\n" + "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" + "array for element number element_number. The array consists of \n" + "ndimfast *ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-zero and unsigned otherwise. \n" + "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" + "write the image array for element number element_number. The array \n" + "consists of ndimfast *ndimslow IEEE double or float elements of \n" + "elsize bytes each, starting at array. cbf_set_3d_image, \n" + "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" + "for element number element_number. The array consists of ndimfast \n" + "*ndimmid *ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-0 and unsigned otherwise. \n" + "cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" + "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" + "element_number. The array consists of ndimfast *ndimmid *ndimslow \n" + "IEEE double or float elements of elsize bytes each, starting at \n" + "array.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "If the array is 1-dimensional, ndimslow should be the array size and \n" + "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" + "array is 2-dimensional and the 3D calls are used, ndimslow and \n" + "ndimmid should be used for the array dimensions and ndimfast should \n" + "be set to 1.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" + "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" + "(int), sizeof(double) or sizeof(float), the function returns \n" + "CBF_ARGUMENT.\n" + "The parameter reserved is presently unused and should be set to 0.\n" "ARGUMENTS\n" - "handle CBF handle.\n" + "handle CBF handle. reserved Unused. Any value other \n" + "than 0 is invalid. element_number The number of the detector \n" + "element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. compression Compression type. \n" + "array Pointer to the image array. elsize Size in \n" + "bytes of each image array element. elsigned Set to non-0 if \n" + "the image array elements are signed. ndimslow Slowest array \n" + "dimension. ndimmid Second slowest array dimension. ndimfast \n" + " Fastest array dimension.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_overload", _wrap_cbf_handle_struct_set_overload, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_3d_image_fs", _wrap_cbf_handle_struct_set_3d_image_fs, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : Integer element_number,Float overload\n" + "*args : int element_number,int compression,(binary) String data,int elsize,\n" + " int elsign,int dimfast,int dimmid,int dimslow\n" "\n" - "C prototype: int cbf_set_overload (cbf_handle handle,\n" - " unsigned int element_number, double overload);\n" + "C prototype: int cbf_set_3d_image_fs(cbf_handle handle, unsigned int reserved,\n" + " unsigned int element_number, unsigned int compression,\n" + " void *array, size_t elsize, int elsign, size_t ndimfast,\n" + " size_t ndimmid, size_t ndimslow);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_overload sets the overload value of element number \n" - "element_number to overload.\n" + "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" + "array for element number element_number. The array consists of \n" + "ndimfast *ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-zero and unsigned otherwise. \n" + "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" + "write the image array for element number element_number. The array \n" + "consists of ndimfast *ndimslow IEEE double or float elements of \n" + "elsize bytes each, starting at array. cbf_set_3d_image, \n" + "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" + "for element number element_number. The array consists of ndimfast \n" + "*ndimmid *ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-0 and unsigned otherwise. \n" + "cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" + "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" + "element_number. The array consists of ndimfast *ndimmid *ndimslow \n" + "IEEE double or float elements of elsize bytes each, starting at \n" + "array.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "If the array is 1-dimensional, ndimslow should be the array size and \n" + "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" + "array is 2-dimensional and the 3D calls are used, ndimslow and \n" + "ndimmid should be used for the array dimensions and ndimfast should \n" + "be set to 1.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" + "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" + "(int), sizeof(double) or sizeof(float), the function returns \n" + "CBF_ARGUMENT.\n" + "The parameter reserved is presently unused and should be set to 0.\n" "ARGUMENTS\n" - "handle CBF handle. element_number The number of the \n" - "detector element counting from 0 by order of appearance in the \n" - "\"diffrn_data_frame \" category. overload New overload value.\n" + "handle CBF handle. reserved Unused. Any value other \n" + "than 0 is invalid. element_number The number of the detector \n" + "element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. compression Compression type. \n" + "array Pointer to the image array. elsize Size in \n" + "bytes of each image array element. elsigned Set to non-0 if \n" + "the image array elements are signed. ndimslow Slowest array \n" + "dimension. ndimmid Second slowest array dimension. ndimfast \n" + " Fastest array dimension.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_image_size", _wrap_cbf_handle_struct_get_image_size, METH_VARARGS, (char *)"\n" - "\n" - "Returns : size_t ndim1,size_t ndim2\n" - "*args : Integer element_number\n" - "\n" - "C prototype: int cbf_get_image_size (cbf_handle handle, unsigned int reserved,\n" - " unsigned int element_number, size_t *ndimslow,\n" - " size_t *ndimfast);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_get_image_size, cbf_get_image_size_fs and cbf_get_image_size_sf \n" - "set *ndimslow and *ndimfast to the slow and fast dimensions of the \n" - "image array for element number element_number. If the array is \n" - "1-dimensional, *ndimslow will be set to the array size and *ndimfast \n" - "will be set to 1. If the array is 3-dimensional an error code will be \n" - "returned. cbf_get_3d_image_size, cbf_get_3d_image_size_fs and \n" - "cbf_get_3d_image_size_sf set *ndimslow, *ndimmid and *ndimfast to the \n" - "slowest, next fastest and fastest dimensions, respectively, of the 3D \n" - "image array for element number element_number. If the array is \n" - "1-dimensional, *ndimslow will be set to the array size and *ndimmid \n" - "and\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_set_3d_image_sf", _wrap_cbf_handle_struct_set_3d_image_sf, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_3d_image_sf", _wrap_cbf_handle_struct_set_3d_image_sf, METH_VARARGS, "\n" "\n" "Returns : \n" "*args : int element_number,int compression,(binary) String data,int elsize,\n" @@ -27426,329 +26598,641 @@ static PyMethodDef SwigMethods[] = { "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_real_image_sf_as_string", _wrap_cbf_handle_struct_get_real_image_sf_as_string, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_real_3d_image", _wrap_cbf_handle_struct_set_real_3d_image, METH_VARARGS, "\n" "\n" - "Returns : (Binary)String\n" - "*args : int element_number,int elsize,int ndimslow,int ndimfast\n" + "Returns : \n" + "*args : int element_number,int compression,(binary) String data,int elsize,\n" + " int dimslow,int dimmid,int dimfast\n" "\n" - "C prototype: int cbf_get_real_image_sf (cbf_handle handle,\n" + "C prototype: int cbf_set_real_3d_image (cbf_handle handle,\n" " unsigned int reserved, unsigned int element_number,\n" - " void *array, size_t elsize, size_t ndimslow,\n" - " size_t ndimfast);\n" + " unsigned int compression, void *array,size_t elsize,\n" + " size_t ndimslow, size_t ndimmid, size_t ndimfast);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" - "array for element number element_number into an array. The array \n" - "consists of ndimslow *ndimfast elements of elsize bytes each, \n" - "starting at array. The elements are signed if elsign is non-0 and \n" - "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" - "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" - "for element number element_number into an array. A real array is \n" - "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" - "cbf_get_3d_image_sf read the 3D image array for element number \n" - "element_number into an array. The array consists of ndimslow *ndimmid \n" - "*ndimfast elements of elsize bytes each, starting at array. The \n" - "elements are signed if elsign is non-0 and unsigned otherwise. \n" - "cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" - "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" - "floats for element number element_number into an array. A real array \n" - "is always signed.\n" + "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" + "array for element number element_number. The array consists of \n" + "ndimfast *ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-zero and unsigned otherwise. \n" + "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" + "write the image array for element number element_number. The array \n" + "consists of ndimfast *ndimslow IEEE double or float elements of \n" + "elsize bytes each, starting at array. cbf_set_3d_image, \n" + "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" + "for element number element_number. The array consists of ndimfast \n" + "*ndimmid *ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-0 and unsigned otherwise. \n" + "cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" + "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" + "element_number. The array consists of ndimfast *ndimmid *ndimslow \n" + "IEEE double or float elements of elsize bytes each, starting at \n" + "array.\n" "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" "with no suffix and the calls _sf calls give the dimensions in \n" "slow-to-fast order\n" - "The structure of the array as a 1-, 2- or 3-dimensional array should \n" - "agree with the structure of the array given in the \n" - "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" - "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" - "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" - "being processed. If the array is 2-dimensional and a 3D call is used, \n" - "ndimslow and ndimmid should be the\n" + "If the array is 1-dimensional, ndimslow should be the array size and \n" + "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" + "array is 2-dimensional and the 3D calls are used, ndimslow and \n" + "ndimmid should be used for the array dimensions and ndimfast should \n" + "be set to 1.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" + "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" + "(int), sizeof(double) or sizeof(float), the function returns \n" + "CBF_ARGUMENT.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any value other \n" + "than 0 is invalid. element_number The number of the detector \n" + "element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. compression Compression type. \n" + "array Pointer to the image array. elsize Size in \n" + "bytes of each image array element. elsigned Set to non-0 if \n" + "the image array elements are signed. ndimslow Slowest array \n" + "dimension. ndimmid Second slowest array dimension. ndimfast \n" + " Fastest array dimension.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_image_as_string", _wrap_cbf_handle_struct_get_image_as_string, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_real_3d_image_fs", _wrap_cbf_handle_struct_set_real_3d_image_fs, METH_VARARGS, "\n" "\n" - "Returns : (Binary)String\n" - "*args : int element_number,int elsize,int elsign,int ndimslow,int ndimfast\n" + "Returns : \n" + "*args : int element_number,int compression,(binary) String data,int elsize,\n" + " int dimfast,int dimmid,int dimslow\n" "\n" - "C prototype: int cbf_get_image (cbf_handle handle, unsigned int reserved,\n" - " unsigned int element_number, void *array, size_t elsize,\n" - " int elsign, size_t ndimslow, size_t ndimfast);\n" + "C prototype: int cbf_set_real_3d_image_fs(cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " unsigned int compression, void *array,size_t elsize,\n" + " size_t ndimfast, size_t ndimmid, size_t ndimslow);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" - "array for element number element_number into an array. The array \n" - "consists of ndimslow *ndimfast elements of elsize bytes each, \n" - "starting at array. The elements are signed if elsign is non-0 and \n" - "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" - "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" - "for element number element_number into an array. A real array is \n" - "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" - "cbf_get_3d_image_sf read the 3D image array for element number \n" - "element_number into an array. The array consists of ndimslow *ndimmid \n" - "*ndimfast elements of elsize bytes each, starting at array. The \n" - "elements are signed if elsign is non-0 and unsigned otherwise. \n" - "cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" - "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" - "floats for element number element_number into an array. A real array \n" - "is always signed.\n" + "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" + "array for element number element_number. The array consists of \n" + "ndimfast *ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-zero and unsigned otherwise. \n" + "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" + "write the image array for element number element_number. The array \n" + "consists of ndimfast *ndimslow IEEE double or float elements of \n" + "elsize bytes each, starting at array. cbf_set_3d_image, \n" + "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" + "for element number element_number. The array consists of ndimfast \n" + "*ndimmid *ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-0 and unsigned otherwise. \n" + "cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" + "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" + "element_number. The array consists of ndimfast *ndimmid *ndimslow \n" + "IEEE double or float elements of elsize bytes each, starting at \n" + "array.\n" "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" "with no suffix and the calls _sf calls give the dimensions in \n" "slow-to-fast order\n" - "The structure of the array as a 1-, 2- or 3-dimensional array should \n" - "agree with the structure of the array given in the \n" - "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" - "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" - "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" - "being processed. If the array is 2-dimensional and a 3D call is used, \n" - "ndimslow and ndimmid should be the\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_set_tag_root", _wrap_cbf_handle_struct_set_tag_root, METH_VARARGS, (char *)"\n" - "\n" - "Returns : \n" - "*args : String tagname,String tagroot_in\n" - "\n" - "C prototype: int cbf_set_tag_root (cbf_handle handle, const char* tagname,\n" - " const char*tagroot_in);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_find_tag_root sets *tagroot to the root tag of which tagname is \n" - "an alias. cbf_set_tag_root sets tagname as an alias of tagroot_in in \n" - "the dictionary associated with handle, creating the dictionary if \n" - "necessary. cbf_require_tag_root sets *tagroot to the root tag of \n" - "which tagname is an alias, if there is one, or to the value of \n" - "tagname, if tagname is not an alias.\n" - "A returned tagroot string must not be modified in any way.\n" + "If the array is 1-dimensional, ndimslow should be the array size and \n" + "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" + "array is 2-dimensional and the 3D calls are used, ndimslow and \n" + "ndimmid should be used for the array dimensions and ndimfast should \n" + "be set to 1.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" + "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" + "(int), sizeof(double) or sizeof(float), the function returns \n" + "CBF_ARGUMENT.\n" + "The parameter reserved is presently unused and should be set to 0.\n" "ARGUMENTS\n" - "handle CBF handle. tagname tag name which may be an alias. \n" - "tagroot pointer to a returned tag root name. tagroot_in input \n" - "tag root name.\n" + "handle CBF handle. reserved Unused. Any value other \n" + "than 0 is invalid. element_number The number of the detector \n" + "element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. compression Compression type. \n" + "array Pointer to the image array. elsize Size in \n" + "bytes of each image array element. elsigned Set to non-0 if \n" + "the image array elements are signed. ndimslow Slowest array \n" + "dimension. ndimmid Second slowest array dimension. ndimfast \n" + " Fastest array dimension.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_write_widefile", _wrap_cbf_handle_struct_write_widefile, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_real_3d_image_sf", _wrap_cbf_handle_struct_set_real_3d_image_sf, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : String filename,Integer ciforcbf,Integer Headers,Integer encoding\n" + "*args : int element_number,int compression,(binary) String data,int elsize,\n" + " int dimslow,int dimmid,int dimfast\n" "\n" - "C prototype: int cbf_write_widefile (cbf_handle handle, FILE *file,\n" - " int readable, int ciforcbf, int flags, int encoding);\n" + "C prototype: int cbf_set_real_3d_image_sf(cbf_handle handle,\n" + " unsigned int reserved, unsigned int element_number,\n" + " unsigned int compression, void *array,size_t elsize,\n" + " size_t ndimslow, size_t ndimmid, size_t ndimfast);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_write_file writes the CBF object specified by handle into the \n" - "file file, following CIF 1.0 conventions of 80 character lines. \n" - "cbf_write_widefile writes the CBF object specified by handle into the \n" - "file file, following CIF 1.1 conventions of 2048 character lines. A \n" - "warning is issued to stderr for ascii lines over the limit, and an \n" - "attempt is made to fold lines to fit. No test is performed on binary \n" - "sections.\n" - "If a dictionary has been provided, aliases will be applied on output.\n" - "Unlike cbf_read_file, the file does not have to be random-access.\n" - "If the file is random-access and readable, readable can be set to \n" - "non-0 to indicate to CBFlib that the file can be used as a buffer to \n" - "conserve disk space. If the file is not random-access or not \n" - "readable, readable must be 0.\n" + "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" + "array for element number element_number. The array consists of \n" + "ndimfast *ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-zero and unsigned otherwise. \n" + "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" + "write the image array for element number element_number. The array \n" + "consists of ndimfast *ndimslow IEEE double or float elements of \n" + "elsize bytes each, starting at array. cbf_set_3d_image, \n" + "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" + "for element number element_number. The array consists of ndimfast \n" + "*ndimmid *ndimslow elements of elsize bytes each, starting at array. \n" + "The elements are signed if elsign is non-0 and unsigned otherwise. \n" + "cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" + "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" + "element_number. The array consists of ndimfast *ndimmid *ndimslow \n" + "IEEE double or float elements of elsize bytes each, starting at \n" + "array.\n" + "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" + "with no suffix and the calls _sf calls give the dimensions in \n" + "slow-to-fast order\n" + "If the array is 1-dimensional, ndimslow should be the array size and \n" + "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" + "array is 2-dimensional and the 3D calls are used, ndimslow and \n" + "ndimmid should be used for the array dimensions and ndimfast should \n" + "be set to 1.\n" + "The array will be compressed using the compression scheme specifed by \n" + "compression. Currently, the available schemes are:\n" + "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" + "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" + " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" + "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" + "\"nibble_offset \" compression. CBF_NONE No compression.\n" + "The values compressed are limited to 64 bits. If any element in the \n" + "array is larger than 64 bits, the value compressed is the nearest \n" + "64-bit value.\n" + "Currently, the source array must consist of chars, shorts or ints \n" + "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" + "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" + "(int), sizeof(double) or sizeof(float), the function returns \n" + "CBF_ARGUMENT.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any value other \n" + "than 0 is invalid. element_number The number of the detector \n" + "element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. compression Compression type. \n" + "array Pointer to the image array. elsize Size in \n" + "bytes of each image array element. elsigned Set to non-0 if \n" + "the image array elements are signed. ndimslow Slowest array \n" + "dimension. ndimmid Second slowest array dimension. ndimfast \n" + " Fastest array dimension.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_count_rows", _wrap_cbf_handle_struct_count_rows, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_count_axis_ancestors", _wrap_cbf_handle_struct_count_axis_ancestors, METH_VARARGS, "\n" "\n" "Returns : Integer\n" - "*args : \n" + "*args : String axis_id\n" "\n" - "C prototype: int cbf_count_rows (cbf_handle handle, unsigned int *rows);\n" + "C prototype: int cbf_count_axis_ancestors (cbf_handle handle,\n" + " const char *axis_id, unsigned int *ancestors);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_count_rows puts the number of rows in the current category in \n" - "*rows .\n" + "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" + "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" + "axis of index ancestor_index of axis axis_id, starting with axis_id \n" + "for ancestor_index 0.\n" + "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" + "axis_id or to \". \" if there is no such ancestor. \n" + "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" + "to \". \" if there is no such equipment. \n" + "cbf_get_axis_equipment_component sets *equipment_component to the \n" + "equipment_component of axis_id or to \". \" if there is no such \n" + "equipment_component.\n" + "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" + "components of the ofset of axis_id.\n" + "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" + "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" + "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" + "is no such rotation_axis.\n" + "cbf_get_axis_setting sets *start and *increment to the corresponding \n" + "values of the axis axis_id. Any of the destination pointers may be \n" + "NULL.\n" + "cbf_get_axis_type sets axis_type to the type of axis_id.\n" + "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" + "components of the vector of axis_id.\n" + "The parameter reserved is presently unused and should be set to 0.\n" "ARGUMENTS\n" - "handle CBF handle. rows Pointer to the destination row count.\n" + "handle CBF handle. reserved Unused. Any \n" + "value other than 0 is invalid. axis_id Axis id. \n" + "ancestor_index Integer index of the desired ancestor, starting \n" + "with 0 for the current axis_id. ancestor Pointer to \n" + "destination ancestor name pointer. depends_on Pointer to \n" + "destination depends_on name pointer. equipment Pointer to \n" + "destination equipment name pointer. equipment_component Pointer to \n" + "destination equipment_component name pointer. offset1 \n" + "Pointer to destination first offset component value. offset2 \n" + " Pointer to destination second offset component value. offset3 \n" + " Pointer to destination third offset component value. \n" + "rotation Pointer to destination rotation value. \n" + "rotation_axis Pointer to destination rotation_axisn name \n" + "pointer. start Pointer to the destination start \n" + "value. increment Pointer to the destination increment \n" + "value. type Pointer to destination axis type of type \n" + ". vector1 Pointer to destination first vector component \n" + "value. vector2 Pointer to destination second vector \n" + "component value. vector3 Pointer to destination third \n" + "vector component value.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_require_datablock", _wrap_cbf_handle_struct_require_datablock, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_axis_ancestor", _wrap_cbf_handle_struct_get_axis_ancestor, METH_VARARGS, "\n" "\n" - "Returns : string\n" - "*args : \n" + "Returns : String\n" + "*args : String axis_id,Integer ancestor_index\n" "\n" - "C prototype: int cbf_require_datablock (cbf_handle handle,\n" - " const char *datablockname);\n" + "C prototype: int cbf_get_axis_ancestor (cbf_handle handle,\n" + " const char *axis_id, const unsigned int ancestor_index,\n" + " const char * *ancestor);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_require_datablock makes the data block with name datablockname \n" - "the current data block, if it exists, or creates it if it does not.\n" - "The comparison is case-insensitive.\n" - "The current category becomes undefined.\n" + "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" + "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" + "axis of index ancestor_index of axis axis_id, starting with axis_id \n" + "for ancestor_index 0.\n" + "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" + "axis_id or to \". \" if there is no such ancestor. \n" + "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" + "to \". \" if there is no such equipment. \n" + "cbf_get_axis_equipment_component sets *equipment_component to the \n" + "equipment_component of axis_id or to \". \" if there is no such \n" + "equipment_component.\n" + "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" + "components of the ofset of axis_id.\n" + "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" + "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" + "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" + "is no such rotation_axis.\n" + "cbf_get_axis_setting sets *start and *increment to the corresponding \n" + "values of the axis axis_id. Any of the destination pointers may be \n" + "NULL.\n" + "cbf_get_axis_type sets axis_type to the type of axis_id.\n" + "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" + "components of the vector of axis_id.\n" + "The parameter reserved is presently unused and should be set to 0.\n" "ARGUMENTS\n" - "handle CBF handle. datablockname The name of the data \n" - "block to find or create.\n" + "handle CBF handle. reserved Unused. Any \n" + "value other than 0 is invalid. axis_id Axis id. \n" + "ancestor_index Integer index of the desired ancestor, starting \n" + "with 0 for the current axis_id. ancestor Pointer to \n" + "destination ancestor name pointer. depends_on Pointer to \n" + "destination depends_on name pointer. equipment Pointer to \n" + "destination equipment name pointer. equipment_component Pointer to \n" + "destination equipment_component name pointer. offset1 \n" + "Pointer to destination first offset component value. offset2 \n" + " Pointer to destination second offset component value. offset3 \n" + " Pointer to destination third offset component value. \n" + "rotation Pointer to destination rotation value. \n" + "rotation_axis Pointer to destination rotation_axisn name \n" + "pointer. start Pointer to the destination start \n" + "value. increment Pointer to the destination increment \n" + "value. type Pointer to destination axis type of type \n" + ". vector1 Pointer to destination first vector component \n" + "value. vector2 Pointer to destination second vector \n" + "component value. vector3 Pointer to destination third \n" + "vector component value.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_integerarray", _wrap_cbf_handle_struct_set_integerarray, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_axis_depends_on", _wrap_cbf_handle_struct_get_axis_depends_on, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : int compression,int binary_id,(binary) String data,int elsize,\n" - " int elsigned,int elements\n" + "Returns : String\n" + "*args : String axis_id\n" "\n" - "C prototype: int cbf_set_integerarray (cbf_handle handle,\n" - " unsigned int compression, int binary_id, void *array,\n" - " size_t elsize, int elsigned, size_t elements);\n" + "C prototype: int cbf_get_axis_depends_on (cbf_handle handle,\n" + " const char *axis_id, const char * *depends_on);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_integerarray sets the binary value of the item at the current \n" - "column and row to an integer array. The array consists of elements \n" - "elements of elsize bytes each, starting at array. The elements are \n" - "signed if elsigned is non-0 and unsigned otherwise. binary_id is the \n" - "binary section identifier. cbf_set_realarray sets the binary value of \n" - "the item at the current column and row to an integer array. The array \n" - "consists of elements elements of elsize bytes each, starting at \n" - "array. binary_id is the binary section identifier.\n" - "The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, \n" - "cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, \n" - "cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants \n" - "allow the data header values of byteorder, dimfast, dimmid, dimslow \n" - "and padding to be set to the data byte order, the fastest, second \n" - "fastest and third fastest array dimensions and the size in byte of \n" - "the post data padding to be used.\n" - "The array will be compressed using the compression scheme specifed by \n" - "compression. Currently, the available schemes are:\n" - "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" - "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" - " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" - " Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" - "\"nibble_offset \" compression. CBF_NONE No compression. \n" - "NOTE: This scheme is by far the slowest of the four and uses much \n" - "more disk space. It is intended for routine use with small arrays \n" - "only. With large arrays (like images) it should be used only for \n" - "debugging.\n" - "The values compressed are limited to 64 bits. If any element in the \n" - "array is larger than 64 bits, the value compressed is the nearest \n" - "64-bit value.\n" - "Currently, the source array must consist of chars, shorts or ints \n" - "(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or \n" - "floats for cbf_set_realarray. If elsize is not equal to sizeof \n" - "(char), sizeof (short) or sizeof (int), the function returns \n" - "CBF_ARGUMENT.\n" + "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" + "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" + "axis of index ancestor_index of axis axis_id, starting with axis_id \n" + "for ancestor_index 0.\n" + "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" + "axis_id or to \". \" if there is no such ancestor. \n" + "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" + "to \". \" if there is no such equipment. \n" + "cbf_get_axis_equipment_component sets *equipment_component to the \n" + "equipment_component of axis_id or to \". \" if there is no such \n" + "equipment_component.\n" + "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" + "components of the ofset of axis_id.\n" + "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" + "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" + "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" + "is no such rotation_axis.\n" + "cbf_get_axis_setting sets *start and *increment to the corresponding \n" + "values of the axis axis_id. Any of the destination pointers may be \n" + "NULL.\n" + "cbf_get_axis_type sets axis_type to the type of axis_id.\n" + "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" + "components of the vector of axis_id.\n" + "The parameter reserved is presently unused and should be set to 0.\n" "ARGUMENTS\n" - "handle CBF handle. compression Compression method to use. \n" - "binary_id Integer binary identifier. array Pointer to the \n" - "source array. elsize Size in bytes of each source array \n" - "element. elsigned Set to non-0 if the source array elements are \n" - "signed. elements: The number of elements in the array.\n" + "handle CBF handle. reserved Unused. Any \n" + "value other than 0 is invalid. axis_id Axis id. \n" + "ancestor_index Integer index of the desired ancestor, starting \n" + "with 0 for the current axis_id. ancestor Pointer to \n" + "destination ancestor name pointer. depends_on Pointer to \n" + "destination depends_on name pointer. equipment Pointer to \n" + "destination equipment name pointer. equipment_component Pointer to \n" + "destination equipment_component name pointer. offset1 \n" + "Pointer to destination first offset component value. offset2 \n" + " Pointer to destination second offset component value. offset3 \n" + " Pointer to destination third offset component value. \n" + "rotation Pointer to destination rotation value. \n" + "rotation_axis Pointer to destination rotation_axisn name \n" + "pointer. start Pointer to the destination start \n" + "value. increment Pointer to the destination increment \n" + "value. type Pointer to destination axis type of type \n" + ". vector1 Pointer to destination first vector component \n" + "value. vector2 Pointer to destination second vector \n" + "component value. vector3 Pointer to destination third \n" + "vector component value.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_new_datablock", _wrap_cbf_handle_struct_new_datablock, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_axis_equipment", _wrap_cbf_handle_struct_get_axis_equipment, METH_VARARGS, "\n" "\n" - "Returns : string\n" - "*args : \n" + "Returns : String\n" + "*args : String axis_id\n" "\n" - "C prototype: int cbf_new_datablock (cbf_handle handle,\n" - " const char *datablockname);\n" + "C prototype: int cbf_get_axis_equipment (cbf_handle handle,\n" + " const char *axis_id, const char * *equipment);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_new_datablock creates a new data block with name datablockname \n" - "and makes it the current data block. cbf_new_saveframe creates a new \n" - "save frame with name saveframename within the current data block and \n" - "makes the new save frame the current save frame.\n" - "If a data block or save frame with this name already exists, the \n" - "existing data block or save frame becomes the current data block or \n" - "save frame.\n" + "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" + "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" + "axis of index ancestor_index of axis axis_id, starting with axis_id \n" + "for ancestor_index 0.\n" + "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" + "axis_id or to \". \" if there is no such ancestor. \n" + "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" + "to \". \" if there is no such equipment. \n" + "cbf_get_axis_equipment_component sets *equipment_component to the \n" + "equipment_component of axis_id or to \". \" if there is no such \n" + "equipment_component.\n" + "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" + "components of the ofset of axis_id.\n" + "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" + "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" + "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" + "is no such rotation_axis.\n" + "cbf_get_axis_setting sets *start and *increment to the corresponding \n" + "values of the axis axis_id. Any of the destination pointers may be \n" + "NULL.\n" + "cbf_get_axis_type sets axis_type to the type of axis_id.\n" + "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" + "components of the vector of axis_id.\n" + "The parameter reserved is presently unused and should be set to 0.\n" "ARGUMENTS\n" - "handle CBF handle. datablockname The name of the new data \n" - "block. saveframename The name of the new save frame.\n" + "handle CBF handle. reserved Unused. Any \n" + "value other than 0 is invalid. axis_id Axis id. \n" + "ancestor_index Integer index of the desired ancestor, starting \n" + "with 0 for the current axis_id. ancestor Pointer to \n" + "destination ancestor name pointer. depends_on Pointer to \n" + "destination depends_on name pointer. equipment Pointer to \n" + "destination equipment name pointer. equipment_component Pointer to \n" + "destination equipment_component name pointer. offset1 \n" + "Pointer to destination first offset component value. offset2 \n" + " Pointer to destination second offset component value. offset3 \n" + " Pointer to destination third offset component value. \n" + "rotation Pointer to destination rotation value. \n" + "rotation_axis Pointer to destination rotation_axisn name \n" + "pointer. start Pointer to the destination start \n" + "value. increment Pointer to the destination increment \n" + "value. type Pointer to destination axis type of type \n" + ". vector1 Pointer to destination first vector component \n" + "value. vector2 Pointer to destination second vector \n" + "component value. vector3 Pointer to destination third \n" + "vector component value.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_datestamp", _wrap_cbf_handle_struct_set_datestamp, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_axis_equipment_component", _wrap_cbf_handle_struct_get_axis_equipment_component, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : int year,int month,int day,int hour,int minute,double second,\n" - " int timezone,Float precision\n" + "Returns : String\n" + "*args : String axis_id\n" "\n" - "C prototype: int cbf_set_datestamp (cbf_handle handle, unsigned int reserved,\n" - " int year, int month, int day, int hour, int minute,\n" - " double second, int timezone, double precision);\n" + "C prototype: int cbf_get_axis_equipment_component (cbf_handle handle,\n" + " const char *axis_id, const char * *equipment_component);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_datestamp sets the collection timestamp in seconds since \n" - "January 1 1970 to the value specified by time. The timezone \n" - "difference from UTC\n" + "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" + "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" + "axis of index ancestor_index of axis axis_id, starting with axis_id \n" + "for ancestor_index 0.\n" + "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" + "axis_id or to \". \" if there is no such ancestor. \n" + "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" + "to \". \" if there is no such equipment. \n" + "cbf_get_axis_equipment_component sets *equipment_component to the \n" + "equipment_component of axis_id or to \". \" if there is no such \n" + "equipment_component.\n" + "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" + "components of the ofset of axis_id.\n" + "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" + "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" + "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" + "is no such rotation_axis.\n" + "cbf_get_axis_setting sets *start and *increment to the corresponding \n" + "values of the axis axis_id. Any of the destination pointers may be \n" + "NULL.\n" + "cbf_get_axis_type sets axis_type to the type of axis_id.\n" + "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" + "components of the vector of axis_id.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any \n" + "value other than 0 is invalid. axis_id Axis id. \n" + "ancestor_index Integer index of the desired ancestor, starting \n" + "with 0 for the current axis_id. ancestor Pointer to \n" + "destination ancestor name pointer. depends_on Pointer to \n" + "destination depends_on name pointer. equipment Pointer to \n" + "destination equipment name pointer. equipment_component Pointer to \n" + "destination equipment_component name pointer. offset1 \n" + "Pointer to destination first offset component value. offset2 \n" + " Pointer to destination second offset component value. offset3 \n" + " Pointer to destination third offset component value. \n" + "rotation Pointer to destination rotation value. \n" + "rotation_axis Pointer to destination rotation_axisn name \n" + "pointer. start Pointer to the destination start \n" + "value. increment Pointer to the destination increment \n" + "value. type Pointer to destination axis type of type \n" + ". vector1 Pointer to destination first vector component \n" + "value. vector2 Pointer to destination second vector \n" + "component value. vector3 Pointer to destination third \n" + "vector component value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_next_row", _wrap_cbf_handle_struct_next_row, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_axis_offset", _wrap_cbf_handle_struct_get_axis_offset, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : \n" + "Returns : Float offset1,Float offset2,Float offset3\n" + "*args : String axis_id\n" "\n" - "C prototype: int cbf_next_row (cbf_handle handle);\n" + "C prototype: int cbf_get_axis_offset (cbf_handle handle, const char *axis_id,\n" + " double *offset1, double *offset2, double *offset3);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_next_row makes the row following the current row in the current \n" - "category the current row.\n" - "If there are no more rows, the function returns CBF_NOTFOUND.\n" - "The current column is not affected.\n" + "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" + "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" + "axis of index ancestor_index of axis axis_id, starting with axis_id \n" + "for ancestor_index 0.\n" + "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" + "axis_id or to \". \" if there is no such ancestor. \n" + "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" + "to \". \" if there is no such equipment. \n" + "cbf_get_axis_equipment_component sets *equipment_component to the \n" + "equipment_component of axis_id or to \". \" if there is no such \n" + "equipment_component.\n" + "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" + "components of the ofset of axis_id.\n" + "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" + "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" + "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" + "is no such rotation_axis.\n" + "cbf_get_axis_setting sets *start and *increment to the corresponding \n" + "values of the axis axis_id. Any of the destination pointers may be \n" + "NULL.\n" + "cbf_get_axis_type sets axis_type to the type of axis_id.\n" + "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" + "components of the vector of axis_id.\n" + "The parameter reserved is presently unused and should be set to 0.\n" "ARGUMENTS\n" - "handle CBF handle.\n" + "handle CBF handle. reserved Unused. Any \n" + "value other than 0 is invalid. axis_id Axis id. \n" + "ancestor_index Integer index of the desired ancestor, starting \n" + "with 0 for the current axis_id. ancestor Pointer to \n" + "destination ancestor name pointer. depends_on Pointer to \n" + "destination depends_on name pointer. equipment Pointer to \n" + "destination equipment name pointer. equipment_component Pointer to \n" + "destination equipment_component name pointer. offset1 \n" + "Pointer to destination first offset component value. offset2 \n" + " Pointer to destination second offset component value. offset3 \n" + " Pointer to destination third offset component value. \n" + "rotation Pointer to destination rotation value. \n" + "rotation_axis Pointer to destination rotation_axisn name \n" + "pointer. start Pointer to the destination start \n" + "value. increment Pointer to the destination increment \n" + "value. type Pointer to destination axis type of type \n" + ". vector1 Pointer to destination first vector component \n" + "value. vector2 Pointer to destination second vector \n" + "component value. vector3 Pointer to destination third \n" + "vector component value.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_category_root", _wrap_cbf_handle_struct_set_category_root, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_axis_rotation", _wrap_cbf_handle_struct_get_axis_rotation, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : String categoryname,String categoryroot\n" + "Returns : Float\n" + "*args : String axis_id\n" "\n" - "C prototype: int cbf_set_category_root (cbf_handle handle,\n" - " const char* categoryname_in, const char*categoryroot);\n" + "C prototype: int cbf_get_axis_rotation (cbf_handle handle,\n" + " const char *axis_id, double *rotation);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_find_category_root sets *categoryroot to the root category of \n" - "which categoryname is an alias. cbf_set_category_root sets \n" - "categoryname_in as an alias of categoryroot in the dictionary \n" - "associated with handle, creating the dictionary if necessary. \n" - "cbf_require_category_root sets *categoryroot to the root category of \n" - "which categoryname is an alias, if there is one, or to the value of \n" - "categoryname, if categoryname is not an alias.\n" - "A returned categoryroot string must not be modified in any way.\n" + "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" + "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" + "axis of index ancestor_index of axis axis_id, starting with axis_id \n" + "for ancestor_index 0.\n" + "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" + "axis_id or to \". \" if there is no such ancestor. \n" + "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" + "to \". \" if there is no such equipment. \n" + "cbf_get_axis_equipment_component sets *equipment_component to the \n" + "equipment_component of axis_id or to \". \" if there is no such \n" + "equipment_component.\n" + "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" + "components of the ofset of axis_id.\n" + "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" + "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" + "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" + "is no such rotation_axis.\n" + "cbf_get_axis_setting sets *start and *increment to the corresponding \n" + "values of the axis axis_id. Any of the destination pointers may be \n" + "NULL.\n" + "cbf_get_axis_type sets axis_type to the type of axis_id.\n" + "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" + "components of the vector of axis_id.\n" + "The parameter reserved is presently unused and should be set to 0.\n" "ARGUMENTS\n" - "handle CBF handle. categoryname category name which \n" - "may be an alias. categoryroot pointer to a returned category \n" - "root name. categoryroot_in input category root name.\n" + "handle CBF handle. reserved Unused. Any \n" + "value other than 0 is invalid. axis_id Axis id. \n" + "ancestor_index Integer index of the desired ancestor, starting \n" + "with 0 for the current axis_id. ancestor Pointer to \n" + "destination ancestor name pointer. depends_on Pointer to \n" + "destination depends_on name pointer. equipment Pointer to \n" + "destination equipment name pointer. equipment_component Pointer to \n" + "destination equipment_component name pointer. offset1 \n" + "Pointer to destination first offset component value. offset2 \n" + " Pointer to destination second offset component value. offset3 \n" + " Pointer to destination third offset component value. \n" + "rotation Pointer to destination rotation value. \n" + "rotation_axis Pointer to destination rotation_axisn name \n" + "pointer. start Pointer to the destination start \n" + "value. increment Pointer to the destination increment \n" + "value. type Pointer to destination axis type of type \n" + ". vector1 Pointer to destination first vector component \n" + "value. vector2 Pointer to destination second vector \n" + "component value. vector3 Pointer to destination third \n" + "vector component value.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_axis_offset", _wrap_cbf_handle_struct_get_axis_offset, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_axis_rotation_axis", _wrap_cbf_handle_struct_get_axis_rotation_axis, METH_VARARGS, "\n" "\n" - "Returns : Float offset1,Float offset2,Float offset3\n" + "Returns : String\n" "*args : String axis_id\n" "\n" - "C prototype: int cbf_get_axis_offset (cbf_handle handle, const char *axis_id,\n" - " double *offset1, double *offset2, double *offset3);\n" + "C prototype: int cbf_get_axis_rotation_axis (cbf_handle handle,\n" + " const char *axis_id, const char * *rotation_axis);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" @@ -27802,1044 +27286,1009 @@ static PyMethodDef SwigMethods[] = { "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_pixel_size_fs", _wrap_cbf_handle_struct_set_pixel_size_fs, METH_VARARGS, (char *)"\n" - "\n" - "Returns : \n" - "*args : Int element_number,Int axis_number,Float pixel size\n" - "\n" - "C prototype: int cbf_set_pixel_size_fs(cbf_handle handle,\n" - " unsigned int element_number, int axis_number,\n" - " double psize);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the \n" - ""e;size"e; column of the \"array_structure_list \" category \n" - "at the row which matches axis axis_number of the detector element \n" - "element_number converting the double pixel size psize from meters to \n" - "millimeters in storing it in the \"size \" column for the axis \n" - "axis_number of the detector element element_number. The axis_number \n" - "is numbered from 1, starting with the slowest axis. \n" - "cbf_set_pixel_size_fs sets the item\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_insert_row", _wrap_cbf_handle_struct_insert_row, METH_VARARGS, (char *)"\n" - "\n" - "Returns : \n" - "*args : Integer\n" - "\n" - "C prototype: int cbf_insert_row (cbf_handle handle, unsigned int rownumber);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_insert_row adds a new row to the current category. The new row is \n" - "inserted as row rownumber and existing rows starting from rownumber \n" - "are moved up by 1. The new row becomes the current row.\n" - "If the category has fewer than rownumber rows, the function returns \n" - "CBF_NOTFOUND.\n" - "The row numbers start from 0.\n" - "ARGUMENTS\n" - "handle CBF handle. rownumber The row number of the new row.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_new_column", _wrap_cbf_handle_struct_new_column, METH_VARARGS, (char *)"\n" - "\n" - "Returns : string\n" - "*args : \n" - "\n" - "C prototype: int cbf_new_column (cbf_handle handle, const char *columnname);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_new_column creates a new column in the current category with name \n" - "columnname and makes it the current column.\n" - "If a column with this name already exists, the existing column \n" - "becomes the current category.\n" - "ARGUMENTS\n" - "handle CBF handle. columnname The name of the new column.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_get_real_3d_image_as_string", _wrap_cbf_handle_struct_get_real_3d_image_as_string, METH_VARARGS, (char *)"\n" - "\n" - "Returns : (Binary)String\n" - "*args : int element_number,int elsize,int ndimslow,int ndimmid,int ndimfast\n" - "\n" - "C prototype: int cbf_get_real_3d_image (cbf_handle handle,\n" - " unsigned int reserved, unsigned int element_number,\n" - " void *array, size_t elsize, size_t ndimslow,\n" - " size_t ndimmid, size_t ndimfast);\n" - "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" - "array for element number element_number into an array. The array \n" - "consists of ndimslow *ndimfast elements of elsize bytes each, \n" - "starting at array. The elements are signed if elsign is non-0 and \n" - "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" - "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" - "for element number element_number into an array. A real array is \n" - "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" - "cbf_get_3d_image_sf read the 3D image array for element number \n" - "element_number into an array. The array consists of ndimslow *ndimmid \n" - "*ndimfast elements of elsize bytes each, starting at array. The \n" - "elements are signed if elsign is non-0 and unsigned otherwise. \n" - "cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" - "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" - "floats for element number element_number into an array. A real array \n" - "is always signed.\n" - "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" - "with no suffix and the calls _sf calls give the dimensions in \n" - "slow-to-fast order\n" - "The structure of the array as a 1-, 2- or 3-dimensional array should \n" - "agree with the structure of the array given in the \n" - "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" - "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" - "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" - "being processed. If the array is 2-dimensional and a 3D call is used, \n" - "ndimslow and ndimmid should be the\n" - "\n" - ""}, - { (char *)"cbf_handle_struct_get_integration_time", _wrap_cbf_handle_struct_get_integration_time, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_axis_setting", _wrap_cbf_handle_struct_get_axis_setting, METH_VARARGS, "\n" "\n" - "Returns : Float time\n" - "*args : \n" + "Returns : Float start,Float increment\n" + "*args : String axis_id\n" "\n" - "C prototype: int cbf_get_integration_time (cbf_handle handle,\n" - " unsigned int reserved, double *time);\n" + "C prototype: int cbf_get_axis_setting (cbf_handle handle,\n" + " unsigned int reserved, const char *axis_id, double *start,\n" + " double *increment);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_integration_time sets *time to the integration time in \n" - "seconds. The parameter reserved is presently unused and should be set \n" - "to 0.\n" + "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" + "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" + "axis of index ancestor_index of axis axis_id, starting with axis_id \n" + "for ancestor_index 0.\n" + "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" + "axis_id or to \". \" if there is no such ancestor. \n" + "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" + "to \". \" if there is no such equipment. \n" + "cbf_get_axis_equipment_component sets *equipment_component to the \n" + "equipment_component of axis_id or to \". \" if there is no such \n" + "equipment_component.\n" + "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" + "components of the ofset of axis_id.\n" + "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" + "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" + "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" + "is no such rotation_axis.\n" + "cbf_get_axis_setting sets *start and *increment to the corresponding \n" + "values of the axis axis_id. Any of the destination pointers may be \n" + "NULL.\n" + "cbf_get_axis_type sets axis_type to the type of axis_id.\n" + "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" + "components of the vector of axis_id.\n" + "The parameter reserved is presently unused and should be set to 0.\n" "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any value other than 0 is \n" - "invalid. time Pointer to the destination time.\n" + "handle CBF handle. reserved Unused. Any \n" + "value other than 0 is invalid. axis_id Axis id. \n" + "ancestor_index Integer index of the desired ancestor, starting \n" + "with 0 for the current axis_id. ancestor Pointer to \n" + "destination ancestor name pointer. depends_on Pointer to \n" + "destination depends_on name pointer. equipment Pointer to \n" + "destination equipment name pointer. equipment_component Pointer to \n" + "destination equipment_component name pointer. offset1 \n" + "Pointer to destination first offset component value. offset2 \n" + " Pointer to destination second offset component value. offset3 \n" + " Pointer to destination third offset component value. \n" + "rotation Pointer to destination rotation value. \n" + "rotation_axis Pointer to destination rotation_axisn name \n" + "pointer. start Pointer to the destination start \n" + "value. increment Pointer to the destination increment \n" + "value. type Pointer to destination axis type of type \n" + ". vector1 Pointer to destination first vector component \n" + "value. vector2 Pointer to destination second vector \n" + "component value. vector3 Pointer to destination third \n" + "vector component value.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_realarray", _wrap_cbf_handle_struct_set_realarray, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_axis_type", _wrap_cbf_handle_struct_get_axis_type, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : int compression,int binary_id,(binary) String data,int elsize,\n" - " int elements\n" + "Returns : String\n" + "*args : String axis_id\n" "\n" - "C prototype: int cbf_set_realarray (cbf_handle handle,\n" - " unsigned int compression, int binary_id, void *array,\n" - " size_t elsize, size_t elements);\n" + "C prototype: int cbf_get_axis_type (cbf_handle handle, const char *axis_id,\n" + " cbf_axis_type *axis_type);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_integerarray sets the binary value of the item at the current \n" - "column and row to an integer array. The array consists of elements \n" - "elements of elsize bytes each, starting at array. The elements are \n" - "signed if elsigned is non-0 and unsigned otherwise. binary_id is the \n" - "binary section identifier. cbf_set_realarray sets the binary value of \n" - "the item at the current column and row to an integer array. The array \n" - "consists of elements elements of elsize bytes each, starting at \n" - "array. binary_id is the binary section identifier.\n" - "The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, \n" - "cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, \n" - "cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants \n" - "allow the data header values of byteorder, dimfast, dimmid, dimslow \n" - "and padding to be set to the data byte order, the fastest, second \n" - "fastest and third fastest array dimensions and the size in byte of \n" - "the post data padding to be used.\n" - "The array will be compressed using the compression scheme specifed by \n" - "compression. Currently, the available schemes are:\n" - "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" - "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" - " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" - " Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" - "\"nibble_offset \" compression. CBF_NONE No compression. \n" - "NOTE: This scheme is by far the slowest of the four and uses much \n" - "more disk space. It is intended for routine use with small arrays \n" - "only. With large arrays (like images) it should be used only for \n" - "debugging.\n" - "The values compressed are limited to 64 bits. If any element in the \n" - "array is larger than 64 bits, the value compressed is the nearest \n" - "64-bit value.\n" - "Currently, the source array must consist of chars, shorts or ints \n" - "(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or \n" - "floats for cbf_set_realarray. If elsize is not equal to sizeof \n" - "(char), sizeof (short) or sizeof (int), the function returns \n" - "CBF_ARGUMENT.\n" + "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" + "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" + "axis of index ancestor_index of axis axis_id, starting with axis_id \n" + "for ancestor_index 0.\n" + "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" + "axis_id or to \". \" if there is no such ancestor. \n" + "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" + "to \". \" if there is no such equipment. \n" + "cbf_get_axis_equipment_component sets *equipment_component to the \n" + "equipment_component of axis_id or to \". \" if there is no such \n" + "equipment_component.\n" + "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" + "components of the ofset of axis_id.\n" + "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" + "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" + "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" + "is no such rotation_axis.\n" + "cbf_get_axis_setting sets *start and *increment to the corresponding \n" + "values of the axis axis_id. Any of the destination pointers may be \n" + "NULL.\n" + "cbf_get_axis_type sets axis_type to the type of axis_id.\n" + "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" + "components of the vector of axis_id.\n" + "The parameter reserved is presently unused and should be set to 0.\n" "ARGUMENTS\n" - "handle CBF handle. compression Compression method to use. \n" - "binary_id Integer binary identifier. array Pointer to the \n" - "source array. elsize Size in bytes of each source array \n" - "element. elsigned Set to non-0 if the source array elements are \n" - "signed. elements: The number of elements in the array.\n" + "handle CBF handle. reserved Unused. Any \n" + "value other than 0 is invalid. axis_id Axis id. \n" + "ancestor_index Integer index of the desired ancestor, starting \n" + "with 0 for the current axis_id. ancestor Pointer to \n" + "destination ancestor name pointer. depends_on Pointer to \n" + "destination depends_on name pointer. equipment Pointer to \n" + "destination equipment name pointer. equipment_component Pointer to \n" + "destination equipment_component name pointer. offset1 \n" + "Pointer to destination first offset component value. offset2 \n" + " Pointer to destination second offset component value. offset3 \n" + " Pointer to destination third offset component value. \n" + "rotation Pointer to destination rotation value. \n" + "rotation_axis Pointer to destination rotation_axisn name \n" + "pointer. start Pointer to the destination start \n" + "value. increment Pointer to the destination increment \n" + "value. type Pointer to destination axis type of type \n" + ". vector1 Pointer to destination first vector component \n" + "value. vector2 Pointer to destination second vector \n" + "component value. vector3 Pointer to destination third \n" + "vector component value.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_element_id", _wrap_cbf_handle_struct_get_element_id, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_axis_vector", _wrap_cbf_handle_struct_get_axis_vector, METH_VARARGS, "\n" "\n" - "Returns : String\n" - "*args : Integer element_number\n" + "Returns : Float vector1,Float vector2,Float vector3\n" + "*args : String axis_id\n" "\n" - "C prototype: int cbf_get_element_id (cbf_handle handle,\n" - " unsigned int element_number, const char **element_id);\n" + "C prototype: int cbf_get_axis_vector (cbf_handle handle, const char *axis_id,\n" + " double *vector1, double *vector2, double *vector3);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_element_number sets element_number to a number that can be \n" - "used in other cbf_simple calls to identify the detector element \n" - "element_id and optionally the specific array_id> and \n" - "array_section_id. cbf_get_element_id sets *element_id to point to the \n" - "ASCII value of the element_number'th \n" - "\"diffrn_data_frame.detector_element_id \" entry, counting from 0. \n" - "The element_number is the ordinal of the detector element in the \n" - "DIFFRN_DETECTOR_ELEMENT category. If an array_section_id is specified \n" - "(i.e. is not NULL), the element_number is the sum of the ordinal of \n" - "the detector element plus the number of detector elements multiplied \n" - "by the ordinal of array_section_id for the specified array_id> in the \n" - "ARRAY_STRUCTURE_LIST_SECTION category.\n" - "If the detector element does not exist, the function returns \n" - "CBF_NOTFOUND.\n" - "The element_id will be valid as long as the item exists and has not \n" - "been set to a new value.\n" - "The element_id must not be modified by the program in any way.\n" + "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" + "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" + "axis of index ancestor_index of axis axis_id, starting with axis_id \n" + "for ancestor_index 0.\n" + "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" + "axis_id or to \". \" if there is no such ancestor. \n" + "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" + "to \". \" if there is no such equipment. \n" + "cbf_get_axis_equipment_component sets *equipment_component to the \n" + "equipment_component of axis_id or to \". \" if there is no such \n" + "equipment_component.\n" + "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" + "components of the ofset of axis_id.\n" + "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" + "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" + "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" + "is no such rotation_axis.\n" + "cbf_get_axis_setting sets *start and *increment to the corresponding \n" + "values of the axis axis_id. Any of the destination pointers may be \n" + "NULL.\n" + "cbf_get_axis_type sets axis_type to the type of axis_id.\n" + "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" + "components of the vector of axis_id.\n" + "The parameter reserved is presently unused and should be set to 0.\n" "ARGUMENTS\n" - "handle CBF handle. element_number The number of the \n" - "detector element counting from 0 by order of appearance in the \n" - "\"diffrn_data_frame \" category. element_id Pointer to the \n" - "destination string for cbf_get_element_id, but the string itself for \n" - "cbf_get_element_number. array_id The optional array id or \n" - "NULL. array_section_id The optional array_section_id or NULL.\n" + "handle CBF handle. reserved Unused. Any \n" + "value other than 0 is invalid. axis_id Axis id. \n" + "ancestor_index Integer index of the desired ancestor, starting \n" + "with 0 for the current axis_id. ancestor Pointer to \n" + "destination ancestor name pointer. depends_on Pointer to \n" + "destination depends_on name pointer. equipment Pointer to \n" + "destination equipment name pointer. equipment_component Pointer to \n" + "destination equipment_component name pointer. offset1 \n" + "Pointer to destination first offset component value. offset2 \n" + " Pointer to destination second offset component value. offset3 \n" + " Pointer to destination third offset component value. \n" + "rotation Pointer to destination rotation value. \n" + "rotation_axis Pointer to destination rotation_axisn name \n" + "pointer. start Pointer to the destination start \n" + "value. increment Pointer to the destination increment \n" + "value. type Pointer to destination axis type of type \n" + ". vector1 Pointer to destination first vector component \n" + "value. vector2 Pointer to destination second vector \n" + "component value. vector3 Pointer to destination third \n" + "vector component value.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_image_sf_as_string", _wrap_cbf_handle_struct_get_image_sf_as_string, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_axis_setting", _wrap_cbf_handle_struct_set_axis_setting, METH_VARARGS, "\n" "\n" - "Returns : (Binary)String\n" - "*args : int element_number,int elsize,int elsign,int ndimslow,int ndimfast\n" + "Returns : \n" + "*args : String axis_id,Float start,Float increment\n" "\n" - "C prototype: int cbf_get_image_sf (cbf_handle handle, unsigned int reserved,\n" - " unsigned int element_number, void *array, size_t elsize,\n" - " int elsign, size_t ndimslow, size_t ndimfast);\n" + "C prototype: int cbf_set_axis_setting (cbf_handle handle,\n" + " unsigned int reserved, const char *axis_id, double start,\n" + " double increment);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_image, cbf_get_image_fs and cbf_get_image_sf read the image \n" - "array for element number element_number into an array. The array \n" - "consists of ndimslow *ndimfast elements of elsize bytes each, \n" - "starting at array. The elements are signed if elsign is non-0 and \n" - "unsigned otherwise. cbf_get_real_image, cbf_get_real_image_fs and \n" - "cbf_get_real_image_sf read the image array of IEEE doubles or floats \n" - "for element number element_number into an array. A real array is \n" - "always signed. cbf_get_3d_image, cbf_get_3d_image_fs and \n" - "cbf_get_3d_image_sf read the 3D image array for element number \n" - "element_number into an array. The array consists of ndimslow *ndimmid \n" - "*ndimfast elements of elsize bytes each, starting at array. The \n" - "elements are signed if elsign is non-0 and unsigned otherwise. \n" - "cbf_get_real_3d_image, cbf_get_real_3d_image_fs, \n" - "cbf_get_real_3d_image_sf reads the 3D image array of IEEE doubles or \n" - "floats for element number element_number into an array. A real array \n" - "is always signed.\n" - "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" - "with no suffix and the calls _sf calls give the dimensions in \n" - "slow-to-fast order\n" - "The structure of the array as a 1-, 2- or 3-dimensional array should \n" - "agree with the structure of the array given in the \n" - "ARRAY_STRUCTURE_LIST category. If the array is 1-dimensional, \n" - "ndimslow should be the array size and ndimfast and, for the 3D calls, \n" - "ndimmid, should be set to 1 both in the call and in the imgCIF data \n" - "being processed. If the array is 2-dimensional and a 3D call is used, \n" - "ndimslow and ndimmid should be the\n" + "cbf_set_axis_setting sets the starting and increment values of the \n" + "axis axis_id to start and increment.\n" + "The parameter reserved is presently unused and should be set to 0.\n" + "ARGUMENTS\n" + "handle CBF handle. reserved Unused. Any value other than 0 is \n" + "invalid. axis_id Axis id. start Start value. increment \n" + "Increment value.\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_construct_positioner", _wrap_cbf_handle_struct_construct_positioner, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_construct_goniometer", _wrap_cbf_handle_struct_construct_goniometer, METH_O, "\n" "\n" - "Returns : pycbf positioner object\n" - "*args : String axis_id\n" + "Returns : pycbf goniometer object\n" + "*args : \n" "\n" - "C prototype: int cbf_construct_positioner (cbf_handle handle,\n" - " cbf_positioner *positioner, const char *axis_id);\n" + "C prototype: int cbf_construct_goniometer (cbf_handle handle,\n" + " cbf_goniometer *goniometer);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_construct_positioner constructs a positioner object for the axis \n" - "given by axis_id using the description in the CBF object handle and \n" - "initialises the positioner handle *positioner.\n" - "cbf_construct_reference positioner constructs a positioner object for \n" - "the axis given by axis_id using the description in the CBF object \n" - "handle and initialises the detector handle *detector using the \n" - "reference settings of the axes.\n" + "cbf_construct_goniometer constructs a goniometer object using the \n" + "description in the CBF object handle and initialises the goniometer \n" + "handle *goniometer.\n" "ARGUMENTS\n" - "handle CBF handle. detector Pointer to the destination detector \n" - "handle. axis_id The identifier of the axis in the \"axis \" \n" - "category.\n" + "handle CBF handle. goniometer Pointer to the destination \n" + "goniometer handle.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_3d_image_size_fs", _wrap_cbf_handle_struct_get_3d_image_size_fs, METH_VARARGS, (char *)"cbf_handle_struct_get_3d_image_size_fs(cbf_handle_struct self, unsigned int element_number)"}, - { (char *)"cbf_handle_struct_set_value", _wrap_cbf_handle_struct_set_value, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_construct_detector", _wrap_cbf_handle_struct_construct_detector, METH_VARARGS, "\n" "\n" - "Returns : string\n" - "*args : \n" + "Returns : pycbf detector object\n" + "*args : Integer element_number\n" "\n" - "C prototype: int cbf_set_value (cbf_handle handle, const char *value);\n" + "C prototype: int cbf_construct_detector (cbf_handle handle,\n" + " cbf_detector *detector, unsigned int element_number);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_value sets the item at the current column and row to the \n" - "ASCII value value.\n" + "cbf_construct_detector constructs a detector object for detector \n" + "element number element_number using the description in the CBF object \n" + "handle and initialises the detector handle *detector.\n" + "cbf_construct_reference_detector constructs a detector object for \n" + "detector element number element_number using the description in the \n" + "CBF object handle and initialises the detector handle *detector using \n" + "the reference settings of the axes. cbf_require_reference_detector is \n" + "similar, but try to force the creations of missing intermediate \n" + "categories needed to construct a detector object.\n" "ARGUMENTS\n" - "handle CBF handle. value ASCII value.\n" + "handle CBF handle. detector Pointer to the \n" + "destination detector handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_current_timestamp", _wrap_cbf_handle_struct_set_current_timestamp, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_construct_reference_detector", _wrap_cbf_handle_struct_construct_reference_detector, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : Integer timezone\n" + "Returns : pycbf detector object\n" + "*args : Integer element_number\n" "\n" - "C prototype: int cbf_set_current_timestamp (cbf_handle handle,\n" - " unsigned int reserved, int timezone);\n" + "C prototype: int cbf_construct_reference_detector (cbf_handle handle,\n" + " cbf_detector *detector, unsigned int element_number);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_current_timestamp sets the collection timestamp to the \n" - "current time. The timezone difference from UTC in minutes is set to \n" - "timezone. If no timezone is desired, timezone should be \n" - "CBF_NOTIMEZONE. If no timezone is used, the timest amp will be UTC. \n" - "The parameter reserved is presently unused and should be set to 0.\n" - "The new timestamp will have a precision of 1 second.\n" + "cbf_construct_detector constructs a detector object for detector \n" + "element number element_number using the description in the CBF object \n" + "handle and initialises the detector handle *detector.\n" + "cbf_construct_reference_detector constructs a detector object for \n" + "detector element number element_number using the description in the \n" + "CBF object handle and initialises the detector handle *detector using \n" + "the reference settings of the axes. cbf_require_reference_detector is \n" + "similar, but try to force the creations of missing intermediate \n" + "categories needed to construct a detector object.\n" "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any value other than 0 is \n" - "invalid. timezone Timezone difference from UTC in minutes or \n" - "CBF_NOTIMEZONE.\n" + "handle CBF handle. detector Pointer to the \n" + "destination detector handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_require_doublevalue", _wrap_cbf_handle_struct_require_doublevalue, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_require_reference_detector", _wrap_cbf_handle_struct_require_reference_detector, METH_VARARGS, "\n" "\n" - "Returns : Float Number\n" - "*args : Float Default\n" + "Returns : pycbf detector object\n" + "*args : Integer element_number\n" "\n" - "C prototype: int cbf_require_doublevalue (cbf_handle handle, double *number,\n" - " double defaultvalue);\n" + "C prototype: int cbf_require_reference_detector (cbf_handle handle,\n" + " cbf_detector *detector, unsigned int element_number);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_doublevalue sets *number to the value of the ASCII item at \n" - "the current column and row interpreted as a decimal floating-point \n" - "number. cbf_require_doublevalue sets *number to the value of the \n" - "ASCII item at the current column and row interpreted as a decimal \n" - "floating-point number, setting it to defaultvalue if necessary.\n" - "If the value is not ASCII, the function returns CBF_BINARY.\n" + "cbf_construct_detector constructs a detector object for detector \n" + "element number element_number using the description in the CBF object \n" + "handle and initialises the detector handle *detector.\n" + "cbf_construct_reference_detector constructs a detector object for \n" + "detector element number element_number using the description in the \n" + "CBF object handle and initialises the detector handle *detector using \n" + "the reference settings of the axes. cbf_require_reference_detector is \n" + "similar, but try to force the creations of missing intermediate \n" + "categories needed to construct a detector object.\n" "ARGUMENTS\n" - "handle CBF handle. number Pointer to the destination \n" - "number. defaultvalue default number value.\n" + "handle CBF handle. detector Pointer to the \n" + "destination detector handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_rewind_datablock", _wrap_cbf_handle_struct_rewind_datablock, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_construct_positioner", _wrap_cbf_handle_struct_construct_positioner, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : \n" + "Returns : pycbf positioner object\n" + "*args : String axis_id\n" "\n" - "C prototype: int cbf_rewind_datablock (cbf_handle handle);\n" + "C prototype: int cbf_construct_positioner (cbf_handle handle,\n" + " cbf_positioner *positioner, const char *axis_id);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_rewind_datablock makes the first data block the current data \n" - "block.\n" - "If there are no data blocks, the function returns CBF_NOTFOUND.\n" - "The current category becomes undefined.\n" + "cbf_construct_positioner constructs a positioner object for the axis \n" + "given by axis_id using the description in the CBF object handle and \n" + "initialises the positioner handle *positioner.\n" + "cbf_construct_reference positioner constructs a positioner object for \n" + "the axis given by axis_id using the description in the CBF object \n" + "handle and initialises the detector handle *detector using the \n" + "reference settings of the axes.\n" "ARGUMENTS\n" - "handle CBF handle.\n" + "handle CBF handle. detector Pointer to the destination detector \n" + "handle. axis_id The identifier of the axis in the \"axis \" \n" + "category.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_require_column_value", _wrap_cbf_handle_struct_require_column_value, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_construct_reference_positioner", _wrap_cbf_handle_struct_construct_reference_positioner, METH_VARARGS, "\n" "\n" - "Returns : String Name\n" - "*args : String columnnanme,String Default\n" + "Returns : pycbf positioner object\n" + "*args : String axis_id\n" "\n" - "C prototype: int cbf_require_column_value (cbf_handle handle,\n" - " const char *columnname, const char **value,\n" - " const char *defaultvalue);\n" + "C prototype: int cbf_construct_reference_positioner (cbf_handle handle,\n" + " cbf_positioner *positioner, const char *axis_id);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_require_column_doublevalue sets *value to the ASCII item at the \n" - "current row for the column given with the name given by *columnname, \n" - "or to the string given by defaultvalue if the item cannot be found.\n" + "cbf_construct_positioner constructs a positioner object for the axis \n" + "given by axis_id using the description in the CBF object handle and \n" + "initialises the positioner handle *positioner.\n" + "cbf_construct_reference positioner constructs a positioner object for \n" + "the axis given by axis_id using the description in the CBF object \n" + "handle and initialises the detector handle *detector using the \n" + "reference settings of the axes.\n" "ARGUMENTS\n" - "handle CBF handle. columnname Name of the column \n" - "containing the number. value pointer to the location to \n" - "receive the value. defaultvalue Value to use if the requested \n" - "column and value cannot be found.\n" + "handle CBF handle. detector Pointer to the destination detector \n" + "handle. axis_id The identifier of the axis in the \"axis \" \n" + "category.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_dictionary", _wrap_cbf_handle_struct_get_dictionary, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_pixel_size", _wrap_cbf_handle_struct_get_pixel_size, METH_VARARGS, "\n" "\n" - "Returns : CBFHandle dictionary\n" - "*args : \n" + "Returns : Float pixel_size\n" + "*args : Int element_number,Int axis_number\n" "\n" - "C prototype: int cbf_get_dictionary (cbf_handle handle,\n" - " cbf_handle * dictionary);\n" + "C prototype: int cbf_get_pixel_size (cbf_handle handle,\n" + " unsigned int element_number, int axis_number,\n" + " double *psize);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_dictionary sets *dictionary to the handle of a CBF which has \n" - "been associated with the CBF handle by cbf_set_dictionary. \n" - "cbf_set_dictionary associates the CBF handle dictionary_in with \n" - "handle as its dictionary. cbf_require_dictionary sets *dictionary to \n" - "the handle of a CBF which has been associated with the CBF handle by \n" - "cbf_set_dictionary or creates a new empty CBF and associates it with \n" - "handle, returning the new handle in *dictionary.\n" + "cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to \n" + "the double value in millimeters of the axis axis_number of the \n" + "detector element element_number. The axis_number is numbered from 1, \n" + "starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to \n" + "point to the double value in millimeters of the axis axis_number of \n" + "the detector element element_number. The axis_number is numbered from \n" + "1, starting with the fastest axis.\n" + "If a negative axis number is given, the order of axes is reversed, so \n" + "that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the \n" + "fastest axis for cbf_get_pixel_size_sf.\n" + "If the pixel size is not given explcitly in the \"array_element_size \n" + "\" category, the function returns CBF_NOTFOUND.\n" "ARGUMENTS\n" - "handle CBF handle. dictionary Pointer to CBF handle of \n" - "dictionary. dictionary_in CBF handle of dcitionary.\n" + "handle CBF handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. axis_number The number of the \n" + "axis, starting from 1 for the fastest for cbf_get_pixel_size and \n" + "cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. \n" + "psize Pointer to the destination pixel size.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_reset_saveframe", _wrap_cbf_handle_struct_reset_saveframe, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_pixel_size_fs", _wrap_cbf_handle_struct_get_pixel_size_fs, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : \n" + "Returns : Float pixel_size\n" + "*args : Int element_number,Int axis_number\n" "\n" - "C prototype: int cbf_reset_saveframe (cbf_handle handle);\n" + "C prototype: int cbf_get_pixel_size_fs(cbf_handle handle,\n" + " unsigned int element_number, int axis_number,\n" + " double *psize);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_reset_datablock deletes all categories from the current data \n" - "block. cbf_reset_saveframe deletes all categories from the current \n" - "save frame.\n" + "cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to \n" + "the double value in millimeters of the axis axis_number of the \n" + "detector element element_number. The axis_number is numbered from 1, \n" + "starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to \n" + "point to the double value in millimeters of the axis axis_number of \n" + "the detector element element_number. The axis_number is numbered from \n" + "1, starting with the fastest axis.\n" + "If a negative axis number is given, the order of axes is reversed, so \n" + "that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the \n" + "fastest axis for cbf_get_pixel_size_sf.\n" + "If the pixel size is not given explcitly in the \"array_element_size \n" + "\" category, the function returns CBF_NOTFOUND.\n" "ARGUMENTS\n" - "handle CBF handle.\n" + "handle CBF handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. axis_number The number of the \n" + "axis, starting from 1 for the fastest for cbf_get_pixel_size and \n" + "cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. \n" + "psize Pointer to the destination pixel size.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_reciprocal_cell", _wrap_cbf_handle_struct_set_reciprocal_cell, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_pixel_size_sf", _wrap_cbf_handle_struct_get_pixel_size_sf, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : double cell[6]\n" + "Returns : Float pixel_size\n" + "*args : Int element_number,Int axis_number\n" "\n" - "C prototype: int cbf_set_reciprocal_cell (cbf_handle handle, double cell[6],\n" - " double cell_esd[6] );\n" + "C prototype: int cbf_get_pixel_size_sf(cbf_handle handle,\n" + " unsigned int element_number, int axis_number,\n" + " double *psize);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_reciprocal_cell sets the reciprocal cell parameters to the \n" - "double values given in cell[0:2] for the reciprocal cell edge lengths \n" - "a*, b* and c* in AAngstroms-1, the double values given in cell[3:5] \n" - "for the reciprocal cell angles a*, b* and g* in degrees, the double \n" - "values given in cell_esd[0:2] for the estimated strandard deviations \n" - "of the reciprocal cell edge lengths a*, b* and c* in AAngstroms, and \n" - "the double values given in cell_esd[3:5] for the estimated standard \n" - "deviations of the reciprocal cell angles a*, b* and g* in degrees.\n" - "The values are placed in the first row of the \"cell \" category. If \n" - "no value has been given for \"_cell.entry_id \", it is set to the \n" - "value of the \"diffrn.id \" entry of the current data block.\n" - "cell or cell_esd may be NULL.\n" - "If cell is NULL, the reciprocal cell parameters are not set.\n" - "If cell_esd is NULL, the reciprocal cell parameter esds are not set.\n" - "If the \"cell \" category is not present, it is created. If any of \n" - "the necessary columns are not present, they are created.\n" + "cbf_get_pixel_size and cbf_get_pixel_size_sf set *psize to point to \n" + "the double value in millimeters of the axis axis_number of the \n" + "detector element element_number. The axis_number is numbered from 1, \n" + "starting with the slowest axis. cbf_get_pixel_size_fs sets *psize to \n" + "point to the double value in millimeters of the axis axis_number of \n" + "the detector element element_number. The axis_number is numbered from \n" + "1, starting with the fastest axis.\n" + "If a negative axis number is given, the order of axes is reversed, so \n" + "that -1 specifies the slowest axis for cbf_get_pixel_size_fs and the \n" + "fastest axis for cbf_get_pixel_size_sf.\n" + "If the pixel size is not given explcitly in the \"array_element_size \n" + "\" category, the function returns CBF_NOTFOUND.\n" "ARGUMENTS\n" - "handle CBF handle. cell Pointer to the array of 6 doubles \n" - "for the reciprocal cell parameters. cell_esd Pointer to the array \n" - "of 6 doubles for the reciprocal cell parameter esds.\n" + "handle CBF handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. axis_number The number of the \n" + "axis, starting from 1 for the fastest for cbf_get_pixel_size and \n" + "cbf_get_pixel_size_fs and the slowest for cbf_get_pixel_size_sf. \n" + "psize Pointer to the destination pixel size.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_reciprocal_cell_esd", _wrap_cbf_handle_struct_set_reciprocal_cell_esd, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_pixel_size", _wrap_cbf_handle_struct_set_pixel_size, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : double cell_esd[6]\n" + "*args : Int element_number,Int axis_number,Float pixel size\n" "\n" - "C prototype: int cbf_set_reciprocal_cell (cbf_handle handle, double cell[6],\n" - " double cell_esd[6] );\n" + "C prototype: int cbf_set_pixel_size (cbf_handle handle,\n" + " unsigned int element_number, int axis_number,\n" + " double psize);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_reciprocal_cell sets the reciprocal cell parameters to the \n" - "double values given in cell[0:2] for the reciprocal cell edge lengths \n" - "a*, b* and c* in AAngstroms-1, the double values given in cell[3:5] \n" - "for the reciprocal cell angles a*, b* and g* in degrees, the double \n" - "values given in cell_esd[0:2] for the estimated strandard deviations \n" - "of the reciprocal cell edge lengths a*, b* and c* in AAngstroms, and \n" - "the double values given in cell_esd[3:5] for the estimated standard \n" - "deviations of the reciprocal cell angles a*, b* and g* in degrees.\n" - "The values are placed in the first row of the \"cell \" category. If \n" - "no value has been given for \"_cell.entry_id \", it is set to the \n" - "value of the \"diffrn.id \" entry of the current data block.\n" - "cell or cell_esd may be NULL.\n" - "If cell is NULL, the reciprocal cell parameters are not set.\n" - "If cell_esd is NULL, the reciprocal cell parameter esds are not set.\n" - "If the \"cell \" category is not present, it is created. If any of \n" - "the necessary columns are not present, they are created.\n" - "ARGUMENTS\n" - "handle CBF handle. cell Pointer to the array of 6 doubles \n" - "for the reciprocal cell parameters. cell_esd Pointer to the array \n" - "of 6 doubles for the reciprocal cell parameter esds.\n" - "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the \n" + ""e;size"e; column of the \"array_structure_list \" category \n" + "at the row which matches axis axis_number of the detector element \n" + "element_number converting the double pixel size psize from meters to \n" + "millimeters in storing it in the \"size \" column for the axis \n" + "axis_number of the detector element element_number. The axis_number \n" + "is numbered from 1, starting with the slowest axis. \n" + "cbf_set_pixel_size_fs sets the item\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_real_3d_image_fs", _wrap_cbf_handle_struct_set_real_3d_image_fs, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_pixel_size_fs", _wrap_cbf_handle_struct_set_pixel_size_fs, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : int element_number,int compression,(binary) String data,int elsize,\n" - " int dimfast,int dimmid,int dimslow\n" + "*args : Int element_number,Int axis_number,Float pixel size\n" "\n" - "C prototype: int cbf_set_real_3d_image_fs(cbf_handle handle,\n" - " unsigned int reserved, unsigned int element_number,\n" - " unsigned int compression, void *array,size_t elsize,\n" - " size_t ndimfast, size_t ndimmid, size_t ndimslow);\n" + "C prototype: int cbf_set_pixel_size_fs(cbf_handle handle,\n" + " unsigned int element_number, int axis_number,\n" + " double psize);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" - "array for element number element_number. The array consists of \n" - "ndimfast *ndimslow elements of elsize bytes each, starting at array. \n" - "The elements are signed if elsign is non-zero and unsigned otherwise. \n" - "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" - "write the image array for element number element_number. The array \n" - "consists of ndimfast *ndimslow IEEE double or float elements of \n" - "elsize bytes each, starting at array. cbf_set_3d_image, \n" - "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" - "for element number element_number. The array consists of ndimfast \n" - "*ndimmid *ndimslow elements of elsize bytes each, starting at array. \n" - "The elements are signed if elsign is non-0 and unsigned otherwise. \n" - "cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" - "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" - "element_number. The array consists of ndimfast *ndimmid *ndimslow \n" - "IEEE double or float elements of elsize bytes each, starting at \n" - "array.\n" - "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" - "with no suffix and the calls _sf calls give the dimensions in \n" - "slow-to-fast order\n" - "If the array is 1-dimensional, ndimslow should be the array size and \n" - "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" - "array is 2-dimensional and the 3D calls are used, ndimslow and \n" - "ndimmid should be used for the array dimensions and ndimfast should \n" - "be set to 1.\n" - "The array will be compressed using the compression scheme specifed by \n" - "compression. Currently, the available schemes are:\n" - "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" - "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" - " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" - "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" - "\"nibble_offset \" compression. CBF_NONE No compression.\n" - "The values compressed are limited to 64 bits. If any element in the \n" - "array is larger than 64 bits, the value compressed is the nearest \n" - "64-bit value.\n" - "Currently, the source array must consist of chars, shorts or ints \n" - "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" - "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" - "(int), sizeof(double) or sizeof(float), the function returns \n" - "CBF_ARGUMENT.\n" - "The parameter reserved is presently unused and should be set to 0.\n" + "cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the \n" + ""e;size"e; column of the \"array_structure_list \" category \n" + "at the row which matches axis axis_number of the detector element \n" + "element_number converting the double pixel size psize from meters to \n" + "millimeters in storing it in the \"size \" column for the axis \n" + "axis_number of the detector element element_number. The axis_number \n" + "is numbered from 1, starting with the slowest axis. \n" + "cbf_set_pixel_size_fs sets the item\n" + "\n" + ""}, + { "cbf_handle_struct_set_pixel_size_sf", _wrap_cbf_handle_struct_set_pixel_size_sf, METH_VARARGS, "\n" + "\n" + "Returns : \n" + "*args : Int element_number,Int axis_number,Float pixel size\n" + "\n" + "C prototype: int cbf_set_pixel_size_sf(cbf_handle handle,\n" + " unsigned int element_number, int axis_number,\n" + " double psize);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_set_pixel_size and cbf_set_pixel_size_sf set the item in the \n" + ""e;size"e; column of the \"array_structure_list \" category \n" + "at the row which matches axis axis_number of the detector element \n" + "element_number converting the double pixel size psize from meters to \n" + "millimeters in storing it in the \"size \" column for the axis \n" + "axis_number of the detector element element_number. The axis_number \n" + "is numbered from 1, starting with the slowest axis. \n" + "cbf_set_pixel_size_fs sets the item\n" + "\n" + ""}, + { "cbf_handle_struct_get_unit_cell", _wrap_cbf_handle_struct_get_unit_cell, METH_O, "\n" + "\n" + "Returns : Float a,Float b,Float c,Float alpha,Float beta,Float gamma\n" + "*args : \n" + "\n" + "C prototype: int cbf_get_unit_cell (cbf_handle handle, double cell[6],\n" + " double cell_esd[6] );\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_unit_cell sets cell[0:2] to the double values of the cell \n" + "edge lengths a, b and c in AAngstroms, cell[3:5] to the double values \n" + "of the cell angles a, b and g in degrees, cell_esd[0:2] to the double \n" + "values of the estimated strandard deviations of the cell edge lengths \n" + "a, b and c in AAngstroms, cell_esd[3:5] to the double values of the \n" + "estimated standard deviations of the the cell angles a, b and g in \n" + "degrees.\n" + "The values returned are retrieved from the first row of the \"cell \n" + "\" category. The value of \"_cell.entry_id \" is ignored.\n" + "cell or cell_esd may be NULL.\n" + "If cell is NULL, the cell parameters are not retrieved.\n" + "If cell_esd is NULL, the cell parameter esds are not retrieved.\n" + "If the \"cell \" category is present, but some of the values are \n" + "missing, zeros are returned for the missing values.\n" "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any value other \n" - "than 0 is invalid. element_number The number of the detector \n" - "element counting from 0 by order of appearance in the \n" - "\"diffrn_data_frame \" category. compression Compression type. \n" - "array Pointer to the image array. elsize Size in \n" - "bytes of each image array element. elsigned Set to non-0 if \n" - "the image array elements are signed. ndimslow Slowest array \n" - "dimension. ndimmid Second slowest array dimension. ndimfast \n" - " Fastest array dimension.\n" + "handle CBF handle. cell Pointer to the destination array of \n" + "6 doubles for the cell parameters. cell_esd Pointer to the \n" + "destination array of 6 doubles for the cell parameter esds.\n" "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "Returns an error code on failure or 0 for success. No errors is \n" + "returned for missing values if the \"cell \" category exists.\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_doublevalue", _wrap_cbf_handle_struct_set_doublevalue, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_unit_cell_esd", _wrap_cbf_handle_struct_get_unit_cell_esd, METH_O, "cbf_handle_struct_get_unit_cell_esd(cbf_handle_struct self)"}, + { "cbf_handle_struct_set_unit_cell", _wrap_cbf_handle_struct_set_unit_cell, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : String format,Float number\n" + "*args : double cell[6]\n" "\n" - "C prototype: int cbf_set_doublevalue (cbf_handle handle, const char *format,\n" - " double number);\n" + "C prototype: int cbf_set_unit_cell (cbf_handle handle, double cell[6],\n" + " double cell_esd[6] );\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_doublevalue sets the item at the current column and row to \n" - "the floating-point value number written as an ASCII string with the \n" - "format specified by format as appropriate for the printf function.\n" + "cbf_set_unit_cell sets the cell parameters to the double values given \n" + "in cell[0:2] for the cell edge lengths a, b and c in AAngstroms, the \n" + "double values given in cell[3:5] for the cell angles a, b and g in \n" + "degrees, the double values given in cell_esd[0:2] for the estimated \n" + "strandard deviations of the cell edge lengths a, b and c in \n" + "AAngstroms, and the double values given in cell_esd[3:5] for the \n" + "estimated standard deviations of the the cell angles a, b and g in \n" + "degrees.\n" + "The values are placed in the first row of the \"cell \" category. If \n" + "no value has been given for \"_cell.entry_id \", it is set to the \n" + "value of the \"diffrn.id \" entry of the current data block.\n" + "cell or cell_esd may be NULL.\n" + "If cell is NULL, the cell parameters are not set.\n" + "If cell_esd is NULL, the cell parameter esds are not set.\n" + "If the \"cell \" category is not present, it is created. If any of \n" + "the necessary columns are not present, they are created.\n" "ARGUMENTS\n" - "handle CBF handle. format Format for the number. number \n" - "Floating-point value.\n" + "handle CBF handle. cell Pointer to the array of 6 doubles \n" + "for the cell parameters. cell_esd Pointer to the array of 6 doubles \n" + "for the cell parameter esds.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_find_category", _wrap_cbf_handle_struct_find_category, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_unit_cell_esd", _wrap_cbf_handle_struct_set_unit_cell_esd, METH_VARARGS, "\n" "\n" - "Returns : string\n" - "*args : \n" + "Returns : \n" + "*args : double cell_esd[6]\n" "\n" - "C prototype: int cbf_find_category (cbf_handle handle,\n" - " const char *categoryname);\n" + "C prototype: int cbf_set_unit_cell (cbf_handle handle, double cell[6],\n" + " double cell_esd[6] );\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_find_category makes the category in the current data block with \n" - "name categoryname the current category.\n" - "The comparison is case-insensitive.\n" - "If the category does not exist, the function returns CBF_NOTFOUND.\n" - "The current column and row become undefined.\n" + "cbf_set_unit_cell sets the cell parameters to the double values given \n" + "in cell[0:2] for the cell edge lengths a, b and c in AAngstroms, the \n" + "double values given in cell[3:5] for the cell angles a, b and g in \n" + "degrees, the double values given in cell_esd[0:2] for the estimated \n" + "strandard deviations of the cell edge lengths a, b and c in \n" + "AAngstroms, and the double values given in cell_esd[3:5] for the \n" + "estimated standard deviations of the the cell angles a, b and g in \n" + "degrees.\n" + "The values are placed in the first row of the \"cell \" category. If \n" + "no value has been given for \"_cell.entry_id \", it is set to the \n" + "value of the \"diffrn.id \" entry of the current data block.\n" + "cell or cell_esd may be NULL.\n" + "If cell is NULL, the cell parameters are not set.\n" + "If cell_esd is NULL, the cell parameter esds are not set.\n" + "If the \"cell \" category is not present, it is created. If any of \n" + "the necessary columns are not present, they are created.\n" "ARGUMENTS\n" - "handle CBF handle. categoryname The name of the category to \n" - "find.\n" + "handle CBF handle. cell Pointer to the array of 6 doubles \n" + "for the cell parameters. cell_esd Pointer to the array of 6 doubles \n" + "for the cell parameter esds.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_integerarrayparameters_wdims_fs", _wrap_cbf_handle_struct_get_integerarrayparameters_wdims_fs, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_reciprocal_cell", _wrap_cbf_handle_struct_get_reciprocal_cell, METH_O, "\n" "\n" - "Returns : int compression,int binary_id,int elsize,int elsigned,int elunsigned,\n" - " int elements,int minelement,int maxelement,char **bo,int *bolen,\n" - " int dimfast,int dimmid,int dimslow,int padding\n" + "Returns : Float astar,Float bstar,Float cstar,Float alphastar,Float betastar,\n" + " Float gammastar\n" "*args : \n" "\n" - "C prototype: int cbf_get_integerarrayparameters_wdims_fs (cbf_handle handle,\n" - " unsigned int *compression, int *binary_id, size_t *elsize,\n" - " int *elsigned, int *elunsigned, size_t *elements,\n" - " int *minelement, int *maxelement, const char **byteorder,\n" - " size_t *dimfast, size_t *dimmid, size_t *dimslow,\n" - " size_t *padding);\n" + "C prototype: int cbf_get_reciprocal_cell (cbf_handle handle, double cell[6],\n" + " double cell_esd[6] );\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_get_integerarrayparameters sets *compression, *binary_id, \n" - "*elsize, *elsigned, *elunsigned, *elements, *minelement and \n" - "*maxelement to values read from the binary value of the item at the \n" - "current column and row. This provides all the arguments needed for a \n" - "subsequent call to cbf_set_integerarray, if a copy of the array is to \n" - "be made into another CIF or CBF. cbf_get_realarrayparameters sets \n" - "*compression, *binary_id, *elsize, *elements to values read from the \n" - "binary value of the item at the current column and row. This provides \n" - "all the arguments needed for a subsequent call to cbf_set_realarray, \n" - "if a copy of the arry is to be made into another CIF or CBF.\n" - "The variants cbf_get_integerarrayparameters_wdims, \n" - "cbf_get_integerarrayparameters_wdims_fs, \n" - "cbf_get_integerarrayparameters_wdims_sf, \n" - "cbf_get_realarrayparameters_wdims, \n" - "cbf_get_realarrayparameters_wdims_fs, \n" - "cbf_get_realarrayparameters_wdims_sf set **byteorder, *dimfast, \n" - "*dimmid, *dimslow, and *padding as well, providing the additional \n" - "parameters needed for a subsequent call to cbf_set_integerarray_wdims \n" - "or cbf_set_realarray_wdims.\n" - "The value returned in *byteorder is a pointer either to the string \n" - "\"little_endian \" or to the string \"big_endian \". This should be \n" - "the byte order of the data, not necessarily of the host machine. No \n" - "attempt should be made to modify this string. At this time only \n" - "\"little_endian \" will be returned.\n" - "The values returned in *dimfast, *dimmid and *dimslow are the sizes \n" - "of the fastest changing, second fastest changing and third fastest \n" - "changing dimensions of the array, if specified, or zero, if not \n" - "specified.\n" - "The value returned in *padding is the size of the post-data padding, \n" - "if any and if specified in the data header. The value is given as a \n" - "count of octets.\n" - "If the value is not binary, the function returns CBF_ASCII.\n" + "cbf_get_reciprocal_cell sets cell[0:2] to the double values of the \n" + "reciprocal cell edge lengths a*, b* and c* in AAngstroms-1, cell[3:5] \n" + "to the double values of the reciprocal cell angles a*, b* and g* in \n" + "degrees, cell_esd[0:2] to the double values of the estimated \n" + "strandard deviations of the reciprocal cell edge lengths a*, b* and \n" + "c* in AAngstroms-1, cell_esd[3:5] to the double values of the \n" + "estimated standard deviations of the the reciprocal cell angles a*, \n" + "b* and g* in degrees.\n" + "The values returned are retrieved from the first row of the \"cell \n" + "\" category. The value of \"_cell.entry_id \" is ignored.\n" + "cell or cell_esd may be NULL.\n" + "If cell is NULL, the reciprocal cell parameters are not retrieved.\n" + "If cell_esd is NULL, the reciprocal cell parameter esds are not \n" + "retrieved.\n" + "If the \"cell \" category is present, but some of the values are \n" + "missing, zeros are returned for the missing values.\n" "ARGUMENTS\n" - "handle CBF handle. compression Compression method used. \n" - "elsize Size in bytes of each array element. binary_id \n" - "Pointer to the destination integer binary identifier. elsigned \n" - "Pointer to an integer. Set to 1 if the elements can be read as signed \n" - "integers. elunsigned Pointer to an integer. Set to 1 if the \n" - "elements can be read as unsigned integers. elements Pointer to \n" - "the destination number of elements. minelement Pointer to the \n" - "destination smallest element. maxelement Pointer to the \n" - "destination largest element. byteorder Pointer to the destination \n" - "byte order. dimfast Pointer to the destination fastest \n" - "dimension. dimmid Pointer to the destination second fastest \n" - "dimension. dimslow Pointer to the destination third fastest \n" - "dimension. padding Pointer to the destination padding size.\n" + "handle CBF handle. cell Pointer to the destination array of \n" + "6 doubles for the reciprocal cell parameters. cell_esd Pointer to \n" + "the destination array of 6 doubles for the reciprocal cell parameter \n" + "esds.\n" "RETURN VALUE\n" - "Returns an error code on failure or 0 for success.\n" + "Returns an error code on failure or 0 for success. No errors is \n" + "returned for missing values if the \"cell \" category exists.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_realarray_wdims_fs", _wrap_cbf_handle_struct_set_realarray_wdims_fs, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_reciprocal_cell_esd", _wrap_cbf_handle_struct_get_reciprocal_cell_esd, METH_O, "cbf_handle_struct_get_reciprocal_cell_esd(cbf_handle_struct self)"}, + { "cbf_handle_struct_set_reciprocal_cell", _wrap_cbf_handle_struct_set_reciprocal_cell, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : int compression,int binary_id,(binary) String data,int elsize,\n" - " int elements,String byteorder,int dimfast,int dimmid,int dimslow,\n" - " int padding\n" + "*args : double cell[6]\n" "\n" - "C prototype: int cbf_set_realarray_wdims_fs (cbf_handle handle,\n" - " unsigned int compression, int binary_id, void *array,\n" - " size_t elsize, size_t elements, const char *byteorder,\n" - " size_t dimfast, size_t dimmid, size_t dimslow,\n" - " size_t padding);\n" + "C prototype: int cbf_set_reciprocal_cell (cbf_handle handle, double cell[6],\n" + " double cell_esd[6] );\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_integerarray sets the binary value of the item at the current \n" - "column and row to an integer array. The array consists of elements \n" - "elements of elsize bytes each, starting at array. The elements are \n" - "signed if elsigned is non-0 and unsigned otherwise. binary_id is the \n" - "binary section identifier. cbf_set_realarray sets the binary value of \n" - "the item at the current column and row to an integer array. The array \n" - "consists of elements elements of elsize bytes each, starting at \n" - "array. binary_id is the binary section identifier.\n" - "The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, \n" - "cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, \n" - "cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants \n" - "allow the data header values of byteorder, dimfast, dimmid, dimslow \n" - "and padding to be set to the data byte order, the fastest, second \n" - "fastest and third fastest array dimensions and the size in byte of \n" - "the post data padding to be used.\n" - "The array will be compressed using the compression scheme specifed by \n" - "compression. Currently, the available schemes are:\n" - "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" - "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" - " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" - " Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" - "\"nibble_offset \" compression. CBF_NONE No compression. \n" - "NOTE: This scheme is by far the slowest of the four and uses much \n" - "more disk space. It is intended for routine use with small arrays \n" - "only. With large arrays (like images) it should be used only for \n" - "debugging.\n" - "The values compressed are limited to 64 bits. If any element in the \n" - "array is larger than 64 bits, the value compressed is the nearest \n" - "64-bit value.\n" - "Currently, the source array must consist of chars, shorts or ints \n" - "(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or \n" - "floats for cbf_set_realarray. If elsize is not equal to sizeof \n" - "(char), sizeof (short) or sizeof (int), the function returns \n" - "CBF_ARGUMENT.\n" + "cbf_set_reciprocal_cell sets the reciprocal cell parameters to the \n" + "double values given in cell[0:2] for the reciprocal cell edge lengths \n" + "a*, b* and c* in AAngstroms-1, the double values given in cell[3:5] \n" + "for the reciprocal cell angles a*, b* and g* in degrees, the double \n" + "values given in cell_esd[0:2] for the estimated strandard deviations \n" + "of the reciprocal cell edge lengths a*, b* and c* in AAngstroms, and \n" + "the double values given in cell_esd[3:5] for the estimated standard \n" + "deviations of the reciprocal cell angles a*, b* and g* in degrees.\n" + "The values are placed in the first row of the \"cell \" category. If \n" + "no value has been given for \"_cell.entry_id \", it is set to the \n" + "value of the \"diffrn.id \" entry of the current data block.\n" + "cell or cell_esd may be NULL.\n" + "If cell is NULL, the reciprocal cell parameters are not set.\n" + "If cell_esd is NULL, the reciprocal cell parameter esds are not set.\n" + "If the \"cell \" category is not present, it is created. If any of \n" + "the necessary columns are not present, they are created.\n" "ARGUMENTS\n" - "handle CBF handle. compression Compression method to use. \n" - "binary_id Integer binary identifier. array Pointer to the \n" - "source array. elsize Size in bytes of each source array \n" - "element. elsigned Set to non-0 if the source array elements are \n" - "signed. elements: The number of elements in the array.\n" + "handle CBF handle. cell Pointer to the array of 6 doubles \n" + "for the reciprocal cell parameters. cell_esd Pointer to the array \n" + "of 6 doubles for the reciprocal cell parameter esds.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_find_category_root", _wrap_cbf_handle_struct_find_category_root, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_reciprocal_cell_esd", _wrap_cbf_handle_struct_set_reciprocal_cell_esd, METH_VARARGS, "\n" "\n" - "Returns : String categoryroot\n" - "*args : String categoryname\n" + "Returns : \n" + "*args : double cell_esd[6]\n" "\n" - "C prototype: int cbf_find_category_root (cbf_handle handle,\n" - " const char* categoryname, const char** categoryroot);\n" + "C prototype: int cbf_set_reciprocal_cell (cbf_handle handle, double cell[6],\n" + " double cell_esd[6] );\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_find_category_root sets *categoryroot to the root category of \n" - "which categoryname is an alias. cbf_set_category_root sets \n" - "categoryname_in as an alias of categoryroot in the dictionary \n" - "associated with handle, creating the dictionary if necessary. \n" - "cbf_require_category_root sets *categoryroot to the root category of \n" - "which categoryname is an alias, if there is one, or to the value of \n" - "categoryname, if categoryname is not an alias.\n" - "A returned categoryroot string must not be modified in any way.\n" + "cbf_set_reciprocal_cell sets the reciprocal cell parameters to the \n" + "double values given in cell[0:2] for the reciprocal cell edge lengths \n" + "a*, b* and c* in AAngstroms-1, the double values given in cell[3:5] \n" + "for the reciprocal cell angles a*, b* and g* in degrees, the double \n" + "values given in cell_esd[0:2] for the estimated strandard deviations \n" + "of the reciprocal cell edge lengths a*, b* and c* in AAngstroms, and \n" + "the double values given in cell_esd[3:5] for the estimated standard \n" + "deviations of the reciprocal cell angles a*, b* and g* in degrees.\n" + "The values are placed in the first row of the \"cell \" category. If \n" + "no value has been given for \"_cell.entry_id \", it is set to the \n" + "value of the \"diffrn.id \" entry of the current data block.\n" + "cell or cell_esd may be NULL.\n" + "If cell is NULL, the reciprocal cell parameters are not set.\n" + "If cell_esd is NULL, the reciprocal cell parameter esds are not set.\n" + "If the \"cell \" category is not present, it is created. If any of \n" + "the necessary columns are not present, they are created.\n" "ARGUMENTS\n" - "handle CBF handle. categoryname category name which \n" - "may be an alias. categoryroot pointer to a returned category \n" - "root name. categoryroot_in input category root name.\n" + "handle CBF handle. cell Pointer to the array of 6 doubles \n" + "for the reciprocal cell parameters. cell_esd Pointer to the array \n" + "of 6 doubles for the reciprocal cell parameter esds.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "----------------------------------------------------------------------\n" + "SEE ALSO\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_integerarray_wdims_fs", _wrap_cbf_handle_struct_set_integerarray_wdims_fs, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_orientation_matrix", _wrap_cbf_handle_struct_get_orientation_matrix, METH_O, "\n" "\n" - "Returns : \n" - "*args : int compression,int binary_id,(binary) String data,int elsize,\n" - " int elsigned,int elements,String byteorder,int dimfast,int dimmid,\n" - " int dimslow,int padding\n" + "Returns : Float matrix_0,Float matrix_1,Float matrix_2,Float matrix_3,\n" + " Float matrix_4,Float matrix_5,Float matrix_6,Float matrix_7,\n" + " Float matrix_8\n" + "*args : \n" "\n" - "C prototype: int cbf_set_integerarray_wdims_fs (cbf_handle handle,\n" - " unsigned int compression, int binary_id, void *array,\n" - " size_t elsize, int elsigned, size_t elements,\n" - " const char *byteorder, size_t dimfast, size_t dimmid,\n" - " size_t dimslow, size_t padding);\n" + "C prototype: int cbf_get_orientation_matrix (cbf_handle handle,\n" + " double ub_matrix[9]);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_integerarray sets the binary value of the item at the current \n" - "column and row to an integer array. The array consists of elements \n" - "elements of elsize bytes each, starting at array. The elements are \n" - "signed if elsigned is non-0 and unsigned otherwise. binary_id is the \n" - "binary section identifier. cbf_set_realarray sets the binary value of \n" - "the item at the current column and row to an integer array. The array \n" - "consists of elements elements of elsize bytes each, starting at \n" - "array. binary_id is the binary section identifier.\n" - "The cbf_set_integerarray_wdims, cbf_set_integerarray_wdims_fs, \n" - "cbf_set_integerarray_wdims_sf, cbf_set_realarray_wdims, \n" - "cbf_set_realarray_wdims_fs and cbf_set_realarray_wdims_sf variants \n" - "allow the data header values of byteorder, dimfast, dimmid, dimslow \n" - "and padding to be set to the data byte order, the fastest, second \n" - "fastest and third fastest array dimensions and the size in byte of \n" - "the post data padding to be used.\n" - "The array will be compressed using the compression scheme specifed by \n" - "compression. Currently, the available schemes are:\n" - "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" - "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" - " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" - " Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" - "\"nibble_offset \" compression. CBF_NONE No compression. \n" - "NOTE: This scheme is by far the slowest of the four and uses much \n" - "more disk space. It is intended for routine use with small arrays \n" - "only. With large arrays (like images) it should be used only for \n" - "debugging.\n" - "The values compressed are limited to 64 bits. If any element in the \n" - "array is larger than 64 bits, the value compressed is the nearest \n" - "64-bit value.\n" - "Currently, the source array must consist of chars, shorts or ints \n" - "(signed or unsigned), for cbf_set_integerarray, or IEEE doubles or \n" - "floats for cbf_set_realarray. If elsize is not equal to sizeof \n" - "(char), sizeof (short) or sizeof (int), the function returns \n" - "CBF_ARGUMENT.\n" + "cbf_get_orientation_matrix sets ub_matrix to point to the array of \n" + "orientation matrix entries in the \"diffrn \" category in the order \n" + "of columns:\n" + " \"UB[1][1] \" \"UB[1][2] \" \"UB[1][3] \" \"UB[2][1] \" \n" + "\"UB[2][2] \" \"UB[2][3] \" \"UB[3][1] \" \"UB[3][2] \" \n" + "\"UB[3][3] \"\n" + "cbf_set_orientation_matrix sets the values in the \"diffrn \" \n" + "category to the values pointed to by ub_matrix.\n" "ARGUMENTS\n" - "handle CBF handle. compression Compression method to use. \n" - "binary_id Integer binary identifier. array Pointer to the \n" - "source array. elsize Size in bytes of each source array \n" - "element. elsigned Set to non-0 if the source array elements are \n" - "signed. elements: The number of elements in the array.\n" + "handle CBF handle. ubmatric Source or destination array of 9 \n" + "doubles giving the orientation matrix parameters.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_image_sf", _wrap_cbf_handle_struct_set_image_sf, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_orientation_matrix", _wrap_cbf_handle_struct_set_orientation_matrix, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : int element_number,int compression,(binary) String data,int elsize,\n" - " int elsign,int dimslow,int dimfast\n" + "*args : Float matrix_0,Float matrix_1,Float matrix_2,Float matrix_3,\n" + " Float matrix_4,Float matrix_5,Float matrix_6,Float matrix_7,\n" + " Float matrix_8\n" "\n" - "C prototype: int cbf_set_image_sf(cbf_handle handle, unsigned int reserved,\n" - " unsigned int element_number, unsigned int compression,\n" - " void *array, size_t elsize, int elsign, size_t ndimslow,\n" - " size_t ndimfast);\n" + "C prototype: int cbf_set_orientation_matrix (cbf_handle handle,\n" + " double ub_matrix[9]);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_image, cbf_set_image_fs and cbf_set_image_sf write the image \n" - "array for element number element_number. The array consists of \n" - "ndimfast *ndimslow elements of elsize bytes each, starting at array. \n" - "The elements are signed if elsign is non-zero and unsigned otherwise. \n" - "cbf_set_real_image, cbf_set_real_image_fs and cbf_set_real_image_sf \n" - "write the image array for element number element_number. The array \n" - "consists of ndimfast *ndimslow IEEE double or float elements of \n" - "elsize bytes each, starting at array. cbf_set_3d_image, \n" - "cbf_set_3d_image_fs and cbf_set_3d_image_sf write the 3D image array \n" - "for element number element_number. The array consists of ndimfast \n" - "*ndimmid *ndimslow elements of elsize bytes each, starting at array. \n" - "The elements are signed if elsign is non-0 and unsigned otherwise. \n" - "cbf_set_real_3d_image, cbf_set_real_3d_image_fs and \n" - "cbf_set_real_3d_image_sf writes the 3D image array for element number \n" - "element_number. The array consists of ndimfast *ndimmid *ndimslow \n" - "IEEE double or float elements of elsize bytes each, starting at \n" - "array.\n" - "The _fs calls give the dimensions in a fast-to-slow order. The calls \n" - "with no suffix and the calls _sf calls give the dimensions in \n" - "slow-to-fast order\n" - "If the array is 1-dimensional, ndimslow should be the array size and \n" - "ndimfast and, for the 3D calls, ndimmid, should be set to 1. If the \n" - "array is 2-dimensional and the 3D calls are used, ndimslow and \n" - "ndimmid should be used for the array dimensions and ndimfast should \n" - "be set to 1.\n" - "The array will be compressed using the compression scheme specifed by \n" - "compression. Currently, the available schemes are:\n" - "CBF_CANONICAL Canonical-code compression (section 3.3.1) \n" - "CBF_PACKED CCP4-style packing (section 3.3.2) CBF_PACKED_V2 \n" - " CCP4-style packing, version 2 (section 3.3.2) CBF_BYTE_OFFSET \n" - "Simple \"byte_offset \" compression. CBF_NIBBLE_OFFSET Simple \n" - "\"nibble_offset \" compression. CBF_NONE No compression.\n" - "The values compressed are limited to 64 bits. If any element in the \n" - "array is larger than 64 bits, the value compressed is the nearest \n" - "64-bit value.\n" - "Currently, the source array must consist of chars, shorts or ints \n" - "(signed or unsigned)for cbf_set_image, or IEEE doubles or floats for \n" - "cbf_set_real_image. If elsize is not equal to sizeof (short), sizeof \n" - "(int), sizeof(double) or sizeof(float), the function returns \n" - "CBF_ARGUMENT.\n" - "The parameter reserved is presently unused and should be set to 0.\n" + "cbf_get_orientation_matrix sets ub_matrix to point to the array of \n" + "orientation matrix entries in the \"diffrn \" category in the order \n" + "of columns:\n" + " \"UB[1][1] \" \"UB[1][2] \" \"UB[1][3] \" \"UB[2][1] \" \n" + "\"UB[2][2] \" \"UB[2][3] \" \"UB[3][1] \" \"UB[3][2] \" \n" + "\"UB[3][3] \"\n" + "cbf_set_orientation_matrix sets the values in the \"diffrn \" \n" + "category to the values pointed to by ub_matrix.\n" "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any value other \n" - "than 0 is invalid. element_number The number of the detector \n" - "element counting from 0 by order of appearance in the \n" - "\"diffrn_data_frame \" category. compression Compression type. \n" - "array Pointer to the image array. elsize Size in \n" - "bytes of each image array element. elsigned Set to non-0 if \n" - "the image array elements are signed. ndimslow Slowest array \n" - "dimension. ndimmid Second slowest array dimension. ndimfast \n" - " Fastest array dimension.\n" + "handle CBF handle. ubmatric Source or destination array of 9 \n" + "doubles giving the orientation matrix parameters.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_get_axis_equipment", _wrap_cbf_handle_struct_get_axis_equipment, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_bin_sizes", _wrap_cbf_handle_struct_get_bin_sizes, METH_VARARGS, "\n" "\n" - "Returns : String\n" - "*args : String axis_id\n" + "Returns : Float slowbinsize,Float fastbinsize\n" + "*args : Integer element_number\n" "\n" - "C prototype: int cbf_get_axis_equipment (cbf_handle handle,\n" - " const char *axis_id, const char * *equipment);\n" + "C prototype: int cbf_get_bin_sizes(cbf_handle handle,\n" + " unsigned int element_number, double * slowbinsize,\n" + " double * fastbinsize);\n" "\n" - "CBFLib documentation:\n" - "DESCRIPTION\n" - "cbf_count_axis_ancestors sets ancestors to the number of ancestors of \n" - "axis axis_id. cbf_get_axis_ancestor sets *ancestor to the ancestor \n" - "axis of index ancestor_index of axis axis_id, starting with axis_id \n" - "for ancestor_index 0.\n" - "cbf_get_axis_depends_on sets *depends_on to the immediate ancestor of \n" - "axis_id or to \". \" if there is no such ancestor. \n" - "cbf_get_axis_equipment sets *equipment to the equipment of axis_id or \n" - "to \". \" if there is no such equipment. \n" - "cbf_get_axis_equipment_component sets *equipment_component to the \n" - "equipment_component of axis_id or to \". \" if there is no such \n" - "equipment_component.\n" - "cbf_get_axis_offset sets *offset1, *offset2 and *offset3 to the \n" - "components of the ofset of axis_id.\n" - "cbf_get_axis_rotation sets rotation to the rotation of axis_id or to \n" - "0 if there is no such rotation. cbf_get_axis_rotation_axis sets \n" - "*rotation_axis to the rotation_axis of axis_id or to \". \" if there \n" - "is no such rotation_axis.\n" - "cbf_get_axis_setting sets *start and *increment to the corresponding \n" - "values of the axis axis_id. Any of the destination pointers may be \n" - "NULL.\n" - "cbf_get_axis_type sets axis_type to the type of axis_id.\n" - "cbf_get_axis_vector sets *vector1, *vector2 and *vector3 to the \n" - "components of the vector of axis_id.\n" - "The parameter reserved is presently unused and should be set to 0.\n" - "ARGUMENTS\n" - "handle CBF handle. reserved Unused. Any \n" - "value other than 0 is invalid. axis_id Axis id. \n" - "ancestor_index Integer index of the desired ancestor, starting \n" - "with 0 for the current axis_id. ancestor Pointer to \n" - "destination ancestor name pointer. depends_on Pointer to \n" - "destination depends_on name pointer. equipment Pointer to \n" - "destination equipment name pointer. equipment_component Pointer to \n" - "destination equipment_component name pointer. offset1 \n" - "Pointer to destination first offset component value. offset2 \n" - " Pointer to destination second offset component value. offset3 \n" - " Pointer to destination third offset component value. \n" - "rotation Pointer to destination rotation value. \n" - "rotation_axis Pointer to destination rotation_axisn name \n" - "pointer. start Pointer to the destination start \n" - "value. increment Pointer to the destination increment \n" - "value. type Pointer to destination axis type of type \n" - ". vector1 Pointer to destination first vector component \n" - "value. vector2 Pointer to destination second vector \n" - "component value. vector3 Pointer to destination third \n" - "vector component value.\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_bin_sizes sets slowbinsize to point to the value of the \n" + "number of pixels composing one array element in the dimension that \n" + "changes at the second-fastest rate and fastbinsize to point to the \n" + "value of the number of pixels composing one array element in the \n" + "dimension that changes at the fastest rate for the dectector element \n" + "with the ordinal element_number. cbf_set_bin_sizes sets the the pixel \n" + "bin sizes in the \"array_intensities \" category to the values of \n" + "slowbinsize_in for the number of pixels composing one array element \n" + "in the dimension that changes at the second-fastest rate and \n" + "fastbinsize_in for the number of pixels composing one array element \n" + "in the dimension that changes at the fastest rate for the dectector \n" + "element with the ordinal element_number.\n" + "In order to allow for software binning involving fractions of pixels, \n" + "the bin sizes are doubles rather than ints.\n" + "ARGUMENTS\n" + "handle CBF handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. slowbinsize Pointer to the \n" + "returned number of pixels composing one array element in the \n" + "dimension that changes at the second-fastest rate. fastbinsize \n" + "Pointer to the returned number of pixels composing one array element \n" + "in the dimension that changes at the fastest rate. slowbinsize_in \n" + "The number of pixels composing one array element in the dimension \n" + "that changes at the second-fastest rate. fastbinsize_in The number \n" + "of pixels composing one array element in the dimension that changes \n" + "at the fastest rate.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_unit_cell", _wrap_cbf_handle_struct_set_unit_cell, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_set_bin_sizes", _wrap_cbf_handle_struct_set_bin_sizes, METH_VARARGS, "\n" "\n" "Returns : \n" - "*args : double cell[6]\n" + "*args : Integer element_number,Float slowbinsize_in,Float fastbinsize_in\n" "\n" - "C prototype: int cbf_set_unit_cell (cbf_handle handle, double cell[6],\n" - " double cell_esd[6] );\n" + "C prototype: int cbf_set_bin_sizes(cbf_handle handle,\n" + " unsigned int element_number, double slowbinsize_in,\n" + " double fastbinsize_in);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_unit_cell sets the cell parameters to the double values given \n" - "in cell[0:2] for the cell edge lengths a, b and c in AAngstroms, the \n" - "double values given in cell[3:5] for the cell angles a, b and g in \n" - "degrees, the double values given in cell_esd[0:2] for the estimated \n" - "strandard deviations of the cell edge lengths a, b and c in \n" - "AAngstroms, and the double values given in cell_esd[3:5] for the \n" - "estimated standard deviations of the the cell angles a, b and g in \n" - "degrees.\n" - "The values are placed in the first row of the \"cell \" category. If \n" - "no value has been given for \"_cell.entry_id \", it is set to the \n" - "value of the \"diffrn.id \" entry of the current data block.\n" - "cell or cell_esd may be NULL.\n" - "If cell is NULL, the cell parameters are not set.\n" - "If cell_esd is NULL, the cell parameter esds are not set.\n" - "If the \"cell \" category is not present, it is created. If any of \n" - "the necessary columns are not present, they are created.\n" + "cbf_get_bin_sizes sets slowbinsize to point to the value of the \n" + "number of pixels composing one array element in the dimension that \n" + "changes at the second-fastest rate and fastbinsize to point to the \n" + "value of the number of pixels composing one array element in the \n" + "dimension that changes at the fastest rate for the dectector element \n" + "with the ordinal element_number. cbf_set_bin_sizes sets the the pixel \n" + "bin sizes in the \"array_intensities \" category to the values of \n" + "slowbinsize_in for the number of pixels composing one array element \n" + "in the dimension that changes at the second-fastest rate and \n" + "fastbinsize_in for the number of pixels composing one array element \n" + "in the dimension that changes at the fastest rate for the dectector \n" + "element with the ordinal element_number.\n" + "In order to allow for software binning involving fractions of pixels, \n" + "the bin sizes are doubles rather than ints.\n" "ARGUMENTS\n" - "handle CBF handle. cell Pointer to the array of 6 doubles \n" - "for the cell parameters. cell_esd Pointer to the array of 6 doubles \n" - "for the cell parameter esds.\n" + "handle CBF handle. element_number The number of the \n" + "detector element counting from 0 by order of appearance in the \n" + "\"diffrn_data_frame \" category. slowbinsize Pointer to the \n" + "returned number of pixels composing one array element in the \n" + "dimension that changes at the second-fastest rate. fastbinsize \n" + "Pointer to the returned number of pixels composing one array element \n" + "in the dimension that changes at the fastest rate. slowbinsize_in \n" + "The number of pixels composing one array element in the dimension \n" + "that changes at the second-fastest rate. fastbinsize_in The number \n" + "of pixels composing one array element in the dimension that changes \n" + "at the fastest rate.\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_set_unit_cell_esd", _wrap_cbf_handle_struct_set_unit_cell_esd, METH_VARARGS, (char *)"\n" + { "cbf_handle_struct_get_axis_poise", _wrap_cbf_handle_struct_get_axis_poise, METH_VARARGS, "\n" "\n" - "Returns : \n" - "*args : double cell_esd[6]\n" + "Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2,\n" + " Float offset3,Float angle\n" + "*args : Float ratio,String axis_id,String frame_id\n" "\n" - "C prototype: int cbf_set_unit_cell (cbf_handle handle, double cell[6],\n" - " double cell_esd[6] );\n" + "C prototype: int cbf_get_axis_poise(cbf_handle handle, double ratio,\n" + " double * vector1, double * vector2, double * vector3,\n" + " double * offset1, double * offset2, double * offset3,\n" + " double * angle, const char * axis_id,\n" + " const char * frame_id);\n" "\n" "CBFLib documentation:\n" "DESCRIPTION\n" - "cbf_set_unit_cell sets the cell parameters to the double values given \n" - "in cell[0:2] for the cell edge lengths a, b and c in AAngstroms, the \n" - "double values given in cell[3:5] for the cell angles a, b and g in \n" - "degrees, the double values given in cell_esd[0:2] for the estimated \n" - "strandard deviations of the cell edge lengths a, b and c in \n" - "AAngstroms, and the double values given in cell_esd[3:5] for the \n" - "estimated standard deviations of the the cell angles a, b and g in \n" - "degrees.\n" - "The values are placed in the first row of the \"cell \" category. If \n" - "no value has been given for \"_cell.entry_id \", it is set to the \n" - "value of the \"diffrn.id \" entry of the current data block.\n" - "cell or cell_esd may be NULL.\n" - "If cell is NULL, the cell parameters are not set.\n" - "If cell_esd is NULL, the cell parameter esds are not set.\n" - "If the \"cell \" category is not present, it is created. If any of \n" - "the necessary columns are not present, they are created.\n" + "cbf_get_axis_poise sets vector1, vector2, vector3 to point to the \n" + "components of the axis vector for axis axis_id, offset1, offset2, \n" + "offset3 to point to the components of the axis base offset vector for \n" + "axis axis_id, and angle to point to the angle of rotation of axis \n" + "axis_id after application of the axis settings for frame frame_id, \n" + "using ratio, a value between 0 and 1, indicating how far into the \n" + "internal motion in the frame to go. If frame_id is the string \". \n" + "\", the first frame found is used. If there is more than one frame, \n" + "which frame will be found is indeterminate. If frame_id is NULL, the \n" + "overall setting for the scan are used, rather than those for any \n" + "particular frame. The vector and offset reported are the reference \n" + "vector and offset of the axis axis_id transformed by application of \n" + "all motions of the axes on which axis_id depends.\n" + "cbf_get_goniometer_poise vector1, vector2, vector3 to point to the \n" + "components of the axis vector for the goniometer axis, offset1, \n" + "offset2, offset3 to point to the components of the axis base offset \n" + "vector for the goniometer axis, and angle to point to the angle of \n" + "rotation of the goniometer axis after application of all axis \n" + "settings in the goniometer deriving the vector, offset and angle from \n" + "the resulting matrix. Calculation of the vector is indeterminate if \n" + "the angle is zero.\n" + "cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point \n" + "to the components of the axis vector for axis axis_id, offset1, \n" + "offset2, offset3 to point to the components of the axis base offset \n" + "vector for axis axis_id unmodified by axis rotations. Any of the \n" + "pointers may be specified as NULL.\n" "ARGUMENTS\n" - "handle CBF handle. cell Pointer to the array of 6 doubles \n" - "for the cell parameters. cell_esd Pointer to the array of 6 doubles \n" - "for the cell parameter esds.\n" + "handle CBF handle. ratio A number between 0 and 1 \n" + "indication how far into the frame to go vector1 Pointer to the \n" + "first component of the axis vector vector2 Pointer to the second \n" + "component of the axis vector vector3 Pointer to the third \n" + "component of the axis vector offset1 Pointer to the first \n" + "component of the axis offset offset2 Pointer to the second \n" + "component of the axis offset offset3 Pointer to the third \n" + "component of the axis offset angle Pointer to the rotation \n" + "angle axis_id The specified axis frame_id The specified \n" + "frame positioner CBF goniometer\n" "RETURN VALUE\n" "Returns an error code on failure or 0 for success.\n" - "SEE ALSO\n" + "----------------------------------------------------------------------\n" + "\n" + ""}, + { "cbf_handle_struct_get_axis_reference_poise", _wrap_cbf_handle_struct_get_axis_reference_poise, METH_VARARGS, "\n" + "\n" + "Returns : Float vector1,Float vector2,Float vector3,Float offset1,Float offset2,\n" + " Float offset3\n" + "*args : String axis_id\n" + "\n" + "C prototype: int cbf_get_axis_reference_poise(cbf_handle handle,\n" + " double * vector1, double * vector2, double * vector3,\n" + " double * offset1, double * offset2, double * offset3,\n" + " const char * axis_id);\n" + "\n" + "CBFLib documentation:\n" + "DESCRIPTION\n" + "cbf_get_axis_poise sets vector1, vector2, vector3 to point to the \n" + "components of the axis vector for axis axis_id, offset1, offset2, \n" + "offset3 to point to the components of the axis base offset vector for \n" + "axis axis_id, and angle to point to the angle of rotation of axis \n" + "axis_id after application of the axis settings for frame frame_id, \n" + "using ratio, a value between 0 and 1, indicating how far into the \n" + "internal motion in the frame to go. If frame_id is the string \". \n" + "\", the first frame found is used. If there is more than one frame, \n" + "which frame will be found is indeterminate. If frame_id is NULL, the \n" + "overall setting for the scan are used, rather than those for any \n" + "particular frame. The vector and offset reported are the reference \n" + "vector and offset of the axis axis_id transformed by application of \n" + "all motions of the axes on which axis_id depends.\n" + "cbf_get_goniometer_poise vector1, vector2, vector3 to point to the \n" + "components of the axis vector for the goniometer axis, offset1, \n" + "offset2, offset3 to point to the components of the axis base offset \n" + "vector for the goniometer axis, and angle to point to the angle of \n" + "rotation of the goniometer axis after application of all axis \n" + "settings in the goniometer deriving the vector, offset and angle from \n" + "the resulting matrix. Calculation of the vector is indeterminate if \n" + "the angle is zero.\n" + "cbf_get_axis_reference_poise sets vector1, vector2, vector3 to point \n" + "to the components of the axis vector for axis axis_id, offset1, \n" + "offset2, offset3 to point to the components of the axis base offset \n" + "vector for axis axis_id unmodified by axis rotations. Any of the \n" + "pointers may be specified as NULL.\n" + "ARGUMENTS\n" + "handle CBF handle. ratio A number between 0 and 1 \n" + "indication how far into the frame to go vector1 Pointer to the \n" + "first component of the axis vector vector2 Pointer to the second \n" + "component of the axis vector vector3 Pointer to the third \n" + "component of the axis vector offset1 Pointer to the first \n" + "component of the axis offset offset2 Pointer to the second \n" + "component of the axis offset offset3 Pointer to the third \n" + "component of the axis offset angle Pointer to the rotation \n" + "angle axis_id The specified axis frame_id The specified \n" + "frame positioner CBF goniometer\n" + "RETURN VALUE\n" + "Returns an error code on failure or 0 for success.\n" + "----------------------------------------------------------------------\n" "\n" ""}, - { (char *)"cbf_handle_struct_swigregister", cbf_handle_struct_swigregister, METH_VARARGS, NULL}, + { "cbf_handle_struct_swigregister", cbf_handle_struct_swigregister, METH_O, NULL}, + { "cbf_handle_struct_swiginit", cbf_handle_struct_swiginit, METH_VARARGS, NULL}, + { NULL, NULL, 0, NULL } +}; + +static PyMethodDef SwigMethods_proxydocs[] = { { NULL, NULL, 0, NULL } }; @@ -29058,7 +28507,7 @@ SWIG_InitializeModule(void *clientdata) { /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: size %d\n", swig_module.size); + printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size); #endif for (i = 0; i < swig_module.size; ++i) { swig_type_info *type = 0; @@ -29066,7 +28515,7 @@ SWIG_InitializeModule(void *clientdata) { swig_cast_info *cast; #ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); + printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name); #endif /* if there is another module already loaded */ @@ -29141,7 +28590,7 @@ SWIG_InitializeModule(void *clientdata) { for (i = 0; i < swig_module.size; ++i) { int j = 0; swig_cast_info *cast = swig_module.cast_initial[i]; - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); + printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name); while (cast->type) { printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); cast++; @@ -29263,17 +28712,6 @@ extern "C" { return str; } - SWIGINTERN int - swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { - char *tmp; - PyObject *str = swig_varlink_str(v); - fprintf(fp,"Swig global variables "); - fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(str); - return 0; - } - SWIGINTERN void swig_varlink_dealloc(swig_varlinkobject *v) { swig_globalvar *var = v->vars; @@ -29326,18 +28764,17 @@ extern "C" { static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { - /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif - (char *)"swigvarlink", /* tp_name */ + "swigvarlink", /* tp_name */ sizeof(swig_varlinkobject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ - (printfunc) swig_varlink_print, /* tp_print */ + 0, /* tp_print */ (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ 0, /* tp_compare */ @@ -29357,36 +28794,30 @@ extern "C" { 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ -#endif -#if PY_VERSION_HEX >= 0x02060000 0, /* tp_version_tag */ -#endif #if PY_VERSION_HEX >= 0x03040000 0, /* tp_finalize */ #endif +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ 0, /* tp_maxalloc */ -#if PY_VERSION_HEX >= 0x02050000 0, /* tp_prev */ -#endif 0 /* tp_next */ #endif }; varlink_type = tmp; type_init = 1; -#if PY_VERSION_HEX < 0x02020000 - varlink_type.ob_type = &PyType_Type; -#else if (PyType_Ready(&varlink_type) < 0) return NULL; -#endif } return &varlink_type; } @@ -29402,14 +28833,14 @@ extern "C" { } SWIGINTERN void - SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { + SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { swig_varlinkobject *v = (swig_varlinkobject *) p; swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); if (gv) { size_t size = strlen(name)+1; gv->name = (char *)malloc(size); if (gv->name) { - strncpy(gv->name,name,size); + memcpy(gv->name, name, size); gv->get_attr = get_attr; gv->set_attr = set_attr; gv->next = v->vars; @@ -29420,9 +28851,11 @@ extern "C" { SWIGINTERN PyObject * SWIG_globals(void) { - static PyObject *_SWIG_globals = 0; - if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); - return _SWIG_globals; + static PyObject *globals = 0; + if (!globals) { + globals = SWIG_newvarlink(); + } + return globals; } /* ----------------------------------------------------------------------------- @@ -29488,9 +28921,9 @@ extern "C" { char *ndoc = (char*)malloc(ldoc + lptr + 10); if (ndoc) { char *buff = ndoc; - strncpy(buff, methods[i].ml_doc, ldoc); + memcpy(buff, methods[i].ml_doc, ldoc); buff += ldoc; - strncpy(buff, "swig_ptr: ", 10); + memcpy(buff, "swig_ptr: ", 10); buff += 10; SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); methods[i].ml_doc = ndoc; @@ -29501,6 +28934,64 @@ extern "C" { } } + /* ----------------------------------------------------------------------------- + * Method creation and docstring support functions + * ----------------------------------------------------------------------------- */ + + /* ----------------------------------------------------------------------------- + * Function to find the method definition with the correct docstring for the + * proxy module as opposed to the low-level API + * ----------------------------------------------------------------------------- */ + + SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) { + /* Find the function in the modified method table */ + size_t offset = 0; + int found = 0; + while (SwigMethods_proxydocs[offset].ml_meth != NULL) { + if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) { + found = 1; + break; + } + offset++; + } + /* Use the copy with the modified docstring if available */ + return found ? &SwigMethods_proxydocs[offset] : NULL; + } + + /* ----------------------------------------------------------------------------- + * Wrapper of PyInstanceMethod_New() used in Python 3 + * It is exported to the generated module, used for -fastproxy + * ----------------------------------------------------------------------------- */ + + SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) { + if (PyCFunction_Check(func)) { + PyCFunctionObject *funcobj = (PyCFunctionObject *)func; + PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name); + if (ml) + func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module); + } +#if PY_VERSION_HEX >= 0x03000000 + return PyInstanceMethod_New(func); +#else + return PyMethod_New(func, NULL, NULL); +#endif + } + + /* ----------------------------------------------------------------------------- + * Wrapper of PyStaticMethod_New() + * It is exported to the generated module, used for -fastproxy + * ----------------------------------------------------------------------------- */ + + SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) { + if (PyCFunction_Check(func)) { + PyCFunctionObject *funcobj = (PyCFunctionObject *)func; + PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name); + if (ml) + func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module); + } + return PyStaticMethod_New(func); + } + #ifdef __cplusplus } #endif @@ -29520,20 +29011,12 @@ PyObject* void #endif SWIG_init(void) { - PyObject *m, *d, *md; + PyObject *m, *d, *md, *globals; + #if PY_VERSION_HEX >= 0x03000000 static struct PyModuleDef SWIG_module = { -# if PY_VERSION_HEX >= 0x03020000 PyModuleDef_HEAD_INIT, -# else - { - PyObject_HEAD_INIT(NULL) - NULL, /* m_init */ - 0, /* m_index */ - NULL, /* m_copy */ - }, -# endif - (char *) SWIG_name, + SWIG_name, NULL, -1, SwigMethods, @@ -29552,19 +29035,19 @@ SWIG_init(void) { (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL }; static SwigPyGetSet thisown_getset_closure = { - (PyCFunction) SwigPyObject_own, - (PyCFunction) SwigPyObject_own + SwigPyObject_own, + SwigPyObject_own }; static PyGetSetDef thisown_getset_def = { (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure }; - PyObject *metatype_args; PyTypeObject *builtin_pytype; int builtin_base_count; swig_type_info *builtin_basetype; PyObject *tuple; PyGetSetDescrObject *static_getset; PyTypeObject *metatype; + PyTypeObject *swigpyobject; SwigPyClientData *cd; PyObject *public_interface, *public_symbol; PyObject *this_descr; @@ -29579,14 +29062,19 @@ SWIG_init(void) { (void)static_getset; (void)self; - /* metatype is used to implement static member variables. */ - metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type); - assert(metatype_args); - metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL); + /* Metaclass is used to implement static member variables */ + metatype = SwigPyObjectType(); assert(metatype); - Py_DECREF(metatype_args); - metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro; - assert(PyType_Ready(metatype) >= 0); +#endif + + (void)globals; + + /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */ + SWIG_This(); + SWIG_Python_TypeCache(); + SwigPyPacked_type(); +#ifndef SWIGPYTHON_BUILTIN + SwigPyObject_type(); #endif /* Fix SwigMethods to carry the callback ptrs when needed */ @@ -29595,7 +29083,7 @@ SWIG_init(void) { #if PY_VERSION_HEX >= 0x03000000 m = PyModule_Create(&SWIG_module); #else - m = Py_InitModule((char *) SWIG_name, SwigMethods); + m = Py_InitModule(SWIG_name, SwigMethods); #endif md = d = PyModule_GetDict(m); @@ -29604,13 +29092,15 @@ SWIG_init(void) { SWIG_InitializeModule(0); #ifdef SWIGPYTHON_BUILTIN + swigpyobject = SwigPyObject_TypeOnce(); + SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); assert(SwigPyObject_stype); cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; if (!cd) { SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; - SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce(); - } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) { + SwigPyObject_clientdata.pytype = swigpyobject; + } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) { PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); # if PY_VERSION_HEX >= 0x03000000 return NULL; diff --git a/pycbf/xmas/readmarheader.py b/pycbf/xmas/readmarheader.py index 8e78be24..fadc87b0 100644 --- a/pycbf/xmas/readmarheader.py +++ b/pycbf/xmas/readmarheader.py @@ -1,338 +1,338 @@ -#!/usr/bin/env python -import struct - -# Convert mar c header file types to python struct module types -mar_c_to_python_struct = { - "INT32" : "i", - "UINT32" : "I", - "char" : "c", - "UINT16" : "H" - } - -# Sizes (bytes) of mar c header objects -mar_c_sizes = { - "INT32" : 4, - "UINT32" : 4, - "char" : 1, - "UINT16" : 2 - } - -# This was worked out by trial and error from a trial image I think -MAXIMAGES=9 - - - -def make_format(cdefinition): - """ - Reads the header definition in c and makes the format - string to pass to struct.unpack - """ - lines = cdefinition.split("\n") - fmt = "" - names = [] - expected = 0 - for line in lines: - if line.find(";")==-1: - continue - decl = line.split(";")[0].lstrip().rstrip() - try: - [type, name] = decl.split() - except: - #print "skipping:",line - continue - # print "type:",type," name:",name - - if name.find("[")>-1: - # repeated ... times - try: - num = name.split("[")[1].split("]")[0] - num = num.replace("MAXIMAGES",str(MAXIMAGES)) - num = num.replace("sizeof(INT32)","4") - times = eval(num) - except: - print "Please decode",decl - raise - else: - times=1 - try: - fmt += mar_c_to_python_struct[type]*times - names += [name]*times - expected += mar_c_sizes[type]*times - except: - #print "skipping",line - continue - #print "%4d %4d"%(mar_c_sizes[type]*times,expected),name,":",times,line - #print struct.calcsize(fmt),expected - return names, fmt - -def read_mar_header(filename): - """ - Get the header from a binary file - """ - f = open(filename,"rb") - f.seek(1024) - header=f.read(3072) - f.close() - return header - - -def interpret_header(header, fmt, names): - """ - given a format and header interpret it - """ - values = struct.unpack(fmt,header) - dict = {} - i=0 - for name in names: - if dict.has_key(name): - if type(values[i]) == type("string"): - dict[name] = dict[name]+values[i] - else: - try: - dict[name].append(values[i]) - except: - dict[name] = [dict[name],values[i]] - else: - dict[name] = values[i] - i=i+1 - - return dict - - -# Now for the c definition (found on mar webpage) -# The following string is therefore copyrighted by Mar I guess - -cdefinition = """ -typedef struct frame_header_type { - /* File/header format parameters (256 bytes) */ - UINT32 header_type; /* flag for header type - (can be used as magic number) */ - char header_name[16]; /* header name (MMX) */ - UINT32 header_major_version; /* header_major_version (n.) */ - UINT32 header_minor_version; /* header_minor_version (.n) */ - UINT32 header_byte_order;/* BIG_ENDIAN (Motorola,MIPS); - LITTLE_ENDIAN (DEC, Intel) */ - UINT32 data_byte_order; /* BIG_ENDIAN (Motorola,MIPS); - LITTLE_ENDIAN (DEC, Intel) */ - UINT32 header_size; /* in bytes */ - UINT32 frame_type; /* flag for frame type */ - UINT32 magic_number; /* to be used as a flag - - usually to indicate new file */ - UINT32 compression_type; /* type of image compression */ - UINT32 compression1; /* compression parameter 1 */ - UINT32 compression2; /* compression parameter 2 */ - UINT32 compression3; /* compression parameter 3 */ - UINT32 compression4; /* compression parameter 4 */ - UINT32 compression5; /* compression parameter 4 */ - UINT32 compression6; /* compression parameter 4 */ - UINT32 nheaders; /* total number of headers */ - UINT32 nfast; /* number of pixels in one line */ - UINT32 nslow; /* number of lines in image */ - UINT32 depth; /* number of bytes per pixel */ - UINT32 record_length; /* number of pixels between - succesive rows */ - UINT32 signif_bits; /* true depth of data, in bits */ - UINT32 data_type; /* (signed,unsigned,float...) */ - UINT32 saturated_value; /* value marks pixel as saturated */ - UINT32 sequence; /* TRUE or FALSE */ - UINT32 nimages; /* total number of images - size of - each is nfast*(nslow/nimages) */ - UINT32 origin; /* corner of origin */ - UINT32 orientation; /* direction of fast axis */ - UINT32 view_direction; /* direction to view frame */ - UINT32 overflow_location;/* FOLLOWING_HEADER, FOLLOWING_DATA */ - UINT32 over_8_bits; /* # of pixels with counts 255 */ - UINT32 over_16_bits; /* # of pixels with count 65535 */ - UINT32 multiplexed; /* multiplex flag */ - UINT32 nfastimages; /* # of images in fast direction */ - UINT32 nslowimages; /* # of images in slow direction */ - UINT32 background_applied; /* flags correction has been applied - - hold magic number ? */ - UINT32 bias_applied; /* flags correction has been applied - - hold magic number ? */ - UINT32 flatfield_applied; /* flags correction has been applied - - hold magic number ? */ - UINT32 distortion_applied; /* flags correction has been applied - - hold magic number ? */ - UINT32 original_header_type; /* Header/frame type from file - that frame is read from */ - UINT32 file_saved; /* Flag that file has been saved, - should be zeroed if modified */ - char reserve1[(64-40)*sizeof(INT32)-16]; - - /* Data statistics (128) */ - UINT32 total_counts[2]; /* 64 bit integer range = 1.85E19*/ - UINT32 special_counts1[2]; - UINT32 special_counts2[2]; - UINT32 min; - UINT32 max; - UINT32 mean; - UINT32 rms; - UINT32 p10; - UINT32 p90; - UINT32 stats_uptodate; - UINT32 pixel_noise[MAXIMAGES]; /* 1000*base noise value (ADUs) */ - char reserve2[(32-13-MAXIMAGES)*sizeof(INT32)]; - - /* More statistics (256) */ - UINT16 percentile[128]; - - - /* Goniostat parameters (128 bytes) */ - INT32 xtal_to_detector; /* 1000*distance in millimeters */ - INT32 beam_x; /* 1000*x beam position (pixels) */ - INT32 beam_y; /* 1000*y beam position (pixels) */ - INT32 integration_time; /* integration time in milliseconds */ - INT32 exposure_time; /* exposure time in milliseconds */ - INT32 readout_time; /* readout time in milliseconds */ - INT32 nreads; /* number of readouts to get this image */ - INT32 start_twotheta; /* 1000*two_theta angle */ - INT32 start_omega; /* 1000*omega angle */ - INT32 start_chi; /* 1000*chi angle */ - INT32 start_kappa; /* 1000*kappa angle */ - INT32 start_phi; /* 1000*phi angle */ - INT32 start_delta; /* 1000*delta angle */ - INT32 start_gamma; /* 1000*gamma angle */ - INT32 start_xtal_to_detector; /* 1000*distance in mm (dist in um)*/ - INT32 end_twotheta; /* 1000*two_theta angle */ - INT32 end_omega; /* 1000*omega angle */ - INT32 end_chi; /* 1000*chi angle */ - INT32 end_kappa; /* 1000*kappa angle */ - INT32 end_phi; /* 1000*phi angle */ - INT32 end_delta; /* 1000*delta angle */ - INT32 end_gamma; /* 1000*gamma angle */ - INT32 end_xtal_to_detector; /* 1000*distance in mm (dist in um)*/ - INT32 rotation_axis; /* active rotation axis */ - INT32 rotation_range; /* 1000*rotation angle */ - INT32 detector_rotx; /* 1000*rotation of detector around X */ - INT32 detector_roty; /* 1000*rotation of detector around Y */ - INT32 detector_rotz; /* 1000*rotation of detector around Z */ - char reserve3[(32-28)*sizeof(INT32)]; - - /* Detector parameters (128 bytes) */ - INT32 detector_type; /* detector type */ - INT32 pixelsize_x; /* pixel size (nanometers) */ - INT32 pixelsize_y; /* pixel size (nanometers) */ - INT32 mean_bias; /* 1000*mean bias value */ - INT32 photons_per_100adu; /* photons / 100 ADUs */ - INT32 measured_bias[MAXIMAGES]; /* 1000*mean bias value for each image*/ - INT32 measured_temperature[MAXIMAGES]; /* Temperature of each - detector in milliKelvins */ - INT32 measured_pressure[MAXIMAGES]; /* Pressure of each chamber - in microTorr */ - /* Retired reserve4 when MAXIMAGES set to 9 from 16 and - two fields removed, and temp and pressure added - char reserve4[(32-(5+3*MAXIMAGES))*sizeof(INT32)] - */ - - /* X-ray source and optics parameters (128 bytes) */ - /* X-ray source parameters (8*4 bytes) */ - INT32 source_type; /* (code) - target, synch. etc */ - INT32 source_dx; /* Optics param. - (size microns) */ - INT32 source_dy; /* Optics param. - (size microns) */ - INT32 source_wavelength; /* wavelength (femtoMeters) */ - INT32 source_power; /* (Watts) */ - INT32 source_voltage; /* (Volts) */ - INT32 source_current; /* (microAmps) */ - INT32 source_bias; /* (Volts) */ - INT32 source_polarization_x; /* () */ - INT32 source_polarization_y; /* () */ - char reserve_source[4*sizeof(INT32)]; - - /* X-ray optics_parameters (8*4 bytes) */ - INT32 optics_type; /* Optics type (code)*/ - INT32 optics_dx; /* Optics param. - (size microns) */ - INT32 optics_dy; /* Optics param. - (size microns) */ - INT32 optics_wavelength; /* Optics param. - (size microns) */ - INT32 optics_dispersion; /* Optics param. - (*10E6) */ - INT32 optics_crossfire_x; /* Optics param. - (microRadians) */ - INT32 optics_crossfire_y; /* Optics param. - (microRadians) */ - INT32 optics_angle; /* Optics param. - (monoch. - 2theta - microradians) */ - INT32 optics_polarization_x; /* () */ - INT32 optics_polarization_y; /* () */ - char reserve_optics[4*sizeof(INT32)]; - - char reserve5[((32-28)*sizeof(INT32))]; - - /* File parameters (1024 bytes) */ - char filetitle[128]; /* Title */ - char filepath[128]; /* path name for data file */ - char filename[64]; /* name of data file */ - char acquire_timestamp[32]; /* date and time of acquisition */ - char header_timestamp[32]; /* date and time of header update */ - char save_timestamp[32]; /* date and time file saved */ - char file_comments[512]; /* comments, use as desired */ - char reserve6[1024-(128+128+64+(3*32)+512)]; - - /* Dataset parameters (512 bytes) */ - char dataset_comments[512]; /* comments, used as desired */ - /* pad out to 3072 bytes */ - char pad[3072-(256+128+256+(3*128)+1024+512)]; - - } frame_header; -""" - - - -class marheaderreader: - """ - Class to sit and read a series of images (makes format etc only once) - """ - def __init__(self): - """ - Initialise internal stuff - """ - self.names , self.fmt = make_format(cdefinition) - def get_header(self,filename): - """ - Reads a header from file filename - """ - h=read_mar_header(filename) - dict = interpret_header(h,self.fmt,self.names) - # Append ESRF formatted stuff - items = self.readesrfstring(dict["dataset_comments[512]"]) - for pair in items: - dict[pair[0]]=pair[1] - items = self.readesrfstring(dict["file_comments[512]"]) - for pair in items: - dict[pair[0]]=pair[1] - dict["pixelsize_x_mm"]= str(float(dict["pixelsize_x"])/1e6) - dict["pixelsize_y_mm"]= str(float(dict["pixelsize_y"])/1e6) - dict["integration_time_sec"]= str(float(dict["integration_time"])/1e3) - dict["beam_y_mm"]= str(float(dict["pixelsize_y_mm"])* - float(dict["beam_y"])/1000.) - dict["beam_x_mm"]= str(float(dict["pixelsize_x_mm"])* - float(dict["beam_x"])/1000.) - - return dict - - def readesrfstring(self,s): - """ - Interpret the so called "esrf format" header lines - which are in comment sections - """ - s=s.replace("\000","") - items = filter(None, [len(x)>1 and x or None for x in [ - item.split("=") for item in s.split(";")]]) - return items - - -if __name__=="__main__": - """ - Make a little program to process files - """ - import sys - print "Starting" - names,fmt = make_format(cdefinition) - print "Names and format made" - h = read_mar_header(sys.argv[1]) - print "Read header, interpreting" - d = interpret_header(h,fmt,names) - printed = {} - for name in names: - if printed.has_key(name): - continue - print name,":",d[name] - printed[name]=1 - +#!/usr/bin/env python +import struct + +# Convert mar c header file types to python struct module types +mar_c_to_python_struct = { + "INT32" : "i", + "UINT32" : "I", + "char" : "c", + "UINT16" : "H" + } + +# Sizes (bytes) of mar c header objects +mar_c_sizes = { + "INT32" : 4, + "UINT32" : 4, + "char" : 1, + "UINT16" : 2 + } + +# This was worked out by trial and error from a trial image I think +MAXIMAGES=9 + + + +def make_format(cdefinition): + """ + Reads the header definition in c and makes the format + string to pass to struct.unpack + """ + lines = cdefinition.split("\n") + fmt = "" + names = [] + expected = 0 + for line in lines: + if line.find(";")==-1: + continue + decl = line.split(";")[0].lstrip().rstrip() + try: + [type, name] = decl.split() + except: + #print("skipping:",line) + continue + # print("type:",type," name:",name) + + if name.find("[")>-1: + # repeated ... times + try: + num = name.split("[")[1].split("]")[0] + num = num.replace("MAXIMAGES",str(MAXIMAGES)) + num = num.replace("sizeof(INT32)","4") + times = eval(num) + except: + print("Please decode",decl) + raise + else: + times=1 + try: + fmt += mar_c_to_python_struct[type]*times + names += [name]*times + expected += mar_c_sizes[type]*times + except: + #print("skipping",line) + continue + #print("%4d %4d"%(mar_c_sizes[type]*times,expected),name,":",times,line) + #print(struct.calcsize(fmt),expected) + return names, fmt + +def read_mar_header(filename): + """ + Get the header from a binary file + """ + f = open(filename,"rb") + f.seek(1024) + header=f.read(3072) + f.close() + return header + + +def interpret_header(header, fmt, names): + """ + given a format and header interpret it + """ + values = struct.unpack(fmt,header) + dict = {} + i=0 + for name in names: + if name in dict: + if type(values[i]) == type("string"): + dict[name] = dict[name]+values[i] + else: + try: + dict[name].append(values[i]) + except: + dict[name] = [dict[name],values[i]] + else: + dict[name] = values[i] + i=i+1 + + return dict + + +# Now for the c definition (found on mar webpage) +# The following string is therefore copyrighted by Mar I guess + +cdefinition = """ +typedef struct frame_header_type { + /* File/header format parameters (256 bytes) */ + UINT32 header_type; /* flag for header type + (can be used as magic number) */ + char header_name[16]; /* header name (MMX) */ + UINT32 header_major_version; /* header_major_version (n.) */ + UINT32 header_minor_version; /* header_minor_version (.n) */ + UINT32 header_byte_order;/* BIG_ENDIAN (Motorola,MIPS); + LITTLE_ENDIAN (DEC, Intel) */ + UINT32 data_byte_order; /* BIG_ENDIAN (Motorola,MIPS); + LITTLE_ENDIAN (DEC, Intel) */ + UINT32 header_size; /* in bytes */ + UINT32 frame_type; /* flag for frame type */ + UINT32 magic_number; /* to be used as a flag - + usually to indicate new file */ + UINT32 compression_type; /* type of image compression */ + UINT32 compression1; /* compression parameter 1 */ + UINT32 compression2; /* compression parameter 2 */ + UINT32 compression3; /* compression parameter 3 */ + UINT32 compression4; /* compression parameter 4 */ + UINT32 compression5; /* compression parameter 4 */ + UINT32 compression6; /* compression parameter 4 */ + UINT32 nheaders; /* total number of headers */ + UINT32 nfast; /* number of pixels in one line */ + UINT32 nslow; /* number of lines in image */ + UINT32 depth; /* number of bytes per pixel */ + UINT32 record_length; /* number of pixels between + succesive rows */ + UINT32 signif_bits; /* true depth of data, in bits */ + UINT32 data_type; /* (signed,unsigned,float...) */ + UINT32 saturated_value; /* value marks pixel as saturated */ + UINT32 sequence; /* TRUE or FALSE */ + UINT32 nimages; /* total number of images - size of + each is nfast*(nslow/nimages) */ + UINT32 origin; /* corner of origin */ + UINT32 orientation; /* direction of fast axis */ + UINT32 view_direction; /* direction to view frame */ + UINT32 overflow_location;/* FOLLOWING_HEADER, FOLLOWING_DATA */ + UINT32 over_8_bits; /* # of pixels with counts 255 */ + UINT32 over_16_bits; /* # of pixels with count 65535 */ + UINT32 multiplexed; /* multiplex flag */ + UINT32 nfastimages; /* # of images in fast direction */ + UINT32 nslowimages; /* # of images in slow direction */ + UINT32 background_applied; /* flags correction has been applied - + hold magic number ? */ + UINT32 bias_applied; /* flags correction has been applied - + hold magic number ? */ + UINT32 flatfield_applied; /* flags correction has been applied - + hold magic number ? */ + UINT32 distortion_applied; /* flags correction has been applied - + hold magic number ? */ + UINT32 original_header_type; /* Header/frame type from file + that frame is read from */ + UINT32 file_saved; /* Flag that file has been saved, + should be zeroed if modified */ + char reserve1[(64-40)*sizeof(INT32)-16]; + + /* Data statistics (128) */ + UINT32 total_counts[2]; /* 64 bit integer range = 1.85E19*/ + UINT32 special_counts1[2]; + UINT32 special_counts2[2]; + UINT32 min; + UINT32 max; + UINT32 mean; + UINT32 rms; + UINT32 p10; + UINT32 p90; + UINT32 stats_uptodate; + UINT32 pixel_noise[MAXIMAGES]; /* 1000*base noise value (ADUs) */ + char reserve2[(32-13-MAXIMAGES)*sizeof(INT32)]; + + /* More statistics (256) */ + UINT16 percentile[128]; + + + /* Goniostat parameters (128 bytes) */ + INT32 xtal_to_detector; /* 1000*distance in millimeters */ + INT32 beam_x; /* 1000*x beam position (pixels) */ + INT32 beam_y; /* 1000*y beam position (pixels) */ + INT32 integration_time; /* integration time in milliseconds */ + INT32 exposure_time; /* exposure time in milliseconds */ + INT32 readout_time; /* readout time in milliseconds */ + INT32 nreads; /* number of readouts to get this image */ + INT32 start_twotheta; /* 1000*two_theta angle */ + INT32 start_omega; /* 1000*omega angle */ + INT32 start_chi; /* 1000*chi angle */ + INT32 start_kappa; /* 1000*kappa angle */ + INT32 start_phi; /* 1000*phi angle */ + INT32 start_delta; /* 1000*delta angle */ + INT32 start_gamma; /* 1000*gamma angle */ + INT32 start_xtal_to_detector; /* 1000*distance in mm (dist in um)*/ + INT32 end_twotheta; /* 1000*two_theta angle */ + INT32 end_omega; /* 1000*omega angle */ + INT32 end_chi; /* 1000*chi angle */ + INT32 end_kappa; /* 1000*kappa angle */ + INT32 end_phi; /* 1000*phi angle */ + INT32 end_delta; /* 1000*delta angle */ + INT32 end_gamma; /* 1000*gamma angle */ + INT32 end_xtal_to_detector; /* 1000*distance in mm (dist in um)*/ + INT32 rotation_axis; /* active rotation axis */ + INT32 rotation_range; /* 1000*rotation angle */ + INT32 detector_rotx; /* 1000*rotation of detector around X */ + INT32 detector_roty; /* 1000*rotation of detector around Y */ + INT32 detector_rotz; /* 1000*rotation of detector around Z */ + char reserve3[(32-28)*sizeof(INT32)]; + + /* Detector parameters (128 bytes) */ + INT32 detector_type; /* detector type */ + INT32 pixelsize_x; /* pixel size (nanometers) */ + INT32 pixelsize_y; /* pixel size (nanometers) */ + INT32 mean_bias; /* 1000*mean bias value */ + INT32 photons_per_100adu; /* photons / 100 ADUs */ + INT32 measured_bias[MAXIMAGES]; /* 1000*mean bias value for each image*/ + INT32 measured_temperature[MAXIMAGES]; /* Temperature of each + detector in milliKelvins */ + INT32 measured_pressure[MAXIMAGES]; /* Pressure of each chamber + in microTorr */ + /* Retired reserve4 when MAXIMAGES set to 9 from 16 and + two fields removed, and temp and pressure added + char reserve4[(32-(5+3*MAXIMAGES))*sizeof(INT32)] + */ + + /* X-ray source and optics parameters (128 bytes) */ + /* X-ray source parameters (8*4 bytes) */ + INT32 source_type; /* (code) - target, synch. etc */ + INT32 source_dx; /* Optics param. - (size microns) */ + INT32 source_dy; /* Optics param. - (size microns) */ + INT32 source_wavelength; /* wavelength (femtoMeters) */ + INT32 source_power; /* (Watts) */ + INT32 source_voltage; /* (Volts) */ + INT32 source_current; /* (microAmps) */ + INT32 source_bias; /* (Volts) */ + INT32 source_polarization_x; /* () */ + INT32 source_polarization_y; /* () */ + char reserve_source[4*sizeof(INT32)]; + + /* X-ray optics_parameters (8*4 bytes) */ + INT32 optics_type; /* Optics type (code)*/ + INT32 optics_dx; /* Optics param. - (size microns) */ + INT32 optics_dy; /* Optics param. - (size microns) */ + INT32 optics_wavelength; /* Optics param. - (size microns) */ + INT32 optics_dispersion; /* Optics param. - (*10E6) */ + INT32 optics_crossfire_x; /* Optics param. - (microRadians) */ + INT32 optics_crossfire_y; /* Optics param. - (microRadians) */ + INT32 optics_angle; /* Optics param. - (monoch. + 2theta - microradians) */ + INT32 optics_polarization_x; /* () */ + INT32 optics_polarization_y; /* () */ + char reserve_optics[4*sizeof(INT32)]; + + char reserve5[((32-28)*sizeof(INT32))]; + + /* File parameters (1024 bytes) */ + char filetitle[128]; /* Title */ + char filepath[128]; /* path name for data file */ + char filename[64]; /* name of data file */ + char acquire_timestamp[32]; /* date and time of acquisition */ + char header_timestamp[32]; /* date and time of header update */ + char save_timestamp[32]; /* date and time file saved */ + char file_comments[512]; /* comments, use as desired */ + char reserve6[1024-(128+128+64+(3*32)+512)]; + + /* Dataset parameters (512 bytes) */ + char dataset_comments[512]; /* comments, used as desired */ + /* pad out to 3072 bytes */ + char pad[3072-(256+128+256+(3*128)+1024+512)]; + + } frame_header; +""" + + + +class marheaderreader: + """ + Class to sit and read a series of images (makes format etc only once) + """ + def __init__(self): + """ + Initialise internal stuff + """ + self.names , self.fmt = make_format(cdefinition) + def get_header(self,filename): + """ + Reads a header from file filename + """ + h=read_mar_header(filename) + dict = interpret_header(h,self.fmt,self.names) + # Append ESRF formatted stuff + items = self.readesrfstring(dict["dataset_comments[512]"]) + for pair in items: + dict[pair[0]]=pair[1] + items = self.readesrfstring(dict["file_comments[512]"]) + for pair in items: + dict[pair[0]]=pair[1] + dict["pixelsize_x_mm"]= str(float(dict["pixelsize_x"])/1e6) + dict["pixelsize_y_mm"]= str(float(dict["pixelsize_y"])/1e6) + dict["integration_time_sec"]= str(float(dict["integration_time"])/1e3) + dict["beam_y_mm"]= str(float(dict["pixelsize_y_mm"])* + float(dict["beam_y"])/1000.) + dict["beam_x_mm"]= str(float(dict["pixelsize_x_mm"])* + float(dict["beam_x"])/1000.) + + return dict + + def readesrfstring(self,s): + """ + Interpret the so called "esrf format" header lines + which are in comment sections + """ + s=s.replace("\000","") + items = [_f for _f in [len(x)>1 and x or None for x in [ + item.split("=") for item in s.split(";")]] if _f] + return items + + +if __name__=="__main__": + """ + Make a little program to process files + """ + import sys + print("Starting") + names,fmt = make_format(cdefinition) + print("Names and format made") + h = read_mar_header(sys.argv[1]) + print("Read header, interpreting") + d = interpret_header(h,fmt,names) + printed = {} + for name in names: + if name in printed: + continue + print(name,":",d[name]) + printed[name]=1 + diff --git a/pycbf/xmas/readmarheader.py.bak b/pycbf/xmas/readmarheader.py.bak new file mode 100644 index 00000000..3cca9174 --- /dev/null +++ b/pycbf/xmas/readmarheader.py.bak @@ -0,0 +1,338 @@ +#!/usr/bin/env python +import struct + +# Convert mar c header file types to python struct module types +mar_c_to_python_struct = { + "INT32" : "i", + "UINT32" : "I", + "char" : "c", + "UINT16" : "H" + } + +# Sizes (bytes) of mar c header objects +mar_c_sizes = { + "INT32" : 4, + "UINT32" : 4, + "char" : 1, + "UINT16" : 2 + } + +# This was worked out by trial and error from a trial image I think +MAXIMAGES=9 + + + +def make_format(cdefinition): + """ + Reads the header definition in c and makes the format + string to pass to struct.unpack + """ + lines = cdefinition.split("\n") + fmt = "" + names = [] + expected = 0 + for line in lines: + if line.find(";")==-1: + continue + decl = line.split(";")[0].lstrip().rstrip() + try: + [type, name] = decl.split() + except: + #print "skipping:",line + continue + # print "type:",type," name:",name + + if name.find("[")>-1: + # repeated ... times + try: + num = name.split("[")[1].split("]")[0] + num = num.replace("MAXIMAGES",str(MAXIMAGES)) + num = num.replace("sizeof(INT32)","4") + times = eval(num) + except: + print "Please decode",decl + raise + else: + times=1 + try: + fmt += mar_c_to_python_struct[type]*times + names += [name]*times + expected += mar_c_sizes[type]*times + except: + #print "skipping",line + continue + #print "%4d %4d"%(mar_c_sizes[type]*times,expected),name,":",times,line + #print struct.calcsize(fmt),expected + return names, fmt + +def read_mar_header(filename): + """ + Get the header from a binary file + """ + f = open(filename,"rb") + f.seek(1024) + header=f.read(3072) + f.close() + return header + + +def interpret_header(header, fmt, names): + """ + given a format and header interpret it + """ + values = struct.unpack(fmt,header) + dict = {} + i=0 + for name in names: + if dict.has_key(name): + if type(values[i]) == type("string"): + dict[name] = dict[name]+values[i] + else: + try: + dict[name].append(values[i]) + except: + dict[name] = [dict[name],values[i]] + else: + dict[name] = values[i] + i=i+1 + + return dict + + +# Now for the c definition (found on mar webpage) +# The following string is therefore copyrighted by Mar I guess + +cdefinition = """ +typedef struct frame_header_type { + /* File/header format parameters (256 bytes) */ + UINT32 header_type; /* flag for header type + (can be used as magic number) */ + char header_name[16]; /* header name (MMX) */ + UINT32 header_major_version; /* header_major_version (n.) */ + UINT32 header_minor_version; /* header_minor_version (.n) */ + UINT32 header_byte_order;/* BIG_ENDIAN (Motorola,MIPS); + LITTLE_ENDIAN (DEC, Intel) */ + UINT32 data_byte_order; /* BIG_ENDIAN (Motorola,MIPS); + LITTLE_ENDIAN (DEC, Intel) */ + UINT32 header_size; /* in bytes */ + UINT32 frame_type; /* flag for frame type */ + UINT32 magic_number; /* to be used as a flag - + usually to indicate new file */ + UINT32 compression_type; /* type of image compression */ + UINT32 compression1; /* compression parameter 1 */ + UINT32 compression2; /* compression parameter 2 */ + UINT32 compression3; /* compression parameter 3 */ + UINT32 compression4; /* compression parameter 4 */ + UINT32 compression5; /* compression parameter 4 */ + UINT32 compression6; /* compression parameter 4 */ + UINT32 nheaders; /* total number of headers */ + UINT32 nfast; /* number of pixels in one line */ + UINT32 nslow; /* number of lines in image */ + UINT32 depth; /* number of bytes per pixel */ + UINT32 record_length; /* number of pixels between + succesive rows */ + UINT32 signif_bits; /* true depth of data, in bits */ + UINT32 data_type; /* (signed,unsigned,float...) */ + UINT32 saturated_value; /* value marks pixel as saturated */ + UINT32 sequence; /* TRUE or FALSE */ + UINT32 nimages; /* total number of images - size of + each is nfast*(nslow/nimages) */ + UINT32 origin; /* corner of origin */ + UINT32 orientation; /* direction of fast axis */ + UINT32 view_direction; /* direction to view frame */ + UINT32 overflow_location;/* FOLLOWING_HEADER, FOLLOWING_DATA */ + UINT32 over_8_bits; /* # of pixels with counts 255 */ + UINT32 over_16_bits; /* # of pixels with count 65535 */ + UINT32 multiplexed; /* multiplex flag */ + UINT32 nfastimages; /* # of images in fast direction */ + UINT32 nslowimages; /* # of images in slow direction */ + UINT32 background_applied; /* flags correction has been applied - + hold magic number ? */ + UINT32 bias_applied; /* flags correction has been applied - + hold magic number ? */ + UINT32 flatfield_applied; /* flags correction has been applied - + hold magic number ? */ + UINT32 distortion_applied; /* flags correction has been applied - + hold magic number ? */ + UINT32 original_header_type; /* Header/frame type from file + that frame is read from */ + UINT32 file_saved; /* Flag that file has been saved, + should be zeroed if modified */ + char reserve1[(64-40)*sizeof(INT32)-16]; + + /* Data statistics (128) */ + UINT32 total_counts[2]; /* 64 bit integer range = 1.85E19*/ + UINT32 special_counts1[2]; + UINT32 special_counts2[2]; + UINT32 min; + UINT32 max; + UINT32 mean; + UINT32 rms; + UINT32 p10; + UINT32 p90; + UINT32 stats_uptodate; + UINT32 pixel_noise[MAXIMAGES]; /* 1000*base noise value (ADUs) */ + char reserve2[(32-13-MAXIMAGES)*sizeof(INT32)]; + + /* More statistics (256) */ + UINT16 percentile[128]; + + + /* Goniostat parameters (128 bytes) */ + INT32 xtal_to_detector; /* 1000*distance in millimeters */ + INT32 beam_x; /* 1000*x beam position (pixels) */ + INT32 beam_y; /* 1000*y beam position (pixels) */ + INT32 integration_time; /* integration time in milliseconds */ + INT32 exposure_time; /* exposure time in milliseconds */ + INT32 readout_time; /* readout time in milliseconds */ + INT32 nreads; /* number of readouts to get this image */ + INT32 start_twotheta; /* 1000*two_theta angle */ + INT32 start_omega; /* 1000*omega angle */ + INT32 start_chi; /* 1000*chi angle */ + INT32 start_kappa; /* 1000*kappa angle */ + INT32 start_phi; /* 1000*phi angle */ + INT32 start_delta; /* 1000*delta angle */ + INT32 start_gamma; /* 1000*gamma angle */ + INT32 start_xtal_to_detector; /* 1000*distance in mm (dist in um)*/ + INT32 end_twotheta; /* 1000*two_theta angle */ + INT32 end_omega; /* 1000*omega angle */ + INT32 end_chi; /* 1000*chi angle */ + INT32 end_kappa; /* 1000*kappa angle */ + INT32 end_phi; /* 1000*phi angle */ + INT32 end_delta; /* 1000*delta angle */ + INT32 end_gamma; /* 1000*gamma angle */ + INT32 end_xtal_to_detector; /* 1000*distance in mm (dist in um)*/ + INT32 rotation_axis; /* active rotation axis */ + INT32 rotation_range; /* 1000*rotation angle */ + INT32 detector_rotx; /* 1000*rotation of detector around X */ + INT32 detector_roty; /* 1000*rotation of detector around Y */ + INT32 detector_rotz; /* 1000*rotation of detector around Z */ + char reserve3[(32-28)*sizeof(INT32)]; + + /* Detector parameters (128 bytes) */ + INT32 detector_type; /* detector type */ + INT32 pixelsize_x; /* pixel size (nanometers) */ + INT32 pixelsize_y; /* pixel size (nanometers) */ + INT32 mean_bias; /* 1000*mean bias value */ + INT32 photons_per_100adu; /* photons / 100 ADUs */ + INT32 measured_bias[MAXIMAGES]; /* 1000*mean bias value for each image*/ + INT32 measured_temperature[MAXIMAGES]; /* Temperature of each + detector in milliKelvins */ + INT32 measured_pressure[MAXIMAGES]; /* Pressure of each chamber + in microTorr */ + /* Retired reserve4 when MAXIMAGES set to 9 from 16 and + two fields removed, and temp and pressure added + char reserve4[(32-(5+3*MAXIMAGES))*sizeof(INT32)] + */ + + /* X-ray source and optics parameters (128 bytes) */ + /* X-ray source parameters (8*4 bytes) */ + INT32 source_type; /* (code) - target, synch. etc */ + INT32 source_dx; /* Optics param. - (size microns) */ + INT32 source_dy; /* Optics param. - (size microns) */ + INT32 source_wavelength; /* wavelength (femtoMeters) */ + INT32 source_power; /* (Watts) */ + INT32 source_voltage; /* (Volts) */ + INT32 source_current; /* (microAmps) */ + INT32 source_bias; /* (Volts) */ + INT32 source_polarization_x; /* () */ + INT32 source_polarization_y; /* () */ + char reserve_source[4*sizeof(INT32)]; + + /* X-ray optics_parameters (8*4 bytes) */ + INT32 optics_type; /* Optics type (code)*/ + INT32 optics_dx; /* Optics param. - (size microns) */ + INT32 optics_dy; /* Optics param. - (size microns) */ + INT32 optics_wavelength; /* Optics param. - (size microns) */ + INT32 optics_dispersion; /* Optics param. - (*10E6) */ + INT32 optics_crossfire_x; /* Optics param. - (microRadians) */ + INT32 optics_crossfire_y; /* Optics param. - (microRadians) */ + INT32 optics_angle; /* Optics param. - (monoch. + 2theta - microradians) */ + INT32 optics_polarization_x; /* () */ + INT32 optics_polarization_y; /* () */ + char reserve_optics[4*sizeof(INT32)]; + + char reserve5[((32-28)*sizeof(INT32))]; + + /* File parameters (1024 bytes) */ + char filetitle[128]; /* Title */ + char filepath[128]; /* path name for data file */ + char filename[64]; /* name of data file */ + char acquire_timestamp[32]; /* date and time of acquisition */ + char header_timestamp[32]; /* date and time of header update */ + char save_timestamp[32]; /* date and time file saved */ + char file_comments[512]; /* comments, use as desired */ + char reserve6[1024-(128+128+64+(3*32)+512)]; + + /* Dataset parameters (512 bytes) */ + char dataset_comments[512]; /* comments, used as desired */ + /* pad out to 3072 bytes */ + char pad[3072-(256+128+256+(3*128)+1024+512)]; + + } frame_header; +""" + + + +class marheaderreader: + """ + Class to sit and read a series of images (makes format etc only once) + """ + def __init__(self): + """ + Initialise internal stuff + """ + self.names , self.fmt = make_format(cdefinition) + def get_header(self,filename): + """ + Reads a header from file filename + """ + h=read_mar_header(filename) + dict = interpret_header(h,self.fmt,self.names) + # Append ESRF formatted stuff + items = self.readesrfstring(dict["dataset_comments[512]"]) + for pair in items: + dict[pair[0]]=pair[1] + items = self.readesrfstring(dict["file_comments[512]"]) + for pair in items: + dict[pair[0]]=pair[1] + dict["pixelsize_x_mm"]= str(float(dict["pixelsize_x"])/1e6) + dict["pixelsize_y_mm"]= str(float(dict["pixelsize_y"])/1e6) + dict["integration_time_sec"]= str(float(dict["integration_time"])/1e3) + dict["beam_y_mm"]= str(float(dict["pixelsize_y_mm"])* + float(dict["beam_y"])/1000.) + dict["beam_x_mm"]= str(float(dict["pixelsize_x_mm"])* + float(dict["beam_x"])/1000.) + + return dict + + def readesrfstring(self,s): + """ + Interpret the so called "esrf format" header lines + which are in comment sections + """ + s=s.replace("\000","") + items = filter(None, [len(x)>1 and x or None for x in [ + item.split("=") for item in s.split(";")]]) + return items + + +if __name__=="__main__": + """ + Make a little program to process files + """ + import sys + print "Starting" + names,fmt = make_format(cdefinition) + print "Names and format made" + h = read_mar_header(sys.argv[1]) + print "Read header, interpreting" + d = interpret_header(h,fmt,names) + printed = {} + for name in names: + if printed.has_key(name): + continue + print name,":",d[name] + printed[name]=1 + diff --git a/pycbf/xmas/xmas_cif_template.cif b/pycbf/xmas/xmas_cif_template.cif index 35b13807..c5f468f8 100644 --- a/pycbf/xmas/xmas_cif_template.cif +++ b/pycbf/xmas/xmas_cif_template.cif @@ -1,220 +1,220 @@ - -###CBF: VERSION 0.6 -# CBF file written by cbflib v0.6 - - - -data_image_1 - - - -loop_ -_diffrn.id -_diffrn.crystal_id - DS1 DIFFRN_CRYSTAL_ID - -loop_ -_cell.length_a 5.959(1) -_cell.length_b 14.956(1) -_cell.length_c 19.737(3) -_cell.angle_alpha 90 -_cell.angle_beta 90 -_cell.angle_gamma 90 - - -loop_ -_diffrn_orient_matrix.id 'DS1' -_diffrn_orient_matrix.type -; reciprocal axis matrix, multiplies hkl vector to generate - diffractometer xyz vector and diffractometer angles -; -_diffrn_orient_matrix.UB[1][1] 0.11 -_diffrn_orient_matrix.UB[1][2] 0.12 -_diffrn_orient_matrix.UB[1][3] 0.13 -_diffrn_orient_matrix.UB[2][1] 0.21 -_diffrn_orient_matrix.UB[2][2] 0.22 -_diffrn_orient_matrix.UB[2][3] 0.23 -_diffrn_orient_matrix.UB[3][1] 0.31 -_diffrn_orient_matrix.UB[3][2] 0.32 -_diffrn_orient_matrix.UB[3][3] 0.33 - - - - -loop_ -_diffrn_source.diffrn_id -_diffrn_source.source -_diffrn_source.current -_diffrn_source.type - DS1 synchrotron 200.0 'XMAS beamline bm28 ESRF' - -loop_ -_diffrn_radiation.diffrn_id -_diffrn_radiation.wavelength_id -_diffrn_radiation.probe -_diffrn_radiation.monochromator -_diffrn_radiation.polarizn_source_ratio -_diffrn_radiation.polarizn_source_norm -_diffrn_radiation.div_x_source -_diffrn_radiation.div_y_source -_diffrn_radiation.div_x_y_source -_diffrn_radiation.collimation - DS1 WAVELENGTH1 x-ray 'Si 111' 0.8 0.0 0.08 0.01 0.00 '0.20 mm x 0.20 mm' - -loop_ -_diffrn_radiation_wavelength.id -_diffrn_radiation_wavelength.wavelength -_diffrn_radiation_wavelength.wt - WAVELENGTH1 1.73862 1.0 - -loop_ -_diffrn_detector.diffrn_id -_diffrn_detector.id -_diffrn_detector.type -_diffrn_detector.details -_diffrn_detector.number_of_axes - DS1 MAR 'MAR XMAS' 'slow mode' 5 - -loop_ -_diffrn_detector_axis.detector_id -_diffrn_detector_axis.axis_id - MAR DETECTOR_TWO_THETA_VERTICAL - MAR DETECTOR_X - MAR DETECTOR_Y - MAR DETECTOR_Z - MAR DETECTOR_PITCH - -loop_ -_diffrn_detector_element.id -_diffrn_detector_element.detector_id - ELEMENT1 MAR - -loop_ -_diffrn_data_frame.id -_diffrn_data_frame.detector_element_id -_diffrn_data_frame.array_id -_diffrn_data_frame.binary_id - FRAME1 ELEMENT1 ARRAY1 1 - -loop_ -_diffrn_measurement.diffrn_id -_diffrn_measurement.id -_diffrn_measurement.number_of_axes -_diffrn_measurement.method -_diffrn_measurement.details - DS1 GONIOMETER 3 rotation - 'i0=1.000 i1=1.000 i2=1.000 ib=1.000 beamstop=20 mm 0% attenuation' - -loop_ -_diffrn_measurement_axis.measurement_id -_diffrn_measurement_axis.axis_id - GONIOMETER GONIOMETER_PHI - GONIOMETER GONIOMETER_CHI - GONIOMETER GONIOMETER_THETA - - -loop_ -_diffrn_scan.id -_diffrn_scan.frame_id_start -_diffrn_scan.frame_id_end -_diffrn_scan.frames - SCAN1 FRAME1 FRAME1 1 - -loop_ -_diffrn_scan_axis.scan_id -_diffrn_scan_axis.axis_id -_diffrn_scan_axis.angle_start -_diffrn_scan_axis.angle_range -_diffrn_scan_axis.angle_increment -_diffrn_scan_axis.displacement_start -_diffrn_scan_axis.displacement_range -_diffrn_scan_axis.displacement_increment - SCAN1 GONIOMETER_THETA 0.0 0.0 0.0 0.0 0.0 0.0 - SCAN1 GONIOMETER_CHI 0.0 0.0 0.0 0.0 0.0 0.0 - SCAN1 GONIOMETER_PHI 185 1 1 0.0 0.0 0.0 - SCAN1 DETECTOR_TWO_THETA_VERTICAL 0.0 0.0 0.0 0.0 0.0 0.0 - SCAN1 DETECTOR_Z 0.0 0.0 0.0 103.750 0 0 - SCAN1 DETECTOR_Y 0.0 0.0 0.0 0.0 0.0 0.0 - SCAN1 DETECTOR_X 0.0 0.0 0.0 0.0 0.0 0.0 - SCAN1 DETECTOR_PITCH 0.0 0.0 0.0 0.0 0.0 0.0 - -loop_ -_diffrn_scan_frame.frame_id -_diffrn_scan_frame.frame_number -_diffrn_scan_frame.integration_time -_diffrn_scan_frame.scan_id -_diffrn_scan_frame.date - FRAME1 1 360 SCAN1 1997-12-04T10:23:48 - -loop_ -_diffrn_scan_frame_axis.frame_id -_diffrn_scan_frame_axis.axis_id -_diffrn_scan_frame_axis.angle -_diffrn_scan_frame_axis.displacement - FRAME1 GONIOMETER_THETA 0.0 0.0 - FRAME1 GONIOMETER_CHI 0.0 0.0 - FRAME1 GONIOMETER_PHI 185 0.0 - FRAME1 DETECTOR_TWO_THETA_VERTICAL 185 0.0 - FRAME1 DETECTOR_Z 0.0 103.750 - FRAME1 DETECTOR_Y 0.0 0.0 - FRAME1 DETECTOR_X 0.0 0.0 - FRAME1 DETECTOR_PITCH 0.0 0.0 - -loop_ -_axis.id -_axis.type -_axis.equipment -_axis.depends_on -_axis.vector[1] -_axis.vector[2] -_axis.vector[3] -_axis.offset[1] -_axis.offset[2] -_axis.offset[3] - GONIOMETER_THETA rotation goniometer . 1 0 0 . . . - GONIOMETER_CHI rotation goniometer GONIOMETER_THETA 0 0 1 . . . - GONIOMETER_PHI rotation goniometer GONIOMETER_PHI 1 0 0 . . . - SOURCE general source . 0 0 1 . . . - GRAVITY general gravity . 0 -1 0 . . . - DETECTOR_TWO_THETA_VERTICAL rotation goniometer . 1 0 0 . . . - DETECTOR_Z translation detector DETECTOR_TWO_THETA_VERTICAL 0 0 -1 0 0 0 - DETECTOR_Y translation detector DETECTOR_Z 0 1 0 0 0 0 - DETECTOR_X translation detector DETECTOR_Y 1 0 0 0 0 0 - DETECTOR_PITCH rotation detector DETECTOR_X 0 1 0 0 0 0 - ELEMENT_X translation detector DETECTOR_PITCH 1 0 0 -94.0032 94.0032 0 - ELEMENT_Y translation detector ELEMENT_X 0 1 0 0 0 0 - -loop_ -_array_structure_list.array_id -_array_structure_list.index -_array_structure_list.dimension -_array_structure_list.precedence -_array_structure_list.direction -_array_structure_list.axis_set_id - ARRAY1 1 2049 1 increasing ELEMENT_X - ARRAY1 2 2049 2 increasing ELEMENT_Y - -loop_ -_array_structure_list_axis.axis_set_id -_array_structure_list_axis.axis_id -_array_structure_list_axis.displacement -_array_structure_list_axis.displacement_increment - ELEMENT_X ELEMENT_X 0.0408 0.0816 - ELEMENT_Y ELEMENT_Y -0.0408 -0.0816 - -loop_ -_array_intensities.array_id -_array_intensities.binary_id -_array_intensities.linearity -_array_intensities.gain -_array_intensities.gain_esd -_array_intensities.overload -_array_intensities.undefined_value - ARRAY1 1 linear 0.30 0.03 65000 0 - -loop_ -_array_structure.id -_array_structure.encoding_type -_array_structure.compression_type -_array_structure.byte_order - ARRAY1 "signed 32-bit integer" packed little_endian + +###CBF: VERSION 0.6 +# CBF file written by cbflib v0.6 + + + +data_image_1 + + + +loop_ +_diffrn.id +_diffrn.crystal_id + DS1 DIFFRN_CRYSTAL_ID + +loop_ +_cell.length_a 5.959(1) +_cell.length_b 14.956(1) +_cell.length_c 19.737(3) +_cell.angle_alpha 90 +_cell.angle_beta 90 +_cell.angle_gamma 90 + + +loop_ +_diffrn_orient_matrix.id 'DS1' +_diffrn_orient_matrix.type +; reciprocal axis matrix, multiplies hkl vector to generate + diffractometer xyz vector and diffractometer angles +; +_diffrn_orient_matrix.UB[1][1] 0.11 +_diffrn_orient_matrix.UB[1][2] 0.12 +_diffrn_orient_matrix.UB[1][3] 0.13 +_diffrn_orient_matrix.UB[2][1] 0.21 +_diffrn_orient_matrix.UB[2][2] 0.22 +_diffrn_orient_matrix.UB[2][3] 0.23 +_diffrn_orient_matrix.UB[3][1] 0.31 +_diffrn_orient_matrix.UB[3][2] 0.32 +_diffrn_orient_matrix.UB[3][3] 0.33 + + + + +loop_ +_diffrn_source.diffrn_id +_diffrn_source.source +_diffrn_source.current +_diffrn_source.type + DS1 synchrotron 200.0 'XMAS beamline bm28 ESRF' + +loop_ +_diffrn_radiation.diffrn_id +_diffrn_radiation.wavelength_id +_diffrn_radiation.probe +_diffrn_radiation.monochromator +_diffrn_radiation.polarizn_source_ratio +_diffrn_radiation.polarizn_source_norm +_diffrn_radiation.div_x_source +_diffrn_radiation.div_y_source +_diffrn_radiation.div_x_y_source +_diffrn_radiation.collimation + DS1 WAVELENGTH1 x-ray 'Si 111' 0.8 0.0 0.08 0.01 0.00 '0.20 mm x 0.20 mm' + +loop_ +_diffrn_radiation_wavelength.id +_diffrn_radiation_wavelength.wavelength +_diffrn_radiation_wavelength.wt + WAVELENGTH1 1.73862 1.0 + +loop_ +_diffrn_detector.diffrn_id +_diffrn_detector.id +_diffrn_detector.type +_diffrn_detector.details +_diffrn_detector.number_of_axes + DS1 MAR 'MAR XMAS' 'slow mode' 5 + +loop_ +_diffrn_detector_axis.detector_id +_diffrn_detector_axis.axis_id + MAR DETECTOR_TWO_THETA_VERTICAL + MAR DETECTOR_X + MAR DETECTOR_Y + MAR DETECTOR_Z + MAR DETECTOR_PITCH + +loop_ +_diffrn_detector_element.id +_diffrn_detector_element.detector_id + ELEMENT1 MAR + +loop_ +_diffrn_data_frame.id +_diffrn_data_frame.detector_element_id +_diffrn_data_frame.array_id +_diffrn_data_frame.binary_id + FRAME1 ELEMENT1 ARRAY1 1 + +loop_ +_diffrn_measurement.diffrn_id +_diffrn_measurement.id +_diffrn_measurement.number_of_axes +_diffrn_measurement.method +_diffrn_measurement.details + DS1 GONIOMETER 3 rotation + 'i0=1.000 i1=1.000 i2=1.000 ib=1.000 beamstop=20 mm 0% attenuation' + +loop_ +_diffrn_measurement_axis.measurement_id +_diffrn_measurement_axis.axis_id + GONIOMETER GONIOMETER_PHI + GONIOMETER GONIOMETER_CHI + GONIOMETER GONIOMETER_THETA + + +loop_ +_diffrn_scan.id +_diffrn_scan.frame_id_start +_diffrn_scan.frame_id_end +_diffrn_scan.frames + SCAN1 FRAME1 FRAME1 1 + +loop_ +_diffrn_scan_axis.scan_id +_diffrn_scan_axis.axis_id +_diffrn_scan_axis.angle_start +_diffrn_scan_axis.angle_range +_diffrn_scan_axis.angle_increment +_diffrn_scan_axis.displacement_start +_diffrn_scan_axis.displacement_range +_diffrn_scan_axis.displacement_increment + SCAN1 GONIOMETER_THETA 0.0 0.0 0.0 0.0 0.0 0.0 + SCAN1 GONIOMETER_CHI 0.0 0.0 0.0 0.0 0.0 0.0 + SCAN1 GONIOMETER_PHI 185 1 1 0.0 0.0 0.0 + SCAN1 DETECTOR_TWO_THETA_VERTICAL 0.0 0.0 0.0 0.0 0.0 0.0 + SCAN1 DETECTOR_Z 0.0 0.0 0.0 103.750 0 0 + SCAN1 DETECTOR_Y 0.0 0.0 0.0 0.0 0.0 0.0 + SCAN1 DETECTOR_X 0.0 0.0 0.0 0.0 0.0 0.0 + SCAN1 DETECTOR_PITCH 0.0 0.0 0.0 0.0 0.0 0.0 + +loop_ +_diffrn_scan_frame.frame_id +_diffrn_scan_frame.frame_number +_diffrn_scan_frame.integration_time +_diffrn_scan_frame.scan_id +_diffrn_scan_frame.date + FRAME1 1 360 SCAN1 1997-12-04T10:23:48 + +loop_ +_diffrn_scan_frame_axis.frame_id +_diffrn_scan_frame_axis.axis_id +_diffrn_scan_frame_axis.angle +_diffrn_scan_frame_axis.displacement + FRAME1 GONIOMETER_THETA 0.0 0.0 + FRAME1 GONIOMETER_CHI 0.0 0.0 + FRAME1 GONIOMETER_PHI 185 0.0 + FRAME1 DETECTOR_TWO_THETA_VERTICAL 185 0.0 + FRAME1 DETECTOR_Z 0.0 103.750 + FRAME1 DETECTOR_Y 0.0 0.0 + FRAME1 DETECTOR_X 0.0 0.0 + FRAME1 DETECTOR_PITCH 0.0 0.0 + +loop_ +_axis.id +_axis.type +_axis.equipment +_axis.depends_on +_axis.vector[1] +_axis.vector[2] +_axis.vector[3] +_axis.offset[1] +_axis.offset[2] +_axis.offset[3] + GONIOMETER_THETA rotation goniometer . 1 0 0 . . . + GONIOMETER_CHI rotation goniometer GONIOMETER_THETA 0 0 1 . . . + GONIOMETER_PHI rotation goniometer GONIOMETER_PHI 1 0 0 . . . + SOURCE general source . 0 0 1 . . . + GRAVITY general gravity . 0 -1 0 . . . + DETECTOR_TWO_THETA_VERTICAL rotation goniometer . 1 0 0 . . . + DETECTOR_Z translation detector DETECTOR_TWO_THETA_VERTICAL 0 0 -1 0 0 0 + DETECTOR_Y translation detector DETECTOR_Z 0 1 0 0 0 0 + DETECTOR_X translation detector DETECTOR_Y 1 0 0 0 0 0 + DETECTOR_PITCH rotation detector DETECTOR_X 0 1 0 0 0 0 + ELEMENT_X translation detector DETECTOR_PITCH 1 0 0 -94.0032 94.0032 0 + ELEMENT_Y translation detector ELEMENT_X 0 1 0 0 0 0 + +loop_ +_array_structure_list.array_id +_array_structure_list.index +_array_structure_list.dimension +_array_structure_list.precedence +_array_structure_list.direction +_array_structure_list.axis_set_id + ARRAY1 1 2049 1 increasing ELEMENT_X + ARRAY1 2 2049 2 increasing ELEMENT_Y + +loop_ +_array_structure_list_axis.axis_set_id +_array_structure_list_axis.axis_id +_array_structure_list_axis.displacement +_array_structure_list_axis.displacement_increment + ELEMENT_X ELEMENT_X 0.0408 0.0816 + ELEMENT_Y ELEMENT_Y -0.0408 -0.0816 + +loop_ +_array_intensities.array_id +_array_intensities.binary_id +_array_intensities.linearity +_array_intensities.gain +_array_intensities.gain_esd +_array_intensities.overload +_array_intensities.undefined_value + ARRAY1 1 linear 0.30 0.03 65000 0 + +loop_ +_array_structure.id +_array_structure.encoding_type +_array_structure.compression_type +_array_structure.byte_order + ARRAY1 "signed 32-bit integer" packed little_endian diff --git a/pycbf/xmas/xmasheaders.py b/pycbf/xmas/xmasheaders.py index d6032358..475626e8 100644 --- a/pycbf/xmas/xmasheaders.py +++ b/pycbf/xmas/xmasheaders.py @@ -1,257 +1,257 @@ -#!/usr/bin/env python - - -import pycbf - -# Some cbf helper functions - obj would be a cbf_handle_struct object - -def writewavelength(obj,wavelength): - obj.set_wavelength(float(wavelength)) - -def writecellpar(obj,cifname,value): - obj.find_category("cell") - obj.find_column(cifname) - obj.set_value(value) - -def writecell(obj,cell): - """ - call with cell = (a,b,c,alpha,beta,gamma) - """ - obj.find_category("cell") - obj.find_column("length_a") - obj.set_value(str(cell[0])) - obj.find_column("length_b") - obj.set_value(str(cell[1])) - obj.find_column("length_c") - obj.set_value(str(cell[2])) - obj.find_column("angle_alpha") - obj.set_value(str(cell[3])) - obj.find_column("angle_beta") - obj.set_value(str(cell[4])) - obj.find_column("angle_gamma") - obj.set_value(str(cell[5])) - -def writeUB(obj,ub): - """ - call with ub that can be indexed ub[i][j] - """ - obj.find_category("diffrn_orient_matrix") - for i in (1,2,3): - for j in (1,2,3): - obj.find_column("UB[%d][%d]"%(i,j)) - obj.set_value(str(ub[i-1][j-1])) - -def writedistance(obj,distance): - obj.set_axis_setting("DETECTOR_Z",float(distance),0.) - - -def writebeam_x_mm(obj,cen): - obj.set_axis_setting("DETECTOR_X",float(cen),0.) - -def writebeam_y_mm(obj,cen): - obj.set_axis_setting("DETECTOR_Y",float(cen),0.) - -def writeSPECcmd(obj,s): - obj.find_category("diffrn_measurement") - obj.find_column("details") - obj.set_value(s) - -def writeSPECscan(obj,s): - obj.find_category("diffrn_scan") - obj.find_column("id") - obj.set_value("SCAN%s"%(s)) - obj.find_category("diffrn_scan_axis") - obj.find_column("scan_id") - obj.rewind_row() - for i in range(obj.count_rows()): - obj.select_row(i) - obj.set_value("SCAN%s"%(s)) - obj.find_category("diffrn_scan_frame") - obj.find_column("scan_id") - obj.rewind_row() - obj.set_value("SCAN%s"%(s)) - - -def writepixelsize_y_mm(obj,s): - """ - Units are mm for cif - """ - # element number = assume this is first and only detector - element_number = 0 - # axis number = faster or slower... ? Need to check precedence ideally... - obj.find_category("array_structure_list") - obj.find_column("axis_set_id") - obj.find_row("ELEMENT_Y") - obj.find_column("precedence") - axis_number = obj.get_integervalue() - - obj.set_pixel_size(element_number, axis_number, float(s) ) - - obj.find_category("array_structure_list_axis") - obj.find_column("axis_id") - obj.find_row("ELEMENT_Y") - obj.find_column("displacement") - obj.set_doublevalue("%.6g",float(s)/2.0) - obj.find_column("displacement_increment") - obj.set_doublevalue("%.6g",float(s)) - -def writepixelsize_x_mm(obj,s): - # element number = assume this is first and only detector - element_number = 0 - # axis number = faster or slower... ? Need to check precedence ideally... - obj.find_category("array_structure_list") - obj.find_column("axis_set_id") - obj.find_row("ELEMENT_X") - obj.find_column("precedence") - axis_number = obj.get_integervalue() - - obj.set_pixel_size(element_number, axis_number, float(s) ) - - obj.find_category("array_structure_list_axis") - obj.find_column("axis_id") - obj.find_row("ELEMENT_X") - obj.find_column("displacement") - obj.set_doublevalue("%.6g",float(s)/2.0) - obj.find_column("displacement_increment") - obj.set_doublevalue("%.6g",float(s)) - -def writeintegrationtime(obj,s): - obj.find_category("diffrn_scan_frame") - obj.find_column("integration_time") - obj.set_value(str(s).replace("\000","")) - -def writenfast(obj,s): - obj.find_category("array_structure_list") - obj.find_column("index") - obj.find_row("1") - obj.find_column("dimension") - obj.set_value(str(s)) - -def writenslow(obj,s): - obj.find_category("array_structure_list") - obj.find_column("index") - obj.find_row("2") - obj.find_column("dimension") - obj.set_value(str(s)) - - -functiondict = { - "lambda" : writewavelength, - "beam_x_mm" : writebeam_x_mm, - "beam_y_mm" : writebeam_y_mm, - "distance" : writedistance, - "UB" : writeUB, - "cell" : writecell, - "cmd" : writeSPECcmd, - "scan" : writeSPECscan, - "nfast" : writenfast, - "nslow" : writenslow, - "pixelsize_y_mm" : writepixelsize_y_mm, - "pixelsize_x_mm" : writepixelsize_x_mm, - "integration_time_sec" : writeintegrationtime, - "tth" : lambda obj,value : obj.set_axis_setting( - "DETECTOR_TWO_THETA_VERTICAL",float(value),0.), - "chi" : lambda obj,value : obj.set_axis_setting( - "GONIOMETER_CHI",float(value),0.), - "th" : lambda obj,value : obj.set_axis_setting( - "GONIOMETER_THETA",float(value),0.), - "phi" : lambda obj,value : obj.set_axis_setting( - "GONIOMETER_PHI",float(value),0.), - "lc_a" : lambda obj,value : writecellpar(obj,"length_a",value), - "lc_b" : lambda obj,value : writecellpar(obj,"length_b",value), - "lc_c" : lambda obj,value : writecellpar(obj,"length_c",value), - "lc_al" : lambda obj,value : writecellpar(obj,"angle_alpha",value), - "lc_be" : lambda obj,value : writecellpar(obj,"angle_beta",value), - "lc_ga" : lambda obj,value : writecellpar(obj,"angle_gamma",value) - } - -""" - # - # Not implementing these for now - lc_ra - lc_rc 0.4742 - lc_rb 1.16 - energy 13 - cp_phi -180 - alpha 7.3716 - lc_ral 90 - cp_tth -180 - lc_rga 90 - beta 17.572 - omega -2.185 - h 0.21539 - k 0.01957 - l 5.9763 - cp_chi -180 - lc_rbe 90 - cp_th -180 - azimuth 0 -""" - -# Finally a class for creating header files. -# It reads a template and then offers a processfile command -# for running over a file series - -class cifheader: - - def __init__(self,templatefile): - self.cbf=pycbf.cbf_handle_struct() - self.cbf.read_template(templatefile) - from readmarheader import marheaderreader - self.marheaderreader = marheaderreader() - - - def processfile(self,filename, outfile=None, - format="mccd", - **kwds): - outfile=outfile.replace(format,"cif") - - if format == "mccd": - items = self.marheaderreader.get_header(filename) - - if format == "bruker": - pass - if format == "edf": - pass - - self.items=items - - # Take the image header items as default - self.updateitems(items) - - # Allow them to be overridden - self.updateitems(kwds) - - # Write the file - self.writefile(outfile) - - - - def writefile(self,filename): - self.cbf.write_file(filename,pycbf.CIF,pycbf.MIME_HEADERS, - pycbf.ENC_BASE64) - - - def updateitems(self,dict): - names = dict.keys() - for name in names: - value = dict[name] - # use a dictionary of functions - if functiondict.has_key(name): - # print "calling",functiondict[name],value - apply(functiondict[name],(self.cbf,value)) - else: - #print "ignoring",name,value - pass - - -if __name__=="__main__": - import sys - - obj=cifheader("xmas_cif_template.cif") - - ub = [[0.11, 0.12, 0.13] , [0.21, 0.22, 0.23], [0.31, 0.32, 0.33]] - - for filename in sys.argv[1:]: - fileout = filename.split("/")[-1] - obj.processfile(filename, outfile=fileout, UB=ub, distance=123.456) +#!/usr/bin/env python + + +import pycbf + +# Some cbf helper functions - obj would be a cbf_handle_struct object + +def writewavelength(obj,wavelength): + obj.set_wavelength(float(wavelength)) + +def writecellpar(obj,cifname,value): + obj.find_category("cell") + obj.find_column(cifname) + obj.set_value(value) + +def writecell(obj,cell): + """ + call with cell = (a,b,c,alpha,beta,gamma) + """ + obj.find_category("cell") + obj.find_column("length_a") + obj.set_value(str(cell[0])) + obj.find_column("length_b") + obj.set_value(str(cell[1])) + obj.find_column("length_c") + obj.set_value(str(cell[2])) + obj.find_column("angle_alpha") + obj.set_value(str(cell[3])) + obj.find_column("angle_beta") + obj.set_value(str(cell[4])) + obj.find_column("angle_gamma") + obj.set_value(str(cell[5])) + +def writeUB(obj,ub): + """ + call with ub that can be indexed ub[i][j] + """ + obj.find_category("diffrn_orient_matrix") + for i in (1,2,3): + for j in (1,2,3): + obj.find_column("UB[%d][%d]"%(i,j)) + obj.set_value(str(ub[i-1][j-1])) + +def writedistance(obj,distance): + obj.set_axis_setting("DETECTOR_Z",float(distance),0.) + + +def writebeam_x_mm(obj,cen): + obj.set_axis_setting("DETECTOR_X",float(cen),0.) + +def writebeam_y_mm(obj,cen): + obj.set_axis_setting("DETECTOR_Y",float(cen),0.) + +def writeSPECcmd(obj,s): + obj.find_category("diffrn_measurement") + obj.find_column("details") + obj.set_value(s) + +def writeSPECscan(obj,s): + obj.find_category("diffrn_scan") + obj.find_column("id") + obj.set_value("SCAN%s"%(s)) + obj.find_category("diffrn_scan_axis") + obj.find_column("scan_id") + obj.rewind_row() + for i in range(obj.count_rows()): + obj.select_row(i) + obj.set_value("SCAN%s"%(s)) + obj.find_category("diffrn_scan_frame") + obj.find_column("scan_id") + obj.rewind_row() + obj.set_value("SCAN%s"%(s)) + + +def writepixelsize_y_mm(obj,s): + """ + Units are mm for cif + """ + # element number = assume this is first and only detector + element_number = 0 + # axis number = faster or slower... ? Need to check precedence ideally... + obj.find_category("array_structure_list") + obj.find_column("axis_set_id") + obj.find_row("ELEMENT_Y") + obj.find_column("precedence") + axis_number = obj.get_integervalue() + + obj.set_pixel_size(element_number, axis_number, float(s) ) + + obj.find_category("array_structure_list_axis") + obj.find_column("axis_id") + obj.find_row("ELEMENT_Y") + obj.find_column("displacement") + obj.set_doublevalue("%.6g",float(s)/2.0) + obj.find_column("displacement_increment") + obj.set_doublevalue("%.6g",float(s)) + +def writepixelsize_x_mm(obj,s): + # element number = assume this is first and only detector + element_number = 0 + # axis number = faster or slower... ? Need to check precedence ideally... + obj.find_category("array_structure_list") + obj.find_column("axis_set_id") + obj.find_row("ELEMENT_X") + obj.find_column("precedence") + axis_number = obj.get_integervalue() + + obj.set_pixel_size(element_number, axis_number, float(s) ) + + obj.find_category("array_structure_list_axis") + obj.find_column("axis_id") + obj.find_row("ELEMENT_X") + obj.find_column("displacement") + obj.set_doublevalue("%.6g",float(s)/2.0) + obj.find_column("displacement_increment") + obj.set_doublevalue("%.6g",float(s)) + +def writeintegrationtime(obj,s): + obj.find_category("diffrn_scan_frame") + obj.find_column("integration_time") + obj.set_value(str(s).replace("\000","")) + +def writenfast(obj,s): + obj.find_category("array_structure_list") + obj.find_column("index") + obj.find_row("1") + obj.find_column("dimension") + obj.set_value(str(s)) + +def writenslow(obj,s): + obj.find_category("array_structure_list") + obj.find_column("index") + obj.find_row("2") + obj.find_column("dimension") + obj.set_value(str(s)) + + +functiondict = { + "lambda" : writewavelength, + "beam_x_mm" : writebeam_x_mm, + "beam_y_mm" : writebeam_y_mm, + "distance" : writedistance, + "UB" : writeUB, + "cell" : writecell, + "cmd" : writeSPECcmd, + "scan" : writeSPECscan, + "nfast" : writenfast, + "nslow" : writenslow, + "pixelsize_y_mm" : writepixelsize_y_mm, + "pixelsize_x_mm" : writepixelsize_x_mm, + "integration_time_sec" : writeintegrationtime, + "tth" : lambda obj,value : obj.set_axis_setting( + "DETECTOR_TWO_THETA_VERTICAL",float(value),0.), + "chi" : lambda obj,value : obj.set_axis_setting( + "GONIOMETER_CHI",float(value),0.), + "th" : lambda obj,value : obj.set_axis_setting( + "GONIOMETER_THETA",float(value),0.), + "phi" : lambda obj,value : obj.set_axis_setting( + "GONIOMETER_PHI",float(value),0.), + "lc_a" : lambda obj,value : writecellpar(obj,"length_a",value), + "lc_b" : lambda obj,value : writecellpar(obj,"length_b",value), + "lc_c" : lambda obj,value : writecellpar(obj,"length_c",value), + "lc_al" : lambda obj,value : writecellpar(obj,"angle_alpha",value), + "lc_be" : lambda obj,value : writecellpar(obj,"angle_beta",value), + "lc_ga" : lambda obj,value : writecellpar(obj,"angle_gamma",value) + } + +""" + # + # Not implementing these for now + lc_ra + lc_rc 0.4742 + lc_rb 1.16 + energy 13 + cp_phi -180 + alpha 7.3716 + lc_ral 90 + cp_tth -180 + lc_rga 90 + beta 17.572 + omega -2.185 + h 0.21539 + k 0.01957 + l 5.9763 + cp_chi -180 + lc_rbe 90 + cp_th -180 + azimuth 0 +""" + +# Finally a class for creating header files. +# It reads a template and then offers a processfile command +# for running over a file series + +class cifheader: + + def __init__(self,templatefile): + self.cbf=pycbf.cbf_handle_struct() + self.cbf.read_template(templatefile) + from readmarheader import marheaderreader + self.marheaderreader = marheaderreader() + + + def processfile(self,filename, outfile=None, + format="mccd", + **kwds): + outfile=outfile.replace(format,"cif") + + if format == "mccd": + items = self.marheaderreader.get_header(filename) + + if format == "bruker": + pass + if format == "edf": + pass + + self.items=items + + # Take the image header items as default + self.updateitems(items) + + # Allow them to be overridden + self.updateitems(kwds) + + # Write the file + self.writefile(outfile) + + + + def writefile(self,filename): + self.cbf.write_file(filename,pycbf.CIF,pycbf.MIME_HEADERS, + pycbf.ENC_BASE64) + + + def updateitems(self,dict): + names = list(dict.keys()) + for name in names: + value = dict[name] + # use a dictionary of functions + if name in functiondict: + # print("calling",functiondict[name],value) + functiondict[name](*(self.cbf,value)) + else: + #print("ignoring",name,value) + pass + + +if __name__=="__main__": + import sys + + obj=cifheader("xmas_cif_template.cif") + + ub = [[0.11, 0.12, 0.13] , [0.21, 0.22, 0.23], [0.31, 0.32, 0.33]] + + for filename in sys.argv[1:]: + fileout = filename.split("/")[-1] + obj.processfile(filename, outfile=fileout, UB=ub, distance=123.456) diff --git a/pycbf/xmas/xmasheaders.py.bak b/pycbf/xmas/xmasheaders.py.bak new file mode 100644 index 00000000..e6cd345b --- /dev/null +++ b/pycbf/xmas/xmasheaders.py.bak @@ -0,0 +1,257 @@ +#!/usr/bin/env python + + +import pycbf + +# Some cbf helper functions - obj would be a cbf_handle_struct object + +def writewavelength(obj,wavelength): + obj.set_wavelength(float(wavelength)) + +def writecellpar(obj,cifname,value): + obj.find_category("cell") + obj.find_column(cifname) + obj.set_value(value) + +def writecell(obj,cell): + """ + call with cell = (a,b,c,alpha,beta,gamma) + """ + obj.find_category("cell") + obj.find_column("length_a") + obj.set_value(str(cell[0])) + obj.find_column("length_b") + obj.set_value(str(cell[1])) + obj.find_column("length_c") + obj.set_value(str(cell[2])) + obj.find_column("angle_alpha") + obj.set_value(str(cell[3])) + obj.find_column("angle_beta") + obj.set_value(str(cell[4])) + obj.find_column("angle_gamma") + obj.set_value(str(cell[5])) + +def writeUB(obj,ub): + """ + call with ub that can be indexed ub[i][j] + """ + obj.find_category("diffrn_orient_matrix") + for i in (1,2,3): + for j in (1,2,3): + obj.find_column("UB[%d][%d]"%(i,j)) + obj.set_value(str(ub[i-1][j-1])) + +def writedistance(obj,distance): + obj.set_axis_setting("DETECTOR_Z",float(distance),0.) + + +def writebeam_x_mm(obj,cen): + obj.set_axis_setting("DETECTOR_X",float(cen),0.) + +def writebeam_y_mm(obj,cen): + obj.set_axis_setting("DETECTOR_Y",float(cen),0.) + +def writeSPECcmd(obj,s): + obj.find_category("diffrn_measurement") + obj.find_column("details") + obj.set_value(s) + +def writeSPECscan(obj,s): + obj.find_category("diffrn_scan") + obj.find_column("id") + obj.set_value("SCAN%s"%(s)) + obj.find_category("diffrn_scan_axis") + obj.find_column("scan_id") + obj.rewind_row() + for i in range(obj.count_rows()): + obj.select_row(i) + obj.set_value("SCAN%s"%(s)) + obj.find_category("diffrn_scan_frame") + obj.find_column("scan_id") + obj.rewind_row() + obj.set_value("SCAN%s"%(s)) + + +def writepixelsize_y_mm(obj,s): + """ + Units are mm for cif + """ + # element number = assume this is first and only detector + element_number = 0 + # axis number = faster or slower... ? Need to check precedence ideally... + obj.find_category("array_structure_list") + obj.find_column("axis_set_id") + obj.find_row("ELEMENT_Y") + obj.find_column("precedence") + axis_number = obj.get_integervalue() + + obj.set_pixel_size(element_number, axis_number, float(s) ) + + obj.find_category("array_structure_list_axis") + obj.find_column("axis_id") + obj.find_row("ELEMENT_Y") + obj.find_column("displacement") + obj.set_doublevalue("%.6g",float(s)/2.0) + obj.find_column("displacement_increment") + obj.set_doublevalue("%.6g",float(s)) + +def writepixelsize_x_mm(obj,s): + # element number = assume this is first and only detector + element_number = 0 + # axis number = faster or slower... ? Need to check precedence ideally... + obj.find_category("array_structure_list") + obj.find_column("axis_set_id") + obj.find_row("ELEMENT_X") + obj.find_column("precedence") + axis_number = obj.get_integervalue() + + obj.set_pixel_size(element_number, axis_number, float(s) ) + + obj.find_category("array_structure_list_axis") + obj.find_column("axis_id") + obj.find_row("ELEMENT_X") + obj.find_column("displacement") + obj.set_doublevalue("%.6g",float(s)/2.0) + obj.find_column("displacement_increment") + obj.set_doublevalue("%.6g",float(s)) + +def writeintegrationtime(obj,s): + obj.find_category("diffrn_scan_frame") + obj.find_column("integration_time") + obj.set_value(str(s).replace("\000","")) + +def writenfast(obj,s): + obj.find_category("array_structure_list") + obj.find_column("index") + obj.find_row("1") + obj.find_column("dimension") + obj.set_value(str(s)) + +def writenslow(obj,s): + obj.find_category("array_structure_list") + obj.find_column("index") + obj.find_row("2") + obj.find_column("dimension") + obj.set_value(str(s)) + + +functiondict = { + "lambda" : writewavelength, + "beam_x_mm" : writebeam_x_mm, + "beam_y_mm" : writebeam_y_mm, + "distance" : writedistance, + "UB" : writeUB, + "cell" : writecell, + "cmd" : writeSPECcmd, + "scan" : writeSPECscan, + "nfast" : writenfast, + "nslow" : writenslow, + "pixelsize_y_mm" : writepixelsize_y_mm, + "pixelsize_x_mm" : writepixelsize_x_mm, + "integration_time_sec" : writeintegrationtime, + "tth" : lambda obj,value : obj.set_axis_setting( + "DETECTOR_TWO_THETA_VERTICAL",float(value),0.), + "chi" : lambda obj,value : obj.set_axis_setting( + "GONIOMETER_CHI",float(value),0.), + "th" : lambda obj,value : obj.set_axis_setting( + "GONIOMETER_THETA",float(value),0.), + "phi" : lambda obj,value : obj.set_axis_setting( + "GONIOMETER_PHI",float(value),0.), + "lc_a" : lambda obj,value : writecellpar(obj,"length_a",value), + "lc_b" : lambda obj,value : writecellpar(obj,"length_b",value), + "lc_c" : lambda obj,value : writecellpar(obj,"length_c",value), + "lc_al" : lambda obj,value : writecellpar(obj,"angle_alpha",value), + "lc_be" : lambda obj,value : writecellpar(obj,"angle_beta",value), + "lc_ga" : lambda obj,value : writecellpar(obj,"angle_gamma",value) + } + +""" + # + # Not implementing these for now + lc_ra + lc_rc 0.4742 + lc_rb 1.16 + energy 13 + cp_phi -180 + alpha 7.3716 + lc_ral 90 + cp_tth -180 + lc_rga 90 + beta 17.572 + omega -2.185 + h 0.21539 + k 0.01957 + l 5.9763 + cp_chi -180 + lc_rbe 90 + cp_th -180 + azimuth 0 +""" + +# Finally a class for creating header files. +# It reads a template and then offers a processfile command +# for running over a file series + +class cifheader: + + def __init__(self,templatefile): + self.cbf=pycbf.cbf_handle_struct() + self.cbf.read_template(templatefile) + from readmarheader import marheaderreader + self.marheaderreader = marheaderreader() + + + def processfile(self,filename, outfile=None, + format="mccd", + **kwds): + outfile=outfile.replace(format,"cif") + + if format == "mccd": + items = self.marheaderreader.get_header(filename) + + if format == "bruker": + pass + if format == "edf": + pass + + self.items=items + + # Take the image header items as default + self.updateitems(items) + + # Allow them to be overridden + self.updateitems(kwds) + + # Write the file + self.writefile(outfile) + + + + def writefile(self,filename): + self.cbf.write_file(filename,pycbf.CIF,pycbf.MIME_HEADERS, + pycbf.ENC_BASE64) + + + def updateitems(self,dict): + names = dict.keys() + for name in names: + value = dict[name] + # use a dictionary of functions + if functiondict.has_key(name): + # print "calling",functiondict[name],value + apply(functiondict[name],(self.cbf,value)) + else: + #print "ignoring",name,value + pass + + +if __name__=="__main__": + import sys + + obj=cifheader("xmas_cif_template.cif") + + ub = [[0.11, 0.12, 0.13] , [0.21, 0.22, 0.23], [0.31, 0.32, 0.33]] + + for filename in sys.argv[1:]: + fileout = filename.split("/")[-1] + obj.processfile(filename, outfile=fileout, UB=ub, distance=123.456) diff --git a/src/cbf.c b/src/cbf.c index 4be1a15a..7dfac4e9 100644 --- a/src/cbf.c +++ b/src/cbf.c @@ -3655,7 +3655,7 @@ int cbf_get_doublevalue (cbf_handle handle, double *number) if (!*endptr) return 0; - strncpy(buffer,value,79); + memcpy(buffer,value,79); buffer[79] = '\0'; @@ -5215,9 +5215,9 @@ int cbf_convert_dictionary_definition(cbf_handle cbfdictionary, cbf_handle dicti const char *mandatory_code; - const char *itemname; + const char *itemname=NULL; - const char *expression; + const char *expression; const char *columnname; @@ -6096,7 +6096,7 @@ int cbf_find_tag (cbf_handle handle, const char *tag) catlen = colstart-tag; } - if (catlen) strncpy(categoryname,tag,catlen); + if (catlen) memcpy(categoryname,tag,catlen); categoryname[catlen] = '\0'; @@ -6104,7 +6104,7 @@ int cbf_find_tag (cbf_handle handle, const char *tag) columnname[0] = '_'; - if (collen) strncpy(columnname+(catlen?0:1),colstart+1,collen); + if (collen) memcpy(columnname+(catlen?0:1),colstart+1,collen); columnname[collen+(catlen?0:1)] = '\0'; @@ -6149,7 +6149,7 @@ int cbf_find_local_tag (cbf_handle handle, const char *tag) catlen = colstart-tag; } - if (catlen) strncpy(categoryname,tag,catlen); + if (catlen) memcpy(categoryname,tag,catlen); categoryname[catlen] = '\0'; @@ -6157,7 +6157,7 @@ int cbf_find_local_tag (cbf_handle handle, const char *tag) columnname[0] = '_'; - if (collen) strncpy(columnname+(catlen?0:1),colstart+1,collen); + if (collen) memcpy(columnname+(catlen?0:1),colstart+1,collen); columnname[collen+(catlen?0:1)] = '\0'; @@ -7602,7 +7602,7 @@ int cbf_validate (cbf_handle handle, cbf_node * node, CBF_NODETYPE type, cbf_nod cbf_failnez(cbf_row_number(handle->dictionary, (unsigned int *) &nextrow)) - strncpy(mainitemname, itemname, 80); + memcpy(mainitemname, itemname, 80); if(!cbf_find_tag(handle->dictionary, "_items.method_expression")) { @@ -7683,7 +7683,7 @@ int cbf_validate (cbf_handle handle, cbf_node * node, CBF_NODETYPE type, cbf_nod cbf_failnez(cbf_row_number(handle->dictionary, (unsigned int *) &nextrow)) - strncpy(mainitemname, itemname, 80); + memcpy(mainitemname, itemname, 80); if(!cbf_find_tag(handle->dictionary, "_items.method_expression")) { @@ -7837,7 +7837,7 @@ int cbf_validate (cbf_handle handle, cbf_node * node, CBF_NODETYPE type, cbf_nod if (colonpos) { - strncpy(loval, enumvalue, (size_t)(colonpos-enumvalue)); + memcpy(loval, enumvalue, (size_t)(colonpos-enumvalue)); loval[colonpos-enumvalue] = '\0'; diff --git a/src/cbf_context.c b/src/cbf_context.c index b3a0bca4..f7d3de3a 100644 --- a/src/cbf_context.c +++ b/src/cbf_context.c @@ -439,7 +439,7 @@ extern "C" { if (!envval) break; - if (len > klen) strncpy(dst+idst,envval,len-klen); + if (len > klen) memcpy(dst+idst,envval,len-klen); klen += strlen(envval); @@ -481,7 +481,7 @@ extern "C" { if (!envval) break; - if (len > klen) strncpy(dst+idst,envval,len-idst); + if (len > klen) memcpy(dst+idst,envval,len-idst); klen += strlen(envval); @@ -924,7 +924,7 @@ extern "C" { *new_string = type; - strncpy (new_string + 1, string, n); + memcpy (new_string + 1, string, n); new_string[n+1] = '\0'; @@ -939,7 +939,7 @@ extern "C" { new_string = (char *)memblock; - strncpy (new_string, string, n); + memcpy (new_string, string, n); new_string[n] = '\0'; diff --git a/src/cbf_hdf5.c b/src/cbf_hdf5.c index 992260b4..a93eae62 100644 --- a/src/cbf_hdf5.c +++ b/src/cbf_hdf5.c @@ -291,12 +291,6 @@ extern "C" { #endif #endif - static int cbf_write_nx2cbf__cbfdb_op - (hid_t g_id, - const char * name, - const H5L_info_t * info, - void * op_data); - static int cbf_find_array_data_h5type (hid_t * const type, unsigned int bits, @@ -3013,15 +3007,14 @@ if (CBF_SUCCESS==found) { } else if (CBF_NOTFOUND==found) { /* create a suitable dataset */ hsize_t * const _buf = (buf || !rank) ? NULL : malloc(rank*sizeof(hsize_t)); /* always free'able */ + hsize_t * const _dim = (!rank) ? NULL :malloc(rank*sizeof(hsize_t)); /* always free'able */ hsize_t * dim; - hsize_t * dummy; - dim = buf; - if (!dim) dim=&dummy; + dim = _dim; hsize_t * it; - it = dim; *it = 0; - if (rank > 0) for (it = dim+1; it != dim+rank; ++it) *it = 0; + if (rank > 0) for (it = dim; it != dim+rank; ++it) *it = 0; CBF_CALL2(cbf_H5Dcreate(location,dsetp,name,rank,dim,max,chunk,type),error); if (_buf) free((void*)_buf); + if (_dim) free((void*)_dim); } else { error |= found; /* maybe report the failure? */ @@ -6266,7 +6259,7 @@ _cbf_pilatusAxis2nexusAxisAttrs(h4data,units,depends_on,exsisItem,cmp) datasetname_parts[3] = NULL; datasetname_parts[4] = NULL; - char buffer[7]; + char buffer[11]; cbf_debug_print4(" nxdata_field_name arrayid '%s' binaryid '%s' block %d",arrayid, binaryid, block); @@ -12110,7 +12103,7 @@ _cbf_pilatusAxis2nexusAxisAttrs(h4data,units,depends_on,exsisItem,cmp) hsize_t memtype = 0; - char * attribtextbuffer; + char * attribtextbuffer = NULL; cbf_h5reportneg(attribid = H5Aopen(hid, attribname, H5P_DEFAULT),CBF_H5ERROR,errorcode); @@ -20726,335 +20719,6 @@ _cbf_pilatusAxis2nexusAxisAttrs(h4data,units,depends_on,exsisItem,cmp) } - /* iteration in a second level NXpdb group that defines a cbfcat - should contain datasets, each of which defines a column in the - category, or possibly contains groups, each of which defines - a saveframe */ - - static int cbf_write_nx2cbf__cbfcat_op - (hid_t g_id, - const char * name, - const H5L_info_t * info, - void * op_data) - { - int error = CBF_SUCCESS; - - cbf_debug_print("Entering cbf_write_nx2cbf__cbfcat_op"); - - if (!cbf_H5Ivalid(g_id) || !name || !info || !op_data) { - cbf_debug_print(cbf_strerror(CBF_ARGUMENT)); - error |= CBF_ARGUMENT; - } else { - const op_data_t * const op_data_struct = op_data; - cbf_h5handle nx = op_data_struct->nx; - cbf_handle cbf = op_data_struct->cbf; - cbf_nx2cbf_key_t * const table = op_data_struct->table; - hid_t object = CBF_H5FAIL; - H5I_type_t type = H5I_BADID; - if (!nx) { - cbf_debug_print("Invalid NeXus handle given"); - error |= CBF_ARGUMENT; - } else if (!cbf) { - cbf_debug_print("No CBF handle given"); - error |= CBF_ARGUMENT; - } else if (!table) { - cbf_debug_print("No key given"); - error |= CBF_ARGUMENT; - } else if (!cbf_H5Ivalid(object=H5Oopen(g_id, name, H5P_DEFAULT))) { - cbf_debug_print2("error: couldn't open '%s'\n",name); - error |= CBF_H5ERROR; - } else if (H5I_BADID==(type=H5Iget_type(object))) { - cbf_debug_print2("error: couldn't get type of '%s'\n",name); - error |= CBF_H5ERROR; - } else { - if (H5I_BADID==type) { - /* something went wrong when finding the object type */ - cbf_debug_print2("error: couldn't get object type of '%s'\n",name); - error |= CBF_H5ERROR; - } else if (H5I_DATASET==type) { - /* each dataset is a column */ - int colerr=0; - { /* log the dataset */ - if (nx->logfile) _cbf_write_name(nx->logfile,name,0,table->indent,0); - /* name is the required column */ - colerr=cbf_require_column(cbf,name); - if (CBF_SUCCESS!=colerr) { - cbf_debug_print(cbf_strerror(colerr)); - cbf_debug_print2("error: whilst processing column '%s'\n",name); - } else { - /* iterate through the column */ - hsize_t slab; - hsize_t dsslab; - int ndims = 0; - hsize_t offset[1] = {0}; - hsize_t stride[1] = {1}; - hsize_t count[1] = {1}; - hsize_t chunk[1] = {1}; - hsize_t curdim[1]; - hsize_t memsize[1] = {1}; - htri_t dsexists; - hsize_t dssize[1]; - hsize_t maxdssize[1]; - hsize_t dsdims[1]; - hsize_t dsmaxdims[1]; - size_t old_size; - int slaberr; - slaberr=0; - slab = 0L; - const char * datasettext; - size_t rank; - hid_t datasetspace, datasettype; - hid_t memspace, memtype; - void * datasettextbuffer; - int errorcode=0; - hid_t datasetid=object; - CBF_UNUSED( rank ); - CBF_UNUSED( datasettext ); - CBF_UNUSED( slaberr ); - CBF_UNUSED( dsmaxdims ); - CBF_UNUSED( maxdssize ); - CBF_UNUSED( dssize ); - CBF_UNUSED( dsexists ); - CBF_UNUSED( memsize ); - CBF_UNUSED( curdim ); - CBF_UNUSED( chunk ); - CBF_UNUSED( slab ); - datasetspace = (hid_t)-1; - datasettype = (hid_t)-1; - memspace = (hid_t)-1; - memtype = (hid_t)-1; - datasettextbuffer = NULL; - cbf_h5reportneg(datasettype = H5Dget_type(datasetid),CBF_FORMAT,errorcode); - cbf_h5reportneg(datasetspace = H5Dget_space(datasetid),CBF_FORMAT,errorcode); - old_size = H5Tget_size(datasettype); - cbf_reportnez(cbf_alloc(&datasettextbuffer,NULL,1,old_size+1),errorcode); - cbf_h5reportneg(ndims = H5Sget_simple_extent_ndims(datasetspace),CBF_FORMAT,errorcode); - if ( errorcode || ndims > 1 ) { - cbf_debug_print(cbf_strerror(CBF_FORMAT)); - cbf_debug_print2("error: whilst processing column '%s'\n",name); - } else { - if (ndims == 0) { - cbf_h5reportneg(memtype = H5Tcopy(H5T_C_S1),CBF_ALLOC,errorcode); - cbf_h5reportneg(memspace = H5Screate(H5S_SCALAR),CBF_ALLOC,errorcode); - cbf_h5reportneg(H5Sselect_all(datasetspace),CBF_H5ERROR,errorcode); - cbf_h5reportneg(H5Tset_size(memtype,old_size+1),CBF_ALLOC,errorcode); - cbf_h5reportneg(H5Dread(datasetid, memtype, memspace, datasetspace, H5P_DEFAULT, (void *)datasettextbuffer), - CBF_H5ERROR,errorcode); - if (errorcode==0) { - errorcode|=cbf_set_value(cbf,datasettextbuffer); - } - } else { - cbf_h5reportneg(memtype = H5Tcopy(H5T_C_S1),CBF_ALLOC,errorcode); - cbf_h5reportneg(memspace = H5Screate_simple(ndims,count,0),CBF_ALLOC,errorcode); - cbf_h5reportneg(H5Tset_size(memtype,old_size+1),CBF_ALLOC,errorcode); - errorcode|=cbf_select_row(cbf,0); - for (dsslab=0; dsslab < dsdims[0] && errorcode == CBF_SUCCESS; dsslab++) { - offset[0] = dsslab; - cbf_h5reportneg(H5Sselect_hyperslab(datasetspace,H5S_SELECT_SET, - offset,stride,count,0), CBF_FORMAT,errorcode); - errorcode|=cbf_new_row(cbf); - if (H5Dread(datasetid, memtype, memspace, datasetspace, - H5P_DEFAULT, (void *)datasettextbuffer)>=0) { - errorcode|=cbf_set_value(cbf,datasettextbuffer); - } - } - } - if (memspace >= 0) H5Sclose(memspace); - if (datasetspace >= 0) H5Sclose(datasetspace); - if (datasetspace >= 0) H5Sclose(datasetspace); - if (datasetid >= 0) H5Dclose(datasetid); - if (memtype >= 0) H5Tclose(memtype); - if (datasettextbuffer) cbf_free(&datasettextbuffer,NULL); - return errorcode; - } - } - } - } else if (H5I_GROUP==type) { - /* get NXclass & handle all groups here, should be NXpdb for a cbfcat */ - const char * NX_class = NULL; - const char * NXpdb_class = NULL; - const int found = _cbf_NXclass(object,&NX_class); - const int nxpdb_found = _cbf_Attrval(object,"NXpdb_class", &NXpdb_class); - if (CBF_NOTFOUND==found) { - /* no NX_class: can't process it, but it's not an error */ - if (nx->logfile) _cbf_write_name(nx->logfile,name,0,table->indent,0); - } else if (CBF_SUCCESS!=found) { - if (1) { - cbf_debug_print(cbf_strerror(found)); - cbf_debug_print2("error: whilst processing group '%s'\n",name); - } - error |= found; - } else { - /* I have a group with an NX_class: match on NX_class */ - if (!strcmp(NX_class,"NXpdb")|| - !strcmp(NX_class,"CBF_cbf") || - !strcmp(NX_class,"CBF_cif") || - !strcmp(NX_class,"CBF_cbfdb") || - !strcmp(NX_class,"CBF_cbfcat") || - !strcmp(NX_class,"CBF_cbfsf") || - !strcmp(NX_class,"CBF_cbfcol") || - ( NXpdb_class && - (!strcmp(NXpdb_class,"CBF_cif") || - !strcmp(NXpdb_class,"CBF_cbfdb") || - !strcmp(NXpdb_class,"CBF_cbfcat") || - !strcmp(NXpdb_class,"CBF_cbfsf") || - !strcmp(NXpdb_class,"CBF_cbfcol") - ) - ) ) { - const unsigned int indent = table->indent; - /* debugging output */ - if (NX_class) free((void*)NX_class); - if (NXpdb_class) free((void*)NXpdb_class); - nx->cbf_datablock = NULL; - nx->cbf_saveframe = NULL; - nx->cbf_category = NULL; - nx->cbf_column = NULL; - error |= cbf_read_h5file_group(cbf,nx,nx->flags,(hid_t)object); - if (cbf_H5Ivalid(object)) H5Oclose(object); - return (CBF_SUCCESS==error) ? 0 : -1; - - - /*-----------------------------------------------------------------------------------------------*/ - } else { - /* unknown NX_class: (probably) not an error */ - if (nx->logfile) _cbf_write_name(nx->logfile,name,NX_class,table->indent,0); - } - } - free((void*)NX_class); - } else { - /* unrecognised object type: can't process it, but it's not an error */ - if (nx->logfile) _cbf_write_name(nx->logfile,name,0,table->indent,0); - } - } - if (cbf_H5Ivalid(object)) H5Oclose(object); - } - /* - Convert a CBF error to something the HDF5 iteration function can understand. - All errors should already have been reported, so I shouldn't need to print anything. - */ - return (CBF_SUCCESS==error) ? 0 : -1; - } - - /* iteration in a top level NXpdb group that defines a cbfdb - should contain groups, each of which defines a cbfcat or nxpdb - each of which should contain datasets, each of which defines - a cbfcol, or possibly contains groups, each of which defines - a saveframe, which contains groups, each of which defines - a cbfcat or nxpdb each of which contains datasets, each of - which defines a cbfcol. */ - - static int cbf_write_nx2cbf__cbfdb_op - (hid_t g_id, - const char * name, - const H5L_info_t * info, - void * op_data) - { - int error = CBF_SUCCESS; - - cbf_debug_print(" entering cbf_write_nx2cbf__cbfdb_op"); - - if (!cbf_H5Ivalid(g_id) || !name || !info || !op_data) { - cbf_debug_print(cbf_strerror(CBF_ARGUMENT)); - error |= CBF_ARGUMENT; - } else { - const op_data_t * const op_data_struct = op_data; - cbf_h5handle nx = op_data_struct->nx; - cbf_handle cbf = op_data_struct->cbf; - cbf_nx2cbf_key_t * const table = op_data_struct->table; - hid_t object = CBF_H5FAIL; - H5I_type_t type = H5I_BADID; - if (!nx) { - cbf_debug_print("Invalid NeXus handle given"); - error |= CBF_ARGUMENT; - } else if (!cbf) { - cbf_debug_print("No CBF handle given"); - error |= CBF_ARGUMENT; - } else if (!table) { - cbf_debug_print("No key given"); - error |= CBF_ARGUMENT; - } else if (!cbf_H5Ivalid(object=H5Oopen(g_id, name, H5P_DEFAULT))) { - cbf_debug_print2("error: couldn't open '%s'\n",name); - error |= CBF_H5ERROR; - } else if (H5I_BADID==(type=H5Iget_type(object))) { - cbf_debug_print2("error: couldn't get type of '%s'\n",name); - error |= CBF_H5ERROR; - } else { - if (H5I_BADID==type) { - /* something went wrong when finding the object type */ - cbf_debug_print2("error: couldn't get object type of '%s'\n",name); - error |= CBF_H5ERROR; - } else if (H5I_DATASET==type) { - /* handle all datasets here */ - if (0) { - /* I don't actually have any items to match here */ - } else { - /* unknown field: can't process it, but it's not an error */ - if (nx->logfile) _cbf_write_name(nx->logfile,name,0,table->indent,0); - } - } else if (H5I_GROUP==type) { - /* get NXclass & handle all groups here, should be NXpdb for a cbfcat */ - const char * NX_class = NULL; - const int found = _cbf_NXclass(object,&NX_class); - const char * NXpdb_class = NULL; - const int nxpdb_found = _cbf_Attrval(object,"NXpdb_class", &NXpdb_class); - if (CBF_NOTFOUND==found) { - /* no NX_class: can't process it, but it's not an error */ - if (nx->logfile) _cbf_write_name(nx->logfile,name,0,table->indent,0); - } else if (CBF_SUCCESS!=found) { - if (1) { - cbf_debug_print(cbf_strerror(found)); - cbf_debug_print2("error: whilst processing group '%s'\n",name); - } - error |= found; - - /* I have a group with an NX_class: match on NX_class */ - } else if (!strcmp(NX_class,"NXpdb")|| - !strcmp(NX_class,"CBF_cbf") || - !strcmp(NX_class,"CBF_cif") || - !strcmp(NX_class,"CBF_cbfdb") || - !strcmp(NX_class,"CBF_cbfcat") || - !strcmp(NX_class,"CBF_cbfsf") || - !strcmp(NX_class,"CBF_cbfcol") || - ( NXpdb_class && - (!strcmp(NXpdb_class,"CBF_cif") || - !strcmp(NXpdb_class,"CBF_cbfdb") || - !strcmp(NXpdb_class,"CBF_cbfcat") || - !strcmp(NXpdb_class,"CBF_cbfsf") || - !strcmp(NXpdb_class,"CBF_cbfcol") - ) - ) ) { - const unsigned int indent = table->indent; - /* debugging output */ - if (NX_class) free((void*)NX_class); - if (NXpdb_class) free((void*)NXpdb_class); - nx->cbf_datablock = NULL; - nx->cbf_saveframe = NULL; - nx->cbf_category = NULL; - nx->cbf_column = NULL; - error |= cbf_read_h5file_group(cbf,nx,nx->flags,(hid_t)object); - if (cbf_H5Ivalid(object)) H5Oclose(object); - return (CBF_SUCCESS==error) ? 0 : -1; - - /*-----------------------------------------------------------------------------------------------*/ - } else { - /* unknown NX_class: (probably) not an error */ - if (nx->logfile) _cbf_write_name(nx->logfile,name,NX_class,table->indent,0); - } - free((void*)NX_class); - } else { - /* unrecognised object type: can't process it, but it's not an error */ - if (nx->logfile) _cbf_write_name(nx->logfile,name,0,table->indent,0); - } - } - if (cbf_H5Ivalid(object)) H5Oclose(object); - } - /* - Convert a CBF error to something the HDF5 iteration function can understand. - All errors should already have been reported, so I shouldn't need to print anything. - */ - return (CBF_SUCCESS==error) ? 0 : -1; - } - int _cbf_write_nx2cbf__beam_op (hid_t g_id, const char * name, @@ -21887,7 +21551,6 @@ _cbf_pilatusAxis2nexusAxisAttrs(h4data,units,depends_on,exsisItem,cmp) !strcmp(NXpdb_class,"CBF_cbfcol") ) ) ) { - const unsigned int indent = table->indent; /* debugging output */ if (NX_class) free((void*)NX_class); if (NXpdb_class) free((void*)NXpdb_class); @@ -22204,6 +21867,7 @@ _cbf_pilatusAxis2nexusAxisAttrs(h4data,units,depends_on,exsisItem,cmp) hid_t instrument = CBF_H5FAIL; hid_t detector = CBF_H5FAIL; hid_t data = CBF_H5FAIL; + CBF_UNUSED(data_row); if (!error && nx->logfile) { int len; fputc('\n',nx->logfile); @@ -22608,6 +22272,7 @@ _cbf_pilatusAxis2nexusAxisAttrs(h4data,units,depends_on,exsisItem,cmp) if (CBF_SUCCESS==error) { cbf_node * node = NULL; unsigned int id = 0; + CBF_UNUSED(node); CBF_CALL(cbf_require_datablock(cbf,table->datablock_id)); CBF_CALL(cbf_require_category(cbf,"array_structure")); CBF_CALL(cbf_require_column(cbf,"id")); @@ -22935,6 +22600,7 @@ _cbf_pilatusAxis2nexusAxisAttrs(h4data,units,depends_on,exsisItem,cmp) int ii, jj; int havepga, havegravity, havesource; double Q_McStas, U_McStas, psn_McStas; + CBF_UNUSED(diffrn_scan_axis); CBF_CALL(cbf_require_datablock(cbf,table->datablock_id)); CBF_CALL(cbf_require_category(cbf,"diffrn_measurement_axis")); diffrn_measurement_axis = cbf->node; @@ -26583,7 +26249,6 @@ static int process_DiffrnScanAxisCache(cbf_node * const category, unsigned int i; const unsigned int dimension = key->arrayAxisSet.dimension[set]; const char * depends_on_path = NULL; - const char * rotation_axis_path = NULL; hid_t dset = CBF_H5FAIL; hsize_t dim[1]; const hsize_t max[] = {H5S_UNLIMITED}; @@ -26794,7 +26459,6 @@ static int process_DiffrnScanAxisCache(cbf_node * const category, for(row=0; row < rows+7 && !error; row++) { const char * axis_id = NULL; const char * equipment = NULL; - const char * equipment_component = NULL; const char * depends_on = NULL; const char * rotation_axis = NULL; const char * type = NULL; @@ -27125,6 +26789,7 @@ static int process_DiffrnScanAxisCache(cbf_node * const category, cbf_node * axis_id = NULL; cbf_node * axis_depends_on = NULL; cbf_node * axis_rotation_axis = NULL; + CBF_UNUSED(axis_rotation_axis); CBF_CALL(cbf_find_category(handle,"array_structure_list_axis")); CBF_CALL(cbf_find_child(&asla_setid,handle->node,"axis_set_id")); CBF_CALL(cbf_find_child(&asla_axisid,handle->node,"axis_id")); @@ -29045,6 +28710,8 @@ CBF_CALL(CBFM_pilatusAxis2nexusAxisAttrs(h5data,token,"",axisItem,cmp_double,cmp H5T_sign_t type_sign = H5T_SGN_ERROR; + CBF_UNUSED(type_order); + errorcode = 0; cbf_reportnez(cbf_require_category(handle,categoryname),errorcode); @@ -29276,8 +28943,6 @@ CBF_CALL(CBFM_pilatusAxis2nexusAxisAttrs(h5data,token,"",axisItem,cmp_double,cmp char buffer[40]; - char open, close; - cbf_reportnez(cbf_alloc(((void **) &ivalue),NULL, 1,total_dim*((type_size*3)+kdims*2)+1),errorcode); @@ -30874,6 +30539,12 @@ CBF_CALL(CBFM_pilatusAxis2nexusAxisAttrs(h5data,token,"",axisItem,cmp_double,cmp CBF_UNUSED( info ); + CBF_UNUSED( checked_digest ); + + CBF_UNUSED( type ); + + CBF_UNUSED( atcbf ); + errorcode = 0; handle = ((cbf_h5Ovisithandle)op_data)->handle; diff --git a/src/cbf_hdf5_filter.c b/src/cbf_hdf5_filter.c index 6da98475..bb99fd25 100644 --- a/src/cbf_hdf5_filter.c +++ b/src/cbf_hdf5_filter.c @@ -291,14 +291,14 @@ extern "C" { const void *H5PLget_plugin_info(void) {return CBF_H5Z_CBF;} #endif - static cbf_memcpy_as_cbf(void** dstbuf, void** srcbuf, const size_t nbytes) { + static int cbf_memcpy_as_cbf(void** dstbuf, void** srcbuf, const size_t nbytes) { if (!dstbuf || !srcbuf || !nbytes || !(*srcbuf) ) return CBF_ARGUMENT; if (cbf_alloc(dstbuf,NULL,nbytes,1)) return CBF_ALLOC; memcpy(*dstbuf, *srcbuf, nbytes); return 0; } - static cbf_memcpy_as_h5(void** dstbuf, void** srcbuf, const size_t nbytes) { + static int cbf_memcpy_as_h5(void** dstbuf, void** srcbuf, const size_t nbytes) { if (!dstbuf || !srcbuf || !nbytes || !(*srcbuf) ) return CBF_ARGUMENT; *dstbuf=H5allocate_memory(nbytes,0); if (!(*dstbuf)) return CBF_ALLOC; @@ -918,7 +918,7 @@ extern "C" { cbf_reportnez (cbf_flush_characters (tempfile), errorcode); *buf_size = tempfile->characters+tempfile->characters_used-tempfile->characters_base; - cbf_memcpy_as_h5(buf,&(tempfile->characters_base),*buf_size); + cbf_memcpy_as_h5(buf,(void **)&(tempfile->characters_base),*buf_size); H5free_memory(oldbuf); #ifdef CBFDEBUG {int ii; diff --git a/src/cbf_simple.c b/src/cbf_simple.c index 511d607f..692377ff 100644 --- a/src/cbf_simple.c +++ b/src/cbf_simple.c @@ -8598,6 +8598,10 @@ extern "C" { const char *element_id; + CBF_UNUSED( ncenter1 ); + + CBF_UNUSED( ncenter2 ); + if (!detector) return CBF_ARGUMENT; diff --git a/src/cbf_stx.c b/src/cbf_stx.c index a656c174..76d9f48f 100644 --- a/src/cbf_stx.c +++ b/src/cbf_stx.c @@ -368,7 +368,8 @@ static int cbf_lex_wrapper (void *val, void *vcontext) cbf_handle cbfhandle; cbf_file *cbffile; - + + CBF_UNUSED( cbffile ); do { diff --git a/src/fcb_atol_wcnt.f90 b/src/fcb_atol_wcnt.f90 index 52541c74..004520e5 100644 --- a/src/fcb_atol_wcnt.f90 +++ b/src/fcb_atol_wcnt.f90 @@ -7,12 +7,12 @@ INTEGER(8) FUNCTION FCB_ATOL_WCNT(ARRAY,N,CNT) INTEGER, INTENT(IN):: N INTEGER(1),INTENT(IN):: ARRAY(N) - INTEGER, PARAMETER :: I0=Z'30',& !IACHAR('0') - I9=Z'39',& !IACHAR('9') - IM=Z'2D',& !IACHAR('-') - IP=Z'2B',& !IACHAR('+') - SP=Z'20',& !IACHAR(' ') - HT=Z'09' !tab position in the ASCII code + INTEGER, PARAMETER :: I0=int(Z'30'),& !IACHAR('0') + I9=int(Z'39'),& !IACHAR('9') + IM=int(Z'2D'),& !IACHAR('-') + IP=int(Z'2B'),& !IACHAR('+') + SP=int(Z'20'),& !IACHAR(' ') + HT=int(Z'09') !tab position in the ASCII code INTEGER I,K,BLANK,VORZEICHEN !----------------------------------------------------------------------- FCB_ATOL_WCNT = 0 diff --git a/src/fcb_nblen_array.f90 b/src/fcb_nblen_array.f90 index a795dc63..7eebd0ae 100644 --- a/src/fcb_nblen_array.f90 +++ b/src/fcb_nblen_array.f90 @@ -11,8 +11,10 @@ INTEGER FUNCTION FCB_NBLEN_ARRAY(ARRAY, ARRAYLEN) DO I = ARRAYLEN,1,-1 IF (FCB_NBLEN_ARRAY.NE.0)EXIT J=ARRAY(I) - IF ((J.NE.IACHAR(' ')).AND.(J.NE.Z'09').AND.(J.NE.Z'0A').AND. & - (J.NE.Z'0D').AND.(J.NE.0)) FCB_NBLEN_ARRAY = I + IF ((J.NE.IACHAR(' ')).AND.(J.NE.int(Z'09')).AND. & + (J.NE.int(Z'0A')).AND. & + (J.NE.int(Z'0D')).AND. & + (J.NE.0)) FCB_NBLEN_ARRAY = I END DO RETURN END FUNCTION FCB_NBLEN_ARRAY diff --git a/src/fcb_read_line.f90 b/src/fcb_read_line.f90 index f3ff97f9..0e48daf5 100644 --- a/src/fcb_read_line.f90 +++ b/src/fcb_read_line.f90 @@ -18,14 +18,15 @@ INTEGER FUNCTION FCB_READ_LINE(TAPIN,LAST_CHAR,FCB_BYTES_IN_REC, & FCB_READ_LINE=FCB_READ_BYTE(TAPIN,FCB_BYTES_IN_REC,BUFFER, & REC_IN_FILE,BYTE_IN_FILE,LINE(I)) IF(FCB_READ_LINE.NE.0)EXIT - IF (I.EQ.1.AND.LAST_CHAR.EQ.Z'0D'.AND.LINE(I).EQ.Z'0A') THEN + IF (I.EQ.1.AND.LAST_CHAR.EQ.int(Z'0D').AND. & + LINE(I).EQ.int(Z'0A')) THEN BYTE_IN_FILE=BYTE_IN_FILE+1 FCB_READ_LINE=FCB_READ_BYTE(TAPIN,FCB_BYTES_IN_REC,BUFFER, & REC_IN_FILE,BYTE_IN_FILE,LINE(I)) ENDIF IF(FCB_READ_LINE.NE.0)EXIT LAST_CHAR=LINE(I) - IF (LINE(I).EQ.Z'0A' .OR. LINE(I).EQ.Z'0D')EXIT + IF (LINE(I).EQ.int(Z'0A') .OR. LINE(I).EQ.int(Z'0D'))EXIT LINELEN=LINELEN+1 END DO ! *** DEBUG *** WRITE(*,'(I5,1X,80A1)')LINELEN,LINE(1:LINELEN) diff --git a/src/fcb_skip_whitespace.f90 b/src/fcb_skip_whitespace.f90 index 4b2da0e6..49896b39 100644 --- a/src/fcb_skip_whitespace.f90 +++ b/src/fcb_skip_whitespace.f90 @@ -29,7 +29,8 @@ INTEGER FUNCTION FCB_SKIP_WHITESPACE(TAPIN,LAST_CHAR, & COMMENT_LEVEL = 0 DO IF ((IC.LE.LINELEN).AND.(LINE(IC).NE.IACHAR(' ')).AND. & - (LINE(IC).NE.Z'09').AND.(LINE(IC).NE.IACHAR('(')) )EXIT + (LINE(IC).NE.int(Z'09')).AND. & + (LINE(IC).NE.IACHAR('(')) )EXIT IF (IC.GT.LINELEN) THEN FCB_SKIP_WHITESPACE = FCB_READ_LINE (TAPIN,LAST_CHAR, & diff --git a/src/img.c b/src/img.c index d8c308a6..265454ef 100644 --- a/src/img.c +++ b/src/img.c @@ -33,6 +33,18 @@ int img_swap_i4 (int i4) ((i4 >> 24) & 0x0000000FF); } + /* Replacement for memcpy */ + +void * img_memcpy(void * dst, const void * src, const size_t n){ + size_t ii = 0; + unsigned char * xdst; + unsigned char * xsrc; + xdst = (unsigned char *) dst; + xsrc = (unsigned char *) src; + for (ii=0; iitag, old_tag, img->tags * sizeof (img_tag)); + img_memcpy (img->tag, old_tag, img->tags * sizeof (img_tag)); free (old_tag); }